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.