@@ -877,7 +877,7 @@ so it is close to the failing `0xbf0000cc`.
877
877
`readelf`:
878
878
879
879
....
880
- ./runtc readelf -- -s "$(./getvar build_dir)/kernel_modules-1.0/hello.ko"
880
+ ./run-toolchain readelf -- -s "$(./getvar build_dir)/kernel_modules-1.0/hello.ko"
881
881
....
882
882
883
883
does not give any interesting hits at `cc`, no symbol was placed that far.
@@ -950,7 +950,7 @@ The base address shows on terminal:
950
950
Now let's find the offset of `myinit`:
951
951
952
952
....
953
- ./runtc readelf -- \
953
+ ./run-toolchain readelf -- \
954
954
-s "$(./getvar build_dir)/kernel_modules-1.0/fops.ko" | \
955
955
grep myinit
956
956
....
@@ -1273,7 +1273,7 @@ Cannot access memory at address 0x10604
1273
1273
We have also double checked the address with:
1274
1274
1275
1275
....
1276
- ./runtc --arch arm readelf -- \
1276
+ ./run-toolchain --arch arm readelf -- \
1277
1277
-s "$(./getvar --arch arm build_dir)/kernel_modules-1.0/fops.ko" | \
1278
1278
grep main
1279
1279
....
@@ -1878,7 +1878,7 @@ TODO Can you run arm executables in the aarch64 guest? https://stackoverflow.com
1878
1878
I've tried:
1879
1879
1880
1880
....
1881
- ./runtc --arch aarch64 gcc -- -static ~/test/hello_world.c -o data/9p/a.out
1881
+ ./run-toolchain --arch aarch64 gcc -- -static ~/test/hello_world.c -o data/9p/a.out
1882
1882
./run --arch aarch64 --eval-busybox '/mnt/9p/a.out'
1883
1883
....
1884
1884
@@ -3679,7 +3679,7 @@ vermagic: 4.17.0 SMP mod_unload modversions
3679
3679
Module information is stored in a special `.modinfo` section of the ELF file:
3680
3680
3681
3681
....
3682
- ./runtc readelf -- -SW "$(./getvar target_dir)/module_info.ko"
3682
+ ./run-toolchain readelf -- -SW "$(./getvar target_dir)/module_info.ko"
3683
3683
....
3684
3684
3685
3685
contains:
@@ -3691,7 +3691,7 @@ contains:
3691
3691
and:
3692
3692
3693
3693
....
3694
- ./runtc readelf -- -x .modinfo "$(./getvar build_dir)/module_info.ko"
3694
+ ./run-toolchain readelf -- -x .modinfo "$(./getvar build_dir)/module_info.ko"
3695
3695
....
3696
3696
3697
3697
gives:
@@ -3908,7 +3908,7 @@ as explained at: https://stackoverflow.com/questions/8545931/using-gdb-to-conver
3908
3908
The exact same thing can be done post mortem with:
3909
3909
3910
3910
....
3911
- ./runtc gdb -- \
3911
+ ./run-toolchain gdb -- \
3912
3912
-batch \
3913
3913
-ex 'info line *(myinit+0x1d)' \
3914
3914
"$(./getvar build_dir)/kernel_modules-1.0/panic.ko" \
@@ -5238,7 +5238,7 @@ Meaning of the flags:
5238
5238
* `vaddr`: first virtual address of a page the belongs to the process. Notably:
5239
5239
+
5240
5240
....
5241
- ./runtc readelf -- -l "$(./getvar build_dir)/kernel_modules-1.0/user/virt_to_phys_test.out"
5241
+ ./run-toolchain readelf -- -l "$(./getvar build_dir)/kernel_modules-1.0/user/virt_to_phys_test.out"
5242
5242
....
5243
5243
+
5244
5244
contains:
@@ -5610,7 +5610,7 @@ Notes:
5610
5610
It can be found from:
5611
5611
+
5612
5612
....
5613
- ./runtc readelf -- -e "$(./getvar vmlinux)" | grep Entry
5613
+ ./run-toolchain readelf -- -e "$(./getvar vmlinux)" | grep Entry
5614
5614
....
5615
5615
+
5616
5616
TODO confirm further. If I try to break there with:
@@ -7169,7 +7169,7 @@ The reason this is cool, is that `ls` is not statically compiled, but since we h
7169
7169
In other words, much cooler than:
7170
7170
7171
7171
....
7172
- ./runtc --arch arm gcc -- -static ./packages/kernel_modules/user/hello.c
7172
+ ./run-toolchain --arch arm gcc -- -static ./packages/kernel_modules/user/hello.c
7173
7173
qemu-arm a.out
7174
7174
....
7175
7175
@@ -7220,9 +7220,9 @@ First we try some `-static` sanity checks.
7220
7220
Works and prints `hello`:
7221
7221
7222
7222
....
7223
- ./runtc --arch x86_64 gcc -- -static -o x86_64.out ./packages/kernel_modules/user/hello.c
7224
- ./runtc --arch arm gcc -- -static -o arm.out ./packages/kernel_modules/user/hello.c
7225
- ./runtc --arch aarch64 gcc -- -static -o aarch64.out ./packages/kernel_modules/user/hello.c
7223
+ ./run-toolchain --arch x86_64 gcc -- -static -o x86_64.out ./packages/kernel_modules/user/hello.c
7224
+ ./run-toolchain --arch arm gcc -- -static -o arm.out ./packages/kernel_modules/user/hello.c
7225
+ ./run-toolchain --arch aarch64 gcc -- -static -o aarch64.out ./packages/kernel_modules/user/hello.c
7226
7226
"$(./getvar --arch x86_64 --gem5 exec)" "$(./getvar gem5_se_file)" -c ./x86_64.out
7227
7227
"$(./getvar --arch arm --gem5 exec)" "$(./getvar gem5_se_file)" -c ./arm.out
7228
7228
"$(./getvar --arch aarch64 --gem5 exec)" "$(./getvar gem5_se_file)" -c ./aarch64.out
@@ -7262,7 +7262,7 @@ gem5 user mode:
7262
7262
....
7263
7263
make \
7264
7264
-C "$(./getvar --arch arm build_dir)/dhrystone-2" \
7265
- CC="$(./runtc --arch arm --dry gcc)" \
7265
+ CC="$(./run-toolchain --arch arm --dry gcc)" \
7266
7266
CFLAGS=-static \
7267
7267
;
7268
7268
time \
0 commit comments