diff --git a/include/firm/specfiles/ARM7-TS-FIRM.lcf.template b/include/firm/specfiles/ARM7-TS-FIRM.lcf.template index a15e4e05..8f7597a8 100644 --- a/include/firm/specfiles/ARM7-TS-FIRM.lcf.template +++ b/include/firm/specfiles/ARM7-TS-FIRM.lcf.template @@ -22,6 +22,7 @@ MEMORY (RWX) : ORIGIN = , LENGTH = 0x0 >> binary.AUTOLOAD_INFO (RWX) : ORIGIN = 0, LENGTH = 0x0 >> + binary.STATIC_FOOTER (RWX) : ORIGIN = 0, LENGTH = 0x0 >> F (RW) : ORIGIN = 0, LENGTH = 0x0 > F (RW) : ORIGIN = 0, LENGTH = 0x0 > @@ -373,6 +374,15 @@ SECTIONS SDK_AUTOLOAD_LIST_END = SDK_AUTOLOAD_START + SDK_AUTOLOAD_SIZE + SIZEOF(.binary.AUTOLOAD_INFO); SDK_AUTOLOAD_SIZE = SDK_AUTOLOAD_SIZE + SIZEOF(.binary.AUTOLOAD_INFO); + ############################ STATIC_FOOTER ########################## + .binary.STATIC_FOOTER: + { + WRITEW 0xdec00621; # LE(0x2106C0DE) = NITRO CODE + WRITEW _start_ModuleParams - ADDR(.); + WRITEW 0; # NO DIGEST + WRITEW _start_LtdModuleParams - ADDR(.); + } > binary.STATIC_FOOTER + ############################ OVERLAYS ############################### SDK_OVERLAY_NUMBER = ; diff --git a/include/firm/specfiles/ARM9-TS-FIRM.lcf.template b/include/firm/specfiles/ARM9-TS-FIRM.lcf.template index 2f19742a..fd41209c 100644 --- a/include/firm/specfiles/ARM9-TS-FIRM.lcf.template +++ b/include/firm/specfiles/ARM9-TS-FIRM.lcf.template @@ -272,6 +272,24 @@ SECTIONS + . = ALIGN(4); + SDK_AUTOLOAD..SINIT_START = .; + #:::::::::: ctor + + + + + + + + + + + + + WRITEW 0; + #:::::::::: ctor + SDK_AUTOLOAD..SINIT_END = .; #:::::::::: text/rodata SDK_AUTOLOAD..TEXT_END =.; @@ -385,6 +403,7 @@ SECTIONS WRITEW ADDR(.); WRITEW SDK_AUTOLOAD..SIZE; + WRITEW SDK_AUTOLOAD..SINIT_START; WRITEW SDK_AUTOLOAD..BSS_SIZE; } > binary.AUTOLOAD_INFO @@ -399,6 +418,7 @@ SECTIONS WRITEW 0xdec00621; # LE(0x2106C0DE) = NITRO CODE WRITEW _start_ModuleParams - ADDR(.); WRITEW 0; # NO DIGEST + WRITEW _start_LtdModuleParams - ADDR(.); } > binary.STATIC_FOOTER ############################ OVERLAYS ############################### @@ -686,6 +706,29 @@ SECTIONS + + + + + + + . = ALIGN(4); + SDK_LTDAUTOLOAD..SINIT_START = .; + #:::::::::: ctor + + + + + + + + + + + + + #:::::::::: ctor + SDK_LTDAUTOLOAD..SINIT_END = .; #:::::::::: text/rodata SDK_LTDAUTOLOAD..TEXT_END =.; diff --git a/include/firm/specfiles/ARM9-TS-FIRM.lsf b/include/firm/specfiles/ARM9-TS-FIRM.lsf index e3072c1b..272005c4 100644 --- a/include/firm/specfiles/ARM9-TS-FIRM.lsf +++ b/include/firm/specfiles/ARM9-TS-FIRM.lsf @@ -26,6 +26,9 @@ Static $(TARGET_NAME) Object * (.itcm) Object $(OBJS_AUTOLOAD) (.text) Object $(OBJS_AUTOLOAD) (.rodata) + Object $(OBJS_AUTOLOAD) (.init) + Object $(OBJS_AUTOLOAD) (.ctor) + Object $(OBJS_AUTOLOAD) (.sinit) Object * (.ltdmain) Object $(OBJS_LTDAUTOLOAD) Library $(LLIBS_EX) $(GLIBS_EX)