This is the mail archive of the binutils@sourceware.org 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: [09/11] TI C6X binutils port: binutils/


On Tue, 23 Mar 2010, DJ Delorie wrote:

> -    case ELFOSABI_STANDALONE:	return _("Standalone App");
> -    case ELFOSABI_ARM:		return "ARM";
>      default:
> +      if (osabi >= 64)
> +	switch (elf_header.e_machine)
> 
> Is this really what we want to be doing here?  It seems inconsistent to
> be handling these three ABIs in a machine-specific way, while the others
> are all machine-independent.  I think it's misleading to return
> "unknown" for known ABIs just because they're on the wrong chip,
> especially as readelf is often used for debugging object files.

The gABI says that 64-255 is "Architecture-specific value range".  It is 
not possible to interpret values in that range outside the context of a 
particular e_machine value.

For example, on ARM, 64 is ELFOSABI_ARM_AEABI (which binutils doesn't 
support, but that's another matter).  On C6X it is ELFOSABI_C6000_ELFABI.  
So the same value needs to be decoded differently depending on the 
machine, and I think the right approach is to handle all values in the 
range 64-255 only for the relevant machine.

-- 
Joseph S. Myers
joseph@codesourcery.com


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