Hello everybody.
I toyed around with a disassembly of an application I am building which is
about 83kB of flash.
I am using a MSP430F5438 MCU. Some functions I have manually relocated to the
section of addresses above 64KB. Now, when I try to call them, the compiler
generates CALL instructions to truncated addresses, like in the example below:
void foo(uint8_t luc_a) {return luc_a++;} // actual function address : 0x10fd3
msp430-objdump -S myfile.elf disassembles to: CALL 0x0fd3 # calling function
foo()
I am not even sure if it is a linker or a compiler problem..
Also, I would like to be able to "force" extended calls (i.e. in the whole
address space) only for some functions, and for others not. This is to save
flash usage in case of low-address residing functions.
So, basically my question is: how to make the elf file call the correct address
of function foo? :)
Regards,
Mihai