undefined reference to `__global_pointers$'
suhasskrishanmurthy opened this issue · comments
Hi, I followed your article 2
first i didnt get what is the last file @ the end of below cmd
riscv64-unknown-elf-gcc -g -ffreestanding -O0 -Wl,--gc-sections
-nostartfiles -nostdlib -nodefaultlibs -Wl,-T,riscv64-virt.ld
crt0.s ns16550a.s
so i removed and inserted add.c
riscv64-unknown-elf-gcc -g -ffreestanding -O0 -Wl,--gc-sections -nostartfiles -nostdlib -nodefaultlibs -Wl,-T,riscv64-virt.ld crt0.s add.c
there, but i am getting following error
/tmp/cco7iPdF.o: In function .L0 ': /home/riscv/qemu/crt0.s:8: undefined reference to
__global_pointers$'
/home/riscv/qemu/crt0.s:10: undefined reference to `__start_top'
collect2: error: ld returned 1 exit status
where am i doing wrong
Hey there! I see you closed this issue. Did you get it worked out?
yeah sorry it was a typo
Cool, glad you got it working 👍