GBA Overlay sections
Posted: Sun Jan 03, 2016 1:11 am
Hello,
I'm trying to use overlay sections. However when I do so, it seems the .pad section doesn't count them and overlaps them. Here's what I get in the map file:
And of course the linker complains. How can I fix this ?
Thank you.
I'm trying to use overlay sections. However when I do so, it seems the .pad section doesn't count them and overlaps them. Here's what I get in the map file:
Code: Select all
.iwram0 0x030036ac 0x24 load address 0x080ca818
*(.iwram0)
.iwram0 0x030036ac 0x14 t_overlay.thumb.o
0x030036ac Overlay0
.iwram0.__stub
0x030036c0 0xc linker stubs
0x030036cc . = ALIGN (0x4)
0x080ca818 PROVIDE (__load_start_iwram0, LOADADDR (.iwram0))
0x080ca83c PROVIDE (__load_stop_iwram0, (LOADADDR (.iwram0) + SIZEOF (.iwram0)))
.iwram1 0x030036ac 0x24 load address 0x080ca83c
*(.iwram1)
.iwram1 0x030036ac 0x14 t_overlay.thumb.o
0x030036ac Overlay1
.iwram1.__stub
0x030036c0 0xc linker stubs
0x030036cc . = ALIGN (0x4)
0x080ca83c PROVIDE (__load_start_iwram1, LOADADDR (.iwram1))
0x080ca860 PROVIDE (__load_stop_iwram1, (LOADADDR (.iwram1) + SIZEOF (.iwram1)))
.rel.dyn 0x030036d0 0x0 load address 0x080ca860
.rel.iplt 0x030036d0 0x0 d:/softs/devkitpro/devkitarm/bin/../lib/gcc/arm-none-eabi/5.3.0/../../../../arm-none-eabi/lib/gba_crt0.o
.iwram2 0x030036ac 0x0
*(.iwram2)
0x030036ac . = ALIGN (0x4)
[!provide] PROVIDE (__load_start_iwram2, LOADADDR (.iwram2))
[!provide] PROVIDE (__load_stop_iwram2, (LOADADDR (.iwram2) + SIZEOF (.iwram2)))
Code: Select all
.pad 0x02001738 0x8 load address 0x080ca83c
0x02001738 0x4 LONG 0x52416b64
0x0200173c 0x4 LONG 0x4d
0x02001740 . = ALIGN (0x4)
0x080ca844 __rom_end__ = (__pad_lma + SIZEOF (.pad))
Thank you.