aad599979d
_rtld_tls_allocate and _rtld_tls_free. libpthread uses this functions to setup the thread private area of all new threads. ld.elf_so is responsible for setting up the private area for the initial thread. Similar functions are called from _libc_init for static binaries, using dl_iterate_phdr to access the ELF Program Header. Add test cases to exercise the different TLS storage models. Test cases are compiled and installed on all platforms, but are skipped on platforms not marked for TLS support. This material is based upon work partially supported by The NetBSD Foundation under a contract with Joerg Sonnenberger. It is inspired by the TLS support in FreeBSD by Doug Rabson and the clean ups of the DragonFly port of the original FreeBSD modifications.
50 lines
1.0 KiB
Makefile
50 lines
1.0 KiB
Makefile
# $NetBSD: Makefile,v 1.6 2011/03/09 23:10:08 joerg Exp $
|
|
|
|
.include <bsd.own.mk>
|
|
|
|
CPPFLAGS+= -DELFSIZE=64
|
|
LIB= ldd_elf64
|
|
|
|
# XXX Force one member
|
|
SRCS= dummy.c
|
|
|
|
LIBISPRIVATE= yes
|
|
.PATH: ${.CURDIR}/..
|
|
|
|
.if (${MACHINE_ARCH} == "alpha") || (${MACHINE_ARCH} == "sparc64") || \
|
|
(${MACHINE_ARCH} == "x86_64") || (${MACHINE_ARCH} == "powerpc64") || \
|
|
(${MACHINE_ARCH} == "mips64el") || (${MACHINE_ARCH} == "mips64eb")
|
|
|
|
# XXX we need to make sure that we don't accidentally get the elf32
|
|
# XXX versions of these.
|
|
|
|
RTLD_FUNCS = \
|
|
_rtld_expand_path \
|
|
_rtld_digest_dynamic \
|
|
_rtld_digest_phdr \
|
|
_rtld_load_needed_objects \
|
|
_rtld_load_object \
|
|
_rtld_map_object \
|
|
_rtld_obj_free \
|
|
_rtld_obj_new \
|
|
_rtld_add_paths \
|
|
_rtld_process_hints \
|
|
_rtld_sysctl \
|
|
_rtld_tls_allocate \
|
|
_rtld_tls_free \
|
|
_rtld_load_library
|
|
|
|
.for _d in ${RTLD_FUNCS}
|
|
CPPFLAGS+= -D${_d}=_elf64_${_d}
|
|
.endfor
|
|
|
|
.if (${MACHINE_ARCH} == "mips64el") || (${MACHINE_ARCH} == "mips64eb")
|
|
CPPFLAGS+= -DRTLD_ARCH_SUBDIR=\"${MLIBDIR}\"
|
|
.endif
|
|
|
|
.include "../Makefile.elf"
|
|
|
|
.endif
|
|
|
|
.include <bsd.lib.mk>
|