Andes toolchain will link crt0.o in default.
We can generate map file to see this feature.
As the following picture, please check this box.
Attachment:
map.gif [ 36.16 KiB | Viewed 6502 times ]
In map.txt, there is crt0.o.
Attachment:
map2.gif [ 59.95 KiB | Viewed 6502 times ]
If we don't need start files. We can use this setting.
Check "-nostartfiles".
Attachment:
map3.gif [ 21.46 KiB | Viewed 6502 times ]
Example:
nds32le-elf-gcc -Os
-nostartfiles -static -T"../nds32.ld" -Wl,--gc-sections -o "demo-int.adx" ./src/crt0.o ./src/init-default.o ./src/init-soc.o ./src/interrupt.o ./src/main.o ./src/uart.o
This is the result. No crt0.o
Attachment:
map4.gif [ 11.07 KiB | Viewed 6502 times ]