This is the mail archive of the 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: RFC: MIPS .reginfo section and objcopy --extract-symbols

On Tue, 12 Jan 2016, Matthew Fortune wrote:

> We have to support weird and wonderful ELF files in tools because we
> can't constrain what users may want to do when squeezing every last byte
> out of their system. This means that a MIPS ELF with all the processor
> specific sections removed is accepted as valid in the tools albeit
> missing some information that the MIPS ABI would normally mandate.
> Corrupt special sections are a different matter though and raising
> errors for such cases seems reasonable.

 FWIW Linux kernel binaries are built with a linker script that explicitly 
discards these sections from output so as not to confuse some less capable 
ELF loaders various system firmware have.  So yes, I think removing these 
sections is a valid action, which does not even make the resulting files 
invalid, only more legacy-like.  And in this particular case none of these
sections actually have a meaning, as they really only describe code and 
with symbol sections only remaining there's no code anymore anyway.

 As I communicated to Nick already, I had started looking into it a while 
ago as I noticed the regression and I'll be pushing a proper fix once I've 
found a minute to complete that effort.


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