You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that Clang will always put a struct initialiser in .data.rel.ro if the struct contains capabilities, even though they are zero-initialised. Reduced case from the Linux kernel: https://cheri-compiler-explorer.cl.cam.ac.uk/z/Pnn9fE. This seems to be target-independent, the same occurs with Morello Clang.
While this is simply unnecessary for standard dynamic binaries, for the Linux kernel this is a more serious issue as no RELRO section is expected (and the linker script asserts that there is none).
The text was updated successfully, but these errors were encountered:
CHERI/Morello Clang needlessly places data in the RELRO section in
the presence of capabilities. No such section is expected in linker
scripts, causing issues at link-time and/or runtime.
While waiting for Clang to become more conservative about its use of
RELRO data, work around the issue by placing .data.rel.ro together
with .rodata, which is appropriate for the kernel.
CHERI-LLVM issue: CTSRD-CHERI/llvm-project#673
Signed-off-by: Kevin Brodsky <[email protected]>
It seems that Clang will always put a struct initialiser in
.data.rel.ro
if the struct contains capabilities, even though they are zero-initialised. Reduced case from the Linux kernel: https://cheri-compiler-explorer.cl.cam.ac.uk/z/Pnn9fE. This seems to be target-independent, the same occurs with Morello Clang.While this is simply unnecessary for standard dynamic binaries, for the Linux kernel this is a more serious issue as no RELRO section is expected (and the linker script asserts that there is none).
The text was updated successfully, but these errors were encountered: