2000-07-19 H.J. Lu <hjl@gnu.org>
[deliverable/binutils-gdb.git] / include / elf / common.h
index 4176bab1d48ab48520dbb8ebad7d673553efea85..c41b7e6252007fe74bef2d1bd920993a805040a4 100644 (file)
@@ -1,5 +1,6 @@
 /* ELF support for BFD.
-   Copyright (C) 1991,92,93,94,95,96,97,98,1999 Free Software Foundation, Inc.
+   Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000
+   Free Software Foundation, Inc.
 
    Written by Fred Fish @ Cygnus Support, from information published
    in "UNIX System V Release 4, Programmers Guide: ANSI C and
@@ -57,8 +58,18 @@ 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_MONTEREY 7     /* Monterey */
+#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 */
 
@@ -90,7 +101,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #define EM_486         6       /* Intel 80486 */
 #define EM_860         7       /* Intel 80860 */
 #define EM_MIPS                8       /* MIPS R3000 (officially, big-endian only) */
-#define EM_S370                9       /* Amdahl */
+#define EM_S370                9       /* IBM System/370 */
 #define EM_MIPS_RS4_BE 10      /* MIPS R4000 big-endian */ /* Depreciated */
 #define EM_MIPS_RS3_LE 10      /* MIPS R3000 little-endian (Oct 4 1999 Draft)*/ /* Depreciated */
 
@@ -105,7 +116,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #define EM_V800        36      /* NEC V800 series */
 #define EM_FR20               37       /* Fujitsu FR20 */
 #define EM_RH32               38       /* TRW RH32 */
-#define EM_MCORE       39       /* Motorolla MCore */ /* May also be taken by Fujitsu MMA */
+#define EM_MCORE       39       /* Motorola M*Core */ /* May also be taken by Fujitsu MMA */
 #define EM_RCE         39       /* Old name for MCore */
 #define EM_ARM        40       /* ARM */
 #define EM_OLD_ALPHA   41      /* Digital Alpha */
@@ -117,7 +128,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #define EM_H8_300H     47       /* Hitachi H8/300H */
 #define EM_H8S         48       /* Hitachi H8S */
 #define EM_H8_500      49       /* Hitachi H8/500 */
-#define EM_IA_64       50       /* Intel MercedTM Processor */
+#define EM_IA_64       50       /* Intel IA-64 Processor */
 #define EM_MIPS_X      51       /* Stanford MIPS-X */
 #define EM_COLDFIRE    52       /* Motorola Coldfire */
 #define EM_68HC12      53       /* Motorola M68HC12 */
@@ -187,6 +198,10 @@ 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 */
@@ -287,6 +302,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #define NT_PSINFO      13              /* Has a struct psinfo */
 #define NT_LWPSTATUS   16              /* Has a struct lwpstatus_t */
 #define NT_LWPSINFO    17              /* Has a struct lwpsinfo_t */
+#define NT_WIN32PSTATUS        18              /* Has a struct win32_pstatus */
 
 /* Values of note segment descriptor types for object files.  */
 /* (Only for hppa right now.  Should this be moved elsewhere?)  */
@@ -310,16 +326,15 @@ 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 */
@@ -408,28 +423,42 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #define DT_FINI_ARRAYSZ 28
 #define DT_RUNPATH      29
 #define DT_FLAGS        30
-#define DT_ENCODING     31 /* Note: Oct 4, 1999 Draft specifies this as 32, but this conflicts with DT_PREINIT_ARRAY */
-#define DT_PREINIT_ARRAY 32
+
+#define DT_ENCODING     32
+#define DT_PREINIT_ARRAY   32
 #define DT_PREINIT_ARRAYSZ 33
 
-#define DT_LOOS         0x60000000 /* Note: Oct 4, 1999 draft has this as 0x6fff000d */
-#define DT_HIOS         0x6fffffff /* Note: Oct 4, 1999 draft has this as 0x6fff0000 */
+/* Note, the Oct 4, 1999 draft of the ELF ABI changed the values
+   for DT_LOOS and DT_HIOS.  Some implementations however, use
+   values outside of the new range (see below).  */
+#define OLD_DT_LOOS    0x60000000
+#define DT_LOOS         0x6000000d
+#define DT_HIOS         0x6fff0000
+#define OLD_DT_HIOS     0x6fffffff
+
 #define DT_LOPROC       0x70000000
 #define DT_HIPROC       0x7fffffff
 
 /* The next four dynamic tags are used on Solaris.  We support them
-   everywhere.  */
+   everywhere.  Note these values lie outside of the (new) range for
+   OS specific values.  This is a deliberate special case and we
+   maintain it for backwards compatability.  */
 #define DT_VALRNGLO    0x6ffffd00
 #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
 
@@ -454,14 +483,30 @@ 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.  */
+/* FIXME: From
+
+   http://docs.sun.com:80/ab2/coll.45.13/LLM/@Ab2PageView/21165?Ab2Lang=C&Ab2Enc=iso-8859-1
+
+   DT_CHECKSUM is mentioned. But it is not in the table. Someone should
+   check <sys/link.h> on Solaris 8. */
+#define DT_CHECKSUM    0
+
+
+/* Values used in DT_FEATURE .dynamic entry.  */
 #define DTF_1_PARINIT  0x00000001
+/* FIXME: 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. I think it is a typo.
+   Someone should check <sys/link.h> 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
@@ -473,6 +518,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_NODEPLIB  0x00000800
+#define DF_1_NODUMP    0x00001000
+#define DF_1_CONLFAT   0x00002000
 
 /* Flag values for the DT_FLAGS entry.  */
 #define DF_ORIGIN      (1 << 0)
This page took 0.025594 seconds and 4 git commands to generate.