blob: c8e97a784819ab50453b703381bd72b5d3c88d33 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
#!/usr/bin/env python
import sys
import re
import json
expr = re.compile(r"(olm_[^( ]*)\(")
exports = {'_free', '_malloc'}
for f in sys.argv[1:]:
with open(f) as fp:
for line in fp:
matches = expr.search(line)
if matches is not None:
exports.add('_%s' % (matches.group(1),))
json.dump(sorted(exports), sys.stdout)
|