.align 2
.globl _start
.private_extern _start
-start:
- nop # <rdar://problem/10753356> backtraces of LC_MAIN binaries don't end in "start"
_start:
+ nop # <rdar://problem/10753356> backtraces of LC_MAIN binaries don't end in "start"
+Lstart:
movl %eax,(%esp) # pass result from main() to exit()
call _exit
hlt
-
+
#endif /* __i386__ */
.align 2
.globl _start
.private_extern _start
-start:
- nop # <rdar://problem/10753356> backtraces of LC_MAIN binaries don't end in "start"
_start:
+ nop # <rdar://problem/10753356> backtraces of LC_MAIN binaries don't end in "start"
+Lstart:
movl %eax,%edi # pass result from main() to exit()
call _exit
hlt
#if __arm__
.align 2
+ .code 16
.globl _start
.private_extern _start
-start:
- nop // <rdar://problem/10753356> backtraces of LC_MAIN binaries don't end in "start"
+ .thumb_func _start
_start:
+ nop // <rdar://problem/10753356> backtraces of LC_MAIN binaries don't end in "start"
+Lstart:
bl _exit // result in r0 already in param reg r0
trap
#endif /* __arm__ */
+
+#if __arm64__
+
+ .align 2
+ .globl _start
+ .private_extern _start
+_start:
+ nop
+Lstart:
+ bl _exit // result in x0 already in param reg x0
+ brk #3
+
+#endif /* __arm64__ */
+
+ .subsections_via_symbols
+