[llvm] [llvm-objcopy] Add llvm-objcopy option --ignore-symbol (PR #80873)

James Henderson via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 20 00:32:09 PST 2024


jh7370 wrote:

> > > This needs motivation. I think Binutils maintainers will likely have a strong opinion about the name if they add a similar option. I suspect that `--ignore-symbol` may not be a name they like. If this option is indeed useful, you may file a feature request https://sourceware.org/bugzilla/enter_bug.cgi
> > 
> > 
> > Before reviewing this further, I'd like the motivation explained as per this comment.
> 
> 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.

Thanks. This doesn't seem unreasonable to me. However, a) I don't like the name (people may think that `--ignore-symbol` can be used to prevent stripping of a symbol, for example, or similar), and b) you really should reach out to the binutils folk to get their opinions on the feature and its name.

@MaskRay, any comments on the motivation?

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


More information about the llvm-commits mailing list