Landing: 86f36538c5bb

Project / Subsystem

binutils / risc-v

Date

2026-09-24

Author

Kito Cheng <kito@sourceware.org>

Commit

86f36538c5bba33aeec762b4907f37553c1a3173

Source

public_inbox

Perf win

No

Breaking

No

All attributes

project
binutils
subsystem
risc-v
patch_id
—
commit_hash
86f36538c5bba33aeec762b4907f37553c1a3173
source_type
public_inbox
headline
RISC-V linker: Structure relax passes for extensibility
tldr
RISC-V linker's relax passes are now described by a data structure, improving maintainability and enabling new pass types.
author
Kito Cheng <kito@sourceware.org>
outcome
committed
performance_win
false
breaking_change
false
series_id
—
series_parts
[]
tags
  • • risc-v
  • • linker
  • • optimization
  • • refactor
discussion_id_link
—
bugzilla_pr
—
date
2026-09-24T00:00:00.000Z

The RISC-V linker previously used a chain of conditional branches to select relax functions and hard-coded the number of passes. This refactoring introduces a riscv_relax_pass structure to describe each pass, including its reloc selector and optional hooks. This change lays the groundwork for adding new relax passes, such as vendor-specific ones or those for Zcmt table jumps, without requiring extensive code modifications.