This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug lto/48200] linking shared library with LTO results in different exported symbols
- From: "ryxi at stu dot xidian.edu.cn" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 14 May 2018 08:13:59 +0000
- Subject: [Bug lto/48200] linking shared library with LTO results in different exported symbols
- Auto-submitted: auto-generated
- References: <bug-48200-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48200
--- Comment #21 from Xi Ruoyao <ryxi at stu dot xidian.edu.cn> ---
I made up a (highly immature) patch in the days.
This "thing" works with simple source code files but I believe there are many
bugs in the patch.
And I suggest to make "weakref" attribute to output ".symver" directive for
arguments with "@" in it. For e.g.
static void *old_memcpy (void *, void *, size_t)
__attribute__((weakref("memcpy@GLIBC_2.2.5")));
should produce
.symver old_memcpy memcpy@GLIBC_2.2.5
So we can "import" old functions.