[llvm] [llvm-objcopy] Add llvm-objcopy option --set-visibility-sym (PR #80872)

Ilia Kuklin via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 8 09:32:40 PST 2024


================
@@ -290,6 +290,9 @@ static Error updateAndRemoveSymbols(const CommonConfig &Config,
     return Error::success();
 
   Obj.SymbolTable->updateSymbols([&](Symbol &Sym) {
+    if (ELFConfig.SymbolsToSetVisibility.matches(Sym.Name) &&
----------------
kuilpd wrote:

At first I thought that it would make sense to first set some symbols to hidden and then localize them with --localize-hidden, but I guess if someone already knows the symbol names they can just use --localize-symbols and then set their visibility to hidden if needs be.

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


More information about the llvm-commits mailing list