Skip to content

Commit

Permalink
[dfsan] Fix some build-libc-list.py lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
MaskRay committed Feb 11, 2023
1 parent 9db037d commit e7ade78
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions compiler-rt/lib/dfsan/scripts/build-libc-list.py
Expand Up @@ -40,9 +40,11 @@
import sys
from optparse import OptionParser

def defined_function_list(object):

def defined_function_list(lib):
"""Get non-local function symbols from lib."""
functions = []
readelf_proc = subprocess.Popen(['readelf', '-s', '-W', object],
readelf_proc = subprocess.Popen(['readelf', '-s', '-W', lib],
stdout=subprocess.PIPE)
readelf = readelf_proc.communicate()[0].decode().split('\n')
if readelf_proc.returncode != 0:
Expand Down Expand Up @@ -85,8 +87,5 @@ def defined_function_list(object):
print('Exiting with failure code due to missing library.', file=sys.stderr)
exit(1)

functions = list(set(functions))
functions.sort()

for f in functions:
for f in sorted(set(functions)):
print('fun:%s=uninstrumented' % f)

0 comments on commit e7ade78

Please sign in to comment.