mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-22 21:10:07 +00:00
3d1870fa33
On the Hurd, the rtld needs to see its own dumb versions of a few functions (defined in sysdeps/mach/hurd/dl-sysdep.c) overridden by libc's versions once loaded. rtld should thus not have hidden attribute for these. To achieve this, the Hurd port used to just define NO_HIDDEN, which disables it completely. For now, this changes that to disabling it for all rtld functions, for simplicity. See Roland's comment on https://sourceware.org/bugzilla/show_bug.cgi?id=15605#c5 The ld.so numbers remain at 8 .rel.plt 000000c8 00000c24 00000c24 00000c24 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 9 .plt 000001a0 00000cf0 00000cf0 00000cf0 2**4 CONTENTS, ALLOC, LOAD, READONLY, CODE 10 .plt.got 00000010 00000e90 00000e90 00000e90 2**3 CONTENTS, ALLOC, LOAD, READONLY, CODE 18 .got.plt 00000070 0002d000 0002d000 0002c000 2**2 CONTENTS, ALLOC, LOAD, DATA which is about 3 times as much as on Linux. The libc.so numbers get divided by 3 (the remainings are mostly RPC stub calls) * include/libc-symbols.h [NO_RTLD_HIDDEN] (rtld_hidden_proto, rtld_hidden_tls_proto, rtld_hidden_def, rtld_hidden_weak, rtld_hidden_rtld_hidden_ver, data_def, rtld_hidden_data_weak, rtld_hidden_data_ver): Define to empty. * include/assert.h [IS_IN(rtld) && NO_RTLD_HIDDEN] (__assert_fail, __assert_perror_fail): Likewise. * include/dirent.h [IS_IN(rtld) && NO_RTLD_HIDDEN] (__rewinddir): Likewise. * include/libc-internal.h [IS_IN(rtld) && NO_RTLD_HIDDEN] (__profile_frequency): Likewise. * include/setjmp.h (__sigsetjmp): Likewise. * include/signal.h [IS_IN(rtld) && NO_RTLD_HIDDEN] (__sigaction, __libc_sigaction): Likewise. * include/stdlib.h [NO_RTLD_HIDDEN] (unsetenv, __strtoul_internal): Do not set hidden attribute. * include/string.h [IS_IN(rtld) && NO_RTLD_HIDDEN] (__stpcpy, __strdup, __strerror_t, __strsep_g, memchr, memcmp, memcpy, memmove, memset, rawmemchr, stpcpy, strchr, strcmp, strlen, strnlen, strsep): Likewise. * include/sys/stat.h [IS_IN(rtld) && NO_RTLD_HIDDEN] (__fxstat, __fxstat64, __lxstat, __lxstat64, __xstat, __xstat64, __fxstatat64): Likewise. * include/sys/utsname.h [IS_IN(rtld) && NO_RTLD_HIDDEN] (__uname): Likewise. * include/sysdeps/generic/_itoa.h [IS_IN(rtld) && NO_RTLD_HIDDEN] (_itoa_upper_digits, _itoa_lower_digits): Likewise. * sysdeps/mach/hurd/configure.ac (NO_HIDDEN): Do not set. (NO_RTLD_HIDDEN): Set. * sysdeps/mach/hurd/configure: Refresh. * config.h.in: Refresh.
59 lines
2.1 KiB
C
59 lines
2.1 KiB
C
/* Internal prototype declarations that don't fit anywhere else.
|
|
Copyright (C) 2000-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/>. */
|
|
|
|
#ifndef _LIBC_INTERNAL
|
|
# define _LIBC_INTERNAL 1
|
|
|
|
#include <hp-timing.h>
|
|
|
|
/* Initialize the `__libc_enable_secure' flag. */
|
|
extern void __libc_init_secure (void);
|
|
|
|
/* This function will be called from _init in init-first.c. */
|
|
extern void __libc_global_ctors (void);
|
|
|
|
/* Discover the tick frequency of the machine if something goes wrong,
|
|
we return 0, an impossible hertz. */
|
|
extern int __profile_frequency (void);
|
|
libc_hidden_proto (__profile_frequency)
|
|
|
|
/* Hooks for the instrumenting functions. */
|
|
extern void __cyg_profile_func_enter (void *this_fn, void *call_site);
|
|
extern void __cyg_profile_func_exit (void *this_fn, void *call_site);
|
|
|
|
/* Get frequency of the system processor. */
|
|
extern hp_timing_t __get_clockfreq (void);
|
|
|
|
/* Free all allocated resources. */
|
|
extern void __libc_freeres (void);
|
|
libc_hidden_proto (__libc_freeres)
|
|
|
|
/* Free resources stored in thread-local variables on thread exit. */
|
|
extern void __libc_thread_freeres (void);
|
|
|
|
/* Define and initialize `__progname' et. al. */
|
|
extern void __init_misc (int, char **, char **) attribute_hidden;
|
|
|
|
# if IS_IN (rtld) && !defined NO_RTLD_HIDDEN
|
|
extern __typeof (__profile_frequency) __profile_frequency attribute_hidden;
|
|
# endif
|
|
|
|
extern int __libc_multiple_libcs attribute_hidden;
|
|
|
|
#endif /* _LIBC_INTERNAL */
|