aboutsummaryrefslogtreecommitdiff
path: root/pk/elf.h
diff options
context:
space:
mode:
authorAndrew Waterman <waterman@cs.berkeley.edu>2014-12-11 06:02:14 -0800
committerAndrew Waterman <waterman@cs.berkeley.edu>2014-12-11 06:02:14 -0800
commit19c8f691480ccc5ea8654dceff9c47888d5ea407 (patch)
treefaa98968f76ded3e157ace8cb98a97489209d5ff /pk/elf.h
parent015195b66ead210334c66ca6cb81b67c29aa50a6 (diff)
downloadriscv-pk-19c8f691480ccc5ea8654dceff9c47888d5ea407.zip
riscv-pk-19c8f691480ccc5ea8654dceff9c47888d5ea407.tar.gz
riscv-pk-19c8f691480ccc5ea8654dceff9c47888d5ea407.tar.bz2
Relocate binaries that conflict with the pk's address space
Of course, this is only possible for PIEs, e.g. the dynamic linker.
Diffstat (limited to 'pk/elf.h')
-rw-r--r--pk/elf.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/pk/elf.h b/pk/elf.h
index dfe6c63..a05ccf2 100644
--- a/pk/elf.h
+++ b/pk/elf.h
@@ -12,8 +12,10 @@
#define IS_ELF32(hdr) (IS_ELF(hdr) && (hdr).e_ident[4] == 1)
#define IS_ELF64(hdr) (IS_ELF(hdr) && (hdr).e_ident[4] == 2)
-#define SHT_PROGBITS 1
-#define SHT_NOBITS 8
+#define ET_EXEC 2
+#define ET_DYN 3
+
+#define PT_LOAD 1
#define AT_NULL 0
#define AT_PHDR 3