about summary refs log tree commit diff
path: root/dlfcn
Commit message (Collapse)AuthorAgeFilesLines
* dlfcn: Avoid one-element flexible array in Dl_serinfo [BZ #24166]Florian Weimer2019-06-191-0/+12
| | | | | | | | | The dls_serpath path field, as an array of length 1, introduces unexpected array subscript checks with some compilers. GCC versions before 3.0 treat the nested anonymous union as a declaration of an unnamed type, and not as a member declaration, so this construct cannot be used for these compilers.
* dlfcn: Guard __dlerror_main_freeres with __libc_once_get (once) [BZ# 24476]Mark Wielaard2019-05-151-8/+21
| | | | | | | | | | | | | | | | | | dlerror.c (__dlerror_main_freeres) will try to free resources which only have been initialized when init () has been called. That function is called when resources are needed using __libc_once (once, init) where once is a __libc_once_define (static, once) in the dlerror.c file. Trying to free those resources if init () hasn't been called will produce errors under valgrind memcheck. So guard the freeing of those resources using __libc_once_get (once) and make sure we have a valid key. Also add a similar guard to __dlerror (). * dlfcn/dlerror.c (__dlerror_main_freeres): Guard using __libc_once_get (once) and static_bug == NULL. (__dlerror): Check we have a valid key, set result to static_buf otherwise. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* Update copyright dates with scripts/update-copyrights.Joseph Myers2019-01-0134-34/+34
| | | | | | | * All files with FSF copyright notices: Update copyright dates using scripts/update-copyrights. * locale/programs/charmap-kw.h: Regenerated. * locale/programs/locfile-kw.h: Likewise.
* malloc: tcache double free checkDJ Delorie2018-11-201-1/+4
| | | | | | | | | | | | | * malloc/malloc.c (tcache_entry): Add key field. (tcache_put): Set it. (tcache_get): Likewise. (_int_free): Check for double free in tcache. * malloc/tst-tcfree1.c: New. * malloc/tst-tcfree2.c: New. * malloc/Makefile: Run the new tests. * manual/probes.texi: Document memory_tcache_double_free probe. * dlfcn/dlerror.c (check_free): Prevent double frees.
* libc: Extend __libc_freeres framework (Bug 23329).Carlos O'Donell2018-06-295-1/+46
| | | | | | | | | | | | | | | | | | | | | | | | | The __libc_freeres framework does not extend to non-libc.so objects. This causes problems in general for valgrind and mtrace detecting unfreed objects in both libdl.so and libpthread.so. This change is a pre-requisite to properly moving the malloc hooks out of malloc since such a move now requires precise accounting of all allocated data before destructors are run. This commit adds a proper hook in libc.so.6 for both libdl.so and for libpthread.so, this ensures that shm-directory.c which uses freeit () to free memory is called properly. We also remove the nptl_freeres hook and fall back to using weak-ref-and-check idiom for a loaded libpthread.so, thus making this process similar for all DSOs. Lastly we follow best practice and use explicit free calls for both libdl.so and libpthread.so instead of the generic hook process which has undefined order. Tested on x86_64 with no regressions. Signed-off-by: DJ Delorie <dj@redhat.com> Signed-off-by: Carlos O'Donell <carlos@redhat.com>
* Update copyright dates with scripts/update-copyrights.Joseph Myers2018-01-0133-33/+33
| | | | | | | * All files with FSF copyright notices: Update copyright dates using scripts/update-copyrights. * locale/programs/charmap-kw.h: Regenerated. * locale/programs/locfile-kw.h: Likewise.
* ld.so: Examine GLRO to detect inactive loader [BZ #20204]Florian Weimer2017-12-1810-10/+12
| | | | | | | | | | | | GLRO (_rtld_global_ro) is read-only after initialization and can therefore not be patched at run time, unlike the hook table addresses and their contents, so this is a desirable hardening feature. The hooks are only needed if ld.so has not been initialized, and this happens only after static dlopen (dlmopen uses a single ld.so object across all namespaces). Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* Prefer https for Sourceware linksSiddhesh Poyarekar2017-11-162-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Update all sourceware links to https. The website redirects everything to https anyway so let the web server do a bit less work. The only reference that remains unchanged is the one in the old ChangeLog, since it didn't seem worth changing it. * NEWS: Update sourceware link to https. * configure.ac: Likewise. * crypt/md5test-giant.c: Likewise. * dlfcn/bug-atexit1.c: Likewise. * dlfcn/bug-atexit2.c: Likewise. * localedata/README: Likewise. * malloc/tst-mallocfork.c: Likewise. * manual/install.texi: Likewise. * nptl/tst-pthread-getattr.c: Likewise. * stdio-common/tst-fgets.c: Likewise. * stdio-common/tst-fwrite.c: Likewise. * sunrpc/Makefile: Likewise. * sysdeps/arm/armv7/multiarch/memcpy_impl.S: Likewise. * wcsmbs/tst-mbrtowc2.c: Likewise. * configure: Regenerate. * INSTALL: Regenerate.
* Mark __dso_handle as hidden [BZ #18822]H.J. Lu2017-09-264-19/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Include <dso_handle.h>. (__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/dso_handle.h: New file. * malloc/mtrace.c: Include <dso_handle.h>. (mtrace): Pass __dso_handle directly. * nptl/pthread_atfork.c: Include <dso_handle.h>. (__dso_handle): Remove declaration. (__pthread_atfork): Pass __dso_handle directly. * nptl/tst-atfork2mod.c: Include <dso_handle.h>. (__dso_handle): Removed. * posix/wordexp-test.c: Include <dso_handle.h>. (__dso_handle): Remove declaration. (__app_register_atfork): Pass __dso_handle directly. * stdlib/at_quick_exit.c: Include <dso_handle.h>. (__dso_handle): Remove declaration. (at_quick_exit): Pass __dso_handle directly. * stdlib/atexit.c: Include <dso_handle.h>. (__dso_handle): Remove declaration. (atexit): Pass __dso_handle directly. * stdlib/tst-tls-atexit-lib.c: Include <dso_handle.h>. (__dso_handle): Removed.
* dlfcn: Remove internal_function attributeFlorian Weimer2017-08-311-1/+0
|
* Miscellaneous low-risk changes preparing for _ISOMAC testsuite.Zack Weinberg2017-03-011-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These are a grab bag of changes where the testsuite was using internal symbols of some variety, but this was straightforward to fix, and the fixed code should work with or without the change to compile the testsuite under _ISOMAC. Four of these are just more #include adjustments, but I want to highlight sysdeps/powerpc/fpu/tst-setcontext-fpscr.c, which appears to have been written before the advent of sys/auxv.h. I think a big chunk of this file could be replaced by a simple call to getauxval, but I'll let someone who actually has a powerpc machine to test on do that. dlfcn/tst-dladdr.c was including ldsodefs.h just so it could use DL_LOOKUP_ADDRESS to print an additional diagnostic; as requested by Carlos, I have removed this. math/test-misc.c was using #ifndef NO_LONG_DOUBLE, which is an internal configuration macro, to decide whether to do certain tests involving 'long double'. I changed the test to #if LDBL_MANT_DIG > DBL_MANT_DIG instead, which uses only public float.h macros and is equivalent on all supported platforms. (Note that NO_LONG_DOUBLE doesn't mean 'the compiler doesn't support long double', it means 'long double is the same as double'.) tst-writev.c has a configuration macro 'ARTIFICIAL_LIMIT' that the Makefiles are expected to define, and sysdeps/unix/sysv/linux/Makefile was using the internal __getpagesize in the definition; changed to sysconf(_SC_PAGESIZE) which is the POSIX equivalent. ia64-linux doesn't supply 'clone', only '__clone2', which is not defined in the public headers(!) All the other clone tests have local extern declarations of __clone2, but tst-clone.c doesn't; it was getting away with this because include/sched.h does declare __clone2. * nss/tst-cancel-getpwuid_r.c: Include nss.h. * string/strcasestr.c: No need to include config.h. * sysdeps/powerpc/fpu/tst-setcontext-fpscr.c: Include sys/auxv.h. Don't include sysdep.h. * sysdeps/powerpc/tst-set_ppr.c: Don't include dl-procinfo.h. * dlfcn/tst-dladdr.c: Don't include ldsodefs.h. Don't use DL_LOOKUP_ADDRESS. * math/test-misc.c: Instead of testing NO_LONG_DOUBLE, test whether LDBL_MANT_DIG is greater than DBL_MANT_DIG. * sysdeps/unix/sysv/linux/Makefile (CFLAGS-tst-writev.c): Use sysconf (_SC_PAGESIZE) instead of __getpagesize in definition of ARTIFICIAL_LIMIT. * sysdeps/unix/sysv/linux/tst-clone.c [__ia64__]: Add extern declaration of __clone2.
* Update copyright dates with scripts/update-copyrights.Joseph Myers2017-01-0133-33/+33
|
* support: Introduce new subdirectory for test infrastructureFlorian Weimer2016-12-092-6/+2
| | | | | | | | | | | | | | | The new test driver in <support/test-driver.c> has feature parity with the old one. The main difference is that its hooking mechanism is based on functions and function pointers instead of macros. This commit also implements a new environment variable, TEST_COREDUMPS, which disables the code which disables coredumps (that is, it enables them if the invocation environment has not disabled them). <test-skeleton.c> defines wrapper functions so that it is possible to use existing macros with the new-style hook functionality. This commit changes only a few test cases to the new test driver, to make sure that it works as expected.
* Implement _dl_catch_error, _dl_signal_error in libc.so [BZ #16628]Florian Weimer2016-11-304-7/+7
| | | | | | | | | | | | | | | | | | This change moves the main implementation of _dl_catch_error, _dl_signal_error to libc.so, where TLS variables can be used directly. This removes a writable function pointer from the rtld_global variable. For use during initial relocation, minimal implementations of these functions are provided in ld.so. These are eventually interposed by the libc.so implementations. This is implemented by compiling elf/dl-error-skeleton.c twice, via elf/dl-error.c and elf/dl-error-minimal.c. As a side effect of this change, the static version of dl-error.c no longer includes support for the _dl_signal_cerror/_dl_receive_error mechanism because it is only used in ld.so.
* Fix warning caused by unused-result in bug-atexit3-lib.ccGabriel F T Gomes2016-10-281-2/+10
| | | | | | | | | The test case dlfcn/bug-atexit3-lib.cc calls write and doesn't check the result. When building with GCC 6.2, this generates a warning in 'make check', which is treated as an error. This patch replaces the call to write with a call to write_message. Tested for powerpc64le.
* tst-rec-dlopen: Fix build fail due to missing inclusion of string.hStefan Liebler2016-06-061-0/+1
| | | | | | | | | | | | | | | | | | | | on S390, I get a compile error for dlfcn/tst-rec-dlopen.c: tst-rec-dlopen.c: In function ‘malloc’: tst-rec-dlopen.c:101:4: error: implicit declaration of function ‘strlen’ [-Werror=implicit-function-declaration] (void) write (STDOUT_FILENO, message, strlen (message)); ^ tst-rec-dlopen.c:101:42: error: incompatible implicit declaration of built-in function ‘strlen’ [-Werror] (void) write (STDOUT_FILENO, message, strlen (message)); ^ tst-rec-dlopen.c:112:42: error: incompatible implicit declaration of built-in function ‘strlen’ [-Werror] (void) write (STDOUT_FILENO, message, strlen (message)); ^ This patch adds the missing "#include <string.h>" for strlen. ChangeLog: * dlfcn/tst-rec-dlopen.c: Include string.h.
* tst-rec-dlopen: Use interposed malloc instead of hooksFlorian Weimer2016-06-051-25/+59
| | | | This avoids use of the deprecated hook variables.
* Fix building glibc master with NDEBUG and --with-cpu.Carlos O'Donell2016-03-151-1/+1
| | | | | | | | | | When building on i686, x86_64, and arm, and with NDEBUG, or --with-cpu there are various variables and functions which are unused based on these settings. This patch marks all such variables with __attribute__((unused)) to avoid the compiler warnings when building with the aformentioned options.
* Update copyright dates with scripts/update-copyrights.Joseph Myers2016-01-0433-33/+33
|
* Fix aliasing violation in tst-rec-dlopenFlorian Weimer2015-12-151-1/+1
|
* Move bits/libc-lock.h and bits/libc-lockP.h out of bits/ (bug 14912).Joseph Myers2015-09-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was noted in <https://sourceware.org/ml/libc-alpha/2012-09/msg00305.html> that the bits/*.h naming scheme should only be used for installed headers. This patch renames bits/libc-lock.h to plain libc-lock.h and bits/libc-lockP.h to plain libc-lockP.h to follow that convention. Note that I don't know where libc-lockP.h comes from for Hurd (the Hurd libc-lock.h includes libc-lockP.h, but the only libc-lockP.h in the glibc source tree is for NPTL) - some unmerged patch? - but I updated the #include in the Hurd libc-lock.h anyway. Tested for x86_64 (testsuite, and that installed stripped shared libraries are unchanged by the patch). [BZ #14912] * bits/libc-lock.h: Move to ... * sysdeps/generic/libc-lock.h: ...here. (_BITS_LIBC_LOCK_H): Rename macro to _LIBC_LOCK_H. * sysdeps/mach/hurd/bits/libc-lock.h: Move to ... * sysdeps/mach/hurd/libc-lock.h: ...here. (_BITS_LIBC_LOCK_H): Rename macro to _LIBC_LOCK_H. [_LIBC]: Include <libc-lockP.h> instead of <bits/libc-lockP.h>. * sysdeps/mach/bits/libc-lock.h: Move to ... * sysdeps/mach/libc-lock.h: ...here. (_BITS_LIBC_LOCK_H): Rename macro to _LIBC_LOCK_H. * sysdeps/nptl/bits/libc-lock.h: Move to ... * sysdeps/nptl/libc-lock.h: ...here. (_BITS_LIBC_LOCK_H): Rename macro to _LIBC_LOCK_H. * sysdeps/nptl/bits/libc-lockP.h: Move to ... * sysdeps/nptl/libc-lockP.h: ...here. (_BITS_LIBC_LOCKP_H): Rename macro to _LIBC_LOCKP_H. * crypt/crypt_util.c: Include <libc-lock.h> instead of <bits/libc-lock.h>. * dirent/scandir-tail.c: Likewise. * dlfcn/dlerror.c: Likewise. * elf/dl-close.c: Likewise. * elf/dl-iteratephdr.c: Likewise. * elf/dl-lookup.c: Likewise. * elf/dl-open.c: Likewise. * elf/dl-support.c: Likewise. * elf/dl-writev.h: Likewise. * elf/rtld.c: Likewise. * grp/fgetgrent.c: Likewise. * gshadow/fgetsgent.c: Likewise. * gshadow/sgetsgent.c: Likewise. * iconv/gconv_conf.c: Likewise. * iconv/gconv_db.c: Likewise. * iconv/gconv_dl.c: Likewise. * iconv/gconv_int.h: Likewise. * iconv/gconv_trans.c: Likewise. * include/link.h: Likewise. * inet/getnameinfo.c: Likewise. * inet/getnetgrent.c: Likewise. * inet/getnetgrent_r.c: Likewise. * intl/bindtextdom.c: Likewise. * intl/dcigettext.c: Likewise. * intl/finddomain.c: Likewise. * intl/gettextP.h: Likewise. * intl/loadmsgcat.c: Likewise. * intl/localealias.c: Likewise. * intl/textdomain.c: Likewise. * libidn/idn-stub.c: Likewise. * libio/libioP.h: Likewise. * locale/duplocale.c: Likewise. * locale/freelocale.c: Likewise. * locale/newlocale.c: Likewise. * locale/setlocale.c: Likewise. * login/getutent_r.c: Likewise. * login/getutid_r.c: Likewise. * login/getutline_r.c: Likewise. * login/utmp-private.h: Likewise. * login/utmpname.c: Likewise. * malloc/mtrace.c: Likewise. * misc/efgcvt.c: Likewise. * misc/error.c: Likewise. * misc/fstab.c: Likewise. * misc/getpass.c: Likewise. * misc/mntent.c: Likewise. * misc/syslog.c: Likewise. * nis/nis_call.c: Likewise. * nis/nis_callback.c: Likewise. * nis/nss-default.c: Likewise. * nis/nss_compat/compat-grp.c: Likewise. * nis/nss_compat/compat-initgroups.c: Likewise. * nis/nss_compat/compat-pwd.c: Likewise. * nis/nss_compat/compat-spwd.c: Likewise. * nis/nss_nis/nis-alias.c: Likewise. * nis/nss_nis/nis-ethers.c: Likewise. * nis/nss_nis/nis-grp.c: Likewise. * nis/nss_nis/nis-hosts.c: Likewise. * nis/nss_nis/nis-network.c: Likewise. * nis/nss_nis/nis-proto.c: Likewise. * nis/nss_nis/nis-pwd.c: Likewise. * nis/nss_nis/nis-rpc.c: Likewise. * nis/nss_nis/nis-service.c: Likewise. * nis/nss_nis/nis-spwd.c: Likewise. * nis/nss_nisplus/nisplus-alias.c: Likewise. * nis/nss_nisplus/nisplus-ethers.c: Likewise. * nis/nss_nisplus/nisplus-grp.c: Likewise. * nis/nss_nisplus/nisplus-hosts.c: Likewise. * nis/nss_nisplus/nisplus-initgroups.c: Likewise. * nis/nss_nisplus/nisplus-network.c: Likewise. * nis/nss_nisplus/nisplus-proto.c: Likewise. * nis/nss_nisplus/nisplus-pwd.c: Likewise. * nis/nss_nisplus/nisplus-rpc.c: Likewise. * nis/nss_nisplus/nisplus-service.c: Likewise. * nis/nss_nisplus/nisplus-spwd.c: Likewise. * nis/ypclnt.c: Likewise. * nptl/libc_pthread_init.c: Likewise. * nss/getXXbyYY.c: Likewise. * nss/getXXent.c: Likewise. * nss/getXXent_r.c: Likewise. * nss/nss_db/db-XXX.c: Likewise. * nss/nss_db/db-netgrp.c: Likewise. * nss/nss_db/nss_db.h: Likewise. * nss/nss_files/files-XXX.c: Likewise. * nss/nss_files/files-alias.c: Likewise. * nss/nsswitch.c: Likewise. * posix/regex_internal.h: Likewise. * posix/wordexp.c: Likewise. * pwd/fgetpwent.c: Likewise. * resolv/res_hconf.c: Likewise. * resolv/res_libc.c: Likewise. * shadow/fgetspent.c: Likewise. * shadow/lckpwdf.c: Likewise. * shadow/sgetspent.c: Likewise. * socket/opensock.c: Likewise. * stdio-common/reg-modifier.c: Likewise. * stdio-common/reg-printf.c: Likewise. * stdio-common/reg-type.c: Likewise. * stdio-common/vfprintf.c: Likewise. * stdio-common/vfscanf.c: Likewise. * stdlib/abort.c: Likewise. * stdlib/cxa_atexit.c: Likewise. * stdlib/fmtmsg.c: Likewise. * stdlib/random.c: Likewise. * stdlib/setenv.c: Likewise. * string/strsignal.c: Likewise. * sunrpc/auth_none.c: Likewise. * sunrpc/bindrsvprt.c: Likewise. * sunrpc/create_xid.c: Likewise. * sunrpc/key_call.c: Likewise. * sunrpc/rpc_thread.c: Likewise. * sysdeps/arm/backtrace.c: Likewise. * sysdeps/generic/ldsodefs.h: Likewise. * sysdeps/generic/stdio-lock.h: Likewise. * sysdeps/generic/unwind-dw2-fde.c: Likewise. * sysdeps/i386/backtrace.c: Likewise. * sysdeps/ieee754/ldbl-opt/nldbl-compat.c: Likewise. * sysdeps/m68k/backtrace.c: Likewise. * sysdeps/mach/hurd/cthreads.c: Likewise. * sysdeps/mach/hurd/dirstream.h: Likewise. * sysdeps/mach/hurd/malloc-machine.h: Likewise. * sysdeps/nptl/malloc-machine.h: Likewise. * sysdeps/nptl/stdio-lock.h: Likewise. * sysdeps/posix/dirstream.h: Likewise. * sysdeps/posix/getaddrinfo.c: Likewise. * sysdeps/posix/system.c: Likewise. * sysdeps/pthread/aio_suspend.c: Likewise. * sysdeps/s390/s390-32/backtrace.c: Likewise. * sysdeps/s390/s390-64/backtrace.c: Likewise. * sysdeps/unix/sysv/linux/check_pf.c: Likewise. * sysdeps/unix/sysv/linux/if_index.c: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/getutent_r.c: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/getutid_r.c: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/getutline_r.c: Likewise. * sysdeps/unix/sysv/linux/shm-directory.c: Likewise. * sysdeps/unix/sysv/linux/system.c: Likewise. * sysdeps/x86_64/backtrace.c: Likewise. * time/alt_digit.c: Likewise. * time/era.c: Likewise. * time/tzset.c: Likewise. * wcsmbs/wcsmbsload.c: Likewise. * nptl/tst-initializers1.c (do_test): Refer to <libc-lock.h> instead of <bits/libc-lock.h> in comment.
* Convert dlfcn/tststatic to use test-skeleton.Roland McGrath2015-03-271-2/+5
|
* Let tests result in UNSUPPORTED; use that for unbuildable C++ casesRoland McGrath2015-03-101-2/+5
|
* Avoid C++ tests when the C++ cannot be linked.Roland McGrath2015-03-041-2/+7
|
* Convert dlfcn/tststatic2 to use test-skeleton.Roland McGrath2015-02-271-2/+5
|
* Update copyright year to 2015 for new files.Carlos O'Donell2015-01-211-2/+1
|
* Fix recursive dlopen.Carlos O'Donell2015-01-214-2/+172
| | | | | | | | | | | | | | | | | | | The ability to recursively call dlopen is useful for malloc implementations that wish to load other dynamic modules that implement reentrant/AS-safe functions to use in their own implementation. Given that a user malloc implementation may be called by an ongoing dlopen to allocate memory the user malloc implementation interrupts dlopen and if it calls dlopen again that's a reentrant call. This patch fixes the issues with the ld.so.cache mapping and the _r_debug assertion which prevent this from working as expected. See: https://sourceware.org/ml/libc-alpha/2014-12/msg00446.html
* Update copyright dates with scripts/update-copyrights.Joseph Myers2015-01-0232-32/+32
|
* Fix dlfcn/failtestmod.c warning.Joseph Myers2014-11-271-2/+1
| | | | | | | | | | | | | | | This patch fixes a "set but not used" warning from dlfcn/failtestmod.c. A variable is used only to store the return value from dlsym. As I understand this test, the point is simply to do a sequence of load / unload operations in a loop, and all that matters here is that dlsym gets called and returns without crashing, not what its return value is. So this patch removes the assignment to a variable. Tested for x86_64. * dlfcn/failtestmod.c (constr): Do not store result of dlsym in a variable.
* Remove IS_IN_libdlSiddhesh Poyarekar2014-11-249-9/+9
| | | | | | | | | | | | | | Replace with IS_IN (libdl). No changes to generated code on x86_64. * dlfcn/dladdr.c: Use IS_IN. * dlfcn/dladdr1.c: Likewise. * dlfcn/dlclose.c: Likewise. * dlfcn/dlerror.c: Likewise. * dlfcn/dlinfo.c: Likewise. * dlfcn/dlmopen.c: Likewise. * dlfcn/dlopen.c: Likewise. * dlfcn/dlsym.c: Likewise. * dlfcn/dlvsym.c: Likewise.
* Include .interp section only for libc.soSiddhesh Poyarekar2014-09-161-200/+0
| | | | | | | | | | | | | | | | | | Barring libc.so and libdl.so, none of the libraries have any entry points, so it is pointless to add a .interp section for them. The libdl.so entry point (in dlfcn/eval.c) is also defunct, so remove that file as well. Build tested for x86_64, ppc64 and s390x. I have not moved CFLAGS-interp.c to CPPFLAGS-interp.c isnce I'll be removing it completely in a follow-up patch. Siddhesh * Makerules (lib%.so): Don't include $(+interp) in prerequisites. * elf/Makefile (CFLAGS-interp.c): Don't define NOT_IN_libc. * dlfcn/eval.c: Remove file.
* Fix fallout from Joseph's untested Makeconfig change.Roland McGrath2014-02-281-1/+1
|
* Consistently include Makeconfig after defining subdir.Joseph Myers2014-02-261-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In <https://sourceware.org/ml/libc-alpha/2014-01/msg00196.html> I noted it was necessary to add includes of Makeconfig early in various subdirectory makefiles for the tests-special variable settings added by that patch to be conditional on configuration information. No-one commented on the general question there of whether Makeconfig should always be included immediately after the definition of subdir. This patch implements that early inclusion of Makeconfig in each directory (which is a lot easier than consistent placement of includes of Rules). Includes are added if needed, or moved up if already present. Subdirectory "all:" targets are removed, since Makeconfig provides one. There is potential for further cleanups I haven't done. Rules and Makerules have code such as ifneq "$(findstring env,$(origin headers))" "" headers := endif to override to empty any value of various variables that came from the environment. I think there is a case for Makeconfig setting all the subdirectory variables (other than subdir) to empty to ensure no outside value is going to take effect if a subdirectory fails to define a variable. (A list of such variables, possibly out of date and incomplete, is in manual/maint.texi.) Rules and Makerules would give errors if Makeconfig hadn't already been included, instead of including it themselves. The special code to override values coming from the environment would then be obsolete and could be removed. Tested x86_64, including that installed binaries are identical before and after the patch. * argp/Makefile: Include Makeconfig immediately after defining subdir. * assert/Makefile: Likewise. * benchtests/Makefile: Likewise. * catgets/Makefile: Likewise. * conform/Makefile: Likewise. * crypt/Makefile: Likewise. * csu/Makefile: Likewise. (all): Remove target. * ctype/Makefile: Include Makeconfig immediately after defining subdir. * debug/Makefile: Likewise. * dirent/Makefile: Likewise. * dlfcn/Makefile: Likewise. * gmon/Makefile: Likewise. * gnulib/Makefile: Likewise. * grp/Makefile: Likewise. * gshadow/Makefile: Likewise. * hesiod/Makefile: Likewise. * hurd/Makefile: Likewise. (all): Remove target. * iconvdata/Makefile: Include Makeconfig immediately after defining subdir. * inet/Makefile: Likewise. * intl/Makefile: Likewise. * io/Makefile: Likewise. * libio/Makefile: Likewise. (all): Remove target. * locale/Makefile: Include Makeconfig immediately after defining subdir. * login/Makefile: Likewise. * mach/Makefile: Likewise. (all): Remove target. * malloc/Makefile: Include Makeconfig immediately after defining subdir. (all): Remove target. * manual/Makefile: Include Makeconfig immediately after defining subdir. * math/Makefile: Likewise. * misc/Makefile: Likewise. * nis/Makefile: Likewise. * nss/Makefile: Likewise. * po/Makefile: Likewise. (all): Remove target. * posix/Makefile: Include Makeconfig immediately after defining subdir. * pwd/Makefile: Likewise. * resolv/Makefile: Likewise. * resource/Makefile: Likewise. * rt/Makefile: Likewise. * setjmp/Makefile: Likewise. * shadow/Makefile: Likewise. * signal/Makefile: Likewise. * socket/Makefile: Likewise. * soft-fp/Makefile: Likewise. * stdio-common/Makefile: Likewise. * stdlib/Makefile: Likewise. * streams/Makefile: Likewise. * string/Makefile: Likewise. * sunrpc/Makefile: Likewise. (all): Remove target. * sysvipc/Makefile: Include Makeconfig immediately after defining subdir. * termios/Makefile: Likewise. * time/Makefile: Likewise. * timezone/Makefile: Likewise. (all): Remove target. * wcsmbs/Makefile: Include Makeconfig immediately after defining subdir. * wctype/Makefile: Likewise. libidn/ChangeLog: * Makefile: Include Makeconfig immediately after defining subdir. localedata/ChangeLog: * Makefile: Include Makeconfig immediately after defining subdir. (all): Remove target. nptl/ChangeLog: * Makefile: Include Makeconfig immediately after defining subdir. nptl_db/ChangeLog: * Makefile: Include Makeconfig immediately after defining subdir.
* Use glibc_likely instead __builtin_expect.Ondřej Bílka2014-02-1010-11/+11
|
* Update copyright notices with scripts/update-copyrightsAllan McRae2014-01-0133-33/+33
|
* Remove --disable-versioning.Joseph Myers2013-09-043-5/+1
|
* [BZ #15897] dlfcn: do not mark dlopen/dlclose as leaf functionsMike Frysinger2013-08-275-5/+142
| | | | | | | | | | | | | Since the dlopen funcs might invoke a constructor that calls a func that is in the same compilation unit as the caller, we cannot mark them as leaf funcs. Similarly, dlclose might invoke a destructor that calls a func that is in the same compilation unit as the caller. URL: https://sourceware.org/bugzilla/show_bug.cgi?id=15897 Reportedy-by: Fabrice Bauzac <libnoon@gmail.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Add a dlopen/getpagesize static executable test.Maciej W. Rozycki2013-06-283-3/+109
|
* [BZ #15022] Correct global-scope dlopen issues in static executables.Maciej W. Rozycki2013-06-284-3/+533
| | | | | | | | This change creates a link map in static executables to serve as the global search list for dlopen. It fixes a problem with the inability to access the global symbol object and a crash on an attempt to map a DSO into the global scope. Some code that has become dead after the addition of this link map is removed too and test cases are provided.
* dlfcn/Makefile: Avoid repeated $(*-ENV) definitions.Maciej W. Rozycki2013-06-211-1/+1
|
* Remove trailing whitespace.Joseph Myers2013-06-051-2/+2
|
* Link extra-libs consistently with libc and ld.so.Joseph Myers2013-05-311-9/+1
|
* Update copyright notices with scripts/update-copyrights.Joseph Myers2013-01-0225-28/+25
|
* Free errstring if _dl_addr doesn't returns 0Roland McGrath2012-10-091-4/+7
|
* Remove distribute variable from MakefilesUlrich Drepper2012-03-071-6/+0
|
* Replace FSF snail mail address with URLs.Paul Eggert2012-02-0925-75/+50
|
* Static linking is always neededUlrich Drepper2012-01-081-1/+1
|
* Remove pre-ISO C supportUlrich Drepper2012-01-071-10/+11
| | | | No more __const.
* Remove non-ELF supportUlrich Drepper2012-01-071-3/+3
|
* Fix testsuite link failureAndreas Schwab2011-08-221-1/+2
|