Skip to content
Commit 205b9f51 authored by Heinrich Schuchardt's avatar Heinrich Schuchardt Committed by Simon Glass
Browse files

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: b308d9fd ("sandbox: Avoid using malloc() for system state")
Signed-off-by: default avatarHeinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
parent 0e35b937
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment