From 53f378fea46e647b076e319738faf46432f65e0a Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Mon, 22 Nov 2010 22:44:01 +0100 Subject: [PATCH] 5xx: Cleanup for partial linking and --gc-sections Signed-off-by: Wolfgang Denk Acked-by: Stefan Roese --- arch/powerpc/cpu/mpc5xx/u-boot.lds | 69 +++++++----------------------- include/configs/cmi_mpc5xx.h | 1 + 2 files changed, 17 insertions(+), 53 deletions(-) diff --git a/arch/powerpc/cpu/mpc5xx/u-boot.lds b/arch/powerpc/cpu/mpc5xx/u-boot.lds index d5e5dc1787..b7fd4bc3a7 100644 --- a/arch/powerpc/cpu/mpc5xx/u-boot.lds +++ b/arch/powerpc/cpu/mpc5xx/u-boot.lds @@ -1,5 +1,5 @@ /* - * (C) Copyright 2001 Wolfgang Denk, DENX Software Engineering, wd@denx.de + * (C) Copyright 2001-2010 Wolfgang Denk, DENX Software Engineering, wd@denx.de * (C) Copyright 2003 Martin Winistoerfer, martinwinistoerfer@gmx.ch * * See file CREDITS for list of people who contributed to this @@ -22,54 +22,23 @@ */ OUTPUT_ARCH(powerpc) -/* Do we need any of these for elf? - __DYNAMIC = 0; */ + SECTIONS { /* 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 : { - /* WARNING - the following is hand-optimized to fit within */ - /* the sector layout of our flash chips! XXX FIXME XXX */ - - arch/powerpc/cpu/mpc5xx/start.o (.text) + arch/powerpc/cpu/mpc5xx/start.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: */ . = (. + 0x00FF) & 0xFFFFFF00; @@ -77,23 +46,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 = .); @@ -119,19 +84,17 @@ SECTIONS __bss_start = .; .bss (NOLOAD) : { - *(.sbss) *(.scommon) - *(.dynbss) - *(.bss) + *(.bss*) + *(.sbss*) *(COMMON) . = ALIGN(4); } _end = . ; PROVIDE (end = .); -/* . = env_start; - .ppcenv : - { - common/env_embedded.o (.ppcenv) - } -*/ + . = env_start; + .ppcenv : + { + common/env_embedded.o (.ppcenv) + } } diff --git a/include/configs/cmi_mpc5xx.h b/include/configs/cmi_mpc5xx.h index 198f3423e8..329e4e3601 100644 --- a/include/configs/cmi_mpc5xx.h +++ b/include/configs/cmi_mpc5xx.h @@ -62,6 +62,7 @@ #include #undef CONFIG_CMD_NET /* disabeled - causes compile errors */ +#undef CONFIG_CMD_NFS #define CONFIG_CMD_MEMORY #define CONFIG_CMD_LOADB -- 2.25.1