Other Parts Discussed in Thread: MSP430F1611
I want examine relocation entries from binary data (ELF files) to perform my own relocation subsequently.
Because of the replacement of the __auto_init function I run into trouble.
The startup routine _c_init00_noargs_noexit calls either _auto_init or _auto_init_hold_wdt for auto initialization (with or without watchdog timer) which also depends on the target mcu.
But when I examine the corresponding source and object file (boot_special.c, boot_special.obj) it seems like _auto_init is always called.
Using the readelf tool I get the following relocation entries for the library function _c_init00_noargs_noexit (boot_special.obj):
The third relocation entry seems to belong to the _auto_init function.
Also within the source code (boot_special.c) the call "_auto_init()" just belongs to the normal _auto_init function defined in autoinit.c.
When compiling my program for the target mcu msp430f1611 I get the following disassembly:
Now, _auto_init_hold_wdt is called and it seems for me as if the _auto_init symbol was magically replaced with _auto_init_hold_wdt.
I cannot understand where the replacement of the symbols took place. Maybe after the compilation process by the linker?
I could find also other symbol replacements (mspabi_mpyi ->__mspabi_mpyi_hw, _mspabi_mpyl ->__mspabi_mpyl_hw) depending if the target mcu has a certain hardware support or not.
Many thanks in advance,
Felix


