I realized that gdb and maps (that I both had already) give me all that I need.
When stopping at a function from libpostfix-tls.so I can print where I am and check which file is mapped there:
So whatever detail I miss from my ltrace incantaton, the code of tls_log_mask really is from the shared library. And while that makes tracing the calls slightly harder it is relieving as it eliminates at least one kind of craziness :-)
I realized that gdb and maps (that I both had already) give me all that I need.
When stopping at a function from libpostfix-tls.so I can print where I am and check which file is mapped there:
Breakpoint 1, tls_log_mask (log_param= 0x55555555c6f8 "-L option", log_level= 0x5555555728c0 "routine, certmatch" ) at /build/ postfix- 9Thbkc/ postfix- 3.5.6/src/ tls/tls_ misc.c: 545 finger) /maps | grep -e 'xp.*tls.so' -e 'xp.*posttls- finger' 55555555c000 r-xp 00003000 00:ba 87205 /usr/sbin/ posttls- finger 7ffff7fb8000 r-xp 00009000 00:ba 86770 /usr/lib/ postfix/ libpostfix- tls.so
(gdb) info regs
...
rip 0x7ffff7fa43f8 0x7ffff7fa43f8 <tls_log_mask+20>
$ cat /proc/$(pidof posttls-
555555557000-
7ffff7fa0000-
So whatever detail I miss from my ltrace incantaton, the code of tls_log_mask really is from the shared library. And while that makes tracing the calls slightly harder it is relieving as it eliminates at least one kind of craziness :-)