From: Leon Winter Date: Tue, 15 Mar 2016 10:53:20 +0000 (+0000) Subject: Fix erroneous relocations applied to absolute symbols in COFF format targets. X-Git-Tag: users/ARM/embedded-gdb-2_26-branch-2016q1~6^2~76 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d0509e7f90c3131357c2d4f1d37a989eb3bb4a31;p=thirdparty%2Fbinutils-gdb.git 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. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 7b2b0013d33..44b70d4978c 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,12 @@ +2016-03-15 Nick Clifton + + Backport from master: + 2016-03-09 Leon Winter + + PR ld/19623 + * cofflink.c (_bfd_coff_generic_relocate_section): Do not apply + relocations against absolute symbols. + 2016-03-14 H.J. Lu Backport from master diff --git a/bfd/cofflink.c b/bfd/cofflink.c index 8d98fec2146..88eb2b33e76 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);