aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2006-10-04 11:50:43 +0000
committerH.J. Lu <hjl.tools@gmail.com>2006-10-04 11:50:43 +0000
commit3b578682c112442b8873dcdc540c3c3a7177e086 (patch)
tree351ed3209942d01e9b08fa25d15fdca2236322d5 /binutils
parent95a4e393f9f06bc76d4fb4ca0d748cd7a028e62e (diff)
downloadgdb-3b578682c112442b8873dcdc540c3c3a7177e086.zip
gdb-3b578682c112442b8873dcdc540c3c3a7177e086.tar.gz
gdb-3b578682c112442b8873dcdc540c3c3a7177e086.tar.bz2
2006-10-04 H.J. Lu <hongjiu.lu@intel.com>
* readelf.c (debug_apply_rela_addends): Don't ignore relocation against symbols without type.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog5
-rw-r--r--binutils/readelf.c5
2 files changed, 10 insertions, 0 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 812afc2..0509d7a 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,8 @@
+2006-10-04 H.J. Lu <hongjiu.lu@intel.com>
+
+ * readelf.c (debug_apply_rela_addends): Don't ignore relocation
+ against symbols without type.
+
2006-09-25 Pedro Alves <pedro_alves@portugalmail.pt>
* nlmconv.c (main) : Use LITMEMCPY.
diff --git a/binutils/readelf.c b/binutils/readelf.c
index b1f3fc6..bb18415 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -7747,6 +7747,10 @@ debug_apply_rela_addends (void *file,
if (ELF32_R_SYM (rp->r_info) != 0
&& ELF32_ST_TYPE (sym->st_info) != STT_SECTION
+ /* Relocations against symbols without type can happen.
+ Gcc -feliminate-dwarf2-dups may generate symbols
+ without type for debug info. */
+ && ELF32_ST_TYPE (sym->st_info) != STT_NOTYPE
/* Relocations against object symbols can happen,
eg when referencing a global array. For an
example of this see the _clz.o binary in libgcc.a. */
@@ -7776,6 +7780,7 @@ debug_apply_rela_addends (void *file,
if (ELF64_R_SYM (rp->r_info) != 0
&& ELF64_ST_TYPE (sym->st_info) != STT_SECTION
+ && ELF64_ST_TYPE (sym->st_info) != STT_NOTYPE
&& ELF64_ST_TYPE (sym->st_info) != STT_OBJECT)
{
warn (_("skipping unexpected symbol type %s in relocation in section .rela.%s\n"),