llvm-project
c88b5377 - Target: Stop assigning RELRO sections to .ldata.rel.ro.

Commit
234 days ago
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
Author
pcc pcc
Parents
Loading