Hello,
I would like to place function myFunction() at a specific memory address.
I have modified linker srcipt by adding section mySection at address 0x60002000.
In the source file I have added attribute section:
__attribute__((section(".mySection"), naked))
void myFunction(void)
{
/* Code */
}
In the result in .map file I see:
*(.mySection)
.mySection 0x60002000 0x30
0x60002000 myFunction
Unfortunately, pointer to the function myFunction() points to 0x60002001.
Why the pointer points to address 0x60002001 (not 0x60002000)? In the .map file I see that function myFunction() was placed at address 0x60002000. Could someone provide any explanation? Why does not pointer point to 0x60002000?