From: Alan Modra <amodra@gmail.com>
To: Michael Tokarev <mjt@tls.msk.ru>
Cc: binutils <binutils@sourceware.org>
Subject: Re: puzzling ld behavior, failing to find symbols from .so after adding more .o file
Date: Wed, 30 Mar 2022 12:20:04 +1030 [thread overview]
Message-ID: <YkO3TCvzTL90ui8O@squeak.grove.modra.org> (raw)
In-Reply-To: <7f94bd18-ff3e-d3de-d3a6-1568a0b3709c@msgid.tls.msk.ru>
On Sat, Mar 26, 2022 at 06:19:21PM +0300, Michael Tokarev wrote:
> I think I got it sorted out.
>
> in the new version the tdb.h file (which declares tdb_null
> and other stuff) added _PUBLIC_ attribute before all symbols,
> which is by default evaluates to attribute(visibility(default)).
> But when compiling samba, _PUBLIC_ is defined to
> attribute(visibility(hidden)) before including tdb.h.
> And things goes the wrong way from here...
>
> It is interesting still why ld behaves this way, but the
> mystery is now solved.
A hidden visibility symbol will not be put in .dynsym. So any newly
built shared library defining one of the affected symbols won't
provide a definition that can be used outside of that shared library.
--
Alan Modra
Australia Development Lab, IBM
next prev parent reply other threads:[~2022-03-30 1:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-25 20:15 Michael Tokarev
2022-03-25 22:43 ` Andrew Bell
2022-03-26 14:56 ` Michael Tokarev
2022-03-26 0:25 ` Andrew Pinski
2022-03-26 15:06 ` Michael Tokarev
2022-03-26 15:19 ` Michael Tokarev
2022-03-30 1:50 ` Alan Modra [this message]
2022-03-26 15:19 ` Andreas Schwab
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YkO3TCvzTL90ui8O@squeak.grove.modra.org \
--to=amodra@gmail.com \
--cc=binutils@sourceware.org \
--cc=mjt@tls.msk.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).