[all-commits] [llvm/llvm-project] f9b688: ELF: -r: Call assignAddresses only once
Fangrui Song via All-commits
all-commits at lists.llvm.org
Thu Aug 7 08:31:48 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: f9b68838f61972fadfbe70787befc3abeb2efcb5
https://github.com/llvm/llvm-project/commit/f9b68838f61972fadfbe70787befc3abeb2efcb5
Author: Fangrui Song <i at maskray.me>
Date: 2025-08-07 (Thu, 07 Aug 2025)
Changed paths:
M lld/ELF/Arch/LoongArch.cpp
M lld/ELF/Arch/RISCV.cpp
M lld/ELF/Writer.cpp
Log Message:
-----------
ELF: -r: Call assignAddresses only once
The fixed-point layout algorithm handles linker scripts, thunks, and
relaxOnce (to suppress out-of-range GOT-indirect-to-PC-relative
optimization). These passes are not needed for relocatable links because
they require address information that is not yet available.
Since we don't scan relocations for relocatable links, the
`createThunks` and `relaxOnce` functions are no-ops anyway, making these
passes redundant.
To prevent cluttering the line history, I place the `if (...) break;`
inside the for loop.
Pull Request: https://github.com/llvm/llvm-project/pull/152240
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list