objcopy: A potentially new option --ignore-symbol(s)

Ilya Kuklin ikuklin@accesssoftek.com
Thu Feb 22 17:51:01 GMT 2024


Hello,

There is an option in the making for llvm-objcopy called --ignore-symbol(s).
We would like to have some feedback about the name of the option
and its functionality.

The functionality of this option is to ignore the specified symbols when 
executing other options that can change the symbol's name, binding or 
visibility, so that their parameters remain unchanged.

For example, when executing an option --localize-hidden, specifying an 
existing hidden symbol with --ignore-symbol will keep its binding from 
being changed.

Purpose:
This option is needed mostly to support cases where there is a need to 
change parameters of a vast number of symbols with exception of a few 
specific symbols. Writing a negative pattern is much simpler than many 
positive patterns that avoid a certain case. Plus, since there is an option 
--keep-symbol that does exactly this but for removing symbols, there 
should also be one that keeps symbols' parameters from being changed.

If an option with the same functionality is going to be introduced at some 
point to binutils objcopy, please consider naming it the same way or
suggest an alternative.

Feel free to join the discussion:
https://github.com/llvm/llvm-project/pull/80873

--
Thanks,
Ilya Kuklin


More information about the Binutils mailing list