]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* pe-dll.c (generate_reloc): Don't emit a base reloc for an
authorDave Korn <dave.korn@artimi.com>
Thu, 13 Oct 2011 02:35:08 +0000 (02:35 +0000)
committerDave Korn <dave.korn@artimi.com>
Thu, 13 Oct 2011 02:35:08 +0000 (02:35 +0000)
underlying BFD reloc that will be discarded in eh_frame data.

ld/ChangeLog
ld/pe-dll.c

index 2b3caad756fc9831bb0494f8760382435cb8906b..1808149b06dc4673042960c29876eb187a1774e2 100644 (file)
@@ -1,3 +1,8 @@
+2011-10-13  Dave Korn  <dave.korn.cygwin@gmail.com>
+
+       * 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-09-22  Tristan Gingold  <gingold@adacore.com>
 
        * NEWS: Add marker for 2.22.
index 7848063f211dcdbee109b7d0379232171b5f934c..ce0ab5d2ea79e24fd8aa0ecf9d763e3ed71dd9dd 100644 (file)
@@ -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;