diff options
author | Marcel Moolenaar <marcel@FreeBSD.org> | 2006-09-01 06:08:50 +0000 |
---|---|---|
committer | Marcel Moolenaar <marcel@FreeBSD.org> | 2006-09-01 06:08:50 +0000 |
commit | 9d34b1a911e8b7d58527a8256a09ff723167f64b (patch) | |
tree | 9be06bb7045da879e960a058e456619ef28efdff /libexec | |
parent | 653d825a9aa81101a9fc376395c41d6b89df617b (diff) | |
download | src-9d34b1a911e8b7d58527a8256a09ff723167f64b.tar.gz src-9d34b1a911e8b7d58527a8256a09ff723167f64b.zip |
o Fix the static TLS relocation. We were subtracting the size of
the TCB.
o Use NULL for null pointer argument.
o Replace magic 8 with TLS_TCB_SIZE.
Notes
Notes:
svn path=/head/; revision=161799
Diffstat (limited to 'libexec')
-rw-r--r-- | libexec/rtld-elf/powerpc/reloc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libexec/rtld-elf/powerpc/reloc.c b/libexec/rtld-elf/powerpc/reloc.c index 8841d7e6ae5d..94606ec4c9b7 100644 --- a/libexec/rtld-elf/powerpc/reloc.c +++ b/libexec/rtld-elf/powerpc/reloc.c @@ -244,7 +244,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; @@ -558,7 +558,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); /* |