Hello
Not sure I get it right here.
Is CF_boot_ROM.elf an object library or an executable file? I am confused here as usually extension .elf is associated with executable files?
Additionally an object library does not have a formal .text section. It is just a collection of object files, each of them having their own .text section.
So CF_boot_ROM.elf(.text) is not returning any code here.
Finally are you using the functions from CF_boot_ROM.elf within your main application?
The linker is performing dead stripping and is not linking any objects, which is not used to the application.
To tell the linker you want to link some non-referenced object you have to use the linker command FORCEACTIVE.
I hope this helps.
CrasyCat
Hello
I have performed some additional tests here.
Basically FORCEACTIVE is good to add individual object (functions, variables) to the application.
If you wish to add all objects defined (implemented) in a file you rather use FORCEFILES.
FORCEFILES works with object files not with archives. So you have to specify all the object files inside of your library file to get them all linked.
Syntax is as follows (I took ANSIC library as a test, just replace the library name with your own library name).
FORCEFILES {C_TRK_4i_CF_MSL.a(string.o) C_TRK_4i_CF_MSL.a(s_fabs.o)}
Place that command at the end of the .lcf file (After the SECTIONS block).
In order to place whole code & constant from your library in a separate memory area, just use following notation in your .lcf file:
SECTIONS {
.boot_app :
{
C_TRK_4i_CF_MSL.a(.text)
.= ALIGN(0x8);
C_TRK_4i_CF_MSL.a(.rodata)
.= ALIGN(0x8);
} > TEXT_BOOT
.main_application :
{
*(.text)
.= ALIGN(0x8);
.....
Make sure to specify the C_TRK_4i_CF_MSL.a(.text) prior to *(.text) in the.lcf file.
I hope this helps.
Note I did all the tests with CodeWarrior for Coldfire V6.3.
CrasyCat