This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 00/19] Remove unnecessary PLT relocations in librtld.os


Many 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.  The code size comparisons in bytes:

File                Before          After       Diff
i686 elf/ld.so      137378          136898      -480
i686 libc.so        1754883         1754559     -324
x86-64 elf/ld.so    141677          141629      -48
x86-64 libc.so      1677196         1677188     -8

H.J. Lu (19):
  Mark i386 _dl_unmap hidden
  Mark x86_64 _dl_unmap hidden
  Mark i386 _dl_make_tlsdesc_dynamic hidden
  Mark x86_64 _dl_make_tlsdesc_dynamic hidden
  Mark _wordcopy_XXX functions hidden
  Mark internal _dl_XXX functions hidden
  Mark internal _itoa functions hidden
  Mark _dl_catch_error hidden
  Mark internal dirent functions hidden
  Mark internal fcntl functions hidden
  Mark ld.so internel __profile_frequency hidden
  Mark internal setjmp functions hidden
  Mark ld.so internel sigaction functions hidden
  Mark ld.so internel stdlib functions hidden
  Mark ld.so internel string functions hidden
  Mark ld.so internel mmap functions hidden
  Mark ld.so internel __fxstatat64 hidden
  Mark ld.so internel __uname hidden
  Mark internel unistd functions hidden

 elf/dl-runtime.c              |  2 +-
 elf/dynamic-link.h            |  3 ++-
 include/dirent.h              | 17 ++++++++++----
 include/dlfcn.h               | 13 -----------
 include/fcntl.h               |  7 +++++-
 include/libc-internal.h       |  4 ++++
 include/setjmp.h              |  6 ++++-
 include/signal.h              |  5 ++++
 include/stdlib.h              |  5 ++++
 include/string.h              | 20 ++++++++++++++++
 include/sys/mman.h            |  6 +++++
 include/sys/stat.h            |  3 +++
 include/sys/utsname.h         |  4 ++++
 include/unistd.h              | 16 ++++++++++++-
 sysdeps/generic/_itoa.h       |  5 ++--
 sysdeps/generic/dl-cache.h    |  2 +-
 sysdeps/generic/ldsodefs.h    | 54 ++++++++++++++++++++++++++++---------------
 sysdeps/generic/memcopy.h     | 12 ++++++----
 sysdeps/i386/dl-lookupcfg.h   |  3 ++-
 sysdeps/i386/dl-tlsdesc.h     |  5 ++--
 sysdeps/x86_64/dl-lookupcfg.h |  3 ++-
 sysdeps/x86_64/dl-tlsdesc.h   |  5 ++--
 22 files changed, 147 insertions(+), 53 deletions(-)

-- 
2.4.3


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]