X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=include%2Felf%2Fcommon.h;h=fc91da2d2f2245b9269e9e0c7629c155fcea185f;hb=abf1d184bdd1ddb2e6c4d9d95e3807cbe9fd5c26;hp=74fd7b22d4d811b8e9beb846f50a142c4aa2a81b;hpb=72ec28b8afa357cdde70c612b4e0e9f37a34f8e4;p=deliverable%2Fbinutils-gdb.git diff --git a/include/elf/common.h b/include/elf/common.h index 74fd7b22d4..fc91da2d2f 100644 --- a/include/elf/common.h +++ b/include/elf/common.h @@ -58,18 +58,27 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define EI_VERSION 6 /* File version */ #define EI_OSABI 7 /* Operating System/ABI indication */ -#define ELFOSABI_SYSV 0 /* UNIX System V ABI */ +#define ELFOSABI_NONE 0 /* UNIX System V ABI */ #define ELFOSABI_HPUX 1 /* HP-UX operating system */ +#define ELFOSABI_NETBSD 2 /* NetBSD */ #define ELFOSABI_LINUX 3 /* GNU/Linux */ +#define ELFOSABI_HURD 4 /* GNU/Hurd */ +#define ELFOSABI_SOLARIS 6 /* Solaris */ +#define ELFOSABI_AIX 7 /* AIX */ +#define ELFOSABI_IRIX 8 /* IRIX */ +#define ELFOSABI_FREEBSD 9 /* FreeBSD */ +#define ELFOSABI_TRU64 10 /* TRU64 UNIX */ +#define ELFOSABI_MODESTO 11 /* Novell Modesto */ +#define ELFOSABI_OPENBSD 12 /* OpenBSD */ #define ELFOSABI_STANDALONE 255 /* Standalone (embedded) application */ -#define ELFOSABI_ARM 97 /* ARM */ +#define ELFOSABI_ARM 97 /* ARM */ #define EI_ABIVERSION 8 /* ABI version */ #define EI_PAD 9 /* Start of padding bytes */ -/* Values for e_type, which identifies the object file type */ +/* Values for e_type, which identifies the object file type. */ #define ET_NONE 0 /* No file type */ #define ET_REL 1 /* Relocatable file */ @@ -81,7 +90,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define ET_LOPROC 0xFF00 /* Processor-specific */ #define ET_HIPROC 0xFFFF /* Processor-specific */ -/* Values for e_machine, which identifies the architecture */ +/* Values for e_machine, which identifies the architecture. These numbers + are officially assigned by registry@sco.com. See below for a list of + ad-hoc numbers used during initial development. */ #define EM_NONE 0 /* No machine */ #define EM_M32 1 /* AT&T WE 32100 */ @@ -89,7 +100,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define EM_386 3 /* Intel 80386 */ #define EM_68K 4 /* Motorola m68k family */ #define EM_88K 5 /* Motorola m88k family */ -#define EM_486 6 /* Intel 80486 */ +#define EM_486 6 /* Intel 80486 *//* Reserved for future use */ #define EM_860 7 /* Intel 80860 */ #define EM_MIPS 8 /* MIPS R3000 (officially, big-endian only) */ #define EM_S370 9 /* IBM System/370 */ @@ -131,6 +142,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define EM_ME16 59 /* Toyota ME16 processor */ #define EM_ST100 60 /* STMicroelectronics ST100 processor */ #define EM_TINYJ 61 /* Advanced Logic Corp. TinyJ embedded processor */ +#define EM_X86_64 62 /* Advanced Micro Devices X86-64 processor */ #define EM_FX66 66 /* Siemens FX66 microcontroller */ #define EM_ST9PLUS 67 /* STMicroelectronics ST9+ 8/16 bit microcontroller */ @@ -140,10 +152,15 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define EM_68HC08 71 /* Motorola MC68HC08 Microcontroller */ #define EM_68HC05 72 /* Motorola MC68HC05 Microcontroller */ #define EM_SVX 73 /* Silicon Graphics SVx */ -#define EM_ST19 74 /* STMicroelectronics ST19 8-bit microcontroller */ +#define EM_ST19 74 /* STMicroelectronics ST19 8-bit cpu */ #define EM_VAX 75 /* Digital VAX */ - -#define EM_PJ 99 /* picoJava */ +#define EM_CRIS 76 /* Axis Communications 32-bit embedded processor */ +#define EM_JAVELIN 77 /* Infineon Technologies 32-bit embedded cpu */ +#define EM_FIREPATH 78 /* Element 14 64-bit DSP processor */ +#define EM_ZSP 79 /* LSI Logic's 16-bit DSP processor */ +#define EM_MMIX 80 /* Donald Knuth's educational 64-bit processor */ +#define EM_HUANY 81 /* Harvard's machine-independent format */ +#define EM_PRISM 82 /* SiTera Prism */ /* If it is necessary to assign new unofficial EM_* values, please pick large random numbers (0x8523, 0xa7f2, etc.) to minimize the chances of collision @@ -151,7 +168,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ NOTE: Do not just increment the most recent number by one. Somebody else somewhere will do exactly the same thing, and you - will have a collision. Instead, pick a random number. */ + will have a collision. Instead, pick a random number. + + Normally, each entity or maintainer responsible for a machine with an + unofficial e_machine number should eventually ask registry@sco.com for + an officially blessed number to be added to the list above. */ + +#define EM_PJ 99 /* picoJava */ /* Cygnus PowerPC ELF backend. Written in the absence of an ABI. */ #define EM_CYGNUS_POWERPC 0x9025 @@ -189,14 +212,18 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* FR30 magic number - no EABI available. */ #define EM_CYGNUS_FR30 0x3330 +/* AVR magic number + Written in the absense of an ABI. */ +#define EM_AVR 0x1057 + /* See the above comment before you add a new EM_* value here. */ -/* Values for e_version */ +/* Values for e_version. */ #define EV_NONE 0 /* Invalid ELF version */ #define EV_CURRENT 1 /* Current version */ -/* Values for program header, p_type field */ +/* Values for program header, p_type field. */ #define PT_NULL 0 /* Program header table entry unused */ #define PT_LOAD 1 /* Loadable program segment */ @@ -210,7 +237,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define PT_LOPROC 0x70000000 /* Processor-specific */ #define PT_HIPROC 0x7FFFFFFF /* Processor-specific */ -/* Program segment permissions, in program header p_flags field */ +/* Program segment permissions, in program header p_flags field. */ #define PF_X (1 << 0) /* Segment is executable */ #define PF_W (1 << 1) /* Segment is writable */ @@ -219,7 +246,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define PF_MASKOS 0x0FF00000 /* New value, Oct 4, 1999 Draft */ #define PF_MASKPROC 0xF0000000 /* Processor-specific reserved bits */ -/* Values for section header, sh_type field */ +/* Values for section header, sh_type field. */ #define SHT_NULL 0 /* Section header table entry unused */ #define SHT_PROGBITS 1 /* Program specific (private) data */ @@ -234,12 +261,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define SHT_SHLIB 10 /* Reserved, unspecified semantics */ #define SHT_DYNSYM 11 /* Dynamic linking symbol table */ -#define SHT_INIT_ARRAY 14 /* Array of pointers to init functions */ -#define SHT_FINI_ARRAY 15 /* Array of pointers to finish functions */ -#define SHT_PREINIT_ARRAY 16 /* Array of pointers to pre-init functions */ +#define SHT_INIT_ARRAY 14 /* Array of ptrs to init functions */ +#define SHT_FINI_ARRAY 15 /* Array of ptrs to finish functions */ +#define SHT_PREINIT_ARRAY 16 /* Array of ptrs to pre-init funcs */ +#define SHT_GROUP 17 /* Section contains a section group */ +#define SHT_SYMTAB_SHNDX 18 /* Indicies for SHN_XINDEX entries */ -#define SHT_LOOS 0x60000000 /* Operating system specific semantics, lo */ -#define SHT_HIOS 0x6fffffff /* Operating system specific semantics, hi */ +#define SHT_LOOS 0x60000000 /* First of OS specific semantics */ +#define SHT_HIOS 0x6fffffff /* Last of OS specific semantics */ /* The next three section types are defined by Solaris, and are named SHT_SUNW*. We use them in GNU code, so we also define SHT_GNU* @@ -258,7 +287,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* #define SHT_HIUSER 0x8FFFFFFF *//* Application-specific semantics */ #define SHT_HIUSER 0xFFFFFFFF /* New value, defined in Oct 4, 1999 Draft */ -/* Values for section header, sh_flags field */ +/* Values for section header, sh_flags field. */ #define SHF_WRITE (1 << 0) /* Writable data during execution */ #define SHF_ALLOC (1 << 1) /* Occupies memory during execution */ @@ -267,13 +296,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define SHF_STRINGS (1 << 5) /* Contains null terminated character strings */ #define SHF_INFO_LINK (1 << 6) /* sh_info holds section header table index */ #define SHF_LINK_ORDER (1 << 7) /* Preserve section ordering when linking */ -#define SHF_OS_NONCONFORMING (1 << 8) /* OS specifci processing required */ +#define SHF_OS_NONCONFORMING (1 << 8) /* OS specific processing required */ +#define SHF_GROUP (1 << 9) /* Member of a section group */ /* #define SHF_MASKOS 0x0F000000 *//* OS-specific semantics */ #define SHF_MASKOS 0x0FF00000 /* New value, Oct 4, 1999 Draft */ #define SHF_MASKPROC 0xF0000000 /* Processor-specific semantics */ -/* Values of note segment descriptor types for core files. */ +/* Values of note segment descriptor types for core files. */ #define NT_PRSTATUS 1 /* Contains copy of prstatus struct */ #define NT_FPREGSET 2 /* Contains copy of fpregset struct */ @@ -282,7 +312,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define NT_PRXFPREG 0x46e62b7f /* Contains a user_xfpregs_struct; */ /* note name must be "LINUX". */ -/* Note segments for core files on dir-style procfs systems. */ +/* Note segments for core files on dir-style procfs systems. */ #define NT_PSTATUS 10 /* Has a struct pstatus */ #define NT_FPREGS 12 /* Has a struct fpregset */ @@ -298,7 +328,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* These three macros disassemble and assemble a symbol table st_info field, which contains the symbol binding and symbol type. The STB_ and STT_ - defines identify the binding and type. */ + defines identify the binding and type. */ #define ELF_ST_BIND(val) (((unsigned int)(val)) >> 4) #define ELF_ST_TYPE(val) ((val) & 0xF) @@ -313,19 +343,18 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define ELF64_ST_TYPE ELF_ST_TYPE #define ELF64_ST_INFO ELF_ST_INFO -/* These two macros disassemble and assemble a symbol's visibility into +/* This macro disassembles and assembles a symbol's visibility into the st_other field. The STV_ defines specificy the actual visibility. */ #define ELF_ST_VISIBILITY(v) ((v) & 0x3) -#define ELF_ST_OTHER(o) ((o) & ~0x3) +/* The remaining bits in the st_other field are not currently used. + They should be set to zero. */ #define ELF32_ST_VISIBILITY ELF_ST_VISIBILITY -#define ELF32_ST_OTHER ELF_ST_OTHER #define ELF64_ST_VISIBILITY ELF_ST_VISIBILITY -#define ELF64_ST_OTHER ELF_ST_OTHER -#define STN_UNDEF 0 /* undefined symbol index */ +#define STN_UNDEF 0 /* Undefined symbol index */ #define STB_LOCAL 0 /* Symbol not visible outside obj */ #define STB_GLOBAL 1 /* Symbol visible outside obj */ @@ -347,7 +376,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define STT_HIPROC 15 /* Application-specific semantics */ /* Special section indices, which may show up in st_shndx fields, among - other places. */ + other places. */ #define SHN_UNDEF 0 /* Undefined section reference */ #define SHN_LORESERVE 0xFF00 /* Begin range of reserved indices */ @@ -355,9 +384,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define SHN_HIPROC 0xFF1F /* End range of appl-specific */ #define SHN_LOOS 0xFF20 /* OS specific semantics, lo */ #define SHN_HIOS 0xFF3F /* OS specific semantics, hi */ -#define SHN_ABS 0xFFF1 /* Associated symbol is absolute */ -#define SHN_COMMON 0xFFF2 /* Associated symbol is in common */ -#define SHN_HIRESERVE 0xFFFF /* End range of reserved indices */ +#define SHN_ABS 0xFFF1 /* Associated symbol is absolute */ +#define SHN_COMMON 0xFFF2 /* Associated symbol is in common */ +#define SHN_XINDEX 0xFFFF /* Section index it held elsewhere */ +#define SHN_HIRESERVE 0xFFFF /* End range of reserved indices */ /* The following constants control how a symbol may be accessed once it has become part of an executable or shared library. */ @@ -366,9 +396,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define STV_INTERNAL 1 /* OS specific version of STV_HIDDEN */ #define STV_HIDDEN 2 /* Can only be seen inside currect component */ #define STV_PROTECTED 3 /* Treat as STB_LOCAL inside current component */ - -/* relocation info handling macros */ +/* Relocation info handling macros. */ #define ELF32_R_SYM(i) ((i) >> 8) #define ELF32_R_TYPE(i) ((i) & 0xff) @@ -378,7 +407,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define ELF64_R_TYPE(i) ((i) & 0xffffffff) #define ELF64_R_INFO(s,t) (((bfd_vma) (s) << 32) + (bfd_vma) (t)) -/* Dynamic section tags */ +/* Dynamic section tags. */ #define DT_NULL 0 #define DT_NEEDED 1 @@ -432,16 +461,22 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ OS specific values. This is a deliberate special case and we maintain it for backwards compatability. */ #define DT_VALRNGLO 0x6ffffd00 +#define DT_CHECKSUM 0x6ffffdf8 #define DT_PLTPADSZ 0x6ffffdf9 #define DT_MOVEENT 0x6ffffdfa #define DT_MOVESZ 0x6ffffdfb -#define DT_FEATURE_1 0x6ffffdfc +#define DT_FEATURE 0x6ffffdfc #define DT_POSFLAG_1 0x6ffffdfd #define DT_SYMINSZ 0x6ffffdfe #define DT_SYMINENT 0x6ffffdff #define DT_VALRNGHI 0x6ffffdff #define DT_ADDRRNGLO 0x6ffffe00 +#define DT_CONFIG 0x6ffffefa +#define DT_DEPAUDIT 0x6ffffefb +#define DT_AUDIT 0x6ffffefc +#define DT_PLTPAD 0x6ffffefd +#define DT_MOVETAB 0x6ffffefe #define DT_SYMINFO 0x6ffffeff #define DT_ADDRRNGHI 0x6ffffeff @@ -466,14 +501,22 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define DT_USED 0x7ffffffe #define DT_FILTER 0x7fffffff -/* Values used in DT_FEATURE_1 .dynamic entry. */ + +/* Values used in DT_FEATURE .dynamic entry. */ #define DTF_1_PARINIT 0x00000001 +/* From + + http://docs.sun.com:80/ab2/coll.45.13/LLM/@Ab2PageView/21165?Ab2Lang=C&Ab2Enc=iso-8859-1 + + DTF_1_CONFEXP is the same as DTF_1_PARINIT. It is a typo. The value + defined here is the same as the one in on Solaris 8. */ +#define DTF_1_CONFEXP 0x00000002 /* Flag values used in the DT_POSFLAG_1 .dynamic entry. */ #define DF_P1_LAZYLOAD 0x00000001 #define DF_P1_GROUPPERM 0x00000002 -/* Flag value in in the DT_1_FLAGS .dynamic entry. */ +/* Flag value in in the DT_FLAGS_1 .dynamic entry. */ #define DF_1_NOW 0x00000001 #define DF_1_GLOBAL 0x00000002 #define DF_1_GROUP 0x00000004 @@ -485,6 +528,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define DF_1_DIRECT 0x00000100 #define DF_1_TRANS 0x00000200 #define DF_1_INTERPOSE 0x00000400 +#define DF_1_NODEFLIB 0x00000800 +#define DF_1_NODUMP 0x00001000 +#define DF_1_CONLFAT 0x00002000 /* Flag values for the DT_FLAGS entry. */ #define DF_ORIGIN (1 << 0) @@ -534,19 +580,26 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define ELF_VER_CHR '@' /* Possible values for si_boundto. */ + #define SYMINFO_BT_SELF 0xffff /* Symbol bound to self */ #define SYMINFO_BT_PARENT 0xfffe /* Symbol bound to parent */ #define SYMINFO_BT_LOWRESERVE 0xff00 /* Beginning of reserved entries */ /* Possible bitmasks for si_flags. */ + #define SYMINFO_FLG_DIRECT 0x0001 /* Direct bound symbol */ #define SYMINFO_FLG_PASSTHRU 0x0002 /* Pass-thru symbol for translator */ #define SYMINFO_FLG_COPY 0x0004 /* Symbol is a copy-reloc */ -#define SYMINFO_FLG_LAZYLOAD 0x0008 /* Symbol bound to object to be lazy - loaded */ +#define SYMINFO_FLG_LAZYLOAD 0x0008 /* Symbol bound to object to be lazy loaded */ + /* Syminfo version values. */ + #define SYMINFO_NONE 0 #define SYMINFO_CURRENT 1 #define SYMINFO_NUM 2 +/* Section Group Flags. */ + +#define GRP_COMDAT 0x1 /* A COMDAT group */ + #endif /* _ELF_COMMON_H */