jcmvbkbc wrote:cal wrote:Do I have to provide a dummy abort symbol to avoid the whole family of sbrk, malloc, etc?
Is there some magic switch available?
Interesting. This is clearly an undefined behaviour and that's where gcc would emit trap, and according to the chapter 2.1 here in case it's not implemented a call to abort will be emitted. So yes, we either need a dummy implementation of abort() or we need to implement trap pattern in the gcc. Surprisingly I haven't found any switch to turn it off.
I'll add a patch with the trap pattern implementation.
Thanks for your report!
You're welcome.
I added a dummy abort() and had to remove one inline attribute and removed -Werror (temporarily ...).
After that my nodemcu firmware (based on dev branch with local mods) produced a firmware that does start
on the chip.
Interestingly ALL sections need less memory compared to gcc 4.8.2. Even .rodata and
.bss
gcc 4.8.2
Idx Name Size VMA LMA File off Algn
0 .irom0.text 0005700a 40210000 40210000 0000cbe0 2**4
CONTENTS, ALLOC, LOAD, CODE
1 .text 000073d7 40100000 40100000 00005800 2**8
CONTENTS, ALLOC, LOAD, READONLY, CODE
2 .data 00000b6c 3ffe8000 3ffe8000 000000e0 2**4
CONTENTS, ALLOC, LOAD, DATA
3 .rodata 00004b38 3ffe8b70 3ffe8b70 00000c50 2**4
CONTENTS, ALLOC, LOAD, READONLY, DATA
4 .bss 00009820 3ffed6a8 3ffed6a8 00005788 2**4
ALLOC
gcc 5.1
Idx Name Size VMA LMA File off Algn
0 .irom0.text 00056fe3 40210000 40210000 0000c3b0 2**4
CONTENTS, ALLOC, LOAD, CODE
1 .text 000073ab 40100000 40100000 00005000 2**8
CONTENTS, ALLOC, LOAD, READONLY, CODE
2 .data 00000b64 3ffe8000 3ffe8000 000000e0 2**4
CONTENTS, ALLOC, LOAD, DATA
3 .rodata 00004358 3ffe8b70 3ffe8b70 00000c50 2**4
CONTENTS, ALLOC, LOAD, READONLY, DATA
4 .bss 000097f8 3ffecec8 3ffecec8 00004fa8 2**4
ALLOC
gdb:
[list=]
[*] remote connections work
[*] backtraces look good
[*] litben looks good
[*] layout asm works now (UTF-8 issue in 7.5.1)
[/list]
Do you want me to test anything special?
Good work, thanks!
Cal