/* ELF support for BFD.
- Copyright (C) 1991, 92, 93, 95, 1997 Free Software Foundation, Inc.
+ Copyright 1991, 1992, 1993, 1995, 1997, 1998, 1999, 2001
+ Free Software Foundation, Inc.
Written by Fred Fish @ Cygnus Support, from information published
in "UNIX System V Release 4, Programmers Guide: ANSI C and
/* This file is part of ELF support for BFD, and contains the portions
that describe how ELF is represented externally by the BFD library.
I.E. it describes the in-file representation of ELF. It requires
- the elf-common.h file which contains the portions that are common to
+ the elf/common.h file which contains the portions that are common to
both the internal and external representations. */
-
+
/* The 64-bit stuff is kind of random. Perhaps someone will publish a
spec someday. */
unsigned char st_size[8]; /* Associated symbol size */
} Elf64_External_Sym;
+typedef struct {
+ unsigned char est_shndx[4]; /* Section index */
+} Elf_External_Sym_Shndx;
+
/* Note segments */
typedef struct {
} d_un;
} Elf64_External_Dyn;
+/* The version structures are currently size independent. They are
+ named without a 32 or 64. If that ever changes, these structures
+ will need to be renamed. */
+
/* This structure appears in a SHT_GNU_verdef section. */
typedef struct {
unsigned char vd_hash[4];
unsigned char vd_aux[4];
unsigned char vd_next[4];
-} Elf32_External_Verdef;
-
-typedef Elf32_External_Verdef Elf64_External_Verdef;
+} Elf_External_Verdef;
/* This structure appears in a SHT_GNU_verdef section. */
typedef struct {
unsigned char vda_name[4];
unsigned char vda_next[4];
-} Elf32_External_Verdaux;
+} Elf_External_Verdaux;
-typedef Elf32_External_Verdaux Elf64_External_Verdaux;
-
/* This structure appears in a SHT_GNU_verneed section. */
typedef struct {
unsigned char vn_file[4];
unsigned char vn_aux[4];
unsigned char vn_next[4];
-} Elf32_External_Verneed;
-
-typedef Elf32_External_Verneed Elf64_External_Verneed;
+} Elf_External_Verneed;
/* This structure appears in a SHT_GNU_verneed section. */
unsigned char vna_other[2];
unsigned char vna_name[4];
unsigned char vna_next[4];
-} Elf32_External_Vernaux;
-
-typedef Elf32_External_Vernaux Elf64_External_Vernaux;
+} Elf_External_Vernaux;
/* This structure appears in a SHT_GNU_versym section. This is not a
standard ELF structure; ELF just uses Elf32_Half. */
typedef struct {
unsigned char vs_vers[2];
-} Elf32_External_Versym;
+}
+#ifdef __GNUC__
+ __attribute__ ((packed))
+#endif
+ Elf_External_Versym;
+
+/* Structure for syminfo section. */
+typedef struct
+{
+ unsigned char si_boundto[2];
+ unsigned char si_flags[2];
+} Elf_External_Syminfo;
+
+
+/* This structure appears on the stack and in NT_AUXV core file notes. */
+typedef struct
+{
+ unsigned char a_type[4];
+ unsigned char a_val[4];
+} Elf32_External_Auxv;
+
+typedef struct
+{
+ unsigned char a_type[8];
+ unsigned char a_val[8];
+} Elf64_External_Auxv;
-typedef Elf32_External_Versym Elf64_External_Versym;
#endif /* _ELF_EXTERNAL_H */