public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
From: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
To: Jonathan Wakely <jwakely@redhat.com>
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 13:47:37 +0100	[thread overview]
Message-ID: <yddk0cr5swm.fsf@CeBiTec.Uni-Bielefeld.DE> (raw)
In-Reply-To: <CACb0b4kCHU4OTb18Y5pcsD4VnntdUo8-VD63FtcT-XT2O3Bsow@mail.gmail.com> (Jonathan Wakely's message of "Fri, 18 Mar 2022 12:21:11 +0000")

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.

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

  reply	other threads:[~2022-03-18 12:47 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 [this message]
2022-03-18 12:51       ` Jonathan Wakely

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=yddk0cr5swm.fsf@CeBiTec.Uni-Bielefeld.DE \
    --to=ro@cebitec.uni-bielefeld.de \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jwakely@redhat.com \
    --cc=libstdc++@gcc.gnu.org \
    /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).