From: Leon Winter Date: Wed, 9 Mar 2016 15:26:45 +0000 (+0000) Subject: For COFF and COFF/PE targets, skip relocations against absolute symbols. X-Git-Tag: users/hjl/linux/release/2.26.51.0.2~1^2~78^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=26c62da040fb9d602da269a3bdffdea13a4367c7;p=thirdparty%2Fbinutils-gdb.git For COFF and COFF/PE targets, skip relocations against absolute symbols. 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 fc632192682..d0dfd9bf441 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2016-03-09 Leon Winter + + PR ld/19623 + * cofflink.c (_bfd_coff_generic_relocate_section): Do not apply + relocations against absolute symbols. + 2016-03-09 Alan Modra PR binutils/19775 diff --git a/bfd/cofflink.c b/bfd/cofflink.c index 7652cc3fa21..4756fc3070f 100644 --- a/bfd/cofflink.c +++ b/bfd/cofflink.c @@ -3007,6 +3007,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);