This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH 0/3] Remove more unnecessary PLT relocations in librtld.os
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: libc-alpha at sourceware dot org
- Cc: "H.J. Lu" <hjl dot tools at gmail dot com>
- Date: Sun, 18 Oct 2015 10:24:28 -0700
- Subject: [PATCH 0/3] Remove more unnecessary PLT relocations in librtld.os
- Authentication-results: sourceware.org; auth=none
Some internal functions in ld.so aren't marked as hidden and they are
called via PLT, which requires setting up PIC register and is expensive
on x86. This patch marks those internal function as hidden. There are
no regressions on i686 nor x86-64. Since sysdeps/mach/hurd/Versions has
ld {
GLIBC_2.0 {
# variables that must be shared with libc
__hurd_sigthread_stack_base; __hurd_sigthread_stack_end;
__hurd_sigthread_variables;
__hurd_threadvar_stack_mask; __hurd_threadvar_stack_offset;
# functions that must be shared with libc
__close; __getcwd; __getpid;
__mmap; __open; __xstat64; __fxstat64;
_exit; _hurd_intr_rpc_mach_msg;
abort;
}
GLIBC_2.2.6 {
# this also must be shared with libc.
__errno_location;
}
GLIBC_PRIVATE {
_dl_init_first;
# functions that must be shared with libc
__libc_read; __libc_write; __libc_lseek64;
}
}
we must keep PLT relocations against __mmap, __close, __getcwd,
__getpid, __libc_read and __libc_write when compiling for Hurd.
H.J. Lu (3):
Mark ld.so internel mmap functions hidden
Mark ld.so internel __fxstatat64 hidden
Mark internel unistd functions hidden
include/sys/mman.h | 10 ++++++++++
include/sys/stat.h | 3 +++
include/unistd.h | 20 +++++++++++++++++++-
3 files changed, 32 insertions(+), 1 deletion(-)
--
2.4.3