Commit c51e3a417bb0f295e13a5bad86302b5212eafdf3

Authored by Paul Mackerras
1 parent 5ad5707861

powerpc: Fix vmlinux.lds.S for 32-bit

We can't currently use asm-ppc/page.h in vmlinux.lds.S, so until
we have a merged page.h, define PAGE_SIZE and KERNELBASE locally.
Also gets rid of some dynamic executable cruft that we had for
32-bit.  With -Ttext=$(KERNELBASE) this didn't cause any problem,
but when we changed to putting . = KERNELBASE in the vmlinux.lds.S
this cruft caused the text to get linked at 0xa0 instead of
0xc0000000.  Oops.

Signed-off-by: Paul Mackerras <paulus@samba.org>

Showing 1 changed file with 5 additions and 25 deletions Side-by-side Diff

arch/powerpc/kernel/vmlinux.lds.S
1 1 #include <linux/config.h>
  2 +#ifdef CONFIG_PPC64
2 3 #include <asm/page.h>
  4 +#else
  5 +#define PAGE_SIZE 4096
  6 +#define KERNELBASE CONFIG_KERNEL_START
  7 +#endif
3 8 #include <asm-generic/vmlinux.lds.h>
4 9  
5 10 ENTRY(_stext)
... ... @@ -22,31 +27,6 @@
22 27 . = KERNELBASE;
23 28  
24 29 /* Read-only sections, merged into text segment: */
25   -#ifdef CONFIG_PPC32
26   - . = + SIZEOF_HEADERS;
27   - .interp : { *(.interp) }
28   - .hash : { *(.hash) }
29   - .dynsym : { *(.dynsym) }
30   - .dynstr : { *(.dynstr) }
31   - .rel.text : { *(.rel.text) }
32   - .rela.text : { *(.rela.text) }
33   - .rel.data : { *(.rel.data) }
34   - .rela.data : { *(.rela.data) }
35   - .rel.rodata : { *(.rel.rodata) }
36   - .rela.rodata : { *(.rela.rodata) }
37   - .rel.got : { *(.rel.got) }
38   - .rela.got : { *(.rela.got) }
39   - .rel.ctors : { *(.rel.ctors) }
40   - .rela.ctors : { *(.rela.ctors) }
41   - .rel.dtors : { *(.rel.dtors) }
42   - .rela.dtors : { *(.rela.dtors) }
43   - .rel.bss : { *(.rel.bss) }
44   - .rela.bss : { *(.rela.bss) }
45   - .rel.plt : { *(.rel.plt) }
46   - .rela.plt : { *(.rela.plt) }
47   -/* .init : { *(.init) } =0*/
48   - .plt : { *(.plt) }
49   -#endif
50 30 .text : {
51 31 *(.text .text.*)
52 32 SCHED_TEXT