Skip to content
Snippets Groups Projects
Commit 53f378fe authored by Wolfgang Denk's avatar Wolfgang Denk
Browse files

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


Signed-off-by: default avatarWolfgang Denk <wd@denx.de>
Acked-by: default avatarStefan Roese <sr@denx.de>
parent cd0402a7
No related branches found
No related tags found
No related merge requests found
/* /*
* (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 * (C) Copyright 2003 Martin Winistoerfer, martinwinistoerfer@gmx.ch
* *
* See file CREDITS for list of people who contributed to this * See file CREDITS for list of people who contributed to this
...@@ -22,54 +22,23 @@ ...@@ -22,54 +22,23 @@
*/ */
OUTPUT_ARCH(powerpc) OUTPUT_ARCH(powerpc)
/* Do we need any of these for elf?
__DYNAMIC = 0; */
SECTIONS SECTIONS
{ {
/* Read-only sections, merged into text segment: */ /* Read-only sections, merged into text segment: */
. = + SIZEOF_HEADERS; . = + 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 : .text :
{ {
/* WARNING - the following is hand-optimized to fit within */ arch/powerpc/cpu/mpc5xx/start.o (.text*)
/* the sector layout of our flash chips! XXX FIXME XXX */
arch/powerpc/cpu/mpc5xx/start.o (.text)
*(.text) *(.text*)
*(.got1)
} }
_etext = .; _etext = .;
PROVIDE (etext = .); PROVIDE (etext = .);
.rodata : .rodata :
{ {
*(.eh_frame)
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
} }
.fini : { *(.fini) } =0
.ctors : { *(.ctors) }
.dtors : { *(.dtors) }
/* Read-write section, merged into data segment: */ /* Read-write section, merged into data segment: */
. = (. + 0x00FF) & 0xFFFFFF00; . = (. + 0x00FF) & 0xFFFFFF00;
...@@ -77,23 +46,19 @@ SECTIONS ...@@ -77,23 +46,19 @@ SECTIONS
PROVIDE (erotext = .); PROVIDE (erotext = .);
.reloc : .reloc :
{ {
*(.got) KEEP(*(.got))
_GOT2_TABLE_ = .; _GOT2_TABLE_ = .;
*(.got2) KEEP(*(.got2))
_FIXUP_TABLE_ = .; _FIXUP_TABLE_ = .;
*(.fixup) KEEP(*(.fixup))
} }
__got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2; __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2;
__fixup_entries = (. - _FIXUP_TABLE_)>>2; __fixup_entries = (. - _FIXUP_TABLE_)>>2;
.data : .data :
{ {
*(.data) *(.data*)
*(.data1) *(.sdata*)
*(.sdata)
*(.sdata2)
*(.dynamic)
CONSTRUCTORS
} }
_edata = .; _edata = .;
PROVIDE (edata = .); PROVIDE (edata = .);
...@@ -119,19 +84,17 @@ SECTIONS ...@@ -119,19 +84,17 @@ SECTIONS
__bss_start = .; __bss_start = .;
.bss (NOLOAD) : .bss (NOLOAD) :
{ {
*(.sbss) *(.scommon) *(.bss*)
*(.dynbss) *(.sbss*)
*(.bss)
*(COMMON) *(COMMON)
. = ALIGN(4); . = ALIGN(4);
} }
_end = . ; _end = . ;
PROVIDE (end = .); PROVIDE (end = .);
/* . = env_start; . = env_start;
.ppcenv : .ppcenv :
{ {
common/env_embedded.o (.ppcenv) common/env_embedded.o (.ppcenv)
} }
*/
} }
...@@ -62,6 +62,7 @@ ...@@ -62,6 +62,7 @@
#include <config_cmd_default.h> #include <config_cmd_default.h>
#undef CONFIG_CMD_NET /* disabeled - causes compile errors */ #undef CONFIG_CMD_NET /* disabeled - causes compile errors */
#undef CONFIG_CMD_NFS
#define CONFIG_CMD_MEMORY #define CONFIG_CMD_MEMORY
#define CONFIG_CMD_LOADB #define CONFIG_CMD_LOADB
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment