I have compiled the project with arm-none-eabi-gcc to object with command
arm-none-eabi-gcc --specs=nosys.specs -mcpu=cortex-m7 -mtune=cortex-m7 -Os -g -gdwarf-2 -c $< -o $(@)
currently I got the object file when I try to link it with command in object foler
arm-none-eabi-gcc --specs=nosys.specs -mcpu=cortex-m7 -mtune=cortex-m7 -g -gdwarf-2 -nostartfiles -T ..\project.ld -o target *
However I got some strange error
arm-none-eabi/bin/ld.exe: error: no memory region specified for loadable section `.text.memcmp'
I understand that when I use -T option the link script file will be used instead of default link script. it looks like the section definitions for some builtin function are missing. I tried to fix that put
.text.memcmp : {*(.text.memcmp)}
in my ld file, it looks like this section is fixed however I got another error:
arm-none-eabi/bin/ld.exe: error: no memory region specified for loadable section `.text.memset'
so I don't think put .text.memset in the LD file is correct fix, because after I put `.text.memset' in ld file , I got another error :
arm-none-eabi/bin/ld.exe: error: no memory region specified for loadable section `.text._snprintf_r'
I think I missed some options in GCC to create these default sections for builtin functions
What is the root cause of this issue and how to fix that? Thank you so much!