[PATCH] D102661: [lld/mac] Propagate -(un)exported_symbol(s_list) to privateExtern in Driver

Nico Weber via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 18 04:46:17 PDT 2021


thakis added a comment.

Thanks! Landed with the tweak you suggested on D102662 <https://reviews.llvm.org/D102662>



================
Comment at: lld/MachO/Driver.cpp:1197
     createSyntheticSections();
     createSyntheticSymbols();
 
----------------
int3 wrote:
> I assume that we are handling `exportedSymbols` after this line so we can export/unexported synthetic symbols... do we want to have a test for this to check ld64 parity? (If you think that's too obscure to bother with that's fair too)
`__mh_execute_header` is the only visible synthetic symbol, so it's really just for that. ld64 does mark that symbol as internal with `-Wl,-exported_symbol,_main` so that's why I put this here, but adding a test for it felt a bit frivolous to me :D


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D102661



More information about the llvm-commits mailing list