[llvm] acbb15e - Revert "[extract_symbols.py] Adjust how the output of nm is interpreted"

Jake Egan via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 14 08:27:57 PST 2023


Author: Jake Egan
Date: 2023-02-14T11:27:49-05:00
New Revision: acbb15ed705fa27fc39370abdb0ab0fc2a69c453

URL: https://github.com/llvm/llvm-project/commit/acbb15ed705fa27fc39370abdb0ab0fc2a69c453
DIFF: https://github.com/llvm/llvm-project/commit/acbb15ed705fa27fc39370abdb0ab0fc2a69c453.diff

LOG: Revert "[extract_symbols.py] Adjust how the output of nm is interpreted"

This commit was intended to fix some failures on AIX, but introduced some new failures instead. Commit e5d914672233cd055cda564eee2803a0a1c78c36 fixed the original failures. See D142989.

This reverts commit 78f13ea093afdebcaa3b5c5690530b9217bbdfac.

Added: 
    

Modified: 
    llvm/utils/extract_symbols.py

Removed: 
    


################################################################################
diff  --git a/llvm/utils/extract_symbols.py b/llvm/utils/extract_symbols.py
index 2bd71e3afbf00..20be2881bc094 100755
--- a/llvm/utils/extract_symbols.py
+++ b/llvm/utils/extract_symbols.py
@@ -52,14 +52,13 @@ def nm_get_symbols(lib):
                                universal_newlines=True)
     process.stdin.close()
     for line in process.stdout:
-        # Look for external symbols that are defined in some section, i.e.
-        # symbols that aren't absolute, local, or undefined.
+        # Look for external symbols that are defined in some section
         # The POSIX format is:
         #   name   type   value   size
         # The -P flag displays the size field for symbols only when applicable,
         # so the last field is optional. There's no space after the value field,
         # but \s+ match newline also, so \s+\S* will match the optional size field.
-        match = re.match("^(\S+)\s+[^AU]\s+\S+\s+\S*$", line)
+        match = re.match("^(\S+)\s+[BDGRSTVW]\s+\S+\s+\S*$", line)
         if match:
             yield (match.group(1), True)
         # Look for undefined symbols, which have type U and may or may not


        


More information about the llvm-commits mailing list