This is an archive of the discontinued LLVM Phabricator instance.

[Driver][Android] Remove unneeded isNoExecStackDefault
ClosedPublic

Authored by MaskRay on Nov 13 2021, 11:29 PM.

Details

Summary

ld.lld used by Android ignores .note.GNU-stack and defaults to noexecstack,
so the -z noexecstack linker option is unneeded.

The --noexecstack assembler option is unneeded because AsmPrinter.cpp
prints .section .note.GNU-stack,"",@progbits (when llvm.init.trampoline is unused),
so the assembler won't synthesize an executable .note.GNU-stack.

Diff Detail

Event Timeline

MaskRay created this revision.Nov 13 2021, 11:29 PM
MaskRay requested review of this revision.Nov 13 2021, 11:29 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 13 2021, 11:29 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
pirama edited reviewers, added: srhines; removed: pirama.Nov 16 2021, 12:02 PM
pirama added a subscriber: pirama.

Will defer to Dan's review. I think these changes are safe for the Android platform (where we only use lld). The NDK only supports lld but that does not preclude external users from using other linkers.

danalbert accepted this revision.Nov 17 2021, 12:44 PM

Fine by me if this is the default for LLD.

This revision is now accepted and ready to land.Nov 17 2021, 12:44 PM
This revision was automatically updated to reflect the committed changes.