about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/ia64
Commit message (Collapse)AuthorAgeFilesLines
* nptl: Use <unwind-link.h> for accessing the libgcc_s unwinderFlorian Weimer2021-03-011-14/+2
| | | | Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* Reduce the statically linked startup code [BZ #23323]Florian Weimer2021-02-251-0/+1
| | | | | | | | | | | | | | | | | | | It turns out the startup code in csu/elf-init.c has a perfect pair of ROP gadgets (see Marco-Gisbert and Ripoll-Ripoll, "return-to-csu: A New Method to Bypass 64-bit Linux ASLR"). These functions are not needed in dynamically-linked binaries because DT_INIT/DT_INIT_ARRAY are already processed by the dynamic linker. However, the dynamic linker skipped the main program for some reason. For maximum backwards compatibility, this is not changed, and instead, the main map is consulted from __libc_start_main if the init function argument is a NULL pointer. For statically linked binaries, the old approach based on linker symbols is still used because there is nothing else available. A new symbol version __libc_start_main@@GLIBC_2.34 is introduced because new binaries running on an old libc would not run their ELF constructors, leading to difficult-to-debug issues.
* Update syscall lists for Linux 5.11.Joseph Myers2021-02-191-0/+1
| | | | | | | | Linux 5.11 has one new syscall, epoll_pwait2. Update syscall-names.list and regenerate the arch-syscall.h headers with build-many-glibcs.py update-syscalls. Tested with build-many-glibcs.py.
* linux: Set default kernel_stat.h to LFSAdhemerval Zanella2021-02-111-22/+0
| | | | | | | | | | | | | | The XSTAT_IS_XSTAT64 and STAT_IS_KERNEL_STAT flags are now set to 1 and STATFS_IS_STATFS64 is set to __STATFS_MATCHES_STATFS64. This makes the default ABI for newer ports to provide only LFS calls. A copy of non-LFS support is provided to 32-bit ABIS with non-LFS support (arm, csky, i386, m68k, nios2, s390, and sh). Is also allows to remove the 64-bit ports, which already uses the default values. This patch does not change the code generation. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* linux: Fix STATFS_IS_STATFS64 definitionAdhemerval Zanella2021-02-111-1/+1
| | | | | | | | | | | | | | | aarch64, arc, ia64, mips64, powerpc64, riscv32, riscv64, s390x, sparc64, and x86_64 defines STATFS_IS_STATFS64 to 0, but all of them alias statfs to statfs64 and the struct statfs has the same and layout of struct statfs64. The correct definition will be used on the [f]statfs[64] consolidation. This patch does not change code generation since the symbols are implemented using the auto-generation syscall for all the aforementioned ABIs. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* sysconf: Add _SC_MINSIGSTKSZ/_SC_SIGSTKSZ [BZ #20305]H.J. Lu2021-02-011-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add _SC_MINSIGSTKSZ for the minimum signal stack size derived from AT_MINSIGSTKSZ, which is the minimum number of bytes of free stack space required in order to gurantee successful, non-nested handling of a single signal whose handler is an empty function, and _SC_SIGSTKSZ which is the suggested minimum number of bytes of stack space required for a signal stack. If AT_MINSIGSTKSZ isn't available, sysconf (_SC_MINSIGSTKSZ) returns MINSIGSTKSZ. On Linux/x86 with XSAVE, the signal frame used by kernel is composed of the following areas and laid out as: ------------------------------ | alignment padding | ------------------------------ | xsave buffer | ------------------------------ | fsave header (32-bit only) | ------------------------------ | siginfo + ucontext | ------------------------------ Compute AT_MINSIGSTKSZ value as size of xsave buffer + size of fsave header (32-bit only) + size of siginfo and ucontext + alignment padding. If _SC_SIGSTKSZ_SOURCE or _GNU_SOURCE are defined, MINSIGSTKSZ and SIGSTKSZ are redefined as /* Default stack size for a signal handler: sysconf (SC_SIGSTKSZ). */ # undef SIGSTKSZ # define SIGSTKSZ sysconf (_SC_SIGSTKSZ) /* Minimum stack size for a signal handler: SIGSTKSZ. */ # undef MINSIGSTKSZ # define MINSIGSTKSZ SIGSTKSZ Compilation will fail if the source assumes constant MINSIGSTKSZ or SIGSTKSZ. The reason for not simply increasing the kernel's MINSIGSTKSZ #define (apart from the fact that it is rarely used, due to glibc's shadowing definitions) was that userspace binaries will have baked in the old value of the constant and may be making assumptions about it. For example, the type (char [MINSIGSTKSZ]) changes if this #define changes. This could be a problem if an newly built library tries to memcpy() or dump such an object defined by and old binary. Bounds-checking and the stack sizes passed to things like sigaltstack() and makecontext() could similarly go wrong.
* ia64: Fix brk call on statupAdhemerval Zanella2021-01-281-0/+22
| | | | | | | | | brk used by statup before TCB is properly set, so we can't use IA64_USE_NEW_STUB. This patch fixes a regression introduced by 720480934ab910. Checked on ia64-linux-gnu.
* ldconfig/x86: Store ISA level in cache and aux cacheH.J. Lu2021-01-131-10/+12
| | | | | | | | | | | Store ISA level in the portion of the unused upper 32 bits of the hwcaps field in cache and the unused pad field in aux cache. ISA level is stored and checked only for shared objects in glibc-hwcaps subdirectories. The shared objects in the default directories aren't checked since there are no fallbacks for these shared objects. Tested on x86-64-v2, x86-64-v3 and x86-64-v4 machines with --disable-hardcoded-path-in-tests and --enable-hardcoded-path-in-tests.
* Update copyright dates with scripts/update-copyrightsPaul Eggert2021-01-0249-49/+49
| | | | | | | | | | | | | | | | I used these shell commands: ../glibc/scripts/update-copyrights $PWD/../gnulib/build-aux/update-copyright (cd ../glibc && git commit -am"[this commit message]") and then ignored the output, which consisted lines saying "FOO: warning: copyright statement not found" for each of 6694 files FOO. I then removed trailing white space from benchtests/bench-pthread-locks.c and iconvdata/tst-iconv-big5-hkscs-to-2ucs4.c, to work around this diagnostic from Savannah: remote: *** pre-commit check failed ... remote: *** error: lines with trailing whitespace found remote: error: hook declined to update refs/heads/master
* Update syscall lists for Linux 5.10.Joseph Myers2020-12-161-0/+1
| | | | | | | | Linux 5.10 has one new syscall, process_madvise. Update syscall-names.list and regenerate the arch-syscall.h headers with build-many-glibcs.py update-syscalls. Tested with build-many-glibcs.py.
* linux: Consolidate brk implementationAdhemerval Zanella2020-12-103-51/+3
| | | | | | | | | | | | | | | It removes all the arch-specific assembly implementation. The outliers are alpha, where its kernel ABI explict return -ENOMEM in case of failure; and i686, where it can't use "call *%gs:SYSINFO_OFFSET" during statup in static PIE. Also some ABIs exports an additional ___brk_addr symbol and to handle it an internal HAVE_INTERNAL_BRK_ADDR_SYMBOL is added. Checked on x86_64-linux-gnu, i686-linux-gnu, adn with builsd for the affected ABIs. Reviewed-by: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
* Update syscall lists for Linux 5.9.Joseph Myers2020-10-231-0/+1
| | | | | | | | Linux 5.9 has one new syscall, close_range. Update syscall-names.list and regenerate the arch-syscall.h headers with build-many-glibcs.py update-syscalls. Tested with build-many-glibcs.py.
* linux: Move the struct stat{64} to struct_stat.hAdhemerval Zanella2020-10-091-38/+7
| | | | | | | | | | | The common definitions are moved to a Linux generic stat.h while the struct stat{64} definition are moved to a arch-specific struct_stat.h header. Checked with a build for all affected ABIs. I also checked on x86_64, i686, powerpc, powerpc64le, sparcv9, sparc64, s390, and s390x. Reviewed-by: Lukasz Majewski <lukma@denx.de>
* Remove mknod wrapper functions, move them to symbolsAdhemerval Zanella2020-10-093-3/+7
| | | | | | | | | | | | | | | | | | | This patch removes the mknod and mknodat static wrapper and add the symbols on the libc with the expected names. Both the prototypes of the internal symbol linked by the static wrappers and the inline redirectors are also removed from the installed sys/stat.h header file. The wrapper implementation license LGPL exception is also removed since it is no longer statically linked to binaries. Internally the _STAT_VER* definitions are moved to the arch-specific xstatver.h file. Checked with a build for all affected ABIs. I also checked on x86_64, i686, powerpc, powerpc64le, sparcv9, sparc64, s390, and s390x. Reviewed-by: Lukasz Majewski <lukma@denx.de>
* Remove stat wrapper functions, move them to exported symbolsAdhemerval Zanella2020-10-093-5/+13
| | | | | | | | | | | | | | | | | | | | | | | | This patch removes the stat, stat64, lstat, lstat64, fstat, fstat64, fstatat, and fstatat64 static wrapper and add the symbol on the libc with the expected names. Both the prototypes of the internal symbol linked by the static wrappers and the inline redirectors are also removed from the installed sys/stat.h header file. The wrapper implementation license LGPL exception is also removed since it is no longer statically linked to binaries. Internally the _STAT_VER* definitions are moved to a arch-specific xstatver.h file. The internal defines that redirects internals {f}stat{at} to their {f}xstat{at} counterparts are removed for Linux (!NO_RTLD_HIDDEN). Hurd still requires them since {f}stat{at} pulls extra objects that makes the loader build fail otherwise (I haven't dig into why exactly). Checked with a build for all affected ABIs. I also checked on x86_64, i686, powerpc, powerpc64le, sparcv9, sparc64, s390, and s390x. Reviewed-by: Lukasz Majewski <lukma@denx.de>
* Update mallinfo2 ABI, and testDJ Delorie2020-09-171-0/+1
| | | | | | | This patch adds the ABI-related bits to reflect the new mallinfo2 function, and adds a test case to verify basic functionality. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* linux: Define STAT64_IS_KERNEL_STAT64Adhemerval Zanella2020-09-111-0/+1
| | | | | | | | | | | It indicates that the glibc export stat64 is similar in size and layout of the kernel stat64 used on the syscall. It is not currently used on stat implementation, but the idea is to indicate whether to use the kernel_stat to issue on the syscall on the *stat*64 variant (more specifically on mips which its exported ABI does not match the kernel). Reviewed-by: Lukasz Majewski <lukma@denx.de>
* Update syscall lists for Linux 5.8.Joseph Myers2020-08-071-0/+1
| | | | | | | | Linux 5.8 has one new syscall, faccessat2. Update syscall-names.list and regenerate the arch-syscall.h headers with build-many-glibcs.py update-syscalls. Tested with build-many-glibcs.py.
* Linux: Remove rseq supportFlorian Weimer2020-07-161-1/+0
| | | | | | | | | | | | | | | | | | The kernel ABI is not finalized, and there are now various proposals to change the size of struct rseq, which would make the glibc ABI dependent on the version of the kernels used for building glibc. This is of course not acceptable. This reverts commit 48699da1c468543ade14777819bd1b4d652709de ("elf: Support at least 32-byte alignment in static dlopen"), commit 8f4632deb3545b2949cec5454afc3cb21a0024ea ("Linux: rseq registration tests"), commit 6e29cb3f61ff5432c78a1c84b0d9b123a350ab36 ("Linux: Use rseq in sched_getcpu if available"), and commit 0c76fc3c2b346dc5401dc055d97d4279632b0fb3 ("Linux: Perform rseq registration at C startup and thread creation"), resolving the conflicts introduced by the ARC port and the TLS static surplus changes. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* string: Add strerrorname_np and strerrordesc_npAdhemerval Zanella2020-07-071-0/+2
| | | | | | | | | | | | | | | | | The strerrorname_np returns error number name (e.g. "EINVAL" for EINVAL) while strerrordesc_np returns string describing error number (e.g "Invalid argument" for EINVAL). Different than strerror, strerrordesc_np does not attempt to translate the return description, both functions return NULL for an invalid error number. They should be used instead of sys_errlist and sys_nerr, both are thread and async-signal safe. These functions are GNU extensions. Checked on x86-64-linux-gnu, i686-linux-gnu, powerpc64le-linux-gnu, and s390x-linux-gnu. Tested-by: Carlos O'Donell <carlos@redhat.com> Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* string: Add sigabbrev_np and sigdescr_npAdhemerval Zanella2020-07-071-0/+2
| | | | | | | | | | | | | | | | | | The sigabbrev_np returns the abbreviated signal name (e.g. "HUP" for SIGHUP) while sigdescr_np returns the string describing the error number (e.g "Hangup" for SIGHUP). Different than strsignal, sigdescr_np does not attempt to translate the return description and both functions return NULL for an invalid signal number. They should be used instead of sys_siglist or sys_sigabbrev and they are both thread and async-signal safe. They are added as GNU extensions on string.h header (same as strsignal). Checked on x86-64-linux-gnu, i686-linux-gnu, powerpc64le-linux-gnu, and s390x-linux-gnu. Tested-by: Carlos O'Donell <carlos@redhat.com> Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* signal: Add signum-{generic,arch}.hAdhemerval Zanella2020-07-071-1/+1
| | | | | | | | | | | | | | | | | | | | It refactor how signals are defined by each architecture. Instead of include a generic header (bits/signum-generic.h) and undef non-default values in an arch specific header (bits/signum.h) the new scheme uses a common definition (bits/signum-generic.h) and each architectures add its specific definitions on a new header (bits/signum-arch.h). For Linux it requires copy some system default definitions to alpha, hppa, and sparc. They are historical values and newer ports uses the generic Linux signum-arch.h. For Hurd the BSD signum is removed and moved to a new header (it is used currently only on Hurd). Checked on a build against all affected ABIs. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
* Add the __libc_single_threaded variableFlorian Weimer2020-07-061-0/+1
| | | | | | | | | | | | | | The variable is placed in libc.so, and it can be true only in an outer libc, not libcs loaded via dlmopen or static dlopen. Since thread creation from inner namespaces does not work, pthread_create can update __libc_single_threaded directly. Using __libc_early_init and its initial flag, implementation of this variable is very straightforward. A future version may reset the flag during fork (but not in an inner namespace), or after joining all threads except one. Reviewed-by: DJ Delorie <dj@redhat.com>
* Linux: Perform rseq registration at C startup and thread creationMathieu Desnoyers2020-07-061-0/+1
| | | | | | | | | | | | | | | | | | | Register rseq TLS for each thread (including main), and unregister for each thread (excluding main). "rseq" stands for Restartable Sequences. See the rseq(2) man page proposed here: https://lkml.org/lkml/2018/9/19/647 Those are based on glibc master branch commit 3ee1e0ec5c. The rseq system call was merged into Linux 4.18. The TLS_STATIC_SURPLUS define is increased to leave additional room for dlopen'd initial-exec TLS, which keeps elf/tst-auditmany working. The increase (76 bytes) is larger than 32 bytes because it has not been increased in quite a while. The cost in terms of additional TLS storage is quite significant, but it will also obscure some initial-exec-related dlopen failures.
* New exp10f version without SVID compat wrapperAdhemerval Zanella2020-06-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | This patch changes the exp10f error handling semantics to only set errno according to POSIX rules. New symbol version is introduced at GLIBC_2.32. The old wrappers are kept for compat symbols. There are some outliers that need special handling: - ia64 provides an optimized implementation of exp10f that uses ia64 specific routines to set SVID compatibility. The new symbol version is aliased to the exp10f one. - m68k also provides an optimized implementation, and the new version uses it instead of the sysdeps/ieee754/flt32 one. - riscv and csky uses the generic template implementation that does not provide SVID support. For both cases a new exp10f version is not added, but rather the symbols version of the generic sysdeps/ieee754/flt32 is adjusted instead. Checked on aarch64-linux-gnu, x86_64-linux-gnu, i686-linux-gnu, powerpc64le-linux-gnu.
* nptl: Add pthread_attr_setsigmask_np, pthread_attr_getsigmask_npFlorian Weimer2020-06-021-0/+2
| | | | | Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
* nptl: Move pthread_gettattr_np into libcFlorian Weimer2020-05-202-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | This is part of the libpthread removal project: <https://sourceware.org/ml/libc-alpha/2019-10/msg00080.html> Use __getline instead of __getdelim to avoid a localplt failure. Likewise for __getrlimit/getrlimit. The abilist updates were performed by: git ls-files 'sysdeps/unix/sysv/linux/**/libc.abilist' \ | while read x ; do echo "GLIBC_2.32 pthread_getattr_np F" >> $x done python3 scripts/move-symbol-to-libc.py --only-linux pthread_getattr_np The private export of __pthread_getaffinity_np is no longer needed, but the hidden alias still necessary so that the symbol can be exported with versioned_symbol. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
* nptl: Move pthread_getaffinity_np into libcFlorian Weimer2020-05-202-2/+3
| | | | | | | | | | | | | | | | | This is part of the libpthread removal project: <https://sourceware.org/ml/libc-alpha/2019-10/msg00080.html> The abilist updates were performed by: git ls-files 'sysdeps/unix/sysv/linux/**/libc.abilist' \ | while read x ; do echo "GLIBC_2.32 pthread_getaffinity_np F" >> $x done python3 scripts/move-symbol-to-libc.py pthread_getaffinity_np Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
* nptl: Move pthread_attr_setaffinity_np into libcFlorian Weimer2020-05-202-2/+3
| | | | | | | | | | | | | | | | | | | | | This is part of the libpthread removal project: <https://sourceware.org/ml/libc-alpha/2019-10/msg00080.html> The symbol did not previously exist in libc, so a new GLIBC_2.32 symbol is needed, to get correct dependency for binaries which use the symbol but no longer link against libpthread. The abilist updates were performed by: git ls-files 'sysdeps/unix/sysv/linux/**/libc.abilist' \ | while read x ; do echo "GLIBC_2.32 pthread_attr_setaffinity_np F" >> $x done python3 scripts/move-symbol-to-libc.py pthread_attr_setaffinity_np Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
* linux: Remove assembly umount2 implementationAdhemerval Zanella2020-05-081-2/+0
| | | | | | | | | | Only alpha and ia64 do not support __NR_umount2 (defined as __NR_umount), but recent kernel fixes (74cd2184833f for ia64, and 12b57c5c70f39 for alpha) add the required alias. Checked with a build against all affected ABIs. Reviewed-by: Florian Weimer <fweimer@redhat.com>
* ia64: Remove sigprocmask/sigblock objects from libpthreadAdhemerval Zanella2020-04-211-2/+1
| | | | | | | | | | | | | It is required because __libc_unwind_longjmp (used on thread cancellation) calls __sigprocmask. Replace with a direct call. They are required because __libc_unwind_longjmp (used for thread cancellation) calls __sigprocmask. Replace this with a direct call. The sigblock function is not exported and is not used internally, so it can be removed. Checked on cross build for ia64-linux-gnu.
* nptl: Move pthread_sigmask implementation to libcAdhemerval Zanella2020-04-212-1/+2
| | | | | | | | | | | This is part of the libpthread removal project: <https://sourceware.org/ml/libc-alpha/2019-10/msg00080.html> A new symbol version is added on libc to force loading failure instead of lazy binding one for newly binaries with old loaders. Checked with a build against all affected ABIs.
* Update syscall lists for Linux 5.6.Joseph Myers2020-04-031-0/+2
| | | | | | | Linux 5.6 has new openat2 and pidfd_getfd syscalls. This patch adds them to syscall-names.list and regenerates the arch-syscall.h files. Tested with build-many-glibcs.py.
* ia64: Do not define __NR_semtimedop in <sysdep.h>Florian Weimer2020-03-031-6/+0
| | | | | | The definition is always available from the built-in system call table. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* nptl: Move pthread_setschedparam implementation into libcFlorian Weimer2020-02-201-1/+0
| | | | | | | | This is part of the libpthread removal project: <https://sourceware.org/ml/libc-alpha/2019-10/msg00080.html> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* nptl: Move pthread_getschedparam implementation into libcFlorian Weimer2020-02-201-1/+0
| | | | | | | | This is part of the libpthread removal project: <https://sourceware.org/ml/libc-alpha/2019-10/msg00080.html> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* nptl: Move pthread_cond_init implementation into libcFlorian Weimer2020-02-201-2/+0
| | | | | | | | | | | It is necessary to export __pthread_cond_init from libc because the C11 condition variable needs it and is still left in libpthread. This is part of the libpthread removal project: <https://sourceware.org/ml/libc-alpha/2019-10/msg00080.html> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* nptl: Move pthread_cond_destroy implementation into libcFlorian Weimer2020-02-201-2/+0
| | | | | | | | | | | It is necessary to export __pthread_cond_destroy from libc because the C11 condition variable needs it and is still left in libpthread. This is part of the libpthread removal project: <https://sourceware.org/ml/libc-alpha/2019-10/msg00080.html> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* nptl: Move pthread_condattr_init implementation into libcFlorian Weimer2020-02-201-1/+0
| | | | | | | | This is part of the libpthread removal project: <https://sourceware.org/ml/libc-alpha/2019-10/msg00080.html> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* nptl: Move pthread_condattr_destroy implementation into libcFlorian Weimer2020-02-201-1/+0
| | | | | | | | This is part of the libpthread removal project: <https://sourceware.org/ml/libc-alpha/2019-10/msg00080.html> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* nptl: Move pthread_attr_setscope implementation into libcFlorian Weimer2020-02-201-1/+0
| | | | | | | | This is part of the libpthread removal project: <https://sourceware.org/ml/libc-alpha/2019-10/msg00080.html> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* nptl: Move pthread_attr_getscope implementation into libcFlorian Weimer2020-02-201-1/+0
| | | | | | | | This is part of the libpthread removal project: <https://sourceware.org/ml/libc-alpha/2019-10/msg00080.html> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* nptl: Move pthread_attr_setschedpolicy implementation into libcFlorian Weimer2020-02-201-1/+0
| | | | | | | | This is part of the libpthread removal project: <https://sourceware.org/ml/libc-alpha/2019-10/msg00080.html> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* nptl: Move pthread_attr_getschedpolicy implementation into libcFlorian Weimer2020-02-201-1/+0
| | | | | | | | This is part of the libpthread removal project: <https://sourceware.org/ml/libc-alpha/2019-10/msg00080.html> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* ld.so: Do not export free/calloc/malloc/realloc functions [BZ #25486]Florian Weimer2020-02-152-10/+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>
* linux: Remove INTERNAL_SYSCALL_DECLAdhemerval Zanella2020-02-142-6/+5
| | | | | | | | | | | With all Linux ABIs using the expected Linux kABI to indicate syscalls errors, the INTERNAL_SYSCALL_DECL is an empty declaration on all ports. This patch removes the 'err' argument on INTERNAL_SYSCALL* macro and remove the INTERNAL_SYSCALL_DECL usage. Checked with a build against all affected ABIs.
* linux: Consolidate INLINE_SYSCALLAdhemerval Zanella2020-02-141-20/+1
| | | | | | | | | | | With all Linux ABIs using the expected Linux kABI to indicate syscalls errors, there is no need to replicate the INLINE_SYSCALL. The generic Linux sysdep.h includes errno.h even for !__ASSEMBLER__, which is ok now and it allows cleanup some archaic code that assume otherwise. Checked with a build against all affected ABIs.
* ia64: Use Linux kABI for syscall returnAdhemerval Zanella2020-02-141-34/+24
| | | | | | | | | | It changes the ia64 INTERNAL_SYSCALL_NCS macro to return a negative value instead of the 'r10' register value on the 'err' macro argument. The macro INTERNAL_SYSCALL_DECL is no longer required, and the INTERNAL_SYSCALL_ERROR_P macro follows the other Linux kABIs. Checked on ia64-linux-gnu.
* Linux: Remove pread/pread64, pwrite/pwrite64 kludges from <sysdep.h>Florian Weimer2020-01-021-10/+0
| | | | | | Since the switch away from auto-generated wrappers for these system calls, the kludge is already included in the C source file of the system call wrapper.
* Linux: Use system call tables during buildFlorian Weimer2020-01-025-7/+7
| | | | | | | | | | | | | | | | | | | | | | | Use <arch-syscall.h> instead of <asm/unistd.h> to obtain the system call numbers. A few direct includes of <asm/unistd.h> need to be removed (if the system call numbers are already provided indirectly by <sysdep.h>) or replaced with <sys/syscall.h>. Current Linux headers for alpha define the required system call names, so most of the _NR_* hacks are no longer needed. For the 32-bit arm architecture, eliminate the INTERNAL_SYSCALL_ARM macro, now that we have regular system call names for cacheflush and set_tls. There are more such cleanup opportunities for other architectures, but these cleanups are required to avoid macro redefinition errors during the build. For ia64, it is desirable to use <asm/break.h> directly to obtain the break number for system calls (which is not a system call number itself). This requires replacing __BREAK_SYSCALL with __IA64_BREAK_SYSCALL because the former is defined as an alias in <asm/unistd.h>, but not in <asm/break.h>. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>