[PATCH] D84803: [ThinLTO][MachO] Preserve both possible GUIDs from exported list

Steven Wu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 30 08:49:50 PDT 2020


steven_wu added a comment.

In D84803#2184976 <https://reviews.llvm.org/D84803#2184976>, @tejohnson wrote:

> Not very familiar with MachO. Can you clarify the issue - is it the case that some modules will use the mangled names and some won't? Otherwise it seems like it could use either all mangled or all unmangled.

The issue is that for macho, for a symbol in the object file (symbol table seen by the linker), let's say "_symbol". It can be either. "symbol" or "\01_symbol" in the bitcode file. When user/linker says it want to preserve "_symbol", you don't know what the GUID for that symbol is because it can be both.

Now I think about the patch, it is also not correct that it will preserve "__symbol". Is there any reason why GUID is calculated based on `getGlobalIdentifier()`? `getGlobalIdentifier()` drops the `\01` prefix so "\01_symbol" is the same GUID is "_symbol".


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D84803



More information about the llvm-commits mailing list