Landing: 8bf4b69718d4
Project / Subsystem
binutils / binutils/ld
Date
2026-07-06
Author
liu zhensong <liuzhensong@sourceware.org>
Commit
8bf4b69718d406abc99dd9cdc4c9cef79d7344cf
Source
public_inbox
Perf win
No
Breaking
No
All attributes
- project
- binutils
- subsystem
- binutils/ld
- patch_id
- —
- commit_hash
- 8bf4b69718d406abc99dd9cdc4c9cef79d7344cf
- source_type
- public_inbox
- headline
- LoongArch: Fix relaxation alignment with ld -r (PR 33236)
- tldr
- LoongArch linker now handles alignment correctly when performing relocations with `ld -r`.
- author
- liu zhensong <liuzhensong@sourceware.org>
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • binutils
- • ld
- • loongarch
- • linker
- • alignment
- discussion_id_link
- public_inbox:binutils#33236
- bugzilla_pr
- —
- date
- 2026-07-06T00:00:00.000Z
This commit fixes a relaxation alignment issue on LoongArch when using ld -r, addressing PR 33236. The linker previously failed to adjust section alignments for objects generated with ld -r, leading to potential misalignments if preceding sections were relaxed. The solution involves adding align sections and relocations before each section and setting section alignment to 4 to disable default start address calculation.