├── .gitignore ├── .merlin ├── LICENSE ├── Makefile ├── README.md ├── _oasis ├── _tags ├── configure ├── lib ├── E2j.ml ├── E2j_ByteCoverage.ml ├── E2j_ElfDynamic.ml ├── E2j_ElfHeader.ml ├── E2j_ElfProgramHeader.ml ├── E2j_ElfReloc.ml ├── E2j_ElfSectionHeader.ml ├── E2j_ElfSymbolTable.ml ├── E2j_Json.ml ├── META ├── e2jlib.mldylib └── e2jlib.mllib ├── myocamlbuild.ml ├── opam ├── descr ├── files │ ├── _oasis_remove_.ml │ └── elf2json.install └── opam ├── output └── other.b64.min.json ├── setup.ml └── src └── elf2json.ml /.gitignore: -------------------------------------------------------------------------------- 1 | build 2 | bin 3 | *~ 4 | -------------------------------------------------------------------------------- /.merlin: -------------------------------------------------------------------------------- 1 | PKG jsonm 2 | PKG rdr 3 | PKG rdr.elf 4 | PKG base64 5 | 6 | S src 7 | S lib 8 | B _build/src 9 | B _build/lib -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015, 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | * Neither the name of elf2json nor the names of its 15 | contributors may be used to endorse or promote products derived from 16 | this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 22 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 24 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 25 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 26 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | 29 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | # OASIS_START 2 | # DO NOT EDIT (digest: a3c674b4239234cbbe53afe090018954) 3 | 4 | SETUP = ocaml setup.ml 5 | 6 | build: setup.data 7 | $(SETUP) -build $(BUILDFLAGS) 8 | 9 | doc: setup.data build 10 | $(SETUP) -doc $(DOCFLAGS) 11 | 12 | test: setup.data build 13 | $(SETUP) -test $(TESTFLAGS) 14 | 15 | all: 16 | $(SETUP) -all $(ALLFLAGS) 17 | 18 | install: setup.data 19 | $(SETUP) -install $(INSTALLFLAGS) 20 | 21 | uninstall: setup.data 22 | $(SETUP) -uninstall $(UNINSTALLFLAGS) 23 | 24 | reinstall: setup.data 25 | $(SETUP) -reinstall $(REINSTALLFLAGS) 26 | 27 | clean: 28 | $(SETUP) -clean $(CLEANFLAGS) 29 | 30 | distclean: 31 | $(SETUP) -distclean $(DISTCLEANFLAGS) 32 | 33 | setup.data: 34 | $(SETUP) -configure $(CONFIGUREFLAGS) 35 | 36 | configure: 37 | $(SETUP) -configure $(CONFIGUREFLAGS) 38 | 39 | .PHONY: build doc test all install uninstall reinstall clean distclean configure 40 | 41 | # OASIS_STOP 42 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # elf2json 2 | 3 | Converts an ELF binary to a JSON representation, because it's 2015 and everything should be converted to JSON, and why not? 4 | 5 | **New Features** 6 | 7 | * `elf2json -o symbolTable` : selectively print keys from the JSON representation 8 | * `symbolTable` and `dynamicSymbols` are now sorted by address. 9 | * `slideSectors` key added, which is an object with `begin`, `end`, and `slide` fields which give values to subtract from the VM address of a symbol, to give its binary on-disk offset location (if it has one). 10 | 11 | # Install 12 | 13 | Easy: 14 | 15 | ```bash 16 | opam install elf2json 17 | ``` 18 | 19 | Build and Install: 20 | 21 | ```bash 22 | make && make install 23 | ``` 24 | 25 | or: 26 | 27 | ```bash 28 | ocaml setup.ml -configure && ocaml setup.ml -build && sudo ocaml setup.ml -install 29 | ``` 30 | 31 | # Usage 32 | 33 | Most basic: 34 | 35 | `elf2json ` 36 | 37 | Minified: 38 | 39 | `elf2json -m ` 40 | 41 | With base64 encoded binary: 42 | 43 | `elf2json -b ` 44 | 45 | With byte-coverage analysis: 46 | 47 | `elf2json -c ` 48 | 49 | # Example 50 | 51 | ```json 52 | { 53 | "header": { 54 | "value": { 55 | "e_ident": { 56 | "ei_magic": "0x464c457f", 57 | "ei_class": "0x2", 58 | "ei_data": "0x1", 59 | "ei_version": "0x1", 60 | "ei_osabi": "0x0", 61 | "ei_abiversion": "0x0", 62 | "ei_pad": "0x0" 63 | }, 64 | "e_type": "0x2", 65 | "e_machine": "0x3e", 66 | "e_version": "0x1", 67 | "e_entry": "0x400420", 68 | "e_phoff": "0x40", 69 | "e_shoff": "0x12f8", 70 | "e_flags": "0x0", 71 | "e_ehsize": "0x40", 72 | "e_phentsize": "0x38", 73 | "e_phnum": "0x8", 74 | "e_shentsize": "0x40", 75 | "e_shnum": "0x1e", 76 | "e_shstrndx": "0x1b", 77 | "machine": "X86_64", 78 | "type": "EXEC" 79 | }, 80 | "meta": { 81 | "bytes": [ 82 | 16, 83 | 2, 84 | 2, 85 | 4, 86 | 8, 87 | 8, 88 | 8, 89 | 4, 90 | 2, 91 | 2, 92 | 2, 93 | 2, 94 | 2, 95 | 2 96 | ], 97 | "prefix": "e_" 98 | } 99 | }, 100 | "programHeaders": { 101 | "value": [ 102 | { 103 | "p_type": "0x6", 104 | "p_flags": "0x5", 105 | "p_offset": "0x40", 106 | "p_vaddr": "0x400040", 107 | "p_paddr": "0x400040", 108 | "p_filesz": "0x1c0", 109 | "p_memsz": "0x1c0", 110 | "p_align": "0x8", 111 | "type": "PT_PHDR", 112 | "flags": "R+X" 113 | }, 114 | { 115 | "p_type": "0x3", 116 | "p_flags": "0x4", 117 | "p_offset": "0x200", 118 | "p_vaddr": "0x400200", 119 | "p_paddr": "0x400200", 120 | "p_filesz": "0x1c", 121 | "p_memsz": "0x1c", 122 | "p_align": "0x1", 123 | "type": "PT_INTERP", 124 | "flags": "R" 125 | }, 126 | { 127 | "p_type": "0x1", 128 | "p_flags": "0x5", 129 | "p_offset": "0x0", 130 | "p_vaddr": "0x400000", 131 | "p_paddr": "0x400000", 132 | "p_filesz": "0x714", 133 | "p_memsz": "0x714", 134 | "p_align": "0x200000", 135 | "type": "PT_LOAD", 136 | "flags": "R+X" 137 | }, 138 | { 139 | "p_type": "0x1", 140 | "p_flags": "0x6", 141 | "p_offset": "0x718", 142 | "p_vaddr": "0x600718", 143 | "p_paddr": "0x600718", 144 | "p_filesz": "0x240", 145 | "p_memsz": "0x248", 146 | "p_align": "0x200000", 147 | "type": "PT_LOAD", 148 | "flags": "RW" 149 | }, 150 | { 151 | "p_type": "0x2", 152 | "p_flags": "0x6", 153 | "p_offset": "0x730", 154 | "p_vaddr": "0x600730", 155 | "p_paddr": "0x600730", 156 | "p_filesz": "0x1e0", 157 | "p_memsz": "0x1e0", 158 | "p_align": "0x8", 159 | "type": "PT_DYNAMIC", 160 | "flags": "RW" 161 | }, 162 | { 163 | "p_type": "0x4", 164 | "p_flags": "0x4", 165 | "p_offset": "0x21c", 166 | "p_vaddr": "0x40021c", 167 | "p_paddr": "0x40021c", 168 | "p_filesz": "0x44", 169 | "p_memsz": "0x44", 170 | "p_align": "0x4", 171 | "type": "PT_NOTE", 172 | "flags": "R" 173 | }, 174 | { 175 | "p_type": "0x6474e550", 176 | "p_flags": "0x4", 177 | "p_offset": "0x5e8", 178 | "p_vaddr": "0x4005e8", 179 | "p_paddr": "0x4005e8", 180 | "p_filesz": "0x34", 181 | "p_memsz": "0x34", 182 | "p_align": "0x4", 183 | "type": "PT_GNU_EH_FRAME", 184 | "flags": "R" 185 | }, 186 | { 187 | "p_type": "0x6474e551", 188 | "p_flags": "0x6", 189 | "p_offset": "0x0", 190 | "p_vaddr": "0x0", 191 | "p_paddr": "0x0", 192 | "p_filesz": "0x0", 193 | "p_memsz": "0x0", 194 | "p_align": "0x10", 195 | "type": "PT_GNU_STACK", 196 | "flags": "RW" 197 | } 198 | ], 199 | "meta": { 200 | "bytes": [ 201 | 4, 202 | 4, 203 | 8, 204 | 8, 205 | 8, 206 | 8, 207 | 8, 208 | 8 209 | ], 210 | "prefix": "p_" 211 | } 212 | }, 213 | "sectionHeaders": { 214 | "value": [ 215 | { 216 | "sh_type": "0x0", 217 | "sh_flags": "0x0", 218 | "sh_addr": "0x0", 219 | "sh_offset": "0x0", 220 | "sh_size": "0x0", 221 | "sh_link": "0x0", 222 | "sh_info": "0x0", 223 | "sh_addralign": "0x0", 224 | "sh_entsize": "0x0", 225 | "name": "", 226 | "type": "NULL" 227 | }, 228 | { 229 | "sh_type": "0x1", 230 | "sh_flags": "0x2", 231 | "sh_addr": "0x400200", 232 | "sh_offset": "0x200", 233 | "sh_size": "0x1c", 234 | "sh_link": "0x0", 235 | "sh_info": "0x0", 236 | "sh_addralign": "0x1", 237 | "sh_entsize": "0x0", 238 | "name": ".interp", 239 | "type": "PROGBITS" 240 | }, 241 | { 242 | "sh_type": "0x7", 243 | "sh_flags": "0x2", 244 | "sh_addr": "0x40021c", 245 | "sh_offset": "0x21c", 246 | "sh_size": "0x20", 247 | "sh_link": "0x0", 248 | "sh_info": "0x0", 249 | "sh_addralign": "0x4", 250 | "sh_entsize": "0x0", 251 | "name": ".note.ABI-tag", 252 | "type": "NOTE" 253 | }, 254 | { 255 | "sh_type": "0x7", 256 | "sh_flags": "0x2", 257 | "sh_addr": "0x40023c", 258 | "sh_offset": "0x23c", 259 | "sh_size": "0x24", 260 | "sh_link": "0x0", 261 | "sh_info": "0x0", 262 | "sh_addralign": "0x4", 263 | "sh_entsize": "0x0", 264 | "name": ".note.gnu.build-id", 265 | "type": "NOTE" 266 | }, 267 | { 268 | "sh_type": "0x6ffffff6", 269 | "sh_flags": "0x2", 270 | "sh_addr": "0x400260", 271 | "sh_offset": "0x260", 272 | "sh_size": "0x1c", 273 | "sh_link": "0x5", 274 | "sh_info": "0x0", 275 | "sh_addralign": "0x8", 276 | "sh_entsize": "0x0", 277 | "name": ".gnu.hash", 278 | "type": "GNU_HASH" 279 | }, 280 | { 281 | "sh_type": "0xb", 282 | "sh_flags": "0x2", 283 | "sh_addr": "0x400280", 284 | "sh_offset": "0x280", 285 | "sh_size": "0x60", 286 | "sh_link": "0x6", 287 | "sh_info": "0x1", 288 | "sh_addralign": "0x8", 289 | "sh_entsize": "0x18", 290 | "name": ".dynsym", 291 | "type": "DYNSYM" 292 | }, 293 | { 294 | "sh_type": "0x3", 295 | "sh_flags": "0x2", 296 | "sh_addr": "0x4002e0", 297 | "sh_offset": "0x2e0", 298 | "sh_size": "0x54", 299 | "sh_link": "0x0", 300 | "sh_info": "0x0", 301 | "sh_addralign": "0x1", 302 | "sh_entsize": "0x0", 303 | "name": ".dynstr", 304 | "type": "STRTAB" 305 | }, 306 | { 307 | "sh_type": "0x6fffffff", 308 | "sh_flags": "0x2", 309 | "sh_addr": "0x400334", 310 | "sh_offset": "0x334", 311 | "sh_size": "0x8", 312 | "sh_link": "0x5", 313 | "sh_info": "0x0", 314 | "sh_addralign": "0x2", 315 | "sh_entsize": "0x2", 316 | "name": ".gnu.version", 317 | "type": "GNU_versym" 318 | }, 319 | { 320 | "sh_type": "0x6ffffffe", 321 | "sh_flags": "0x2", 322 | "sh_addr": "0x400340", 323 | "sh_offset": "0x340", 324 | "sh_size": "0x20", 325 | "sh_link": "0x6", 326 | "sh_info": "0x1", 327 | "sh_addralign": "0x8", 328 | "sh_entsize": "0x0", 329 | "name": ".gnu.version_r", 330 | "type": "GNU_verneed" 331 | }, 332 | { 333 | "sh_type": "0x4", 334 | "sh_flags": "0x2", 335 | "sh_addr": "0x400360", 336 | "sh_offset": "0x360", 337 | "sh_size": "0x18", 338 | "sh_link": "0x5", 339 | "sh_info": "0x0", 340 | "sh_addralign": "0x8", 341 | "sh_entsize": "0x18", 342 | "name": ".rela.dyn", 343 | "type": "RELA" 344 | }, 345 | { 346 | "sh_type": "0x4", 347 | "sh_flags": "0x42", 348 | "sh_addr": "0x400378", 349 | "sh_offset": "0x378", 350 | "sh_size": "0x48", 351 | "sh_link": "0x5", 352 | "sh_info": "0xc", 353 | "sh_addralign": "0x8", 354 | "sh_entsize": "0x18", 355 | "name": ".rela.plt", 356 | "type": "RELA" 357 | }, 358 | { 359 | "sh_type": "0x1", 360 | "sh_flags": "0x6", 361 | "sh_addr": "0x4003c0", 362 | "sh_offset": "0x3c0", 363 | "sh_size": "0x1a", 364 | "sh_link": "0x0", 365 | "sh_info": "0x0", 366 | "sh_addralign": "0x4", 367 | "sh_entsize": "0x0", 368 | "name": ".init", 369 | "type": "PROGBITS" 370 | }, 371 | { 372 | "sh_type": "0x1", 373 | "sh_flags": "0x6", 374 | "sh_addr": "0x4003e0", 375 | "sh_offset": "0x3e0", 376 | "sh_size": "0x40", 377 | "sh_link": "0x0", 378 | "sh_info": "0x0", 379 | "sh_addralign": "0x10", 380 | "sh_entsize": "0x10", 381 | "name": ".plt", 382 | "type": "PROGBITS" 383 | }, 384 | { 385 | "sh_type": "0x1", 386 | "sh_flags": "0x6", 387 | "sh_addr": "0x400420", 388 | "sh_offset": "0x420", 389 | "sh_size": "0x1a2", 390 | "sh_link": "0x0", 391 | "sh_info": "0x0", 392 | "sh_addralign": "0x10", 393 | "sh_entsize": "0x0", 394 | "name": ".text", 395 | "type": "PROGBITS" 396 | }, 397 | { 398 | "sh_type": "0x1", 399 | "sh_flags": "0x6", 400 | "sh_addr": "0x4005c4", 401 | "sh_offset": "0x5c4", 402 | "sh_size": "0x9", 403 | "sh_link": "0x0", 404 | "sh_info": "0x0", 405 | "sh_addralign": "0x4", 406 | "sh_entsize": "0x0", 407 | "name": ".fini", 408 | "type": "PROGBITS" 409 | }, 410 | { 411 | "sh_type": "0x1", 412 | "sh_flags": "0x2", 413 | "sh_addr": "0x4005d0", 414 | "sh_offset": "0x5d0", 415 | "sh_size": "0x15", 416 | "sh_link": "0x0", 417 | "sh_info": "0x0", 418 | "sh_addralign": "0x4", 419 | "sh_entsize": "0x0", 420 | "name": ".rodata", 421 | "type": "PROGBITS" 422 | }, 423 | { 424 | "sh_type": "0x1", 425 | "sh_flags": "0x2", 426 | "sh_addr": "0x4005e8", 427 | "sh_offset": "0x5e8", 428 | "sh_size": "0x34", 429 | "sh_link": "0x0", 430 | "sh_info": "0x0", 431 | "sh_addralign": "0x4", 432 | "sh_entsize": "0x0", 433 | "name": ".eh_frame_hdr", 434 | "type": "PROGBITS" 435 | }, 436 | { 437 | "sh_type": "0x1", 438 | "sh_flags": "0x2", 439 | "sh_addr": "0x400620", 440 | "sh_offset": "0x620", 441 | "sh_size": "0xf4", 442 | "sh_link": "0x0", 443 | "sh_info": "0x0", 444 | "sh_addralign": "0x8", 445 | "sh_entsize": "0x0", 446 | "name": ".eh_frame", 447 | "type": "PROGBITS" 448 | }, 449 | { 450 | "sh_type": "0xe", 451 | "sh_flags": "0x3", 452 | "sh_addr": "0x600718", 453 | "sh_offset": "0x718", 454 | "sh_size": "0x8", 455 | "sh_link": "0x0", 456 | "sh_info": "0x0", 457 | "sh_addralign": "0x8", 458 | "sh_entsize": "0x0", 459 | "name": ".init_array", 460 | "type": "INIT_ARRAY" 461 | }, 462 | { 463 | "sh_type": "0xf", 464 | "sh_flags": "0x3", 465 | "sh_addr": "0x600720", 466 | "sh_offset": "0x720", 467 | "sh_size": "0x8", 468 | "sh_link": "0x0", 469 | "sh_info": "0x0", 470 | "sh_addralign": "0x8", 471 | "sh_entsize": "0x0", 472 | "name": ".fini_array", 473 | "type": "FINI_ARRAY" 474 | }, 475 | { 476 | "sh_type": "0x1", 477 | "sh_flags": "0x3", 478 | "sh_addr": "0x600728", 479 | "sh_offset": "0x728", 480 | "sh_size": "0x8", 481 | "sh_link": "0x0", 482 | "sh_info": "0x0", 483 | "sh_addralign": "0x8", 484 | "sh_entsize": "0x0", 485 | "name": ".jcr", 486 | "type": "PROGBITS" 487 | }, 488 | { 489 | "sh_type": "0x6", 490 | "sh_flags": "0x3", 491 | "sh_addr": "0x600730", 492 | "sh_offset": "0x730", 493 | "sh_size": "0x1e0", 494 | "sh_link": "0x6", 495 | "sh_info": "0x0", 496 | "sh_addralign": "0x8", 497 | "sh_entsize": "0x10", 498 | "name": ".dynamic", 499 | "type": "DYNAMIC" 500 | }, 501 | { 502 | "sh_type": "0x1", 503 | "sh_flags": "0x3", 504 | "sh_addr": "0x600910", 505 | "sh_offset": "0x910", 506 | "sh_size": "0x8", 507 | "sh_link": "0x0", 508 | "sh_info": "0x0", 509 | "sh_addralign": "0x8", 510 | "sh_entsize": "0x8", 511 | "name": ".got", 512 | "type": "PROGBITS" 513 | }, 514 | { 515 | "sh_type": "0x1", 516 | "sh_flags": "0x3", 517 | "sh_addr": "0x600918", 518 | "sh_offset": "0x918", 519 | "sh_size": "0x30", 520 | "sh_link": "0x0", 521 | "sh_info": "0x0", 522 | "sh_addralign": "0x8", 523 | "sh_entsize": "0x8", 524 | "name": ".got.plt", 525 | "type": "PROGBITS" 526 | }, 527 | { 528 | "sh_type": "0x1", 529 | "sh_flags": "0x3", 530 | "sh_addr": "0x600948", 531 | "sh_offset": "0x948", 532 | "sh_size": "0x10", 533 | "sh_link": "0x0", 534 | "sh_info": "0x0", 535 | "sh_addralign": "0x8", 536 | "sh_entsize": "0x0", 537 | "name": ".data", 538 | "type": "PROGBITS" 539 | }, 540 | { 541 | "sh_type": "0x8", 542 | "sh_flags": "0x3", 543 | "sh_addr": "0x600958", 544 | "sh_offset": "0x958", 545 | "sh_size": "0x8", 546 | "sh_link": "0x0", 547 | "sh_info": "0x0", 548 | "sh_addralign": "0x1", 549 | "sh_entsize": "0x0", 550 | "name": ".bss", 551 | "type": "NOBITS" 552 | }, 553 | { 554 | "sh_type": "0x1", 555 | "sh_flags": "0x30", 556 | "sh_addr": "0x0", 557 | "sh_offset": "0x958", 558 | "sh_size": "0x27", 559 | "sh_link": "0x0", 560 | "sh_info": "0x0", 561 | "sh_addralign": "0x1", 562 | "sh_entsize": "0x1", 563 | "name": ".comment", 564 | "type": "PROGBITS" 565 | }, 566 | { 567 | "sh_type": "0x3", 568 | "sh_flags": "0x0", 569 | "sh_addr": "0x0", 570 | "sh_offset": "0x97f", 571 | "sh_size": "0x108", 572 | "sh_link": "0x0", 573 | "sh_info": "0x0", 574 | "sh_addralign": "0x1", 575 | "sh_entsize": "0x0", 576 | "name": ".shstrtab", 577 | "type": "STRTAB" 578 | }, 579 | { 580 | "sh_type": "0x2", 581 | "sh_flags": "0x0", 582 | "sh_addr": "0x0", 583 | "sh_offset": "0xa88", 584 | "sh_size": "0x630", 585 | "sh_link": "0x1d", 586 | "sh_info": "0x2e", 587 | "sh_addralign": "0x8", 588 | "sh_entsize": "0x18", 589 | "name": ".symtab", 590 | "type": "SYMTAB" 591 | }, 592 | { 593 | "sh_type": "0x3", 594 | "sh_flags": "0x0", 595 | "sh_addr": "0x0", 596 | "sh_offset": "0x10b8", 597 | "sh_size": "0x240", 598 | "sh_link": "0x0", 599 | "sh_info": "0x0", 600 | "sh_addralign": "0x1", 601 | "sh_entsize": "0x0", 602 | "name": ".strtab", 603 | "type": "STRTAB" 604 | } 605 | ], 606 | "meta": { 607 | "bytes": [ 608 | 4, 609 | 4, 610 | 8, 611 | 8, 612 | 8, 613 | 8, 614 | 4, 615 | 4, 616 | 8, 617 | 8 618 | ], 619 | "prefix": "sh_" 620 | } 621 | }, 622 | "_dynamic": { 623 | "value": [ 624 | { 625 | "d_tag": "0x1", 626 | "d_un": "0x1", 627 | "name": "NEEDED" 628 | }, 629 | { 630 | "d_tag": "0x1", 631 | "d_un": "0x16", 632 | "name": "NEEDED" 633 | }, 634 | { 635 | "d_tag": "0xc", 636 | "d_un": "0x4003c0", 637 | "name": "INIT " 638 | }, 639 | { 640 | "d_tag": "0xd", 641 | "d_un": "0x4005c4", 642 | "name": "FINI " 643 | }, 644 | { 645 | "d_tag": "0x19", 646 | "d_un": "0x600718", 647 | "name": "INIT_ARRAY" 648 | }, 649 | { 650 | "d_tag": "0x1b", 651 | "d_un": "0x8", 652 | "name": "INIT_ARRAYSZ" 653 | }, 654 | { 655 | "d_tag": "0x1a", 656 | "d_un": "0x600720", 657 | "name": "FINI_ARRAY" 658 | }, 659 | { 660 | "d_tag": "0x1c", 661 | "d_un": "0x8", 662 | "name": "FINI_ARRAYSZ" 663 | }, 664 | { 665 | "d_tag": "0x6ffffef5", 666 | "d_un": "0x400260", 667 | "name": "GNU_HASH" 668 | }, 669 | { 670 | "d_tag": "0x5", 671 | "d_un": "0x4002e0", 672 | "name": "STRTAB " 673 | }, 674 | { 675 | "d_tag": "0x6", 676 | "d_un": "0x400280", 677 | "name": "SYMTAB " 678 | }, 679 | { 680 | "d_tag": "0xa", 681 | "d_un": "0x54", 682 | "name": "STRSZ" 683 | }, 684 | { 685 | "d_tag": "0xb", 686 | "d_un": "0x18", 687 | "name": "SYMENT " 688 | }, 689 | { 690 | "d_tag": "0x15", 691 | "d_un": "0x0", 692 | "name": "DEBUG" 693 | }, 694 | { 695 | "d_tag": "0x3", 696 | "d_un": "0x600918", 697 | "name": "PLTGOT " 698 | }, 699 | { 700 | "d_tag": "0x2", 701 | "d_un": "0x48", 702 | "name": "PLTRELSZ" 703 | }, 704 | { 705 | "d_tag": "0x14", 706 | "d_un": "0x7", 707 | "name": "PLTREL" 708 | }, 709 | { 710 | "d_tag": "0x17", 711 | "d_un": "0x400378", 712 | "name": "JMPREL" 713 | }, 714 | { 715 | "d_tag": "0x7", 716 | "d_un": "0x400360", 717 | "name": "RELA" 718 | }, 719 | { 720 | "d_tag": "0x8", 721 | "d_un": "0x18", 722 | "name": "RELASZ " 723 | }, 724 | { 725 | "d_tag": "0x9", 726 | "d_un": "0x18", 727 | "name": "RELAENT " 728 | }, 729 | { 730 | "d_tag": "0x6ffffffe", 731 | "d_un": "0x400340", 732 | "name": "VERNEED" 733 | }, 734 | { 735 | "d_tag": "0x6fffffff", 736 | "d_un": "0x1", 737 | "name": "VERNEEDNUM" 738 | }, 739 | { 740 | "d_tag": "0x6ffffff0", 741 | "d_un": "0x400334", 742 | "name": "VERSYM" 743 | } 744 | ], 745 | "meta": { 746 | "bytes": [ 747 | 8, 748 | 8 749 | ], 750 | "prefix": "d_" 751 | } 752 | }, 753 | "dynamicSymbols": { 754 | "value": [ 755 | { 756 | "st_name": "0x0", 757 | "st_info": "0x0", 758 | "st_other": "0x0", 759 | "st_shndx": "0x0", 760 | "st_value": "0x0", 761 | "st_size": "0x0", 762 | "name": "", 763 | "visibility": "DEFAULT", 764 | "bind": "LOCAL", 765 | "type": "NOTYPE" 766 | }, 767 | { 768 | "st_name": "0x20", 769 | "st_info": "0x12", 770 | "st_other": "0x0", 771 | "st_shndx": "0x0", 772 | "st_value": "0x0", 773 | "st_size": "0x0", 774 | "name": "printf", 775 | "visibility": "DEFAULT", 776 | "bind": "GLOBAL", 777 | "type": "FUNC" 778 | }, 779 | { 780 | "st_name": "0x27", 781 | "st_info": "0x12", 782 | "st_other": "0x0", 783 | "st_shndx": "0x0", 784 | "st_value": "0x0", 785 | "st_size": "0x0", 786 | "name": "__libc_start_main", 787 | "visibility": "DEFAULT", 788 | "bind": "GLOBAL", 789 | "type": "FUNC" 790 | }, 791 | { 792 | "st_name": "0x39", 793 | "st_info": "0x20", 794 | "st_other": "0x0", 795 | "st_shndx": "0x0", 796 | "st_value": "0x0", 797 | "st_size": "0x0", 798 | "name": "__gmon_start__", 799 | "visibility": "DEFAULT", 800 | "bind": "WEAK", 801 | "type": "NOTYPE" 802 | } 803 | ], 804 | "meta": { 805 | "bytes": [ 806 | 4, 807 | 1, 808 | 1, 809 | 2, 810 | 8, 811 | 8 812 | ], 813 | "prefix": "st_" 814 | } 815 | }, 816 | "symbolTable": { 817 | "value": [ 818 | { 819 | "st_name": "0x23a", 820 | "st_info": "0x12", 821 | "st_other": "0x0", 822 | "st_shndx": "0xb", 823 | "st_value": "0x4003c0", 824 | "st_size": "0x0", 825 | "name": "_init", 826 | "visibility": "DEFAULT", 827 | "bind": "GLOBAL", 828 | "type": "FUNC" 829 | }, 830 | { 831 | "st_name": "0x220", 832 | "st_info": "0x20", 833 | "st_other": "0x0", 834 | "st_shndx": "0x0", 835 | "st_value": "0x0", 836 | "st_size": "0x0", 837 | "name": "_ITM_registerTMCloneTable", 838 | "visibility": "DEFAULT", 839 | "bind": "WEAK", 840 | "type": "NOTYPE" 841 | }, 842 | { 843 | "st_name": "0x214", 844 | "st_info": "0x11", 845 | "st_other": "0x2", 846 | "st_shndx": "0x18", 847 | "st_value": "0x600958", 848 | "st_size": "0x0", 849 | "name": "__TMC_END__", 850 | "visibility": "HIDDEN", 851 | "bind": "GLOBAL", 852 | "type": "OBJECT" 853 | }, 854 | { 855 | "st_name": "0x200", 856 | "st_info": "0x20", 857 | "st_other": "0x0", 858 | "st_shndx": "0x0", 859 | "st_value": "0x0", 860 | "st_size": "0x0", 861 | "name": "_Jv_RegisterClasses", 862 | "visibility": "DEFAULT", 863 | "bind": "WEAK", 864 | "type": "NOTYPE" 865 | }, 866 | { 867 | "st_name": "0x1fb", 868 | "st_info": "0x12", 869 | "st_other": "0x0", 870 | "st_shndx": "0xd", 871 | "st_value": "0x400516", 872 | "st_size": "0x2d", 873 | "name": "main", 874 | "visibility": "DEFAULT", 875 | "bind": "GLOBAL", 876 | "type": "FUNC" 877 | }, 878 | { 879 | "st_name": "0x1ef", 880 | "st_info": "0x10", 881 | "st_other": "0x0", 882 | "st_shndx": "0x19", 883 | "st_value": "0x600958", 884 | "st_size": "0x0", 885 | "name": "__bss_start", 886 | "visibility": "DEFAULT", 887 | "bind": "GLOBAL", 888 | "type": "NOTYPE" 889 | }, 890 | { 891 | "st_name": "0x1e8", 892 | "st_info": "0x12", 893 | "st_other": "0x0", 894 | "st_shndx": "0xd", 895 | "st_value": "0x400420", 896 | "st_size": "0x2a", 897 | "name": "_start", 898 | "visibility": "DEFAULT", 899 | "bind": "GLOBAL", 900 | "type": "FUNC" 901 | }, 902 | { 903 | "st_name": "0x1e3", 904 | "st_info": "0x10", 905 | "st_other": "0x0", 906 | "st_shndx": "0x19", 907 | "st_value": "0x600960", 908 | "st_size": "0x0", 909 | "name": "_end", 910 | "visibility": "DEFAULT", 911 | "bind": "GLOBAL", 912 | "type": "NOTYPE" 913 | }, 914 | { 915 | "st_name": "0x1d3", 916 | "st_info": "0x12", 917 | "st_other": "0x0", 918 | "st_shndx": "0xd", 919 | "st_value": "0x400550", 920 | "st_size": "0x65", 921 | "name": "__libc_csu_init", 922 | "visibility": "DEFAULT", 923 | "bind": "GLOBAL", 924 | "type": "FUNC" 925 | }, 926 | { 927 | "st_name": "0x1c4", 928 | "st_info": "0x11", 929 | "st_other": "0x0", 930 | "st_shndx": "0xf", 931 | "st_value": "0x4005d0", 932 | "st_size": "0x4", 933 | "name": "_IO_stdin_used", 934 | "visibility": "DEFAULT", 935 | "bind": "GLOBAL", 936 | "type": "OBJECT" 937 | }, 938 | { 939 | "st_name": "0x1b7", 940 | "st_info": "0x11", 941 | "st_other": "0x2", 942 | "st_shndx": "0x18", 943 | "st_value": "0x600950", 944 | "st_size": "0x0", 945 | "name": "__dso_handle", 946 | "visibility": "HIDDEN", 947 | "bind": "GLOBAL", 948 | "type": "OBJECT" 949 | }, 950 | { 951 | "st_name": "0x1a8", 952 | "st_info": "0x20", 953 | "st_other": "0x0", 954 | "st_shndx": "0x0", 955 | "st_value": "0x0", 956 | "st_size": "0x0", 957 | "name": "__gmon_start__", 958 | "visibility": "DEFAULT", 959 | "bind": "WEAK", 960 | "type": "NOTYPE" 961 | }, 962 | { 963 | "st_name": "0x19b", 964 | "st_info": "0x10", 965 | "st_other": "0x0", 966 | "st_shndx": "0x18", 967 | "st_value": "0x600948", 968 | "st_size": "0x0", 969 | "name": "__data_start", 970 | "visibility": "DEFAULT", 971 | "bind": "GLOBAL", 972 | "type": "NOTYPE" 973 | }, 974 | { 975 | "st_name": "0x17c", 976 | "st_info": "0x12", 977 | "st_other": "0x0", 978 | "st_shndx": "0x0", 979 | "st_value": "0x0", 980 | "st_size": "0x0", 981 | "name": "__libc_start_main@@GLIBC_2.2.5", 982 | "visibility": "DEFAULT", 983 | "bind": "GLOBAL", 984 | "type": "FUNC" 985 | }, 986 | { 987 | "st_name": "0x168", 988 | "st_info": "0x12", 989 | "st_other": "0x0", 990 | "st_shndx": "0x0", 991 | "st_value": "0x0", 992 | "st_size": "0x0", 993 | "name": "printf@@GLIBC_2.2.5", 994 | "visibility": "DEFAULT", 995 | "bind": "GLOBAL", 996 | "type": "FUNC" 997 | }, 998 | { 999 | "st_name": "0x162", 1000 | "st_info": "0x12", 1001 | "st_other": "0x0", 1002 | "st_shndx": "0xe", 1003 | "st_value": "0x4005c4", 1004 | "st_size": "0x0", 1005 | "name": "_fini", 1006 | "visibility": "DEFAULT", 1007 | "bind": "GLOBAL", 1008 | "type": "FUNC" 1009 | }, 1010 | { 1011 | "st_name": "0x15b", 1012 | "st_info": "0x10", 1013 | "st_other": "0x0", 1014 | "st_shndx": "0x18", 1015 | "st_value": "0x600958", 1016 | "st_size": "0x0", 1017 | "name": "_edata", 1018 | "visibility": "DEFAULT", 1019 | "bind": "GLOBAL", 1020 | "type": "NOTYPE" 1021 | }, 1022 | { 1023 | "st_name": "0x150", 1024 | "st_info": "0x20", 1025 | "st_other": "0x0", 1026 | "st_shndx": "0x18", 1027 | "st_value": "0x600948", 1028 | "st_size": "0x0", 1029 | "name": "data_start", 1030 | "visibility": "DEFAULT", 1031 | "bind": "WEAK", 1032 | "type": "NOTYPE" 1033 | }, 1034 | { 1035 | "st_name": "0x134", 1036 | "st_info": "0x20", 1037 | "st_other": "0x0", 1038 | "st_shndx": "0x0", 1039 | "st_value": "0x0", 1040 | "st_size": "0x0", 1041 | "name": "_ITM_deregisterTMCloneTable", 1042 | "visibility": "DEFAULT", 1043 | "bind": "WEAK", 1044 | "type": "NOTYPE" 1045 | }, 1046 | { 1047 | "st_name": "0x124", 1048 | "st_info": "0x12", 1049 | "st_other": "0x0", 1050 | "st_shndx": "0xd", 1051 | "st_value": "0x4005c0", 1052 | "st_size": "0x2", 1053 | "name": "__libc_csu_fini", 1054 | "visibility": "DEFAULT", 1055 | "bind": "GLOBAL", 1056 | "type": "FUNC" 1057 | }, 1058 | { 1059 | "st_name": "0x10e", 1060 | "st_info": "0x1", 1061 | "st_other": "0x0", 1062 | "st_shndx": "0x17", 1063 | "st_value": "0x600918", 1064 | "st_size": "0x0", 1065 | "name": "_GLOBAL_OFFSET_TABLE_", 1066 | "visibility": "DEFAULT", 1067 | "bind": "LOCAL", 1068 | "type": "OBJECT" 1069 | }, 1070 | { 1071 | "st_name": "0xfb", 1072 | "st_info": "0x0", 1073 | "st_other": "0x0", 1074 | "st_shndx": "0x12", 1075 | "st_value": "0x600718", 1076 | "st_size": "0x0", 1077 | "name": "__init_array_start", 1078 | "visibility": "DEFAULT", 1079 | "bind": "LOCAL", 1080 | "type": "NOTYPE" 1081 | }, 1082 | { 1083 | "st_name": "0xf2", 1084 | "st_info": "0x1", 1085 | "st_other": "0x0", 1086 | "st_shndx": "0x15", 1087 | "st_value": "0x600730", 1088 | "st_size": "0x0", 1089 | "name": "_DYNAMIC", 1090 | "visibility": "DEFAULT", 1091 | "bind": "LOCAL", 1092 | "type": "OBJECT" 1093 | }, 1094 | { 1095 | "st_name": "0xe1", 1096 | "st_info": "0x0", 1097 | "st_other": "0x0", 1098 | "st_shndx": "0x12", 1099 | "st_value": "0x600720", 1100 | "st_size": "0x0", 1101 | "name": "__init_array_end", 1102 | "visibility": "DEFAULT", 1103 | "bind": "LOCAL", 1104 | "type": "NOTYPE" 1105 | }, 1106 | { 1107 | "st_name": "0x0", 1108 | "st_info": "0x4", 1109 | "st_other": "0x0", 1110 | "st_shndx": "0xfff1", 1111 | "st_value": "0x0", 1112 | "st_size": "0x0", 1113 | "name": "", 1114 | "visibility": "DEFAULT", 1115 | "bind": "LOCAL", 1116 | "type": "FILE" 1117 | }, 1118 | { 1119 | "st_name": "0xd5", 1120 | "st_info": "0x1", 1121 | "st_other": "0x0", 1122 | "st_shndx": "0x14", 1123 | "st_value": "0x600728", 1124 | "st_size": "0x0", 1125 | "name": "__JCR_END__", 1126 | "visibility": "DEFAULT", 1127 | "bind": "LOCAL", 1128 | "type": "OBJECT" 1129 | }, 1130 | { 1131 | "st_name": "0xc7", 1132 | "st_info": "0x1", 1133 | "st_other": "0x0", 1134 | "st_shndx": "0x11", 1135 | "st_value": "0x400710", 1136 | "st_size": "0x0", 1137 | "name": "__FRAME_END__", 1138 | "visibility": "DEFAULT", 1139 | "bind": "LOCAL", 1140 | "type": "OBJECT" 1141 | }, 1142 | { 1143 | "st_name": "0x8", 1144 | "st_info": "0x4", 1145 | "st_other": "0x0", 1146 | "st_shndx": "0xfff1", 1147 | "st_value": "0x0", 1148 | "st_size": "0x0", 1149 | "name": "crtstuff.c", 1150 | "visibility": "DEFAULT", 1151 | "bind": "LOCAL", 1152 | "type": "FILE" 1153 | }, 1154 | { 1155 | "st_name": "0xbf", 1156 | "st_info": "0x4", 1157 | "st_other": "0x0", 1158 | "st_shndx": "0xfff1", 1159 | "st_value": "0x0", 1160 | "st_size": "0x0", 1161 | "name": "other.c", 1162 | "visibility": "DEFAULT", 1163 | "bind": "LOCAL", 1164 | "type": "FILE" 1165 | }, 1166 | { 1167 | "st_name": "0xa0", 1168 | "st_info": "0x1", 1169 | "st_other": "0x0", 1170 | "st_shndx": "0x12", 1171 | "st_value": "0x600718", 1172 | "st_size": "0x0", 1173 | "name": "__frame_dummy_init_array_entry", 1174 | "visibility": "DEFAULT", 1175 | "bind": "LOCAL", 1176 | "type": "OBJECT" 1177 | }, 1178 | { 1179 | "st_name": "0x94", 1180 | "st_info": "0x2", 1181 | "st_other": "0x0", 1182 | "st_shndx": "0xd", 1183 | "st_value": "0x4004f0", 1184 | "st_size": "0x0", 1185 | "name": "frame_dummy", 1186 | "visibility": "DEFAULT", 1187 | "bind": "LOCAL", 1188 | "type": "FUNC" 1189 | }, 1190 | { 1191 | "st_name": "0x6d", 1192 | "st_info": "0x1", 1193 | "st_other": "0x0", 1194 | "st_shndx": "0x13", 1195 | "st_value": "0x600720", 1196 | "st_size": "0x0", 1197 | "name": "__do_global_dtors_aux_fini_array_entry", 1198 | "visibility": "DEFAULT", 1199 | "bind": "LOCAL", 1200 | "type": "OBJECT" 1201 | }, 1202 | { 1203 | "st_name": "0x5e", 1204 | "st_info": "0x1", 1205 | "st_other": "0x0", 1206 | "st_shndx": "0x19", 1207 | "st_value": "0x600958", 1208 | "st_size": "0x1", 1209 | "name": "completed.6650", 1210 | "visibility": "DEFAULT", 1211 | "bind": "LOCAL", 1212 | "type": "OBJECT" 1213 | }, 1214 | { 1215 | "st_name": "0x48", 1216 | "st_info": "0x2", 1217 | "st_other": "0x0", 1218 | "st_shndx": "0xd", 1219 | "st_value": "0x4004d0", 1220 | "st_size": "0x0", 1221 | "name": "__do_global_dtors_aux", 1222 | "visibility": "DEFAULT", 1223 | "bind": "LOCAL", 1224 | "type": "FUNC" 1225 | }, 1226 | { 1227 | "st_name": "0x35", 1228 | "st_info": "0x2", 1229 | "st_other": "0x0", 1230 | "st_shndx": "0xd", 1231 | "st_value": "0x400490", 1232 | "st_size": "0x0", 1233 | "name": "register_tm_clones", 1234 | "visibility": "DEFAULT", 1235 | "bind": "LOCAL", 1236 | "type": "FUNC" 1237 | }, 1238 | { 1239 | "st_name": "0x20", 1240 | "st_info": "0x2", 1241 | "st_other": "0x0", 1242 | "st_shndx": "0xd", 1243 | "st_value": "0x400450", 1244 | "st_size": "0x0", 1245 | "name": "deregister_tm_clones", 1246 | "visibility": "DEFAULT", 1247 | "bind": "LOCAL", 1248 | "type": "FUNC" 1249 | }, 1250 | { 1251 | "st_name": "0x13", 1252 | "st_info": "0x1", 1253 | "st_other": "0x0", 1254 | "st_shndx": "0x14", 1255 | "st_value": "0x600728", 1256 | "st_size": "0x0", 1257 | "name": "__JCR_LIST__", 1258 | "visibility": "DEFAULT", 1259 | "bind": "LOCAL", 1260 | "type": "OBJECT" 1261 | }, 1262 | { 1263 | "st_name": "0x8", 1264 | "st_info": "0x4", 1265 | "st_other": "0x0", 1266 | "st_shndx": "0xfff1", 1267 | "st_value": "0x0", 1268 | "st_size": "0x0", 1269 | "name": "crtstuff.c", 1270 | "visibility": "DEFAULT", 1271 | "bind": "LOCAL", 1272 | "type": "FILE" 1273 | }, 1274 | { 1275 | "st_name": "0x1", 1276 | "st_info": "0x4", 1277 | "st_other": "0x0", 1278 | "st_shndx": "0xfff1", 1279 | "st_value": "0x0", 1280 | "st_size": "0x0", 1281 | "name": "init.c", 1282 | "visibility": "DEFAULT", 1283 | "bind": "LOCAL", 1284 | "type": "FILE" 1285 | }, 1286 | { 1287 | "st_name": "0x0", 1288 | "st_info": "0x3", 1289 | "st_other": "0x0", 1290 | "st_shndx": "0x1a", 1291 | "st_value": "0x0", 1292 | "st_size": "0x0", 1293 | "name": "", 1294 | "visibility": "DEFAULT", 1295 | "bind": "LOCAL", 1296 | "type": "SECTION" 1297 | }, 1298 | { 1299 | "st_name": "0x0", 1300 | "st_info": "0x3", 1301 | "st_other": "0x0", 1302 | "st_shndx": "0x19", 1303 | "st_value": "0x600958", 1304 | "st_size": "0x0", 1305 | "name": "", 1306 | "visibility": "DEFAULT", 1307 | "bind": "LOCAL", 1308 | "type": "SECTION" 1309 | }, 1310 | { 1311 | "st_name": "0x0", 1312 | "st_info": "0x3", 1313 | "st_other": "0x0", 1314 | "st_shndx": "0x18", 1315 | "st_value": "0x600948", 1316 | "st_size": "0x0", 1317 | "name": "", 1318 | "visibility": "DEFAULT", 1319 | "bind": "LOCAL", 1320 | "type": "SECTION" 1321 | }, 1322 | { 1323 | "st_name": "0x0", 1324 | "st_info": "0x3", 1325 | "st_other": "0x0", 1326 | "st_shndx": "0x17", 1327 | "st_value": "0x600918", 1328 | "st_size": "0x0", 1329 | "name": "", 1330 | "visibility": "DEFAULT", 1331 | "bind": "LOCAL", 1332 | "type": "SECTION" 1333 | }, 1334 | { 1335 | "st_name": "0x0", 1336 | "st_info": "0x3", 1337 | "st_other": "0x0", 1338 | "st_shndx": "0x16", 1339 | "st_value": "0x600910", 1340 | "st_size": "0x0", 1341 | "name": "", 1342 | "visibility": "DEFAULT", 1343 | "bind": "LOCAL", 1344 | "type": "SECTION" 1345 | }, 1346 | { 1347 | "st_name": "0x0", 1348 | "st_info": "0x3", 1349 | "st_other": "0x0", 1350 | "st_shndx": "0x15", 1351 | "st_value": "0x600730", 1352 | "st_size": "0x0", 1353 | "name": "", 1354 | "visibility": "DEFAULT", 1355 | "bind": "LOCAL", 1356 | "type": "SECTION" 1357 | }, 1358 | { 1359 | "st_name": "0x0", 1360 | "st_info": "0x3", 1361 | "st_other": "0x0", 1362 | "st_shndx": "0x14", 1363 | "st_value": "0x600728", 1364 | "st_size": "0x0", 1365 | "name": "", 1366 | "visibility": "DEFAULT", 1367 | "bind": "LOCAL", 1368 | "type": "SECTION" 1369 | }, 1370 | { 1371 | "st_name": "0x0", 1372 | "st_info": "0x3", 1373 | "st_other": "0x0", 1374 | "st_shndx": "0x13", 1375 | "st_value": "0x600720", 1376 | "st_size": "0x0", 1377 | "name": "", 1378 | "visibility": "DEFAULT", 1379 | "bind": "LOCAL", 1380 | "type": "SECTION" 1381 | }, 1382 | { 1383 | "st_name": "0x0", 1384 | "st_info": "0x3", 1385 | "st_other": "0x0", 1386 | "st_shndx": "0x12", 1387 | "st_value": "0x600718", 1388 | "st_size": "0x0", 1389 | "name": "", 1390 | "visibility": "DEFAULT", 1391 | "bind": "LOCAL", 1392 | "type": "SECTION" 1393 | }, 1394 | { 1395 | "st_name": "0x0", 1396 | "st_info": "0x3", 1397 | "st_other": "0x0", 1398 | "st_shndx": "0x11", 1399 | "st_value": "0x400620", 1400 | "st_size": "0x0", 1401 | "name": "", 1402 | "visibility": "DEFAULT", 1403 | "bind": "LOCAL", 1404 | "type": "SECTION" 1405 | }, 1406 | { 1407 | "st_name": "0x0", 1408 | "st_info": "0x3", 1409 | "st_other": "0x0", 1410 | "st_shndx": "0x10", 1411 | "st_value": "0x4005e8", 1412 | "st_size": "0x0", 1413 | "name": "", 1414 | "visibility": "DEFAULT", 1415 | "bind": "LOCAL", 1416 | "type": "SECTION" 1417 | }, 1418 | { 1419 | "st_name": "0x0", 1420 | "st_info": "0x3", 1421 | "st_other": "0x0", 1422 | "st_shndx": "0xf", 1423 | "st_value": "0x4005d0", 1424 | "st_size": "0x0", 1425 | "name": "", 1426 | "visibility": "DEFAULT", 1427 | "bind": "LOCAL", 1428 | "type": "SECTION" 1429 | }, 1430 | { 1431 | "st_name": "0x0", 1432 | "st_info": "0x3", 1433 | "st_other": "0x0", 1434 | "st_shndx": "0xe", 1435 | "st_value": "0x4005c4", 1436 | "st_size": "0x0", 1437 | "name": "", 1438 | "visibility": "DEFAULT", 1439 | "bind": "LOCAL", 1440 | "type": "SECTION" 1441 | }, 1442 | { 1443 | "st_name": "0x0", 1444 | "st_info": "0x3", 1445 | "st_other": "0x0", 1446 | "st_shndx": "0xd", 1447 | "st_value": "0x400420", 1448 | "st_size": "0x0", 1449 | "name": "", 1450 | "visibility": "DEFAULT", 1451 | "bind": "LOCAL", 1452 | "type": "SECTION" 1453 | }, 1454 | { 1455 | "st_name": "0x0", 1456 | "st_info": "0x3", 1457 | "st_other": "0x0", 1458 | "st_shndx": "0xc", 1459 | "st_value": "0x4003e0", 1460 | "st_size": "0x0", 1461 | "name": "", 1462 | "visibility": "DEFAULT", 1463 | "bind": "LOCAL", 1464 | "type": "SECTION" 1465 | }, 1466 | { 1467 | "st_name": "0x0", 1468 | "st_info": "0x3", 1469 | "st_other": "0x0", 1470 | "st_shndx": "0xb", 1471 | "st_value": "0x4003c0", 1472 | "st_size": "0x0", 1473 | "name": "", 1474 | "visibility": "DEFAULT", 1475 | "bind": "LOCAL", 1476 | "type": "SECTION" 1477 | }, 1478 | { 1479 | "st_name": "0x0", 1480 | "st_info": "0x3", 1481 | "st_other": "0x0", 1482 | "st_shndx": "0xa", 1483 | "st_value": "0x400378", 1484 | "st_size": "0x0", 1485 | "name": "", 1486 | "visibility": "DEFAULT", 1487 | "bind": "LOCAL", 1488 | "type": "SECTION" 1489 | }, 1490 | { 1491 | "st_name": "0x0", 1492 | "st_info": "0x3", 1493 | "st_other": "0x0", 1494 | "st_shndx": "0x9", 1495 | "st_value": "0x400360", 1496 | "st_size": "0x0", 1497 | "name": "", 1498 | "visibility": "DEFAULT", 1499 | "bind": "LOCAL", 1500 | "type": "SECTION" 1501 | }, 1502 | { 1503 | "st_name": "0x0", 1504 | "st_info": "0x3", 1505 | "st_other": "0x0", 1506 | "st_shndx": "0x8", 1507 | "st_value": "0x400340", 1508 | "st_size": "0x0", 1509 | "name": "", 1510 | "visibility": "DEFAULT", 1511 | "bind": "LOCAL", 1512 | "type": "SECTION" 1513 | }, 1514 | { 1515 | "st_name": "0x0", 1516 | "st_info": "0x3", 1517 | "st_other": "0x0", 1518 | "st_shndx": "0x7", 1519 | "st_value": "0x400334", 1520 | "st_size": "0x0", 1521 | "name": "", 1522 | "visibility": "DEFAULT", 1523 | "bind": "LOCAL", 1524 | "type": "SECTION" 1525 | }, 1526 | { 1527 | "st_name": "0x0", 1528 | "st_info": "0x3", 1529 | "st_other": "0x0", 1530 | "st_shndx": "0x6", 1531 | "st_value": "0x4002e0", 1532 | "st_size": "0x0", 1533 | "name": "", 1534 | "visibility": "DEFAULT", 1535 | "bind": "LOCAL", 1536 | "type": "SECTION" 1537 | }, 1538 | { 1539 | "st_name": "0x0", 1540 | "st_info": "0x3", 1541 | "st_other": "0x0", 1542 | "st_shndx": "0x5", 1543 | "st_value": "0x400280", 1544 | "st_size": "0x0", 1545 | "name": "", 1546 | "visibility": "DEFAULT", 1547 | "bind": "LOCAL", 1548 | "type": "SECTION" 1549 | }, 1550 | { 1551 | "st_name": "0x0", 1552 | "st_info": "0x3", 1553 | "st_other": "0x0", 1554 | "st_shndx": "0x4", 1555 | "st_value": "0x400260", 1556 | "st_size": "0x0", 1557 | "name": "", 1558 | "visibility": "DEFAULT", 1559 | "bind": "LOCAL", 1560 | "type": "SECTION" 1561 | }, 1562 | { 1563 | "st_name": "0x0", 1564 | "st_info": "0x3", 1565 | "st_other": "0x0", 1566 | "st_shndx": "0x3", 1567 | "st_value": "0x40023c", 1568 | "st_size": "0x0", 1569 | "name": "", 1570 | "visibility": "DEFAULT", 1571 | "bind": "LOCAL", 1572 | "type": "SECTION" 1573 | }, 1574 | { 1575 | "st_name": "0x0", 1576 | "st_info": "0x3", 1577 | "st_other": "0x0", 1578 | "st_shndx": "0x2", 1579 | "st_value": "0x40021c", 1580 | "st_size": "0x0", 1581 | "name": "", 1582 | "visibility": "DEFAULT", 1583 | "bind": "LOCAL", 1584 | "type": "SECTION" 1585 | }, 1586 | { 1587 | "st_name": "0x0", 1588 | "st_info": "0x3", 1589 | "st_other": "0x0", 1590 | "st_shndx": "0x1", 1591 | "st_value": "0x400200", 1592 | "st_size": "0x0", 1593 | "name": "", 1594 | "visibility": "DEFAULT", 1595 | "bind": "LOCAL", 1596 | "type": "SECTION" 1597 | }, 1598 | { 1599 | "st_name": "0x0", 1600 | "st_info": "0x0", 1601 | "st_other": "0x0", 1602 | "st_shndx": "0x0", 1603 | "st_value": "0x0", 1604 | "st_size": "0x0", 1605 | "name": "", 1606 | "visibility": "DEFAULT", 1607 | "bind": "LOCAL", 1608 | "type": "NOTYPE" 1609 | } 1610 | ], 1611 | "meta": { 1612 | "bytes": [ 1613 | 4, 1614 | 1, 1615 | 1, 1616 | 2, 1617 | 8, 1618 | 8 1619 | ], 1620 | "prefix": "st_" 1621 | } 1622 | }, 1623 | "relocations": { 1624 | "value": [ 1625 | { 1626 | "r_offset": "0x600910", 1627 | "r_info": "0x300000006", 1628 | "r_addend": "0x0", 1629 | "index": "0x3", 1630 | "type": "0x6" 1631 | }, 1632 | { 1633 | "r_offset": "0x600930", 1634 | "r_info": "0x100000007", 1635 | "r_addend": "0x0", 1636 | "index": "0x1", 1637 | "type": "0x7" 1638 | }, 1639 | { 1640 | "r_offset": "0x600938", 1641 | "r_info": "0x200000007", 1642 | "r_addend": "0x0", 1643 | "index": "0x2", 1644 | "type": "0x7" 1645 | }, 1646 | { 1647 | "r_offset": "0x600940", 1648 | "r_info": "0x300000007", 1649 | "r_addend": "0x0", 1650 | "index": "0x3", 1651 | "type": "0x7" 1652 | } 1653 | ], 1654 | "meta": { 1655 | "bytes": [ 1656 | 8, 1657 | 8, 1658 | 8 1659 | ], 1660 | "prefix": "r_" 1661 | } 1662 | }, 1663 | "libraries": [ 1664 | "libc.so.6", 1665 | "lib/libc.so.6.sstrip" 1666 | ], 1667 | "soname": "", 1668 | "interpreter": "/lib64/ld-linux-x86-64.so.2", 1669 | "isLib": false, 1670 | "is64": true, 1671 | "size": 6776, 1672 | "coverage": null, 1673 | "base64": null 1674 | } 1675 | ``` 1676 | -------------------------------------------------------------------------------- /_oasis: -------------------------------------------------------------------------------- 1 | OASISFormat: 0.4 2 | Name: elf2json 3 | Version: 1.0.0 4 | Synopsis: Converts an ELF binary to a JSON representation 5 | Authors: m4b 6 | Maintainers: m4b.github.io@gmail.com 7 | Homepage: http://github.com/m4b/elf2json 8 | License: BSD-3-clause 9 | Plugins: META (0.4), DevFiles (0.4) 10 | Description: This program converts an ELF binary to a JSON representation using rdr as the backend. Optionally minifies, converts the binary to a base64 representation, and/or includes the byte coverage analysis generated by rdr. 11 | 12 | 13 | Library e2jlib 14 | Path: lib 15 | BuildTools: ocamlbuild 16 | Install: false 17 | BuildDepends: 18 | jsonm, 19 | rdr, 20 | rdr.elf 21 | Modules: 22 | E2j, 23 | E2j_ElfHeader, 24 | E2j_ElfProgramHeader, 25 | E2j_ElfSectionHeader, 26 | E2j_ElfSymbolTable, 27 | E2j_ElfDynamic, 28 | E2j_ByteCoverage, 29 | E2j_ElfReloc, 30 | E2j_Json 31 | 32 | Executable elf2json 33 | Path: src 34 | BuildTools: ocamlbuild 35 | MainIs: elf2json.ml 36 | CompiledObject: best 37 | BuildDepends: 38 | e2jlib, 39 | base64, 40 | jsonm, 41 | rdr, 42 | rdr.elf -------------------------------------------------------------------------------- /_tags: -------------------------------------------------------------------------------- 1 | # OASIS_START 2 | # DO NOT EDIT (digest: 76fde6c3bd92d2754673c106066965d7) 3 | # Ignore VCS directories, you can use the same kind of rule outside 4 | # OASIS_START/STOP if you want to exclude directories that contains 5 | # useless stuff for the build process 6 | true: annot, bin_annot 7 | <**/.svn>: -traverse 8 | <**/.svn>: not_hygienic 9 | ".bzr": -traverse 10 | ".bzr": not_hygienic 11 | ".hg": -traverse 12 | ".hg": not_hygienic 13 | ".git": -traverse 14 | ".git": not_hygienic 15 | "_darcs": -traverse 16 | "_darcs": not_hygienic 17 | # Library e2jlib 18 | "lib/e2jlib.cmxs": use_e2jlib 19 | : pkg_jsonm 20 | : pkg_rdr 21 | : pkg_rdr.elf 22 | # Executable elf2json 23 | : pkg_base64 24 | : pkg_jsonm 25 | : pkg_rdr 26 | : pkg_rdr.elf 27 | : use_e2jlib 28 | : pkg_base64 29 | : pkg_jsonm 30 | : pkg_rdr 31 | : pkg_rdr.elf 32 | : use_e2jlib 33 | # OASIS_STOP 34 | : -traverse 35 | : -traverse 36 | -------------------------------------------------------------------------------- /configure: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # OASIS_START 4 | # DO NOT EDIT (digest: dc86c2ad450f91ca10c931b6045d0499) 5 | set -e 6 | 7 | FST=true 8 | for i in "$@"; do 9 | if $FST; then 10 | set -- 11 | FST=false 12 | fi 13 | 14 | case $i in 15 | --*=*) 16 | ARG=${i%%=*} 17 | VAL=${i##*=} 18 | set -- "$@" "$ARG" "$VAL" 19 | ;; 20 | *) 21 | set -- "$@" "$i" 22 | ;; 23 | esac 24 | done 25 | 26 | ocaml setup.ml -configure "$@" 27 | # OASIS_STOP 28 | -------------------------------------------------------------------------------- /lib/E2j.ml: -------------------------------------------------------------------------------- 1 | module Header = E2j_ElfHeader 2 | module ProgramHeader = E2j_ElfProgramHeader 3 | module SectionHeader = E2j_ElfSectionHeader 4 | module SymbolTable = E2j_ElfSymbolTable 5 | module Dynamic = E2j_ElfDynamic 6 | module Reloc = E2j_ElfReloc 7 | module Coverage = E2j_ByteCoverage 8 | module Json = E2j_Json 9 | -------------------------------------------------------------------------------- /lib/E2j_ByteCoverage.ml: -------------------------------------------------------------------------------- 1 | open ByteCoverage 2 | open E2j_Json 3 | 4 | let data2json (data:data) = 5 | `O [ 6 | "size" , to_hex data.size; 7 | "tag" , `String (tag_to_string data.tag); 8 | "range_start", to_hex data.range_start; 9 | "range_end", to_hex data.range_end; 10 | "extra", `String data.extra; 11 | "understood", `Bool data.understood; 12 | ] 13 | 14 | let to_json coverage = 15 | let dataset:data list = ByteCoverage.to_list coverage.data in 16 | let data = `A (List.map (fun data -> data2json data) dataset) in 17 | `O 18 | [ 19 | "data", data; 20 | "size", to_hex coverage.size; 21 | "tags", `A (List.map (fun a -> `String a) coverage.tags); 22 | "totalCoverage", to_hex coverage.total_coverage; 23 | "totalUnderstood", to_hex coverage.total_understood; 24 | "percentCoverage", `Float coverage.percent_coverage; 25 | "percentUnderstood", `Float coverage.percent_understood; 26 | ] 27 | -------------------------------------------------------------------------------- /lib/E2j_ElfDynamic.ml: -------------------------------------------------------------------------------- 1 | open Elf.Dynamic 2 | open E2j_ElfSymbolTable 3 | open E2j_Json 4 | 5 | let dyn2json dyn = 6 | `O [ 7 | "d_tag" , (to_float @@ from_tag dyn.d_tag); 8 | "d_un", (to_float dyn.d_un); 9 | "name", `String (tag_to_string dyn.d_tag); 10 | ] 11 | 12 | let dynamic_symbols2json syms = 13 | let json = List.map sym2json syms in 14 | let meta = 15 | [ 16 | "bytes", to_byte_array [4; 1; 1; 2; 8; 8;]; 17 | "prefix", `String "st_"; 18 | ] in 19 | `O [ 20 | "value",`A json; 21 | "meta", `O meta; 22 | ] 23 | 24 | let to_json dyns = 25 | let json = List.map dyn2json dyns in 26 | let meta = 27 | [ 28 | "bytes", to_byte_array [8; 8]; 29 | "prefix", `String "d_"; 30 | ] in 31 | `O [ 32 | "value",`A json; 33 | "meta", `O meta; 34 | ] 35 | 36 | -------------------------------------------------------------------------------- /lib/E2j_ElfHeader.ml: -------------------------------------------------------------------------------- 1 | open Elf.Header 2 | open E2j_Json 3 | 4 | let ident2json ident = 5 | let json = 6 | [ 7 | "ei_magic", to_float ident.ei_magic; 8 | "ei_class", to_float ident.ei_class; 9 | "ei_data", to_float ident.ei_data; 10 | "ei_version", to_float ident.ei_version; 11 | "ei_osabi", to_float ident.ei_osabi; 12 | "ei_abiversion", to_float ident.ei_abiversion; 13 | "ei_pad", to_float ident.ei_pad; 14 | ] in 15 | `O json 16 | 17 | let to_json header = 18 | let ident = "e_ident", ident2json header.e_ident in 19 | let meta = 20 | [ 21 | "bytes", to_byte_array 22 | [16; 2; 2; 4; 8; 8; 23 | 8; 4; 2; 2; 2; 2; 2; 2;]; 24 | "prefix", `String "e_"; 25 | ] in 26 | let json = 27 | [ 28 | ident; 29 | "e_type" , to_float header.e_type; 30 | "e_machine", to_float header.e_machine; 31 | "e_version", to_float header.e_version; 32 | "e_entry", to_float header.e_entry; 33 | "e_phoff", to_float header.e_phoff; 34 | "e_shoff", to_float header.e_shoff; 35 | "e_flags", to_float header.e_flags; 36 | "e_ehsize", to_float header.e_ehsize; 37 | "e_phentsize", to_float header.e_phentsize; 38 | "e_phnum", to_float header.e_phnum; 39 | "e_shentsize", to_float header.e_shentsize; 40 | "e_shnum", to_float header.e_shnum; 41 | "e_shstrndx", to_float header.e_shstrndx; 42 | "machine", `String (Elf.Constants.machine_to_string header.e_machine); 43 | "type", `String (Elf.Constants.etype_to_string header.e_type); 44 | ] in 45 | `O [ 46 | "value", `O json; 47 | "meta", `O meta; 48 | ] 49 | -------------------------------------------------------------------------------- /lib/E2j_ElfProgramHeader.ml: -------------------------------------------------------------------------------- 1 | open Elf.ProgramHeader 2 | open E2j_Json 3 | 4 | let program_header2json ph = 5 | `O [ 6 | "p_type" , to_float ph.p_type; 7 | "p_flags", to_float ph.p_flags; 8 | "p_offset", to_float ph.p_offset; 9 | "p_vaddr", to_float ph.p_vaddr; 10 | "p_paddr", to_float ph.p_paddr; 11 | "p_filesz", to_float ph.p_filesz; 12 | "p_memsz", to_float ph.p_memsz; 13 | "p_align", to_float ph.p_align; 14 | "type", `String (ptype_to_string ph.p_type); 15 | "flags", `String (flags_to_string ph.p_flags); 16 | ] 17 | 18 | let to_json phs = 19 | let json = List.map program_header2json phs in 20 | let meta = 21 | [ 22 | "bytes", to_byte_array [4; 4; 8; 8; 8; 8; 8; 8;]; 23 | "prefix", `String "p_"; 24 | ] in 25 | `O [ 26 | "value",`A json; 27 | "meta", `O meta; 28 | ] 29 | 30 | -------------------------------------------------------------------------------- /lib/E2j_ElfReloc.ml: -------------------------------------------------------------------------------- 1 | open Elf.Reloc 2 | open E2j_Json 3 | 4 | let rela2json rela = 5 | `O [ 6 | "r_offset" , to_float rela.r_offset; 7 | "r_info" , to_float rela.r_info; 8 | "r_addend" , to_float rela.r_addend; 9 | "index", to_float rela.symindex; 10 | "type", to_float rela.symtype; 11 | ] 12 | 13 | let to_json relocs = 14 | let json = List.map rela2json relocs in 15 | let meta = 16 | [ 17 | "bytes", to_byte_array [8; 8; 8;]; 18 | "prefix", `String "r_"; 19 | ] in 20 | `O [ 21 | "value",`A json; 22 | "meta", `O meta; 23 | ] 24 | 25 | -------------------------------------------------------------------------------- /lib/E2j_ElfSectionHeader.ml: -------------------------------------------------------------------------------- 1 | open Elf.SectionHeader 2 | open E2j_Json 3 | 4 | let section_header2json sh = 5 | `O [ 6 | "sh_type" , to_float sh.sh_type; 7 | "sh_flags", to_float sh.sh_flags; 8 | "sh_addr", to_float sh.sh_addr; 9 | "sh_offset", to_float sh.sh_offset; 10 | "sh_size", to_float sh.sh_size; 11 | "sh_link", to_float sh.sh_link; 12 | "sh_info", to_float sh.sh_info; 13 | "sh_addralign", to_float sh.sh_addralign; 14 | "sh_entsize", to_float sh.sh_entsize; 15 | "name", `String sh.name; 16 | "type", `String (shtype_to_string sh.sh_type); 17 | ] 18 | 19 | let to_json shs = 20 | let json = Array.map section_header2json shs |> Array.to_list in 21 | let meta = 22 | [ 23 | "bytes", to_byte_array [4; 4; 8; 8; 8; 8; 4; 4; 8; 8;]; 24 | "prefix", `String "sh_"; 25 | ] in 26 | `O [ 27 | "value",`A json; 28 | "meta", `O meta; 29 | ] 30 | 31 | -------------------------------------------------------------------------------- /lib/E2j_ElfSymbolTable.ml: -------------------------------------------------------------------------------- 1 | open Elf.SymbolTable 2 | open E2j_Json 3 | 4 | let sym2json sym = 5 | `O [ 6 | "st_name" , to_float sym.st_name; 7 | "st_info" , to_float sym.st_info; 8 | "st_other" , to_float sym.st_other; 9 | "st_shndx" , to_float sym.st_shndx; 10 | "st_value" , to_float sym.st_value; 11 | "st_size" , to_float sym.st_size; 12 | "name", `String (sym.name); 13 | "visibility", `String (get_visibility sym.st_other 14 | |> symbol_visibility_to_string); 15 | "bind", `String (get_bind sym.st_info 16 | |> symbol_bind_to_string); 17 | "type", `String (get_type sym.st_info 18 | |> symbol_type_to_string); 19 | ] 20 | 21 | let to_json syms = 22 | let json = List.map sym2json syms in 23 | let meta = 24 | [ 25 | "bytes", to_byte_array [4; 1; 1; 2; 8; 8;]; 26 | "prefix", `String "st_"; 27 | ] in 28 | `O [ 29 | "value",`A json; 30 | "meta", `O meta; 31 | ] 32 | 33 | -------------------------------------------------------------------------------- /lib/E2j_Json.ml: -------------------------------------------------------------------------------- 1 | exception Escape of ((int * int) * (int * int)) * Jsonm.error 2 | 3 | type json = 4 | [ `Null | `Bool of bool | `Float of float| `String of string 5 | | `A of json list | `O of (string * json) list ] 6 | 7 | let to_hex i = 8 | let hex = Printf.sprintf "0x%x" i in 9 | `String hex 10 | 11 | let to_number i = `Float (float_of_int i) 12 | 13 | let to_byte_array l = `A (List.map to_number l) 14 | 15 | (* from JS Number.MAX_SAFE_INTEGER *) 16 | let kMAX_SAFE_INTEGER = 9007199254740991 17 | 18 | (* TODO: decide what to do *) 19 | let to_float (i:int):json = to_hex i (* 20 | if (i > kMAX_SAFE_INTEGER) then 21 | `String (string_of_int i) 22 | else 23 | `Float (float_of_int i) 24 | *) 25 | 26 | let print ~minify json = 27 | let enc e l = ignore (Jsonm.encode e (`Lexeme l)) in 28 | let rec value v k e = match v with 29 | | `A vs -> arr vs k e 30 | | `O ms -> obj ms k e 31 | | `Null | `Bool _ | `Float _ | `String _ as v -> enc e v; k e 32 | and arr vs k e = enc e `As; arr_vs vs k e 33 | and arr_vs vs k e = match vs with 34 | | v :: vs' -> value v (arr_vs vs' k) e 35 | | [] -> enc e `Ae; k e 36 | and obj ms k e = enc e `Os; obj_ms ms k e 37 | and obj_ms ms k e = match ms with 38 | | (n, v) :: ms -> enc e (`Name n); value v (obj_ms ms k) e 39 | | [] -> enc e `Oe; k e 40 | in 41 | let e = Jsonm.encoder ~minify (`Channel stdout) in 42 | let finish e = ignore (Jsonm.encode e `End) ; print_newline () in 43 | match json with `A _ | `O _ as json -> value json finish e 44 | | _ -> invalid_arg "invalid json text" 45 | -------------------------------------------------------------------------------- /lib/META: -------------------------------------------------------------------------------- 1 | # OASIS_START 2 | # DO NOT EDIT (digest: 5783b88574d6d8cf18f1020869d79454) 3 | version = "1.0.0" 4 | description = "Converts an ELF binary to a JSON representation" 5 | requires = "jsonm rdr rdr.elf" 6 | archive(byte) = "e2jlib.cma" 7 | archive(byte, plugin) = "e2jlib.cma" 8 | archive(native) = "e2jlib.cmxa" 9 | archive(native, plugin) = "e2jlib.cmxs" 10 | exists_if = "e2jlib.cma" 11 | # OASIS_STOP 12 | 13 | -------------------------------------------------------------------------------- /lib/e2jlib.mldylib: -------------------------------------------------------------------------------- 1 | # OASIS_START 2 | # DO NOT EDIT (digest: 34f7cd5409091c5ed132dbad05f1c4c3) 3 | E2j 4 | E2j_ElfHeader 5 | E2j_ElfProgramHeader 6 | E2j_ElfSectionHeader 7 | E2j_ElfSymbolTable 8 | E2j_ElfDynamic 9 | E2j_ByteCoverage 10 | E2j_ElfReloc 11 | E2j_Json 12 | # OASIS_STOP 13 | -------------------------------------------------------------------------------- /lib/e2jlib.mllib: -------------------------------------------------------------------------------- 1 | # OASIS_START 2 | # DO NOT EDIT (digest: 34f7cd5409091c5ed132dbad05f1c4c3) 3 | E2j 4 | E2j_ElfHeader 5 | E2j_ElfProgramHeader 6 | E2j_ElfSectionHeader 7 | E2j_ElfSymbolTable 8 | E2j_ElfDynamic 9 | E2j_ByteCoverage 10 | E2j_ElfReloc 11 | E2j_Json 12 | # OASIS_STOP 13 | -------------------------------------------------------------------------------- /myocamlbuild.ml: -------------------------------------------------------------------------------- 1 | (* OASIS_START *) 2 | (* DO NOT EDIT (digest: a38fed57288c66c9c4774ed39bc04060) *) 3 | module OASISGettext = struct 4 | (* # 22 "src/oasis/OASISGettext.ml" *) 5 | 6 | 7 | let ns_ str = 8 | str 9 | 10 | 11 | let s_ str = 12 | str 13 | 14 | 15 | let f_ (str: ('a, 'b, 'c, 'd) format4) = 16 | str 17 | 18 | 19 | let fn_ fmt1 fmt2 n = 20 | if n = 1 then 21 | fmt1^^"" 22 | else 23 | fmt2^^"" 24 | 25 | 26 | let init = 27 | [] 28 | 29 | 30 | end 31 | 32 | module OASISExpr = struct 33 | (* # 22 "src/oasis/OASISExpr.ml" *) 34 | 35 | 36 | 37 | 38 | 39 | open OASISGettext 40 | 41 | 42 | type test = string 43 | 44 | 45 | type flag = string 46 | 47 | 48 | type t = 49 | | EBool of bool 50 | | ENot of t 51 | | EAnd of t * t 52 | | EOr of t * t 53 | | EFlag of flag 54 | | ETest of test * string 55 | 56 | 57 | 58 | type 'a choices = (t * 'a) list 59 | 60 | 61 | let eval var_get t = 62 | let rec eval' = 63 | function 64 | | EBool b -> 65 | b 66 | 67 | | ENot e -> 68 | not (eval' e) 69 | 70 | | EAnd (e1, e2) -> 71 | (eval' e1) && (eval' e2) 72 | 73 | | EOr (e1, e2) -> 74 | (eval' e1) || (eval' e2) 75 | 76 | | EFlag nm -> 77 | let v = 78 | var_get nm 79 | in 80 | assert(v = "true" || v = "false"); 81 | (v = "true") 82 | 83 | | ETest (nm, vl) -> 84 | let v = 85 | var_get nm 86 | in 87 | (v = vl) 88 | in 89 | eval' t 90 | 91 | 92 | let choose ?printer ?name var_get lst = 93 | let rec choose_aux = 94 | function 95 | | (cond, vl) :: tl -> 96 | if eval var_get cond then 97 | vl 98 | else 99 | choose_aux tl 100 | | [] -> 101 | let str_lst = 102 | if lst = [] then 103 | s_ "" 104 | else 105 | String.concat 106 | (s_ ", ") 107 | (List.map 108 | (fun (cond, vl) -> 109 | match printer with 110 | | Some p -> p vl 111 | | None -> s_ "") 112 | lst) 113 | in 114 | match name with 115 | | Some nm -> 116 | failwith 117 | (Printf.sprintf 118 | (f_ "No result for the choice list '%s': %s") 119 | nm str_lst) 120 | | None -> 121 | failwith 122 | (Printf.sprintf 123 | (f_ "No result for a choice list: %s") 124 | str_lst) 125 | in 126 | choose_aux (List.rev lst) 127 | 128 | 129 | end 130 | 131 | 132 | # 132 "myocamlbuild.ml" 133 | module BaseEnvLight = struct 134 | (* # 22 "src/base/BaseEnvLight.ml" *) 135 | 136 | 137 | module MapString = Map.Make(String) 138 | 139 | 140 | type t = string MapString.t 141 | 142 | 143 | let default_filename = 144 | Filename.concat 145 | (Sys.getcwd ()) 146 | "setup.data" 147 | 148 | 149 | let load ?(allow_empty=false) ?(filename=default_filename) () = 150 | if Sys.file_exists filename then 151 | begin 152 | let chn = 153 | open_in_bin filename 154 | in 155 | let st = 156 | Stream.of_channel chn 157 | in 158 | let line = 159 | ref 1 160 | in 161 | let st_line = 162 | Stream.from 163 | (fun _ -> 164 | try 165 | match Stream.next st with 166 | | '\n' -> incr line; Some '\n' 167 | | c -> Some c 168 | with Stream.Failure -> None) 169 | in 170 | let lexer = 171 | Genlex.make_lexer ["="] st_line 172 | in 173 | let rec read_file mp = 174 | match Stream.npeek 3 lexer with 175 | | [Genlex.Ident nm; Genlex.Kwd "="; Genlex.String value] -> 176 | Stream.junk lexer; 177 | Stream.junk lexer; 178 | Stream.junk lexer; 179 | read_file (MapString.add nm value mp) 180 | | [] -> 181 | mp 182 | | _ -> 183 | failwith 184 | (Printf.sprintf 185 | "Malformed data file '%s' line %d" 186 | filename !line) 187 | in 188 | let mp = 189 | read_file MapString.empty 190 | in 191 | close_in chn; 192 | mp 193 | end 194 | else if allow_empty then 195 | begin 196 | MapString.empty 197 | end 198 | else 199 | begin 200 | failwith 201 | (Printf.sprintf 202 | "Unable to load environment, the file '%s' doesn't exist." 203 | filename) 204 | end 205 | 206 | 207 | let rec var_expand str env = 208 | let buff = 209 | Buffer.create ((String.length str) * 2) 210 | in 211 | Buffer.add_substitute 212 | buff 213 | (fun var -> 214 | try 215 | var_expand (MapString.find var env) env 216 | with Not_found -> 217 | failwith 218 | (Printf.sprintf 219 | "No variable %s defined when trying to expand %S." 220 | var 221 | str)) 222 | str; 223 | Buffer.contents buff 224 | 225 | 226 | let var_get name env = 227 | var_expand (MapString.find name env) env 228 | 229 | 230 | let var_choose lst env = 231 | OASISExpr.choose 232 | (fun nm -> var_get nm env) 233 | lst 234 | end 235 | 236 | 237 | # 237 "myocamlbuild.ml" 238 | module MyOCamlbuildFindlib = struct 239 | (* # 22 "src/plugins/ocamlbuild/MyOCamlbuildFindlib.ml" *) 240 | 241 | 242 | (** OCamlbuild extension, copied from 243 | * http://brion.inria.fr/gallium/index.php/Using_ocamlfind_with_ocamlbuild 244 | * by N. Pouillard and others 245 | * 246 | * Updated on 2009/02/28 247 | * 248 | * Modified by Sylvain Le Gall 249 | *) 250 | open Ocamlbuild_plugin 251 | 252 | type conf = 253 | { no_automatic_syntax: bool; 254 | } 255 | 256 | (* these functions are not really officially exported *) 257 | let run_and_read = 258 | Ocamlbuild_pack.My_unix.run_and_read 259 | 260 | 261 | let blank_sep_strings = 262 | Ocamlbuild_pack.Lexers.blank_sep_strings 263 | 264 | 265 | let exec_from_conf exec = 266 | let exec = 267 | let env_filename = Pathname.basename BaseEnvLight.default_filename in 268 | let env = BaseEnvLight.load ~filename:env_filename ~allow_empty:true () in 269 | try 270 | BaseEnvLight.var_get exec env 271 | with Not_found -> 272 | Printf.eprintf "W: Cannot get variable %s\n" exec; 273 | exec 274 | in 275 | let fix_win32 str = 276 | if Sys.os_type = "Win32" then begin 277 | let buff = Buffer.create (String.length str) in 278 | (* Adapt for windowsi, ocamlbuild + win32 has a hard time to handle '\\'. 279 | *) 280 | String.iter 281 | (fun c -> Buffer.add_char buff (if c = '\\' then '/' else c)) 282 | str; 283 | Buffer.contents buff 284 | end else begin 285 | str 286 | end 287 | in 288 | fix_win32 exec 289 | 290 | let split s ch = 291 | let buf = Buffer.create 13 in 292 | let x = ref [] in 293 | let flush () = 294 | x := (Buffer.contents buf) :: !x; 295 | Buffer.clear buf 296 | in 297 | String.iter 298 | (fun c -> 299 | if c = ch then 300 | flush () 301 | else 302 | Buffer.add_char buf c) 303 | s; 304 | flush (); 305 | List.rev !x 306 | 307 | 308 | let split_nl s = split s '\n' 309 | 310 | 311 | let before_space s = 312 | try 313 | String.before s (String.index s ' ') 314 | with Not_found -> s 315 | 316 | (* ocamlfind command *) 317 | let ocamlfind x = S[Sh (exec_from_conf "ocamlfind"); x] 318 | 319 | (* This lists all supported packages. *) 320 | let find_packages () = 321 | List.map before_space (split_nl & run_and_read (exec_from_conf "ocamlfind" ^ " list")) 322 | 323 | 324 | (* Mock to list available syntaxes. *) 325 | let find_syntaxes () = ["camlp4o"; "camlp4r"] 326 | 327 | 328 | let well_known_syntax = [ 329 | "camlp4.quotations.o"; 330 | "camlp4.quotations.r"; 331 | "camlp4.exceptiontracer"; 332 | "camlp4.extend"; 333 | "camlp4.foldgenerator"; 334 | "camlp4.listcomprehension"; 335 | "camlp4.locationstripper"; 336 | "camlp4.macro"; 337 | "camlp4.mapgenerator"; 338 | "camlp4.metagenerator"; 339 | "camlp4.profiler"; 340 | "camlp4.tracer" 341 | ] 342 | 343 | 344 | let dispatch conf = 345 | function 346 | | After_options -> 347 | (* By using Before_options one let command line options have an higher 348 | * priority on the contrary using After_options will guarantee to have 349 | * the higher priority override default commands by ocamlfind ones *) 350 | Options.ocamlc := ocamlfind & A"ocamlc"; 351 | Options.ocamlopt := ocamlfind & A"ocamlopt"; 352 | Options.ocamldep := ocamlfind & A"ocamldep"; 353 | Options.ocamldoc := ocamlfind & A"ocamldoc"; 354 | Options.ocamlmktop := ocamlfind & A"ocamlmktop"; 355 | Options.ocamlmklib := ocamlfind & A"ocamlmklib" 356 | 357 | | After_rules -> 358 | 359 | (* When one link an OCaml library/binary/package, one should use 360 | * -linkpkg *) 361 | flag ["ocaml"; "link"; "program"] & A"-linkpkg"; 362 | 363 | if not (conf.no_automatic_syntax) then begin 364 | (* For each ocamlfind package one inject the -package option when 365 | * compiling, computing dependencies, generating documentation and 366 | * linking. *) 367 | List.iter 368 | begin fun pkg -> 369 | let base_args = [A"-package"; A pkg] in 370 | (* TODO: consider how to really choose camlp4o or camlp4r. *) 371 | let syn_args = [A"-syntax"; A "camlp4o"] in 372 | let (args, pargs) = 373 | (* Heuristic to identify syntax extensions: whether they end in 374 | ".syntax"; some might not. 375 | *) 376 | if Filename.check_suffix pkg "syntax" || 377 | List.mem pkg well_known_syntax then 378 | (syn_args @ base_args, syn_args) 379 | else 380 | (base_args, []) 381 | in 382 | flag ["ocaml"; "compile"; "pkg_"^pkg] & S args; 383 | flag ["ocaml"; "ocamldep"; "pkg_"^pkg] & S args; 384 | flag ["ocaml"; "doc"; "pkg_"^pkg] & S args; 385 | flag ["ocaml"; "link"; "pkg_"^pkg] & S base_args; 386 | flag ["ocaml"; "infer_interface"; "pkg_"^pkg] & S args; 387 | 388 | (* TODO: Check if this is allowed for OCaml < 3.12.1 *) 389 | flag ["ocaml"; "compile"; "package("^pkg^")"] & S pargs; 390 | flag ["ocaml"; "ocamldep"; "package("^pkg^")"] & S pargs; 391 | flag ["ocaml"; "doc"; "package("^pkg^")"] & S pargs; 392 | flag ["ocaml"; "infer_interface"; "package("^pkg^")"] & S pargs; 393 | end 394 | (find_packages ()); 395 | end; 396 | 397 | (* Like -package but for extensions syntax. Morover -syntax is useless 398 | * when linking. *) 399 | List.iter begin fun syntax -> 400 | flag ["ocaml"; "compile"; "syntax_"^syntax] & S[A"-syntax"; A syntax]; 401 | flag ["ocaml"; "ocamldep"; "syntax_"^syntax] & S[A"-syntax"; A syntax]; 402 | flag ["ocaml"; "doc"; "syntax_"^syntax] & S[A"-syntax"; A syntax]; 403 | flag ["ocaml"; "infer_interface"; "syntax_"^syntax] & 404 | S[A"-syntax"; A syntax]; 405 | end (find_syntaxes ()); 406 | 407 | (* The default "thread" tag is not compatible with ocamlfind. 408 | * Indeed, the default rules add the "threads.cma" or "threads.cmxa" 409 | * options when using this tag. When using the "-linkpkg" option with 410 | * ocamlfind, this module will then be added twice on the command line. 411 | * 412 | * To solve this, one approach is to add the "-thread" option when using 413 | * the "threads" package using the previous plugin. 414 | *) 415 | flag ["ocaml"; "pkg_threads"; "compile"] (S[A "-thread"]); 416 | flag ["ocaml"; "pkg_threads"; "doc"] (S[A "-I"; A "+threads"]); 417 | flag ["ocaml"; "pkg_threads"; "link"] (S[A "-thread"]); 418 | flag ["ocaml"; "pkg_threads"; "infer_interface"] (S[A "-thread"]); 419 | flag ["ocaml"; "package(threads)"; "compile"] (S[A "-thread"]); 420 | flag ["ocaml"; "package(threads)"; "doc"] (S[A "-I"; A "+threads"]); 421 | flag ["ocaml"; "package(threads)"; "link"] (S[A "-thread"]); 422 | flag ["ocaml"; "package(threads)"; "infer_interface"] (S[A "-thread"]); 423 | 424 | | _ -> 425 | () 426 | end 427 | 428 | module MyOCamlbuildBase = struct 429 | (* # 22 "src/plugins/ocamlbuild/MyOCamlbuildBase.ml" *) 430 | 431 | 432 | (** Base functions for writing myocamlbuild.ml 433 | @author Sylvain Le Gall 434 | *) 435 | 436 | 437 | 438 | 439 | 440 | open Ocamlbuild_plugin 441 | module OC = Ocamlbuild_pack.Ocaml_compiler 442 | 443 | 444 | type dir = string 445 | type file = string 446 | type name = string 447 | type tag = string 448 | 449 | 450 | (* # 62 "src/plugins/ocamlbuild/MyOCamlbuildBase.ml" *) 451 | 452 | 453 | type t = 454 | { 455 | lib_ocaml: (name * dir list * string list) list; 456 | lib_c: (name * dir * file list) list; 457 | flags: (tag list * (spec OASISExpr.choices)) list; 458 | (* Replace the 'dir: include' from _tags by a precise interdepends in 459 | * directory. 460 | *) 461 | includes: (dir * dir list) list; 462 | } 463 | 464 | 465 | let env_filename = 466 | Pathname.basename 467 | BaseEnvLight.default_filename 468 | 469 | 470 | let dispatch_combine lst = 471 | fun e -> 472 | List.iter 473 | (fun dispatch -> dispatch e) 474 | lst 475 | 476 | 477 | let tag_libstubs nm = 478 | "use_lib"^nm^"_stubs" 479 | 480 | 481 | let nm_libstubs nm = 482 | nm^"_stubs" 483 | 484 | 485 | let dispatch t e = 486 | let env = 487 | BaseEnvLight.load 488 | ~filename:env_filename 489 | ~allow_empty:true 490 | () 491 | in 492 | match e with 493 | | Before_options -> 494 | let no_trailing_dot s = 495 | if String.length s >= 1 && s.[0] = '.' then 496 | String.sub s 1 ((String.length s) - 1) 497 | else 498 | s 499 | in 500 | List.iter 501 | (fun (opt, var) -> 502 | try 503 | opt := no_trailing_dot (BaseEnvLight.var_get var env) 504 | with Not_found -> 505 | Printf.eprintf "W: Cannot get variable %s\n" var) 506 | [ 507 | Options.ext_obj, "ext_obj"; 508 | Options.ext_lib, "ext_lib"; 509 | Options.ext_dll, "ext_dll"; 510 | ] 511 | 512 | | After_rules -> 513 | (* Declare OCaml libraries *) 514 | List.iter 515 | (function 516 | | nm, [], intf_modules -> 517 | ocaml_lib nm; 518 | let cmis = 519 | List.map (fun m -> (String.uncapitalize m) ^ ".cmi") 520 | intf_modules in 521 | dep ["ocaml"; "link"; "library"; "file:"^nm^".cma"] cmis 522 | | nm, dir :: tl, intf_modules -> 523 | ocaml_lib ~dir:dir (dir^"/"^nm); 524 | List.iter 525 | (fun dir -> 526 | List.iter 527 | (fun str -> 528 | flag ["ocaml"; "use_"^nm; str] (S[A"-I"; P dir])) 529 | ["compile"; "infer_interface"; "doc"]) 530 | tl; 531 | let cmis = 532 | List.map (fun m -> dir^"/"^(String.uncapitalize m)^".cmi") 533 | intf_modules in 534 | dep ["ocaml"; "link"; "library"; "file:"^dir^"/"^nm^".cma"] 535 | cmis) 536 | t.lib_ocaml; 537 | 538 | (* Declare directories dependencies, replace "include" in _tags. *) 539 | List.iter 540 | (fun (dir, include_dirs) -> 541 | Pathname.define_context dir include_dirs) 542 | t.includes; 543 | 544 | (* Declare C libraries *) 545 | List.iter 546 | (fun (lib, dir, headers) -> 547 | (* Handle C part of library *) 548 | flag ["link"; "library"; "ocaml"; "byte"; tag_libstubs lib] 549 | (S[A"-dllib"; A("-l"^(nm_libstubs lib)); A"-cclib"; 550 | A("-l"^(nm_libstubs lib))]); 551 | 552 | flag ["link"; "library"; "ocaml"; "native"; tag_libstubs lib] 553 | (S[A"-cclib"; A("-l"^(nm_libstubs lib))]); 554 | 555 | flag ["link"; "program"; "ocaml"; "byte"; tag_libstubs lib] 556 | (S[A"-dllib"; A("dll"^(nm_libstubs lib))]); 557 | 558 | (* When ocaml link something that use the C library, then one 559 | need that file to be up to date. 560 | This holds both for programs and for libraries. 561 | *) 562 | dep ["link"; "ocaml"; tag_libstubs lib] 563 | [dir/"lib"^(nm_libstubs lib)^"."^(!Options.ext_lib)]; 564 | 565 | dep ["compile"; "ocaml"; tag_libstubs lib] 566 | [dir/"lib"^(nm_libstubs lib)^"."^(!Options.ext_lib)]; 567 | 568 | (* TODO: be more specific about what depends on headers *) 569 | (* Depends on .h files *) 570 | dep ["compile"; "c"] 571 | headers; 572 | 573 | (* Setup search path for lib *) 574 | flag ["link"; "ocaml"; "use_"^lib] 575 | (S[A"-I"; P(dir)]); 576 | ) 577 | t.lib_c; 578 | 579 | (* Add flags *) 580 | List.iter 581 | (fun (tags, cond_specs) -> 582 | let spec = BaseEnvLight.var_choose cond_specs env in 583 | let rec eval_specs = 584 | function 585 | | S lst -> S (List.map eval_specs lst) 586 | | A str -> A (BaseEnvLight.var_expand str env) 587 | | spec -> spec 588 | in 589 | flag tags & (eval_specs spec)) 590 | t.flags 591 | | _ -> 592 | () 593 | 594 | 595 | let dispatch_default conf t = 596 | dispatch_combine 597 | [ 598 | dispatch t; 599 | MyOCamlbuildFindlib.dispatch conf; 600 | ] 601 | 602 | 603 | end 604 | 605 | 606 | # 606 "myocamlbuild.ml" 607 | open Ocamlbuild_plugin;; 608 | let package_default = 609 | { 610 | MyOCamlbuildBase.lib_ocaml = [("e2jlib", ["lib"], [])]; 611 | lib_c = []; 612 | flags = []; 613 | includes = [("src", ["lib"])] 614 | } 615 | ;; 616 | 617 | let conf = {MyOCamlbuildFindlib.no_automatic_syntax = false} 618 | 619 | let dispatch_default = MyOCamlbuildBase.dispatch_default conf package_default;; 620 | 621 | # 622 "myocamlbuild.ml" 622 | (* OASIS_STOP *) 623 | Ocamlbuild_plugin.dispatch dispatch_default;; 624 | -------------------------------------------------------------------------------- /opam/descr: -------------------------------------------------------------------------------- 1 | Converts an ELF binary to a JSON representation 2 | 3 | This program converts 4 | an ELF binary to a JSON representation using rdr as the backend. 5 | Optionally minifies, converts the binary to a base64 representation, 6 | and/or includes the byte coverage analysis generated by rdr. 7 | 8 | -------------------------------------------------------------------------------- /opam/files/_oasis_remove_.ml: -------------------------------------------------------------------------------- 1 | open Printf 2 | 3 | let () = 4 | let dir = Sys.argv.(1) in 5 | (try Sys.chdir dir 6 | with _ -> eprintf "Cannot change directory to %s\n%!" dir); 7 | exit (Sys.command "ocaml setup.ml -uninstall") 8 | -------------------------------------------------------------------------------- /opam/files/elf2json.install: -------------------------------------------------------------------------------- 1 | etc: [ 2 | "setup.ml" 3 | "setup.data" 4 | "setup.log" 5 | "_oasis_remove_.ml" 6 | ] 7 | -------------------------------------------------------------------------------- /opam/opam: -------------------------------------------------------------------------------- 1 | opam-version: "1.2" 2 | name: "elf2json" 3 | version: "1.0.0" 4 | maintainer: "m4b.github.io@gmail.com" 5 | authors: [ "m4b" ] 6 | license: "BSD-3-clause" 7 | homepage: "http://github.com/m4b/elf2json" 8 | bug-reports: "http://github.com/m4b/elf2json" 9 | build: [ 10 | ["ocaml" "setup.ml" "-configure" "--prefix" prefix] 11 | ["ocaml" "setup.ml" "-build"] 12 | ] 13 | install: ["ocaml" "setup.ml" "-install"] 14 | remove: [ 15 | ["ocaml" "%{etc}%/elf2json/_oasis_remove_.ml" "%{etc}%/elf2json"] 16 | ] 17 | build-test: [ 18 | ["ocaml" "setup.ml" "-configure" "--enable-tests"] 19 | ["ocaml" "setup.ml" "-build"] 20 | ["ocaml" "setup.ml" "-test"] 21 | ] 22 | depends: [ 23 | "base64" {build} 24 | "jsonm" {build} 25 | "ocamlfind" {build} 26 | "rdr" {>= "2.0.0"} 27 | ] 28 | -------------------------------------------------------------------------------- /output/other.b64.min.json: -------------------------------------------------------------------------------- 1 | {"header":{"value":{"e_ident":{"ei_magic":"0x464c457f","ei_class":"0x2","ei_data":"0x1","ei_version":"0x1","ei_osabi":"0x0","ei_abiversion":"0x0","ei_pad":"0x0"},"e_type":"0x2","e_machine":"0x3e","e_version":"0x1","e_entry":"0x400420","e_phoff":"0x40","e_shoff":"0x12f8","e_flags":"0x0","e_ehsize":"0x40","e_phentsize":"0x38","e_phnum":"0x8","e_shentsize":"0x40","e_shnum":"0x1e","e_shstrndx":"0x1b","machine":"X86_64","type":"EXEC"},"meta":{"bytes":[16,2,2,4,8,8,8,4,2,2,2,2,2,2],"prefix":"e_"}},"programHeaders":{"value":[{"p_type":"0x6","p_flags":"0x5","p_offset":"0x40","p_vaddr":"0x400040","p_paddr":"0x400040","p_filesz":"0x1c0","p_memsz":"0x1c0","p_align":"0x8","type":"PT_PHDR","flags":"R+X"},{"p_type":"0x3","p_flags":"0x4","p_offset":"0x200","p_vaddr":"0x400200","p_paddr":"0x400200","p_filesz":"0x1c","p_memsz":"0x1c","p_align":"0x1","type":"PT_INTERP","flags":"R"},{"p_type":"0x1","p_flags":"0x5","p_offset":"0x0","p_vaddr":"0x400000","p_paddr":"0x400000","p_filesz":"0x714","p_memsz":"0x714","p_align":"0x200000","type":"PT_LOAD","flags":"R+X"},{"p_type":"0x1","p_flags":"0x6","p_offset":"0x718","p_vaddr":"0x600718","p_paddr":"0x600718","p_filesz":"0x240","p_memsz":"0x248","p_align":"0x200000","type":"PT_LOAD","flags":"RW"},{"p_type":"0x2","p_flags":"0x6","p_offset":"0x730","p_vaddr":"0x600730","p_paddr":"0x600730","p_filesz":"0x1e0","p_memsz":"0x1e0","p_align":"0x8","type":"PT_DYNAMIC","flags":"RW"},{"p_type":"0x4","p_flags":"0x4","p_offset":"0x21c","p_vaddr":"0x40021c","p_paddr":"0x40021c","p_filesz":"0x44","p_memsz":"0x44","p_align":"0x4","type":"PT_NOTE","flags":"R"},{"p_type":"0x6474e550","p_flags":"0x4","p_offset":"0x5e8","p_vaddr":"0x4005e8","p_paddr":"0x4005e8","p_filesz":"0x34","p_memsz":"0x34","p_align":"0x4","type":"PT_GNU_EH_FRAME","flags":"R"},{"p_type":"0x6474e551","p_flags":"0x6","p_offset":"0x0","p_vaddr":"0x0","p_paddr":"0x0","p_filesz":"0x0","p_memsz":"0x0","p_align":"0x10","type":"PT_GNU_STACK","flags":"RW"}],"meta":{"bytes":[4,4,8,8,8,8,8,8],"prefix":"p_"}},"sectionHeaders":{"value":[{"sh_type":"0x0","sh_flags":"0x0","sh_addr":"0x0","sh_offset":"0x0","sh_size":"0x0","sh_link":"0x0","sh_info":"0x0","sh_addralign":"0x0","sh_entsize":"0x0","name":"","type":"NULL"},{"sh_type":"0x1","sh_flags":"0x2","sh_addr":"0x400200","sh_offset":"0x200","sh_size":"0x1c","sh_link":"0x0","sh_info":"0x0","sh_addralign":"0x1","sh_entsize":"0x0","name":".interp","type":"PROGBITS"},{"sh_type":"0x7","sh_flags":"0x2","sh_addr":"0x40021c","sh_offset":"0x21c","sh_size":"0x20","sh_link":"0x0","sh_info":"0x0","sh_addralign":"0x4","sh_entsize":"0x0","name":".note.ABI-tag","type":"NOTE"},{"sh_type":"0x7","sh_flags":"0x2","sh_addr":"0x40023c","sh_offset":"0x23c","sh_size":"0x24","sh_link":"0x0","sh_info":"0x0","sh_addralign":"0x4","sh_entsize":"0x0","name":".note.gnu.build-id","type":"NOTE"},{"sh_type":"0x6ffffff6","sh_flags":"0x2","sh_addr":"0x400260","sh_offset":"0x260","sh_size":"0x1c","sh_link":"0x5","sh_info":"0x0","sh_addralign":"0x8","sh_entsize":"0x0","name":".gnu.hash","type":"GNU_HASH"},{"sh_type":"0xb","sh_flags":"0x2","sh_addr":"0x400280","sh_offset":"0x280","sh_size":"0x60","sh_link":"0x6","sh_info":"0x1","sh_addralign":"0x8","sh_entsize":"0x18","name":".dynsym","type":"DYNSYM"},{"sh_type":"0x3","sh_flags":"0x2","sh_addr":"0x4002e0","sh_offset":"0x2e0","sh_size":"0x54","sh_link":"0x0","sh_info":"0x0","sh_addralign":"0x1","sh_entsize":"0x0","name":".dynstr","type":"STRTAB"},{"sh_type":"0x6fffffff","sh_flags":"0x2","sh_addr":"0x400334","sh_offset":"0x334","sh_size":"0x8","sh_link":"0x5","sh_info":"0x0","sh_addralign":"0x2","sh_entsize":"0x2","name":".gnu.version","type":"GNU_versym"},{"sh_type":"0x6ffffffe","sh_flags":"0x2","sh_addr":"0x400340","sh_offset":"0x340","sh_size":"0x20","sh_link":"0x6","sh_info":"0x1","sh_addralign":"0x8","sh_entsize":"0x0","name":".gnu.version_r","type":"GNU_verneed"},{"sh_type":"0x4","sh_flags":"0x2","sh_addr":"0x400360","sh_offset":"0x360","sh_size":"0x18","sh_link":"0x5","sh_info":"0x0","sh_addralign":"0x8","sh_entsize":"0x18","name":".rela.dyn","type":"RELA"},{"sh_type":"0x4","sh_flags":"0x42","sh_addr":"0x400378","sh_offset":"0x378","sh_size":"0x48","sh_link":"0x5","sh_info":"0xc","sh_addralign":"0x8","sh_entsize":"0x18","name":".rela.plt","type":"RELA"},{"sh_type":"0x1","sh_flags":"0x6","sh_addr":"0x4003c0","sh_offset":"0x3c0","sh_size":"0x1a","sh_link":"0x0","sh_info":"0x0","sh_addralign":"0x4","sh_entsize":"0x0","name":".init","type":"PROGBITS"},{"sh_type":"0x1","sh_flags":"0x6","sh_addr":"0x4003e0","sh_offset":"0x3e0","sh_size":"0x40","sh_link":"0x0","sh_info":"0x0","sh_addralign":"0x10","sh_entsize":"0x10","name":".plt","type":"PROGBITS"},{"sh_type":"0x1","sh_flags":"0x6","sh_addr":"0x400420","sh_offset":"0x420","sh_size":"0x1a2","sh_link":"0x0","sh_info":"0x0","sh_addralign":"0x10","sh_entsize":"0x0","name":".text","type":"PROGBITS"},{"sh_type":"0x1","sh_flags":"0x6","sh_addr":"0x4005c4","sh_offset":"0x5c4","sh_size":"0x9","sh_link":"0x0","sh_info":"0x0","sh_addralign":"0x4","sh_entsize":"0x0","name":".fini","type":"PROGBITS"},{"sh_type":"0x1","sh_flags":"0x2","sh_addr":"0x4005d0","sh_offset":"0x5d0","sh_size":"0x15","sh_link":"0x0","sh_info":"0x0","sh_addralign":"0x4","sh_entsize":"0x0","name":".rodata","type":"PROGBITS"},{"sh_type":"0x1","sh_flags":"0x2","sh_addr":"0x4005e8","sh_offset":"0x5e8","sh_size":"0x34","sh_link":"0x0","sh_info":"0x0","sh_addralign":"0x4","sh_entsize":"0x0","name":".eh_frame_hdr","type":"PROGBITS"},{"sh_type":"0x1","sh_flags":"0x2","sh_addr":"0x400620","sh_offset":"0x620","sh_size":"0xf4","sh_link":"0x0","sh_info":"0x0","sh_addralign":"0x8","sh_entsize":"0x0","name":".eh_frame","type":"PROGBITS"},{"sh_type":"0xe","sh_flags":"0x3","sh_addr":"0x600718","sh_offset":"0x718","sh_size":"0x8","sh_link":"0x0","sh_info":"0x0","sh_addralign":"0x8","sh_entsize":"0x0","name":".init_array","type":"INIT_ARRAY"},{"sh_type":"0xf","sh_flags":"0x3","sh_addr":"0x600720","sh_offset":"0x720","sh_size":"0x8","sh_link":"0x0","sh_info":"0x0","sh_addralign":"0x8","sh_entsize":"0x0","name":".fini_array","type":"FINI_ARRAY"},{"sh_type":"0x1","sh_flags":"0x3","sh_addr":"0x600728","sh_offset":"0x728","sh_size":"0x8","sh_link":"0x0","sh_info":"0x0","sh_addralign":"0x8","sh_entsize":"0x0","name":".jcr","type":"PROGBITS"},{"sh_type":"0x6","sh_flags":"0x3","sh_addr":"0x600730","sh_offset":"0x730","sh_size":"0x1e0","sh_link":"0x6","sh_info":"0x0","sh_addralign":"0x8","sh_entsize":"0x10","name":".dynamic","type":"DYNAMIC"},{"sh_type":"0x1","sh_flags":"0x3","sh_addr":"0x600910","sh_offset":"0x910","sh_size":"0x8","sh_link":"0x0","sh_info":"0x0","sh_addralign":"0x8","sh_entsize":"0x8","name":".got","type":"PROGBITS"},{"sh_type":"0x1","sh_flags":"0x3","sh_addr":"0x600918","sh_offset":"0x918","sh_size":"0x30","sh_link":"0x0","sh_info":"0x0","sh_addralign":"0x8","sh_entsize":"0x8","name":".got.plt","type":"PROGBITS"},{"sh_type":"0x1","sh_flags":"0x3","sh_addr":"0x600948","sh_offset":"0x948","sh_size":"0x10","sh_link":"0x0","sh_info":"0x0","sh_addralign":"0x8","sh_entsize":"0x0","name":".data","type":"PROGBITS"},{"sh_type":"0x8","sh_flags":"0x3","sh_addr":"0x600958","sh_offset":"0x958","sh_size":"0x8","sh_link":"0x0","sh_info":"0x0","sh_addralign":"0x1","sh_entsize":"0x0","name":".bss","type":"NOBITS"},{"sh_type":"0x1","sh_flags":"0x30","sh_addr":"0x0","sh_offset":"0x958","sh_size":"0x27","sh_link":"0x0","sh_info":"0x0","sh_addralign":"0x1","sh_entsize":"0x1","name":".comment","type":"PROGBITS"},{"sh_type":"0x3","sh_flags":"0x0","sh_addr":"0x0","sh_offset":"0x97f","sh_size":"0x108","sh_link":"0x0","sh_info":"0x0","sh_addralign":"0x1","sh_entsize":"0x0","name":".shstrtab","type":"STRTAB"},{"sh_type":"0x2","sh_flags":"0x0","sh_addr":"0x0","sh_offset":"0xa88","sh_size":"0x630","sh_link":"0x1d","sh_info":"0x2e","sh_addralign":"0x8","sh_entsize":"0x18","name":".symtab","type":"SYMTAB"},{"sh_type":"0x3","sh_flags":"0x0","sh_addr":"0x0","sh_offset":"0x10b8","sh_size":"0x240","sh_link":"0x0","sh_info":"0x0","sh_addralign":"0x1","sh_entsize":"0x0","name":".strtab","type":"STRTAB"}],"meta":{"bytes":[4,4,8,8,8,8,4,4,8,8],"prefix":"sh_"}},"_dynamic":{"value":[{"d_tag":"0x1","d_un":"0x1","name":"NEEDED"},{"d_tag":"0x1","d_un":"0x16","name":"NEEDED"},{"d_tag":"0xc","d_un":"0x4003c0","name":"INIT "},{"d_tag":"0xd","d_un":"0x4005c4","name":"FINI "},{"d_tag":"0x19","d_un":"0x600718","name":"INIT_ARRAY"},{"d_tag":"0x1b","d_un":"0x8","name":"INIT_ARRAYSZ"},{"d_tag":"0x1a","d_un":"0x600720","name":"FINI_ARRAY"},{"d_tag":"0x1c","d_un":"0x8","name":"FINI_ARRAYSZ"},{"d_tag":"0x6ffffef5","d_un":"0x400260","name":"GNU_HASH"},{"d_tag":"0x5","d_un":"0x4002e0","name":"STRTAB "},{"d_tag":"0x6","d_un":"0x400280","name":"SYMTAB "},{"d_tag":"0xa","d_un":"0x54","name":"STRSZ"},{"d_tag":"0xb","d_un":"0x18","name":"SYMENT "},{"d_tag":"0x15","d_un":"0x0","name":"DEBUG"},{"d_tag":"0x3","d_un":"0x600918","name":"PLTGOT "},{"d_tag":"0x2","d_un":"0x48","name":"PLTRELSZ"},{"d_tag":"0x14","d_un":"0x7","name":"PLTREL"},{"d_tag":"0x17","d_un":"0x400378","name":"JMPREL"},{"d_tag":"0x7","d_un":"0x400360","name":"RELA"},{"d_tag":"0x8","d_un":"0x18","name":"RELASZ "},{"d_tag":"0x9","d_un":"0x18","name":"RELAENT "},{"d_tag":"0x6ffffffe","d_un":"0x400340","name":"VERNEED"},{"d_tag":"0x6fffffff","d_un":"0x1","name":"VERNEEDNUM"},{"d_tag":"0x6ffffff0","d_un":"0x400334","name":"VERSYM"}],"meta":{"bytes":[8,8],"prefix":"d_"}},"dynamicSymbols":{"value":[{"st_name":"0x0","st_info":"0x0","st_other":"0x0","st_shndx":"0x0","st_value":"0x0","st_size":"0x0","name":"","visibility":"DEFAULT","bind":"LOCAL","type":"NOTYPE"},{"st_name":"0x20","st_info":"0x12","st_other":"0x0","st_shndx":"0x0","st_value":"0x0","st_size":"0x0","name":"printf","visibility":"DEFAULT","bind":"GLOBAL","type":"FUNC"},{"st_name":"0x27","st_info":"0x12","st_other":"0x0","st_shndx":"0x0","st_value":"0x0","st_size":"0x0","name":"__libc_start_main","visibility":"DEFAULT","bind":"GLOBAL","type":"FUNC"},{"st_name":"0x39","st_info":"0x20","st_other":"0x0","st_shndx":"0x0","st_value":"0x0","st_size":"0x0","name":"__gmon_start__","visibility":"DEFAULT","bind":"WEAK","type":"NOTYPE"}],"meta":{"bytes":[4,1,1,2,8,8],"prefix":"st_"}},"symbolTable":{"value":[{"st_name":"0x23a","st_info":"0x12","st_other":"0x0","st_shndx":"0xb","st_value":"0x4003c0","st_size":"0x0","name":"_init","visibility":"DEFAULT","bind":"GLOBAL","type":"FUNC"},{"st_name":"0x220","st_info":"0x20","st_other":"0x0","st_shndx":"0x0","st_value":"0x0","st_size":"0x0","name":"_ITM_registerTMCloneTable","visibility":"DEFAULT","bind":"WEAK","type":"NOTYPE"},{"st_name":"0x214","st_info":"0x11","st_other":"0x2","st_shndx":"0x18","st_value":"0x600958","st_size":"0x0","name":"__TMC_END__","visibility":"HIDDEN","bind":"GLOBAL","type":"OBJECT"},{"st_name":"0x200","st_info":"0x20","st_other":"0x0","st_shndx":"0x0","st_value":"0x0","st_size":"0x0","name":"_Jv_RegisterClasses","visibility":"DEFAULT","bind":"WEAK","type":"NOTYPE"},{"st_name":"0x1fb","st_info":"0x12","st_other":"0x0","st_shndx":"0xd","st_value":"0x400516","st_size":"0x2d","name":"main","visibility":"DEFAULT","bind":"GLOBAL","type":"FUNC"},{"st_name":"0x1ef","st_info":"0x10","st_other":"0x0","st_shndx":"0x19","st_value":"0x600958","st_size":"0x0","name":"__bss_start","visibility":"DEFAULT","bind":"GLOBAL","type":"NOTYPE"},{"st_name":"0x1e8","st_info":"0x12","st_other":"0x0","st_shndx":"0xd","st_value":"0x400420","st_size":"0x2a","name":"_start","visibility":"DEFAULT","bind":"GLOBAL","type":"FUNC"},{"st_name":"0x1e3","st_info":"0x10","st_other":"0x0","st_shndx":"0x19","st_value":"0x600960","st_size":"0x0","name":"_end","visibility":"DEFAULT","bind":"GLOBAL","type":"NOTYPE"},{"st_name":"0x1d3","st_info":"0x12","st_other":"0x0","st_shndx":"0xd","st_value":"0x400550","st_size":"0x65","name":"__libc_csu_init","visibility":"DEFAULT","bind":"GLOBAL","type":"FUNC"},{"st_name":"0x1c4","st_info":"0x11","st_other":"0x0","st_shndx":"0xf","st_value":"0x4005d0","st_size":"0x4","name":"_IO_stdin_used","visibility":"DEFAULT","bind":"GLOBAL","type":"OBJECT"},{"st_name":"0x1b7","st_info":"0x11","st_other":"0x2","st_shndx":"0x18","st_value":"0x600950","st_size":"0x0","name":"__dso_handle","visibility":"HIDDEN","bind":"GLOBAL","type":"OBJECT"},{"st_name":"0x1a8","st_info":"0x20","st_other":"0x0","st_shndx":"0x0","st_value":"0x0","st_size":"0x0","name":"__gmon_start__","visibility":"DEFAULT","bind":"WEAK","type":"NOTYPE"},{"st_name":"0x19b","st_info":"0x10","st_other":"0x0","st_shndx":"0x18","st_value":"0x600948","st_size":"0x0","name":"__data_start","visibility":"DEFAULT","bind":"GLOBAL","type":"NOTYPE"},{"st_name":"0x17c","st_info":"0x12","st_other":"0x0","st_shndx":"0x0","st_value":"0x0","st_size":"0x0","name":"__libc_start_main@@GLIBC_2.2.5","visibility":"DEFAULT","bind":"GLOBAL","type":"FUNC"},{"st_name":"0x168","st_info":"0x12","st_other":"0x0","st_shndx":"0x0","st_value":"0x0","st_size":"0x0","name":"printf@@GLIBC_2.2.5","visibility":"DEFAULT","bind":"GLOBAL","type":"FUNC"},{"st_name":"0x162","st_info":"0x12","st_other":"0x0","st_shndx":"0xe","st_value":"0x4005c4","st_size":"0x0","name":"_fini","visibility":"DEFAULT","bind":"GLOBAL","type":"FUNC"},{"st_name":"0x15b","st_info":"0x10","st_other":"0x0","st_shndx":"0x18","st_value":"0x600958","st_size":"0x0","name":"_edata","visibility":"DEFAULT","bind":"GLOBAL","type":"NOTYPE"},{"st_name":"0x150","st_info":"0x20","st_other":"0x0","st_shndx":"0x18","st_value":"0x600948","st_size":"0x0","name":"data_start","visibility":"DEFAULT","bind":"WEAK","type":"NOTYPE"},{"st_name":"0x134","st_info":"0x20","st_other":"0x0","st_shndx":"0x0","st_value":"0x0","st_size":"0x0","name":"_ITM_deregisterTMCloneTable","visibility":"DEFAULT","bind":"WEAK","type":"NOTYPE"},{"st_name":"0x124","st_info":"0x12","st_other":"0x0","st_shndx":"0xd","st_value":"0x4005c0","st_size":"0x2","name":"__libc_csu_fini","visibility":"DEFAULT","bind":"GLOBAL","type":"FUNC"},{"st_name":"0x10e","st_info":"0x1","st_other":"0x0","st_shndx":"0x17","st_value":"0x600918","st_size":"0x0","name":"_GLOBAL_OFFSET_TABLE_","visibility":"DEFAULT","bind":"LOCAL","type":"OBJECT"},{"st_name":"0xfb","st_info":"0x0","st_other":"0x0","st_shndx":"0x12","st_value":"0x600718","st_size":"0x0","name":"__init_array_start","visibility":"DEFAULT","bind":"LOCAL","type":"NOTYPE"},{"st_name":"0xf2","st_info":"0x1","st_other":"0x0","st_shndx":"0x15","st_value":"0x600730","st_size":"0x0","name":"_DYNAMIC","visibility":"DEFAULT","bind":"LOCAL","type":"OBJECT"},{"st_name":"0xe1","st_info":"0x0","st_other":"0x0","st_shndx":"0x12","st_value":"0x600720","st_size":"0x0","name":"__init_array_end","visibility":"DEFAULT","bind":"LOCAL","type":"NOTYPE"},{"st_name":"0x0","st_info":"0x4","st_other":"0x0","st_shndx":"0xfff1","st_value":"0x0","st_size":"0x0","name":"","visibility":"DEFAULT","bind":"LOCAL","type":"FILE"},{"st_name":"0xd5","st_info":"0x1","st_other":"0x0","st_shndx":"0x14","st_value":"0x600728","st_size":"0x0","name":"__JCR_END__","visibility":"DEFAULT","bind":"LOCAL","type":"OBJECT"},{"st_name":"0xc7","st_info":"0x1","st_other":"0x0","st_shndx":"0x11","st_value":"0x400710","st_size":"0x0","name":"__FRAME_END__","visibility":"DEFAULT","bind":"LOCAL","type":"OBJECT"},{"st_name":"0x8","st_info":"0x4","st_other":"0x0","st_shndx":"0xfff1","st_value":"0x0","st_size":"0x0","name":"crtstuff.c","visibility":"DEFAULT","bind":"LOCAL","type":"FILE"},{"st_name":"0xbf","st_info":"0x4","st_other":"0x0","st_shndx":"0xfff1","st_value":"0x0","st_size":"0x0","name":"other.c","visibility":"DEFAULT","bind":"LOCAL","type":"FILE"},{"st_name":"0xa0","st_info":"0x1","st_other":"0x0","st_shndx":"0x12","st_value":"0x600718","st_size":"0x0","name":"__frame_dummy_init_array_entry","visibility":"DEFAULT","bind":"LOCAL","type":"OBJECT"},{"st_name":"0x94","st_info":"0x2","st_other":"0x0","st_shndx":"0xd","st_value":"0x4004f0","st_size":"0x0","name":"frame_dummy","visibility":"DEFAULT","bind":"LOCAL","type":"FUNC"},{"st_name":"0x6d","st_info":"0x1","st_other":"0x0","st_shndx":"0x13","st_value":"0x600720","st_size":"0x0","name":"__do_global_dtors_aux_fini_array_entry","visibility":"DEFAULT","bind":"LOCAL","type":"OBJECT"},{"st_name":"0x5e","st_info":"0x1","st_other":"0x0","st_shndx":"0x19","st_value":"0x600958","st_size":"0x1","name":"completed.6650","visibility":"DEFAULT","bind":"LOCAL","type":"OBJECT"},{"st_name":"0x48","st_info":"0x2","st_other":"0x0","st_shndx":"0xd","st_value":"0x4004d0","st_size":"0x0","name":"__do_global_dtors_aux","visibility":"DEFAULT","bind":"LOCAL","type":"FUNC"},{"st_name":"0x35","st_info":"0x2","st_other":"0x0","st_shndx":"0xd","st_value":"0x400490","st_size":"0x0","name":"register_tm_clones","visibility":"DEFAULT","bind":"LOCAL","type":"FUNC"},{"st_name":"0x20","st_info":"0x2","st_other":"0x0","st_shndx":"0xd","st_value":"0x400450","st_size":"0x0","name":"deregister_tm_clones","visibility":"DEFAULT","bind":"LOCAL","type":"FUNC"},{"st_name":"0x13","st_info":"0x1","st_other":"0x0","st_shndx":"0x14","st_value":"0x600728","st_size":"0x0","name":"__JCR_LIST__","visibility":"DEFAULT","bind":"LOCAL","type":"OBJECT"},{"st_name":"0x8","st_info":"0x4","st_other":"0x0","st_shndx":"0xfff1","st_value":"0x0","st_size":"0x0","name":"crtstuff.c","visibility":"DEFAULT","bind":"LOCAL","type":"FILE"},{"st_name":"0x1","st_info":"0x4","st_other":"0x0","st_shndx":"0xfff1","st_value":"0x0","st_size":"0x0","name":"init.c","visibility":"DEFAULT","bind":"LOCAL","type":"FILE"},{"st_name":"0x0","st_info":"0x3","st_other":"0x0","st_shndx":"0x1a","st_value":"0x0","st_size":"0x0","name":"","visibility":"DEFAULT","bind":"LOCAL","type":"SECTION"},{"st_name":"0x0","st_info":"0x3","st_other":"0x0","st_shndx":"0x19","st_value":"0x600958","st_size":"0x0","name":"","visibility":"DEFAULT","bind":"LOCAL","type":"SECTION"},{"st_name":"0x0","st_info":"0x3","st_other":"0x0","st_shndx":"0x18","st_value":"0x600948","st_size":"0x0","name":"","visibility":"DEFAULT","bind":"LOCAL","type":"SECTION"},{"st_name":"0x0","st_info":"0x3","st_other":"0x0","st_shndx":"0x17","st_value":"0x600918","st_size":"0x0","name":"","visibility":"DEFAULT","bind":"LOCAL","type":"SECTION"},{"st_name":"0x0","st_info":"0x3","st_other":"0x0","st_shndx":"0x16","st_value":"0x600910","st_size":"0x0","name":"","visibility":"DEFAULT","bind":"LOCAL","type":"SECTION"},{"st_name":"0x0","st_info":"0x3","st_other":"0x0","st_shndx":"0x15","st_value":"0x600730","st_size":"0x0","name":"","visibility":"DEFAULT","bind":"LOCAL","type":"SECTION"},{"st_name":"0x0","st_info":"0x3","st_other":"0x0","st_shndx":"0x14","st_value":"0x600728","st_size":"0x0","name":"","visibility":"DEFAULT","bind":"LOCAL","type":"SECTION"},{"st_name":"0x0","st_info":"0x3","st_other":"0x0","st_shndx":"0x13","st_value":"0x600720","st_size":"0x0","name":"","visibility":"DEFAULT","bind":"LOCAL","type":"SECTION"},{"st_name":"0x0","st_info":"0x3","st_other":"0x0","st_shndx":"0x12","st_value":"0x600718","st_size":"0x0","name":"","visibility":"DEFAULT","bind":"LOCAL","type":"SECTION"},{"st_name":"0x0","st_info":"0x3","st_other":"0x0","st_shndx":"0x11","st_value":"0x400620","st_size":"0x0","name":"","visibility":"DEFAULT","bind":"LOCAL","type":"SECTION"},{"st_name":"0x0","st_info":"0x3","st_other":"0x0","st_shndx":"0x10","st_value":"0x4005e8","st_size":"0x0","name":"","visibility":"DEFAULT","bind":"LOCAL","type":"SECTION"},{"st_name":"0x0","st_info":"0x3","st_other":"0x0","st_shndx":"0xf","st_value":"0x4005d0","st_size":"0x0","name":"","visibility":"DEFAULT","bind":"LOCAL","type":"SECTION"},{"st_name":"0x0","st_info":"0x3","st_other":"0x0","st_shndx":"0xe","st_value":"0x4005c4","st_size":"0x0","name":"","visibility":"DEFAULT","bind":"LOCAL","type":"SECTION"},{"st_name":"0x0","st_info":"0x3","st_other":"0x0","st_shndx":"0xd","st_value":"0x400420","st_size":"0x0","name":"","visibility":"DEFAULT","bind":"LOCAL","type":"SECTION"},{"st_name":"0x0","st_info":"0x3","st_other":"0x0","st_shndx":"0xc","st_value":"0x4003e0","st_size":"0x0","name":"","visibility":"DEFAULT","bind":"LOCAL","type":"SECTION"},{"st_name":"0x0","st_info":"0x3","st_other":"0x0","st_shndx":"0xb","st_value":"0x4003c0","st_size":"0x0","name":"","visibility":"DEFAULT","bind":"LOCAL","type":"SECTION"},{"st_name":"0x0","st_info":"0x3","st_other":"0x0","st_shndx":"0xa","st_value":"0x400378","st_size":"0x0","name":"","visibility":"DEFAULT","bind":"LOCAL","type":"SECTION"},{"st_name":"0x0","st_info":"0x3","st_other":"0x0","st_shndx":"0x9","st_value":"0x400360","st_size":"0x0","name":"","visibility":"DEFAULT","bind":"LOCAL","type":"SECTION"},{"st_name":"0x0","st_info":"0x3","st_other":"0x0","st_shndx":"0x8","st_value":"0x400340","st_size":"0x0","name":"","visibility":"DEFAULT","bind":"LOCAL","type":"SECTION"},{"st_name":"0x0","st_info":"0x3","st_other":"0x0","st_shndx":"0x7","st_value":"0x400334","st_size":"0x0","name":"","visibility":"DEFAULT","bind":"LOCAL","type":"SECTION"},{"st_name":"0x0","st_info":"0x3","st_other":"0x0","st_shndx":"0x6","st_value":"0x4002e0","st_size":"0x0","name":"","visibility":"DEFAULT","bind":"LOCAL","type":"SECTION"},{"st_name":"0x0","st_info":"0x3","st_other":"0x0","st_shndx":"0x5","st_value":"0x400280","st_size":"0x0","name":"","visibility":"DEFAULT","bind":"LOCAL","type":"SECTION"},{"st_name":"0x0","st_info":"0x3","st_other":"0x0","st_shndx":"0x4","st_value":"0x400260","st_size":"0x0","name":"","visibility":"DEFAULT","bind":"LOCAL","type":"SECTION"},{"st_name":"0x0","st_info":"0x3","st_other":"0x0","st_shndx":"0x3","st_value":"0x40023c","st_size":"0x0","name":"","visibility":"DEFAULT","bind":"LOCAL","type":"SECTION"},{"st_name":"0x0","st_info":"0x3","st_other":"0x0","st_shndx":"0x2","st_value":"0x40021c","st_size":"0x0","name":"","visibility":"DEFAULT","bind":"LOCAL","type":"SECTION"},{"st_name":"0x0","st_info":"0x3","st_other":"0x0","st_shndx":"0x1","st_value":"0x400200","st_size":"0x0","name":"","visibility":"DEFAULT","bind":"LOCAL","type":"SECTION"},{"st_name":"0x0","st_info":"0x0","st_other":"0x0","st_shndx":"0x0","st_value":"0x0","st_size":"0x0","name":"","visibility":"DEFAULT","bind":"LOCAL","type":"NOTYPE"}],"meta":{"bytes":[4,1,1,2,8,8],"prefix":"st_"}},"relocations":{"value":[{"r_offset":"0x600910","r_info":"0x300000006","r_addend":"0x0","index":"0x3","type":"0x6"},{"r_offset":"0x600930","r_info":"0x100000007","r_addend":"0x0","index":"0x1","type":"0x7"},{"r_offset":"0x600938","r_info":"0x200000007","r_addend":"0x0","index":"0x2","type":"0x7"},{"r_offset":"0x600940","r_info":"0x300000007","r_addend":"0x0","index":"0x3","type":"0x7"}],"meta":{"bytes":[8,8,8],"prefix":"r_"}},"libraries":["libc.so.6","lib/libc.so.6.sstrip"],"soname":"","interpreter":"/lib64/ld-linux-x86-64.so.2","isLib":false,"is64":true,"size":6776,"coverage":{"data":[{"size":"0x40","tag":"Meta","range_start":"0x0","range_end":"0x40","extra":"ELF Header","understood":true},{"size":"0x1c0","tag":"Meta","range_start":"0x40","range_end":"0x200","extra":"Program Headers","understood":true},{"size":"0x1c","tag":"Code","range_start":"0x200","range_end":"0x21c","extra":".interp // PROGBITS","understood":true},{"size":"0x1c","tag":"String","range_start":"0x200","range_end":"0x21c","extra":"PT_INTERP","understood":true},{"size":"0x44","tag":"String","range_start":"0x21c","range_end":"0x260","extra":"PT_NOTE","understood":true},{"size":"0x80","tag":"Unknown","range_start":"0x260","range_end":"0x2e0","extra":"Unknown // Computed","understood":false},{"size":"0x54","tag":"StringTable","range_start":"0x2e0","range_end":"0x334","extra":".dynstr // STRTAB","understood":true},{"size":"0x2c","tag":"Unknown","range_start":"0x334","range_end":"0x360","extra":"Unknown // Computed","understood":false},{"size":"0x18","tag":"Rela","range_start":"0x360","range_end":"0x378","extra":".rela.dyn // RELA","understood":true},{"size":"0x48","tag":"Rela","range_start":"0x378","range_end":"0x3c0","extra":".rela.plt // RELA","understood":true},{"size":"0x1a","tag":"Code","range_start":"0x3c0","range_end":"0x3da","extra":".init // PROGBITS","understood":true},{"size":"0x6","tag":"Unknown","range_start":"0x3da","range_end":"0x3e0","extra":"Unknown // Computed","understood":false},{"size":"0x40","tag":"Code","range_start":"0x3e0","range_end":"0x420","extra":".plt // PROGBITS","understood":true},{"size":"0x1a2","tag":"Code","range_start":"0x420","range_end":"0x5c2","extra":".text // PROGBITS","understood":true},{"size":"0x2","tag":"Unknown","range_start":"0x5c2","range_end":"0x5c4","extra":"Unknown // Computed","understood":false},{"size":"0x9","tag":"Code","range_start":"0x5c4","range_end":"0x5cd","extra":".fini // PROGBITS","understood":true},{"size":"0x3","tag":"Unknown","range_start":"0x5cd","range_end":"0x5d0","extra":"Unknown // Computed","understood":false},{"size":"0x15","tag":"Code","range_start":"0x5d0","range_end":"0x5e5","extra":".rodata // PROGBITS","understood":true},{"size":"0x3","tag":"Unknown","range_start":"0x5e5","range_end":"0x5e8","extra":"Unknown // Computed","understood":false},{"size":"0x34","tag":"Code","range_start":"0x5e8","range_end":"0x61c","extra":".eh_frame_hdr // PROGBITS","understood":true},{"size":"0x4","tag":"Unknown","range_start":"0x61c","range_end":"0x620","extra":"Unknown // Computed","understood":false},{"size":"0xf4","tag":"Code","range_start":"0x620","range_end":"0x714","extra":".eh_frame // PROGBITS","understood":true},{"size":"0x4","tag":"Unknown","range_start":"0x714","range_end":"0x718","extra":"Unknown // Computed","understood":false},{"size":"0x8","tag":"Code","range_start":"0x718","range_end":"0x720","extra":".init_array // INIT_ARRAY","understood":true},{"size":"0x8","tag":"Code","range_start":"0x720","range_end":"0x728","extra":".fini_array // FINI_ARRAY","understood":true},{"size":"0x8","tag":"Code","range_start":"0x728","range_end":"0x730","extra":".jcr // PROGBITS","understood":true},{"size":"0x1e0","tag":"Symbol","range_start":"0x730","range_end":"0x910","extra":".dynamic // DYNAMIC","understood":true},{"size":"0x1e0","tag":"String","range_start":"0x730","range_end":"0x910","extra":"PT_DYNAMIC","understood":true},{"size":"0x8","tag":"Code","range_start":"0x910","range_end":"0x918","extra":".got // PROGBITS","understood":true},{"size":"0x30","tag":"Code","range_start":"0x918","range_end":"0x948","extra":".got.plt // PROGBITS","understood":true},{"size":"0x10","tag":"Code","range_start":"0x948","range_end":"0x958","extra":".data // PROGBITS","understood":true},{"size":"0x27","tag":"Code","range_start":"0x958","range_end":"0x97f","extra":".comment // PROGBITS","understood":true},{"size":"0x0","tag":"Semantic","range_start":"0x958","range_end":"0x958","extra":".bss // NOBITS","understood":true},{"size":"0x108","tag":"StringTable","range_start":"0x97f","range_end":"0xa87","extra":".shstrtab // STRTAB","understood":true},{"size":"0x1","tag":"Unknown","range_start":"0xa87","range_end":"0xa88","extra":"Unknown // Computed","understood":false},{"size":"0x630","tag":"Symbol","range_start":"0xa88","range_end":"0x10b8","extra":".symtab // SYMTAB","understood":true},{"size":"0x240","tag":"StringTable","range_start":"0x10b8","range_end":"0x12f8","extra":".strtab // STRTAB","understood":true},{"size":"0x780","tag":"Meta","range_start":"0x12f8","range_end":"0x1a78","extra":"Section Headers","understood":true}],"size":"0x1a78","tags":["Meta","Code","Unknown","Symbol","SymbolTable","String","StringTable","Rela","PlatformSpecific","Data","Invalid","Semantic","Zero"],"totalCoverage":"0x1a78","totalUnderstood":"0x19b5","percentCoverage":1,"percentUnderstood":0.9712219598583235},"base64":"f0VMRgIBAQAAAAAAAAAAAAIAPgABAAAAIARAAAAAAABAAAAAAAAAAPgSAAAAAAAAAAAAAEAAOAAIAEAAHgAbAAYAAAAFAAAAQAAAAAAAAABAAEAAAAAAAEAAQAAAAAAAwAEAAAAAAADAAQAAAAAAAAgAAAAAAAAAAwAAAAQAAAAAAgAAAAAAAAACQAAAAAAAAAJAAAAAAAAcAAAAAAAAABwAAAAAAAAAAQAAAAAAAAABAAAABQAAAA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AAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAiAoAAAAAAAAwBgAAAAAAAB0AAAAuAAAACAAAAAAAAAAYAAAAAAAAAAkAAAADAAAAAAAAAAAAAAAAAAAAAAAAALgQAAAAAAAAQAIAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAA="} 2 | -------------------------------------------------------------------------------- /setup.ml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/m4b/elf2json/72dfb62e797f68e4ad24cf3e74547ef91f8a1e62/setup.ml -------------------------------------------------------------------------------- /src/elf2json.ml: -------------------------------------------------------------------------------- 1 | open LibRdr.Utils 2 | 3 | let version = "v1.1.0" 4 | 5 | let get_bytes filename = 6 | let ic = open_in_bin filename in 7 | if (in_channel_length ic < 4) then 8 | begin 9 | E2j.Json.print ~minify:false 10 | (`O ["error", 11 | `String "File too small (< 4 bytes)\n"]); 12 | exit 1 13 | end 14 | else 15 | let magic = if (Sys.big_endian) then 16 | Input.input_i32 ic 17 | else 18 | Input.input_i32be ic in 19 | if (magic <> Elf.Header.kMAGIC_ELF) then 20 | begin 21 | E2j.Json.print ~minify:false 22 | (`O ["error", 23 | `String "This is _not_ an ELF binary!\n"]); 24 | exit 1 25 | end 26 | else 27 | begin 28 | seek_in ic 0; 29 | let binary = Bytes.create (in_channel_length ic) in 30 | really_input ic binary 0 (in_channel_length ic); 31 | close_in ic; 32 | if (Elf.Header.check_64bit binary) then 33 | binary 34 | else 35 | begin 36 | E2j.Json.print ~minify:false 37 | (`O ["error", 38 | `String "Not a 64-bit ELF binary, sorry\n"]); 39 | exit 1 40 | end 41 | end 42 | 43 | let print_version = ref false 44 | let minify = ref false 45 | let include_coverage = ref false 46 | let include_base64 = ref false 47 | let binary = ref "" 48 | let only = ref "" 49 | let set_anon_argument string = 50 | binary := string 51 | let set_only symbol = 52 | only := symbol 53 | 54 | type config = { 55 | minify: bool; 56 | include_coverage: bool; 57 | include_base64: bool; 58 | install_name: string; 59 | only: bool; 60 | name: string; 61 | } 62 | 63 | let init_config () = 64 | let install_name = 65 | if (Filename.is_relative !binary) then 66 | (Sys.getcwd()) ^ Filename.dir_sep ^ !binary 67 | else 68 | !binary 69 | in 70 | let name = Filename.basename install_name in 71 | { 72 | minify = !minify; 73 | include_coverage = !include_coverage; 74 | include_base64 = !include_base64; 75 | install_name; 76 | only = !only <> ""; 77 | name 78 | } 79 | 80 | let sort symbols = 81 | List.sort (fun a b -> 82 | Pervasives.compare a.Elf.SymbolTable.st_value b.Elf.SymbolTable.st_value 83 | ) symbols 84 | 85 | let slide_sectors_to_json ss = 86 | `A (List.map (fun elem -> 87 | `O [("begin", E2j.Json.to_hex elem.Elf.ProgramHeader.start_sector); 88 | ("end", E2j.Json.to_hex elem.Elf.ProgramHeader.end_sector); 89 | ("slide", E2j.Json.to_hex elem.Elf.ProgramHeader.slide); 90 | ] 91 | ) ss) 92 | 93 | let to_json config :E2j_Json.json = 94 | let binary = get_bytes config.install_name in 95 | let elf = Elf.get ~meta_only:true binary in 96 | let header = E2j.Header.to_json elf.Elf.header in 97 | let program_headers = E2j.ProgramHeader.to_json elf.Elf.program_headers in 98 | let section_headers = E2j.SectionHeader.to_json elf.Elf.section_headers in 99 | let _dynamic = E2j.Dynamic.to_json elf.Elf._dynamic in 100 | let dynamic_symbols = E2j.Dynamic.dynamic_symbols2json (elf.Elf.dynamic_symbols |> sort) in 101 | let symbol_table = E2j.SymbolTable.to_json (elf.Elf.symbol_table |> sort)in 102 | let relocs = E2j.Reloc.to_json elf.Elf.relocations in 103 | let libraries = `A (List.map (fun lib -> `String lib) 104 | elf.Elf.libraries) 105 | in 106 | let slide_sectors = Elf.ProgramHeader.get_slide_sectors elf.Elf.program_headers 107 | |> slide_sectors_to_json in 108 | let coverage = if (config.include_coverage) then 109 | E2j.Coverage.to_json elf.Elf.byte_coverage 110 | else 111 | `Null 112 | in 113 | let b64 = if (config.include_base64) then 114 | `String (B64.encode binary) 115 | else 116 | `Null 117 | in 118 | let json = 119 | `O [ 120 | "header", header; 121 | "programHeaders", program_headers; 122 | "sectionHeaders", section_headers; 123 | "_dynamic", _dynamic; 124 | "dynamicSymbols", dynamic_symbols; 125 | "symbolTable", symbol_table; 126 | "relocations", relocs; 127 | "slideSectors", slide_sectors; 128 | "libraries", libraries; 129 | "soname", `String elf.Elf.soname; 130 | "interpreter", `String elf.Elf.interpreter; 131 | "isLib", `Bool elf.Elf.is_lib; 132 | "is64", `Bool elf.Elf.is_64; 133 | "size", E2j_Json.to_number elf.Elf.size; 134 | "coverage", coverage; 135 | "base64", b64; 136 | ] 137 | in json 138 | 139 | let keys = [ 140 | "header"; 141 | "programHeaders"; 142 | "sectionHeaders"; 143 | "_dynamic"; 144 | "dynamicSymbols"; 145 | "symbolTable"; 146 | "relocations"; 147 | "slideSectors"; 148 | "libraries"; 149 | "soname"; 150 | "interpreter"; 151 | "isLib"; 152 | "is64"; 153 | "size"; 154 | "coverage"; 155 | "base64"] 156 | 157 | let rec get_only (key:string) json = 158 | match json with 159 | | [] -> `Null 160 | | (k,value)::rest -> 161 | if (key = k) then 162 | `O [(k,value)] 163 | else 164 | get_only key rest 165 | 166 | let get output_only (json:E2j_Json.json) = 167 | if (output_only) then 168 | match json with 169 | | `O fields -> get_only !only fields 170 | | _ -> `Null 171 | else json 172 | 173 | 174 | let main = 175 | let speclist = 176 | [("-m", Arg.Set minify, "Minify the json output; default false"); 177 | ("--minify", Arg.Set minify, "Minify the json output; default false"); 178 | ("-b", Arg.Set include_base64, "Include the binary as a base64 encoded string; default false"); 179 | ("--base64", Arg.Set include_base64, "Include the binary as a base64 encoded string; default false"); 180 | ("-c", Arg.Set include_coverage, "Output data from the byte coverage algorithm; default false"); 181 | ("--coverage", Arg.Set include_coverage, "Output data from the byte coverage algorithm; default false"); 182 | ("-v", Arg.Set print_version, "Prints the version"); 183 | ("-o", Arg.Symbol (keys, set_only), "Only print a particular key in the JSON object"); 184 | ("--only", Arg.Symbol (keys, set_only), "Only print a particular key in the JSON object"); 185 | ] in 186 | let usage_msg = "usage: elf2json [-m --minify] [-b --base64] [-c --coverage] \noptions:" in 187 | Arg.parse speclist set_anon_argument usage_msg; 188 | let config = init_config() in 189 | if (!print_version) then 190 | Printf.printf "%s\n" @@ version 191 | else 192 | if (!binary = "") then 193 | begin 194 | Printf.eprintf "Error: no path to binary given\n"; 195 | Arg.usage speclist usage_msg; 196 | exit 1 197 | end 198 | else 199 | let json = to_json config in 200 | json 201 | |> get config.only 202 | |> E2j.Json.print ~minify:config.minify 203 | --------------------------------------------------------------------------------