Validate that ELF objects request a non-executable stack#1070
Conversation
|
llvm/llvm-project#186004 will cause object files assembled with LLVM 22 to fail this check. |
|
Yeah, I also missed the distinction between executables/libraries which have the PT_GNU_STACK program headers, and intermediate objects that have the section but no program headers (at all). I'll make this check conditional on final objects (ET_EXEC or ET_DYN, I think), and we can defer checking .o files to later. |
|
LGTM. Should we validate this on other architectures before meting? |
|
I was gonna pay attention to CI post-merge and then open a new PR to do |
|
Watching the post merge for failures is reasonable. |
|
riscv64 builds are failing verification. https://github.com/astral-sh/python-build-standalone/actions/runs/24349377629/job/71099408609 I'm taking a look |
|
Confirmed the missing GNU_STACK header in the riscv64 builds, mostly in Tcl/Tk related libraries, locally. This is not new, the header is missing in an older (20251010) release as well. Adding in an explicit flag to avoid this should be done, if too much work this test can be skipped on the architecture. I'll prepare both after lunch. |
Explicitly disable an executable stack on all Linux targets, even when cross-compiling. Follow up to test failures cased by astral-sh#1070
Explicitly disable an executable stack on all Linux targets, even when cross-compiling. Follow up to test failures cased by #1070 --------- Co-authored-by: Geoffrey Thomas <geofft@ldpreload.com>
Closes #1069.