2014-11-24 Siddhesh Poyarekar <siddhesh@redhat.com>
+ * elf/Makefile (CPPFLAGS-.os): Remove IS_IN_rtld.
+ * elf/dl-open.c: Use IS_IN (rtld) instead if IS_IN_rtld.
+ * elf/rtld-Rules: Likewise.
+ * elf/setup-vdso.h: Likewise.
+ * include/assert.h: Likewise.
+ * include/bits/stdlib-float.h: Likewise.
+ * include/errno.h: Likewise.
+ * include/sys/stat.h: Likewise.
+ * include/unistd.h: Likewise.
+ * sysdeps/aarch64/setjmp.S: Likewise.
+ * sysdeps/alpha/setjmp.S: Likewise.
+ * sysdeps/arm/__longjmp.S: Likewise.
+ * sysdeps/arm/aeabi_unwind_cpp_pr1.c: Likewise.
+ * sysdeps/arm/setjmp.S: Likewise.
+ * sysdeps/arm/sysdep.h: Likewise.
+ * sysdeps/generic/_itoa.h: Likewise.
+ * sysdeps/generic/dl-sysdep.h: Likewise.
+ * sysdeps/generic/ldsodefs.h: Likewise.
+ * sysdeps/i386/dl-tls.h: Likewise.
+ * sysdeps/i386/setjmp.S: Likewise.
+ * sysdeps/m68k/setjmp.c: Likewise.
+ * sysdeps/mach/hurd/dl-execstack.c: Likewise.
+ * sysdeps/mach/hurd/opendir.c: Likewise.
+ * sysdeps/posix/getcwd.c: Likewise.
+ * sysdeps/posix/opendir.c: Likewise.
+ * sysdeps/posix/profil.c: Likewise.
+ * sysdeps/powerpc/dl-procinfo.h: Likewise.
+ * sysdeps/powerpc/powerpc32/fpu/__longjmp-common.S: Likewise.
+ * sysdeps/powerpc/powerpc32/fpu/setjmp-common.S: Likewise.
+ * sysdeps/powerpc/powerpc32/power4/multiarch/init-arch.h: Likewise.
+ * sysdeps/powerpc/powerpc32/setjmp-common.S: Likewise.
+ * sysdeps/powerpc/powerpc64/__longjmp-common.S: Likewise.
+ * sysdeps/powerpc/powerpc64/setjmp-common.S: Likewise.
+ * sysdeps/s390/dl-tls.h: Likewise.
+ * sysdeps/s390/s390-32/setjmp.S: Likewise.
+ * sysdeps/s390/s390-64/setjmp.S: Likewise.
+ * sysdeps/sh/sh3/setjmp.S: Likewise.
+ * sysdeps/sh/sh4/setjmp.S: Likewise.
+ * sysdeps/unix/alpha/sysdep.h: Likewise.
+ * sysdeps/unix/arm/sysdep.S: Likewise.
+ * sysdeps/unix/i386/sysdep.S: Likewise.
+ * sysdeps/unix/sysv/linux/aarch64/sysdep.h: Likewise.
+ * sysdeps/unix/sysv/linux/getcwd.c: Likewise.
+ * sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h: Likewise.
+ * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
+ * sysdeps/unix/sysv/linux/i386/sysdep.h: Likewise.
+ * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
+ * sysdeps/unix/sysv/linux/ia64/setjmp.S: Likewise.
+ * sysdeps/unix/sysv/linux/ia64/sysdep.h: Likewise.
+ * sysdeps/unix/sysv/linux/lowlevellock-futex.h: Likewise.
+ * sysdeps/unix/sysv/linux/m68k/bits/m68k-vdso.h: Likewise.
+ * sysdeps/unix/sysv/linux/m68k/m68k-helpers.S: Likewise.
+ * sysdeps/unix/sysv/linux/microblaze/lowlevellock.h: Likewise.
+ * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
+ * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h: Likewise.
+ * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h: Likewise.
+ * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
+ * sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h: Likewise.
+ * sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h: Likewise.
+ * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
+ * sysdeps/unix/sysv/linux/sh/sysdep.h: Likewise.
+ * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
+ * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h: Likewise.
+ * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h: Likewise.
+ * sysdeps/unix/sysv/linux/tile/lowlevellock.h: Likewise.
+ * sysdeps/unix/sysv/linux/tile/sysdep.h: Likewise.
+ * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
+ * sysdeps/unix/sysv/linux/x86_64/sysdep.h: Likewise.
+ * sysdeps/unix/x86_64/sysdep.S: Likewise.
+ * sysdeps/x86_64/setjmp.S: Likewise.
+
* include/math.h: Use IS_IN instead of IS_IN_libm.
* sysdeps/alpha/fpu/s_copysign.c: Likewise.
* sysdeps/ieee754/ldbl-128ibm/s_copysignl.c: Likewise.
CFLAGS-rtld.c = $(SYSCONF-FLAGS)
CPPFLAGS-.os += $(if $(filter $(@F),$(patsubst %,%.os,$(all-rtld-routines))),\
- -DNOT_IN_libc=1 -DIS_IN_rtld=1)
+ -DNOT_IN_libc=1)
cpp-srcs-left := $(all-rtld-routines:=.os)
lib := rtld
_dl_debug_printf ("\n");
}
-#ifdef IS_IN_rtld
+#if IS_IN (rtld)
/* Return non-zero if ADDR lies within one of L's segments. */
int
internal_function
include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left))
# This here is the whole point of all the shenanigans.
-rtld-CPPFLAGS := -DNOT_IN_libc=1 -DIS_IN_rtld=1
+rtld-CPPFLAGS := -DNOT_IN_libc=1
endif
/* Add the vDSO to the object list. */
_dl_add_to_namespace_list (l, LM_ID_BASE);
-# ifdef IS_IN_rtld
+# if IS_IN (rtld)
/* Rearrange the list so this DSO appears after rtld_map. */
assert (l->l_next == NULL);
assert (l->l_prev == main_map);
const char *function)
__THROW __attribute__ ((__noreturn__));
-# if !defined NOT_IN_libc || defined IS_IN_rtld
+# if !defined NOT_IN_libc || IS_IN (rtld)
hidden_proto (__assert_fail)
hidden_proto (__assert_perror_fail)
# endif
/* No floating-point inline functions in rtld. */
-#ifndef IS_IN_rtld
+#if !IS_IN (rtld)
# include <stdlib/bits/stdlib-float.h>
#endif
#if defined _ERRNO_H && !defined _ISOMAC && !defined __cplusplus
-# ifdef IS_IN_rtld
+# if IS_IN (rtld)
# include <dl-sysdep.h>
# ifndef RTLD_PRIVATE_ERRNO
# error "dl-sysdep.h must define RTLD_PRIVATE_ERRNO!"
extern int __mkdir (const char *__path, __mode_t __mode);
extern int __mknod (const char *__path,
__mode_t __mode, __dev_t __dev);
-#if !defined NOT_IN_libc || defined IS_IN_rtld
+#if !defined NOT_IN_libc || IS_IN (rtld)
hidden_proto (__fxstat)
hidden_proto (__fxstat64)
hidden_proto (__lxstat)
mov x2, sp
str x2, [x0, #JB_SP<<3]
#endif
-#ifdef IS_IN_rtld
+#if IS_IN (rtld)
/* In ld.so we never save the signal mask */
mov w0, #0
RET
ldq ra, 0(sp)
addq sp, 16, sp
ret
-#elif defined IS_IN_rtld
+#elif IS_IN (rtld)
/* In ld.so we never save the signal mask. */
mov 0, v0
ret
#endif
#ifdef NEED_HWCAP
-# ifdef IS_IN_rtld
+# if IS_IN (rtld)
LDST_PCREL (ldr, a4, a3, \
C_SYMBOL_NAME(_rtld_local_ro) \
+ RTLD_GLOBAL_RO_DL_HWCAP_OFFSET)
void
__aeabi_unwind_cpp_pr0 (void)
{
-#ifndef IS_IN_rtld
+#if !IS_IN (rtld)
abort ();
#endif
}
void
__aeabi_unwind_cpp_pr1 (void)
{
-#ifndef IS_IN_rtld
+#if !IS_IN (rtld)
abort ();
#endif
}
void
__aeabi_unwind_cpp_pr2 (void)
{
-#ifndef IS_IN_rtld
+#if !IS_IN (rtld)
abort ();
#endif
}
#ifdef NEED_HWCAP
/* Check if we have a VFP unit. */
-# ifdef IS_IN_rtld
+# if IS_IN (rtld)
LDST_PCREL (ldr, a3, a4, \
C_SYMBOL_NAME(_rtld_local_ro) \
+ RTLD_GLOBAL_RO_DL_HWCAP_OFFSET)
#endif
/* Pointer mangling support. */
-#if (defined IS_IN_rtld || \
+#if (IS_IN (rtld) || \
(!defined SHARED && (!defined NOT_IN_libc || IS_IN (libpthread))))
# ifdef __ASSEMBLER__
# define PTR_MANGLE_LOAD(guard, tmp) \
extern const char _itoa_upper_digits[];
extern const char _itoa_lower_digits[];
-#if !defined NOT_IN_libc || defined IS_IN_rtld
+#if !defined NOT_IN_libc || IS_IN (rtld)
hidden_proto (_itoa_upper_digits)
hidden_proto (_itoa_lower_digits)
#endif
all the libc functions that ld.so uses are called without PLT and always
get the versions linked into ld.so rather than the libc ones. */
-#ifdef IS_IN_rtld
+#if IS_IN (rtld)
# define RTLD_PRIVATE_ERRNO 1
#else
# define RTLD_PRIVATE_ERRNO 0
# define GL(name) _##name
#else
# define EXTERN
-# ifdef IS_IN_rtld
+# if IS_IN (rtld)
# define GL(name) _rtld_local._##name
# else
# define GL(name) _rtld_global._##name
#ifdef SHARED
};
# define __rtld_global_attribute__
-# ifdef IS_IN_rtld
+# if IS_IN (rtld)
# ifdef HAVE_SDATA_SECTION
# define __rtld_local_attribute__ \
__attribute__ ((visibility ("hidden"), section (".sdata")))
#ifndef SHARED
# define GLRO(name) _##name
#else
-# ifdef IS_IN_rtld
+# if IS_IN (rtld)
# define GLRO(name) _rtld_local_ro._##name
# else
# define GLRO(name) _rtld_global_ro._##name
EXTERN int _dl_pointer_guard;
};
# define __rtld_global_attribute__
-# ifdef IS_IN_rtld
+# if IS_IN (rtld)
# define __rtld_local_attribute__ __attribute__ ((visibility ("hidden")))
extern struct rtld_global_ro _rtld_local_ro
attribute_relro __rtld_local_attribute__;
extern size_t _dl_phnum;
#endif
-#ifdef IS_IN_rtld
+#if IS_IN (rtld)
/* This is the initial value of GL(dl_error_catch_tsd).
A non-TLS libpthread will change it. */
extern void **_dl_initial_error_catch_tsd (void) __attribute__ ((const))
#endif
;
rtld_hidden_proto (_dl_argv)
-#ifdef IS_IN_rtld
+#if IS_IN (rtld)
extern unsigned int _dl_skip_args attribute_hidden
# ifndef DL_ARGV_NOT_RELRO
attribute_relro
extern void *___tls_get_addr_internal (tls_index *ti)
__attribute__ ((__regparm__ (1))) attribute_hidden;
-# ifdef IS_IN_rtld
+# if IS_IN (rtld)
/* The special thing about the x86 TLS ABI is that we have two
variants of the __tls_get_addr function with different calling
conventions. The GNU version, which we are mostly concerned here,
movl %ecx, (JB_PC*4)(%eax)
movl %ebp, (JB_BP*4)(%eax) /* Save caller's frame pointer. */
-#ifdef IS_IN_rtld
+#if IS_IN (rtld)
/* In ld.so we never save the signal mask. */
xorl %eax, %eax
ret
: : "m" (env[0].__jmpbuf[0].__fpregs[0]));
#endif
-#ifdef IS_IN_rtld
+#if IS_IN (rtld)
/* In ld.so we never save the signal mask. */
return 0;
#else
return EPERM;
*stack_endp = NULL;
-#ifdef IS_IN_rtld
+#if IS_IN (rtld)
if (__mprotect ((void *)_dl_hurd_data->stack_base, _dl_hurd_data->stack_size,
PROT_READ|PROT_WRITE|PROT_EXEC) != 0)
return errno;
int flags = O_RDONLY | O_NONBLOCK | O_DIRECTORY | O_CLOEXEC;
int fd;
-#ifdef IS_IN_rtld
+#if IS_IN (rtld)
assert (dfd == AT_FDCWD);
fd = open_not_cancel_2 (name, flags);
#else
#ifdef __ASSUME_ATFCTS
# define __have_atfcts 1
-#elif defined IS_IN_rtld
+#elif IS_IN (rtld)
static int __rtld_have_atfcts;
# define __have_atfcts __rtld_have_atfcts
#endif
flags |= O_CLOEXEC;
#endif
int fd;
-#ifdef IS_IN_rtld
+#if IS_IN (rtld)
assert (dfd == AT_FDCWD);
fd = open_not_cancel_2 (name, flags);
#else
{
struct sigaction act;
struct itimerval timer;
-#ifndef IS_IN_rtld
+#if !IS_IN (rtld)
static struct sigaction oact;
static struct itimerval otimer;
# define oact_ptr &oact
return -1;
}
-#ifdef IS_IN_rtld
+#if IS_IN (rtld)
static inline int
__attribute__ ((unused))
_dl_procinfo (unsigned int type, unsigned long int word)
addis r5,r5,_GLOBAL_OFFSET_TABLE_-got_label@ha
addi r5,r5,_GLOBAL_OFFSET_TABLE_-got_label@l
# ifdef SHARED
-# ifdef IS_IN_rtld
+# if IS_IN (rtld)
/* Inside ld.so we use the local alias to avoid runtime GOT
relocations. */
lwz r5,_rtld_local_ro@got(r5)
mtlr r6
cfi_same_value (lr)
# ifdef SHARED
-# ifdef IS_IN_rtld
+# if IS_IN (rtld)
/* Inside ld.so we use the local alias to avoid runtime GOT
relocations. */
lwz r5,_rtld_local_ro@got(r5)
the dl_hwcap field. The assembly is to make the compiler not optimize the
test (&_rtld_global_ro != NULL), which is always true in ISO C (but not
in that case since _rtld_global_ro might not been realocated yet). */
-#if defined(SHARED) && !defined(IS_IN_rtld)
+#if defined(SHARED) && !IS_IN (rtld)
# define __GLRO(value) \
({ volatile void **__p = (volatile void**)(&_rtld_global_ro); \
unsigned long int __ret; \
SAVE_GP (29)
SAVE_GP (30)
SAVE_GP (31)
-#ifdef IS_IN_rtld
+#if IS_IN (rtld)
li r3,0
blr
#else
.section ".toc","aw"
.LC__dl_hwcap:
# ifdef SHARED
-# ifdef IS_IN_rtld
+# if IS_IN (rtld)
/* Inside ld.so we use the local alias to avoid runtime GOT
relocations. */
.tc _rtld_local_ro[TC],_rtld_local_ro
ld r0,(JB_LR*8)(r3)
ld r14,((JB_GPRS+0)*8)(r3)
lfd fp14,((JB_FPRS+0)*8)(r3)
-#if defined SHARED && !defined IS_IN_rtld
+#if defined SHARED && !IS_IN (rtld)
std r2,FRAME_TOC_SAVE(r1) /* Restore the callers TOC save area. */
#endif
ld r15,((JB_GPRS+1)*8)(r3)
.section ".toc","aw"
.LC__dl_hwcap:
# ifdef SHARED
-# ifdef IS_IN_rtld
+# if IS_IN (rtld)
/* Inside ld.so we use the local alias to avoid runtime GOT
relocations. */
.tc _rtld_local_ro[TC],_rtld_local_ro
b JUMPTARGET (GLUE(__sigsetjmp_symbol,_ent))
END (setjmp_symbol)
-#if defined SHARED && !defined IS_IN_rtld && !defined __NO_VMX__
+#if defined SHARED && !IS_IN (rtld) && !defined __NO_VMX__
/* When called from within libc we need a special version of _setjmp
that saves r2 since the call won't go via a plt call stub. See
bugz #269. __GI__setjmp is used in csu/libc-start.c when
std r1,(JB_GPR1*8)(3)
#endif
mflr r0
-#if defined SHARED && !defined IS_IN_rtld
+#if defined SHARED && !IS_IN (rtld)
ld r5,FRAME_TOC_SAVE(r1) /* Retrieve the callers TOC. */
std r5,(JB_GPR2*8)(3)
#else
#else
li r6,0
#endif
-#ifdef IS_IN_rtld
+#if IS_IN (rtld)
li r3,0
blr
#elif defined SHARED
extern unsigned long __tls_get_offset (unsigned long got_offset);
-# ifdef IS_IN_rtld
+# if IS_IN (rtld)
# include <shlib-compat.h>
1: .long __tls_get_addr - 0b\n\
");
# endif
-# else /* IS_IN_rtld */
+# else /* IS_IN (rtld) */
extern void *__tls_get_addr_internal (tls_index *ti);
-# endif /* !IS_IN_rtld */
+# endif /* !IS_IN (rtld) */
# define GET_ADDR_OFFSET \
(ti->ti_offset - (unsigned long) __builtin_thread_pointer ())
#include <shlib-compat.h>
#include <stap-probe.h>
-#if !defined IS_IN_rtld
+#if !IS_IN (rtld)
# if defined SHARED && SHLIB_COMPAT (libc, GLIBC_2_19, GLIBC_2_20)
/* we need a unique name in case of symbol versioning. */
# define __sigsetjmp __v1__sigsetjmp
# endif /* if defined SHARED && SHLIB_COMPAT (libc, GLIBC_2_19, GLIBC_2_20) */
-#endif /* !defined IS_IN_rtld */
+#endif /* !IS_IN (rtld) */
/* We include the BSD entry points here as well but we make
them weak. */
#endif
std %f4,40(%r2)
std %f6,48(%r2)
-#ifdef IS_IN_rtld
+#if IS_IN (rtld)
/* In ld.so we never save the signal mask. */
lhi %r2,0
br %r14
#endif
END (__sigsetjmp)
-#if !defined IS_IN_rtld
+#if !IS_IN (rtld)
# if defined SHARED && SHLIB_COMPAT (libc, GLIBC_2_19, GLIBC_2_20)
/* In glibc release 2.19 new versions of setjmp-functions were introduced,
but were reverted before 2.20. Thus both versions are the same function. */
versioned_symbol (libc, __v1__sigsetjmp, __sigsetjmp, GLIBC_2_0);
compat_symbol (libc, __v2__sigsetjmp, __sigsetjmp, GLIBC_2_19);
# endif /* if defined SHARED && SHLIB_COMPAT (libc, GLIBC_2_19, GLIBC_2_20) */
-#endif /* if !defined IS_IN_rtld */
+#endif /* if !IS_IN (rtld) */
#include <shlib-compat.h>
#include <stap-probe.h>
-#if !defined IS_IN_rtld
+#if !IS_IN (rtld)
# if defined SHARED && SHLIB_COMPAT (libc, GLIBC_2_19, GLIBC_2_20)
/* we need a unique name in case of symbol versioning. */
# define __sigsetjmp __v1__sigsetjmp
# endif /* if defined SHARED && SHLIB_COMPAT (libc, GLIBC_2_19, GLIBC_2_20) */
-#endif /* !defined IS_IN_rtld */
+#endif /* !IS_IN (rtld) */
/* We include the BSD entry points here as well but we make
them weak. */
std %f13,120(%r2)
std %f14,128(%r2)
std %f15,136(%r2)
-#ifdef IS_IN_rtld
+#if IS_IN (rtld)
/* In ld.so we never save the signal mask. */
lghi %r2,0
br %r14
#endif
END (__sigsetjmp)
-#if !defined IS_IN_rtld
+#if !IS_IN (rtld)
# if defined SHARED && SHLIB_COMPAT (libc, GLIBC_2_19, GLIBC_2_20)
/* In glibc release 2.19 new versions of setjmp-functions were introduced,
but were reverted before 2.20. Thus both versions are the same function. */
versioned_symbol (libc, __v1__sigsetjmp, __sigsetjmp, GLIBC_2_0);
compat_symbol (libc, __v2__sigsetjmp, __sigsetjmp, GLIBC_2_19);
# endif /* if defined SHARED && SHLIB_COMPAT (libc, GLIBC_2_19, GLIBC_2_20) */
-#endif /* if !defined IS_IN_rtld */
+#endif /* if !IS_IN (rtld) */
mov.l r9, @-r4
mov.l r8, @-r4
-#ifdef IS_IN_rtld
+#if IS_IN (rtld)
/* In ld.so we never save the signal mask. */
rts
mov #0, r0
mov.l r9, @-r4
mov.l r8, @-r4
-#ifdef IS_IN_rtld
+#if IS_IN (rtld)
/* In ld.so we never save the signal mask. */
rts
mov #0, r0
# include <regdef.h>
#endif
-#ifdef IS_IN_rtld
+#if IS_IN (rtld)
# include <dl-sysdep.h> /* Defines RTLD_PRIVATE_ERRNO. */
#endif
we don't deoptimize things by placing the pointer check value there. */
#ifdef __ASSEMBLER__
-# ifdef IS_IN_rtld
+# if IS_IN (rtld)
# define PTR_MANGLE(dst, src, tmp) \
ldah tmp, __pointer_chk_guard_local($29) !gprelhigh; \
ldq tmp, __pointer_chk_guard_local(tmp) !gprellow; \
# define PTR_DEMANGLE2(dst, tmp) PTR_MANGLE2(dst, dst, tmp)
#else
# include <stdint.h>
-# if (defined IS_IN_rtld \
+# if (IS_IN (rtld) \
|| (!defined SHARED && (!defined NOT_IN_libc \
|| IS_IN (libpthread))))
extern uintptr_t __pointer_chk_guard_local attribute_relro attribute_hidden;
#define _ERRNO_H
#include <bits/errno.h>
-#ifdef IS_IN_rtld
+#if IS_IN (rtld)
# include <dl-sysdep.h> /* Defines RTLD_PRIVATE_ERRNO. */
#endif
moveq r0, $EAGAIN /* Yes; translate it to EAGAIN. */
#endif
-#ifndef IS_IN_rtld
+#if !IS_IN (rtld)
mov r1, r0
GET_TLS (r2)
ldr r2, 1f
#define _ERRNO_H
#include <bits/errno.h>
-#ifdef IS_IN_rtld
+#if IS_IN (rtld)
# include <dl-sysdep.h> /* Defines RTLD_PRIVATE_ERRNO. */
#endif
#endif /* __ASSEMBLER__ */
/* Pointer mangling is supported for AArch64. */
-#if (defined IS_IN_rtld || \
+#if (IS_IN (rtld) || \
(!defined SHARED && (!defined NOT_IN_libc \
|| IS_IN (libpthread))))
# ifdef __ASSEMBLER__
/* If we compile the file for use in ld.so we don't need the feature
that getcwd() allocates the buffers itself. */
-#ifdef IS_IN_rtld
+#if IS_IN (rtld)
# define NO_ALLOCATION 1
#endif
/* Initialize locks to zero. */
#define LLL_MUTEX_LOCK_INITIALIZER (0)
-#if !defined NOT_IN_libc || defined IS_IN_rtld
+#if !defined NOT_IN_libc || IS_IN (rtld)
/* In libc.so or ld.so all futexes are private. */
# ifdef __ASSUME_PRIVATE_FUTEX
# define __lll_private_flag(fl, private) \
#define LLL_SHARED FUTEX_PRIVATE_FLAG
-#if !defined NOT_IN_libc || defined IS_IN_rtld
+#if !defined NOT_IN_libc || IS_IN (rtld)
/* In libc.so or ld.so all futexes are private. */
# ifdef __ASSUME_PRIVATE_FUTEX
# define __lll_private_flag(fl, private) \
/* Pointer mangling support. */
-#ifdef IS_IN_rtld
+#if IS_IN (rtld)
/* We cannot use the thread descriptor because in ld.so we use setjmp
earlier than the descriptor is initialized. Using a global variable
is too complicated here since we have no PC-relative addressing mode. */
#define LLL_SHARED FUTEX_PRIVATE_FLAG
-#if !defined NOT_IN_libc || defined IS_IN_rtld
+#if !defined NOT_IN_libc || IS_IN (rtld)
/* In libc.so or ld.so all futexes are private. */
# ifdef __ASSUME_PRIVATE_FUTEX
# define __lll_private_flag(fl, private) \
;;
st8.nta [r2]=r25 // ar.unat
st8.nta [r3]=in0 // &__jmp_buf
-#ifdef IS_IN_rtld
+#if IS_IN (rtld)
/* In ld.so we never save the signal mask. */
;;
#else
#endif /* not __ASSEMBLER__ */
/* Pointer mangling support. */
-#ifdef IS_IN_rtld
+#if IS_IN (rtld)
/* We cannot use the thread descriptor because in ld.so we use setjmp
earlier than the descriptor is initialized. */
#else
#define LLL_SHARED FUTEX_PRIVATE_FLAG
-#if !defined NOT_IN_libc || defined IS_IN_rtld
+#if !defined NOT_IN_libc || IS_IN (rtld)
/* In libc.so or ld.so all futexes are private. */
# ifdef __ASSUME_PRIVATE_FUTEX
# define __lll_private_flag(fl, private) \
#ifdef SHARED
-# ifdef IS_IN_rtld
+# if IS_IN (rtld)
# define M68K_VDSO_SYMBOL(name) __rtld_##name
# define STR_M68K_VDSO_SYMBOL(name) "__rtld_" #name
# else
/* We define __rtld_* copies for rtld.
We need them visible in libc to initialize. */
-# if defined IS_IN_rtld || !defined NOT_IN_libc
+# if IS_IN (rtld) || !defined NOT_IN_libc
extern void *__rtld___vdso_read_tp;
extern void *__rtld___vdso_atomic_cmpxchg_32;
extern void *__rtld___vdso_atomic_barrier;
extern void __vdso_read_tp_stub (void);
extern void __vdso_atomic_cmpxchg_32_stub (void);
extern void __vdso_atomic_barrier_stub (void);
-# endif /* IS_IN_rtld || !NOT_IN_libc */
+# endif /* IS_IN (rtld) || !NOT_IN_libc */
/* RTLD should only use its own copies. */
-# ifndef IS_IN_rtld
+# if !IS_IN (rtld)
extern void *__vdso_read_tp;
extern void *__vdso_atomic_cmpxchg_32;
extern void *__vdso_atomic_barrier;
-# endif /* !IS_IN_rtld */
+# endif /* !IS_IN (rtld) */
# endif /* !__ASSEMBLER__ */
equivalent helper function (which clobbers fewer registers than
a normal function call) in a vdso; tail call to the
helper. */
-# ifdef IS_IN_rtld
+# if IS_IN (rtld)
/* rtld gets a hidden copy of __m68k_read_tp. */
.hidden __m68k_read_tp
# endif
#define LLL_SHARED FUTEX_PRIVATE_FLAG
-#if !defined NOT_IN_libc || defined IS_IN_rtld
+#if !defined NOT_IN_libc || IS_IN (rtld)
/* In libc.so or ld.so all futexes are private. */
# ifdef __ASSUME_PRIVATE_FUTEX
# define __lll_private_flag(fl, private) \
/* Pointer mangling support. */
-#ifdef IS_IN_rtld
+#if IS_IN (rtld)
/* We cannot use the thread descriptor because in ld.so we use setjmp
earlier than the descriptor is initialized. */
#else
/* Pointer mangling support. */
-#ifdef IS_IN_rtld
+#if IS_IN (rtld)
/* We cannot use the thread descriptor because in ld.so we use setjmp
earlier than the descriptor is initialized. */
#else
#define LLL_SHARED FUTEX_PRIVATE_FLAG
-#if !defined NOT_IN_libc || defined IS_IN_rtld
+#if !defined NOT_IN_libc || IS_IN (rtld)
/* In libc.so or ld.so all futexes are private. */
# ifdef __ASSUME_PRIVATE_FUTEX
# define __lll_private_flag(fl, private) \
_ret; })
/* Pointer mangling support. */
-#ifdef IS_IN_rtld
+#if IS_IN (rtld)
/* We cannot use the thread descriptor because in ld.so we use setjmp
earlier than the descriptor is initialized. */
#else
_ret; })
/* Pointer mangling support. */
-#ifdef IS_IN_rtld
+#if IS_IN (rtld)
/* We cannot use the thread descriptor because in ld.so we use setjmp
earlier than the descriptor is initialized. */
#else
#define LLL_SHARED FUTEX_PRIVATE_FLAG
-#if !defined NOT_IN_libc || defined IS_IN_rtld
+#if !defined NOT_IN_libc || IS_IN (rtld)
/* In libc.so or ld.so all futexes are private. */
# ifdef __ASSUME_PRIVATE_FUTEX
# define __lll_private_flag(fl, private) \
#endif /* __ASSEMBLER__ */
/* Pointer mangling support. */
-#ifdef IS_IN_rtld
+#if IS_IN (rtld)
/* We cannot use the thread descriptor because in ld.so we use setjmp
earlier than the descriptor is initialized. Using a global variable
is too complicated here since we have no PC-relative addressing mode. */
#define BUSY_WAIT_NOP __cpu_relax ()
#endif
-#if !defined NOT_IN_libc || defined IS_IN_rtld
+#if !defined NOT_IN_libc || IS_IN (rtld)
/* In libc.so or ld.so all futexes are private. */
# ifdef __ASSUME_PRIVATE_FUTEX
# define __lll_private_flag(fl, private) \
#include <sysdeps/unix/sysv/linux/sparc/sysdep.h>
-#ifdef IS_IN_rtld
+#if IS_IN (rtld)
# include <dl-sysdep.h> /* Defines RTLD_PRIVATE_ERRNO. */
#endif
#include <tls.h>
#endif /* __ASSEMBLER__ */
/* Pointer mangling support. */
-#ifdef IS_IN_rtld
+#if IS_IN (rtld)
/* We cannot use the thread descriptor because in ld.so we use setjmp
earlier than the descriptor is initialized. */
#else
#include <sysdeps/unix/sysv/linux/sparc/sysdep.h>
-#ifdef IS_IN_rtld
+#if IS_IN (rtld)
# include <dl-sysdep.h> /* Defines RTLD_PRIVATE_ERRNO. */
#endif
#include <tls.h>
#define STACK_BIAS 2047
/* Pointer mangling support. */
-#ifdef IS_IN_rtld
+#if IS_IN (rtld)
/* We cannot use the thread descriptor because in ld.so we use setjmp
earlier than the descriptor is initialized. */
#else
#endif /* not __ASSEMBLER__ */
/* Pointer mangling support. */
-#ifdef IS_IN_rtld
+#if IS_IN (rtld)
/* We cannot use the thread descriptor because in ld.so we use setjmp
earlier than the descriptor is initialized. */
#else
#ifndef __ASSEMBLER__
-#if !defined NOT_IN_libc || defined IS_IN_rtld
+#if !defined NOT_IN_libc || IS_IN (rtld)
/* In libc.so or ld.so all futexes are private. */
# ifdef __ASSUME_PRIVATE_FUTEX
# define __lll_private_flag(fl, private) \
#include <sysdeps/unix/x86_64/sysdep.h>
#include <tls.h>
-#ifdef IS_IN_rtld
+#if IS_IN (rtld)
# include <dl-sysdep.h> /* Defines RTLD_PRIVATE_ERRNO. */
#endif
/* Pointer mangling support. */
-#ifdef IS_IN_rtld
+#if IS_IN (rtld)
/* We cannot use the thread descriptor because in ld.so we use setjmp
earlier than the descriptor is initialized. */
# ifdef __ASSEMBLER__
#include <bits/errno.h>
#include <tls.h>
-#ifdef IS_IN_rtld
+#if IS_IN (rtld)
# include <dl-sysdep.h> /* Defines RTLD_PRIVATE_ERRNO. */
#endif
#endif
movq %rax, (JB_PC*8)(%rdi)
-#ifdef IS_IN_rtld
+#if IS_IN (rtld)
/* In ld.so we never save the signal mask. */
xorl %eax, %eax
retq