4 years, 7 months ago.

Make a jump to a section defined in the linker

Hi. I have a SW that is divided into two binaries (loaded in different memories). Therefore I have two linker files. A binary runs and loads the second binary in the other memory, and this second runs. There is a function that both codes use, and it is loaded in RAM by the first one, so in the second I make the call to this function really a JUMP to the address where it is loaded in RAM (in the linker file of the first SW I have defined a specific section where I force this function to be loaded). Currently, this mechanism works for me correctly. My question is, is it possible to jump to a tag or symbol instead of the specific address? Ideally, in my linker file I would define the address with a tag, and in the code I would refer to that tag. That is, both the compiler and the linker would understand that tag and translate it to the address. So if I change the address in the linker I would not have to change also in the JUMP instruction.

Many thanks

Be the first to answer this question.