mirror of
git://sourceware.org/git/glibc.git
synced 2025-04-18 14:30:43 +08:00
Hide __readv and __writev [BZ #18822]
Hide internal __readv and __writev functions to allow direct access within libc.so and libc.a without using GOT nor PLT. [BZ #18822] * include/sys/uio.h (__readv): Add libc_hidden_proto. (__writev): Likewise. * misc/readv.c (__readv): Add libc_hidden_def. * misc/writev.c (__writev): Likewise. * sysdeps/posix/readv.c (__readv): Likewise. * sysdeps/posix/writev.c (__writev): Likewise. * sysdeps/unix/sysv/linux/readv.c: Include <sys/uio.h>. (__readv): Likewise. * sysdeps/unix/sysv/linux/writev.c: Include <sys/uio.h>. (__writev): Likewise.
This commit is contained in:
parent
b68f862056
commit
d6daff1261
14
ChangeLog
14
ChangeLog
@ -1,3 +1,17 @@
|
||||
2017-10-01 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
[BZ #18822]
|
||||
* include/sys/uio.h (__readv): Add libc_hidden_proto.
|
||||
(__writev): Likewise.
|
||||
* misc/readv.c (__readv): Add libc_hidden_def.
|
||||
* misc/writev.c (__writev): Likewise.
|
||||
* sysdeps/posix/readv.c (__readv): Likewise.
|
||||
* sysdeps/posix/writev.c (__writev): Likewise.
|
||||
* sysdeps/unix/sysv/linux/readv.c: Include <sys/uio.h>.
|
||||
(__readv): Likewise.
|
||||
* sysdeps/unix/sysv/linux/writev.c: Include <sys/uio.h>.
|
||||
(__writev): Likewise.
|
||||
|
||||
2017-10-01 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
[BZ #18822]
|
||||
|
@ -5,8 +5,10 @@
|
||||
/* Now define the internal interfaces. */
|
||||
extern ssize_t __readv (int __fd, const struct iovec *__iovec,
|
||||
int __count);
|
||||
libc_hidden_proto (__readv)
|
||||
extern ssize_t __writev (int __fd, const struct iovec *__iovec,
|
||||
int __count);
|
||||
libc_hidden_proto (__writev)
|
||||
|
||||
/* Used for p{read,write}{v64}v2 implementation. */
|
||||
libc_hidden_proto (preadv)
|
||||
|
@ -30,6 +30,7 @@ __readv (int fd, const struct iovec *vector, int count)
|
||||
__set_errno (ENOSYS);
|
||||
return -1;
|
||||
}
|
||||
libc_hidden_def (__readv)
|
||||
weak_alias (__readv, readv)
|
||||
|
||||
stub_warning (readv)
|
||||
|
@ -30,6 +30,7 @@ __writev (int fd, const struct iovec *vector, int count)
|
||||
__set_errno (ENOSYS);
|
||||
return -1;
|
||||
}
|
||||
libc_hidden_def (__writev)
|
||||
weak_alias (__writev, writev)
|
||||
|
||||
stub_warning (writev)
|
||||
|
@ -88,4 +88,5 @@ __readv (int fd, const struct iovec *vector, int count)
|
||||
|
||||
return bytes_read;
|
||||
}
|
||||
libc_hidden_def (__readv)
|
||||
weak_alias (__readv, readv)
|
||||
|
@ -88,4 +88,5 @@ __writev (int fd, const struct iovec *vector, int count)
|
||||
|
||||
return bytes_written;
|
||||
}
|
||||
libc_hidden_def (__writev)
|
||||
weak_alias (__writev, writev)
|
||||
|
@ -17,6 +17,7 @@
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <unistd.h>
|
||||
#include <sys/uio.h>
|
||||
#include <sysdep-cancel.h>
|
||||
|
||||
ssize_t
|
||||
@ -24,4 +25,5 @@ __readv (int fd, const struct iovec *iov, int iovcnt)
|
||||
{
|
||||
return SYSCALL_CANCEL (readv, fd, iov, iovcnt);
|
||||
}
|
||||
libc_hidden_def (__readv)
|
||||
weak_alias (__readv, readv)
|
||||
|
@ -17,6 +17,7 @@
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <unistd.h>
|
||||
#include <sys/uio.h>
|
||||
#include <sysdep-cancel.h>
|
||||
|
||||
ssize_t
|
||||
@ -24,4 +25,5 @@ __writev (int fd, const struct iovec *iov, int iovcnt)
|
||||
{
|
||||
return SYSCALL_CANCEL (writev, fd, iov, iovcnt);
|
||||
}
|
||||
libc_hidden_def (__writev)
|
||||
weak_alias (__writev, writev)
|
||||
|
Loading…
x
Reference in New Issue
Block a user