aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/musl/src
AgeCommit message (Collapse)Author
2025-10-12musl: avoid r0 as address register in s390x __tls_get_offsetAlex Rønne Petersen
https://www.openwall.com/lists/musl/2025/10/12/4 See also 7b92d5f4052be651e9bc5cd4ad78a69ccbee865d...
2025-09-28musl: delete dead __restore and __restore_rt functions for hexagon, ↵Alex Rønne Petersen
loongarch64, riscv32, riscv64 https://www.openwall.com/lists/musl/2025/09/28/2
2025-09-27musl: add missing fenv C dummy functions for loongarch64-linux-muslsfAlex Rønne Petersen
https://www.openwall.com/lists/musl/2025/09/27/1 closes #25367
2025-08-28libc: delete superfluous c and assembly trunc implementationsDavid Senoner
2025-08-28libc: delete superfluous c and assembly ceil implementationDavid Senoner
2025-08-27libc: remove c floorl implementaions forgotten in #24335David Senoner
2025-08-27Remove memcmp and memset from bundled musl and wasiYefeng Li
2025-07-04delete superfluous assembly libc floor implementationsDavid Senoner
2025-07-04delete superfluous libc floor implementationsDavid Senoner
2025-05-30libc: replace musl's trigonometric functions with compiler_rt'sKoki Ueha
- sin - sinf - cos - cosf - sincos - sincosf - tan - tanf
2025-05-21libc: implement common `abs` for various integer sizes (#23893)David
* libc: implement common `abs` for various integer sizes * libc: move imaxabs to inttypes.zig and don't use cInclude * libc: delete `fabs` c implementations because already implemented in compiler_rt * libc: export functions depending on the target libc Previously all the functions that were exported were handled equally, though some may exist and some not inside the same file. Moving the checks inside the file allows handling different functions differently * remove empty ifs in inttypes Co-authored-by: Alex Rønne Petersen <alex@alexrp.com> * remove empty ifs in stdlib Co-authored-by: Alex Rønne Petersen <alex@alexrp.com> * libc: use `@abs` for the absolute value calculation --------- Co-authored-by: Alex Rønne Petersen <alex@alexrp.com>
2025-05-15Introduce common `strcasecmp` and `strncasecmp` implementations (#23840)Bryson Miller
2025-05-10Introduce common `bzero` libc implementation. (#23812)David
* Introduce common `bzero` libc implementation. * Update test name according to review Co-authored-by: Linus Groh <mail@linusgroh.de> * address code review - import common implementation when musl or wasi is included - don't use `c_builtins`, use `@memset` * bzero calling conv to .c * Apply review Co-authored-by: Veikka Tuominen <git@vexu.eu> --------- Co-authored-by: Linus Groh <mail@linusgroh.de> Co-authored-by: Veikka Tuominen <git@vexu.eu>
2025-04-12Merge pull request #23529 from alexrp/2879-groundworkAlex Rønne Petersen
Introduce libzigc for libc function implementations in Zig
2025-04-11Introduce libzigc for libc function implementations in Zig.Alex Rønne Petersen
This lays the groundwork for #2879. This library will be built and linked when a static libc is going to be linked into the compilation. Currently, that means musl, wasi-libc, and MinGW-w64. As a demonstration, this commit removes the musl C code for a few string functions and implements them in libzigc. This means that those libzigc functions are now load-bearing for musl and wasi-libc. Note that if a function has an implementation in compiler-rt already, libzigc should not implement it. Instead, as we recently did for memcpy/memmove, we should delete the libc copy and rely on the compiler-rt implementation. I repurposed the existing "universal libc" code to do this. That code hadn't seen development beyond basic string functions in years, and was only usable-ish on freestanding. I think that if we want to seriously pursue the idea of Zig providing a freestanding libc, we should do so only after defining clear goals (and non-goals) for it. See also #22240 for a similar case.
2025-04-11musl: Add hexagon-linux-musl sources.Alex Rønne Petersen
This is from Qualcomm's fork: https://github.com/quic/musl I maintain a fork of musl where I rebase Qualcomm's changes on top of the latest musl release, which I then use as the basis for musl updates in Zig. My fork can be found here: https://github.com/alexrp/musl/tree/hexagon
2025-02-22musl: Fix typo in m68k clone() assembly.Alex Rønne Petersen
2025-02-14musl: Apply Rich Felker's CVE-2025-26519 mitigation patches.Alex Rønne Petersen
https://www.openwall.com/lists/oss-security/2025/02/13/2 Closes #22883.
2025-02-08musl: Align the stack pointer given to clone() on riscv.Alex Rønne Petersen
2025-01-24musl: Manually inline __tls_get_addr into s390x __tls_get_offset.Alex Rønne Petersen
See these mailing list threads: * https://www.openwall.com/lists/musl/2024/11/23/3 * https://www.openwall.com/lists/musl/2025/01/24/1 This supplants cc73d7ad749df8d53da442faa2e7af5d69357b33.
2025-01-21libc: Remove a bunch of code for architectures we don't actually support.Alex Rønne Petersen
Namely: * alpha * hppa * ia64 * microblaze * nios2 * or1k * s390 * sh
2025-01-17remove memcpy and memmove from bundled libcsAndrew Kelley
These are provided instead by compiler_rt. Part of #2879
2024-12-11musl: Add unwinding protection in clone() implementations.Alex Rønne Petersen
Whatever was in the frame pointer register prior to clone() will no longer be valid in the child process, so zero it to protect FP-based unwinders. This is just an extension of what was already done for i386 and x86_64. Only applied to architectures where the _start() code also zeroes the frame pointer.
2024-11-23musl: Mark __tls_get_addr as hidden before invoking it on s390x.Alex Rønne Petersen
https://www.openwall.com/lists/musl/2024/11/23/3
2024-11-23musl: Mark __restore(_rt) functions hidden on riscv.Alex Rønne Petersen
https://www.openwall.com/lists/musl/2024/11/23/2
2024-06-04update musl source files to v1.2.5Andrew Kelley
adds loongarch64 and riscv32
2023-06-20musl: update src files to v1.2.4Andrew Kelley
2022-05-04musl: update to 1.2.3Isaac Freund
This was a bit trickier than it should be due to symbol conflicts with zig's compiler-rt implementation. We attempt to use weak linkage in our compiler-rt, but this does not seem to be working in all cases. I manually disabled export of the problematic compiler-rt math functions in order to cross compile musl's libc.so for all targets as input to `tools/gen_stubs.zig`. Other than that, this update went fairly smoothly. Quite a few additional symbols were added to the blacklist in `tools/gen_stubs.zig` due to recent reorganization of zig's compiler-rt.
2021-02-10musl: update to 1.2.2Isaac Freund
2020-11-06update musl sources to 1.2.1Andrew Kelley
2020-03-12update musl src files to v1.2.0Andrew Kelley
2019-10-17update musl src to v1.1.24Andrew Kelley
2019-09-27Backport patch for Musl libcLemonBoy
Allows musl to compile for mipsel targets. https://www.openwall.com/lists/musl/2019/09/27/1/2
2019-09-25musl [PATCH] arm: fix setjmp and longjmp asm for armv8-aAndrew Kelley
From: Szabolcs Nagy <szabolcs.nagy@arm.com> armv8 removed the coprocessor instructions other than cp14, so on an armv8 system the related hwcaps should never be set. new llvm complains about the use of coprocessor instructions in armv8-a mode (even though they are never executed at runtime), so ifdef them out when musl is built for armv8. <dalias> i think the patch looks ok
2019-07-16update bundled musl source to 1.1.23Andrew Kelley
2019-07-15move lib dirs to lib subdirAndrew Kelley
also start prefering NtDll API. so far: * NtQueryInformationFile * NtClose adds a performance workaround for windows unicode conversion. but that should probably be removed before merging