aboutsummaryrefslogtreecommitdiff
path: root/bfd/cofflink.c
diff options
context:
space:
mode:
authorLeon Winter <winter-gcc@bfw-online.de>2016-03-09 15:26:45 +0000
committerNick Clifton <nickc@redhat.com>2016-03-09 15:26:45 +0000
commit26c62da040fb9d602da269a3bdffdea13a4367c7 (patch)
treec76422ea9c2183fe559db39061e205318e5f628f /bfd/cofflink.c
parentaa8a08637e017bcf77b62a3c79a90556085edea1 (diff)
downloadbinutils-26c62da040fb9d602da269a3bdffdea13a4367c7.zip
binutils-26c62da040fb9d602da269a3bdffdea13a4367c7.tar.gz
binutils-26c62da040fb9d602da269a3bdffdea13a4367c7.tar.bz2
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.
Diffstat (limited to 'bfd/cofflink.c')
-rw-r--r--bfd/cofflink.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/bfd/cofflink.c b/bfd/cofflink.c
index 7652cc3..4756fc3 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);