[PATCH 09/21] lto: Use C version for SYSCALL_ALIAS
From: Andi Kleen
Date: Mon Nov 27 2017 - 16:38:54 EST
From: Andi Kleen <ak@xxxxxxxxxxxxxxx>
LTO doesn't like the assembler aliasing used for SYSCALL_ALIAS.
Replace it with C aliasing. Also mark the only user visible.
Signed-off-by: Andi Kleen <ak@xxxxxxxxxxxxxxx>
---
include/linux/linkage.h | 6 ++----
kernel/time/posix-stubs.c | 2 +-
2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/include/linux/linkage.h b/include/linux/linkage.h
index f68db9e450eb..24fb6468b1a5 100644
--- a/include/linux/linkage.h
+++ b/include/linux/linkage.h
@@ -30,10 +30,8 @@
#endif
#ifndef SYSCALL_ALIAS
-#define SYSCALL_ALIAS(alias, name) asm( \
- ".globl " VMLINUX_SYMBOL_STR(alias) "\n\t" \
- ".set " VMLINUX_SYMBOL_STR(alias) "," \
- VMLINUX_SYMBOL_STR(name))
+#define SYSCALL_ALIAS(a, name) \
+ __visible typeof(a) a __attribute__((alias(__stringify(name))))
#endif
#define __page_aligned_data __section(.data..page_aligned) __aligned(PAGE_SIZE)
diff --git a/kernel/time/posix-stubs.c b/kernel/time/posix-stubs.c
index b258bee13b02..5e36cb75f3be 100644
--- a/kernel/time/posix-stubs.c
+++ b/kernel/time/posix-stubs.c
@@ -19,7 +19,7 @@
#include <linux/posix-timers.h>
#include <linux/compat.h>
-asmlinkage long sys_ni_posix_timers(void)
+__visible asmlinkage long sys_ni_posix_timers(void)
{
pr_err_once("process %d (%s) attempted a POSIX timer syscall "
"while CONFIG_POSIX_TIMERS is not set\n",
--
2.13.6