Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Take a look at the equivalent ELF test case, to see what cases there are. I imagine the logic is going to be pretty similar.
I did model this after that, I was surprised at how minimal the implementation seemed to be https://github.com/llvm/llvm-project/blob/aab1810006a6788e32ee04e7d40d0b2474754aa2/llvm/tools/llvm-objcopy/ELF/ELFObjcopy.cpp#L282-L283
Sorry, I meant that comment as a suggestion for how to test it - the existing ELF tests should provide a reasonable framework for how to test this in Mach-O, I imagine.
The implementation is simple because the symbol table is rewritten from scratch by llvm-objcopy, so all that has to be updated is the internal symbol's name.
Ah got it thanks. Given this conversation https://groups.google.com/g/llvm-dev/c/A26kbQhZ9Po I'm going to drop this for now since this doesn't seem to do what I hoped. For others --redefine-syms may solve your use case instead.