From: Dave Korn Date: Thu, 13 Oct 2011 02:34:36 +0000 (+0000) Subject: * pe-dll.c (generate_reloc): Don't emit a base reloc for an X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0432176d1e4adbcf2ba67cb67e3ec73f0d60d9cd;p=binutils-gdb.git * pe-dll.c (generate_reloc): Don't emit a base reloc for an underlying BFD reloc that will be discarded in eh_frame data. --- diff --git a/ld/ChangeLog b/ld/ChangeLog index 6f959bba2b5..4a3eb3bf12d 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,8 @@ +2011-10-13 Dave Korn + + * pe-dll.c (generate_reloc): Don't emit a base reloc for an + underlying BFD reloc that will be discarded in eh_frame data. + 2011-10-10 Nick Clifton * po/bg.po: Updated Bulgarian translation. diff --git a/ld/pe-dll.c b/ld/pe-dll.c index 7848063f211..ce0ab5d2ea7 100644 --- a/ld/pe-dll.c +++ b/ld/pe-dll.c @@ -1395,6 +1395,15 @@ generate_reloc (bfd *abfd, struct bfd_link_info *info) else if (!blhe || blhe->type != bfd_link_hash_defined) continue; } + /* Nor for Dwarf FDE references to discarded sections. */ + else if (bfd_is_abs_section (sym->section->output_section)) + { + /* We only ignore relocs from .eh_frame sections, as + they are discarded by the final link rather than + resolved against the kept section. */ + if (!strcmp (s->name, ".eh_frame")) + continue; + } reloc_data[total_relocs].vma = sec_vma + relocs[i]->address;