From 221914265860a47a0ba8bfa6956097cb045d9b39 Mon Sep 17 00:00:00 2001 From: Graeme Russ Date: Thu, 7 Oct 2010 20:03:32 +1100 Subject: x86: Rearrange linker script Tidy up the linker script and discard some sections to save space --- board/eNET/u-boot.lds | 39 ++++++++++++++++++--------------------- 1 file changed, 18 insertions(+), 21 deletions(-) (limited to 'board/eNET') diff --git a/board/eNET/u-boot.lds b/board/eNET/u-boot.lds index ef5d941..3c52010 100644 --- a/board/eNET/u-boot.lds +++ b/board/eNET/u-boot.lds @@ -29,50 +29,47 @@ SECTIONS { . = TEXT_BASE; /* Location of bootcode in flash */ __text_start = .; - .text : { *(.text); } + .text : { *(.text*); } . = ALIGN(4); - .rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) } - - . = ALIGN(4); - - .data : { *(.data) } + __u_boot_cmd_start = .; + .u_boot_cmd : { *(.u_boot_cmd) } . = ALIGN(4); + __u_boot_cmd_end = .; - .interp : { *(.interp) } . = ALIGN(4); + .rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) } - .dynsym : { *(.dynsym) } . = ALIGN(4); + .data : { *(.data*) } - .dynstr : { *(.dynstr) } . = ALIGN(4); + .dynsym : { *(.dynsym*) } - .hash : { *(.hash) } . = ALIGN(4); + .hash : { *(.hash*) } - .got : { *(.got) } . = ALIGN(4); + .got : { *(.got*) } - .got.plt : { *(.got.plt) } . = ALIGN(4); + __data_end = .; - .dynamic (NOLOAD) : { *(.dynamic) } . = ALIGN(4); + __bss_start = ABSOLUTE(.); + .bss (NOLOAD) : { *(.bss) } + __bss_size = SIZEOF(.bss); - __u_boot_cmd_start = .; - .u_boot_cmd : { *(.u_boot_cmd) } . = ALIGN(4); - __u_boot_cmd_end = .; - __rel_dyn_start = .; .rel.dyn : { *(.rel.dyn) } __rel_dyn_end = .; - . = ALIGN(4); - __bss_start = ABSOLUTE(.); - .bss (NOLOAD) : { *(.bss) } - __bss_size = SIZEOF(.bss); + /DISCARD/ : { *(.dynstr*) } + /DISCARD/ : { *(.dynamic*) } + /DISCARD/ : { *(.plt*) } + /DISCARD/ : { *(.interp*) } + /DISCARD/ : { *(.gnu*) } /* 16bit realmode trampoline code */ .realmode 0x7c0 : AT ( LOADADDR(.rel.dyn) + SIZEOF(.rel.dyn) ) { KEEP(*(.realmode)) } -- cgit v1.1