[patch] AVR: Let -mrelax elide global RJMP .+0

Project / Subsystem

binutils / avr/ld

Date

2026-08-16

Proposer

Georg-Johann Lay <avr@gjlay.de>

Source type

public_inbox

Consensus

Proposed

Sentiment

—/10

Technical tradeoffs

  • • Eliding instructions might make debugging slightly more complex if the original instruction's presence was significant for analysis.
  • • The `--no-elide-rjmp0` option adds complexity to the linker's command-line interface.

All attributes

project
binutils
subsystem
avr/ld
patch_id
—
discussion_id
119dbbc3-90ac-4bba-9e16-de0c9d084a8e@gjlay.de
source_type
public_inbox
title
[patch] AVR: Let -mrelax elide global RJMP .+0
headline
AVR: Elide global RJMP .+0 with -mrelax
tldr
Patch allows the AVR linker, with -mrelax, to elide RJMP instructions with a zero offset targeting global symbols.
proposer
Georg-Johann Lay <avr@gjlay.de>
consensus
Proposed
outcome
proposed
sentiment_score
—
technical_tradeoffs
  • • Eliding instructions might make debugging slightly more complex if the original instruction's presence was significant for analysis.
  • • The `--no-elide-rjmp0` option adds complexity to the linker's command-line interface.
series_id
—
series_role
standalone
series_parts
[]
tags
  • • avr
  • • ld
  • • linker
  • • optimization
  • • relaxation
bugzilla_url
—
date
2026-08-16T00:00:00.000Z

[patch] AVR: Let -mrelax elide global RJMP .+0

Georg-Johann Lay proposes a patch to extend the AVR linker’s relaxation capabilities to elide zero-offset RJMP instructions that target global symbols. This optimization is intended for cases where a function tail-calls another function located immediately after it. The new feature can be disabled using the --no-elide-rjmp0 linker option.