Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/libexec/ld.elf_so/arch/arm Expand symnum, GCC's uninitialize...
details: https://anonhg.NetBSD.org/src/rev/9a85434f1fd9
branches: trunk
changeset: 354537:9a85434f1fd9
user: joerg <joerg%NetBSD.org@localhost>
date: Tue Jun 20 12:41:49 2017 +0000
description:
Expand symnum, GCC's uninitialized used tracking is too imprecise.
diffstat:
libexec/ld.elf_so/arch/arm/mdreloc.c | 29 ++++++++++++++++-------------
1 files changed, 16 insertions(+), 13 deletions(-)
diffs (80 lines):
diff -r 289361ac5e62 -r 9a85434f1fd9 libexec/ld.elf_so/arch/arm/mdreloc.c
--- a/libexec/ld.elf_so/arch/arm/mdreloc.c Tue Jun 20 11:01:18 2017 +0000
+++ b/libexec/ld.elf_so/arch/arm/mdreloc.c Tue Jun 20 12:41:49 2017 +0000
@@ -1,8 +1,8 @@
-/* $NetBSD: mdreloc.c,v 1.40 2017/06/20 11:01:18 joerg Exp $ */
+/* $NetBSD: mdreloc.c,v 1.41 2017/06/20 12:41:49 joerg Exp $ */
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: mdreloc.c,v 1.40 2017/06/20 11:01:18 joerg Exp $");
+__RCSID("$NetBSD: mdreloc.c,v 1.41 2017/06/20 12:41:49 joerg Exp $");
#endif /* not lint */
#include <sys/types.h>
@@ -128,15 +128,17 @@
"%s: R_ARM_PC24 relocation @ %p to %s failed "
"(displacement %ld (%#lx) out of range)",
obj->path, where,
- obj->strtab + obj->symtab[symnum].st_name,
+ obj->strtab + obj->symtab[
+ ELF_R_SYM(rel->r_info)].st_name,
(long) tmp, (long) tmp);
return -1;
}
tmp >>= 2;
*where = (*where & 0xff000000) | (tmp & 0x00ffffff);
rdbg(("PC24 %s in %s --> %p @ %p in %s",
- obj->strtab + obj->symtab[symnum].st_name,
- obj->path, (void *)*where, where, defobj->path));
+ obj->strtab + obj->symtab[ELF_R_SYM(rel->r_info)]
+ .st_name, obj->path, (void *)*where, where,
+ defobj->path));
break;
}
#endif
@@ -160,8 +162,9 @@
store_ptr(where, tmp);
}
rdbg(("ABS32/GLOB_DAT %s in %s --> %p @ %p in %s",
- obj->strtab + obj->symtab[symnum].st_name,
- obj->path, (void *)tmp, where, defobj->path));
+ obj->strtab + obj->symtab[ELF_R_SYM(rel->r_info)]
+ .st_name, obj->path, (void *)tmp, where,
+ defobj->path));
break;
case R_TYPE(RELATIVE): /* word32 B + A */
@@ -201,8 +204,8 @@
store_ptr(where, tmp);
rdbg(("TLS_DTPOFF32 %s in %s --> %p",
- obj->strtab + obj->symtab[symnum].st_name,
- obj->path, (void *)tmp));
+ obj->strtab + obj->symtab[ELF_R_SYM(rel->r_info)]
+ .st_name, obj->path, (void *)tmp));
break;
case R_TYPE(TLS_DTPMOD32):
@@ -213,8 +216,8 @@
store_ptr(where, tmp);
rdbg(("TLS_DTPMOD32 %s in %s --> %p",
- obj->strtab + obj->symtab[symnum].st_name,
- obj->path, (void *)tmp));
+ obj->strtab + obj->symtab[ELF_R_SYM(rel->r_info)]
+ .st_name, obj->path, (void *)tmp));
break;
@@ -230,8 +233,8 @@
else
store_ptr(where, tmp);
rdbg(("TLS_TPOFF32 %s in %s --> %p",
- obj->strtab + obj->symtab[symnum].st_name,
- obj->path, (void *)tmp));
+ obj->strtab + obj->symtab[ELF_R_SYM(rel->r_info)]
+ .st_name, obj->path, (void *)tmp));
break;
default:
Home |
Main Index |
Thread Index |
Old Index