This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Teach readelf about IA64 MSB relocs
- From: Alan Modra <amodra at gmail dot com>
- To: binutils at sourceware dot org
- Cc: Alexandre Oliva <aoliva at redhat dot com>
- Date: Wed, 2 Aug 2017 16:36:27 +0930
- Subject: Teach readelf about IA64 MSB relocs
- Authentication-results: sourceware.org; auth=none
readelf only knew about the IA64 LSB relocs, causing a number of
ia64-hpux testsuite failures, including a bunch of the new dwarf
tests. Alex, am33_2.0-linux fails many too,
am33_2.0-linux +FAIL: DWARF2 5
am33_2.0-linux +FAIL: DWARF2 7
am33_2.0-linux +FAIL: DWARF2 11
am33_2.0-linux +FAIL: DWARF2 12
am33_2.0-linux +FAIL: DWARF2 13
am33_2.0-linux +FAIL: DWARF2 14
am33_2.0-linux +FAIL: DWARF2 15
am33_2.0-linux +FAIL: DWARF2 16
am33_2.0-linux +FAIL: DWARF2 17
am33_2.0-linux +FAIL: DWARF2 18
By the look of it, because you didn't use the canonical target name in
not-target directives. Please fix.
* readelf.c (is_32bit_abs_reloc): Add R_IA64_SECREL32MSB and
R_IA64_DIR32MSB.
(is_64bit_abs_reloc): Add R_IA64_DIR64MSB.
(is_64bit_pcrel_reloc): Add R_IA64_PCREL64MSB.
diff --git a/binutils/readelf.c b/binutils/readelf.c
index 67c44f5..2b15f0f 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -12069,8 +12069,10 @@ is_32bit_abs_reloc (unsigned int reloc_type)
case EM_H8_300H:
return reloc_type == 1; /* R_H8_DIR32. */
case EM_IA_64:
- return reloc_type == 0x65 /* R_IA64_SECREL32LSB. */
- || reloc_type == 0x25; /* R_IA64_DIR32LSB. */
+ return (reloc_type == 0x64 /* R_IA64_SECREL32MSB. */
+ || reloc_type == 0x65 /* R_IA64_SECREL32LSB. */
+ || reloc_type == 0x24 /* R_IA64_DIR32MSB. */
+ || reloc_type == 0x25 /* R_IA64_DIR32LSB. */);
case EM_IP2K_OLD:
case EM_IP2K:
return reloc_type == 2; /* R_IP2K_32. */
@@ -12283,7 +12285,8 @@ is_64bit_abs_reloc (unsigned int reloc_type)
case EM_ALPHA:
return reloc_type == 2; /* R_ALPHA_REFQUAD. */
case EM_IA_64:
- return reloc_type == 0x27; /* R_IA64_DIR64LSB. */
+ return (reloc_type == 0x26 /* R_IA64_DIR64MSB. */
+ || reloc_type == 0x27 /* R_IA64_DIR64LSB. */);
case EM_PARISC:
return reloc_type == 80; /* R_PARISC_DIR64. */
case EM_PPC64:
@@ -12323,7 +12326,8 @@ is_64bit_pcrel_reloc (unsigned int reloc_type)
case EM_ALPHA:
return reloc_type == 11; /* R_ALPHA_SREL64. */
case EM_IA_64:
- return reloc_type == 0x4f; /* R_IA64_PCREL64LSB. */
+ return (reloc_type == 0x4e /* R_IA64_PCREL64MSB. */
+ || reloc_type == 0x4f /* R_IA64_PCREL64LSB. */);
case EM_PARISC:
return reloc_type == 72; /* R_PARISC_PCREL64. */
case EM_PPC64:
--
Alan Modra
Australia Development Lab, IBM