This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: RFA: Recording MIPS ABI selection in binaries
- To: cgd at sibyte dot com
- Subject: Re: RFA: Recording MIPS ABI selection in binaries
- From: David B Anderson <davea at quasar dot engr dot sgi dot com>
- Date: Wed, 9 Aug 2000 11:50:58 -0700 (PDT)
- Cc: gdb-patches at sources dot redhat dot com, gcc-patches at gcc dot gnu dot org, nickc at redhat dot com
Relating to e_flags and MIPS/SGI on gdb-patches:
It's not clear to me *which* bits folks think are unused, but
The following is the latest e_flags info from SGI headers
in the compiler tree (MIPSpro7.3.1.2m, unreleased at this time).
Some flags here appear not to be mentioned in elf/mips.h in gdb,
so I though you all might want to know this!
I don't recall we actually generate ASE (see below)
stuff in the SGI compilers (I didn't check with the
code generator folks, though I could if that seems
appropriate).
/* ====================================================================
*
* Elf header
*
* ====================================================================
*/
/*
* e_flags
*/
#define EF_MIPS_NOREORDER 0x00000001
#define EF_MIPS_OPSEX EF_MIPS_NOREORDER
#define EF_MIPS_PIC 0x00000002
#define EF_MIPS_CPIC 0x00000004
#define EF_MIPS_XGOT 0x00000008
#define EF_MIPS_OPTIONS_FIRST 0x00000080
/* obsolete names */
#define EF_MIPS_UGEN_ALLOC EF_MIPS_XGOT
#define EF_MIPS_UGEN_RESERVED EF_MIPS_64BIT_WHIRL
#define EF_MIPS_ABI64 EF_IRIX_ABI64
/* see explanation in /usr/include/sys/elf.h */
#define EF_MIPS_64BIT_WHIRL EF_MIPS_ABI64
/* This is here for compatibility with pre-v7.4 compiler objects. */
#define EF_MIPS_ABI2 0x00000020
/* indicates n32 as opposed to o32 */
/*
* The EF_MIPS_ARCH field of e_flags describes the ISA of the object.
* size: 4 bits
* type: int
*/
#define EF_MIPS_ARCH 0xf0000000 /* mask: 4 bit field */
#define EF_MIPS_ARCH_1 0x00000000
#define EF_MIPS_ARCH_2 0x10000000
#define EF_MIPS_ARCH_3 0x20000000
#define EF_MIPS_ARCH_4 0x30000000
#define EF_MIPS_ARCH_5 0x40000000
#define EF_MIPS_ARCH_6 0x50000000
/*
* The EF_MIPS_ARCH_ASE field of e_flags describes the set of
* Application Specific Extensions used by the object.
* size: 4 bits
* type: bit-field
*/
#define EF_MIPS_ARCH_ASE 0x0f000000 /* mask: 4 bit field */
#define EF_MIPS_ARCH_ASE_MDMX 0x08000000 /* multi-media extensions*/
#define EF_MIPS_ARCH_ASE_M16 0x04000000 /* MIPS16 isa extensions */
/*
* Please reserve these 8 bits of e_flags for future
* expansion of the EF_MIPS_ARCH_ASE field; increasing
* the field from 4 bits to 12 bits.
*
* 0x00ff0000
*
* If and when we expand it, we'll redefine the EF_MIPS_ARCH_ASE
* macro to be:
*
* 0x0fff0000.
*/
And sys/elf.h defines, for e_flags:
elf.h:#define EF_IRIX_ABI64 0x00000010
If there are questions on SGI usage (of anything)
that I might be able to help with don't hesitate to ask.
Regards,
David B. Anderson davea@sgi.com danderson@acm.org http://reality.sgi.com/davea/