summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibC/arch
AgeCommit message (Collapse)Author
2021-08-28CMake: Let `Meta/serenity.sh run aarch64` make it past cmakeNico Weber
This adds just enough scaffolding to make cmake succeed. The build falls over immediately.
2021-08-26LibC: Fix sigsetjmp on x86_64Jean-Baptiste Boric
Registers were clobbered, offset values into __jmp_buf were wrong...
2021-08-26LibC: Fix sigsetjmp on i686Jean-Baptiste Boric
Calling sigprocmask() through the PLT requires setting the ebx register to the address of the global offset table, otherwise chaos ensues. Also the value of the ecx register was assumed to be preserved across that function call despite the fact that it is caller-saved in the x86 calling convention.
2021-08-18Meta+LibC: Don't allow text relocations in SerenityOS librariesDaniel Bertalan
The `-z,text` linker flag causes the linker to reject shared libraries and PIE executables that have textrels. Our code mostly did not use these except in one place in LibC, which is changed in this commit. This makes GNU ld match LLD's behavior, which has this option enabled by default. TEXTRELs pose a security risk, as performing these relocations require executable pages to be written to by the dynamic linker. This can significantly weaken W^X hardening mitigations. Note that after this change, TEXTRELs can still be used in ports, as the dynamic loader code is not changed. There are also uses of it in the kernel, removing which are outside the scope of this PR. To allow those, `-z,notext` is added.
2021-08-18LibC: Fix sigsetjmp and siglongjmpJean-Baptiste Boric
2021-07-14LibC: Use our implementation of `crti.o` and `crtn.o`Daniel Bertalan
We have had these for quite a while, but we didn't compile them, and used GCC's version instead. Clang does not come with these, so we have to provide our own implementation. Our implementation follows what `musl` and `FreeBSD` do, so this should work fine, even if documentation can hardly be found for them.
2021-04-22Everything: Move to SPDX license identifiers in all files.Brian Gianforcaro
SPDX License Identifiers are a more compact / standardized way of representing file license information. See: https://spdx.dev/resources/use/#identifiers This was done with the `ambr` search and replace tool. ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-02-25LibC: Add x86_64 implementation of setjmp() and longjmp()Andreas Kling