#144655 - bpoint - Mon Nov 05, 2007 12:34 pm
Hello all,
I've been working on a rather large project under Win32, and have finally ported the code over to GBA. However, I am having a bit of a problem getting my application to link properly. ld is giving me these errors (the log is not exact -- I have trimmed some things to make it more readable):
It's obvious from the messages that the compiled code size in the .text section is larger than the ewram size (256k) of the GBA. However, this is my main() function:
Indeed, after looking at the .map file produced by the linker, every single function and class in every library being linked in is trying to be put inside the output .elf file. I realize I can get around the linker errors by using the gba.specs file instead of the multiboot one, but this is not a solution. I do not want any unused functions to be placed in the output .elf file. Does devkitARM not support the "-dead_strip" parameter, or am I doing something wrong here?
Any ideas would be greatly appreciated.
I've been working on a rather large project under Win32, and have finally ported the code over to GBA. However, I am having a bit of a problem getting my application to link properly. ld is giving me these errors (the log is not exact -- I have trimmed some things to make it more readable):
Code: |
1>------ Build started: Project: sandbox, Configuration: Debug GBA ------
1>Performing Makefile project actions 1>arm-eabi-g++ -mthumb -mthumb-interwork -Wl,-Map,sandbox.elf.map -dead_strip -specs=gba_mb.specs sandbox.o -L../../lib/gba -lDebug-lib1 -lDebug-lib2 -lDebug-lib3 -lDebug-lib4 -o sandbox.elf 1>arm-eabi/bin/ld.exe: address 0x20ab760 of sandbox.elf section .text is not within region ewram 1>arm-eabi/bin/ld.exe: section .init [02000000 -> 02000217] overlaps section .fini [02000000 -> 0200000b] 1>arm-eabi/bin/ld.exe: section .rodata [02000010 -> 0200ddf3] overlaps section .init [02000000 -> 02000217] 1>arm-eabi/bin/ld.exe: section .text [02000218 -> 020ab75f] overlaps section .rodata [02000010 -> 0200ddf3] 1>arm-eabi/bin/ld.exe: section .ARM.extab [0200ddf4 -> 02017c77] overlaps section .text [02000218 -> 020ab75f] 1>arm-eabi/bin/ld.exe: sandbox.elf: section .init lma 0x2000000 overlaps previous sections 1>arm-eabi/bin/ld.exe: sandbox.elf: section .rodata lma 0x2000010 overlaps previous sections 1>arm-eabi/bin/ld.exe: sandbox.elf: section .text lma 0x2000218 overlaps previous sections 1>arm-eabi/bin/ld.exe: sandbox.elf: section .ARM.extab lma 0x200ddf4 overlaps previous sections 1>arm-eabi/bin/ld.exe: sandbox.elf: section .ARM.exidx lma 0x2017c78 overlaps previous sections 1>arm-eabi/bin/ld.exe: sandbox.elf: section .init_array lma 0x201dfe0 overlaps previous sections 1>arm-eabi/bin/ld.exe: sandbox.elf: section .fini_array lma 0x201e01c overlaps previous sections 1>arm-eabi/bin/ld.exe: sandbox.elf: section .jcr lma 0x201e020 overlaps previous sections 1>arm-eabi/bin/ld.exe: sandbox.elf: section .eh_frame lma 0x201e024 overlaps previous sections |
It's obvious from the messages that the compiled code size in the .text section is larger than the ewram size (256k) of the GBA. However, this is my main() function:
Code: |
int main(int argc, char *argv[], char *envp[])
{ return 0; } |
Indeed, after looking at the .map file produced by the linker, every single function and class in every library being linked in is trying to be put inside the output .elf file. I realize I can get around the linker errors by using the gba.specs file instead of the multiboot one, but this is not a solution. I do not want any unused functions to be placed in the output .elf file. Does devkitARM not support the "-dead_strip" parameter, or am I doing something wrong here?
Any ideas would be greatly appreciated.