musl-static-bin.test 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570
  1. # A fully statically-linked binary linked with musl.
  2. # Program text was:
  3. #
  4. # char x[123] = {0};
  5. # char y[456] = {1, 2, 3};
  6. # const char z[789] = {1, 2, 3};
  7. #
  8. # int main() {
  9. # volatile long addr = (long)&x;
  10. # addr = (long)&y;
  11. # addr = (long)&z;
  12. # return 5;
  13. # }
  14. #
  15. # This example uses musl because it can produce fully statically linked
  16. # binaries of reasonable size.
  17. #
  18. # This binary does not successfully run due to bugs in obj2yaml
  19. # (or possibly yaml2obj). The binary did not fully round-trip successfully.
  20. # RUN: %yaml2obj %s -o %t.obj
  21. # RUN: %bloaty --raw-map -d segments,sections %t.obj | %FileCheck %s
  22. --- !ELF
  23. FileHeader:
  24. Class: ELFCLASS64
  25. Data: ELFDATA2LSB
  26. Type: ET_EXEC
  27. Machine: EM_X86_64
  28. Entry: 0x000000000040105A
  29. ProgramHeaders:
  30. - Type: PT_LOAD
  31. Flags: [ PF_R ]
  32. VAddr: 0x0000000000400000
  33. Align: 0x0000000000001000
  34. - Type: PT_LOAD
  35. Flags: [ PF_X, PF_R ]
  36. FirstSec: .init
  37. LastSec: .fini
  38. VAddr: 0x0000000000401000
  39. Align: 0x0000000000001000
  40. - Type: PT_LOAD
  41. Flags: [ PF_R ]
  42. FirstSec: .rodata
  43. LastSec: .eh_frame
  44. VAddr: 0x0000000000402000
  45. Align: 0x0000000000001000
  46. - Type: PT_LOAD
  47. Flags: [ PF_W, PF_R ]
  48. FirstSec: .init_array
  49. LastSec: .bss
  50. VAddr: 0x0000000000403FE8
  51. FileSize: 0x228
  52. MemSize: 0x510
  53. Align: 0x0000000000001000
  54. - Type: PT_GNU_STACK
  55. Flags: [ PF_W, PF_R ]
  56. Align: 0x0000000000000010
  57. - Type: PT_GNU_RELRO
  58. Flags: [ PF_R ]
  59. FirstSec: .init_array
  60. LastSec: .got
  61. VAddr: 0x0000000000403FE8
  62. Sections:
  63. - Name: .init
  64. Type: SHT_PROGBITS
  65. Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
  66. Address: 0x0000000000401000
  67. AddressAlign: 0x0000000000000001
  68. Content: 5058C3
  69. - Name: .text
  70. Type: SHT_PROGBITS
  71. Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
  72. Address: 0x0000000000401010
  73. AddressAlign: 0x0000000000000010
  74. Content: 5589FDE858040000E86304000031C0E84C04000089EFE8E50700000F1F440000488D050932000048894424F8488D05FD2F000048894424F8488D05B10F000048894424F8B805000000C34831ED4889E7488D3599EFBFFF4883E4F0E800000000488B37488D57084531C949C7C06918400048C7C10010400048C7C730104000E99C030000662E0F1F8400000000006690488D3D69310000488D05623100004839F8741548C7C0000000004885C07409FFE00F1F8000000000C30F1F8000000000488D3D39310000488D35323100004829FE4889F048C1EE3F48C1F8034801C648D1FE741448C7C0000000004885C07408FFE0660F1F440000C30F1F8000000000803D0931000000752F5548833DD62E0000004889E5740C488B3DF22E0000E8CDEEBFFFE868FFFFFFC605E1300000015DC30F1F8000000000C30F1F8000000000E97BFFFFFF662E0F1F84000000000090C3662E0F1F8400000000000F1F440000C3662E0F1F8400000000000F1F4400004881EC580100004889FA31C0B9260000004C8D44242048833A004C89C7F348AB48C7C0484340004889100F84D801000031C0660F1F4400004889C14883C00148833CC20075F2488D04CD100000004801D0488B104889050D3100004883C0084885D20F84B00100000F1F8400000000004883FA257708488B0848894CD420488B50084883C0104885D275E5488B8C24A0000000488B842420010000488B54245048890DB13000004885C074074889058D300000488915D63000004885F60F840D01000048C7C0C842400048C7C2D04240004889304889320FB60684C0741C4883C601660F1F4400003C2F75034889320FB6064883C60184C075EE4C89C7E83E030000488BBC24E8000000E8E1FEFFFF488B84248000000048394424780F847E000000660FEFC04889E7B80700000031D248C744241000000000BE030000000F110424C744241002000000C7442408010000000F0585C07901F44889FA4C8D44241841B902000000BE02800000488D3D22100000F6420620740B4C89C80F054885C07901F44883C2084939D075E6C605CE2F0000014881C458010000C30F1F4000488B84249000000048398424880000000F856CFFFFFF4883BC24D8000000000F855DFFFFFFEBCD660F1F840000000000488BB424180100004885F60F85E2FEFFFF48C7C2C8424000488D05AF0F000048890248C7C2D0424000488902E9F9FEFFFF0F1F8000000000B808000000E93CFEFFFF660F1F44000048C705352F000000000000E98BFEFFFF0F1F84000000000055534883EC08E845FCFFFF48C7C3E83F400048C7C5F03F40004839EB730D6690FF134883C3084839EB72F54883C4085B5DC3662E0F1F8400000000000F1F400041554863C641544C8D6CC2084989D4554889C5534889FB4883EC08E8A0FFFFFF89EF4C89EA4C89E6FFD389C7E8EFFBFFFF662E0F1F8400000000000F1F44000041554863C64989FD4154488D7CC2084989D455488B324889C5E832FDFFFF4C89E289EE4C89EF488D0593FFFFFF5D415C415DFFE0662E0F1F8400000000006690C3662E0F1F8400000000000F1F44000055534883EC0848C7C3F83F400048C7C5F03F40004839EB76140F1F80000000004883EB0831C0FF134839EB77F34883C40831C05B5DE9AF030000660F1F440000534889FB48893FE88D03000085C078547507C605072E000001C7433802000000B8DA000000488D3D043000000F05894330488D05202E0000488983A8000000488D838800000048898388000000488B05AC2D000048895B104889432031C048895B185BC3B8FFFFFFFF5BC30F1F44000041554989FD415455534883EC08488B05B42D00004C8B25B52D0000488B1D9E2D0000488D840738FFFFFF49F7DC4921C44885DB7436488D6F080F1F80000000004C89E0482B4328488B73084C89E748894500488B53104883C508482B7B28E894020000488B1B4885DB75D5488B05662D0000498945004C89E04D896C24084883C4085B5D415C415DC30F1F800000000055534883EC08488B4F284C8B5F184885C90F8411020000448B0D2E2C0000488B7F204C89D831DB31F64531C0BD00008000EB230F1F44000083FA020F84AF01000083FA070F856A0100004989C04801F84883E90174178B1083FA0675DB4C89DE482B70104801F84883E90175E984DB740744890DD42B00004D85C00F84A7010000498B402049037010488D0D102D0000498B50284889350D2D00004889050E2D0000498B403048C705972C000001000000488905082D000048890D712C00004801D6488D48FF48F7DE4821CE4801D6488D90DF000000488935DB2C0000488935E42C00004883F807771548C705CB2C000008000000BAE7000000B8080000004801D6488905372C0000488D3DD02C00004883E6F84889351D2C00004881FE50010000762141BA220000004531C9B80900000031FF49C7C0FFFFFFFFBA030000000F054889C7E826FEFFFF4889004889C74889C3E84101000085C00F88BC0000000F84AA000000C7433802000000B8DA000000488D3DB72D00000F05894330488D05D32B0000488983A8000000488D838800000048898388000000488B055F2B000048895B104889432048895B184883C4085B5DC381FA51E574640F858DFEFFFF488B50284589CA4C39D20F867DFEFFFF4881FA00008000BB01000000480F47D54989D1E965FEFFFF0F1F84000000000048C7C2000000004885D20F844DFEFFFF4889D6482B7010E941FEFFFF0F1F4000C605092B000001E94AFFFFFFF44883C4085B5DC30F1F4000488B15892B0000488B35722B0000488B05832B0000E97DFEFFFF662E0F1F8400000000000F1F40004863FFB8E70000000F05BA3C000000904889D00F05EBF94889F84883FA087214F7C707000000740CA448FFCAF7C70700000075F44889D148C1E903F348A583E2077405A4FFCA75FBC34889FEBF02100000B89E0000000F05C3
  75. - Name: .fini
  76. Type: SHT_PROGBITS
  77. Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
  78. Address: 0x0000000000401869
  79. AddressAlign: 0x0000000000000001
  80. Content: 5058C3
  81. - Name: .rodata
  82. Type: SHT_PROGBITS
  83. Flags: [ SHF_ALLOC ]
  84. Address: 0x0000000000402000
  85. AddressAlign: 0x0000000000000020
  86. Content: 0102030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002F6465762F6E756C6C00
  87. - Name: .eh_frame
  88. Type: SHT_PROGBITS
  89. Flags: [ SHF_ALLOC ]
  90. Address: 0x0000000000402320
  91. AddressAlign: 0x0000000000000008
  92. Content: 1400000000000000017A5200017810011B0C070890010000100000001C000000F0ECFFFF2A0000000000000000000000
  93. - Name: .init_array
  94. Type: SHT_INIT_ARRAY
  95. Flags: [ SHF_WRITE, SHF_ALLOC ]
  96. Address: 0x0000000000403FE8
  97. AddressAlign: 0x0000000000000008
  98. EntSize: 0x0000000000000008
  99. Content: '5011400000000000'
  100. - Name: .fini_array
  101. Type: SHT_FINI_ARRAY
  102. Flags: [ SHF_WRITE, SHF_ALLOC ]
  103. Address: 0x0000000000403FF0
  104. AddressAlign: 0x0000000000000008
  105. EntSize: 0x0000000000000008
  106. Content: '1011400000000000'
  107. - Name: .got
  108. Type: SHT_PROGBITS
  109. Flags: [ SHF_WRITE, SHF_ALLOC ]
  110. Address: 0x0000000000403FF8
  111. AddressAlign: 0x0000000000000008
  112. Content: '0000000000000000'
  113. - Name: .got.plt
  114. Type: SHT_PROGBITS
  115. Flags: [ SHF_WRITE, SHF_ALLOC ]
  116. Address: 0x0000000000404000
  117. AddressAlign: 0x0000000000000008
  118. EntSize: 0x0000000000000008
  119. Content: '000000000000000000000000000000000000000000000000'
  120. - Name: .data
  121. Type: SHT_PROGBITS
  122. Flags: [ SHF_WRITE, SHF_ALLOC ]
  123. Address: 0x0000000000404020
  124. AddressAlign: 0x0000000000000020
  125. Content: '20404000000000000000000000000000000000000000000000000000000000000102030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000200'
  126. - Name: .bss
  127. Type: SHT_NOBITS
  128. Flags: [ SHF_WRITE, SHF_ALLOC ]
  129. Address: 0x0000000000404220
  130. AddressAlign: 0x0000000000000020
  131. Size: 0x00000000000002D8
  132. - Name: .comment
  133. Type: SHT_PROGBITS
  134. Flags: [ SHF_MERGE, SHF_STRINGS ]
  135. AddressAlign: 0x0000000000000001
  136. EntSize: 0x0000000000000001
  137. Content: 4743433A202844656269616E2031302E322E312D33292031302E322E31203230323031323234004743433A202844656269616E2031302E322E312D362B6275696C6432292031302E322E3120323032313031313000
  138. Symbols:
  139. - Name: dummy
  140. Type: STT_FUNC
  141. Section: .text
  142. Value: 0x0000000000401470
  143. Size: 0x0000000000000001
  144. - Name: libc_exit_fini
  145. Type: STT_FUNC
  146. Section: .text
  147. Value: 0x0000000000401480
  148. Size: 0x000000000000003A
  149. - Name: deregister_tm_clones
  150. Type: STT_FUNC
  151. Section: .text
  152. Value: 0x00000000004010A0
  153. - Name: register_tm_clones
  154. Type: STT_FUNC
  155. Section: .text
  156. Value: 0x00000000004010D0
  157. - Name: __do_global_dtors_aux
  158. Type: STT_FUNC
  159. Section: .text
  160. Value: 0x0000000000401110
  161. - Name: completed.0
  162. Type: STT_OBJECT
  163. Section: .bss
  164. Value: 0x0000000000404220
  165. Size: 0x0000000000000001
  166. - Name: __do_global_dtors_aux_fini_array_entry
  167. Type: STT_OBJECT
  168. Section: .fini_array
  169. Value: 0x0000000000403FF0
  170. - Name: frame_dummy
  171. Type: STT_FUNC
  172. Section: .text
  173. Value: 0x0000000000401150
  174. - Name: __frame_dummy_init_array_entry
  175. Type: STT_OBJECT
  176. Section: .init_array
  177. Value: 0x0000000000403FE8
  178. - Name: 'dummy (1)'
  179. Type: STT_FUNC
  180. Section: .text
  181. Value: 0x0000000000401160
  182. Size: 0x0000000000000001
  183. - Name: dummy1
  184. Type: STT_FUNC
  185. Section: .text
  186. Value: 0x0000000000401170
  187. Size: 0x0000000000000001
  188. - Name: libc_start_init
  189. Type: STT_FUNC
  190. Section: .text
  191. Value: 0x00000000004013B0
  192. Size: 0x0000000000000032
  193. - Name: libc_start_main_stage2
  194. Type: STT_FUNC
  195. Section: .text
  196. Value: 0x00000000004013F0
  197. Size: 0x0000000000000031
  198. - Name: static_init_tls
  199. Type: STT_FUNC
  200. Section: .text
  201. Value: 0x00000000004015C0
  202. Size: 0x0000000000000242
  203. - Name: main_tls
  204. Type: STT_OBJECT
  205. Section: .bss
  206. Value: 0x0000000000404360
  207. Size: 0x0000000000000030
  208. - Name: builtin_tls
  209. Type: STT_OBJECT
  210. Section: .bss
  211. Value: 0x00000000004043A0
  212. Size: 0x0000000000000150
  213. - Name: __FRAME_END__
  214. Type: STT_OBJECT
  215. Section: .eh_frame
  216. Value: 0x000000000040234C
  217. - Name: __fini_array_end
  218. Section: .fini_array
  219. Value: 0x0000000000403FF8
  220. - Name: __fini_array_start
  221. Section: .fini_array
  222. Value: 0x0000000000403FF0
  223. - Name: __init_array_end
  224. Section: .init_array
  225. Value: 0x0000000000403FF0
  226. - Name: _GLOBAL_OFFSET_TABLE_
  227. Type: STT_OBJECT
  228. Section: .got.plt
  229. Value: 0x0000000000404000
  230. - Name: __init_array_start
  231. Section: .init_array
  232. Value: 0x0000000000403FE8
  233. - Name: .init
  234. Type: STT_SECTION
  235. Section: .init
  236. Value: 0x0000000000401000
  237. - Name: .text
  238. Type: STT_SECTION
  239. Section: .text
  240. Value: 0x0000000000401010
  241. - Name: .fini
  242. Type: STT_SECTION
  243. Section: .fini
  244. Value: 0x0000000000401869
  245. - Name: .rodata
  246. Type: STT_SECTION
  247. Section: .rodata
  248. Value: 0x0000000000402000
  249. - Name: .eh_frame
  250. Type: STT_SECTION
  251. Section: .eh_frame
  252. Value: 0x0000000000402320
  253. - Name: .init_array
  254. Type: STT_SECTION
  255. Section: .init_array
  256. Value: 0x0000000000403FE8
  257. - Name: .fini_array
  258. Type: STT_SECTION
  259. Section: .fini_array
  260. Value: 0x0000000000403FF0
  261. - Name: .got
  262. Type: STT_SECTION
  263. Section: .got
  264. Value: 0x0000000000403FF8
  265. - Name: .got.plt
  266. Type: STT_SECTION
  267. Section: .got.plt
  268. Value: 0x0000000000404000
  269. - Name: .data
  270. Type: STT_SECTION
  271. Section: .data
  272. Value: 0x0000000000404020
  273. - Name: .bss
  274. Type: STT_SECTION
  275. Section: .bss
  276. Value: 0x0000000000404220
  277. - Name: .comment
  278. Type: STT_SECTION
  279. Section: .comment
  280. - Name: __thread_list_lock
  281. Type: STT_OBJECT
  282. Section: .bss
  283. Binding: STB_GLOBAL
  284. Value: 0x00000000004044F0
  285. Size: 0x0000000000000004
  286. Other: [ STV_HIDDEN ]
  287. - Name: __init_libc
  288. Type: STT_FUNC
  289. Section: .text
  290. Binding: STB_GLOBAL
  291. Value: 0x0000000000401180
  292. Size: 0x0000000000000228
  293. Other: [ STV_HIDDEN ]
  294. - Name: x
  295. Type: STT_OBJECT
  296. Section: .bss
  297. Binding: STB_GLOBAL
  298. Value: 0x0000000000404240
  299. Size: 0x000000000000007B
  300. - Name: __hwcap
  301. Type: STT_OBJECT
  302. Section: .bss
  303. Binding: STB_GLOBAL
  304. Value: 0x00000000004042D8
  305. Size: 0x0000000000000008
  306. Other: [ STV_HIDDEN ]
  307. - Name: memcpy
  308. Type: STT_FUNC
  309. Section: .text
  310. Binding: STB_GLOBAL
  311. Value: 0x0000000000401827
  312. - Name: __TMC_END__
  313. Type: STT_OBJECT
  314. Section: .data
  315. Binding: STB_GLOBAL
  316. Value: 0x0000000000404210
  317. Other: [ STV_HIDDEN ]
  318. - Name: __libc
  319. Type: STT_OBJECT
  320. Section: .bss
  321. Binding: STB_GLOBAL
  322. Value: 0x00000000004042E0
  323. Size: 0x0000000000000068
  324. Other: [ STV_HIDDEN ]
  325. - Name: __dso_handle
  326. Type: STT_OBJECT
  327. Section: .data
  328. Binding: STB_GLOBAL
  329. Value: 0x0000000000404020
  330. Other: [ STV_HIDDEN ]
  331. - Name: __set_thread_area
  332. Type: STT_FUNC
  333. Section: .text
  334. Binding: STB_GLOBAL
  335. Value: 0x0000000000401859
  336. Other: [ STV_HIDDEN ]
  337. - Name: __copy_tls
  338. Type: STT_FUNC
  339. Section: .text
  340. Binding: STB_GLOBAL
  341. Value: 0x0000000000401530
  342. Size: 0x0000000000000089
  343. Other: [ STV_HIDDEN ]
  344. - Name: _environ
  345. Type: STT_OBJECT
  346. Section: .bss
  347. Binding: STB_WEAK
  348. Value: 0x0000000000404348
  349. Size: 0x0000000000000008
  350. - Name: __environ
  351. Type: STT_OBJECT
  352. Section: .bss
  353. Binding: STB_GLOBAL
  354. Value: 0x0000000000404348
  355. Size: 0x0000000000000008
  356. - Name: _Exit
  357. Type: STT_FUNC
  358. Section: .text
  359. Binding: STB_GLOBAL
  360. Value: 0x0000000000401810
  361. Size: 0x0000000000000017
  362. - Name: __init_tls
  363. Type: STT_FUNC
  364. Section: .text
  365. Binding: STB_WEAK
  366. Value: 0x00000000004015C0
  367. Size: 0x0000000000000242
  368. Other: [ STV_HIDDEN ]
  369. - Name: _init
  370. Section: .init
  371. Binding: STB_GLOBAL
  372. Value: 0x0000000000401000
  373. - Name: __funcs_on_exit
  374. Type: STT_FUNC
  375. Section: .text
  376. Binding: STB_WEAK
  377. Value: 0x0000000000401470
  378. Size: 0x0000000000000001
  379. Other: [ STV_HIDDEN ]
  380. - Name: __memcpy_fwd
  381. Section: .text
  382. Binding: STB_GLOBAL
  383. Value: 0x0000000000401827
  384. Other: [ STV_HIDDEN ]
  385. - Name: environ
  386. Type: STT_OBJECT
  387. Section: .bss
  388. Binding: STB_WEAK
  389. Value: 0x0000000000404348
  390. Size: 0x0000000000000008
  391. - Name: z
  392. Type: STT_OBJECT
  393. Section: .rodata
  394. Binding: STB_GLOBAL
  395. Value: 0x0000000000402000
  396. Size: 0x0000000000000315
  397. - Name: ___environ
  398. Type: STT_OBJECT
  399. Section: .bss
  400. Binding: STB_WEAK
  401. Value: 0x0000000000404348
  402. Size: 0x0000000000000008
  403. - Name: __progname
  404. Type: STT_OBJECT
  405. Section: .bss
  406. Binding: STB_GLOBAL
  407. Value: 0x00000000004042D0
  408. Size: 0x0000000000000008
  409. - Name: _start
  410. Section: .text
  411. Binding: STB_GLOBAL
  412. Value: 0x000000000040105A
  413. - Name: _start_c
  414. Type: STT_FUNC
  415. Section: .text
  416. Binding: STB_GLOBAL
  417. Value: 0x0000000000401070
  418. Size: 0x0000000000000024
  419. - Name: program_invocation_short_name
  420. Type: STT_OBJECT
  421. Section: .bss
  422. Binding: STB_WEAK
  423. Value: 0x00000000004042D0
  424. Size: 0x0000000000000008
  425. - Name: __libc_start_init
  426. Type: STT_FUNC
  427. Section: .text
  428. Binding: STB_WEAK
  429. Value: 0x00000000004013B0
  430. Size: 0x0000000000000032
  431. Other: [ STV_HIDDEN ]
  432. - Name: __init_tp
  433. Type: STT_FUNC
  434. Section: .text
  435. Binding: STB_GLOBAL
  436. Value: 0x00000000004014C0
  437. Size: 0x000000000000006B
  438. Other: [ STV_HIDDEN ]
  439. - Name: __init_ssp
  440. Type: STT_FUNC
  441. Section: .text
  442. Binding: STB_WEAK
  443. Value: 0x0000000000401170
  444. Size: 0x0000000000000001
  445. Other: [ STV_HIDDEN ]
  446. - Name: __bss_start
  447. Section: .bss
  448. Binding: STB_GLOBAL
  449. Value: 0x0000000000404210
  450. - Name: main
  451. Type: STT_FUNC
  452. Section: .text
  453. Binding: STB_GLOBAL
  454. Value: 0x0000000000401030
  455. Size: 0x000000000000002A
  456. - Name: __stdio_exit
  457. Type: STT_FUNC
  458. Section: .text
  459. Binding: STB_WEAK
  460. Value: 0x0000000000401470
  461. Size: 0x0000000000000001
  462. - Name: y
  463. Type: STT_OBJECT
  464. Section: .data
  465. Binding: STB_GLOBAL
  466. Value: 0x0000000000404040
  467. Size: 0x00000000000001C8
  468. - Name: _fini
  469. Section: .fini
  470. Binding: STB_GLOBAL
  471. Value: 0x0000000000401869
  472. - Name: __libc_exit_fini
  473. Type: STT_FUNC
  474. Section: .text
  475. Binding: STB_WEAK
  476. Value: 0x0000000000401480
  477. Size: 0x000000000000003A
  478. Other: [ STV_HIDDEN ]
  479. - Name: _edata
  480. Section: .data
  481. Binding: STB_GLOBAL
  482. Value: 0x0000000000404210
  483. - Name: _end
  484. Section: .bss
  485. Binding: STB_GLOBAL
  486. Value: 0x00000000004044F8
  487. - Name: exit
  488. Type: STT_FUNC
  489. Section: .text
  490. Binding: STB_GLOBAL
  491. Value: 0x0000000000401010
  492. Size: 0x000000000000001B
  493. - Name: __libc_start_main
  494. Type: STT_FUNC
  495. Section: .text
  496. Binding: STB_GLOBAL
  497. Value: 0x0000000000401430
  498. Size: 0x0000000000000034
  499. - Name: program_invocation_name
  500. Type: STT_OBJECT
  501. Section: .bss
  502. Binding: STB_WEAK
  503. Value: 0x00000000004042C8
  504. Size: 0x0000000000000008
  505. - Name: __default_stacksize
  506. Type: STT_OBJECT
  507. Section: .data
  508. Binding: STB_GLOBAL
  509. Value: 0x000000000040420C
  510. Size: 0x0000000000000004
  511. Other: [ STV_HIDDEN ]
  512. - Name: __default_guardsize
  513. Type: STT_OBJECT
  514. Section: .data
  515. Binding: STB_GLOBAL
  516. Value: 0x0000000000404208
  517. Size: 0x0000000000000004
  518. Other: [ STV_HIDDEN ]
  519. - Name: __sysinfo
  520. Type: STT_OBJECT
  521. Section: .bss
  522. Binding: STB_GLOBAL
  523. Value: 0x00000000004042C0
  524. Size: 0x0000000000000008
  525. Other: [ STV_HIDDEN ]
  526. - Name: __progname_full
  527. Type: STT_OBJECT
  528. Section: .bss
  529. Binding: STB_GLOBAL
  530. Value: 0x00000000004042C8
  531. Size: 0x0000000000000008
  532. ...
  533. # CHECK: FILE MAP:
  534. # CHECK: 0000-0040 64 [Unmapped] [ELF Header]
  535. # CHECK: 0040-0190 336 [Unmapped] [ELF Program Headers]
  536. # CHECK: 0190-01a0 16 LOAD #1 [RX] .init
  537. # CHECK: 01a0-09f9 2137 LOAD #1 [RX] .text
  538. # CHECK: 09f9-0a00 7 LOAD #1 [RX] .fini
  539. # CHECK: 0a00-0d20 800 LOAD #2 [R] .rodata
  540. # CHECK: 0d20-0d50 48 LOAD #2 [R] .eh_frame
  541. # CHECK: 0d50-0d58 8 LOAD #3 [RW] .init_array
  542. # CHECK: 0d58-0d60 8 LOAD #3 [RW] .fini_array
  543. # CHECK: 0d60-0d68 8 LOAD #3 [RW] .got
  544. # CHECK: 0d68-0d80 24 LOAD #3 [RW] .got.plt
  545. # CHECK: 0d80-0f78 504 LOAD #3 [RW] .data
  546. # CHECK: 0f78-0f80 8 [Unmapped] .data
  547. # CHECK: 0f80-0fd8 88 [Unmapped] .comment
  548. # CHECK: 0fd8-1710 1848 [Unmapped] .symtab
  549. # CHECK: 1710-1a43 819 [Unmapped] .strtab
  550. # CHECK: 1a43-1ac0 125 [Unmapped] .shstrtab
  551. # CHECK: 1ac0-1ec0 1024 [Unmapped] [ELF Section Headers]
  552. # CHECK: VM MAP:
  553. # CHECK: 000000-401000 4198400 [-- Nothing mapped --]
  554. # CHECK: 401000-401010 16 LOAD #1 [RX] .init
  555. # CHECK: 401010-401869 2137 LOAD #1 [RX] .text
  556. # CHECK: 401869-40186c 3 LOAD #1 [RX] .fini
  557. # CHECK: 40186c-402000 1940 [-- Nothing mapped --]
  558. # CHECK: 402000-402320 800 LOAD #2 [R] .rodata
  559. # CHECK: 402320-402350 48 LOAD #2 [R] .eh_frame
  560. # CHECK: 402350-403fe8 7320 [-- Nothing mapped --]
  561. # CHECK: 403fe8-403ff0 8 LOAD #3 [RW] .init_array
  562. # CHECK: 403ff0-403ff8 8 LOAD #3 [RW] .fini_array
  563. # CHECK: 403ff8-404000 8 LOAD #3 [RW] .got
  564. # CHECK: 404000-404020 32 LOAD #3 [RW] .got.plt
  565. # CHECK: 404020-404220 512 LOAD #3 [RW] .data
  566. # CHECK: 404220-4044f8 728 LOAD #3 [RW] .bss