I am very excited about the binary release of gcc-toolchain, but I run into problems trying to compile something as simple as:
int main()
{
return 0;
}
$ ~/morello-gnu/bin/aarch64-none-elf-gcc -march=morello -O0 -nostdlib hello.c
/home/lord/morello-gnu/bin/../lib/gcc/aarch64-none-elf/10.1.0/../../../../aarch64-none-elf/bin/ld: warning: cannot find entry symbol _start; defaulting to 0000000000400000
$ ~/morello-gnu/bin/aarch64-none-elf-gcc -march=morello -O0 hello.c
/home/lord/morello-gnu/bin/../lib/gcc/aarch64-none-elf/10.1.0/../../../../aarch64-none-elf/bin/ld: /home/lord/morello-gnu/bin/../lib/gcc/aarch64-none-elf/10.1.0/../../../../aarch64-none-elf/lib/hybridcap/libc.a(lib_a-exit.o): in function `exit':
/data/jenkins/workspace/GNU-toolchain/morello-trunk/src/newlib-cygwin/newlib/libc/stdlib/exit.c:70: undefined reference to `_exit'
/home/lord/morello-gnu/bin/../lib/gcc/aarch64-none-elf/10.1.0/../../../../aarch64-none-elf/bin/ld: /home/lord/morello-gnu/bin/../lib/gcc/aarch64-none-elf/10.1.0/../../../../aarch64-none-elf/lib/hybridcap/crt0.o: in function `_start':
/data/jenkins/workspace/GNU-toolchain/morello-trunk/src/newlib-cygwin/libgloss/aarch64/crt0.S:360: undefined reference to `__init_global_caps'
/home/lord/morello-gnu/bin/../lib/gcc/aarch64-none-elf/10.1.0/../../../../aarch64-none-elf/bin/ld: /data/jenkins/workspace/GNU-toolchain/morello-trunk/src/newlib-cygwin/libgloss/aarch64/crt0.S:361: undefined reference to `__processRelocs'
/home/lord/morello-gnu/bin/../lib/gcc/aarch64-none-elf/10.1.0/../../../../aarch64-none-elf/bin/ld: /data/jenkins/workspace/GNU-toolchain/morello-trunk/src/newlib-cygwin/libgloss/aarch64/crt0.S:365: undefined reference to `initialise_monitor_handles'
collect2: error: ld returned 1 exit status
Any suggestions on what I am doing wrong?
Also, I think it mentions that pure and hybrid capabilities modes are supported, but I could not find option to specify which one to use.
Thanks!
Vadim
--
Senior Research Associate
Department of Computer Science and Technology
University of Cambridge
http://zaliva.org/
When running baremetal binaries under qemu (as discussed in the other thread), malloc is returning NULL.
Is this expected in this configuration?
Vadim
--
Senior Research Associate
Department of Computer Science and Technology
University of Cambridge
http://zaliva.org/
I am trying to rung GCC-produced binaries under qemu, with no success. Here is what I did:
dummy.c:
#include <stdio.h>
int main()
{
fprintf(stderr,"hello world!\n");
}
$ ~/morello-gnu/bin/aarch64-none-elf-gcc -march=morello+c64 -mabi=purecap -specs=aem-ve.specs -O0 tests/cheri/dummy.c -o dummy
$ file dummy
dummy: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, with debug_info, not stripped
$ ~/cheri/output/morello-sdk/bin/qemu-system-morello -M virt,gic-version=3 -cpu morello -m 2048 -nographic -device virtio-rng-pci -bios dummy
At this point, qemu hangs up eating a lot of CPU and has to be killed.
Any suggestions on how I can run the binaries?
Vadim
--
Senior Research Associate
Department of Computer Science and Technology
University of Cambridge
http://zaliva.org/