[Rust] Linker error when using loops
Posted: Sun Nov 29, 2020 9:02 am
I've been trying to fix this for hours now and I'm not sure where to go from here. I'm working on an OS for an aarch64-unknown-none target, and whenever I put code in any sort of loop, the code compiles then I get an undefined reference. The symbol it gives is mangled, but I think it's .
Here's my full build script:
If I remove the loop, it runs fine. Any insights into why this could be happening?
Code: Select all
core::panicking::panic_bounds_check
Here's my full build script:
Code: Select all
aarch64-elf-as -c boot.S -o boot.o
cargo build --target aarch64-unknown-none
aarch64-elf-gcc -T linker.ld -o os.elf -ffreestanding -O2 -nostdlib boot.o $HOME/Documents/os/kernel/target/aarch64-unknown-none/debug/libkernel.rlib
qemu-system-aarch64 -m 1024 -M raspi3 -kernel os.elf -serial stdio