Home > Back-end >  About GCC ld file specifies a particular piece of code to a fixed address
About GCC ld file specifies a particular piece of code to a fixed address

Time:09-27

Questions about GCC ld file to compile * * * *

Made a piece of code, compiled found, found not start on the 0 address function, how do I want to configure ld files, to make the start function is on the map the address 0?


Ld file:


OUTPUT_ARCH (" riscv ")
ENTRY (start)

SECTIONS
{
.=0;
Text: {* (. Text)}
.data: {* (. Data)}
BSS: {*. (BSS)}
}


After compilation. LST file start function address:

So I want to do in order to specify the address of a function? A great god, please help solve!!!
  • Related