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

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Kim Phillips <kim.phillips@freescale.com>
Cc: Haiying Wang <r54964@freescale.com>
This commit is contained in:
Wolfgang Denk 2010-11-25 12:15:34 +01:00
parent c5d02825ae
commit ff2311ab5d
3 changed files with 18 additions and 49 deletions

View File

@ -1,5 +1,5 @@
/* /*
* (C) Copyright 2006 * (C) Copyright 2006-2010
* Wolfgang Denk, DENX Software Engineering, wd@denx.de. * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
* *
* See file CREDITS for list of people who contributed to this * See file CREDITS for list of people who contributed to this
@ -25,41 +25,13 @@ OUTPUT_ARCH(powerpc)
SECTIONS SECTIONS
{ {
/* Read-only sections, merged into text segment: */ /* 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 : .text :
{ {
arch/powerpc/cpu/mpc83xx/start.o (.text) arch/powerpc/cpu/mpc83xx/start.o (.text*)
*(.text) *(.text*)
*(.got1)
. = ALIGN(16); . = ALIGN(16);
*(.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: */
. = (. + 0x0FFF) & 0xFFFFF000; . = (. + 0x0FFF) & 0xFFFFF000;
@ -67,23 +39,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 = .);
@ -109,9 +77,8 @@ SECTIONS
__bss_start = .; __bss_start = .;
.bss (NOLOAD) : .bss (NOLOAD) :
{ {
*(.sbss) *(.scommon) *(.bss*)
*(.dynbss) *(.sbss*)
*(.bss)
*(COMMON) *(COMMON)
. = ALIGN(4); . = ALIGN(4);
} }

View File

@ -30,7 +30,6 @@ SECTIONS
.text : { .text : {
*(.text*) *(.text*)
. = ALIGN(16); . = ALIGN(16);
*(.eh_frame)
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
} }
@ -39,13 +38,15 @@ SECTIONS
*(.data*) *(.data*)
*(.sdata*) *(.sdata*)
_GOT2_TABLE_ = .; _GOT2_TABLE_ = .;
*(.got2) KEEP(*(.got2))
__got2_entries = (. - _GOT2_TABLE_) >> 2; __got2_entries = (. - _GOT2_TABLE_) >> 2;
} }
. = ALIGN(8); . = ALIGN(8);
__bss_start = .; __bss_start = .;
.bss (NOLOAD) : { *(.*bss) } .bss (NOLOAD) : {
*(.*bss)
}
_end = .; _end = .;
} }
ENTRY(_start) ENTRY(_start)

View File

@ -30,7 +30,6 @@ SECTIONS
.text : { .text : {
*(.text*) *(.text*)
. = ALIGN(16); . = ALIGN(16);
*(.eh_frame)
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
} }
@ -39,13 +38,15 @@ SECTIONS
*(.data*) *(.data*)
*(.sdata*) *(.sdata*)
_GOT2_TABLE_ = .; _GOT2_TABLE_ = .;
*(.got2) KEEP(*(.got2))
__got2_entries = (. - _GOT2_TABLE_) >> 2; __got2_entries = (. - _GOT2_TABLE_) >> 2;
} }
. = ALIGN(8); . = ALIGN(8);
__bss_start = .; __bss_start = .;
.bss (NOLOAD) : { *(.*bss) } .bss (NOLOAD) : {
*(.*bss)
}
_end = .; _end = .;
} }
ENTRY(_start) ENTRY(_start)