This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: stripping symbols needed for relocations


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]