summaryrefslogtreecommitdiffstats
path: root/llvm/utils/extract_symbols.py
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/utils/extract_symbols.py')
-rwxr-xr-xllvm/utils/extract_symbols.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/utils/extract_symbols.py b/llvm/utils/extract_symbols.py
index 93ad2e9c375..7cdcce126ce 100755
--- a/llvm/utils/extract_symbols.py
+++ b/llvm/utils/extract_symbols.py
@@ -42,13 +42,13 @@ def dumpbin_get_symbols(lib):
process.wait()
def nm_get_symbols(lib):
- process = subprocess.Popen(['nm',lib], bufsize=1,
+ process = subprocess.Popen(['nm','-P',lib], bufsize=1,
stdout=subprocess.PIPE, stdin=subprocess.PIPE,
universal_newlines=True)
process.stdin.close()
for line in process.stdout:
# Look for external symbols that are defined in some section
- match = re.match("^\S+\s+[BDGRSTVW]\s+(\S+)$", line)
+ match = re.match("^(\S+)\s+[BDGRSTVW]\s+\S+\s+\S+$", line)
if match:
yield match.group(1)
process.wait()
OpenPOWER on IntegriCloud