diff options
author | Nick Clifton <nickc@redhat.com> | 2014-03-26 16:16:20 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2014-03-26 16:16:20 +0000 |
commit | 55bfc9ac025c1c9cd1ad5422829b3dc70f357a79 (patch) | |
tree | 3eaf78d55a1d539773b2e0cebe719fdd6a59c2db /bfd/cofflink.c | |
parent | 318d3177f7d67dac94baa07aab04192fc7bcba49 (diff) | |
download | binutils-gdb-55bfc9ac025c1c9cd1ad5422829b3dc70f357a79.tar.gz |
This fixes a problem for 64-bit Cygwin, where building some packages can
produce spurious errors about truncated relocations. The relocations are
only truncated because they are being made against sections which are going
to be discarded so that base address is zero instead of the expected 64-bit
base value.
* cofflink.c (_bfd_coff_generic_relocate_section): Skip
relocations in discarded sections.
Diffstat (limited to 'bfd/cofflink.c')
-rw-r--r-- | bfd/cofflink.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/bfd/cofflink.c b/bfd/cofflink.c index 75ef7aff292..bfb1ebba013 100644 --- a/bfd/cofflink.c +++ b/bfd/cofflink.c @@ -3059,6 +3059,11 @@ _bfd_coff_generic_relocate_section (bfd *output_bfd, else { sec = sections[symndx]; + + /* If the output section has been discarded then ignore this reloc. */ + if (sec->output_section->vma == 0) + continue; + val = (sec->output_section->vma + sec->output_offset + sym->n_value); |