(file)
| 26 | |
| 27 | |
| 28 | def read_symbols(file): |
| 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:] |
| 48 | return [to_symbol(line) for line in lines] |
| 49 | |
| 50 | |
| 51 | def read_obj(tu, call_graph): |
no test coverage detected