@@ -157,6 +157,10 @@
# define HAVE_CLOCK_GETTIME_VSYSCALL 1
# define HAVE_GETTIMEOFDAY_VSYSCALL 1
+/* Previously AArch64 used the generic version without the libc_hidden_def
+ which lead in a non existent __send symbol in libc.so. */
+# undef HAVE_INTERNAL_SEND_SYMBOl
+
/* Define a macro which expands into the inline wrapper code for a system
call. */
# undef INLINE_SYSCALL
@@ -33,5 +33,6 @@
#define __NR_shmat __NR_osf_shmat
#define __ASSUME_RECV_SYSCALL 1
+#define __ASSUME_RECV_SYSCALL 1
#endif /* _KERNEL_FEATURES_H */
@@ -10,7 +10,6 @@ getpeername - getpeername i:ipp __getpeername getpeername
getsockname - getsockname i:ipp __getsockname getsockname
getsockopt - getsockopt i:iiiBN __getsockopt getsockopt
listen - listen i:ii __listen listen
-send - send Ci:ibni __libc_send __send send
setsockopt - setsockopt i:iiibn __setsockopt setsockopt
shutdown - shutdown i:ii __shutdown shutdown
socket - socket i:iii __socket socket
@@ -39,3 +39,4 @@
#define __NR_fadvise64_64 __NR_arm_fadvise64_64
#define __ASSUME_RECV_SYSCALL 1
+#define __ASSUME_SEND_SYSCALL 1
@@ -27,7 +27,6 @@ getpeername - getpeername i:ipp __getpeername getpeername
getsockname - getsockname i:ipp __getsockname getsockname
getsockopt - getsockopt i:iiiBN __getsockopt getsockopt
listen - listen i:ii __listen listen
-send - send Ci:ibni __libc_send __send send
setsockopt - setsockopt i:iiibn __setsockopt setsockopt
shutdown - shutdown i:ii __shutdown shutdown
socket - socket i:iii __socket socket
deleted file mode 100644
@@ -1,30 +0,0 @@
-/* Copyright (C) 2011-2017 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Chris Metcalf <cmetcalf@tilera.com>, 2011.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library. If not, see
- <http://www.gnu.org/licenses/>. */
-
-#include <stdlib.h>
-#include <sys/types.h>
-#include <sysdep-cancel.h>
-#include <libc-symbols.h>
-
-ssize_t
-__libc_send (int sockfd, const void *buffer, size_t len, int flags)
-{
- return SYSCALL_CANCEL (sendto, sockfd, buffer, len, flags, NULL, 0);
-}
-strong_alias (__libc_send, __send)
-weak_alias (__libc_send, send)
@@ -26,3 +26,4 @@
#include_next <kernel-features.h>
#define __ASSUME_RECV_SYSCALL 1
+#define __ASSUME_SEND_SYSCALL 1
@@ -6,7 +6,6 @@ getpeername - getpeername i:ipp __getpeername getpeername
getsockname - getsockname i:ipp __getsockname getsockname
getsockopt - getsockopt i:iiiBN __getsockopt getsockopt
listen - listen i:ii __listen listen
-send - send Ci:ibni __libc_send __send send
setsockopt - setsockopt i:iiibn __setsockopt setsockopt
shutdown - shutdown i:ii __shutdown shutdown
socket - socket i:iii __socket socket
@@ -36,7 +36,6 @@
# define __ASSUME_SETSOCKOPT_SYSCALL 1
# define __ASSUME_GETSOCKNAME_SYSCALL 1
# define __ASSUME_GETPEERNAME_SYSCALL 1
-# define __ASSUME_SENDTO_FOR_SEND_SYSCALL 1
# define __ASSUME_SHUTDOWN_SYSCALL 1
#endif
@@ -29,5 +29,6 @@
#endif
#define __ASSUME_RECV_SYSCALL 1
+#define __ASSUME_SEND_SYSCALL 1
#endif /* _KERNEL_FEATURES_H */
@@ -10,7 +10,6 @@ getpeername - getpeername i:ipp __getpeername getpeername
getsockname - getsockname i:ipp __getsockname getsockname
getsockopt - getsockopt i:iiiBN __getsockopt getsockopt
listen - listen i:ii __listen listen
-send - send Ci:ibni __libc_send __send send
setsockopt - setsockopt i:iiibn __setsockopt setsockopt
shutdown - shutdown i:ii __shutdown shutdown
socket - socket i:iii __socket socket
@@ -30,7 +30,6 @@
# define __ASSUME_SETSOCKOPT_SYSCALL 1
# define __ASSUME_GETSOCKNAME_SYSCALL 1
# define __ASSUME_GETPEERNAME_SYSCALL 1
-# define __ASSUME_SENDTO_FOR_SEND_SYSCALL 1
# define __ASSUME_SHUTDOWN_SYSCALL 1
#endif
@@ -40,6 +40,7 @@
/* mips32 support wire-up network syscalls. */
# define __ASSUME_RECV_SYSCALL 1
+# define __ASSUME_SEND_SYSCALL 1
#endif
/* Define that mips64-n32 is a ILP32 ABI to set the correct interface to
deleted file mode 100644
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/x86_64/send.c>
@@ -17,7 +17,6 @@ getpeername - getpeername i:ipp __getpeername getpeername
getsockname - getsockname i:ipp __getsockname getsockname
getsockopt - getsockopt i:iiiBN __getsockopt getsockopt
listen - listen i:ii __listen listen
-send - send Ci:ibni __libc_send __send send
setsockopt - setsockopt i:iiibn __setsockopt setsockopt
shutdown - shutdown i:ii __shutdown shutdown
socket - socket i:iii __socket socket
@@ -140,6 +140,10 @@
/* In order to get __set_errno() definition in INLINE_SYSCALL. */
#include <errno.h>
+/* Previously Nios2 used the generic version without the libc_hidden_def
+ which lead in a non existent __send symbol in libc.so. */
+# undef HAVE_INTERNAL_SEND_SYMBOl
+
/* Define a macro which expands into the inline wrapper code for a system
call. */
#undef INLINE_SYSCALL
@@ -30,7 +30,6 @@
# define __ASSUME_SETSOCKOPT_SYSCALL 1
# define __ASSUME_GETSOCKNAME_SYSCALL 1
# define __ASSUME_GETPEERNAME_SYSCALL 1
-# define __ASSUME_SENDTO_FOR_SEND_SYSCALL 1
# define __ASSUME_SHUTDOWN_SYSCALL 1
#endif
@@ -15,21 +15,16 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#include <errno.h>
-#include <signal.h>
#include <sys/socket.h>
-
#include <sysdep-cancel.h>
#include <socketcall.h>
-#include <kernel-features.h>
-#include <sys/syscall.h>
ssize_t
__libc_send (int fd, const void *buf, size_t len, int flags)
{
#ifdef __ASSUME_SEND_SYSCALL
return SYSCALL_CANCEL (send, fd, buf, len, flags);
-#elif defined __ASSUME_SENDTO_FOR_SEND_SYSCALL
+#elif defined __ASSUME_SENDTO_SYSCALL
return SYSCALL_CANCEL (sendto, fd, buf, len, flags, NULL, 0);
#else
return SOCKETCALL_CANCEL (send, fd, buf, len, flags);
@@ -37,4 +32,6 @@ __libc_send (int fd, const void *buf, size_t len, int flags)
}
weak_alias (__libc_send, send)
weak_alias (__libc_send, __send)
+#ifdef HAVE_INTERNAL_SEND_SYMBOl
libc_hidden_def (__send)
+#endif
@@ -7,7 +7,6 @@ getpeername - getpeername 3 __getpeername getpeername
getsockname - getsockname 3 __getsockname getsockname
getsockopt - getsockopt 5 __getsockopt getsockopt
listen - listen 2 __listen listen
-send - send C:4 __libc_send __send send
setsockopt - setsockopt 5 __setsockopt setsockopt
shutdown - shutdown 2 __shutdown shutdown
socketpair - socketpair 4 __socketpair socketpair
@@ -62,3 +62,7 @@
#define LO_HI_LONG(val) \
(long) (val), \
(long) (((uint64_t) (val)) >> 32)
+
+/* Exports the __send symbol on send.c linux implementation (some ABI have
+ it missing due the usage of a old generic version without it). */
+#define HAVE_INTERNAL_SEND_SYMBOl 1
@@ -218,6 +218,10 @@
#define HAVE_CLOCK_GETTIME_VSYSCALL 1
#define HAVE_GETTIMEOFDAY_VSYSCALL 1
+/* Previously tile used the generic version without the libc_hidden_def
+ which lead in a non existent __send symbol in libc.so. */
+#undef HAVE_INTERNAL_SEND_SYMBOl
+
#endif /* __ASSEMBLER__ */
/* Pointer mangling support. */
deleted file mode 100644
@@ -1,31 +0,0 @@
-/* Copyright (C) 2001-2017 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-
-#include <errno.h>
-#include <sys/socket.h>
-#include <sysdep-cancel.h>
-
-/* Send N bytes of BUF to socket FD. Returns the number sent or -1. */
-ssize_t
-__libc_send (int fd, const void *buf, size_t n, int flags)
-{
- return SYSCALL_CANCEL (sendto, fd, buf, n, flags, NULL, (size_t) 0);
-}
-
-weak_alias (__libc_send, __send)
-libc_hidden_weak (__send)
-weak_alias (__send, send)