haiku/headers/private/system/arch/x86_64/arch_elf.h
X512 ebeab0cf70 rumtime_loader: fix TLS for riscv64
Change-Id: I55593dea936af31135b8e9159f8b6a64270369c0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5157
Reviewed-by: X512 <danger_mail@list.ru>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-03-27 16:15:41 +00:00

64 lines
3.2 KiB
C

/*
* Copyright 2012, Alex Smith, alex@alex-smith.me.uk.
* Distributed under the terms of the MIT License.
*/
#ifndef _KERNEL_ARCH_x86_64_ELF_H
#define _KERNEL_ARCH_x86_64_ELF_H
/* Relocation types. */
#define R_X86_64_NONE 0 /* No relocation. */
#define R_X86_64_64 1 /* Direct 64-bit. */
#define R_X86_64_PC32 2 /* PC relative 32-bit signed. */
#define R_X86_64_GOT32 3 /* 32-bit GOT entry. */
#define R_X86_64_PLT32 4 /* 32-bit PLT address. */
#define R_X86_64_COPY 5 /* Copy symbol at runtime. */
#define R_X86_64_GLOB_DAT 6 /* Create GOT entry. */
#define R_X86_64_JUMP_SLOT 7 /* Create PLT entry. */
#define R_X86_64_RELATIVE 8 /* Adjust by program base. */
#define R_X86_64_GOTPCREL 9 /* 32-bit signed PC relative offset to GOT. */
#define R_X86_64_32 10 /* Direct 32-bit zero-extended. */
#define R_X86_64_32S 11 /* Direct 32-bit sign-extended. */
#define R_X86_64_16 12 /* Direct 16-bit zero-extended. */
#define R_X86_64_PC16 13 /* 16-bit sign-extended PC relative. */
#define R_X86_64_8 14 /* Direct 8-bit sign-extended. */
#define R_X86_64_PC8 15 /* 8-bit sign-extended PC relative. */
#define R_X86_64_DTPMOD64 16 /* ID of module containing symbol. */
#define R_X86_64_DTPOFF64 17 /* Offset in module's TLS block. */
#define R_X86_64_TPOFF64 18 /* Offset in initial TLS block. */
#define R_X86_64_TLSGD 19 /* 32-bit signed PC relative offset to two GOT entries (GD). */
#define R_X86_64_TLSLD 20 /* 32-bit signed PC relative offset to two GOT entries (LD). */
#define R_X86_64_DTPOFF32 21 /* Offset in TLS block. */
#define R_X86_64_GOTTPOFF 22 /* 32-bit signed PC relative offset to GOT entry (IE). */
#define R_X86_64_TPOFF32 23 /* Offset in initial TLS block. */
#define R_X86_64_PC64 24 /* PC relative 64-bit. */
#define R_X86_64_GOTOFF64 25 /* 64-bit offset to GOT. */
#define R_X86_64_GOTPC32 26 /* 32 bit signed PC relative offset to GOT. */
#define R_X86_64_GOT64 27 /* 64-bit GOT entry offset. */
#define R_X86_64_GOTPCREL64 28 /* 64-bit PC relative offset to GOT entry. */
#define R_X86_64_GOTPC64 29 /* 64-bit PC relative offset to GOT. */
#define R_X86_64_GOTPLT64 30 /* Like GOT64, says PLT entry needed. */
#define R_X86_64_PLTOFF64 31 /* 64-bit GOT relative offset to PLT entry. */
#define R_X86_64_SIZE32 32 /* Size of symbol plus 32-bit addend. */
#define R_X86_64_SIZE64 33 /* Size of symbol plus 64-bit addend. */
#define R_X86_64_GOTPC32_TLSDESC 34 /* GOT offset for TLS descriptor. */
#define R_X86_64_TLSDESC_CALL 35 /* Marker for call through TLS descriptor. */
#define R_X86_64_TLSDESC 36 /* TLS descriptor. */
#define R_X86_64_IRELATIVE 37 /* Adjust indirectly by program base. */
#define R_X86_64_RELATIVE64 38 /* 64-bit adjust by program base */
/* 39 and 40 were BND-related, already decomissioned */
#define R_X86_64_GOTPCRELX 40 /* Load from 32 bit signed pc relative offset to GOT entry
without REX prefix, relaxable. */
#define R_X86_64_REX_GOTPCRELX 41 /* Load from 32 bit signed pc relative offset to GOT entry
with REX prefix, relaxable. */
#define TLS_DTV_OFFSET 0
#if defined(_BOOT_MODE) || defined(ELF32_COMPAT)
# include "../x86/arch_elf.h"
#endif
#endif /* _KERNEL_ARCH_x86_64_ELF_H */