u-boot/arch/sandbox
Heinrich Schuchardt 205b9f5100 sandbox: correct determination of the text base
os_find_text_base() assumes that first line of /proc/self/maps holds
information about the text. Hence we must call the function before calling
os_malloc() which calls mmap(0x10000000,).

Failure to do so has led to incorrect values for pc_reloc when an
exception was reported

    => exception undefined

    Illegal instruction
    pc = 0x5628d82e9d3c, pc_reloc = 0x5628c82e9d3c

as well as incorrect output of the bdinfo command

    => bdinfo
    relocaddr   = 0x0000000007858000
    reloc off   = 0x0000000010000000

Fixes: b308d9fd18 ("sandbox: Avoid using malloc() for system state")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
2021-06-05 07:35:47 -06:00
..
cpu sandbox: correct determination of the text base 2021-06-05 07:35:47 -06:00
dts pytest: add sandbox test for "extension" command 2021-05-13 13:09:09 -04:00
include/asm sandbox: use sections instead of symbols for getopt array boundaries 2021-05-24 14:21:30 -04:00
lib treewide: Convert macro and uses of __section(foo) to __section("foo") 2021-05-24 14:21:30 -04:00
config.mk sandbox: make LTO available 2021-05-24 14:21:30 -04:00
Kconfig sandbox: add handler for exceptions 2020-12-13 07:58:17 -07:00
Makefile sandbox: Use 'extras' to specify 'head' files 2018-12-05 06:01:34 -07:00