diff options
author | Leon Winter <winter-gcc@bfw-online.de> | 2016-03-15 10:53:20 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2016-03-15 10:53:20 +0000 |
commit | d0509e7f90c3131357c2d4f1d37a989eb3bb4a31 (patch) | |
tree | 2a501f7162b6683eae82d7be97e505cfa9da4c4a | |
parent | c4306ea069ec2207753c0413afee0f8551478f19 (diff) | |
download | gdb-d0509e7f90c3131357c2d4f1d37a989eb3bb4a31.zip gdb-d0509e7f90c3131357c2d4f1d37a989eb3bb4a31.tar.gz gdb-d0509e7f90c3131357c2d4f1d37a989eb3bb4a31.tar.bz2 |
Fix erroneous relocations applied to absolute symbols in COFF format targets.
PR ld/19623
* cofflink.c (_bfd_coff_generic_relocate_section): Do not apply
relocations against absolute symbols.
-rw-r--r-- | bfd/ChangeLog | 9 | ||||
-rw-r--r-- | bfd/cofflink.c | 6 |
2 files changed, 15 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 7b2b001..44b70d4 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -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 diff --git a/bfd/cofflink.c b/bfd/cofflink.c index 8d98fec..88eb2b3 100644 --- a/bfd/cofflink.c +++ b/bfd/cofflink.c @@ -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); |