diff options
author | Fred Fish <fnf@specifix.com> | 1991-11-15 03:20:39 +0000 |
---|---|---|
committer | Fred Fish <fnf@specifix.com> | 1991-11-15 03:20:39 +0000 |
commit | f5496c7e980e2233b9f398ae8b78d04b5590c5be (patch) | |
tree | 9b0f9b1077c6ad1b015f53a438eef85fd08e2ff1 /include | |
parent | 7d68537f73a0b5e06c8989331d55179a8e73b33d (diff) | |
download | gdb-f5496c7e980e2233b9f398ae8b78d04b5590c5be.zip gdb-f5496c7e980e2233b9f398ae8b78d04b5590c5be.tar.gz gdb-f5496c7e980e2233b9f398ae8b78d04b5590c5be.tar.bz2 |
Add defines to support ELF symbol tables.
Diffstat (limited to 'include')
-rw-r--r-- | include/ChangeLog | 10 | ||||
-rwxr-xr-x | include/elf-common.h | 33 |
2 files changed, 43 insertions, 0 deletions
diff --git a/include/ChangeLog b/include/ChangeLog index ec36bc8..0ef7197 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,13 @@ +Thu Nov 14 19:17:03 1991 Fred Fish (fnf at cygnus.com) + + * elf-common.h: Add defines to support ELF symbol table code. + +Mon Nov 11 19:01:06 1991 Fred Fish (fnf at cygnus.com) + + * elf-internal.h, elf-external.h, elf-common.h: Add support for + note sections, which are used in ELF core files to hold copies + of various /proc structures. + Thu Nov 7 08:58:26 1991 Steve Chamberlain (sac at cygnus.com) * internalcoff.h: took out the M88 dependency in the lineno diff --git a/include/elf-common.h b/include/elf-common.h index a2cb398..cd15b9b 100755 --- a/include/elf-common.h +++ b/include/elf-common.h @@ -132,3 +132,36 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #define NT_PRSTATUS 1 /* Contains copy of prstatus struct */ #define NT_FPREGSET 2 /* Contains copy of fpregset struct */ #define NT_PRPSINFO 3 /* Contains copy of prpsinfo struct */ + +/* 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. */ + +#define ELF_ST_BIND(val) (((unsigned int)(val)) >> 4) +#define ELF_ST_TYPE(val) ((val) & 0xF) +#define ELF_ST_INFO(bind,type) (((bind) << 4) & ((type) & 0xF)) + +#define STB_LOCAL 0 /* Symbol not visible outside obj */ +#define STB_GLOBAL 1 /* Symbol visible outside obj */ +#define STB_WEAK 2 /* Like globals, lower precedence */ +#define STB_LOPROC 13 /* Application-specific semantics */ +#define STB_HIPROC 15 /* Application-specific semantics */ + +#define STT_NOTYPE 0 /* Symbol type is unspecified */ +#define STT_OBJECT 1 /* Symbol is a data object */ +#define STT_FUNC 2 /* Symbol is a code object */ +#define STT_SECTION 3 /* Symbol associated with a section */ +#define STT_FILE 4 /* Symbol gives a file name */ +#define STT_LOPROC 13 /* Application-specific semantics */ +#define STT_HIPROC 15 /* Application-specific semantics */ + +/* Special section indices, which may show up in st_shndx fields, among + other places. */ + +#define SHN_UNDEF 0 /* Undefined section reference */ +#define SHN_LORESERV 0xFF00 /* Begin range of reserved indices */ +#define SHN_LOPROC 0xFF00 /* Begin range of appl-specific */ +#define SHN_HIPROC 0xFF1F /* End range of appl-specific */ +#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 */ |