This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/18822] Internal functions are called via PLT
- From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Fri, 18 Aug 2017 20:53:59 +0000
- Subject: [Bug libc/18822] Internal functions are called via PLT
- Auto-submitted: auto-generated
- References: <bug-18822-131@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=18822
--- Comment #19 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, hjl/pr18822 has been created
at eadd96f82da352cc3be9c39c3d3fd945fdba5c05 (commit)
- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=eadd96f82da352cc3be9c39c3d3fd945fdba5c05
commit eadd96f82da352cc3be9c39c3d3fd945fdba5c05
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Fri Aug 18 13:24:43 2017 -0700
Mark internal wchar functions with attribute_hidden [BZ #18822]
Mark internal wchar functions with attribute_hidden to allow direct
access within libc.so and libc.a without using GOT nor PLT.
[BZ #18822]
* include/wchar.h (__wcsnlen): Add attribute_hidden.
(__wcscat): Likewise.
(__btowc): Likewise.
(__wcrtomb): Likewise.
(__mbsrtowcs): Likewise.
(__wcsrtombs): Likewise.
(__mbsnrtowcs): Likewise.
(__wcsnrtombs): Likewise.
(__wcsncpy): Likewise.
(__wcpncpy): Likewise.
(__wmemcpy): Likewise.
(__wmempcpy): Likewise.
(__wmemmove): Likewise.
(__wcschrnul): Likewise.
(__vfwscanf): Likewise.
(__vswprintf): Likewise.
(__fwprintf): Likewise.
(__vfwprintf): Likewise.
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=d9891da1165206a44c46ab20cdb5a371c0a894f7
commit d9891da1165206a44c46ab20cdb5a371c0a894f7
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Fri Aug 18 12:27:59 2017 -0700
Mark internal nss symbols with attribute_hidden [BZ #18822]
Mark internal nss symbols with attribute_hidden to allow direct access
within libc.so and libc.a without using GOT.
[BZ #18822]
* grp/initgroups.c (__nss_initgroups_database): Add
attribute_hidden.
* nss/getXXent.c (INTERNAL (REENTRANT_GETNAME)): Likewise.
* nss/nsswitch.h (__nss_database_custom): Likewise.
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=a01cad19620652babe673bb79112e7ffdef8d99d
commit a01cad19620652babe673bb79112e7ffdef8d99d
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Fri Aug 18 12:19:28 2017 -0700
Mark __libc_multiple_libcs with attribute_hidden [BZ #18822]
Since __libc_multiple_libcs is defined as hidden symbol in init-first.c,
it should be marked with attribute_hidden.
[BZ #18822]
* csu/libc-start.c (__libc_multiple_libcs): Add attribute_hidden.
* elf/dl-open.c (__libc_multiple_libcs): Likewise.
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=8f532804301a4fd17fd969ca9198936646987326
commit 8f532804301a4fd17fd969ca9198936646987326
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Fri Aug 18 09:52:52 2017 -0700
Mark __dso_handle as hidden [BZ #18822]
Since __dso_handle is always defined by either crtbegin.o from GCC or
dso_handle.c, it should be marked as hidden and be passed directly.
[BZ #18822]
* dlfcn/modatexit.c (foo): Remove __dso_handle check.
* dlfcn/modcxaatexit.c (__dso_handle): Remove declaration.
* dlfcn/tstatexit.c (__dso_handle): Removed.
(main): Don't check __dso_handle.
* dlfcn/tstcxaatexit.c (__dso_handle): Removed.
(main): Don't check __dso_handle.
* include/stdlib.h (__dso_handle): New.
* malloc/mtrace.c (__dso_handle): Remove declaration.
(mtrace): Pass __dso_handle directly.
* nptl/pthread_atfork.c (__dso_handle): Remove declaration.
(__pthread_atfork): Pass __dso_handle directly.
* nptl/tst-atfork2mod.c (__dso_handle): Removed.
* posix/wordexp-test.c (__dso_handle): Remove declaration.
(__app_register_atfork): Pass __dso_handle directly.
* stdlib/at_quick_exit.c (__dso_handle): Remove declaration.
(at_quick_exit): Pass __dso_handle directly.
* stdlib/atexit.c (__dso_handle): Remove declaration.
(atexit): Pass __dso_handle directly.
* stdlib/tst-tls-atexit-lib.c (__dso_handle): Removed.
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=0f6d11758fea1b27e3d55a588f71863e9344b1a4
commit 0f6d11758fea1b27e3d55a588f71863e9344b1a4
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Fri Aug 18 09:23:31 2017 -0700
x86-64: Mark internal symbols with attribute_hidden [BZ #18822]
Since __syscall_clock_gettime and __start_context are internal symbols
for Linux/x86-64, mark them with attribute_hidden.
[BZ #18822]
* sysdeps/unix/sysv/linux/x86_64/init-first.c
(__syscall_clock_gettime): Add attribute_hidden.
* sysdeps/unix/sysv/linux/x86_64/makecontext.c
(__start_context): Likewise.
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=347991760ece40bdd82f8afa58a27d496a44ca1e
commit 347991760ece40bdd82f8afa58a27d496a44ca1e
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Fri Aug 18 09:13:03 2017 -0700
x86: Mark VDSO_SYMBOL(getcpu) with attribute_hidden [BZ #18822]
VDSO_SYMBOL(getcpu) is defined as hidden in Linux/x86_64 init-first.c
and unused for Linux/i386.
[BZ #18822]
* sysdeps/unix/sysv/linux/x86/libc-vdso.h (VDSO_SYMBOL(getcpu)):
Add attribute_hidden.
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=aa8344ac8c4e839c26bdde15b0884ced37b4aa8e
commit aa8344ac8c4e839c26bdde15b0884ced37b4aa8e
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Fri Aug 18 09:00:24 2017 -0700
Mark internal grp/pwd/shadow functions with attribute_hidden [BZ #18822]
Mark internal grp/pwd/shadow functions with attribute_hidden to allow
direct access within libc.so and libc.a without using GOT nor PLT.
[BZ #18822]
* include/grp.h (__fgetgrent_r): Add attribute_hidden.
(__getgrgid_r): Likewise.
(__getgrnam_r): Likewise.
* include/pwd.h (__getpwuid_r): Likewise.
(__getpwnam_r): Likewise.
(__fgetpwent_r): Likewise.
* include/shadow.h (__getspnam_r): Likewise.
(__sgetspent_r): Likewise.
(__fgetspent_r): Likewise.
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=5befb646301c3560c9e2e2263671707a95a9db15
commit 5befb646301c3560c9e2e2263671707a95a9db15
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Fri Aug 18 05:43:12 2017 -0700
Mark internal unistd.h functions with attribute_hidden [BZ #18822]
Mark internal unistd.h functions with attribute_hidden to allow direct
access to them within libc.so and libc.a without using GOT nor PLT.
[BZ #18822]
* include/unistd.h (__access): Add attribute_hidden.
(__lseek64): Likewise.
(__libc_pread64): Likewise.
(__pipe2): Likewise.
(__sleep): Likewise.
(__chdir): Likewise.
(__fchdir): Likewise.
(__getcwd): Likewise.
(__rmdir): Likewise.
(__execvpe): Likewise.
(__execve): Likewise.
(__setsid): Likewise.
(__getuid): Likewise.
(__geteuid): Likewise.
(__getgid): Likewise.
(__getegid): Likewise.
(__getgroups): Likewise.
(__group_member): Likewise.
(__ttyname_r): Likewise.
(__isatty): Likewise.
(__readlink): Likewise.
(__unlink): Likewise.
(__gethostname): Likewise.
(__profil): Likewise.
(__getdtablesize): Likewise.
(__brk): Likewise.
(__ftruncate): Likewise.
(__ftruncate64): Likewise.
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=8cba4573f6f0eaa6b4d74ee6e3a2389fb7c5e207
commit 8cba4573f6f0eaa6b4d74ee6e3a2389fb7c5e207
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Thu Aug 17 13:17:12 2017 -0700
Mark internal argp functions with attribute_hidden [BZ #18822]
Mark internal argp functions with attribute_hidden to allow direct
access to them within libc.so and libc.a without using GOT nor PLT.
[BZ #18822]
* argp/argp-fmtstream.c: Include <argp-fmtstream.h>.
* argp/argp-fs-xinl.c: Likewise.
* argp/argp-help.c: Include <argp.h> and <argp-fmtstream.h>.
* argp/argp-parse.c: Include <argp.h>.
* argp/argp-xinl.c: Likewise.
* include/argp-fmtstream.h: New file.
* include/argp.h (__argp_error): Add attribute_hidden.
(__argp_failure): Likewise.
(__argp_input): Likewise.
(__argp_state_help): Likewise.
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=c0b4dad408f7c520157de29c8413bf6aaf6b7f49
commit c0b4dad408f7c520157de29c8413bf6aaf6b7f49
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Thu Aug 17 12:48:28 2017 -0700
Mark ____wcsto*_l_internal functions with attribute_hidden [BZ #18822]
Mark ____wcsto*_l_internal functions with attribute_hidden to allow
direct access to them within libc.so and libc.a without using GOT nor
PLT.
[BZ #18822]
* include/wchar.h (____wcstof_l_internal): New prototype.
(____wcstod_l_internal): Likewise.
(____wcstold_l_internal): Likewise.
(____wcstol_l_internal): Likewise.
(____wcstoul_l_internal): Likewise.
(____wcstoll_l_internal): Likewise.
(____wcstoull_l_internal): Likewise.
(____wcstof128_l_internal): Likewise.
* sysdeps/ieee754/float128/wcstof128.c
(____wcstof128_l_internal): Removed.
* sysdeps/ieee754/float128/wcstof128_l.c
(____wcstof128_l_internal): Likewise.
* wcsmbs/wcstod.c (____wcstod_l_internal): Likewise.
* wcsmbs/wcstod_l.c (____wcstod_l_internal): Likewise.
* wcsmbs/wcstof.c (____wcstof_l_internal): Likewise.
* wcsmbs/wcstof_l.c (____wcstof_l_internal): Likewise.
* wcsmbs/wcstol_l.c (____wcstol_l_internal): Likewise.
* wcsmbs/wcstold.c (____wcstold_l_internal): Likewise.
* wcsmbs/wcstold_l.c (____wcstold_l_internal): Likewise.
* wcsmbs/wcstoll_l.c (____wcstoll_l_internal): Likewise.
* wcsmbs/wcstoul_l.c (____wcstoul_l_internal): Likewise.
* wcsmbs/wcstoull_l.c (____wcstoull_l_internal): Likewise.
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=103e7a4f0373af81803ca1640c11df64b60ebbe0
commit 103e7a4f0373af81803ca1640c11df64b60ebbe0
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Thu Aug 17 12:35:02 2017 -0700
Mark __internal_statvfs[64] with attribute_hidden [BZ #18822]
Mark __internal_statvfs[64] with attribute_hidden to allow direct access
to them within libc.so and libc.a without using GOT nor PLT.
[BZ #18822]
* sysdeps/unix/sysv/linux/fstatvfs.c: Include "internal_statvfs.h"
instead of <sys/statvfs.h>.
(__internal_statvfs): Removed.
* sysdeps/unix/sysv/linux/fstatvfs64.c Include "internal_statvfs.h"
instead of <sys/statvfs.h>.
(__internal_statvfs64): Removed.
* sysdeps/unix/sysv/linux/internal_statvfs.c: Include
"internal_statvfs.h" instead of <sys/statvfs.h>.
* sysdeps/unix/sysv/linux/internal_statvfs.h: New file.
* sysdeps/unix/sysv/linux/statvfs.c Include "internal_statvfs.h"
instead of <sys/statvfs.h>.
(__internal_statvfs): Removed.
* sysdeps/unix/sysv/linux/statvfs64.c Include "internal_statvfs.h"
instead of <sys/statvfs.h>.
(__internal_statvfs64): Removed.
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=61fc22c5a54323868e703048008dc1b41dd07b27
commit 61fc22c5a54323868e703048008dc1b41dd07b27
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Thu Aug 17 12:26:17 2017 -0700
Mark 3 *_internal functions with attribute_hidden [BZ #18822]
Mark __ptsname_internal, __mktime_internal and __fopen_internal with
attribute_hidden to allow direct access to them within libc.so and
libc.a without using GOT nor PLT.
[BZ #18822]
* include/stdlib.h (__ptsname_internal): Add attribute_hidden.
* include/time.h (__mktime_internal): Likewise.
* libio/iolibio.h (__fopen_internal): Likewise.
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=681208b48ddac19e0bcf485c85e7429e5183032f
commit 681208b48ddac19e0bcf485c85e7429e5183032f
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Sun Aug 13 07:00:22 2017 -0700
Mark internal functions with attribute_hidden [BZ #18822]
Mark internal functions with attribute_hidden to allow direct access to
internal functions within libc.so and libc.a without using GOT nor PLT.
Size comparison of libc.so:
On x86-64:
text data bss dec hex
Before: 1728577 20584 17088 1766249 1af369
After : 1728593 20584 17088 1766265 1af379
The only change is __gconv_release_shlib in iconv/gconv_dl.c is inlined
since it is hidden, which increases the code size of gconv_dl.os by 18
bytes.
On i686:
text data bss dec hex
Before: 1869039 11444 11112 1891595 1cdd0b
After : 1868635 11444 11112 1891191 1cdb77
The code size is decreased by avoiding GOT/PLT for hidden functions.
[BZ #18822]
* iconv/gconv_int.h (__gconv_open): Add attribute_hidden.
(__gconv_close): Likewise.
(__gconv): Likewise.
(__gconv_find_transform): Likewise.
(__gconv_lookup_cache): Likewise.
(__gconv_compare_alias_cache): Likewise.
(__gconv_load_cache): Likewise.
(__gconv_get_path): Likewise.
(__gconv_close_transform): Likewise.
(__gconv_release_cache): Likewise.
(__gconv_find_shlib): Likewise.
(__gconv_release_shlib): Likewise.
(__gconv_get_builtin_trans): Likewise.
(__gconv_compare_alias): Likewise.
* include/dlfcn.h (_dlerror_run): Likewise.
* include/stdio.h (__fortify_fail_abort): Likewise.
* include/time.h (__tz_compute): Likewise.
(__strptime_internal): Likewise.
* intl/gettextP.h (_nl_find_domain): Likewise.
(_nl_load_domain): Likewise.
(_nl_find_msg): Likewise.
* intl/plural-exp.h (FREE_EXPRESSION): Likewise.
(EXTRACT_PLURAL_EXPRESSION): Likewise.
* locale/coll-lookup.h (__collidx_table_lookup): Likewise.
* resolv/gai_misc.h (__gai_enqueue_request): Likewise.
(__gai_find_request): Likewise.
(__gai_remove_request): Likewise.
(__gai_notify): Likewise.
(__gai_notify_only): Likewise.
* sysdeps/generic/aio_misc.h (__aio_sigqueue): Likewise.
* sysdeps/generic/ldsodefs.h (_dl_symbol_value): Likewise.
(_dl_fini): Likewise.
(_dl_non_dynamic_init): Likewise.
(_dl_aux_init): Likewise.
* sysdeps/i386/machine-gmon.h (mcount_internal): Likewise.
* sysdeps/unix/sysv/linux/i386/olddirent.h (__old_getdents64):
Likewise.
* wcsmbs/wcsmbsload.h (__wcsmbs_load_conv): Likewise.
(__wcsmbs_clone_conv): Likewise.
(__wcsmbs_named_conv): Likewise.
-----------------------------------------------------------------------
--
You are receiving this mail because:
You are on the CC list for the bug.