[libcxx-commits] [libcxx] [libcxx] Support ABI symbol sizes on macOS (PR #75623)
Will Hawkins via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Jan 17 22:25:57 PST 2024
================
@@ -123,6 +123,40 @@ def adjust_mangled_name(name):
return name[1:]
+def extract_object_sizes_from_map(mapfilename: str):
+ maplines = []
+ result = {}
+
+ with open(mapfilename, "r") as f:
+ maplines = f.readlines()
+
+ if len(maplines) == 0:
+ return {}
+
+ # Yes, this is fragile.
----------------
hawkinsw wrote:
Unfortunately, yes, it only works with the Darwin linker (`/usr/bin/ld`). I attempted to duplicate it with the linker on Linux but, although The GNU Linker does support map files, it does not give us enough information. So, I think that we are stuck with having a solution limited to the Darwin linker.
https://github.com/llvm/llvm-project/pull/75623
More information about the libcxx-commits
mailing list