Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 21994

Riscv32-unknown-elf Linker Error after reading linker script : undefined reference to '_end'

$
0
0

I'm trying to compile and link a custom made c code to risc v project but I'm getting these error in the making:

I'm new to this field so please excuse any mistakes.

/local/home/opt/riscv/lib/gcc/riscv32-unknown-elf/9.2.0/../../../../riscv32-unknown-elf/bin/ld: /local/home/opt/riscv/lib/gcc/riscv32-unknown-elf/9.2.0/../../../../riscv32-unknown-elf/lib/crt0.o: in function `_start':(.text+0x0): undefined reference to `__global_pointer$'/local/home/s2500108/riscv/lib/gcc/riscv32-unknown-elf/9.2.0/../../../../riscv32-unknown-elf/bin/ld: (.text+0x8): undefined reference to `_edata'/local/home/s2500108/riscv/lib/gcc/riscv32-unknown-elf/9.2.0/../../../../riscv32-unknown-elf/bin/ld: (.text+0x10): undefined reference to `_end'collect2: error: ld returned 1 exit status

I also wanted to ask this:

After executing ./configure --prefix=/local/home/s2500108/riscv --with-abi=ilp32 --with-arch=rv32i+makeand trying to compile a multiplication instruction in c code examle a=21, b=10; a * b the compiler does not output any error and produces elf files normally. Why is this happening? I want to make sure that no multiplication will take place.


Viewing all articles
Browse latest Browse all 21994

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>