Tejun Heo 3ac6cffea4 linker script: use separate simpler definition for PERCPU()
Impact: fix linker screwup on x86_32

Recent x86_64 zerobased patches introduced PERCPU_VADDR() to put
.data.percpu to a predefined address and re-defined PERCPU() in terms
of it.  The new macro defined one extra symbol, __per_cpu_load, for
LMA of the section so that the init data could be accessed.  This new
symbol introduced the following problems to x86_32.

1. If __per_cpu_load is defined outside of .data.percpu as an absolute
   symbol, relocation generation for relocatable kernel fails due to
   absolute relocation.

2. If __per_cpu_load is put inside .data.percpu with absolute address
   assignment to work around #1, linker gets confused and under
   certain configurations ends up relocating the symbol against
   .data.percpu such that the load address gets added on top of
   already set load address.

As x86_32 doesn't use predefined address for .data.percpu, there's no
need for it to care about the possibility of __per_cpu_load being
different from __per_cpu_start.

This patch defines PERCPU() separately so that __per_cpu_load is
defined inside .data.percpu so that everything is ordinary
linking-wise.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-01-30 23:27:46 +01:00
..
2008-02-06 10:41:00 -08:00
2008-05-01 08:03:58 -07:00
2005-04-16 15:20:36 -07:00
2007-07-16 09:05:45 -07:00
2008-10-16 11:21:40 -07:00
2005-04-16 15:20:36 -07:00
2008-08-12 16:07:31 -07:00
2008-05-02 16:18:19 -07:00
2005-09-08 14:57:25 -07:00
2007-05-11 08:29:34 -07:00
2009-01-15 16:39:40 -08:00
2008-09-05 14:39:38 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00