summaryrefslogtreecommitdiff
path: root/board/freescale/m52277evb
diff options
context:
space:
mode:
authorJason Jin <Jason.jin@freescale.com>2011-08-22 17:24:45 +0800
committerjason <jason@jason-ThinkPad-T61.(none)>2011-09-04 22:46:55 +0800
commit6c0bf27d74510d1d7fac9208e766eae8efac2592 (patch)
tree950b20fafd95c83f5a497da2bebe12b51306c1df /board/freescale/m52277evb
parent45263ec4c06fd8f1201df0bc7a8ab37a639a41f3 (diff)
downloadu-boot-imx-6c0bf27d74510d1d7fac9208e766eae8efac2592.zip
u-boot-imx-6c0bf27d74510d1d7fac9208e766eae8efac2592.tar.gz
u-boot-imx-6c0bf27d74510d1d7fac9208e766eae8efac2592.tar.bz2
ColdFire: Cleanup for partial linking and --gc-sections
Introduce the --gc-sections for ColdFire platform and clean up the corresponding lds file. Signed-off-by: TsiChung Liew <tsicliew@gmail.com> Signed-off-by: Jason Jin <Jason.jin@freescale.com>
Diffstat (limited to 'board/freescale/m52277evb')
-rw-r--r--board/freescale/m52277evb/u-boot.spa72
1 files changed, 15 insertions, 57 deletions
diff --git a/board/freescale/m52277evb/u-boot.spa b/board/freescale/m52277evb/u-boot.spa
index 4b710be..e7b22e3 100644
--- a/board/freescale/m52277evb/u-boot.spa
+++ b/board/freescale/m52277evb/u-boot.spa
@@ -22,63 +22,27 @@
*/
OUTPUT_ARCH(m68k)
-/* 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/m68k/cpu/mcf5227x/start.o (.text)
- arch/m68k/cpu/mcf5227x/libmcf5227x.o (.text)
- arch/m68k/lib/libm68k.o (.text)
- lib/libgeneric.o (.text)
- common/cmd_mem.o (.text)
- common/main.o (.text)
+ arch/m68k/cpu/mcf5227x/start.o (.text*)
+ arch/m68k/cpu/mcf5227x/libmcf5227x.o (.text*)
+ arch/m68k/lib/libm68k.o (.text*)
. = DEFINED(env_offset) ? env_offset : .;
- common/env_embedded.o (.text)
+ common/env_embedded.o (.text*)
- *(.text)
- *(.fixup)
- *(.got1)
+ *(.text*)
}
_etext = .;
PROVIDE (etext = .);
.rodata :
{
- *(.rodata)
- *(.rodata1)
+ *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
}
- .fini : { *(.fini) } =0
- .ctors : { *(.ctors) }
- .dtors : { *(.dtors) }
/* Read-write section, merged into data segment: */
. = (. + 0x00FF) & 0xFFFFFF00;
@@ -88,24 +52,20 @@ SECTIONS
.reloc :
{
__got_start = .;
- *(.got)
+ KEEP(*(.got))
__got_end = .;
_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 = .);
@@ -115,7 +75,6 @@ SECTIONS
.u_boot_cmd : { *(.u_boot_cmd) }
__u_boot_cmd_end = .;
-
. = .;
__start___ex_table = .;
__ex_table : { *(__ex_table) }
@@ -129,12 +88,11 @@ SECTIONS
__init_end = .;
__bss_start = .;
- .bss :
+ .bss (NOLOAD) :
{
_sbss = .;
- *(.sbss) *(.scommon)
- *(.dynbss)
- *(.bss)
+ *(.sbss*)
+ *(.bss*)
*(COMMON)
. = ALIGN(4);
_ebss = .;