[libcxx-commits] [PATCH] D140313: libcxx: accept both GNU and ELF Tool Chain readelf format

Ed Maste via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Dec 19 09:15:26 PST 2022


emaste created this revision.
emaste added reviewers: dim, Mordante.
Herald added a subscriber: arichardson.
Herald added a project: All.
emaste requested review of this revision.

In libcxx ABI list tooling.


https://reviews.llvm.org/D140313

Files:
  libcxx/utils/libcxx/sym_check/extract.py


Index: libcxx/utils/libcxx/sym_check/extract.py
===================================================================
--- libcxx/utils/libcxx/sym_check/extract.py
+++ libcxx/utils/libcxx/sym_check/extract.py
@@ -175,10 +175,14 @@
         start = -1
         end = -1
         for i in range(len(lines)):
-            if lines[i].startswith("Symbol table '.dynsym'"):
+            # Accept both GNU and ELF Tool Chain readelf format
+            if re.match(r"Symbol table ['(].dynsym[')]", lines[i]):
                 start = i + 2
-            if start != -1 and end == -1 and not lines[i].strip():
-                end = i + 1
+            elif start != -1 and end == -1:
+                if not lines[i].strip():
+                    end = i + 1
+                if lines[i].startswith("Symbol table ("):
+                    end = i
         assert start != -1
         if end == -1:
             end = len(lines)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D140313.483982.patch
Type: text/x-patch
Size: 917 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20221219/90d2dffe/attachment-0001.bin>


More information about the libcxx-commits mailing list