diff options
| author | Marcel Moolenaar <marcel@FreeBSD.org> | 2006-09-02 00:59:35 +0000 |
|---|---|---|
| committer | Marcel Moolenaar <marcel@FreeBSD.org> | 2006-09-02 00:59:35 +0000 |
| commit | 8d2b66f7ea7b9664e088567116e1c31376d70605 (patch) | |
| tree | 9a35e8d6863d1e28b283c0345350b6cba2a4e884 /libexec | |
| parent | 4e753e146834b2da2c465574de11ed02813eafa4 (diff) | |
Notes
Diffstat (limited to 'libexec')
| -rw-r--r-- | libexec/rtld-elf/ia64/reloc.c | 5 | ||||
| -rw-r--r-- | libexec/rtld-elf/ia64/rtld_machdep.h | 4 | ||||
| -rw-r--r-- | libexec/rtld-elf/powerpc/reloc.c | 4 |
3 files changed, 8 insertions, 5 deletions
diff --git a/libexec/rtld-elf/ia64/reloc.c b/libexec/rtld-elf/ia64/reloc.c index 45f9ef54f590..9a8d0670f63e 100644 --- a/libexec/rtld-elf/ia64/reloc.c +++ b/libexec/rtld-elf/ia64/reloc.c @@ -594,7 +594,7 @@ init_pltgot(Obj_Entry *obj) void allocate_initial_tls(Obj_Entry *list) { - register Elf_Addr** tp __asm__("r13"); + void *tpval; /* * Fix the size of the static TLS block by using the maximum @@ -603,7 +603,8 @@ allocate_initial_tls(Obj_Entry *list) */ tls_static_space = tls_last_offset + tls_last_size + RTLD_STATIC_TLS_EXTRA; - tp = allocate_tls(list, 0, 16, 16); + tpval = allocate_tls(list, NULL, TLS_TCB_SIZE, 16); + __asm __volatile("mov r13 = %0" :: "r"(tpval)); } void *__tls_get_addr(unsigned long module, unsigned long offset) diff --git a/libexec/rtld-elf/ia64/rtld_machdep.h b/libexec/rtld-elf/ia64/rtld_machdep.h index 21c3a8fd7a49..5cb8bc27acbd 100644 --- a/libexec/rtld-elf/ia64/rtld_machdep.h +++ b/libexec/rtld-elf/ia64/rtld_machdep.h @@ -55,10 +55,12 @@ Elf_Addr reloc_jmpslot(Elf_Addr *, Elf_Addr, const struct Struct_Obj_Entry *, void *make_function_pointer(const Elf_Sym *, const struct Struct_Obj_Entry *); void call_initfini_pointer(const struct Struct_Obj_Entry *, Elf_Addr); +#define TLS_TCB_SIZE 16 + #define round(size, align) \ (((size) + (align) - 1) & ~((align) - 1)) #define calculate_first_tls_offset(size, align) \ - round(16, align) + round(TLS_TCB_SIZE, align) #define calculate_tls_offset(prev_offset, prev_size, size, align) \ round(prev_offset + prev_size, align) #define calculate_tls_end(off, size) ((off) + (size)) diff --git a/libexec/rtld-elf/powerpc/reloc.c b/libexec/rtld-elf/powerpc/reloc.c index b65e026a24af..90afe2eae80f 100644 --- a/libexec/rtld-elf/powerpc/reloc.c +++ b/libexec/rtld-elf/powerpc/reloc.c @@ -242,7 +242,7 @@ reloc_nonplt_object(Obj_Entry *obj_rtld, Obj_Entry *obj, const Elf_Rela *rela, *(Elf_Addr **)where = *where * sizeof(Elf_Addr) + (Elf_Addr *)(def->st_value + rela->r_addend - + defobj->tlsoffset - TLS_TP_OFFSET - TLS_TCB_SIZE); + + defobj->tlsoffset - TLS_TP_OFFSET); break; @@ -556,7 +556,7 @@ allocate_initial_tls(Obj_Entry *list) tls_static_space = tls_last_offset + tls_last_size + RTLD_STATIC_TLS_EXTRA; - _tp = (Elf_Addr **) ((char *) allocate_tls(list, 0, 8, 8) + _tp = (Elf_Addr **) ((char *) allocate_tls(list, NULL, TLS_TCB_SIZE, 8) + TLS_TP_OFFSET + TLS_TCB_SIZE); /* |
