+2014-08-21 Siddhesh Poyarekar <siddhesh@redhat.com>
+
+ * include/libc-symbols.h: Remove unnecessary check for
+ NOT_IN_libc.
+ * nptl/pthreadP.h: Likewise.
+ * sysdeps/aarch64/setjmp.S: Likewise.
+ * sysdeps/alpha/setjmp.S: Likewise.
+ * sysdeps/arm/sysdep.h: Likewise.
+ * sysdeps/i386/setjmp.S: Likewise.
+ * sysdeps/m68k/setjmp.c: Likewise.
+ * sysdeps/posix/getcwd.c: Likewise.
+ * sysdeps/powerpc/powerpc32/setjmp-common.S: Likewise.
+ * sysdeps/powerpc/powerpc64/setjmp-common.S: 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/sysv/linux/aarch64/sysdep.h: Likewise.
+ * sysdeps/unix/sysv/linux/i386/sysdep.h: Likewise.
+ * sysdeps/unix/sysv/linux/ia64/setjmp.S: Likewise.
+ * sysdeps/unix/sysv/linux/ia64/sysdep.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/s390-32/sysdep.h: Likewise.
+ * sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h: Likewise.
+ * sysdeps/unix/sysv/linux/sh/sysdep.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/sysdep.h: Likewise.
+ * sysdeps/unix/sysv/linux/x86_64/sysdep.h: Likewise.
+ * sysdeps/x86_64/setjmp.S: Likewise.
+
2014-08-13 Joseph Myers <joseph@codesourcery.com>
[BZ #17263]
# define libc_hidden_data_ver(local, name)
#endif
-#if defined NOT_IN_libc && defined IS_IN_rtld
+#ifdef IS_IN_rtld
# define rtld_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
# define rtld_hidden_tls_proto(name, attrs...) hidden_tls_proto (name, ##attrs)
# define rtld_hidden_def(name) hidden_def (name)
# define rtld_hidden_data_ver(local, name)
#endif
-#if defined NOT_IN_libc && defined IS_IN_libm
+#ifdef IS_IN_libm
# define libm_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
# define libm_hidden_tls_proto(name, attrs...) hidden_tls_proto (name, ##attrs)
# define libm_hidden_def(name) hidden_def (name)
# define libm_hidden_data_ver(local, name)
#endif
-#if defined NOT_IN_libc && defined IS_IN_libresolv
+#ifdef IS_IN_libresolv
# define libresolv_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
# define libresolv_hidden_tls_proto(name, attrs...) \
hidden_tls_proto (name, ##attrs)
# define libresolv_hidden_data_ver(local, name)
#endif
-#if defined NOT_IN_libc && defined IS_IN_librt
+#ifdef IS_IN_librt
# define librt_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
# define librt_hidden_tls_proto(name, attrs...) \
hidden_tls_proto (name, ##attrs)
# define librt_hidden_data_ver(local, name)
#endif
-#if defined NOT_IN_libc && defined IS_IN_libdl
+#ifdef IS_IN_libdl
# define libdl_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
# define libdl_hidden_tls_proto(name, attrs...) \
hidden_tls_proto (name, ##attrs)
# define libdl_hidden_data_ver(local, name)
#endif
-#if defined NOT_IN_libc && defined IS_IN_libnss_files
+#ifdef IS_IN_libnss_files
# define libnss_files_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
# define libnss_files_hidden_tls_proto(name, attrs...) \
hidden_tls_proto (name, ##attrs)
# define libnss_files_hidden_data_ver(local, name)
#endif
-#if defined NOT_IN_libc && defined IS_IN_libnsl
+#ifdef IS_IN_libnsl
# define libnsl_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
# define libnsl_hidden_tls_proto(name, attrs...) \
hidden_tls_proto (name, ##attrs)
# define libnsl_hidden_data_ver(local, name)
#endif
-#if defined NOT_IN_libc && defined IS_IN_libnss_nisplus
+#ifdef IS_IN_libnss_nisplus
# define libnss_nisplus_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
# define libnss_nisplus_hidden_tls_proto(name, attrs...) \
hidden_tls_proto (name, ##attrs)
# define HIDDEN_BUILTIN_JUMPTARGET(name) HIDDEN_JUMPTARGET(name)
#endif
-#if defined NOT_IN_libc && defined IS_IN_libutil
+#ifdef IS_IN_libutil
# define libutil_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
# define libutil_hidden_tls_proto(name, attrs...) \
hidden_tls_proto (name, ##attrs)
__cleanup_fct_attribute;
extern void __pthread_unregister_cancel (__pthread_unwind_buf_t *__buf)
__cleanup_fct_attribute;
-#if defined NOT_IN_libc && defined IS_IN_libpthread
+#ifdef IS_IN_libpthread
hidden_proto (__pthread_unwind)
hidden_proto (__pthread_unwind_next)
hidden_proto (__pthread_register_cancel)
# define LIBC_CANCEL_HANDLED() \
__asm (".globl " __SYMBOL_PREFIX "__libc_enable_asynccancel"); \
__asm (".globl " __SYMBOL_PREFIX "__libc_disable_asynccancel")
-#elif defined NOT_IN_libc && defined IS_IN_libpthread
+#elif defined IS_IN_libpthread
# define LIBC_CANCEL_ASYNC() CANCEL_ASYNC ()
# define LIBC_CANCEL_RESET(val) CANCEL_RESET (val)
# define LIBC_CANCEL_HANDLED() \
__asm (".globl " __SYMBOL_PREFIX "__pthread_enable_asynccancel"); \
__asm (".globl " __SYMBOL_PREFIX "__pthread_disable_asynccancel")
-#elif defined NOT_IN_libc && defined IS_IN_librt
+#elif defined IS_IN_librt
# define LIBC_CANCEL_ASYNC() \
__librt_enable_asynccancel ()
# define LIBC_CANCEL_RESET(val) \
/* longjmp handling. */
extern void __pthread_cleanup_upto (__jmp_buf target, char *targetframe);
-#if defined NOT_IN_libc && defined IS_IN_libpthread
+#ifdef IS_IN_libpthread
hidden_proto (__pthread_cleanup_upto)
#endif
extern void __pthread_disable_asynccancel (int oldtype)
internal_function attribute_hidden;
-#if defined NOT_IN_libc && defined IS_IN_libpthread
+#ifdef IS_IN_libpthread
hidden_proto (__pthread_mutex_init)
hidden_proto (__pthread_mutex_destroy)
hidden_proto (__pthread_mutex_lock)
mov x2, sp
str x2, [x0, #JB_SP<<3]
#endif
-#if defined NOT_IN_libc && defined IS_IN_rtld
+#ifdef 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 NOT_IN_libc && defined IS_IN_rtld
+#elif defined IS_IN_rtld
/* In ld.so we never save the signal mask. */
mov 0, v0
ret
#endif
/* Pointer mangling support. */
-#if (defined NOT_IN_libc && defined IS_IN_rtld) || \
- (!defined SHARED && (!defined NOT_IN_libc || defined IS_IN_libpthread))
+#if (defined IS_IN_rtld || \
+ (!defined SHARED && (!defined NOT_IN_libc || defined IS_IN_libpthread)))
# ifdef __ASSEMBLER__
# define PTR_MANGLE_LOAD(guard, tmp) \
LDST_PCREL(ldr, guard, tmp, C_SYMBOL_NAME(__pointer_chk_guard_local));
movl %ecx, (JB_PC*4)(%eax)
movl %ebp, (JB_BP*4)(%eax) /* Save caller's frame pointer. */
-#if defined NOT_IN_libc && defined IS_IN_rtld
+#ifdef IS_IN_rtld
/* In ld.so we never save the signal mask. */
xorl %eax, %eax
ret
: : "m" (env[0].__jmpbuf[0].__fpregs[0]));
#endif
-#if defined NOT_IN_libc && defined IS_IN_rtld
+#ifdef IS_IN_rtld
/* In ld.so we never save the signal mask. */
return 0;
#else
#ifdef __ASSUME_ATFCTS
# define __have_atfcts 1
-#elif defined NOT_IN_libc && defined IS_IN_rtld
+#elif defined IS_IN_rtld
static int __rtld_have_atfcts;
# define __have_atfcts __rtld_have_atfcts
#endif
SAVE_GP (29)
SAVE_GP (30)
SAVE_GP (31)
-#if defined NOT_IN_libc && defined IS_IN_rtld
+#ifdef IS_IN_rtld
li r3,0
blr
#else
#else
li r6,0
#endif
-#if defined NOT_IN_libc && defined IS_IN_rtld
+#ifdef IS_IN_rtld
li r3,0
blr
#elif defined SHARED
#endif
std %f4,40(%r2)
std %f6,48(%r2)
-#if defined NOT_IN_libc && defined IS_IN_rtld
+#ifdef IS_IN_rtld
/* In ld.so we never save the signal mask. */
lhi %r2,0
br %r14
std %f13,120(%r2)
std %f14,128(%r2)
std %f15,136(%r2)
-#if defined NOT_IN_libc && defined IS_IN_rtld
+#ifdef IS_IN_rtld
/* In ld.so we never save the signal mask. */
lghi %r2,0
br %r14
mov.l r9, @-r4
mov.l r8, @-r4
-#if defined NOT_IN_libc && defined IS_IN_rtld
+#ifdef IS_IN_rtld
/* In ld.so we never save the signal mask. */
rts
mov #0, r0
mov.l r9, @-r4
mov.l r8, @-r4
-#if defined NOT_IN_libc && defined IS_IN_rtld
+#ifdef IS_IN_rtld
/* In ld.so we never save the signal mask. */
rts
mov #0, r0
we don't deoptimize things by placing the pointer check value there. */
#ifdef __ASSEMBLER__
-# if defined NOT_IN_libc && defined IS_IN_rtld
+# ifdef 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 NOT_IN_libc && defined IS_IN_rtld) \
- || (!defined SHARED && (!defined NOT_IN_libc || defined IS_IN_libpthread))
+# if (defined IS_IN_rtld \
+ || (!defined SHARED && (!defined NOT_IN_libc \
+ || defined IS_IN_libpthread)))
extern uintptr_t __pointer_chk_guard_local attribute_relro attribute_hidden;
# define PTR_MANGLE(var) \
(var) = (__typeof (var)) ((uintptr_t) (var) ^ __pointer_chk_guard_local)
#endif /* __ASSEMBLER__ */
/* Pointer mangling is supported for AArch64. */
-#if (defined NOT_IN_libc && defined IS_IN_rtld) || \
- (!defined SHARED && (!defined NOT_IN_libc || defined IS_IN_libpthread))
+#if (defined IS_IN_rtld || \
+ (!defined SHARED && (!defined NOT_IN_libc \
+ || defined IS_IN_libpthread)))
# ifdef __ASSEMBLER__
# define PTR_MANGLE(dst, src, guard, tmp) \
LDST_PCREL (ldr, guard, tmp, C_SYMBOL_NAME(__pointer_chk_guard_local)); \
/* Pointer mangling support. */
-#if defined NOT_IN_libc && defined IS_IN_rtld
+#ifdef 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. */
;;
st8.nta [r2]=r25 // ar.unat
st8.nta [r3]=in0 // &__jmp_buf
-#if defined NOT_IN_libc && defined IS_IN_rtld
+#ifdef IS_IN_rtld
/* In ld.so we never save the signal mask. */
;;
#else
#endif /* not __ASSEMBLER__ */
/* Pointer mangling support. */
-#if defined NOT_IN_libc && defined IS_IN_rtld
+#ifdef 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. */
-#if defined NOT_IN_libc && defined IS_IN_rtld
+#ifdef 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. */
-#if defined NOT_IN_libc && defined IS_IN_rtld
+#ifdef 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. */
-#if defined NOT_IN_libc && defined IS_IN_rtld
+#ifdef 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. */
-#if defined NOT_IN_libc && defined IS_IN_rtld
+#ifdef IS_IN_rtld
/* We cannot use the thread descriptor because in ld.so we use setjmp
earlier than the descriptor is initialized. */
#else
#endif /* __ASSEMBLER__ */
/* Pointer mangling support. */
-#if defined NOT_IN_libc && defined IS_IN_rtld
+#ifdef 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. */
#endif /* __ASSEMBLER__ */
/* Pointer mangling support. */
-#if defined NOT_IN_libc && defined IS_IN_rtld
+#ifdef IS_IN_rtld
/* We cannot use the thread descriptor because in ld.so we use setjmp
earlier than the descriptor is initialized. */
#else
#define STACK_BIAS 2047
/* Pointer mangling support. */
-#if defined NOT_IN_libc && defined IS_IN_rtld
+#ifdef 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. */
-#if defined NOT_IN_libc && defined IS_IN_rtld
+#ifdef 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. */
-#if defined NOT_IN_libc && defined IS_IN_rtld
+#ifdef IS_IN_rtld
/* We cannot use the thread descriptor because in ld.so we use setjmp
earlier than the descriptor is initialized. */
# ifdef __ASSEMBLER__
#endif
movq %rax, (JB_PC*8)(%rdi)
-#if defined NOT_IN_libc && defined IS_IN_rtld
+#ifdef IS_IN_rtld
/* In ld.so we never save the signal mask. */
xorl %eax, %eax
retq