Changeset View
Changeset View
Standalone View
Standalone View
head/libexec/rtld-elf/amd64/rtld_machdep.h
Show First 20 Lines • Show All 55 Lines • ▼ Show 20 Lines | |||||
extern uint32_t cpu_feature; | extern uint32_t cpu_feature; | ||||
extern uint32_t cpu_feature2; | extern uint32_t cpu_feature2; | ||||
extern uint32_t cpu_stdext_feature; | extern uint32_t cpu_stdext_feature; | ||||
extern uint32_t cpu_stdext_feature2; | extern uint32_t cpu_stdext_feature2; | ||||
#define call_ifunc_resolver(ptr) \ | #define call_ifunc_resolver(ptr) \ | ||||
(((Elf_Addr (*)(uint32_t, uint32_t, uint32_t, uint32_t))ptr)( \ | (((Elf_Addr (*)(uint32_t, uint32_t, uint32_t, uint32_t))ptr)( \ | ||||
cpu_feature, cpu_feature2, cpu_stdext_feature, cpu_stdext_feature2)) | cpu_feature, cpu_feature2, cpu_stdext_feature, cpu_stdext_feature2)) | ||||
#define round(size, align) \ | |||||
(((size) + (align) - 1) & ~((align) - 1)) | |||||
#define calculate_first_tls_offset(size, align) \ | |||||
round(size, align) | |||||
#define calculate_tls_offset(prev_offset, prev_size, size, align) \ | |||||
round((prev_offset) + (size), align) | |||||
#define calculate_tls_end(off, size) (off) | |||||
typedef struct { | typedef struct { | ||||
unsigned long ti_module; | unsigned long ti_module; | ||||
unsigned long ti_offset; | unsigned long ti_offset; | ||||
} tls_index; | } tls_index; | ||||
void *__tls_get_addr(tls_index *ti) __exported; | void *__tls_get_addr(tls_index *ti) __exported; | ||||
#define RTLD_DEFAULT_STACK_PF_EXEC PF_X | #define RTLD_DEFAULT_STACK_PF_EXEC PF_X | ||||
#define RTLD_DEFAULT_STACK_EXEC PROT_EXEC | #define RTLD_DEFAULT_STACK_EXEC PROT_EXEC | ||||
#define md_abi_variant_hook(x) | #define md_abi_variant_hook(x) | ||||
size_t calculate_first_tls_offset(size_t size, size_t align, size_t offset); | |||||
size_t calculate_tls_offset(size_t prev_offset, size_t prev_size, size_t size, | |||||
size_t align, size_t offset); | |||||
size_t calculate_tls_end(size_t off, size_t size); | |||||
#endif | #endif |