]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Fix erroneous relocations applied to absolute symbols in COFF format targets.
authorLeon Winter <winter-gcc@bfw-online.de>
Tue, 15 Mar 2016 10:53:20 +0000 (10:53 +0000)
committerNick Clifton <nickc@redhat.com>
Tue, 15 Mar 2016 10:53:20 +0000 (10:53 +0000)
PR ld/19623
* cofflink.c (_bfd_coff_generic_relocate_section): Do not apply
relocations against absolute symbols.

bfd/ChangeLog
bfd/cofflink.c

index 7b2b0013d330dcc008f7352e076790bd2e61affa..44b70d4978c783163806fc1d6f44257b6fae30ad 100644 (file)
@@ -1,3 +1,12 @@
+2016-03-15  Nick Clifton  <nickc@redhat.com>
+
+       Backport from master:
+       2016-03-09  Leon Winter  <winter-gcc@bfw-online.de>
+
+       PR ld/19623
+       * cofflink.c (_bfd_coff_generic_relocate_section): Do not apply
+       relocations against absolute symbols.
+
 2016-03-14  H.J. Lu  <hongjiu.lu@intel.com>
 
        Backport from master
index 8d98fec2146ecd4de12dee94219f435dd284687e..88eb2b33e76c0738cb97ff78bc4aea7269e11eaf 100644 (file)
@@ -2977,6 +2977,12 @@ _bfd_coff_generic_relocate_section (bfd *output_bfd,
          else
            {
              sec = sections[symndx];
+
+             /* PR 19623: Relocations against symbols in
+                the absolute sections should ignored.  */
+              if (bfd_is_abs_section (sec))
+               continue;
+
               val = (sec->output_section->vma
                     + sec->output_offset
                     + sym->n_value);