X-Git-Url: https://git.saurik.com/apple/dyld.git/blobdiff_plain/832b6fce7c321434378950ecd081b6c34cc3a24f..refs/heads/master:/src/start_glue.s?ds=sidebyside diff --git a/src/start_glue.s b/src/start_glue.s index 4ccfd39..3336f66 100644 --- a/src/start_glue.s +++ b/src/start_glue.s @@ -28,13 +28,13 @@ .align 2 .globl _start .private_extern _start -start: - nop # backtraces of LC_MAIN binaries don't end in "start" _start: + nop # 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__ */ @@ -43,9 +43,9 @@ _start: .align 2 .globl _start .private_extern _start -start: - nop # backtraces of LC_MAIN binaries don't end in "start" _start: + nop # backtraces of LC_MAIN binaries don't end in "start" +Lstart: movl %eax,%edi # pass result from main() to exit() call _exit hlt @@ -56,13 +56,31 @@ _start: #if __arm__ .align 2 + .code 16 .globl _start .private_extern _start -start: - nop // backtraces of LC_MAIN binaries don't end in "start" + .thumb_func _start _start: + nop // 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 +