[PATCH] D92430: [lld-macho] Add isCodeSection()
Jez Ng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 1 14:41:56 PST 2020
int3 added inline comments.
================
Comment at: lld/MachO/InputSection.cpp:67
+ uint32_t attr = isec->flags & MachO::SECTION_ATTRIBUTES_USR;
+ if (attr == S_ATTR_PURE_INSTRUCTIONS)
+ return true;
----------------
clayborg wrote:
> BTW there is also a S_ATTR_SOME_INSTRUCTIONS attribute we might be able to use and improve.
hmm I don't think ld64 uses S_ATTR_SOME_INSTRUCTIONS to identify code sections. (Though it does ensure that every code section it emits has both S_ATTR_SOME_INSTRUCTIONS and S_ATTR_PURE_INSTRUCTIONS set.)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D92430/new/
https://reviews.llvm.org/D92430
More information about the llvm-commits
mailing list