On 11/05/21 19:03, Alexandru Elisei wrote:
I think it's because I'm using the*arm-none-eabi*  toolchain for compilation
instead of arm-linux-gnu, that's the toolchain for cross compiling arm code that
is present in the official Arch Linux repositories. Is that unsupported? I don't
remember any mention of it not being supported, but it's entirely possible that 
I
just forgot.

No, it's just that there was no difference until now. If you can add it to CI we can make sure it doesn't break.

With rem initialized to 0 I get this:

rm-none-eabi-ld -nostdlib -Ttext=40010000 -o arm/selftest.elf -T
/home/alex/data/repos/kvm-unit-tests/arm/flat.lds \
     arm/selftest.o arm/cstart.o lib/libcflat.a lib/libfdt/libfdt.a
lib/arm/libeabi.a arm/selftest.aux.o
arm-none-eabi-ld: lib/libcflat.a(printf.o): in function `print_int':
/home/alex/data/repos/kvm-unit-tests/lib/printf.c:72: undefined reference to
`__aeabi_ldivmod'
arm-none-eabi-ld: /home/alex/data/repos/kvm-unit-tests/lib/printf.c:73: 
undefined
reference to `__aeabi_ldivmod'
arm-none-eabi-ld: lib/libcflat.a(printf.o): in function `print_unsigned':
/home/alex/data/repos/kvm-unit-tests/lib/printf.c:102: undefined reference to
`__aeabi_uldivmod'
arm-none-eabi-ld: lib/libcflat.a(alloc_page.o): in function 
`_page_alloc_init_area':
/home/alex/data/repos/kvm-unit-tests/lib/alloc_page.c:482: undefined reference 
to
`__aeabi_uldivmod'
make: *** [/home/alex/data/repos/kvm-unit-tests/arm/Makefile.common:65:
arm/selftest.elf] Error 1

So for this we need to include the uldivmod and ldivmod functions similar to those in https://android.googlesource.com/toolchain/compiler-rt/+/release_32/lib/arm.

The uninitialized warning is because of the division by zero case. I've sent a couple patches to fix everything, please review!

Paolo

_______________________________________________
kvmarm mailing list
[email protected]
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

Reply via email to