2021-05-24 16:32:57 +02:00
|
|
|
#!/usr/bin/env python3
|
2018-10-03 17:06:15 +02:00
|
|
|
|
|
|
|
import sys
|
|
|
|
import re
|
|
|
|
import json
|
|
|
|
|
|
|
|
expr = re.compile(r"(olm_[^( ]*)\(")
|
|
|
|
|
2020-09-26 18:23:50 +02:00
|
|
|
exports = {'_free', '_malloc'}
|
2018-10-03 17:06:15 +02:00
|
|
|
|
|
|
|
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)
|