android_kernel_oneplus_msm8998/arch/x86/um
Florian Fainelli 53025e7f56 um: Avoid longjmp/setjmp symbol clashes with libpthread.a
[ Upstream commit f44f1e7da7c8e3f4575d5d61c4df978496903fcc ]

Building a statically linked UML kernel on a Centos 6.9 host resulted in
the following linking failure (GCC 4.4, glibc-2.12):

/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libpthread.a(libpthread.o):
In function `siglongjmp':
(.text+0x8490): multiple definition of `longjmp'
arch/x86/um/built-in.o:/local/users/fainelli/openwrt/trunk/build_dir/target-x86_64_musl/linux-uml/linux-4.4.69/arch/x86/um/setjmp_64.S:44:
first defined here
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libpthread.a(libpthread.o):
In function `sem_open':
(.text+0x77cd): warning: the use of `mktemp' is dangerous, better use
`mkstemp'
collect2: ld returned 1 exit status
make[4]: *** [vmlinux] Error 1

Adopt a solution similar to the one done for vmap where we define
longjmp/setjmp to be kernel_longjmp/setjmp. In the process, make sure we
do rename the functions in arch/x86/um/setjmp_*.S accordingly.

Fixes: a7df4716d195 ("um: link with -lpthread")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2018-11-10 07:41:35 -08:00
..
asm x86/cpufeature: Carve out X86_FEATURE_* 2018-07-17 11:31:44 +02:00
os-Linux
shared/sysdep um: Stop abusing __KERNEL__ 2015-05-31 22:05:32 +02:00
vdso um: Add asm/elf.h to vma.c 2015-05-31 17:31:50 +02:00
bug.c
bugs_32.c
bugs_64.c
checksum_32.S
delay.c
elfcore.c
fault.c
Kconfig
ksyms.c
ldt.c x86/entry: Use SYSCALL_DEFINE() macros for sys_modify_ldt() 2017-12-09 18:42:40 +01:00
Makefile x86/asm/entry: Move the 'thunk' functions to arch/x86/entry/ 2015-06-04 07:37:33 +02:00
mem_32.c um: Cleanup mem_32/64.c headers 2015-05-31 17:31:42 +02:00
mem_64.c um: Cleanup mem_32/64.c headers 2015-05-31 17:31:42 +02:00
ptrace_32.c um: Don't pollute kernel namespace with uapi 2015-06-25 22:44:11 +02:00
ptrace_64.c um: Fix PTRACE_POKEUSER on x86_64 2017-05-20 14:27:00 +02:00
ptrace_user.c
setjmp_32.S um: Avoid longjmp/setjmp symbol clashes with libpthread.a 2018-11-10 07:41:35 -08:00
setjmp_64.S um: Avoid longjmp/setjmp symbol clashes with libpthread.a 2018-11-10 07:41:35 -08:00
signal.c um: Fix pointer cast 2015-12-22 15:31:51 -08:00
stub_32.S um: Remove dead symbol from i386 syscall stub 2015-11-06 22:49:11 +01:00
stub_64.S um: Simplify STUB_DATA loading 2015-11-06 22:49:11 +01:00
stub_segv.c um: Use POSIX ucontext_t instead of struct ucontext 2018-04-24 09:32:08 +02:00
sys_call_table_32.c x86/syscalls: Give sys_call_ptr_t a useful type 2015-10-09 09:41:08 +02:00
sys_call_table_64.c x86/syscalls: Give sys_call_ptr_t a useful type 2015-10-09 09:41:08 +02:00
syscalls_64.c um: Add uaccess.h to syscalls_64.c 2015-05-31 17:31:56 +02:00
sysrq_32.c
sysrq_64.c
tls_32.c um: Don't pollute kernel namespace with uapi 2015-06-25 22:44:11 +02:00
tls_64.c um: Don't pollute kernel namespace with uapi 2015-06-25 22:44:11 +02:00
user-offsets.c