public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
* Abidiff caveats questions.
@ 2015-01-01  0:00 Maxim Ostapenko
  2015-01-01  0:00 ` Dodji Seketeli
  0 siblings, 1 reply; 4+ messages in thread
From: Maxim Ostapenko @ 2015-01-01  0:00 UTC (permalink / raw)
  To: libabigail, Dodji Seketeli; +Cc: Yury Gribov, Pavel Kopyl

Hi Dodji,

I found abidiff tool to be very useful, thank you! But it has some 
limitations and I would like to ask a few questions, is this a correct 
place to do it?

1) Abidiff works great with different versions of one shared library (I 
used glibc 2.20 and glibc 2.18), but it was confused when I tried to 
compare libc-2.20.so with libtirpc.so to find ABI incompatibilities 
between Glibc and Libtirpc RPC implementations. Since Glibc has 
versioned symbols (for example authunix_create@@GLIBC_2.2.5) and 
Libtirpc has non-versioned ones (authunix_create), abidiff confuses to 
compare them (and their parameters types), so we have no detailed 
information about changes happened, only that first symbol was deleted 
and second was added.

I think this usecase is not widely spread, but is there any way abidiff 
could resolve this issue (perhaps resolve versioned symbol somehow)?

2) I tried the second example from abidiff manual 
(https://sourceware.org/libabigail/manual/abidiff.html) with the small 
change: I've made function foo inline.
Abidiff didn't detected any ABI changes that is expected, because G++ 
didn't generate corresponding symbol in .dynsym section:

$ cat -n test-v0.cc
          1      // Compile this with:
          2      //   g++ -g -Wall -shared -o libtest-v0.so test-v0.cc
          3
          4      struct S0
          5      {
          6        int m0;
          7      };
          8
          9      inline void
         10      foo(S0& /*parameter_name*/)
         11      {
         12        // do something with parameter_name.
         13      }
$
$ cat -n test-v1.cc
          1      // Compile this with:
          2      //   g++ -g -Wall -shared -o libtest-v1.so test-v1.cc
          3
          4      struct S0
          5      {
          6        char inserted_member;
          7        int m0;
          8      };
          9
         10      inline void
         11      foo(S0& /*parameter_name*/)
         12      {
         13        // do something with parameter_name.
         14      }

$ g++ -g -Wall -shared -o libtest-v0.so test-v0.cc
$ g++ -g -Wall -shared -o libtest-v1.so test-v1.cc
$
$ ../build/tools/abidiff libtest-v0.so libtest-v1.so
$
$ readelf -s libtest-v0.so

Symbol table '.dynsym' contains 12 entries:
    Num:    Value          Size Type    Bind   Vis      Ndx Name
      0: 0000000000000000     0 NOTYPE  LOCAL  DEFAULT  UND
      1: 0000000000000490     0 SECTION LOCAL  DEFAULT    7
      2: 0000000000000000     0 NOTYPE  WEAK   DEFAULT  UND __cxa_finalize
      3: 0000000000000000     0 NOTYPE  WEAK   DEFAULT  UND 
_ITM_registerTMCloneTable
      4: 0000000000000000     0 NOTYPE  WEAK   DEFAULT  UND 
_ITM_deregisterTMCloneTab
      5: 0000000000000000     0 NOTYPE  WEAK   DEFAULT  UND 
_Jv_RegisterClasses
      6: 0000000000000000     0 NOTYPE  WEAK   DEFAULT  UND __gmon_start__
      7: 0000000000201030     0 NOTYPE  GLOBAL DEFAULT   18 _edata
      8: 0000000000201038     0 NOTYPE  GLOBAL DEFAULT   19 _end
      9: 0000000000000490     0 FUNC    GLOBAL DEFAULT    7 _init
     10: 0000000000201030     0 NOTYPE  GLOBAL DEFAULT   19 __bss_start
     11: 00000000000005c8     0 FUNC    GLOBAL DEFAULT   10 _fini

Perhaps abidiff documentation should point out that users shouldn't 
expect much, if they use inline functions widely?

Thank you,
Maxim

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-03-26  8:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-01  0:00 Abidiff caveats questions Maxim Ostapenko
2015-01-01  0:00 ` Dodji Seketeli
2015-01-01  0:00   ` Maxim Ostapenko
2015-01-01  0:00     ` Dodji Seketeli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).