diff options
author | Rich Felker <dalias@aerifal.cx> | 2014-07-06 22:56:25 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2014-07-06 22:56:25 -0400 |
commit | d96b12b755483208673fb05e2e60a15d3822752d (patch) | |
tree | 1a8eac2308bc9348b23417a462a271570d1ceea3 /src/thread/__syscall_cp.c | |
parent | ea496d6c63ecbb5ea475111808e5c0f799354450 (diff) | |
download | musl-d96b12b755483208673fb05e2e60a15d3822752d.tar.gz musl-d96b12b755483208673fb05e2e60a15d3822752d.tar.xz musl-d96b12b755483208673fb05e2e60a15d3822752d.zip |
rework cancellation weak alias logic not to depend on archive order
if the order of object files in the static archive libc.a was not respected by the linker, the old logic could wrongly cause POSIX symbols outside of the ISO C namespace to be pulled into pure C programs. this should not happen with well-behaved linkers, but relying on the link order was a bad idea anyway. files are renamed to better reflect their contents now that they don't need names to control their order as members in the archive file.
Diffstat (limited to 'src/thread/__syscall_cp.c')
-rw-r--r-- | src/thread/__syscall_cp.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/thread/__syscall_cp.c b/src/thread/__syscall_cp.c new file mode 100644 index 00000000..a48cee9b --- /dev/null +++ b/src/thread/__syscall_cp.c @@ -0,0 +1,18 @@ +#include "pthread_impl.h" +#include "syscall.h" + +static long sccp(syscall_arg_t nr, + syscall_arg_t u, syscall_arg_t v, syscall_arg_t w, + syscall_arg_t x, syscall_arg_t y, syscall_arg_t z) +{ + return (__syscall)(nr, u, v, w, x, y, z); +} + +weak_alias(sccp, __syscall_cp_c); + +long (__syscall_cp)(syscall_arg_t nr, + syscall_arg_t u, syscall_arg_t v, syscall_arg_t w, + syscall_arg_t x, syscall_arg_t y, syscall_arg_t z) +{ + return __syscall_cp_c(nr, u, v, w, x, y, z); +} |