about summary refs log tree commit diff
path: root/sysdeps/mach/hurd/i386/localplt.data
Commit message (Collapse)AuthorAgeFilesLines
* hurd: keep only required PLTs in ld.soSamuel Thibault2020-11-111-14/+1
| | | | | | | | | | | | | | | | | | | | | We need NO_RTLD_HIDDEN because of the need for PLT calls in ld.so. See Roland's comment in https://sourceware.org/bugzilla/show_bug.cgi?id=15605 "in the Hurd it's crucial that calls like __mmap be the libc ones instead of the rtld-local ones after the bootstrap phase, when the dynamic linker is being used for dlopen and the like." We used to just avoid all hidden use in the rtld ; this commit switches to keeping only those that should use PLT calls, i.e. essentially those defined in sysdeps/mach/hurd/dl-sysdep.c: __assert_fail __assert_perror_fail __*stat64 _exit This fixes a few startup issues, notably the call to __tunable_get_val that is made before PLTs are set up.
* hurd: make close a cancellation pointSamuel Thibault2020-06-281-1/+2
| | | | | | | | | | | | | | and add _nocancel variant. * sysdeps/mach/hurd/Makefile [io] (sysdep_routines): Add close_nocancel. * sysdeps/mach/hurd/Versions (libc.GLIBC_PRIVATE, ld.GLIBC_PRIVATE): Add __close_nocancel. * sysdeps/mach/hurd/i386/localplt.data (__close_nocancel): Allow PLT. * sysdeps/mach/hurd/close.c: Include <sysdep-cancel.h> (__libc_close): Surround _hurd_fd_close with enabling async cancel. * sysdeps/mach/hurd/close_nocancel.c: New file. * sysdeps/mach/hurd/not-cancel.h (__close_nocancel): Replace macro with declaration with hidden proto.
* hurd: make open and openat cancellation pointsSamuel Thibault2020-06-281-1/+2
| | | | | | | | | | | | | | | | | | | | | and add _nocancel variants. * sysdeps/mach/hurd/Makefile [io] (sysdep_routines): Add open_nocancel openat_nocancel. * sysdeps/mach/hurd/Versions (libc.GLIBC_PRIVATE, ld.GLIBC_PRIVATE): Add __open_nocancel. * sysdeps/mach/hurd/dl-sysdep.c (__open_nocancel): Add alias, check it is not hidden. * sysdeps/mach/hurd/i386/localplt.data (__open_nocancel): Allow PLT. * sysdeps/mach/hurd/not-cancel.h (__open_nocancel, __openat_nocancel: Replace macros with declarations with hidden proto. (__open64_nocancel, __openat64_nocancel): Call __open_nocancel and __openat_nocancel instead of __open64 and __openat64. * sysdeps/mach/hurd/open.c: Include <sysdep-cancel.h> (__libc_open): Surround __file_name_lookup with enabling async cancel. * sysdeps/mach/hurd/openat.c: Likewise. * sysdeps/mach/hurd/open_nocancel.c, sysdeps/mach/hurd/openat_nocancel.c: New files.
* hurd: Make write and pwrite64 cancellation pointsSamuel Thibault2020-06-141-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | and add _nocancel variants. * sysdeps/mach/hurd/write.c (__libc_write): Call __write_nocancel surrounded by enabling async cancel, to replace implementation moved to... * sysdeps/mach/hurd/write_nocancel.c (__write_nocancel): ... here. * sysdeps/mach/hurd/pwrite64.c (__libc_pwrite64): Call __pwrite64_nocancel surrounded by enabling async cancel, to replace implementation moved to... * sysdeps/mach/hurd/pwrite64_nocancel.c (__pwrite64_nocancel): ... here. * sysdeps/mach/hurd/Makefile (sysdep_routines): Add write_nocancel and pwrite64_nocancel. * sysdeps/mach/hurd/not-cancel.h (__write_nocancel, __pwrite64_nocancel): Replace macros with prototypes with a hidden proto on libc. * sysdeps/mach/hurd/dl-sysdep.c (__write_nocancel): New alias, check that it is not hidden. * sysdeps/mach/hurd/Versions (libc.GLIBC_PRIVATE): Add __write_nocancel. (ld.GLIBC_PRIVATE): Add __write_nocancel. * sysdeps/mach/hurd/i386/localplt.data (__write_nocancel): Add reference.
* hurd: Make read and pread64 cancellableSamuel Thibault2020-06-071-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | and add _nocancel variants. * sysdeps/mach/hurd/pread64.c (__libc_pread64): Call __pread64_nocancel surrounded by enabling async cancel, to replace implementation moved to... * sysdeps/mach/hurd/pread64_nocancel.c (__pread64_nocancel): ... here. * sysdeps/mach/hurd/read.c (__libc_read): Call __read_nocancel surrounded by enabling async cancel, to replace implementation moved to... * sysdeps/mach/hurd/read_nocancel.c (__read_nocancel): ... here. * sysdeps/mach/hurd/Makefile (sysdep_routines): Add read_nocancel and pread64_nocancel. * sysdeps/mach/hurd/not-cancel.h (__read_nocancel, __pread64_nocancel): Replace macros with prototypes with a hidden proto on libc. * sysdeps/mach/hurd/dl-sysdep.c: Include <not-cancel.h>. (__pread64_nocancel): New alias, check that it is not hidden. (__read_nocancel): New alias, check that it is not hidden. * sysdeps/mach/hurd/Versions (libc.GLIBC_PRIVATE): Add __read_nocancel and __pread64_nocancel. (ld.GLIBC_2.1): Add __pread64. (ld.GLIBC_PRIVATE): Add __read_nocancel and __pread64_nocancel. * sysdeps/mach/hurd/i386/ld.abilist (__pread64): Add symbol. * sysdeps/mach/hurd/i386/localplt.data (__read_nocancel, __pread64, __pread64_nocancel): Add references.
* elf: Turn _dl_printf, _dl_error_printf, _dl_fatal_printf into functionsFlorian Weimer2020-05-251-0/+1
| | | | | | | | | | | | | | This change makes it easier to set a breakpoint on these calls. This also addresses the issue that including <ldsodefs.h> without <unistd.h> does not result usable _dl_*printf macros because of the use of the STD*_FILENO macros there. (The private symbol for _dl_fatal_printf will go away again once the exception handling implementation is unified between libc and ld.so.) Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* 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>
* hurd: Do not make sigprocmask available in ld.soFlorian Weimer2019-12-181-1/+0
| | | | | | | | | | | After commit f7649d5780aa4682393b9daedd653e4d9c12784c ("dlopen: Do not block signals"), the dynamic linker no longer uses sigprocmask, which means that it does not have to be made available explicitly on hurd. This reverts commit 892badc9bbcd4a6f8c2eb6c8a99be3aa22517532 ("hurd: Make __sigprocmask GLIBC_PRIVATE") and commit d5ed9ba29a3c818b3433a1784862494968abda45 ("hurd: Fix ld.so link"), but keeps the comment changes from the second commit.
* hurd: Fix ld.so __access override from libcSamuel Thibault2019-12-011-1/+1
| | | | | | ld.so symbols to be overriden by libc need to be extern to really get overriden. __access happens to have never been exposed, putting it to GLIBC_PRIVATE.
* hurd: Fix ld.so __getcwd override from libcSamuel Thibault2019-12-011-1/+1
| | | | | | ld.so symbols to be overriden by libc need to be extern to really get overriden. __getcwd happens to have never been exposed, putting it to GLIBC_PRIVATE.
* hurd: Fix ld.so linkSamuel Thibault2019-12-011-0/+1
| | | | | Since a2e8aa0d9ea6 ("Block signals during the initial part of dlopen") dl_open uses sigprocmask, so we need a stub implementation.
* hurd: Fix some ld.so symbol override from libcSamuel Thibault2018-07-281-1/+1
| | | | | | | | ld.so symbols to be overriden by libc need to be extern to really get overriden. * sysdeps/mach/hurd/not-errno.h: New file. * sysdeps/mach/hurd/i386/localplt.data: Update accordingly.
* hurd: Fix some ld.so symbol override from libcSamuel Thibault2018-07-281-4/+4
| | | | | | | | | | ld.so symbols to be overriden by libc need to be extern to really get overriden. * sysdeps/mach/hurd/dl-unistd.h (__access, __brk, __lseek, __read, __sbrk): Do not set attribute_hidden. * sysdeps/mach/hurd/i386/ld.abilist: Update accordingly. * sysdeps/mach/hurd/i386/localplt.data: Update accordingly.
* hurd: Fix some ld.so symbol override from libcSamuel Thibault2018-07-271-2/+2
| | | | | | | | | | | | | | ld.so symbols to be overriden by libc need to be extern to really get overriden. More fixes are needed to avoid the hidden attribute. * sysdeps/mach/hurd/Versions (libc): Make __access and __access_noerrno external so they can override the ld symbols. (ld): Make __access, __read, __sbrk, __strtoul_internal, __write, __writev, __open64, __access_noerrno extern so they can be overrided. * sysdeps/mach/hurd/i386/libc.abilist: Update accordingly. * sysdeps/mach/hurd/i386/ld.abilist: Update accordingly.
* hurd: fix localplt.data formatSamuel Thibault2018-06-191-1/+1
| | | | * sysdeps/mach/hurd/i386/localplt.data: Drop empty line.
* hurd: Fix "Missing required PLT reference"Samuel Thibault2018-06-191-0/+64
* sysdeps/mach/hurd/localplt.data: Move to... * sysdeps/mach/hurd/i386/localplt.data: new file. Add + REL R_386_GLOB_DAT like on Linux i386.