summaryrefslogtreecommitdiff
path: root/extra
AgeCommit message (Collapse)Author
2022-09-07Added support for creation of Static Position-Independent Executables (PIE) ↵linted
on mips Updated config to allow compilation of rcrt1.o for mips and modified it's crt1.S to perform relocates in __start. The mips architecture performs relocations differently then most other architectures. reloc_static_pie was rewritten, taking code from dl-startup.c, in order to perfrom the additional relocations. Modifications were made to mips' dl-startup.h to allow for the use of contained macros without including _start definition. Signed-off-by: linted <linted@users.noreply.github.com>
2022-08-11fix ARCH_NATIVE_BIT for aarch64Waldemar Brodkorb
Patch suggested by Thomas Petazzoni and tested by me. Reported-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2022-08-08Added support for creation of Static Position-Independent Executables (PIE) ↵linted
on aarch64 Updated config to allow compilation of rcrt1.o for aarch64 and modified it's crt1.S to relocate dynamic section prior to __uClibc_main. Disabled stack protector when compiling reloc_static_pie.c to avoid TLS access prior to it being setup. Signed-off-by: linted <linted@users.noreply.github.com>
2022-07-26Added support for creation of Static Position-Independent Executables (PIE) ↵linted
on i386, x86_64, and arm. This patch adds the generation of rcrt1.o which is used by gcc when compiling with the --static-pie flag. rcrt1.o differs from crt1.o and Scrt1.o in that it the executable has a dynamic section but no relocations have been performed prior to _start being called. crt1.o assumes there to be no dynamic relocations, and Scrt1.o has all relocations performed prior to execution by lsdo. The new reloc_static_pie function handles parsing the dynamic section, and performing the relocations in a architecture agnostic method. It also sets _dl_load_base which is used when initalizing TLS to ensure loading from the proper location. This allows for easier porting of static-pie support to additional architectures as only modifications to crt1.S to find the load address are required. Signed-off-by: linted <linted@users.noreply.github.com>
2022-06-20xtensa: implement user context manipulation functionsMax Filippov
Implement getcontext, makecontext, setcontext and swapcontext. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2022-05-12DnsLookup: Configurable dnsQueryId generation including randomhanishkvc
Dns lookup logic has been updated to provide a configurable compile time selection of dns query id generation logics, including random, where possible, instead of the previous simple counter mode. This should make dns poison attempts more difficult. The uclibc developers wish to thank the white hat teams which alerted the community about the possible weakness in the dns path, given the increased resources with adversaries today. Given that embedded systems may or may not have sources for trying to generate random numbers, and also to try and keep the load on the system low, by default it uses the standard random prng based logic to indirectly generate the ids. However if either urandom or else if realtime clock is available on the target, then the same is used to reseed the prng periodically in a slightly non deterministic manner. Also additional transform (one way where possible) is used to avoid directly exposing the internal random sequence. The dns lookup logic maintains its own state wrt the random prng functions, so that other users of the library's random prng are not affected wrt their operations with the prng. Note to Platform developers: If you want to change from the default prngplus based logic, to one of the other logics provided, then during compile/config time you can switch to one of these additional choices wrt dns query id generation, by using make config and companions. If your platform doesnt support urandom nor a realtime clock backed by a source with sufficient resolution, and or for some reason if you want to revert to previous simple counter, rather than the transformed random prng plus logic, you can force the same at compile time by selecting SimpleCounter mode. If you want to increase the randomness of the generated ids, and dont mind the increased system load and latency then you could select the Urandom mode during config. Do note that it will be dipping into the entropy pool maintained by ur system. If your target has a system realtime clock available and exposed to user space, and inturn if you want to keep the underlying logic simple, you could try using the clock option from the config. However do note that the clock should have nanosecond resolution to help generate ids which are plausibly random. Also improvements to processor and or io performance can affect this. Wrt the URandom and Clock modes, if there is a failure with generation of the next random value, the logic tries to fallback to simple counter mode. If you want to change the underlying logic to make it more random and or more simple, look at dnsrand_setup and dnsrand_next. Signed-off-by: hanishkvc <hanishkvc@gmail.com>
2022-01-21nds32: sync with binutils 2.37, gcc 11.2 and linux 5.10.93 changesWaldemar Brodkorb
2021-01-08extra/locale: fix gen_wc8bit diagnostic outputMax Filippov
Diagnostic for missing UTF locale is printed to stdout instead of stderr, fix that. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2020-12-24GNU hash style support disable for MIPSWaldemar Brodkorb
2020-10-02kvx: add support for kvx arch to uClibc-ngYann Sionneau
This commit adds support for Kalray VLIW family (kvx) Kalray kv3 core is embedded in Kalray Coolidge SoC. This core which is the third of the KV family has the following features: 32/64 bits execution mode 6-issue VLIW architecture 64 x 64bits general purpose registers SIMD instructions little-endian In order to build a usable toolchain, build scripts are provided at the following address: https://github.com/kalray/build-scripts. Kalray uses FOSS which is available at https://github.com/kalray This includes Linux kernel, uClibc-ng, gcc, binutils, etc. Signed-off-by: Clément Léger <cleger@kalray.eu> Signed-off-by: Guillaume Thouvenin <gthouvenin@kalray.eu> Signed-off-by: Laurent Thevenoux <lthevenoux@kalray.eu> Signed-off-by: Marc Poulhies <mpoulhies@kalray.eu> Signed-off-by: Marius Gligor <mgligor@kalray.eu> Signed-off-by: Yann Sionneau <ysionneau@kalray.eu>
2020-09-21Support b64_ntop(), b64_pton() (bsd-compat)Waldemar Brodkorb
Signed-off-by: akater <nuclearspace@gmail.com>
2020-02-07aarch64: always use MMUVladimir Murzin
Only MMU variant is supported. Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
2020-02-03csky: add statx conditionalsWaldemar Brodkorb
Similar to glibc commit https://sourceware.org/git/?p=glibc.git;a=commit;h=6bbfc5c09fc5b5e3d4a0cddbbd4e2e457767dae7 we need to handle Linux kernel change, which removed stat64 family from default syscall set. Signed-off-by: Waldemar Brodkorb <wbx@openadk.org> Signed-off-by: Waldemar Brodkorb <wbrodkorb@conet.de>
2019-11-08riscv64: implement NPTL/TLSWaldemar Brodkorb
basically from or1k port of uClibc-ng, with fixes for structures in pthreadtypes.h from 64 bit architectures. 18 testsuite failures counted.
2019-11-01riscv64: add shared library supportWaldemar Brodkorb
2018-08-10enable NPTL on TARGET_armChristophe Lyon
* extra/Configs/Config.in: enable UCLIBC_HAS_THREADS_NATIVE on TARGET_arm. Signed-off-by: Christophe Lyon <christophe.lyon@st.com>
2018-08-10Allow to select FDPIC ELF for arm architectureChristophe Lyon
* extra/Configs/Config.in.arch: Add TARGET_arm to the target list for UCLIBC_FORMAT_FDPIC_ELF. Signed-off-by: Mickaël Guêné <mickael.guene@st.com> Signed-off-by: Christophe Lyon <christophe.lyon@st.com>
2018-06-10risc-v: initial 64 bit port, static only (no TLS/NPTL)Waldemar Brodkorb
Only a simple hello world is tested in qemu system emulation.
2018-04-17libdl: remove LDSO_NO_CLEANUPWaldemar Brodkorb
2018-03-12tile: add basic support for tilegxWaldemar Brodkorb
This adds basic support for tile architecture. Only static binaries, no ld.so or threading support. Tested with qemu-tilegx only.
2018-03-04fenv: only allow for ppc e500Waldemar Brodkorb
2018-01-31remove arc4random (rc4 based)Waldemar Brodkorb
OpenBSD arc4random is using chacha20 cipher algorithm for a long time. This copy is still based on deprecated rc4 cipher algorithm. We could either update the arc4random.c or drop it. Drop it. Users should better use libbsd when using arc4random interface. Musl/glibc does not have arc4random either.
2018-01-02remove COMPAT_ATEXITWaldemar Brodkorb
2017-12-31m68k: add NPTL/TLS supportWaldemar Brodkorb
Port over NPTL/TLS support from GNU C Library. In the first step only the slower syscall is used for TLS access. The uClibc-ng testsuite shows 79 errors, so their is room for bugfixes and improvements.
2017-12-26csky: remove -mcpu and -mhard-float from configGuo Ren
Pass the -mcpu and -mhard-float from UCLIBC_EXTRA_CFLAGS instead. Signed-off-by: Guo Ren <ren_guo@c-sky.com>
2017-12-03fenv: only allow to enable for supported architecturesWaldemar Brodkorb
2017-11-19csky: port to uclibc-ngGuo Ren
Follow the steps to build c-sky uclibc linux system: 1. git clone https://github.com/c-sky/buildroot.git 2. cd buildroot 3. make qemu_csky_ck810_uclibc_defconfig 4. make Follow the buildroot/board/qemu/csky/readme.txt to run. This buildroot toolchain is pre-build, But you can rebuild the c-sky uclibc-ng alone and install it to the buildroot sysroot manually. We'll try our best to improve the uclibc-ng continuously. Signed-off-by: Guo Ren <ren_guo@c-sky.com>
2017-08-20arc: Merge ARCv2 string routines in generic ARC .S filesAlexey Brodkin
In cde74b83f9b2 "ARC: remove special CFLAGS/LDFLAGS handling" we got rid of CONFIG_ARC_CPU_HS which was used to select ARCv2-specific implementation of optimized string routines. So now ARCv2-tuned memset/memcpy/strcmp are not used, instead those for ARC700 used for both ARC700 and ARCHS. Without uClibc config option we may only tell which CPU type we're targeting by built-in defines of GCC. I.e. no more conditional file inclusion in Makefiles. That leaves us only one option - merge both implementations in 1 file and use ifdefs. Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
2017-08-20locale: use a better fallbackWaldemar Brodkorb
Ensure to always allow a build and fallback to C.UTF-8 and even C. Signed-off-by: Eugene Yudin <e.yudin@ndmsystems.com>
2017-07-28fix tolower and localesEugene Yudin
The function towlower doesn't work with locales different from C. Issue was introduced in commit: 8cde3a9bf2856dcb9a759dec7ecb04a68e712254 Call to setlocale is needed for correct generation of the table uplow_diff. Otherwise you receive compile time error "range assumption error" after uncommenting the call. Similar problem described here: http://lists.uclibc.org/pipermail/uclibc/2015-March/048852.html This commit fix the problem by using int32_t values.
2017-06-23sparc64: add basic supportWaldemar Brodkorb
No NPTL, no LDSO support. Bootup with Busybox Ash in Qemu working. Testuite shows only two failures, but mksh continue/break support doesn't work.
2017-06-21remove editor hints for viWaldemar Brodkorb
2017-05-14or1k: add NPTL/TLS supportWaldemar Brodkorb
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
2017-04-17remove old regex implementationWaldemar Brodkorb
2017-04-17remove old fnmatch implementationWaldemar Brodkorb
2017-04-16or1k: remove false selectWaldemar Brodkorb
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
2017-04-16libm: allow long double wrappers for all architecturesWaldemar Brodkorb
If you enable these wrappers, be sure you don't need long double precision on your embedded device, as these only enables long double warpper functions to the existing double math functions. Required to build some software as lvm2. Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
2017-04-08math: no reason to depend on special architectureWaldemar Brodkorb
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
2017-04-01nios2: allow to hack on experimenting ld.so supportWaldemar Brodkorb
2017-04-01unify defconfigsWaldemar Brodkorb
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
2017-03-21ARC: remove special CFLAGS/LDFLAGS handlingWaldemar Brodkorb
Either toolchain defaults or buildsystems should provide the architecture specific CFLAGS and LDFLAGS.
2017-03-20remove RPC implementationWaldemar Brodkorb
The included RPC implementation is ipv4 only. Other C library projects have either deprecated the internal RPC implementation (GNU C Library) or never implemented such functionality (musl C Library). The latest rpcbind release (0.2.4) checks for libtirpc and does not allow to be build with uClibc-ng RPC without patching. The common use case for RPC nowadays is to use rpcbind together with nfs-utils to provide NFS server or client support to a system. The included RPC implementation does create issues with duplicate symbol failures when statically compiling with RPC enabled.
2017-02-01add experimental aarch64 supportWaldemar Brodkorb
Ported over from GNU C Library and runtime tested in Qemu.
2017-01-24Restore UCLIBC_HAS_LFS as "always enabled"Alexey Neyman
Otherwise, buildroot rejects uClibc-ng in an external toolchain. Signed-off-by: Alexey Neyman <stilor@att.net>
2017-01-22nds32: add NPTL/TLS, *context function, libm changes and code cleanupVincent Ren-Wei Chen
This commit includes following features. 1. Support NPTL/TLS 2. Add libm function which is used to handle FP rounding and excpetions (ex: fclrexcpt,fedisblxcpti,feenablxcpt... ) 3. Add *context function for operating user context (ex: setcontext,getcontext,makecontext... ) 4. Change the return flow from signal handler 5. Cleanup of old code The testsuite only has 2 errors, tst-cpuclock1 and tst-cputimer1, which are related to timing accuracy. (math and locale tests are disabled) Signed-off-by: Vincent Ren-Wei Chen <vincentc@andestech.com>
2017-01-12remove unused strip scriptWaldemar Brodkorb
2016-12-31argp/iconv needs wchar enabledWaldemar Brodkorb
2016-12-29locale: needs libiconvWaldemar Brodkorb
2016-12-23remove UCLIBC_LINUX_MODULE_26Waldemar Brodkorb
The syscall wrappers are not required and other C libraries do not provide them. Busybox modutils.c must be patched so that syscall() is used for uClibc-ng. Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
2016-12-21remove obstack supportWaldemar Brodkorb
Remove __UCLIBC_HAS_OBSTACK__ as it isn't very uptodate and maintained part. It shouldn't be required for any software and mostly shipped with stuff which use it. (f.e. binutils-gdb)