On 1/10/22 08:50, Richard Biener wrote:
On Wed, Jan 5, 2022 at 2:28 PM Martin Liška <mli...@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)?
Hmm, didn't realize that.
That said, I'm not sure this is worth the trouble.
Agree. That said, I would like to approve patches 1/2 that are
a stage1 material and do a refactoring that worth doing.
What do you think?
Cheers,
Martin
Richard.
Thoughts?
Thanks,
Martin