On Tue, Jun 18, 2019 at 06:17:52PM +0800, 张忠山 wrote: > > No, it is corrected during runtime in relocate_to_current_adr(). It > > seems older compilers need a runtime relocation fixup for this. > > Yes, in relocate_to_current_adr() the address all be fixed up. > > But if _barebox_image_size, __bss_start and __bss_stop all zero. the > barebox_base calculated by arm_mem_barebox_image() would wrong. but because it > align the base to 1M. So mostly it works fine. If the barebox size larger than > 1M. It should fail. > > > > > AFAIR this only happened for linker variables that point to absolute > > addresses. Differences between addresses also worked with the older > > compilers, and I think this is what your patch does: > > No. my patch just for new toolchain. with old toolchain it has no effect, > Because all of the size is zero. > > By using the newer toolchain: > arm-poky-eabi-gcc (GCC) 8.2.0 > GNU ld (GNU Binutils) 2.31.1.20180818 > > In barebox config file: > CONFIG_TEXT_BASE=0x23e00000 > CONFIG_RELOCATABLE=y With CONFIG_RELOCATABLE enabled TEXT_BASE should be 0x0 and this should be enforced by Kconfig dependencies. Which barebox version are you on and which SoC are you compiling for? Sascha -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox