mirror of
git://sourceware.org/git/glibc.git
synced 2024-11-21 01:12:26 +08:00
bb0ddc2f1e
Don't use weak_extern for dl_rtld_map. Instead check only if [SHARED]. (elf_machine_rela): Clean up. * sysdeps/powerpc/powerpc32/dl-machine.h (elf_machine_rela): Clean up. PowerPC TLS support contributed by Paul Mackerras <paulus@samba.org>. * sysdeps/powerpc/powerpc32/elf/configure.in: New file. * sysdeps/powerpc/powerpc32/elf/configure: New generated file. * elf/tls-macros.h [__powerpc__ && !__powerpc64__] (TLS_LE, TLS_IE, TLS_LD, TLS_GD): Define them. * sysdeps/powerpc/powerpc32/dl-machine.h (elf_machine_rela): Support new relocs for TLS. * sysdeps/powerpc/dl-tls.h (TLS_TP_OFFSET, TLS_DTV_OFFSET): Move these macros out of [SHARED]. (TLS_TPREL_VALUE, TLS_DTPREL_VALUE): New macros. * elf/elf.h: Define R_PPC_* relocs for TLS support. Clean up R_PPC64_* macro definition comments.
25 lines
520 B
Plaintext
25 lines
520 B
Plaintext
#include <sysdep.h>
|
|
#include <tls.h>
|
|
|
|
--
|
|
|
|
-- This could go into powerpc32/ instead and conditionalize #include of it.
|
|
#ifndef __powerpc64__
|
|
|
|
# ifdef USE_TLS
|
|
|
|
-- Abuse tls.h macros to derive offsets relative to the thread register.
|
|
# undef __thread_register
|
|
# define __thread_register ((void *) 0)
|
|
# define thread_offsetof(mem) ((void *) &THREAD_SELF->p_##mem - (void *) 0)
|
|
|
|
# else
|
|
|
|
# define thread_offsetof(mem) offsetof (tcbhead_t, mem)
|
|
|
|
# endif
|
|
|
|
MULTIPLE_THREADS_OFFSET thread_offsetof (multiple_threads)
|
|
|
|
#endif
|