It is declared in DIAB sysntax (WindRiver compiler). We migrated to the CW and so far it has been quite difficult to get any working suggestion. All this code does initializes global section that other modules used in the project can use to put their initializations under. Sample below shows source code and Output shows the expected result generated by linker. The question is how to do that with CW linker???
The same problem exists with startup of the project. Could you please give me a sample code that would show how it's done?
========== Sample 1============================
section .init$00,2,C
XDEF ___init ; Entry to ___init, called by
___init: ; ___init_main called above.
; Linker places .init sections from other modules, containing
; calls to initialize global objects, here.
section .init$99,2,C
rts ; Return from ___init.
========= Output 1 ============================
.init$00 fe0c40da 00000000 .\RTOS_Port\startup.o
___init fe0c40da 00000000
.init$05 fe0c40da 00000006 C:\diab\4.4b\ACE0FS\libcfp.a[malloc.o]
.init$15 fe0c40e0 00000006 C:\diab\4.4b\ACE0FS\libcfp.a[malloc.o]
.init fe0c40e6 00000006 .\source\CANController.o
.init fe0c40ec 00000006 .\source\CANPacketProcessor.o