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]

Re: Patches to change ELFOSABI_MONTEREY to ELFOSABI_AIX.


Hi H.J.,

: #define ELFOSABI_STANDALONE 255 /* Standalone (embedded) application */
: #define ELFOSABI_ARM   97               /* ARM */
: 
: in include/elf/common.h. They will violate the new gABI.
: 
: BTW, the EI_OSABI byte is used to tell how to interpret those fields
: and values which are not defined by gABI nor psABI. It is not to tell
: on which platform the binary is targeted. I am not sure if ELFOSABI_ARM
: and ELFOSABI_STANDALONE are proper uses for this field. Should we fix
: them?

I am not sure about the ELFOSABI_STANDALONE value, but the arm-elf
toolchain definitely uses the ELFOSABI_ARM value.  (See
elf32_arm_final_link_relocate).  In fact the code just relies upon
there being a non-zero value in this field, so if we changed the
definition to:

  #define ELFOSABI_ARM 129

that should work shouldn't it ?

Given the current use of this field by the elf32-arm.h code though
(to distinguish between an old, buggy implementation of the ARM ELF
ABI and the current, working implementation), I thought that perhaps
it ought to be changed to a value in EI_ABIVERSION.  However the
latest documentation I have for this field says that it should only
have a non-zero value if there is a non-zero value in EI_OSABI, so
that wouldn't work.

Cheers
	Nick

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