@@ -18,9 +18,4 @@ nm:
#endif /* __ASSEMBLER __*/
#include <common/sysdep.h>
-
-/* Pointer mangling is not yet supported */
-#define PTR_MANGLE(var) (void) (var)
-#define PTR_DEMANGLE(var) (void) (var)
-
#endif
@@ -67,23 +67,12 @@
.globl C_SYMBOL_NAME(name); \
ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME(name),function) \
.align ALIGNARG(4); \
- name##: \
- CALL_MCOUNT
+ name##:
#undef END
#define END(name) \
ASM_SIZE_DIRECTIVE(name)
-/* If compiled for profiling, call `mcount' at the start of each function. */
-#ifdef PROF
-#define CALL_MCOUNT \
- str lr,[sp, #-4]! ; \
- bl PLTJMP(mcount) ; \
- ldr lr, [sp], #4 ;
-#else
-#define CALL_MCOUNT /* Do nothing. */
-#endif
-
#ifdef NO_UNDERSCORES
/* Since C identifiers are not normally prefixed with an underscore
on this system, the asm identifier `syscall_error' intrudes on the
@@ -277,9 +266,4 @@ __local_syscall_error: \
#define UNDOARGS_7 ldmfd sp!, {r4, r5, r6};
#endif /* __ASSEMBLER__ */
-
-/* Pointer mangling is not yet supported for ARM. */
-#define PTR_MANGLE(var) (void) (var)
-#define PTR_DEMANGLE(var) (void) (var)
-
#endif /* linux/arm/sysdep.h */
@@ -47,26 +47,13 @@
ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME(name),@function) \
.align ALIGNARG(4); \
C_LABEL(name) \
- cfi_startproc; \
- CALL_MCOUNT
+ cfi_startproc;
#undef END
#define END(name) \
cfi_endproc; \
ASM_SIZE_DIRECTIVE(name) \
-/* If compiled for profiling, call `mcount' at the start of each function. */
-#ifdef PROF
-/* The mcount code relies on a normal frame pointer being on the stack
- to locate our caller, so push one just for its benefit. */
-#define CALL_MCOUNT \
- pushl %ebp; cfi_adjust_cfa_offset (4); movl %esp, %ebp; \
- cfi_def_cfa_register (ebp); call JUMPTARGET(mcount); \
- popl %ebp; cfi_def_cfa (esp, 4);
-#else
-#define CALL_MCOUNT /* Do nothing. */
-#endif
-
#ifdef NO_UNDERSCORES
/* Since C identifiers are not normally prefixed with an underscore
on this system, the asm identifier `syscall_error' intrudes on the
@@ -396,34 +383,4 @@ __x86.get_pc_thunk.reg: \
cfi_restore (ebp); L(POPBP1):
#endif /* __ASSEMBLER__ */
-
-
-/* Pointer mangling support. */
-#if defined NOT_IN_libc && defined 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. */
-#else
-# ifdef __ASSEMBLER__
-# define PTR_MANGLE(reg) xorl %gs:POINTER_GUARD, reg; \
- roll $9, reg
-# define PTR_DEMANGLE(reg) rorl $9, reg; \
- xorl %gs:POINTER_GUARD, reg
-# else
-# include <stddef.h>
-# define PTR_MANGLE(var) __asm__ ("xorl %%gs:%c2, %0\n" \
- "roll $9, %0" \
- : "=r" (var) \
- : "0" (var), \
- "i" (offsetof (tcbhead_t, \
- pointer_guard)))
-# define PTR_DEMANGLE(var) __asm__ ("rorl $9, %0\n" \
- "xorl %%gs:%c2, %0" \
- : "=r" (var) \
- : "0" (var), \
- "i" (offsetof (tcbhead_t, \
- pointer_guard)))
-# endif
-#endif
-
#endif /* linux/i386/sysdep.h */
@@ -39,15 +39,12 @@
#define C_LABEL(name) name/**/:
#endif
-#define CALL_MCOUNT
-
#define ENTRY(name) \
.text; \
.align 32; \
.proc C_SYMBOL_NAME(name); \
.global C_SYMBOL_NAME(name); \
- C_LABEL(name) \
- CALL_MCOUNT
+ C_LABEL(name)
#define HIDDEN_ENTRY(name) \
.text; \
@@ -55,8 +52,7 @@
.proc C_SYMBOL_NAME(name); \
.global C_SYMBOL_NAME(name); \
.hidden C_SYMBOL_NAME(name); \
- C_LABEL(name) \
- CALL_MCOUNT
+ C_LABEL(name)
#define LEAF(name) \
.text; \
@@ -53,7 +53,3 @@ __local_syscall_error: \
#endif
#endif /* __ASSEMBLER __*/
-
-/* Pointer mangling is not yet supported for META. */
-#define PTR_MANGLE(var) (void) (var)
-#define PTR_DEMANGLE(var) (void) (var)
@@ -128,11 +128,5 @@ L(syse1):
# define SYSCALL_ERROR_LABEL 99b
#endif
-#else /* ! __ASSEMBLER__ */
-
-/* Pointer mangling is not yet supported for MIPS. */
-#define PTR_MANGLE(var) (void) (var)
-#define PTR_DEMANGLE(var) (void) (var)
-
#endif /* __ASSEMBLER__ */
#endif /* _LINUX_MIPS_SYSDEP_H */
@@ -226,30 +226,4 @@ extern void __illegally_sized_syscall_arg6(void);
# define ASM_INPUT_6 ASM_INPUT_5, "6" (r8)
#endif /* __ASSEMBLER__ */
-
-
-/* Pointer mangling support. */
-#if defined NOT_IN_libc && defined IS_IN_rtld
-/* We cannot use the thread descriptor because in ld.so we use setjmp
- earlier than the descriptor is initialized. */
-#else
-# ifdef __ASSEMBLER__
-# define PTR_MANGLE(reg, tmpreg) \
- lwz tmpreg,POINTER_GUARD(r2); \
- xor reg,tmpreg,reg
-# define PTR_MANGLE2(reg, tmpreg) \
- xor reg,tmpreg,reg
-# define PTR_MANGLE3(destreg, reg, tmpreg) \
- lwz tmpreg,POINTER_GUARD(r2); \
- xor destreg,tmpreg,reg
-# define PTR_DEMANGLE(reg, tmpreg) PTR_MANGLE (reg, tmpreg)
-# define PTR_DEMANGLE2(reg, tmpreg) PTR_MANGLE2 (reg, tmpreg)
-# define PTR_DEMANGLE3(destreg, reg, tmpreg) PTR_MANGLE3 (destreg, reg, tmpreg)
-# else
-# define PTR_MANGLE(var) \
- (var) = (__typeof (var)) ((uintptr_t) (var) ^ THREAD_GET_POINTER_GUARD ())
-# define PTR_DEMANGLE(var) PTR_MANGLE (var)
-# endif
-#endif
-
#endif /* _BITS_SYSCALLS_H */
@@ -42,34 +42,13 @@
ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME(name),function) \
.align ALIGNARG(5); \
C_LABEL(name) \
- cfi_startproc; \
- CALL_MCOUNT
+ cfi_startproc;
#undef END
#define END(name) \
cfi_endproc; \
ASM_SIZE_DIRECTIVE(C_SYMBOL_NAME(name))
-/* If compiled for profiling, call `mcount' at the start of each function. */
-#ifdef PROF
-#define CALL_MCOUNT \
- mov.l 1f,r1; \
- sts.l pr,@-r15; \
- cfi_adjust_cfa_offset (4); \
- cfi_rel_offset (pr, 0); \
- mova 2f,r0; \
- jmp @r1; \
- lds r0,pr; \
- .align 2; \
-1: .long mcount; \
-2: lds.l @r15+,pr; \
- cfi_adjust_cfa_offset (-4); \
- cfi_restore (pr)
-
-#else
-#define CALL_MCOUNT /* Do nothing. */
-#endif
-
#ifdef __UCLIBC_UNDERSCORES__
/* Since C identifiers are not normally prefixed with an underscore
on this system, the asm identifier `syscall_error' intrudes on the
@@ -271,23 +250,3 @@
1: .long SYS_ify (syscall_name); \
2:
#endif /* __ASSEMBLER__ */
-
-/* Pointer mangling support. */
-#if defined NOT_IN_libc && defined 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. */
-#else
-# ifdef __ASSEMBLER__
-# define PTR_MANGLE(reg, tmp) \
- stc gbr,tmp; mov.l @(POINTER_GUARD,tmp),tmp; xor tmp,reg
-# define PTR_MANGLE2(reg, tmp) xor tmp,reg
-# define PTR_DEMANGLE(reg, tmp) PTR_MANGLE (reg, tmp)
-# define PTR_DEMANGLE2(reg, tmp) PTR_MANGLE2 (reg, tmp)
-# else
-# define PTR_MANGLE(var) \
- (var) = (void *) ((uintptr_t) (var) ^ THREAD_GET_POINTER_GUARD ())
-# define PTR_DEMANGLE(var) PTR_MANGLE (var)
-# endif
-#endif
-
@@ -61,9 +61,4 @@ ENTRY(name); \
#endif /* __ASSEMBLER__ */
-
-/* Pointer mangling is not yet supported for SPARC. */
-#define PTR_MANGLE(var) (void) (var)
-#define PTR_DEMANGLE(var) (void) (var)
-
#endif
@@ -35,27 +35,21 @@ ENTRY (sched_getcpu)
movl $VGETCPU_CACHE_OFFSET, %edx
addq %fs:0, %rdx
-#ifdef SHARED
- movq __vdso_getcpu(%rip), %rax
- PTR_DEMANGLE (%rax)
- callq *%rax
-#else
-# ifdef __NR_getcpu
+#ifdef __NR_getcpu
movl $__NR_getcpu, %eax
syscall
-# ifndef __ASSUME_GETCPU_SYSCALL
+# ifndef __ASSUME_GETCPU_SYSCALL
cmpq $-ENOSYS, %rax
jne 1f
-# endif
# endif
-# ifndef __ASSUME_GETCPU_SYSCALL
+#endif
+#ifndef __ASSUME_GETCPU_SYSCALL
movq $VSYSCALL_ADDR_vgetcpu, %rax
callq *%rax
1:
-# else
-# ifndef __NR_getcpu
-# error "cannot happen"
-# endif
+#else
+# ifndef __NR_getcpu
+# error "cannot happen"
# endif
#endif
@@ -42,30 +42,13 @@
ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME(name),@function) \
.align ALIGNARG(4); \
C_LABEL(name) \
- cfi_startproc; \
- CALL_MCOUNT
+ cfi_startproc;
#undef END
#define END(name) \
cfi_endproc; \
ASM_SIZE_DIRECTIVE(name)
-/* If compiled for profiling, call `mcount' at the start of each function. */
-#ifdef PROF
-/* The mcount code relies on a normal frame pointer being on the stack
- to locate our caller, so push one just for its benefit. */
-#define CALL_MCOUNT \
- pushq %rbp; \
- cfi_adjust_cfa_offset(8); \
- movq %rsp, %rbp; \
- cfi_def_cfa_register(%rbp); \
- call JUMPTARGET(mcount); \
- popq %rbp; \
- cfi_def_cfa(rsp,8);
-#else
-#define CALL_MCOUNT /* Do nothing. */
-#endif
-
#ifdef NO_UNDERSCORES
/* Since C identifiers are not normally prefixed with an underscore
on this system, the asm identifier `syscall_error' intrudes on the
@@ -286,45 +269,4 @@ lose: \
# define DOARGS_6 DOARGS_5
#endif /* __ASSEMBLER__ */
-
-
-/* Pointer mangling support. */
-#if defined NOT_IN_libc && defined IS_IN_rtld
-/* We cannot use the thread descriptor because in ld.so we use setjmp
- earlier than the descriptor is initialized. */
-# ifdef __ASSEMBLER__
-# define PTR_MANGLE(reg) xorq __pointer_chk_guard_local(%rip), reg; \
- rolq $17, reg
-# define PTR_DEMANGLE(reg) rorq $17, reg; \
- xorq __pointer_chk_guard_local(%rip), reg
-# else
-# define PTR_MANGLE(reg) __asm__ ("xorq __pointer_chk_guard_local(%%rip), %0\n" \
- "rolq $17, %0" \
- : "=r" (reg) : "0" (reg))
-# define PTR_DEMANGLE(reg) __asm__ ("rorq $17, %0\n" \
- "xorq __pointer_chk_guard_local(%%rip), %0" \
- : "=r" (reg) : "0" (reg))
-# endif
-#else
-# ifdef __ASSEMBLER__
-# define PTR_MANGLE(reg) xorq %fs:POINTER_GUARD, reg; \
- rolq $17, reg
-# define PTR_DEMANGLE(reg) rorq $17, reg; \
- xorq %fs:POINTER_GUARD, reg
-# else
-# define PTR_MANGLE(var) __asm__ ("xorq %%fs:%c2, %0\n" \
- "rolq $17, %0" \
- : "=r" (var) \
- : "0" (var), \
- "i" (offsetof (tcbhead_t, \
- pointer_guard)))
-# define PTR_DEMANGLE(var) __asm__ ("rorq $17, %0\n" \
- "xorq %%fs:%c2, %0" \
- : "=r" (var) \
- : "0" (var), \
- "i" (offsetof (tcbhead_t, \
- pointer_guard)))
-# endif
-#endif
-
#endif /* linux/x86_64/sysdep.h */
@@ -45,8 +45,7 @@
.align ALIGNARG(2); \
LITERAL_POSITION; \
C_LABEL(name) \
- abi_entry(sp, FRAMESIZE); \
- CALL_MCOUNT
+ abi_entry(sp, FRAMESIZE);
#define HIDDEN_ENTRY(name) \
.globl C_SYMBOL_NAME(name); \
@@ -55,8 +54,7 @@
.align ALIGNARG(2); \
LITERAL_POSITION; \
C_LABEL(name) \
- abi_entry(sp, FRAMESIZE); \
- CALL_MCOUNT
+ abi_entry(sp, FRAMESIZE);
#undef END
#define END(name) ASM_SIZE_DIRECTIVE(name)
@@ -92,8 +90,6 @@
#error Unsupported Xtensa ABI
#endif
#endif
-#define CALL_MCOUNT /* Do nothing. */
-
/* Linux uses a negative return value to indicate syscall errors,
unlike most Unices, which use the condition codes' carry flag.
@@ -207,9 +203,4 @@
#endif /* _LIBC_REENTRANT */
#endif /* __ASSEMBLER__ */
-
-/* Pointer mangling is not yet supported for Xtensa. */
-#define PTR_MANGLE(var) (void) (var)
-#define PTR_DEMANGLE(var) (void) (var)
-
#endif /* _LINUX_XTENSA_SYSDEP_H */
@@ -102,15 +102,7 @@ struct pthread_functions
extern struct pthread_functions __libc_pthread_functions attribute_hidden;
extern int __libc_pthread_functions_init attribute_hidden;
-#if 0 /* def PTR_DEMANGLE */ /* we did not mangle, so do not demangle */
-# define PTHFCT_CALL(fct, params) \
- ({ __typeof (__libc_pthread_functions.fct) __p; \
- __p = __libc_pthread_functions.fct; \
- PTR_DEMANGLE (__p); \
- __p params; })
-#else
# define PTHFCT_CALL(fct, params) \
__libc_pthread_functions.fct params
-#endif
#endif /* pthread-functions.h */
@@ -70,13 +70,9 @@ pthread_cancel_init (void)
abort();
}
- PTR_MANGLE (resume);
libgcc_s_resume = resume;
- PTR_MANGLE (personality);
libgcc_s_personality = personality;
- PTR_MANGLE (forcedunwind);
libgcc_s_forcedunwind = forcedunwind;
- PTR_MANGLE (getcfa);
libgcc_s_getcfa = getcfa;
/* Make sure libgcc_s_handle is written last. Otherwise,
pthread_cancel_init might return early even when the pointer the
@@ -104,7 +100,6 @@ _Unwind_Resume (struct _Unwind_Exception *exc)
pthread_cancel_init ();
void (*resume) (struct _Unwind_Exception *exc) = libgcc_s_resume;
- PTR_DEMANGLE (resume);
resume (exc);
}
@@ -125,7 +120,6 @@ __gcc_personality_v0 (int version, _Unwind_Action actions,
_Unwind_Reason_Code (*personality)
(int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *,
struct _Unwind_Context *) = libgcc_s_personality;
- PTR_DEMANGLE (personality);
return personality (version, actions, exception_class, ue_header, context);
}
@@ -139,7 +133,6 @@ _Unwind_ForcedUnwind (struct _Unwind_Exception *exc, _Unwind_Stop_Fn stop,
_Unwind_Reason_Code (*forcedunwind)
(struct _Unwind_Exception *, _Unwind_Stop_Fn, void *)
= libgcc_s_forcedunwind;
- PTR_DEMANGLE (forcedunwind);
return forcedunwind (exc, stop, stop_argument);
}
@@ -150,6 +143,5 @@ _Unwind_GetCFA (struct _Unwind_Context *context)
pthread_cancel_init ();
_Unwind_Word (*getcfa) (struct _Unwind_Context *) = libgcc_s_getcfa;
- PTR_DEMANGLE (getcfa);
return getcfa (context);
}
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "uClibc-ng - small C library for embedded systems". The branch, master has been updated via 345181fb9a36ad18c0a40ccb74bff9ee4d03819b (commit) via a072066753e15c3a82bc32f89c1eef277af0b31e (commit) via 4458cc330e6e5b7369151ebe172c00faceb43ade (commit) from ff58e44fc38474b1898c59caf9a5e75d0d8c6c57 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 345181fb9a36ad18c0a40ccb74bff9ee4d03819b Author: Waldemar Brodkorb <wbx@uclibc-ng.org> Date: Mon Jul 11 16:59:22 2016 +0200 cleanup CALL_MCOUNT / PROF As this is only implemented for a few architecture and not well tested, just remove it. commit a072066753e15c3a82bc32f89c1eef277af0b31e Author: Waldemar Brodkorb <wbx@uclibc-ng.org> Date: Sun Jul 17 02:41:43 2016 +0200 x86_64: remove dead code, SHARED is not defined when compiling commit 4458cc330e6e5b7369151ebe172c00faceb43ade Author: Waldemar Brodkorb <wbx@uclibc-ng.org> Date: Fri Jul 8 16:01:41 2016 +0200 cleanup PTR_MANGLE/PTR_DEMANGLE support As this is only implemented for a few architecture and not well tested, just remove it. Reviewed-by: Max Filippov <jcmvbkbc@gmail.com> ----------------------------------------------------------------------- Summary of changes: libc/sysdeps/linux/arc/sysdep.h | 5 -- libc/sysdeps/linux/arm/sysdep.h | 18 +------ libc/sysdeps/linux/i386/sysdep.h | 45 +--------------- libc/sysdeps/linux/ia64/sysdep.h | 8 +-- libc/sysdeps/linux/metag/sysdep.h | 4 -- libc/sysdeps/linux/mips/sysdep.h | 6 --- libc/sysdeps/linux/powerpc/bits/syscalls.h | 26 ---------- libc/sysdeps/linux/sh/sysdep.h | 43 +--------------- libc/sysdeps/linux/sparc/sysdep.h | 5 -- libc/sysdeps/linux/x86_64/sched_getcpu.S | 20 +++----- libc/sysdeps/linux/x86_64/sysdep.h | 60 +--------------------- libc/sysdeps/linux/xtensa/sysdep.h | 13 +---- .../nptl/sysdeps/pthread/pthread-functions.h | 8 --- .../nptl/sysdeps/pthread/unwind-forcedunwind.c | 8 --- 14 files changed, 15 insertions(+), 254 deletions(-) hooks/post-receive