Wat zijn linkadressen en running-adressen in embedded

What are link addresses and running addresses

Link address and running address: may be the same or different. For position-related code, the running address during final execution and the link address given during compilation and linking must be the same, otherwise an error will occur. In our previous bare metal program, -Ttext 0x0 was used in the Makefile
To specify the link address is 0x0. This means that we think this program will be run at the memory address 0x0 in the future.
But actually the address we run at is 0xd0020010 (we use the download address specified when downloading with dnw.). These two addresses look different, but are actually the same. This is because S5PV210 has done internal mapping and mapped the SRAM to the 0x0 address.

分清楚这两个概念
链接地址:链接时指定的地址( 指定方式为: Makefile中用-Ttext,或者链接脚本)N
Distinguish these two concepts clearly
Link address: the address specified when linking (specified by: using -Ttext in Makefile, or linking script) N

Running address: The actual running address of the program (specification method: it is determined by which location in the memory it is loaded into during actual running)

What determines the runtime address?

The runtime address is determined by the runtime. When S is compiled and linked, the runtime address cannot be absolutely determined.

What determines the link address?

The link address is passed by the programmer through the Makefile-Ttext during the compilation and linking process.
xxx or specified in the link script. Programmers will predict the execution requirements of their program in advance, and have a desired execution address, and will use this address as the link address. For example: 1. Application programs in Linux. gcc hello.c -.
Hello, the default link address used at this time is 0x0, so the application is linked to the 0 address. Because the application runs in a process of the operating system, in this process the application has exclusive access to the 4G virtual address space. So applications can all link to address 0 because every process starts from address 0. (You can use 0 without specifying the link address when compiling)

Related keywords:

4G DTU

    X

    Schakel JavaScript in je browser in om dit formulier in te vullen.
    Voer productgegevens in zoals interfaceconfiguratie, omgeving enz. en andere specifieke vereisten om een nauwkeurige offerte te ontvangen.

    nl_NLDutch
    Schakel JavaScript in je browser in om dit formulier in te vullen.
    Voer productgegevens in zoals interfaceconfiguratie, omgeving enz. en andere specifieke vereisten om een nauwkeurige offerte te ontvangen.