(read_elf_line)
| 29 | from subprocess import check_output |
| 30 | |
| 31 | def to_symbol(read_elf_line): |
| 32 | v = read_elf_line.split() |
| 33 | |
| 34 | s2 = Symbol() |
| 35 | s2.value = int(v[1], 16) |
| 36 | s2.size = int(v[2]) |
| 37 | s2.type = v[3] |
| 38 | s2.binding = v[4] |
| 39 | if len(v) >= 8: |
| 40 | s2.name = v[7] |
| 41 | else: |
| 42 | s2.name = "" |
| 43 | |
| 44 | return s2 |
| 45 | |
| 46 | output = check_output([read_elf_path, "-s", "-W", file]).decode(stdout_encoding) |
| 47 | lines = output.splitlines()[3:] |