5xx: Cleanup for partial linking and --gc-sections

Signed-off-by: Wolfgang Denk <wd@denx.de>
Acked-by: Stefan Roese <sr@denx.de>
This commit is contained in:
Wolfgang Denk 2010-11-22 22:44:01 +01:00
parent cd0402a730
commit 53f378fea4
2 changed files with 17 additions and 53 deletions

View File

@ -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)
}
}

View File

@ -62,6 +62,7 @@
#include <config_cmd_default.h>
#undef CONFIG_CMD_NET /* disabeled - causes compile errors */
#undef CONFIG_CMD_NFS
#define CONFIG_CMD_MEMORY
#define CONFIG_CMD_LOADB