(nm, file_)
| 50 | |
| 51 | |
| 52 | def ProcessFile(nm, file_): |
| 53 | names = [] |
| 54 | for line in nm.RunWithArgsForStdout(file_).splitlines(): |
| 55 | line = line.rstrip() |
| 56 | if not line.lstrip(): |
| 57 | continue |
| 58 | if line.endswith(':'): |
| 59 | # displaying the archive name, e.g. "foo.c.o:" |
| 60 | continue |
| 61 | # line looks like: |
| 62 | # |
| 63 | # -------- d yycheck |
| 64 | # -------- t wabt_strndup_ |
| 65 | # U wabt_parse_int64 |
| 66 | # -------- T wabt_offsetof_allocator_alloc |
| 67 | # |
| 68 | # we want to only keep the "T" names; the extern function symbols defined |
| 69 | # in the object. |
| 70 | type_ = line[9] |
| 71 | if type_ != 'T': |
| 72 | continue |
| 73 | name = line[11:] |
| 74 | names.append('_' + name) |
| 75 | return names |
| 76 | |
| 77 | |
| 78 | def main(args): |
no test coverage detected