Symbols in private libraries have recently (?) started being accessible by external users. This makes the distinction between private and public libraries pointless.
I had a quick chat with Jelmer, and it seems the issue has been present for the last 6 months at least (not 4.1 as the title says).
An example of the issue is "if you link against just -lsamba-util, it shouldn't expose the symbols in e.g. samba-debug".
I do not have sufficient knowledge of the samba build to help though, so I would need a testcase or some information to be able to pinpoint the revision(s) :-(
(In reply to Jelmer Vernooij from comment #0)
The private libraries are just normal shared libraries, which need expose
As libsamba-util.so links against private/libsamba-debug-samba4.so
an binary that links against libsamba-util.so see the symbols of
private/libsamba-debug-samba4.so at runtime. I can't think of a way
to avoid that. If the binary is linking with -lsamba-util only
and sees the symbols of private/libsamba-debug-samba4.so at link time,
I guess the linker flags used for that binary are the problem.
Maybe it's related to --add-needed/--copy-dt-needed-entries.
Do you have an example program that shows the problem.
Please also use nm and grep ' T ' to verify which symbols are exposed
by which library.
Yeah, I think --no-add-needed would help.
Some linkers (e.g. ld.gold) enable --no-add-needed by default. I'm guessing I'm building with a different linker now, so perhaps this is not a regression but a change in my environment.
I don't think here is any thing to do.