u-boot-brain/arch/sandbox/cpu
Alexander Graf 3fcb714758 sandbox: Fix setjmp/longjmp
In sandbox, longjmp returns to itself in an endless loop because
os_longjmp() calls into longjmp() which is provided by U-Boot which
again calls os_longjmp().

Setjmp on the other hand must not return because otherwise the
return freees up stack elements that we need during longjmp().

The only straight forward fix that doesn't involve nasty hacks I
could find is to directly link against the system setjmp/longjmp
implementations. That means we just provide the compiler with
hints that the symbol will be available and actually fill them
out with versions from libc.

This approach should be reasonably platform agnostic

Signed-off-by: Alexander Graf <agraf@suse.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Alexander Graf <agraf@suse.de>
2018-09-23 21:55:30 +02:00
..
cpu.c sandbox: Fix setjmp/longjmp 2018-09-23 21:55:30 +02:00
eth-raw-os.c sandbox: eth-raw: Add a SIMPLE_BUS to enumerate host interfaces 2018-07-26 14:08:19 -05:00
Makefile SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
os.c sandbox: Fix setjmp/longjmp 2018-09-23 21:55:30 +02:00
sdl.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
spl.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
start.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
state.c sandbox: Enhance map_to_sysmem() to handle foreign pointers 2018-09-23 21:55:30 +02:00
u-boot-spl.lds SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
u-boot.lds Partially revert "efi_loader: Rename sections to allow for implicit data" 2018-08-23 16:17:41 -04:00