Skip to content

Commit 787b989

Browse files
committed
arm: failed attempt to run arm executable in aarch64
1 parent 802fe1f commit 787b989

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

README.adoc

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1964,7 +1964,9 @@ sched_getcpu = 0
19641964

19651965
so we see that the affinity was restricted to the second core from the start.
19661966

1967-
Let's do a QEMU observation to justify this example being in the repository with <<gdb-step-debug-userland-non-init,userland breakpoints>>:
1967+
Let's do a QEMU observation to justify this example being in the repository with <<gdb-step-debug-userland-non-init,userland breakpoints>>.
1968+
1969+
We will run our `/sched_getaffinity.out` infinitely many time, on core 0 and core 1 alternatively:
19681970

19691971
....
19701972
./run -c2 -d -F 'i=0; while true; do taskset -c $i,$i /sched_getaffinity.out; i=$((! $i)); done'
@@ -1991,7 +1993,7 @@ Then, inside GDB:
19911993
(gdb) c
19921994
....
19931995

1994-
So we observe that `info threads` shows the actual correct core on which the process was restricted to run by `taskset`!
1996+
and we observe that `info threads` shows the actual correct core on which the process was restricted to run by `taskset`!
19951997

19961998
We should also try it out with kernel modules: https://stackoverflow.com/questions/28347876/set-cpu-affinity-on-a-loadable-linux-kernel-module
19971999

@@ -2316,6 +2318,25 @@ Bibliography:
23162318
* https://stackoverflow.com/questions/7415515/how-to-access-the-control-registers-cr0-cr2-cr3-from-a-program-getting-segmenta/7419306#7419306
23172319
* https://stackoverflow.com/questions/18717016/what-are-ring-0-and-ring-3-in-the-context-of-operating-systems/44483439#44483439
23182320

2321+
=== arm
2322+
2323+
==== Run arm executable in aarch64
2324+
2325+
TODO Can you run arm executables in the aarch64 guest? https://stackoverflow.com/questions/22460589/armv8-running-legacy-32-bit-applications-on-64-bit-os/51466709#51466709
2326+
2327+
I've tried:
2328+
2329+
....
2330+
./out/aarch64/buildroot/host/bin/aarch64-linux-gcc -static ~/test/hello_world.c -o data/9p/a.out
2331+
./run -aA -F '/mnt/9p/a.out'
2332+
....
2333+
2334+
but it fails with:
2335+
2336+
....
2337+
a.out: line 1: syntax error: unexpected word (expecting ")")
2338+
....
2339+
23192340
=== mips64
23202341

23212342
Keep in mind that MIPS has the worst support compared to our other architectures due to the smaller community. Patches welcome as usual.

0 commit comments

Comments
 (0)