[PATCH 1/2] xtensa: reserve relocation number for R_XTENSA_32_ABS
Alexey Lapshin
alexey.lapshin@espressif.com
Wed Sep 23 16:59:22 GMT 2026
R_XTENSA_32 uses a partial_inplace howto, so BFD stores its addend in
the relocated word rather than in r_addend, which deviates from the
generic ABI for an SHT_RELA target. R_XTENSA_32_ABS is the same 32-bit
absolute address computed as S + A, with the addend taken only from
r_addend.
Reserve its number ahead of the implementation so that other toolchains
can rely on it while the rest of the change is under review.
include/
* elf/xtensa.h (R_XTENSA_32_ABS): New relocation, number 64.
---
include/elf/xtensa.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/include/elf/xtensa.h b/include/elf/xtensa.h
index 032b94ef94b..328d64428bc 100644
--- a/include/elf/xtensa.h
+++ b/include/elf/xtensa.h
@@ -96,6 +96,11 @@ START_RELOC_NUMBERS (elf_xtensa_reloc_type)
/* Positive same-section difference encoded as uleb128; rewritten
in place after relaxation without changing the section size. */
RELOC_NUMBER (R_XTENSA_PDIFF_ULEB128, 63)
+ /* 32-bit absolute address computed as S + A, with the addend taken
+ only from r_addend as the generic ABI requires. Unlike R_XTENSA_32,
+ which is partial_inplace, the contents of the relocated word do not
+ contribute to the result. */
+ RELOC_NUMBER (R_XTENSA_32_ABS, 64)
END_RELOC_NUMBERS (R_XTENSA_max)
/* Processor-specific flags for the ELF header e_flags field. */
--
2.55.0
More information about the Binutils
mailing list