summaryrefslogtreecommitdiff
path: root/board/dvlhost
diff options
context:
space:
mode:
authorAlbert ARIBAUD <albert.u.boot@aribaud.net>2013-04-11 05:43:21 +0000
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>2013-04-13 22:37:20 +0200
commitf84a7b8f54db51172a50926be8b2224413977f75 (patch)
treeefa2e78aa939e07934c048a6cd21a568c003c8e5 /board/dvlhost
parent4411b2aea7aa06d7b4aa5f4a7b36957af9b95e08 (diff)
downloadu-boot-imx-f84a7b8f54db51172a50926be8b2224413977f75.zip
u-boot-imx-f84a7b8f54db51172a50926be8b2224413977f75.tar.gz
u-boot-imx-f84a7b8f54db51172a50926be8b2224413977f75.tar.bz2
ARM: Fix __bss_start and __bss_end in linker scripts
Commit 3ebd1cbc introduced compiler-generated __bss_start and __bss_end__ and commit c23561e7 rewrote all __bss_end__ as __bss_end. Their merge caused silent and harmless but potentially bug-inducing clashes between compiler- and linker- generated __bss_end symbols. Make __bss_end and __bss_start compiler-only, and create __bss_base and __bss_limit for linker-only use. Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net> Reported-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Diffstat (limited to 'board/dvlhost')
-rw-r--r--board/dvlhost/u-boot.lds14
1 files changed, 10 insertions, 4 deletions
diff --git a/board/dvlhost/u-boot.lds b/board/dvlhost/u-boot.lds
index dd50bdb..6d4b187 100644
--- a/board/dvlhost/u-boot.lds
+++ b/board/dvlhost/u-boot.lds
@@ -77,17 +77,23 @@ SECTIONS
_end = .;
+/*
+ * Compiler-generated __bss_start and __bss_end, see arch/arm/lib/bss.c
+ * __bss_base and __bss_limit are for linker only (overlay ordering)
+ */
+
.bss_start __rel_dyn_start (OVERLAY) : {
KEEP(*(.__bss_start));
+ __bss_base = .;
}
- .bss __bss_start (OVERLAY) : {
+ .bss __bss_base (OVERLAY) : {
*(.bss*)
. = ALIGN(4);
- __bss_end = .;
+ __bss_limit = .;
}
- .bss_end __bss_end (OVERLAY) : {
- KEEP(*(__bss_end));
+ .bss_end __bss_limit (OVERLAY) : {
+ KEEP(*(.__bss_end));
}
/DISCARD/ : { *(.dynstr*) }