[lld] [lld-macho] Add flag --keep-icf-stabs to LLD for MachO (PR #93137)

via llvm-commits llvm-commits at lists.llvm.org
Thu May 23 08:44:34 PDT 2024


================
@@ -85,6 +85,9 @@ def icf_eq: Joined<["--"], "icf=">,
     HelpText<"Set level for identical code folding (default: none)">,
     MetaVarName<"[none,safe,all]">,
     Group<grp_lld>;
+def keep_icf_stabs: Joined<["--"], "keep-icf-stabs">,
----------------
alx32 wrote:

The flag name comes from the entries that are created - STAB entries. Not sure of the origin of the name. Some code here: https://github.com/llvm/llvm-project/blob/e3033a2c9494d217d279596fa5b69de8a63a5f87/lld/MachO/SyntheticSections.cpp#L1159 and some docs here: https://wiki.dwarfstd.org/Apple's_%22Lazy%22_DWARF_Scheme.md

It is not referring to the symbol table itself - the symbol table will (I think always) already contain the names of the symbols as they might need to be exported, etc.

https://github.com/llvm/llvm-project/pull/93137


More information about the llvm-commits mailing list