[all-commits] [llvm/llvm-project] 7a7e8b: [ELF] Retain relocation sections for GOT entries a...
Fangrui Song via All-commits
all-commits at lists.llvm.org
Wed Sep 23 10:45:48 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 7a7e8bb81b978ef90f6da580bdecd34d053e580f
https://github.com/llvm/llvm-project/commit/7a7e8bb81b978ef90f6da580bdecd34d053e580f
Author: Fangrui Song <i at maskray.me>
Date: 2026-09-23 (Wed, 23 Sep 2026)
Changed paths:
M lld/ELF/Relocations.cpp
M lld/ELF/SyntheticSections.cpp
M lld/ELF/SyntheticSections.h
M lld/ELF/Writer.cpp
M lld/test/ELF/ppc64-long-branch-rel14.s
M lld/test/ELF/systemz-gotent-relax-align.s
M lld/test/ELF/x86-64-gotpc-relax-too-far-relr.s
Log Message:
-----------
[ELF] Retain relocation sections for GOT entries added by relaxOnce (#225594)
x86-64 and SystemZ relax GOTPCRELX/GOTENT and, in relaxOnce, revert
relaxations that turn out to be out of range or misaligned. The reverted
relocation needs a GOT entry, which in -pie/-shared needs a relative
relocation. If .rela.dyn (or .relr.dyn) was empty, it has already been
removed by removeUnusedSyntheticSections, triggering an assertion
failure.
Retain the section that will receive the relative relocations when
relaxOnce may add GOT entries, and recompute .dynamic in each iteration.
This also fixes a truncated .dynamic when PPC64 PI long-branch thunks
add the first relative relocations to .rela.dyn.
LLM-aided. Fixes #224011
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