[PATCH] D95913: [lld-macho] Implement -bundle_loader
Vy Nguyen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 5 14:22:08 PST 2021
oontvoo added inline comments.
================
Comment at: lld/MachO/SyntheticSections.cpp:792
n_desc |= dysym->isWeakRef() ? MachO::N_WEAK_REF : 0;
+ if (dysym->file->isBundleLoader)
+ MachO::SET_LIBRARY_ORDINAL(n_desc, MachO::EXECUTABLE_ORDINAL);
----------------
oontvoo wrote:
> jyknight wrote:
> > I'd expect to see the code that sets ->ordinal modified to set it to EXECUTABLE_ORDINAL, rather than the code that uses ->ordinal modified to override it.
> Lookin at the code, I think DylibFile::ordinal means a different thing than "ordinal" in EXECUTABLE_ORDINAL.
> So we can't set DylibFile::ordinal, which is a uint64, to EXECUTABLE_ORDINAL (which is 0xff).
>
>
> Also, the line right above, which sets the WEAK_REF flag also didn't set it earlier.
pls ignore the comment above(should've been discarded) .
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95913/new/
https://reviews.llvm.org/D95913
More information about the llvm-commits
mailing list