[libcxx-commits] [libcxx] [libcxx] Support ABI symbol sizes on macOS (PR #75623)

Will Hawkins via libcxx-commits libcxx-commits at lists.llvm.org
Tue Apr 30 14:45:01 PDT 2024


hawkinsw wrote:

> This LGTM but I think there's a small problem with the patch since the CI is failing on macOS. Probably a minor oversight.

As I have been investigating this issue, it turns out that the mapfile *not* a surefire way to get the size of an object. The size of the object as listed by the mapfile is only the difference (in bytes) between two consecutive symbols' offset in the final binary. In other words (and this is the cause of the CI failure), let's say

- Symbol $x$ immediately precedes Symbol $y$ in the library; and
- Symbol $x$'s offset is $x_o$ and Symbol $y$'s offset is $y_o$. Then,
- The "size" of $x$ is just $y_o - x_o$ (there is a special case for the situation where $x$ is at the end of a section).

Needless to say, this situation is not ideal. I think that we have no choice but to bench this PR until I can either
- think of a workaround
- find another way of deducing symbol size entirely.

Sorry, @ldionne !

https://github.com/llvm/llvm-project/pull/75623


More information about the libcxx-commits mailing list