On 1/8/26 4:50 PM, Sascha Hauer wrote: > 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. > > Signed-off-by: Sascha Hauer <[email protected]>
Reviewed-by: Ahmad Fatoum <[email protected]> Likewise can just be squashed into the commit that dropped relocate_to*. > - barebox = (void *)elf.entry; > + barebox = (void *)(unsigned long)elf.entry; Should have been squashed into earlier commit. Cheers, Ahmad > > pr_debug("jumping to uncompressed image at 0x%p. dtb=0x%p\n", barebox, > fdt); > > diff --git a/arch/riscv/lib/barebox.lds.S b/arch/riscv/lib/barebox.lds.S > index > 77f854e73e2013ca332a0a94fd1deaa2b9978a1d..1435ce3318a466d875d583bab876f63a2368ae69 > 100644 > --- a/arch/riscv/lib/barebox.lds.S > +++ b/arch/riscv/lib/barebox.lds.S > @@ -14,7 +14,7 @@ > #include <asm/barebox.lds.h> > > OUTPUT_ARCH(BAREBOX_OUTPUT_ARCH) > -ENTRY(start) > +ENTRY(barebox_non_pbl_start) > OUTPUT_FORMAT(BAREBOX_OUTPUT_FORMAT) > > PHDRS > @@ -36,16 +36,11 @@ SECTIONS > .text : > { > _stext = .; > - *(.text_entry*) > - __bare_init_start = .; > - *(.text_bare_init*) > - __bare_init_end = .; > __exceptions_start = .; > KEEP(*(.text_exceptions*)) > __exceptions_stop = .; > *(.text*) > } :text > - BAREBOX_BARE_INIT_SIZE > > . = ALIGN(4096); > __start_rodata = .; > -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
