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>
sections: Make all standard section identifiers __visible

Signed-off-by: Andi Kleen <ak@linux.intel.com>
sections: Make external kallsyms tables __visible v2

v2: More consistent style (Jan Beulich)
Signed-off-by: Andi Kleen <ak@linux.intel.com>
sections: Add __visible to ia64 sections

Signed-off-by: Andi Kleen <ak@linux.intel.com>
sections: Add __visible to m68k sections

Signed-off-by: Andi Kleen <ak@linux.intel.com>
sections: Add __visible to powerpc sections

Signed-off-by: Andi Kleen <ak@linux.intel.com>
sections: Add __visible to sh sections

Signed-off-by: Andi Kleen <ak@linux.intel.com>
sections: Add __visible to tile sections

Signed-off-by: Andi Kleen <ak@linux.intel.com>
sections: Add __visible to x86 sections

Signed-off-by: Andi Kleen <ak@linux.intel.com>
sections: Add __visible to drivers/{base,pci} sections

Signed-off-by: Andi Kleen <ak@linux.intel.com>
sections: Add __visible to rapidio sections

Signed-off-by: Andi Kleen <ak@linux.intel.com>
sections: Add __visible to jump_label sections

Signed-off-by: Andi Kleen <ak@linux.intel.com>
sections: Add __visible to init/* sections

Signed-off-by: Andi Kleen <ak@linux.intel.com>
sections: Add __visible to kernel/* sections

Signed-off-by: Andi Kleen <ak@linux.intel.com>
sections: Add __visible to kernel/trace/* sections

Signed-off-by: Andi Kleen <ak@linux.intel.com>
sections: Add __visible to lib/* sections

Signed-off-by: Andi Kleen <ak@linux.intel.com>
lto: Make asmlinkage __visible

Signed-off-by: Andi Kleen <ak@linux.intel.com>
lto, wan/sbni: Make inline assembler symbols visible and assembler global

- Inline assembler defining C callable code has to be global
- The function has to be visible

Do this in wan/sbni

Signed-off-by: Andi Kleen <ak@linux.intel.com>
x86, lto: Add missing asmlinkages and __visible

This is an arch/x86 sweep to add asmlinkage or __visible
to all functions accessed by assembler code. A lot of
functions already had it, but not all.

This is needed for the LTO kernel so that these functions are
not optimized away.

I used asmlinkage for functions without arguments, and __visible
for functions with. This prevents any problems on x86-32 with
asmlinkage changing the calling convention to regparm(0)

I kept it all in a single patch for now. Please let me know
if you want it split up.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
x86, lto: Change dotraplinkage into __visible on 32bit v2

Mark 32bit dotraplinkage functions as __visible for LTO.
64bit already is using asmlinkage which includes it.

v2: Clean up (M.Marek)
Signed-off-by: Andi Kleen <ak@linux.intel.com>