summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Panzlaff <michael.panzlaff@fau.de>2021-04-17 22:46:15 +0200
committerMichael Panzlaff <michael.panzlaff@fau.de>2021-04-17 22:46:15 +0200
commit7a480adafe1f1f8f5b764ad21a7f8e113c63cb1f (patch)
treeb0d2582b62e138b968c0c640f524a11572fff23c
parent0767f4b9ce0ad9dd86e83f5a09674cbc6559df29 (diff)
modern: add missing sections to linkerscript
In order to correctly link a program which uses libc functions a few sections are required to satisfy the linker. This currently adds 0x3C bytes to IWRAM.
-rw-r--r--ld_script_modern.txt6
1 files changed, 5 insertions, 1 deletions
diff --git a/ld_script_modern.txt b/ld_script_modern.txt
index b69ada864..6f8d38453 100644
--- a/ld_script_modern.txt
+++ b/ld_script_modern.txt
@@ -27,6 +27,8 @@ SECTIONS {
/* .bss starts at 0x3000000 */
src/*.o(.bss);
gflib/*.o(.bss);
+ *libc.a:*.o(.bss);
+ *libnosys.a:*.o(.bss);
/* .bss.code starts at 0x3001AA8 */
src/m4a.o(.bss.code);
@@ -34,7 +36,8 @@ SECTIONS {
/* COMMON starts at 0x30022A8 */
src/*.o(COMMON);
gflib/*.o(COMMON);
- *libc.a:sbrkr.o(COMMON);
+ *libc.a:*.o(COMMON);
+ *libnosys.a:*.o(COMMON);
end = .;
. = 0x8000;
}
@@ -82,6 +85,7 @@ SECTIONS {
*libagbsyscall.a:*.o(.text*);
*libgcc.a:*.o(.text*);
*libc.a:*.o(.text*);
+ *libnosys.a:*.o(.text*);
src/libisagbprn.o(.text);
} =0