As barebox proper is now an ELF file we no longer need to map the entry
function to the start of the image. Just link it to wherever the linker
wants it and drop the text_entry section. Also, remove the start()
function and set the ELF entry to barebox_non_pbl_start() directly.

While at it also remove the bare_init stuff from the barebox proper
linker script as it's only relevant to the PBL linker script which
is a separate script.

Reviewed-by: Ahmad Fatoum <[email protected]>
Signed-off-by: Sascha Hauer <[email protected]>
---
 arch/arm/cpu/start.c         | 11 -----------
 arch/arm/lib32/barebox.lds.S |  7 +------
 arch/arm/lib64/barebox.lds.S |  7 +------
 3 files changed, 2 insertions(+), 23 deletions(-)

diff --git a/arch/arm/cpu/start.c b/arch/arm/cpu/start.c
index 2498bdb894..c2f14736da 100644
--- a/arch/arm/cpu/start.c
+++ b/arch/arm/cpu/start.c
@@ -189,14 +189,3 @@ __noreturn void barebox_non_pbl_start(unsigned long 
membase,
 
        start_barebox();
 }
-
-void start(unsigned long membase, unsigned long memsize, struct handoff_data 
*hd);
-/*
- * First function in the uncompressed image. We get here from
- * the pbl. The stack already has been set up by the pbl.
- */
-void __section(.text_entry) start(unsigned long membase,
-               unsigned long memsize, struct handoff_data *hd)
-{
-       barebox_non_pbl_start(membase, memsize, hd);
-}
diff --git a/arch/arm/lib32/barebox.lds.S b/arch/arm/lib32/barebox.lds.S
index c098993615..02db3b9790 100644
--- a/arch/arm/lib32/barebox.lds.S
+++ b/arch/arm/lib32/barebox.lds.S
@@ -6,7 +6,7 @@
 
 OUTPUT_FORMAT(BAREBOX_OUTPUT_FORMAT)
 OUTPUT_ARCH(BAREBOX_OUTPUT_ARCH)
-ENTRY(start)
+ENTRY(barebox_non_pbl_start)
 
 PHDRS
 {
@@ -27,17 +27,12 @@ SECTIONS
        .text      :
        {
                _stext = .;
-               *(.text_entry*)
-               __bare_init_start = .;
-               *(.text_bare_init*)
-               __bare_init_end = .;
                . = ALIGN(0x20);
                __exceptions_start = .;
                KEEP(*(.text_exceptions*))
                __exceptions_stop = .;
                *(.text*)
        } :text
-       BAREBOX_BARE_INIT_SIZE
 
        . = ALIGN(4096);
        __start_rodata = .;
diff --git a/arch/arm/lib64/barebox.lds.S b/arch/arm/lib64/barebox.lds.S
index 1ce2c67df0..bd76a0ca96 100644
--- a/arch/arm/lib64/barebox.lds.S
+++ b/arch/arm/lib64/barebox.lds.S
@@ -5,7 +5,7 @@
 
 OUTPUT_FORMAT(BAREBOX_OUTPUT_FORMAT)
 OUTPUT_ARCH(BAREBOX_OUTPUT_ARCH)
-ENTRY(start)
+ENTRY(barebox_non_pbl_start)
 
 PHDRS
 {
@@ -26,13 +26,8 @@ SECTIONS
        .text      :
        {
                _stext = .;
-               *(.text_entry*)
-               __bare_init_start = .;
-               *(.text_bare_init*)
-               __bare_init_end = .;
                *(.text*)
        } :text
-       BAREBOX_BARE_INIT_SIZE
 
        . = ALIGN(4096);
        __start_rodata = .;

-- 
2.47.3


Reply via email to