vmlinux.lds: fix .data..init_task output section (fix popwerpc boot)
authorSam Ravnborg <sam@ravnborg.org>
Tue, 13 Jul 2010 09:39:42 +0000 (11:39 +0200)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Fri, 23 Jul 2010 03:45:12 +0000 (13:45 +1000)
The .data..init_task output section was missing
a load offset causing a popwerpc target to fail to boot.

Sean MacLennan tracked it down to the definition of
INIT_TASK_DATA_SECTION().

There are only two users of INIT_TASK_DATA_SECTION()
in the kernel today: cris and popwerpc.
cris do not support relocatable kernels and is thus not
impacted by this change.

Fix INIT_TASK_DATA_SECTION() to specify load offset like
all other output sections.

Reported-by: Sean MacLennan <smaclennan@pikatech.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
include/asm-generic/vmlinux.lds.h

index 48c5299cbf26e796e3188f397faa96cd3889a112..cdfff74e973934f43918deb3058b087a02954023 100644 (file)
  */
 #define INIT_TASK_DATA_SECTION(align)                                  \
        . = ALIGN(align);                                               \
-       .data..init_task : {                                            \
+       .data..init_task :  AT(ADDR(.data..init_task) - LOAD_OFFSET) {  \
                INIT_TASK_DATA(align)                                   \
        }