Get rid of lkmc_assert_fail in favor of abort + assert

What was missing previously was implementing abort in baremetal.

I had done that previously and forgotten to do this conversion!
This commit is contained in:
Ciro Santilli 六四事件 法轮功
2019-05-21 00:00:00 +00:00
parent 3b192bacfc
commit 5391bc1bfd
13 changed files with 9 additions and 48 deletions

View File

@@ -15155,7 +15155,6 @@ So setup this `on_exit` automatically from all our <<baremetal-bootloaders>>, so
The following examples end up testing that our setup is working:
+
* link:baremetal/assert_fail.c[]
* link:baremetal/lkmc_assert_fail.c[]
* link:baremetal/return1.c[]
* link:baremetal/return2.c[]
* link:baremetal/exit0.c[]
@@ -15165,30 +15164,6 @@ The following examples end up testing that our setup is working:
Beware that on Linux kernel simulations, you cannot even echo that string from userland, since userland stdout shows up on the serial.
====== baremetal assert
TODO: implement enough syscalls for it, so we can get the error line:
....
cd baremetal
ln -s ../lkmc/assert_fail.c
cd ..
./build --arch aarch64
....
fails with:
....
/path/to/linux-kernel-module-cheat/out/crosstool-ng/build/default/install/aarch64/lib/gcc/aarch64-unknown-elf/8.1.0/../../../../aarch64-unknown-elf/lib/libg.a(lib_a-signalr.o): In function `_kill_r':
/path/to/linux-kernel-module-cheat/out/crosstool-ng/build/default/build/aarch64-unknown-elf/src/newlib/newlib/libc/reent/signalr.c:53: undefined reference to `_kill'
/path/to/linux-kernel-module-cheat/out/crosstool-ng/build/default/build/aarch64-unknown-elf/src/newlib/newlib/libc/reent/signalr.c:53:(.text+0x20): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `_kill'
/path/to/linux-kernel-module-cheat/out/crosstool-ng/build/default/install/aarch64/lib/gcc/aarch64-unknown-elf/8.1.0/../../../../aarch64-unknown-elf/lib/libg.a(lib_a-signalr.o): In function `_getpid_r':
/path/to/linux-kernel-module-cheat/out/crosstool-ng/build/default/build/aarch64-unknown-elf/src/newlib/newlib/libc/reent/signalr.c:83: undefined reference to `_getpid'
/path/to/linux-kernel-module-cheat/out/crosstool-ng/build/default/build/aarch64-unknown-elf/src/newlib/newlib/libc/reent/signalr.c:83:(.text+0x44): relocation truncated to fit: R_AARCH64_JUMP26 against undefined symbol `_getpid'
....
at 406ee82cf33a6e3df0067b219b0414c59d7018b3 + 1.
==== Non-automated tests
===== Test GDB Linux kernel