On Fri, Oct 30, 2026 at 12:20:18PM +0100, Thomas Schwinge wrote:
> I'd like to properly compare the existing C vs. upcoming C++ libgomp ABI,
> in a structured way.  We could rely on careful manual review of the
> changes (..., but...), plus a one-off/manual comparison with 'readelf'
> (or even libabigail maybe?), but what about this following idea:
> integrate into libgomp what libstdc++ already has as 'make check-abi',
> which is a "symbol-table regression test".

I think that is an overkill in the libgomp case, sure, you should verify
the transition, e.g. by using
#!/bin/sh
readelf -Ws $1 | sed -n 's/<OS specific>: 10/UNIQUE/;/\.symtab/,$d;/ UND 
/d;/@GLIBC_PRIVATE/d;s/\[<localentry>: 8\]//;/\(GLOBAL\|WEAK\|UNIQUE\)/p' | awk 
'{ if ($4 == "OBJECT") { printf "%s %s %s %s %s\n", $8, $4, $5, $6, $3 } else { 
printf "%s %s %s %s\n", $8, $4, $5, $6 }}' | LC_ALL=C sort -u
and compare it is the same before/after, but it can be done once
during the migration, doesn't need to be reverified every time.
The reason libstdc++ needs it is that getting ABI in C++ is hard, but
I'd hope that even after the transition all libgomp ABI entrypoints
are extern "C", nothing is exported e.g. from implicit instantiation etc.,
we don't export all methods of some classes, ...

Anyway, I'd suggest one-off libabigail comparison too (but don't have much
experience with that, talk to Dodji as author if something is unclear).

        Jakub

Reply via email to