]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
x86: Rearrange the output input to remove BSS
authorSimon Glass <sjg@chromium.org>
Thu, 28 Feb 2013 19:26:14 +0000 (19:26 +0000)
committerSimon Glass <sjg@chromium.org>
Mon, 4 Mar 2013 23:57:40 +0000 (15:57 -0800)
At present BSS data is including in the image, which wastes binary space.
Remove it by rearranging the sections so that BSS is last.

Signed-off-by: Simon Glass <sjg@chromium.org>
arch/x86/cpu/u-boot.lds

index 8e185f3b22d03cd22e0100c7dee93002a4ff981b..54f2fb76f7bb2398f3587e4b9865d8d36b9012d4 100644 (file)
@@ -45,9 +45,6 @@ SECTIONS
        . = ALIGN(4);
        .data : { *(.data*) }
 
-       . = ALIGN(4);
-       .dynsym : { *(.dynsym*) }
-
        . = ALIGN(4);
        .hash : { *(.hash*) }
 
@@ -58,10 +55,7 @@ SECTIONS
        __data_end = .;
 
        . = ALIGN(4);
-       __bss_start = ABSOLUTE(.);
-       .bss (NOLOAD) : { *(.bss) }
-       . = ALIGN(4);
-       __bss_end = ABSOLUTE(.);
+       .dynsym : { *(.dynsym*) }
 
        . = ALIGN(4);
        __rel_dyn_start = .;
@@ -70,6 +64,17 @@ SECTIONS
        . = ALIGN(4);
        _end = .;
 
+       . = ALIGN(4);
+
+       __end = .;
+       .bss __rel_dyn_start (OVERLAY) : {
+               __bss_start = .;
+               *(.bss)
+               *(COM*)
+               . = ALIGN(4);
+               __bss_end = .;
+       }
+
        /DISCARD/ : { *(.dynstr*) }
        /DISCARD/ : { *(.dynamic*) }
        /DISCARD/ : { *(.plt*) }