Fix broken symbols - this allows us to boot on i686 again!

This commit is contained in:
Thomas Bächler 2014-01-26 08:54:46 +00:00
parent 52d7fbc897
commit d435b565ea
2 changed files with 75 additions and 2 deletions

View File

@ -0,0 +1,68 @@
From 83460ec8dcac14142e7860a01fa59c267ac4657c Mon Sep 17 00:00:00 2001
From: Andi Kleen <ak@linux.intel.com>
Date: Tue, 12 Nov 2013 15:08:36 -0800
Subject: [PATCH] syscalls.h: use gcc alias instead of assembler aliases for
syscalls
Use standard gcc __attribute__((alias(foo))) to define the syscall aliases
instead of custom assembler macros.
This is far cleaner, and also fixes my LTO kernel build.
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
---
include/linux/compat.h | 4 ++--
include/linux/syscalls.h | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/include/linux/compat.h b/include/linux/compat.h
index 345da00..ada34c9 100644
--- a/include/linux/compat.h
+++ b/include/linux/compat.h
@@ -41,14 +41,14 @@
COMPAT_SYSCALL_DEFINEx(6, _##name, __VA_ARGS__)
#define COMPAT_SYSCALL_DEFINEx(x, name, ...) \
- asmlinkage long compat_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__));\
+ asmlinkage long compat_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__))\
+ __attribute__((alias(__stringify(compat_SyS##name)))); \
static inline long C_SYSC##name(__MAP(x,__SC_DECL,__VA_ARGS__));\
asmlinkage long compat_SyS##name(__MAP(x,__SC_LONG,__VA_ARGS__));\
asmlinkage long compat_SyS##name(__MAP(x,__SC_LONG,__VA_ARGS__))\
{ \
return C_SYSC##name(__MAP(x,__SC_DELOUSE,__VA_ARGS__)); \
} \
- SYSCALL_ALIAS(compat_sys##name, compat_SyS##name); \
static inline long C_SYSC##name(__MAP(x,__SC_DECL,__VA_ARGS__))
#ifndef compat_user_stack_pointer
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
index 7fac04e..c27f846 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -184,7 +184,8 @@ extern struct trace_event_functions exit_syscall_print_funcs;
#define __PROTECT(...) asmlinkage_protect(__VA_ARGS__)
#define __SYSCALL_DEFINEx(x, name, ...) \
- asmlinkage long sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)); \
+ asmlinkage long sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) \
+ __attribute__((alias(__stringify(SyS##name)))); \
static inline long SYSC##name(__MAP(x,__SC_DECL,__VA_ARGS__)); \
asmlinkage long SyS##name(__MAP(x,__SC_LONG,__VA_ARGS__)); \
asmlinkage long SyS##name(__MAP(x,__SC_LONG,__VA_ARGS__)) \
@@ -194,7 +195,6 @@ extern struct trace_event_functions exit_syscall_print_funcs;
__PROTECT(x, ret,__MAP(x,__SC_ARGS,__VA_ARGS__)); \
return ret; \
} \
- SYSCALL_ALIAS(sys##name, SyS##name); \
static inline long SYSC##name(__MAP(x,__SC_DECL,__VA_ARGS__))
asmlinkage long sys_time(time_t __user *tloc);
--
1.8.5.3

View File

@ -24,7 +24,8 @@ source=("http://www.kernel.org/pub/linux/kernel/v3.x/${_srcname}.tar.xz"
'0003-nfs-check-if-gssd-is-running-before-attempting-to-us.patch' '0003-nfs-check-if-gssd-is-running-before-attempting-to-us.patch'
'0004-rpc_pipe-remove-the-clntXX-dir-if-creating-the-pipe-.patch' '0004-rpc_pipe-remove-the-clntXX-dir-if-creating-the-pipe-.patch'
'0005-sunrpc-add-an-info-file-for-the-dummy-gssd-pipe.patch' '0005-sunrpc-add-an-info-file-for-the-dummy-gssd-pipe.patch'
'0006-rpc_pipe-fix-cleanup-of-dummy-gssd-directory-when-no.patch') '0006-rpc_pipe-fix-cleanup-of-dummy-gssd-directory-when-no.patch'
'0001-syscalls.h-use-gcc-alias-instead-of-assembler-aliase.patch')
md5sums=('0ecbaf65c00374eb4a826c2f9f37606f' md5sums=('0ecbaf65c00374eb4a826c2f9f37606f'
'ba4468d313adfaf22368add7f58204aa' 'ba4468d313adfaf22368add7f58204aa'
'035bb27dac306f5c028d96cad14bb249' '035bb27dac306f5c028d96cad14bb249'
@ -36,7 +37,8 @@ md5sums=('0ecbaf65c00374eb4a826c2f9f37606f'
'7cbd2349cdf046acc37b652c06ba36be' '7cbd2349cdf046acc37b652c06ba36be'
'10dbaf863e22b2437e68f9190d65c861' '10dbaf863e22b2437e68f9190d65c861'
'd5907a721b97299f0685c583499f7820' 'd5907a721b97299f0685c583499f7820'
'a724515b350b29c53f20e631c6cf9a14') 'a724515b350b29c53f20e631c6cf9a14'
'e6fa278c092ad83780e2dd0568e24ca6')
_kernelname=${pkgbase#linux} _kernelname=${pkgbase#linux}
@ -77,6 +79,9 @@ prepare() {
# http://git.linux-nfs.org/?p=trondmy/linux-nfs.git;a=commitdiff;h=23e66ba97127ff3b064d4c6c5138aa34eafc492f # http://git.linux-nfs.org/?p=trondmy/linux-nfs.git;a=commitdiff;h=23e66ba97127ff3b064d4c6c5138aa34eafc492f
patch -p1 -i "${srcdir}/0006-rpc_pipe-fix-cleanup-of-dummy-gssd-directory-when-no.patch" patch -p1 -i "${srcdir}/0006-rpc_pipe-fix-cleanup-of-dummy-gssd-directory-when-no.patch"
# Fix symbols: Revert http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=83460ec8dcac14142e7860a01fa59c267ac4657c
patch -Rp1 -i "${srcdir}/0001-syscalls.h-use-gcc-alias-instead-of-assembler-aliase.patch"
if [ "${CARCH}" = "x86_64" ]; then if [ "${CARCH}" = "x86_64" ]; then
cat "${srcdir}/config.x86_64" > ./.config cat "${srcdir}/config.x86_64" > ./.config
else else