Changeset View
Changeset View
Standalone View
Standalone View
head/libexec/rtld-elf/aarch64/rtld_machdep.h
Show First 20 Lines • Show All 66 Lines • ▼ Show 20 Lines | |||||
* compare the argument with 0 to see if it is set. | * compare the argument with 0 to see if it is set. | ||||
*/ | */ | ||||
#define call_ifunc_resolver(ptr) \ | #define call_ifunc_resolver(ptr) \ | ||||
(((Elf_Addr (*)(uint64_t, uint64_t, uint64_t, uint64_t, uint64_t, \ | (((Elf_Addr (*)(uint64_t, uint64_t, uint64_t, uint64_t, uint64_t, \ | ||||
uint64_t, uint64_t, uint64_t))ptr)(0, 0, 0, 0, 0, 0, 0, 0)) | uint64_t, uint64_t, uint64_t))ptr)(0, 0, 0, 0, 0, 0, 0, 0)) | ||||
#define round(size, align) \ | #define round(size, align) \ | ||||
(((size) + (align) - 1) & ~((align) - 1)) | (((size) + (align) - 1) & ~((align) - 1)) | ||||
#define calculate_first_tls_offset(size, align) \ | #define calculate_first_tls_offset(size, align, offset) \ | ||||
round(16, align) | round(16, align) | ||||
#define calculate_tls_offset(prev_offset, prev_size, size, align) \ | #define calculate_tls_offset(prev_offset, prev_size, size, align, offset) \ | ||||
round(prev_offset + prev_size, align) | round(prev_offset + prev_size, align) | ||||
#define calculate_tls_end(off, size) ((off) + (size)) | #define calculate_tls_end(off, size) ((off) + (size)) | ||||
#define calculate_tls_post_size(align) \ | #define calculate_tls_post_size(align) \ | ||||
round(TLS_TCB_SIZE, align) - TLS_TCB_SIZE | round(TLS_TCB_SIZE, align) - TLS_TCB_SIZE | ||||
#define TLS_TCB_SIZE 16 | #define TLS_TCB_SIZE 16 | ||||
typedef struct { | typedef struct { | ||||
unsigned long ti_module; | unsigned long ti_module; | ||||
Show All 11 Lines |