* [U-Boot] [PATCH] arc: make sure _start is in the beginning of .text section
@ 2015-04-10 15:46 Alexey Brodkin
2015-04-10 15:48 ` Alexey Brodkin
0 siblings, 1 reply; 2+ messages in thread
From: Alexey Brodkin @ 2015-04-10 15:46 UTC (permalink / raw)
To: u-boot
This is important to have entry point in the beginning of .text section
because it allows simple loading and execution of U-Boot.
For example pre-bootloader loads U-Boot in memory starting from offset
0x81000000 and then just jumps to the same address.
Otherwise pre-bootloader would need to find-out where entry-point is. In
its turn if it deals with binary image of U-Boot there's no way for
pre-bootloader to get required value.
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
---
arch/arc/cpu/u-boot.lds | 1 +
arch/arc/lib/Makefile | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/arc/cpu/u-boot.lds b/arch/arc/cpu/u-boot.lds
index ccddbf7..693df74 100644
--- a/arch/arc/cpu/u-boot.lds
+++ b/arch/arc/cpu/u-boot.lds
@@ -13,6 +13,7 @@ SECTIONS
.text : {
*(.__text_start)
*(.__image_copy_start)
+ arch/arc/lib/start.o (.text*)
*(.text*)
}
diff --git a/arch/arc/lib/Makefile b/arch/arc/lib/Makefile
index b887904..459bba9 100644
--- a/arch/arc/lib/Makefile
+++ b/arch/arc/lib/Makefile
@@ -4,6 +4,7 @@
# SPDX-License-Identifier: GPL-2.0+
#
+head-y := start.o
obj-y += cache.o
obj-y += cpu.o
obj-y += interrupts.o
@@ -18,7 +19,6 @@ obj-y += memcpy-700.o
obj-y += memset.o
obj-y += reset.o
obj-y += timer.o
-obj-y += start.o
obj-y += ints_low.o
obj-y += init_helpers.o
--
2.1.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [U-Boot] [PATCH] arc: make sure _start is in the beginning of .text section
2015-04-10 15:46 [U-Boot] [PATCH] arc: make sure _start is in the beginning of .text section Alexey Brodkin
@ 2015-04-10 15:48 ` Alexey Brodkin
0 siblings, 0 replies; 2+ messages in thread
From: Alexey Brodkin @ 2015-04-10 15:48 UTC (permalink / raw)
To: u-boot
On Fri, 2015-04-10 at 18:46 +0300, Alexey Brodkin wrote:
> This is important to have entry point in the beginning of .text section
> because it allows simple loading and execution of U-Boot.
>
> For example pre-bootloader loads U-Boot in memory starting from offset
> 0x81000000 and then just jumps to the same address.
>
> Otherwise pre-bootloader would need to find-out where entry-point is. In
> its turn if it deals with binary image of U-Boot there's no way for
> pre-bootloader to get required value.
>
> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Applied, thanks.
-Alexey
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-04-10 15:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-10 15:46 [U-Boot] [PATCH] arc: make sure _start is in the beginning of .text section Alexey Brodkin
2015-04-10 15:48 ` Alexey Brodkin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.