[PATCH] D103971: [lld-macho] Rework mergeFlag to closer mimic what LD64 does.
Vy Nguyen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 17 08:41:23 PDT 2021
oontvoo marked 5 inline comments as done.
oontvoo added a comment.
In D103971#2824744 <https://reviews.llvm.org/D103971#2824744>, @int3 wrote:
> So after examining all the cases... I think that perhaps all this checking logic is not needed after all, and we should just do a bitwise-or merge for now?
I've updated the switch to simplify the logic - (still looks like we can't simply merge the type.... )
================
Comment at: lld/MachO/ConcatOutputSection.cpp:376
+ case S_NON_LAZY_SYMBOL_POINTERS:
+ if (config->outputType != MH_KEXT_BUNDLE &&
+ !(config->outputType == MH_EXECUTE && config->isPic))
----------------
int3 wrote:
> we're not likely to support kexts in the foreseeable future, so I don't think it's worth checking for here
Right, this is checking for that cases that are *not* kext :)
================
Comment at: lld/MachO/ConcatOutputSection.cpp:377
+ if (config->outputType != MH_KEXT_BUNDLE &&
+ !(config->outputType == MH_EXECUTE && config->isPic))
+ adjusted = S_NON_LAZY_SYMBOL_POINTERS;
----------------
int3 wrote:
> I don't think this is right, ld64's equivalent check is for static executables, and we only ever emit dynamic ones
fixed logic
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103971/new/
https://reviews.llvm.org/D103971
More information about the llvm-commits
mailing list