stripping symbols needed for relocations
Nick Clifton
nickc@redhat.com
Wed Oct 13 15:57:00 GMT 2004
Hi Jan,
> Wouldn't it make sense to prevent doing such (except when --strip-all)
> in the first place (binutils/objcopy.c, filter_symbols) rather than
> generating an error message (bfd/elf.c,
> _bfd_elf_symbol_from_bfd_symbol)? Or are there specific uses of doing so
> that would not result in such an error?
I think that the only case where it would not matter is if the
relocation is in a section which is going to be discarded. So to answer
your first question, yes I think that filter_symbols() should try to
preserve reloc-used symbols unless --strip-all or --strip-symbol is in
effect. Note that the code does already try to do this by looking for
the BSF_KEEP flag.
Cheers
Nick
More information about the Binutils
mailing list