[PATCH] D114275: [lld-macho] Include Objective-C functions in LC_FUNCTION_STARTS
Keith Smiley via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 19 16:45:14 PST 2021
keith added a comment.
In D114275#3143869 <https://reviews.llvm.org/D114275#3143869>, @int3 wrote:
> If I'm understanding correctly, it's not just that Obj-C symbols need to be in LC_FUNCTION_STARTS, but all local symbols in code sections as well. If that's the case, can the test not be objc-specific?
You're right, updated.
In D114275#3143872 <https://reviews.llvm.org/D114275#3143872>, @int3 wrote:
> Maybe we can reuse the code here: https://github.com/llvm/llvm-project/blob/main/lld/MachO/SyntheticSections.cpp#L952
The conditional in there is a bit different I guess, are you thinking we should extract the loops into another function and maybe have some callback for each symbol?
> (should also check if ld64 also skips emitting Lfoo symbols in LC_FUNCTION_STARTS... I would be surprised if it didn't)
I verified my new test passes with ld64 as well. The relevant logic appears to be here https://github.com/keith/ld64/blob/eddf3fd275669887e70392a1f7d8355222fa295e/src/ld/LinkEdit.hpp#L1978-L1994 although it's not super clear from this snippet that it includes local symbols, but it seems to.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D114275/new/
https://reviews.llvm.org/D114275
More information about the llvm-commits
mailing list