summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2013-02-28 19:26:14 (GMT)
committerSimon Glass <sjg@chromium.org>2013-03-04 23:57:40 (GMT)
commitf82d15ead1badc329c4c804f0405e32289f46dd8 (patch)
treef35c1a6d423924420d37ed2023de66348180a069
parent4b491b8ddeaaf6cf6a47d7102188c9a9c6b1b3d8 (diff)
downloadu-boot-f82d15ead1badc329c4c804f0405e32289f46dd8.tar.xz
x86: Rearrange the output input to remove BSS
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>
-rw-r--r--arch/x86/cpu/u-boot.lds19
1 files changed, 12 insertions, 7 deletions
diff --git a/arch/x86/cpu/u-boot.lds b/arch/x86/cpu/u-boot.lds
index 8e185f3..54f2fb7 100644
--- a/arch/x86/cpu/u-boot.lds
+++ b/arch/x86/cpu/u-boot.lds
@@ -46,9 +46,6 @@ SECTIONS
.data : { *(.data*) }
. = ALIGN(4);
- .dynsym : { *(.dynsym*) }
-
- . = ALIGN(4);
.hash : { *(.hash*) }
. = ALIGN(4);
@@ -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*) }