diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2025-04-29 12:40:43 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-29 12:40:43 -0700 |
commit | c88b53777130a80ac08f39166c487ea7bb721441 (patch) | |
tree | 6b616c0bc48f13ecdf7ce2df14770f878b80b4ec /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | f784fa727543463b86511f7e5797174422cbeeaf (diff) | |
download | llvm-c88b53777130a80ac08f39166c487ea7bb721441.zip llvm-c88b53777130a80ac08f39166c487ea7bb721441.tar.gz llvm-c88b53777130a80ac08f39166c487ea7bb721441.tar.bz2 |
Target: Stop assigning RELRO sections to .ldata.rel.ro.
Linkers do not currently support PT_GNU_RELRO for SHF_X86_64_LARGE
sections; that would require the linker to emit more than one
PT_GNU_RELRO because large sections are discontiguous by design,
and most ELF dynamic loaders do not support that (bionic appears to
support it but glibc/musl/FreeBSD/NetBSD/OpenBSD appear not to). With
current linkers these sections will end up in .ldata which results
in silently disabling RELRO. Therefore, disable SHF_X86_64_LARGE for
RELRO sections. If this ever gets supported by downstream components
in the future we could add an opt-in flag for moving these sections
to .ldata.rel.ro which would trigger the creation of a second
PT_GNU_RELRO.
Reviewers: MaskRay, aeubanks
Reviewed By: aeubanks
Pull Request: https://github.com/llvm/llvm-project/pull/137742
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions