Skip to content
Snippets Groups Projects
Commit f82d15ea authored by Simon Glass's avatar Simon Glass
Browse files

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: default avatarSimon Glass <sjg@chromium.org>
parent 4b491b8d
No related branches found
No related tags found
No related merge requests found
...@@ -45,9 +45,6 @@ SECTIONS ...@@ -45,9 +45,6 @@ SECTIONS
. = ALIGN(4); . = ALIGN(4);
.data : { *(.data*) } .data : { *(.data*) }
. = ALIGN(4);
.dynsym : { *(.dynsym*) }
. = ALIGN(4); . = ALIGN(4);
.hash : { *(.hash*) } .hash : { *(.hash*) }
...@@ -58,10 +55,7 @@ SECTIONS ...@@ -58,10 +55,7 @@ SECTIONS
__data_end = .; __data_end = .;
. = ALIGN(4); . = ALIGN(4);
__bss_start = ABSOLUTE(.); .dynsym : { *(.dynsym*) }
.bss (NOLOAD) : { *(.bss) }
. = ALIGN(4);
__bss_end = ABSOLUTE(.);
. = ALIGN(4); . = ALIGN(4);
__rel_dyn_start = .; __rel_dyn_start = .;
...@@ -70,6 +64,17 @@ SECTIONS ...@@ -70,6 +64,17 @@ SECTIONS
. = ALIGN(4); . = ALIGN(4);
_end = .; _end = .;
. = ALIGN(4);
__end = .;
.bss __rel_dyn_start (OVERLAY) : {
__bss_start = .;
*(.bss)
*(COM*)
. = ALIGN(4);
__bss_end = .;
}
/DISCARD/ : { *(.dynstr*) } /DISCARD/ : { *(.dynstr*) }
/DISCARD/ : { *(.dynamic*) } /DISCARD/ : { *(.dynamic*) }
/DISCARD/ : { *(.plt*) } /DISCARD/ : { *(.plt*) }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment