title: Riscv32-unknown-elf Linker Error after reading linker script : undefined reference to '_end'
body: <p>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:</p>
  
  <p>I'm new to this field so please excuse any mistakes.</p>
  
  <pre><code>/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
  </code></pre>
  
  <p>I also wanted to ask this:</p>
  
  <p>After executing <code>./configure --prefix=/local/home/s2500108/riscv --with-abi=ilp32 --with-arch=rv32i
  </code>  + <code>make</code>
  and trying to compile a multiplication instruction in <strong>c code</strong> 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 <strong>no multiplication</strong> will take place.</p>