make weak symbol references and namespace renames references the renamed versions. function renaming, weak symbol references and libc namespace.h protection interact in hairy ways and causes weak symbol references for renamed functions to be unresolved; e.g. vfork should be an alias for _vfork but _vfork doesn't exist because __vfork14() exists. this is a problem for dynamically linked executables as all symbols have to be resolved, used or not, at link time. it was masked by clang-compiled base system libraries but is a problem when gcc does it.
16 lines
218 B
C
16 lines
218 B
C
#include <sys/cdefs.h>
|
|
#include "namespace.h"
|
|
#include <lib.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
#ifdef __weak_alias
|
|
__weak_alias(vfork, __vfork14)
|
|
#endif
|
|
|
|
pid_t vfork()
|
|
{
|
|
message m;
|
|
|
|
return(_syscall(PM_PROC_NR, FORK, &m));
|
|
}
|