From ee8028b7f108bd049eb389f01b590be0b75adaf6 Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Sun, 21 Nov 2010 20:55:42 +0100 Subject: ppc4xx: Cleanup for partial linking and --gc-sections This commit adapts 4xx boards for partial linking with --gc-sections. Signed-off-by: Stefan Roese Signed-off-by: Wolfgang Denk Cc: Stefan Roese Cc: Tirumala Marri Cc: David Updegraff Cc: Matthias Fuchs Cc: Dirk Eibach Cc: Larry Johnson Cc: Peter De Schrijver Cc: Niklaus Giger Cc: Daniel Poirot Acked-by: Stefan Roese --- board/esd/dasa_sim/u-boot.lds | 57 +++++++++---------------------------------- 1 file changed, 12 insertions(+), 45 deletions(-) (limited to 'board/esd/dasa_sim/u-boot.lds') diff --git a/board/esd/dasa_sim/u-boot.lds b/board/esd/dasa_sim/u-boot.lds index 0e1d625a1b..3349fe8d40 100644 --- a/board/esd/dasa_sim/u-boot.lds +++ b/board/esd/dasa_sim/u-boot.lds @@ -22,59 +22,31 @@ */ OUTPUT_ARCH(powerpc) -/* Do we need any of these for elf? - __DYNAMIC = 0; */ + SECTIONS { .resetvec 0xFFFFFFFC : { - *(.resetvec) + KEEP(*(.resetvec)) } = 0xffff /* Read-only sections, merged into text segment: */ . = + SIZEOF_HEADERS; - .interp : { *(.interp) } - .hash : { *(.hash) } - .dynsym : { *(.dynsym) } - .dynstr : { *(.dynstr) } - .rel.text : { *(.rel.text) } - .rela.text : { *(.rela.text) } - .rel.data : { *(.rel.data) } - .rela.data : { *(.rela.data) } - .rel.rodata : { *(.rel.rodata) } - .rela.rodata : { *(.rela.rodata) } - .rel.got : { *(.rel.got) } - .rela.got : { *(.rela.got) } - .rel.ctors : { *(.rel.ctors) } - .rela.ctors : { *(.rela.ctors) } - .rel.dtors : { *(.rel.dtors) } - .rela.dtors : { *(.rela.dtors) } - .rel.bss : { *(.rel.bss) } - .rela.bss : { *(.rela.bss) } - .rel.plt : { *(.rel.plt) } - .rela.plt : { *(.rela.plt) } - .init : { *(.init) } - .plt : { *(.plt) } .text : { - arch/powerpc/cpu/ppc4xx/start.o (.text) + arch/powerpc/cpu/ppc4xx/start.o (.text) . = env_offset; - common/env_embedded.o(.text) + common/env_embedded.o (.text*) - *(.text) - *(.got1) + *(.text*) } _etext = .; PROVIDE (etext = .); .rodata : { - *(.eh_frame) *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) } - .fini : { *(.fini) } =0 - .ctors : { *(.ctors) } - .dtors : { *(.dtors) } /* Read-write section, merged into data segment: */ . = (. + 0x0FFF) & 0xFFFFF000; @@ -82,23 +54,19 @@ SECTIONS PROVIDE (erotext = .); .reloc : { - *(.got) + KEEP(*(.got)) _GOT2_TABLE_ = .; - *(.got2) + KEEP(*(.got2)) _FIXUP_TABLE_ = .; - *(.fixup) + KEEP(*(.fixup)) } __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2; __fixup_entries = (. - _FIXUP_TABLE_)>>2; .data : { - *(.data) - *(.data1) - *(.sdata) - *(.sdata2) - *(.dynamic) - CONSTRUCTORS + *(.data*) + *(.sdata*) } _edata = .; PROVIDE (edata = .); @@ -124,9 +92,8 @@ SECTIONS __bss_start = .; .bss (NOLOAD) : { - *(.sbss) *(.scommon) - *(.dynbss) - *(.bss) + *(.bss*) + *(.sbss*) *(COMMON) . = ALIGN(4); } -- cgit v1.2.3