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

James Henderson via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 16 01:14:01 PST 2024


================
@@ -978,35 +978,30 @@ objcopy::parseObjcopyOptions(ArrayRef<const char *> RawArgsArr,
     Config.SymbolsToAdd.push_back(*SymInfo);
   }
   for (auto *Arg : InputArgs.filtered(OBJCOPY_set_symbol_visibility)) {
----------------
jh7370 wrote:

Now that you're no longer preventing multiple specofocations, I think it would be good to have a test that shows the "last one wins" behaviour of the option, i.e. if a symbol is specified multiple times with different visbilities, you should check that the final visibility is as expected. It would be good for this test to cover both options (including multiple files or specifying the name multiple times in the same file).

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


More information about the llvm-commits mailing list