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
- Build Status
Buildable 22041 Build 22041: arc lint + arc unit
Event Timeline
lld/ELF/SyntheticSections.h | ||
---|---|---|
142 | 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.
I think we want to pass SHF_EXECINSTR as the first SyntheticSection param if Config->ZExecstack is set?