2
0

cprt0.as 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. .file "crt1.c"
  2. #APP
  3. .ident "$FreeBSD: src/lib/csu/common/crtbrand.c,v 1.4.20.1 2007/12/06 13:43:43 kib Exp $"
  4. #NO_APP
  5. .section .note.ABI-tag,"a",@progbits
  6. .align 4
  7. .type abitag, @object
  8. .size abitag, 24
  9. abitag:
  10. .long 8
  11. .long 4
  12. .long 1
  13. .string "FreeBSD"
  14. .long 700055
  15. .globl __progname
  16. .section .rodata
  17. .LC0:
  18. .string ""
  19. .data
  20. .align 8
  21. .type __progname, @object
  22. .size __progname, 8
  23. __progname:
  24. .quad .LC0
  25. .text
  26. .p2align 4,,15
  27. .globl _start
  28. .type _start, @function
  29. _start:
  30. .LFB5:
  31. pushq %rbp
  32. .LCFI0:
  33. movq %rsp, %rbp
  34. .LCFI1:
  35. subq $48, %rsp
  36. .LCFI2:
  37. movq %rdi, -40(%rbp)
  38. movq %rsi, -48(%rbp)
  39. movq -40(%rbp), %rax
  40. movq (%rax), %rax
  41. movl %eax, -28(%rbp)
  42. movl %eax, operatingsystem_parameter_argc(%rip)
  43. movq -40(%rbp), %rax
  44. addq $8, %rax
  45. movq %rax, -24(%rbp)
  46. movq %rax, operatingsystem_parameter_argv(%rip)
  47. movq -40(%rbp), %rdx
  48. addq $16, %rdx
  49. movl -28(%rbp), %eax
  50. cltq
  51. salq $3, %rax
  52. leaq (%rdx,%rax), %rax
  53. movq %rax, -16(%rbp)
  54. movq -16(%rbp), %rax
  55. movq %rax, operatingsystem_parameter_envp(%rip)
  56. movq %rax, environ(%rip)
  57. cmpl $0, -28(%rbp)
  58. jle .L2
  59. movq -24(%rbp), %rax
  60. movq (%rax), %rax
  61. testq %rax, %rax
  62. je .L2
  63. movq -24(%rbp), %rax
  64. movq (%rax), %rax
  65. movq %rax, __progname(%rip)
  66. movq __progname(%rip), %rax
  67. movq %rax, -8(%rbp)
  68. jmp .L5
  69. .L6:
  70. movq -8(%rbp), %rax
  71. movzbl (%rax), %eax
  72. cmpb $47, %al
  73. jne .L7
  74. movq -8(%rbp), %rax
  75. addq $1, %rax
  76. movq %rax, __progname(%rip)
  77. .L7:
  78. addq $1, -8(%rbp)
  79. .L5:
  80. movq -8(%rbp), %rax
  81. movzbl (%rax), %eax
  82. testb %al, %al
  83. jne .L6
  84. .L2:
  85. movl $_DYNAMIC, %eax
  86. testq %rax, %rax
  87. je .L9
  88. movq -48(%rbp), %rdi
  89. call atexit
  90. jmp .L11
  91. .L9:
  92. call _init_tls
  93. .L11:
  94. movl $_fini, %edi
  95. call atexit
  96. call _init
  97. # movq -16(%rbp), %rdx
  98. # movq -24(%rbp), %rsi
  99. # movl -28(%rbp), %edi
  100. xorq %rbp,%rbp
  101. call main
  102. movl %eax, %edi
  103. call exit
  104. .LFE5:
  105. .size _start, .-_start
  106. #APP
  107. .ident "$FreeBSD: src/lib/csu/amd64/crt1.c,v 1.15 2005/10/07 22:13:17 bde Exp $"
  108. #NO_APP
  109. .bss
  110. .type __stkptr,@object
  111. .size __stkptr,8
  112. .global __stkptr
  113. __stkptr:
  114. .skip 8
  115. .type operatingsystem_parameters,@object
  116. .size operatingsystem_parameters,24
  117. operatingsystem_parameters:
  118. .skip 3*8
  119. .global operatingsystem_parameter_envp
  120. .global operatingsystem_parameter_argc
  121. .global operatingsystem_parameter_argv
  122. .set operatingsystem_parameter_envp,operatingsystem_parameters+0
  123. .set operatingsystem_parameter_argc,operatingsystem_parameters+8
  124. .set operatingsystem_parameter_argv,operatingsystem_parameters+16
  125. .comm environ,8,8
  126. .weak _DYNAMIC
  127. .section .eh_frame,"a",@progbits
  128. .Lframe1:
  129. .long .LECIE1-.LSCIE1
  130. .LSCIE1:
  131. .long 0x0
  132. .byte 0x1
  133. .string "zR"
  134. .uleb128 0x1
  135. .sleb128 -8
  136. .byte 0x10
  137. .uleb128 0x1
  138. .byte 0x3
  139. .byte 0xc
  140. .uleb128 0x7
  141. .uleb128 0x8
  142. .byte 0x90
  143. .uleb128 0x1
  144. .align 8
  145. .LECIE1:
  146. .LSFDE1:
  147. .long .LEFDE1-.LASFDE1
  148. .LASFDE1:
  149. .long .LASFDE1-.Lframe1
  150. .long .LFB5
  151. .long .LFE5-.LFB5
  152. .uleb128 0x0
  153. .byte 0x4
  154. .long .LCFI0-.LFB5
  155. .byte 0xe
  156. .uleb128 0x10
  157. .byte 0x86
  158. .uleb128 0x2
  159. .byte 0x4
  160. .long .LCFI1-.LCFI0
  161. .byte 0xd
  162. .uleb128 0x6
  163. .align 8
  164. .LEFDE1:
  165. .ident "GCC: (GNU) 4.2.1 20070719 [FreeBSD]"