Browse Source

Simplified linker script handling of libc.

Having ascertained that the SDK itself has no (zero, zilch, nada) dependencies
on the standard C library, the NodeMCU linker script now puts any and all
libc functions into irom, rather than carefully picking the ones that
were used by NodeMCU some months ago. This should help keep iram free for
the things which really need to be in iram (such as ISRs).
Johny Mattsson 8 years ago
parent
commit
d5f71eb0c6
1 changed files with 3 additions and 25 deletions
  1. 3 25
      ld/nodemcu.ld

+ 3 - 25
ld/nodemcu.ld

@@ -89,31 +89,9 @@ SECTIONS
     KEEP(*(.lua_rotable))
     LONG(0) LONG(0) /* Null-terminate the array */
 
-    /* These are *only* pulled in by Lua, and therefore safe to put in flash */
-    */libc.a:lib_a-isalnum.o(.text* .literal*)
-    */libc.a:lib_a-isalpha.o(.text* .literal*)
-    */libc.a:lib_a-iscntrl.o(.text* .literal*)
-    */libc.a:lib_a-isspace.o(.text* .literal*)
-    */libc.a:lib_a-islower.o(.text* .literal*)
-    */libc.a:lib_a-isupper.o(.text* .literal*)
-    */libc.a:lib_a-ispunct.o(.text* .literal*)
-    */libc.a:lib_a-isxdigit.o(.text* .literal*)
-    */libc.a:lib_a-locale.o(.text* .literal*)
-    */libc.a:lib_a-tolower.o(.text* .literal*)
-    */libc.a:lib_a-toupper.o(.text* .literal*)
-    */libc.a:lib_a-strcasecmp.o(.text* .literal*)
-    */libc.a:lib_a-strcoll.o(.text* .literal*)
-    */libc.a:lib_a-strchr.o(.text* .literal*)
-    */libc.a:lib_a-strrchr.o(.text* .literal*)
-    */libc.a:lib_a-strcat.o(.text* .literal*)
-    */libc.a:lib_a-strncat.o(.text* .literal*)
-    */libc.a:lib_a-strcspn.o(.text* .literal*)
-    */libc.a:lib_a-strtol.o(.text* .literal*)
-    */libc.a:lib_a-strtoul.o(.text* .literal*)
-    */libc.a:lib_a-strpbrk.o(.text* .literal*)
-    */libc.a:lib_a-memchr.o(.text* .literal*)
-    */libc.a:lib_a-setjmp.o(.text* .literal*)
-    /* end Lua C lib functions */
+    /* SDK doesn't use libc functions, and are therefore safe to put in flash */
+    */libc.a(.text* .literal*)
+    /* end libc functions */
 
     _irom0_text_end = ABSOLUTE(.);
     _flash_used_end = ABSOLUTE(.);