aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2015-04-29 12:26:46 +0100
committerNick Clifton <nickc@redhat.com>2015-04-29 12:26:46 +0100
commita93d5cb1976818c8d34133fd8798b3df76269f80 (patch)
tree9a9abb9b4660704caff3d7215a92aac32a8c27fa /bfd
parent5d239759c00a60a00986427b46c4f32e7fe3d616 (diff)
downloadfsf-binutils-gdb-a93d5cb1976818c8d34133fd8798b3df76269f80.zip
fsf-binutils-gdb-a93d5cb1976818c8d34133fd8798b3df76269f80.tar.gz
fsf-binutils-gdb-a93d5cb1976818c8d34133fd8798b3df76269f80.tar.bz2
Add support for absolute PE/x86 relocations.
PR 17099 * coff-i386.c (coff_i386_rtype_to_howto): Allow absolute PCRLONG relocs.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog6
-rw-r--r--bfd/coff-i386.c7
2 files changed, 12 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 2b4b32f..db19e8a 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,9 @@
+2015-04-29 Nick Clifton <nickc@redhat.com>
+
+ PR 17099
+ * coff-i386.c (coff_i386_rtype_to_howto): Allow absolute PCRLONG
+ relocs.
+
2015-04-27 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
* elf-s390-common.c (elf_s390_merge_obj_attributes): New function.
diff --git a/bfd/coff-i386.c b/bfd/coff-i386.c
index 20d2402..b185b81 100644
--- a/bfd/coff-i386.c
+++ b/bfd/coff-i386.c
@@ -509,7 +509,12 @@ coff_i386_rtype_to_howto (bfd *abfd ATTRIBUTE_UNUSED,
*addendp -= pe_data(sec->output_section->owner)->pe_opthdr.ImageBase;
}
- BFD_ASSERT (sym != NULL);
+ /* PR 17099 - Absolute R_PCRLONG relocations do not need a symbol. */
+ if (rel->r_type == R_PCRLONG && sym == NULL)
+ *addendp -= rel->r_vaddr;
+ else
+ BFD_ASSERT (sym != NULL);
+
if (rel->r_type == R_SECREL32 && sym != NULL)
{
bfd_vma osect_vma;