aboutsummaryrefslogtreecommitdiff
path: root/lib/include
diff options
context:
space:
mode:
authorjohannst <johannes.stoelp@gmail.com>2021-04-21 23:41:59 +0200
committerjohannst <johannes.stoelp@gmail.com>2021-04-21 23:41:59 +0200
commit85230524414b6d27664bf77c8584bfeced6c71cb (patch)
treea407d634cbd379dbdf4451fee4abfd64aeaa5f67 /lib/include
parent1df4dfdcdbbaef7e5b32c5c0bfadec02b3ccd6f0 (diff)
downloaddynld-85230524414b6d27664bf77c8584bfeced6c71cb.tar.gz
dynld-85230524414b6d27664bf77c8584bfeced6c71cb.zip
add support to resolve all relocations in PLT & RELA tables; add global variable as example to libgreet.so
Diffstat (limited to 'lib/include')
-rw-r--r--lib/include/elf.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/include/elf.h b/lib/include/elf.h
index 4856c79..f0a0940 100644
--- a/lib/include/elf.h
+++ b/lib/include/elf.h
@@ -141,11 +141,12 @@ typedef struct {
// Symbol Types.
#define STT_NOTYPE 0 /* No type. */
+#define STT_OBJECT 1 /* Data Object. */
#define STT_FUNC 2 /* Function entry point. */
// Special Section Indicies.
-#define SHN_UNDEF 0 /* Undefined section. */
-#define SHN_ABS 0xff1 /* Indicates an absolute value. */
+#define SHN_UNDEF 0 /* Undefined section. */
+#define SHN_ABS 0xff1 /* Indicates an absolute value. */
/// -----------------
/// Relocations Entry
@@ -166,4 +167,6 @@ typedef struct {
#define ELF64_R_TYPE(i) ((i)&0xffffffffL)
// x86_64 relocation types.
+#define R_X86_64_COPY 5 /* Copy content from sym addr to relocation address */
+#define R_X86_64_GLOB_DAT 6 /* Address affected by relocation: `offset` (+ base) */
#define R_X86_64_JUMP_SLOT 7 /* Address affected by relocation: `offset` (+ base) */