public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely@redhat.com>
To: Rainer Orth <ro@cebitec.uni-bielefeld.de>
Cc: "libstdc++" <libstdc++@gcc.gnu.org>,
	gcc Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [committed] libstdc++: Fix symbol versioning for Solaris 11.3 [PR103407]
Date: Fri, 18 Mar 2022 12:51:28 +0000	[thread overview]
Message-ID: <CACb0b4mx3nq5MSDWLWaK_KoXqfo02oAaMaeH4FF8MZkG05tnFA@mail.gmail.com> (raw)
In-Reply-To: <yddk0cr5swm.fsf@CeBiTec.Uni-Bielefeld.DE>

On Fri, 18 Mar 2022 at 12:47, Rainer Orth wrote:
>
> Hi Jonathan,
>
> > I did some very brief testing and it seemed like a program linked to
> > the Solaris 11.3 libstdc++.so.6.0.30 (with from_chars@GLIBCXX_3.4.30)
> > can still run against libstdc++.so.6.0.30 with
> > from_chars@GLIBCXX_3.4.29 (which should match what you get on Solaris
> > 11.4 if I correctly fiddled with the versioning). So I don't
>
> indeed.  You can observe the symbols provided and consumed by shared
> objects and executables with pvs.
>
> E.g. on 11.4:
>
> $ pvs -dsvo libstdc++.so|grep _ZSt10from_charsPKcS0_R
> libstdc++.so -  GLIBCXX_3.4.29: _ZSt10from_charsPKcS0_RfSt12chars_format;
> libstdc++.so -  GLIBCXX_3.4.29: _ZSt10from_charsPKcS0_ReSt12chars_format;
> libstdc++.so -  GLIBCXX_3.4.29: _ZSt10from_charsPKcS0_RdSt12chars_format;
>
> for the provider side vs. 11.3:
>
> $ pvs -dsvo libstdc++.so|grep _ZSt10from_charsPKcS0_R
> libstdc++.so -  GLIBCXX_3.4.30: _ZSt10from_charsPKcS0_ReSt12chars_format;
> libstdc++.so -  GLIBCXX_3.4.30: _ZSt10from_charsPKcS0_RdSt12chars_format;
> libstdc++.so -  GLIBCXX_3.4.30: _ZSt10from_charsPKcS0_RfSt12chars_format;
>
> pvs -r shows symbols and versions required by an executable.
>
> > understand how the Solaris runtime linker handles symbol versions, but
> > it seems like there's no backwards compatibility problem for the
> > Solaris 11.4 build of libstdc++.so.6.0.30.
>
> You can observe this at runtime with LD_DEBUG=versions or
> versions,detail.  LD_DEBUG=help <some command> gives the full info.
>
> IIRC Solaris ld.so.1 just checks if the versions required by an
> executable are provided by a shared object, but doesn't look into
> individual symbols in advance.  It may well be that some checks have
> been relaxed in the 11.4 timeframe, though.

Ah that would explain it. The libstdc++.so built on Solaris 11.4 has
the std::from_chars symbols and it has version GLIBCXX_3.4.30, so that
satisfies the requirements for a program linked against the
libstdc++.so on Solaris 11.3.


      reply	other threads:[~2022-03-18 12:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-16 21:24 Jonathan Wakely
2022-03-18 11:49 ` Rainer Orth
2022-03-18 12:21   ` Jonathan Wakely
2022-03-18 12:47     ` Rainer Orth
2022-03-18 12:51       ` Jonathan Wakely [this message]

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=CACb0b4mx3nq5MSDWLWaK_KoXqfo02oAaMaeH4FF8MZkG05tnFA@mail.gmail.com \
    --to=jwakely@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=libstdc++@gcc.gnu.org \
    --cc=ro@cebitec.uni-bielefeld.de \
    /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).