[Bugs] [Bug 1160709] libgfapi: use versioned symbols in libgfapi.so for compatibility
bugzilla at redhat.com
bugzilla at redhat.com
Wed Dec 3 14:37:26 UTC 2014
https://bugzilla.redhat.com/show_bug.cgi?id=1160709
--- Comment #8 from Kaleb KEITHLEY <kkeithle at redhat.com> ---
Here's an example of aliases based on the __DARWIN_ALIAS family of macros
defined in <sys/cdefs.h> on OS X.
================ foo.h ================
extern int
foo (const char *) __asm("_foo$GFAPI_340");
=========================================
================ foo.c ================
#include <stdio.h>
#include "foo.h"
int
foo (const char *str)
{
printf ("%\n", str);
}
================ foo.c ================
============== driver.c ===============
#include "foo.h"
int
main (int argc, char **argv)
{
return foo ("hello");
}
============== driver.c ===============
and then
% nm driver.o
...
U _foo$GFAPI_340
...
% nm foo.o
...
T _foo$GFAPI_340
...
N.B. OS X still has the old pre-ELF compiler semantics of prefixing symbols
with '_'. E.g. open(), close(), read(), write(), etc., in a nm dump of libc
you'll see the symbols _open, _close, _read, _write, etc.
--
You are receiving this mail because:
You are on the CC list for the bug.
Unsubscribe from this bug https://bugzilla.redhat.com/token.cgi?t=KUdENfVFkc&a=cc_unsubscribe
More information about the Bugs
mailing list