Providing a function alias in gcc?
问题 I'm looking for a way to define an unmangled alias for an exported function in a DLL compiled with GCC. According to this StackOverflow answer, Visual Studio supports #pragma comment(linker, "/EXPORT:SomeFunction=_SomeFunction@@@23mangledstuff#@@@@") to specify that an exported function shall have a given alias. I'm looking for something similar in GCC. The GCC function attribute docs suggest __attribute__ ((alias ("target"))) will do the trick, but this just generates a mangled function name