This is link_hacks.c in view mode; [Download] [Up]
#ifdef GCC2_WITH_SUN_LD_HACK
/*
* When compiling on a Sun with GNU C version 2.2.2 or 2.3.1, the
* compiler inserts a call to __main() at the beginning of the
* user's main(). This is fine if you link with the GNU linker,
* but doesn't work if you link with the standard Sun linker (you might
* want to do this get shared libraries to work).
*
* Providing our own __main() which will override the one in libgcc.a
* will take care of this problem.
*/
void __main()
{
}
#endif
#ifdef SUN_STATIC_LINK_HACK
/*
* For some reason, when you try to statically link on the sun (pass
* a -Bstatis to /bin/ld), it complains about now having these
* procedure. However, they are never actually called. So we
* can just stub them out to appease the linker.
*/
void *dlopen(path, mode)
char *path; int mode;
{
}
void *dlsym(handle, symbol)
void *handle; char *symbol;
{
}
char *dlerror()
{
}
int dlclose(handle)
void *handle;
{
}
#endif
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.