With this patch, lld creates a .note.GNU_stack and adds it to an
output file if it is creating a re-linkable object file (i.e. if -r
is given). If we don't do this, and if you use GNU linkers as a final
linker, they create an executable whose stack area is executable,
which is considered pretty bad these days.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
lld/ELF/SyntheticSections.h | ||
---|---|---|
142 ↗ | (On Diff #163008) | I think we want to pass SHF_EXECINSTR as the first SyntheticSection param if Config->ZExecstack is set? |
Comment Actions
It's intentionally omitted, as I think if you want an exectuable stack, you should explicitly pass -z execstack to the final linker.