aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2020-09-15 13:56:18 -0700
committerH.J. Lu <hjl.tools@gmail.com>2020-09-15 13:56:40 -0700
commitec6653d824fef41298fdb384ba74bcbc7be0dc22 (patch)
tree3c7f8d0267f8b6c2a08952914a15df8e37240927 /bfd
parent0403e9ccae403b8b7bf82eef0536c5295a45a415 (diff)
downloadgdb-ec6653d824fef41298fdb384ba74bcbc7be0dc22.zip
gdb-ec6653d824fef41298fdb384ba74bcbc7be0dc22.tar.gz
gdb-ec6653d824fef41298fdb384ba74bcbc7be0dc22.tar.bz2
PE/x86-64: Display PE relocation names
For PE/x86-64, display PE relocation names: R_X86_64_64 -> IMAGE_REL_AMD64_ADDR64 R_X86_64_32 -> IMAGE_REL_AMD64_ADDR32. rva32 -> IMAGE_REL_AMD64_ADDR32NB R_X86_64_PC32 -> IMAGE_REL_AMD64_REL32 DISP32+1 -> IMAGE_REL_AMD64_REL32_1 DISP32+2 -> IMAGE_REL_AMD64_REL32_2 DISP32+3 -> IMAGE_REL_AMD64_REL32_3 DISP32+4 -> IMAGE_REL_AMD64_REL32_4 DISP32+5 -> IMAGE_REL_AMD64_REL32_5 secrel32 -> IMAGE_REL_AMD64_SECREL bfd/ * coff-x86_64.c (howto_table): Display PE relocation names. gas/ * testsuite/gas/cfi/reloc-pe-i386.d: Updated. * testsuite/gas/i386/x86-64-w64-pcrel.d: Likewise.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog4
-rw-r--r--bfd/coff-x86_64.c22
2 files changed, 15 insertions, 11 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 4bb61e6..cc5afb4 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,7 @@
+2020-09-15 H.J. Lu <hongjiu.lu@intel.com>
+
+ * coff-x86_64.c (howto_table): Display PE relocation names.
+
2020-09-15 Hans-Peter Nilsson <hp@axis.com>
PR ld/26589
diff --git a/bfd/coff-x86_64.c b/bfd/coff-x86_64.c
index a663291..3cad00a 100644
--- a/bfd/coff-x86_64.c
+++ b/bfd/coff-x86_64.c
@@ -222,7 +222,7 @@ static reloc_howto_type howto_table[] =
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
coff_amd64_reloc, /* special_function */
- "R_X86_64_64", /* name */
+ "IMAGE_REL_AMD64_ADDR64", /* name */
TRUE, /* partial_inplace */
0xffffffffffffffffll, /* src_mask */
0xffffffffffffffffll, /* dst_mask */
@@ -235,7 +235,7 @@ static reloc_howto_type howto_table[] =
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
coff_amd64_reloc, /* special_function */
- "R_X86_64_32", /* name */
+ "IMAGE_REL_AMD64_ADDR32", /* name */
TRUE, /* partial_inplace */
0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */
@@ -249,7 +249,7 @@ static reloc_howto_type howto_table[] =
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
coff_amd64_reloc, /* special_function */
- "rva32", /* name */
+ "IMAGE_REL_AMD64_ADDR32NB", /* name */
TRUE, /* partial_inplace */
0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */
@@ -263,7 +263,7 @@ static reloc_howto_type howto_table[] =
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
coff_amd64_reloc, /* special_function */
- "R_X86_64_PC32", /* name */
+ "IMAGE_REL_AMD64_REL32", /* name */
TRUE, /* partial_inplace */
0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */
@@ -277,7 +277,7 @@ static reloc_howto_type howto_table[] =
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
coff_amd64_reloc, /* special_function */
- "DISP32+1", /* name */
+ "IMAGE_REL_AMD64_REL32_1", /* name */
TRUE, /* partial_inplace */
0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */
@@ -290,7 +290,7 @@ static reloc_howto_type howto_table[] =
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
coff_amd64_reloc, /* special_function */
- "DISP32+2", /* name */
+ "IMAGE_REL_AMD64_REL32_2", /* name */
TRUE, /* partial_inplace */
0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */
@@ -303,7 +303,7 @@ static reloc_howto_type howto_table[] =
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
coff_amd64_reloc, /* special_function */
- "DISP32+3", /* name */
+ "IMAGE_REL_AMD64_REL32_3", /* name */
TRUE, /* partial_inplace */
0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */
@@ -316,7 +316,7 @@ static reloc_howto_type howto_table[] =
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
coff_amd64_reloc, /* special_function */
- "DISP32+4", /* name */
+ "IMAGE_REL_AMD64_REL32_4", /* name */
TRUE, /* partial_inplace */
0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */
@@ -329,7 +329,7 @@ static reloc_howto_type howto_table[] =
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
coff_amd64_reloc, /* special_function */
- "DISP32+5", /* name */
+ "IMAGE_REL_AMD64_REL32_5", /* name */
TRUE, /* partial_inplace */
0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */
@@ -345,7 +345,7 @@ static reloc_howto_type howto_table[] =
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
coff_amd64_reloc, /* special_function */
- "secrel32", /* name */
+ "IMAGE_REL_AMD64_SECREL", /* name */
TRUE, /* partial_inplace */
0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */
@@ -896,4 +896,4 @@ const bfd_target
&bigobj_swap_table
};
-#endif \ No newline at end of file
+#endif