[patch] AVR: Sort .text.* input sections by their name.

Project / Subsystem

binutils / avr

Date

2026-07-20

Proposer

Georg-Johann Lay <avr@gjlay.de>

Source type

public_inbox

Consensus

Proposed

Sentiment

/10

Technical tradeoffs

  • Potential minor increase in link time due to sorting.

All attributes

project
binutils
subsystem
avr
patch_id
discussion_id
8f89fd03-7fa2-4c2d-a0fe-b4e99d5b2f12@gjlay.de
source_type
public_inbox
title
[patch] AVR: Sort .text.* input sections by their name.
headline
AVR: Sort .text.* input sections by their name.
tldr
Patch to sort AVR .text.* input sections by name to improve code locality.
proposer
Georg-Johann Lay <avr@gjlay.de>
consensus
Proposed
outcome
proposed
sentiment_score
technical_tradeoffs
  • Potential minor increase in link time due to sorting.
series_id
series_role
standalone
series_parts
[]
tags
  • avr
  • linker
  • optimization
  • code locality
bugzilla_url
date
2026-07-20T00:00:00.000Z

[patch] AVR: Sort .text.* input sections by their name.

This patch modifies the AVR linker script to sort .text.* input sections by their name. The goal is to increase code locality, specifically to prevent functions from libgcc and AVR-LibC that are related and residing in separate .text.* sections from being placed far apart in the final executable. This ordering aims to improve performance by keeping related code closer together.