aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/arc
AgeCommit message (Collapse)Author
2021-08-18Remove sysdeps/*/tls-macros.hFangrui Song
They provide TLS_GD/TLS_LD/TLS_IE/TLS_IE macros for TLS testing. Now that we have migrated to __thread and tls_model attributes, these macros are unused and the tls-macros.h files can retire. Reviewed-by: Szabolcs Nagy <szabolcs.nagy@arm.com>
2021-07-21ARC: elf: make type safeVineet Gupta
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
2021-07-21ARC: fp: (micro)optimize FPU_STATUS read by eliding FWE bit clearingVineet Gupta
Any FPU_STATUS write needs setting the FWE bit (31) whcih just provides a "control signal" to enable explicit write (vs. the side-effect of FPU instructions). However this bit is RAZ and write-only, thus effectively never stored in FPU_STATUS register. Thus when reading the register there is no need to clear it. This shaves off a BCLR instruction from the fe*exceptino family of functions and while no big deal still makes sense to do. This came up when debugging a race in math/test-fenv-tls [1] [1]: https://github.com/foss-for-synopsys-dwc-arc-processors/linux/issues/54 Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
2021-04-14ARC: Update ulpsVineet Gupta
Needed after 43576de04afc6 Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
2021-02-25Reduce the statically linked startup code [BZ #23323]Florian Weimer
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.
2021-01-17ARC: nofpu: Regenerate ulpsVineet Gupta
2021-01-08ARC: Regenerate ulpsVineet Gupta
Reinstate pass for FAIL: math/test-double-cosh FAIL: math/test-double-sinh FAIL: math/test-float32x-cosh FAIL: math/test-float32x-sinh FAIL: math/test-float64-cosh FAIL: math/test-float64-sinh FAIL: math/test-ldouble-cosh FAIL: math/test-ldouble-sinh
2021-01-02Update copyright dates with scripts/update-copyrightsPaul Eggert
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
2020-11-16nptl: Move stack list variables into _rtld_globalFlorian Weimer
Now __thread_gscope_wait (the function behind THREAD_GSCOPE_WAIT, formerly __wait_lookup_done) can be implemented directly in ld.so, eliminating the unprotected GL (dl_wait_lookup_done) function pointer. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2020-10-02aarch64: enforce >=64K guard size [BZ #26691]Szabolcs Nagy
There are several compiler implementations that allow large stack allocations to jump over the guard page at the end of the stack and corrupt memory beyond that. See CVE-2017-1000364. Compilers can emit code to probe the stack such that the guard page cannot be skipped, but on aarch64 the probe interval is 64K by default instead of the minimum supported page size (4K). This patch enforces at least 64K guard on aarch64 unless the guard is disabled by setting its size to 0. For backward compatibility reasons the increased guard is not reported, so it is only observable by exhausting the address space or parsing /proc/self/maps on linux. On other targets the patch has no effect. If the stack probe interval is larger than a page size on a target then ARCH_MIN_GUARD_SIZE can be defined to get large enough stack guard on libc allocated stacks. The patch does not affect threads with user allocated stacks. Fixes bug 26691.
2020-07-10ARC: Build InfrastructureVineet Gupta
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2020-07-10ARC: ABI listsVineet Gupta
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2020-07-10ARC: Linux ABIVineet Gupta
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2020-07-10ARC: hardware floating point supportVineet Gupta
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2020-07-10ARC: math soft float supportVineet Gupta
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2020-07-10ARC: Atomics and Locking primitivesVineet Gupta
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2020-07-10ARC: Thread Local Storage supportVineet Gupta
This includes all 4 TLS addressing models Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2020-07-10ARC: startup and dynamic linking codeVineet Gupta
Code for C runtime startup and dynamic loading including PLT layout. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2020-07-10ARC: ABI ImplementationVineet Gupta
This code deals with the ARC ABI. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>