[PATCH] D113735: [llvm-obcopy][MachO] Add --prefix-symbols support

Keith Smiley via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 15 15:15:42 PST 2021


keith abandoned this revision.
keith added a comment.

In D113735#3130625 <https://reviews.llvm.org/D113735#3130625>, @jhenderson wrote:

> In D113735#3128538 <https://reviews.llvm.org/D113735#3128538>, @keith wrote:
>
>> In D113735#3126545 <https://reviews.llvm.org/D113735#3126545>, @jhenderson wrote:
>>
>>> 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.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D113735/new/

https://reviews.llvm.org/D113735



More information about the llvm-commits mailing list