public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Biener <richard.guenther@gmail.com>
To: "Martin Liška" <mliska@suse.cz>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>, Jan Hubicka <hubicka@ucw.cz>
Subject: Re: [RFC][PATCH 3/N] lto-plugin: Port to C++
Date: Mon, 10 Jan 2022 08:50:34 +0100	[thread overview]
Message-ID: <CAFiYyc2ZExx+Niu=uWojC2j8AadYW0mYpB2TicDovRHDNctv0g@mail.gmail.com> (raw)
In-Reply-To: <c1b6c864-ecba-7e2b-c42f-dcdde1a5bd54@suse.cz>

On Wed, Jan 5, 2022 at 2:28 PM Martin Liška <mliska@suse.cz> wrote:
>
> Hello.
>
> I'm working on some changes that will be needed for support of ld.mold.
> And I would like to have the plugin in C++. Having that, we can utilize basic
> contains like std::vector (instead of xrealloc(foo, len + 1)...).
>
> I split the patch into 2 pieces where the second one is only result
> of autoreconf and automake.
>
> Lightly tested with ld.bfd, ld.gold and lto.exp.

With the linker plugin build by GCC using its libstdc++ statically(?)
and for example gold (also a C++ application) built by another
(GCC) system compiler there might be two different versioned
libstdc++ in the process image after dlopening the plugin.  Is the
libstdc++ "copy" in the plugin sufficiently isolated to not cause
problems here?  Do we need to pay extra care as to the subset
of the C++ standard library we can use (I'm thinking of parts
initialized on load time like I/O)?

That said, I'm not sure this is worth the trouble.

Richard.

>
> Thoughts?
> Thanks,
> Martin

  reply	other threads:[~2022-01-10  7:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-05 11:06 [PATCH] LTO plugin: modernize a bit Martin Liška
2022-01-05 13:23 ` [PATCH 2/N] Enable migration to C++ Martin Liška
2022-01-05 13:27   ` [RFC][PATCH 3/N] lto-plugin: Port " Martin Liška
2022-01-10  7:50     ` Richard Biener [this message]
2022-01-10  8:03       ` Andrew Pinski
2022-01-11 13:27       ` Martin Liška
2022-05-03 15:11   ` [PATCH 2/N] Enable migration " Jeff Law
2022-05-03 15:13     ` Jeff Law
2022-01-05 17:43 ` [PATCH] LTO plugin: modernize a bit Jeff Law
2022-01-06 11:03   ` Martin Liška
2022-01-18 11:59 ` Thomas Schwinge

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='CAFiYyc2ZExx+Niu=uWojC2j8AadYW0mYpB2TicDovRHDNctv0g@mail.gmail.com' \
    --to=richard.guenther@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=hubicka@ucw.cz \
    --cc=mliska@suse.cz \
    /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).