[PATCH 2/2] xtensa: implement R_XTENSA_32_ABS

Project / Subsystem

binutils / xtensa

Date

2026-09-23

Proposer

Alexey Lapshin <alexey.lapshin@espressif.com>

Source type

public_inbox

Consensus

Proposed

Sentiment

—/10

Technical tradeoffs

  • • Introduces a new relocation type to better align with LLVM's output and standard SHT_RELA semantics.
  • • Adds complexity with new command-line and configure options to control relocation type emission.
  • • Ensures backward compatibility by allowing R_XTENSA_32_ABS and R_XTENSA_32 to coexist.

All attributes

project
binutils
subsystem
xtensa
patch_id
—
discussion_id
20260923170020.757213-3-alexey.lapshin@espressif.com
source_type
public_inbox
title
[PATCH 2/2] xtensa: implement R_XTENSA_32_ABS
headline
xtensa: implement R_XTENSA_32_ABS
tldr
Adds a new 32-bit absolute address relocation type (R_XTENSA_32_ABS) for Xtensa, compatible with LLVM and allowing coexistence with existing R_XTENSA_32 reloca…
proposer
Alexey Lapshin <alexey.lapshin@espressif.com>
consensus
Proposed
outcome
proposed
sentiment_score
—
technical_tradeoffs
  • • Introduces a new relocation type to better align with LLVM's output and standard SHT_RELA semantics.
  • • Adds complexity with new command-line and configure options to control relocation type emission.
  • • Ensures backward compatibility by allowing R_XTENSA_32_ABS and R_XTENSA_32 to coexist.
series_id
binutils:xtensa: implement r_xtensa_32_abs
series_role
reply
series_parts
[]
tags
  • • xtensa
  • • relocation
  • • linker
  • • assembler
  • • ABI
bugzilla_url
—
date
2026-09-23T00:00:00.000Z

[PATCH 2/2] xtensa: implement R_XTENSA_32_ABS

This patch implements R_XTENSA_32_ABS, a new 32-bit absolute address relocation type for the Xtensa architecture. This relocation is computed as S + A and follows the generic ABI for SHT_RELA, meaning the addend is solely in r_addend. This is the format LLVM emits for 32-bit absolute data. The change ensures that R_XTENSA_32_ABS is handled identically to R_XTENSA_32 during relocation application and relaxation, allowing objects using either to be linked together. It also enables the coalescing of literals using these relocations. New command-line options (--abs32-rela, --no-abs32-rela) and a configure-time option (--enable-r-xtensa-32-abs) are introduced to control which relocation type the assembler emits by default.