summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-05-15fix kernel_stat64 definitionMax Filippov
The commit 74ca8d6f5d2e ("remove UCLIBC_HAS_LFS") removed conditional compilation dependent on __UCLIBC_HAS_LFS__, assuming it to be always defined, but removed the wrong branch in the definition of kernel_stat64. Fix kernel_stat64 definition to be stat64. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Tested-by: Chris Packham <judge.packham@gmail.com>
2024-05-14malloc/memalign: avoid integer overflowMax Filippov
Check that the size passed to memalign() is not greater than PTRDIFF_MAX before adjusting it, otherwise it may wrap around in the adjustment. This fixes gcc testsuite test gcc.dg/torture/pr60092.c Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2024-05-11m68k: fix noMMU ELF compile with gcc 14.xWaldemar Brodkorb
2024-05-10csky: allow time64Waldemar Brodkorb
2024-05-09ldso: arm: fix build with gcc-14Max Filippov
With gcc-14 warnings caused by type mismatches turn to errors: - got_entry is a pointer in the _dl_linux_resolver(), but the function _dl_linux_resolver() returns unsigned long. Convert got_entry to unsigned long when returning - first argument of _dl_funcdesc_for() is a pointer, but (symbol_addr + reloc_value) is unsigned long in the _dl_do_reloc(). Convert function argument to (void *) - struct funcdesc_value::entry_point is a pointer, but DL_RELOC_ADDR returns ElfW(Addr). Convert DL_RELOC_ADDR result to (void *) before assigning to funcdesc_value::entry_point Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2024-05-09ldso: FDPIC: fix type mismatchesMax Filippov
With gcc-14 warnings caused by type mismatches turn to errors: - (void **) needs explicit conversion operator to become struct funcdesc_value **entry - both subexpressions of the ternary operator must be pointers - %p should be used instead of %x to print a pointer Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2024-05-09iconv: fix type mismatchesMax Filippov
With gcc-14 warnings caused by type mismatches turn to errors: - iconv_t is not a pointer type, convert the result directly to iconv_t in combine_to_from() - unsigned int is not the same as wchar_t, use temporary wchar_t wc as an argument for utf8dec_wchar() Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2024-05-08sparc64: Fix incorrect sigreturn stub function implementationWaldemar Brodkorb
2024-05-08futimesat: add missing headerWaldemar Brodkorb
2024-05-01bump version for 1.0.48 releasev1.0.48Waldemar Brodkorb
2024-04-30sparc: Fix incorrect sigreturn stub function implementation.Dmitry Chestnykh
This function haven't have prologue/epilogue/cfi directives etc. Signed-off-by: Dmitry Chestnykh <dm.chestnykh@gmail.com>
2024-04-30Define __USE_TIME_BITS64 when it is necessary.Dmitry Chestnykh
Glibc and musl both defines this macro. Glibc defines it for 64-bit time_t on 32-bit arch and for 64-bit architectures. Signed-off-by: Dmitry Chestnykh <dm.chestnykh@gmail.com>
2024-04-24Makerules: fix out-of-tree build error "Argument list too long"Max Filippov
Make rule that announces and makes static libc archive can generate command line that is too long when a full path O= option is used. That breaks the build with the following message: make: /bin/sh: Argument list too long Use make $(file) construct to generate file list file and use that file as $(AR) argument instead. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2024-04-24fix out-of-tree build with UCLIBC_HAS_CONTEXT_FUNCSMax Filippov
When building libc out-of-tree *context functions cannot find generated header ucontext_i.h: libc/sysdeps/linux/xtensa/setcontext.S:19:10: fatal error: ucontext_i.h: No such file or directory Fix that by adding include path to the build directory with that file to the compiler flags. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2024-04-21x86: Add vDSO support.Dmitry Chestnykh
Signed-off-by: Dmitry Chestnykh <dm.chestnykh@gmail.com>
2024-04-20x86: Fix __libc_sigaction implementation.Dmitry Chestnykh
For x86 we have to copy only mask, handler and flags. We haven't set SA_RESTORER bit in sa_flags anyway. This patch fixes multiple test failures on x86. Also we have to build uClibc with FP for x86 because without FP NPTL and libgcc code cannot properly unwind the stack during asynchronous cancellation of system calls. Signed-off-by: Dmitry Chestnykh <dm.chestnykh@gmail.com>
2024-04-20remove shared FLAT support from menuconfig, not supported by Linux kernel ↵Waldemar Brodkorb
any longer
2024-04-20Switch x86 NPTL impl to generic C code.Dmitry Chestnykh
The asm code has high maintainance cost. The cost is extremely high if we take into consideration time64 implementation which implies operating with 64bit numbers on 32bit system. Also glibc uses mainly C in NPTL code. Signed-off-by: Dmitry Chestnykh <dm.chestnykh@gmail.com>
2024-04-18aarch64: Apply relocations to use TLS GD access model.Dmitry Chestnykh
In aarch64 when the general dynamic access model is used for tls data the linker emits two dynamic relocs (R_AARCH64_TLS_DTPMOD(64) and R_AARCH64_TLS_DTPREL(64)) that must be applied by ld.so during object loading. Signed-off-by: Dmitry Chestnykh <dm.chestnykh@gmail.com>
2024-04-18Add vDSO support for aarch64.Dmitry Chestnykh
Signed-off-by: Dmitry Chestnykh <dm.chestnykh@gmail.com>
2024-04-18Generalize vDSO code.Dmitry Chestnykh
- Add macroses for vDSO functions names because in some architectures these names differ from the default ones. - Add header guards in dl-syscalls.h . Signed-off-by: Dmitry Chestnykh <dm.chestnykh@gmail.com>
2024-04-18Fix vDSO support for all supported architectures.Dmitry Chestnykh
- Cleanup dl-vdso.c code. - Pass `void *` as first arg to `load_vdso()`, using 32-bit type is completely wrong on 64bit architectures. - Split libc code and vDSO-related code. Move arch-specific implementations into separate files. The performance improvement is for example 50-60 times on ARMv7 and about 4 times on x86_64. Signed-off-by: Dmitry Chestnykh <dm.chestnykh@gmail.com>
2024-04-14tree: Remove ^LPetr Vorel
Remove ^L (0x0c) chars from source code. Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
2024-04-14libuargp: restrict compatibility macros in argp.h onlyYao Zi
Macros __attribute__, __format__ and __printf__ are defined in argp.h for compatibility with ANSI and old gccs. But leaving them effective out of the scope of the header may break applications relying on these compiler attributes even with __STRICT_ANSI__ defined. So undef the macros after using. Signed-off-by: Yao Zi <ziyao@disroot.org> Reviewed-by: Petr Vorel <petr.vorel@gmail.com>
2024-04-14riscv32: allow ELF PIE noMMU buildWaldemar Brodkorb
2024-04-13Provide fixups for riscv32.Dmitry Chestnykh
- Use TIME64 by default for rv32, usage of 32-bit time leads to a lot of incompatibilities with linux kernel 6.6.x and later versions. - Add some other corrections to use proper system calls on riscv32 platform. Signed-off-by: Dmitry Chestnykh <dm.chestnykh@gmail.com>
2024-04-01riscv64: partially revert cb9d1f53717dd67892ba943626f3d1b46f3e760b, fixes no ↵Waldemar Brodkorb
MMU ELF
2024-03-29riscv32: implement linuxthreads, from sorearWaldemar Brodkorb
2024-03-28libm: fix nexttoward failures, fixed by sorearWaldemar Brodkorb
2024-03-28riscv64: implement Linuxthreads, from sorearWaldemar Brodkorb
2024-03-27bump version for 1.0.47 releasev1.0.47Waldemar Brodkorb
2024-03-27riscv: add __UCLIBC_ABORT_INSTRUCTION__, suggested by sorearWaldemar Brodkorb
2024-03-22riscv: fix pread64/pwrite64 users like git, suggested by sorearWaldemar Brodkorb
2024-03-20riscv64: enable CTORS, fixes C++ applications, found by sorearWaldemar Brodkorb
2024-03-20riscv32: sync with riscv64Waldemar Brodkorb
2024-03-19riscv64: add atomic.h, fixes tst-cond16, suggested by sorearWaldemar Brodkorb
2024-03-19riscv64: clone behaves like on aarch64, fixes tst-basic3, reported by sorearWaldemar Brodkorb
2024-03-19riscv64: sync with glibc clone.SWaldemar Brodkorb
2024-03-19riscv64: page size is 4096, reported by sorearWaldemar Brodkorb
2024-03-19riscv64: sync with glibc, fix all TLS errors in uClibc-ng-testWaldemar Brodkorb
2024-03-12add explicit_bzero from muslWaldemar Brodkorb
2024-03-12add reallocarray from muslWaldemar Brodkorb
2024-03-07libpthread/linuxthreads: add missing string.h include in condvar.cMarcus Haehnel
Quelches a compiler warning by that memset was implicitly declared.
2024-03-07libpthread: Remove no longer valid attribute_unusedMarcus Haehnel
The variable is used since 04a676f3c8d2443499f27612f69ee88e12089e61.
2024-03-04bump version for 1.0.46 releasev1.0.46Waldemar Brodkorb
2024-03-04update MAINTAINERSWaldemar Brodkorb
2024-03-04libm/w_j0f.c: Call correct ieee754 functionMarcus Haehnel
The j0f implementation should, like the other float implementations, call the __ieee754_y0 variant for doubles. A float variant is not declared and leads to a compile error on c99 builds.
2024-03-03x86: enable time64Waldemar Brodkorb
2024-03-03m68k: enable time64Waldemar Brodkorb
2024-03-03superh: enable time64Waldemar Brodkorb