[patch] AVR: Prune vector table with --prune-vectab PR ld/34679
Project / Subsystem
binutils / avr
Date
2026-09-27
Proposer
Georg-Johann Lay <avr@gjlay.de>
Source type
public_inbox
Consensus
Proposed
Sentiment
—/10
Technical tradeoffs
- • Reduces code size by pruning unused vector table entries.
- • Simplifies relaxation process, potentially improving link times.
- • Adds a new option to the linker, increasing its complexity.
All attributes
- project
- binutils
- subsystem
- avr
- patch_id
- —
- discussion_id
- 0763b1cc-1a98-43dd-bb4b-72fed08ec5b3@gjlay.de
- source_type
- public_inbox
- title
- [patch] AVR: Prune vector table with --prune-vectab PR ld/34679
- headline
- AVR: Prune vector table with --prune-vectab
- tldr
- Adds a new ld option --prune-vectab for AVR targets to remove unused vector table entries and simplify relaxation.
- proposer
- Georg-Johann Lay <avr@gjlay.de>
- consensus
- Proposed
- outcome
- proposed
- sentiment_score
- —
- technical_tradeoffs
-
- • Reduces code size by pruning unused vector table entries.
- • Simplifies relaxation process, potentially improving link times.
- • Adds a new option to the linker, increasing its complexity.
- series_id
- —
- series_role
- cover
- series_parts
- []
- tags
-
- • linker
- • avr
- • optimization
- • embedded
- bugzilla_url
- —
- date
- 2026-09-27T00:00:00.000Z
[patch] AVR: Prune vector table with --prune-vectab PR ld/34679
This patch introduces the —prune-vectab option for the AVR target in GNU ld. This new option prunes the vector table by removing unused entries that point to __bad_interrupt, simplifying subsequent relaxation steps. It also allows the removal of trailing NOPs in RJMP+NOP sequences within the vector table. The changes have been tested and pass the avr-gcc testsuite.