about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/localplt.data
Commit message (Collapse)AuthorAgeFilesLines
* elf: Rework exception handling in the dynamic loader [BZ #25486]Florian Weimer2022-11-031-5/+0
| | | | | | | | | | | | | | | | | | | | | | | The old exception handling implementation used function interposition to replace the dynamic loader implementation (no TLS support) with the libc implementation (TLS support). This results in problems if the link order between the dynamic loader and libc is reversed (bug 25486). The new implementation moves the entire implementation of the exception handling functions back into the dynamic loader, using THREAD_GETMEM and THREAD_SETMEM for thread-local data support. These depends on Hurd support for these macros, added in commit b65a82e4e757c1e6cb7073916 ("hurd: Add THREAD_GET/SETMEM/_NC"). One small obstacle is that the exception handling facilities are used before the TCB has been set up, so a check is needed if the TCB is available. If not, a regular global variable is used to store the exception handling information. Also rename dl-error.c to dl-catch.c, to avoid confusion with the dlerror function. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* mtrace: Wean away from malloc hooksSiddhesh Poyarekar2021-07-221-1/+0
| | | | | | | | | | | | | Wean mtrace away from the malloc hooks and move them into the debug DSO. Split the API away from the implementation so that we can add the API to libc.so as well as libc_malloc_debug.so, with the libc implementations being empty. Update localplt data since memalign no longer has any callers after this change. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
* ld.so: Do not export free/calloc/malloc/realloc functions [BZ #25486]Florian Weimer2020-02-151-6/+0
| | | | | | | | | | | | | | | | | | | Exporting functions and relying on symbol interposition from libc.so makes the choice of implementation dependent on DT_NEEDED order, which is not what some compiler drivers expect. This commit replaces one magic mechanism (symbol interposition) with another one (preprocessor-/compiler-based redirection). This makes the hand-over from the minimal malloc to the full malloc more explicit. Removing the ABI symbols is backwards-compatible because libc.so is always in scope, and the dynamic loader will find the malloc-related symbols there since commit f0b2132b35248c1f4a80f62a2c38cddcc802aa8c ("ld.so: Support moving versioned symbols between sonames [BZ #24741]"). Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* Allow memset local PLT reference for powerpc soft-float.Joseph Myers2019-06-131-0/+1
| | | | | | | | | | | | | | | | | | | | Some recent change on GCC mainline resulted in the localplt test failing for powerpc soft-float (not sure exactly when, as the failure appeared when there were other build test failures as well; <https://sourceware.org/ml/libc-testresults/2019-q2/msg00261.html> shows it remaining when other failures went away). The problem is a call to memset that GCC now generates in the libgcc long double code. Since memset is documented as a function GCC may always implicitly generate calls to, it seems reasonable to allow that local PLT reference (just like those for libgcc functions that GCC implicitly generates calls to and that are also exported from libc.so), which this patch does. Tested for powerpc soft-float with build-many-glibcs.py. * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/localplt.data: Allow memset in libc.so.
* ld.so: Introduce struct dl_exceptionFlorian Weimer2017-08-101-0/+2
| | | | | | This commit separates allocating and raising exceptions. This simplifies catching and re-raising them because it is no longer necessary to make a temporary, on-stack copy of the exception message.
* ld.so: Remove __libc_memalignFlorian Weimer2016-11-301-4/+2
| | | | | | | It is no longer needed since commit 6c444ad6e953dbdf9c7be065308a0a777 (elf: Do not use memalign for TCB/TLS blocks allocation [BZ #17730]). Applications do not link against ld.so and will use the definition in libc.so, so there is no ABI impact.
* Implement _dl_catch_error, _dl_signal_error in libc.so [BZ #16628]Florian Weimer2016-11-301-0/+3
| | | | | | | | | | | | | | | | | | 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.
* Update localplt.data for powerpc-nofpu.Joseph Myers2016-01-201-2/+2
| | | | | | | | | | | | | | | | | | Testing for powerpc-nofpu showed that localplt.data was out of date. Two new soft-fp functions showed up in the list: __gtsf2 and __unordsf2; this patch adds these as optional. __signbit and __signbitl no longer appear as local PLT entries; given the move to __builtin_signbit* for all GCC versions supported for building glibc (and given the use of the type-generic signbit macro within glibc), those can safely be removed from the list, which this patch does. Tested for powerpc-nofpu. * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/localplt.data (__gtsf2): Add as optional for libc.so. (__unordsf2): Likewise. (__signbit): Remove for libc.so. (__signbitl): Likewise.
* Remove __signbit* from localplt.data as they are no longer called from ↵Wilco Dijkstra2015-11-101-3/+0
| | | | | | | | | | within GLIBC. * sysdeps/unix/sysv/linux/aarch64/localplt.data: Remove __signbit*. * sysdeps/unix/sysv/linux/arm/localplt.data: Likewise. * sysdeps/unix/sysv/linux/microblaze/localplt.data: Likewise. * sysdeps/unix/sysv/linux/nios2/localplt.data: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/localplt.data: Likewise.
* Run check-localpltk/textrel/execstack over ld.so.Carlos O'Donell2014-11-061-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For maximum paranoia we run ld.so through the normal set of tests for all of the shared libraries. This includes running ld.so through check-localplt, check-textrel, and check-execstack. While none of these should trigger any failures given the way ld.so is built, it might possibly fail if a developer does something wrong. This paranoia was triggered by a discussion over the use of __strcpy vs. strcpy [1] and if the symbol could leak and use the libc.so version. The check-localplt test fails right away because localplt.data needs updating for all arches. By default we add 6 new symbols: __tls_get_addr, __libc_memalign, malloc, calloc, realloc and free. Other machines like i386, power, and s390 require some different symbol sets e.g. ___tls_get_addr vs. __tls_get_addr for i386. Verified for i386 Verified for x86_64 Verified for ppc32 Verified for ppc64 Verified for ppc64le Verified for arm Verified for aarch64 Verified for s390 Verified for s390x Guessed for alpha Guessed for ia64 Guessed for m68k Guessed for microblaze Guessed for sparc32 Guessed for sparc64 Defaults for sh Defaults for mips Defaults for hppa Defaults for tile Machine manintainers notified to double check the data used in localplt.data. [1] https://sourceware.org/ml/libc-alpha/2014-10/msg00548.html
* powerpc: Consolidate nptl/ subdirectories under linux/....Roland McGrath2014-06-231-0/+40