summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2001-09-08 22:59:30 +0000
committermarcel <marcel@FreeBSD.org>2001-09-08 22:59:30 +0000
commit22c38894cbd19ca224d48e51045206a9406b5c0f (patch)
tree2534cd7d5a505c33b1913dd85bb3a2ad5aee19ff /sys
parent4c1e7080405406e7885d4dacb3b08ac2b6942255 (diff)
downloadFreeBSD-src-22c38894cbd19ca224d48e51045206a9406b5c0f.zip
FreeBSD-src-22c38894cbd19ca224d48e51045206a9406b5c0f.tar.gz
Catch up with common usage:
o Define ELFMAG and SELFMAG as an alternative to test the ELF magic. ELFMAG is the magic; SELFMAG is the size of the magic. Use with strncmp() or memcmp(). o Define SHT_NUM as the number of predefined sections. Note: style(9) deviation for consistency.
Diffstat (limited to 'sys')
-rw-r--r--sys/sys/elf_common.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/sys/elf_common.h b/sys/sys/elf_common.h
index 6579b7d..bc7e8f5 100644
--- a/sys/sys/elf_common.h
+++ b/sys/sys/elf_common.h
@@ -68,6 +68,8 @@ typedef struct {
#define ELFMAG1 'E'
#define ELFMAG2 'L'
#define ELFMAG3 'F'
+#define ELFMAG "\177ELF" /* magic string */
+#define SELFMAG 4 /* magic string size */
/* Values for e_ident[EI_VERSION] and e_version. */
#define EV_NONE 0
@@ -160,6 +162,7 @@ typedef struct {
#define SHT_REL 9 /* relation section without addends */
#define SHT_SHLIB 10 /* reserved - purpose unknown */
#define SHT_DYNSYM 11 /* dynamic symbol table section */
+#define SHT_NUM 12 /* number of section types */
#define SHT_LOPROC 0x70000000 /* reserved range for processor */
#define SHT_HIPROC 0x7fffffff /* specific section header types */
#define SHT_LOUSER 0x80000000 /* reserved range for application */
OpenPOWER on IntegriCloud