Landing: a4481c8ff808

Project / Subsystem

binutils / ld

Date

2026-07-16

Author

liu zhensong <liuzhensong@sourceware.org>

Commit

a4481c8ff808e7237b99815d84b0d4c06ded6124

Source

public_inbox

Perf win

No

Breaking

No

All attributes

project
binutils
subsystem
ld
patch_id
commit_hash
a4481c8ff808e7237b99815d84b0d4c06ded6124
source_type
public_inbox
headline
LoongArch linker avoids unnecessary alignment sections with ld -r
tldr
Linker now only adds alignment sections for LoongArch when input files contain specific relocation types, fixing kernel module loading issues.
author
liu zhensong <liuzhensong@sourceware.org>
outcome
committed
performance_win
false
breaking_change
false
series_id
series_parts
[]
tags
  • loongarch
  • linker
  • kernel
  • relocation
discussion_id_link
public_inbox:binutils#33236
bugzilla_pr
date
2026-07-16T00:00:00.000Z

The LoongArch linker no longer unconditionally inserts alignment sections when using ld -r (relocation). It now checks if any input file contains R_LARCH_ALIGN or R_LARCH_RELAX relocations. This change restores correct behavior for kernel modules that expect not to contain these relocations.