mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
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:
25
README.adoc
25
README.adoc
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user