Hi, thank you for answer.
How do you know it is the crt0.o found in v7e-m+fp/softfp/ ?
When I objdump it, I have following output:
00000000 <_stack_init>:
0: f5a3 3a80 sub.w sl, r3, #65536 ; 0x10000
4: 4770 bx lr
6: bf00 nop
00000008 <_mainCRTStartup>:
8: 4b17 ldr r3, [pc, #92] ; (68 <_mainCRTStartup+0x60>)
a: 2b00 cmp r3, #0
c: bf08 it eq
e: 4b13 ldreq r3, [pc, #76] ; (5c <_mainCRTStartup+0x54>)
10: 469d mov sp, r3
12: f7ff fffe bl 0 <_stack_init>
16: 2100 movs r1, #0
18: 468b mov fp, r1
1a: 460f mov r7, r1
1c: 4813 ldr r0, [pc, #76] ; (6c <_mainCRTStartup+0x64>)
1e: 4a14 ldr r2, [pc, #80] ; (70 <_mainCRTStartup+0x68>)
20: 1a12 subs r2, r2, r0
22: f7ff fffe bl 0 <memset>
26: 4b0e ldr r3, [pc, #56] ; (60 <_mainCRTStartup+0x58>)
28: 2b00 cmp r3, #0
2a: d000 beq.n 2e <_mainCRTStartup+0x26>
2c: 4798 blx r3
2e: 4b0d ldr r3, [pc, #52] ; (64 <_mainCRTStartup+0x5c>)
30: 2b00 cmp r3, #0
32: d000 beq.n 36 <_mainCRTStartup+0x2e>
34: 4798 blx r3
36: 2000 movs r0, #0
38: 2100 movs r1, #0
3a: 0004 movs r4, r0
3c: 000d movs r5, r1
3e: 480d ldr r0, [pc, #52] ; (74 <_mainCRTStartup+0x6c>)
40: 2800 cmp r0, #0
42: d002 beq.n 4a <_mainCRTStartup+0x42>
44: 480c ldr r0, [pc, #48] ; (78 <_mainCRTStartup+0x70>)
46: f7ff fffe bl 0 <atexit>
4a: f7ff fffe bl 0 <__libc_init_array>
4e: 0020 movs r0, r4
50: 0029 movs r1, r5
52: f7ff fffe bl 0 <main>
56: f7ff fffe bl 0 <exit>
5a: bf00 nop
5c: 00080000 .word 0x00080000
...
I am not used to assembly but I see _mainCRTStartup consists in eventually call main function (line 52). So OK, I understand the link between _start() in the startup file, and main function call
Regarding rt_entry(), I also found this page : Documentation – Arm Developer
From what I understand, it performs the same tasks as crt0 file. I am a little bit confused here.
Thank you for your help