Description
I am trying to build Hello World Application and run on a cortex-a53 based processor. The userspace environment is 32-bit (with the all libraries, binaries built in 32-bit mode). The Kernel however, is built in 64-bit mode.
Code:
$ cat hello.rs
fn main() {
println!("Hello World!");
}
Compile
$ rustc --target arm-unknown-linux-gnueabi -C target-cpu=cortex-a53 hello.rs
The output is that the string 'Hello World!' prints and crashes during the cleanup phase with 'illegal instruction'. gdb points to atomic_sub. I am suspecting that there is alignment issue with the memory pointers. One example of the GDB backtrace is:
gdb Backtrace
#0 atomic_sub () at /rustc/9fda7c2237db910e41d6a712e9a2139b352e558b/src/libcore/sync/atomic.rs:2077
2077 /rustc/9fda7c2237db910e41d6a712e9a2139b352e558b/src/libcore/sync/atomic.rs: No such file or directory.
(gdb) quit