[AArch64,3/4] Recognize R_AARCH64_P32_ABS32 as 32-bit relocation in readelf

Message ID 0fc18683-9463-bf03-1ca6-cf0492eb78b5@foss.arm.com
State New
Headers show

Commit Message

Jiong Wang Dec. 5, 2016, 5:53 p.m.
R_AARCH64_P32_ABS32 should be recognized in is_32bit_abs_reloc.

After this patch, those "unable to apply unsupported reloc type 1" failures
in gas regression under ILP32 mode gone away.

OK for master?


binutils/
2016-12-05  Jiong Wang<jiong.wang@arm.com>

         * readelf.c (is_32bit_abs_reloc): Recognize R_AARCH64_P32_ABS32.

Comments

Nick Clifton Dec. 6, 2016, 5:06 p.m. | #1
Hi Jiong,

> OK for master?

> 

> binutils/

> 2016-12-05  Jiong Wang<jiong.wang@arm.com>

> 

>         * readelf.c (is_32bit_abs_reloc): Recognize R_AARCH64_P32_ABS32.


Approved - please apply.

(For the record this patch counts as obvious).

Cheers
  Nick

Patch hide | download patch | download mbox

diff --git a/binutils/readelf.c b/binutils/readelf.c
index c5a628f..93a57e1 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -11731,7 +11731,8 @@  is_32bit_abs_reloc (unsigned int reloc_type)
     case EM_960:
       return reloc_type == 2; /* R_960_32.  */
     case EM_AARCH64:
-      return reloc_type == 258; /* R_AARCH64_ABS32 */
+      return (reloc_type == 258
+	      || reloc_type == 1); /* R_AARCH64_ABS32 || R_AARCH64_P32_ABS32 */
     case EM_ADAPTEVA_EPIPHANY:
       return reloc_type == 3;
     case EM_ALPHA: