Add __visible

gcc 4.6+ has support for a externally_visible attribute, that prevents
the optimizer from optimizing unused symbols away. Add a __visible macro
to use it with that compiler version or later.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
make EXPORT_SYMBOL visible
Kbuild: Implement LTO/WHOPR support for gcc 4.6

TBD: documentation, other

Signed-off-by: Andi Kleen <ak@linux.intel.com>
add stubs for early link reference problem
visible for vsyscall symbols
make asmlinkage visible
x86: Make various variables used by assembler code __visible

Signed-off-by: Andi Kleen <ak@linux.intel.com>
disable LTO for sys_ni to work around alias bugs
make functions used by vsyscall init visible
use real call for sched_clock
disable hweight options for lto
mutex: use asmlinkage properly

Various kernel/mutex.c functions can be called from
inline assembler, so they should be all global asmlinkage.

This also allows dropping some __useds

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Mark do_exit asmlinkage

... since it can be called from assembler code

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Change kernel_execve to asmlinkage for all architectures

The x86 kernel_execve has to be asmlinkage because it's called from
assembler code. To make it consistent I have to also change
the prototype in linux/syscalls.h

This in turn requires adding asmlinkage to all architectures.

Do this here in a tree sweep.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
make memmove obj-y
add __exitconstdata
tree sweep: initconst 2.6.39-rc6
add visible to vsyscall and make not static
kprobes fixes
x86: Use inline assembler instead of global register variable to get sp

LTO in gcc 4.6/47. has trouble with global register variables. They were used
to read the stack pointer. Use a simple inline assembler statement instead.

I verified this generates the same binary (on 64bit) as the original
register variable.

Signed-off-by: Andi Kleen <ak@linux.intel.com>