Age | Commit message (Collapse) | Author |
|
Binutils emits by default lazy relocations for TLSDESC and
ld.so need to handle that. Fixes problems like:
can't handle reloc type 0x407
|
|
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
|
|
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
|
|
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
|
|
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>
|
|
Inner loop was using same counter variable (i) as the outer loop, therefore
making outer loop terminate before it visited all of the ELF program segments.
Surrounding code in this inner loop clearly shows the intention that this loop
should not affect the outer one, therefore leading me to the conclusion that
this should be a bug an not expected code.
This bug was detected due to some other bug in ARC binutils that kept setting
TEXTREL for any PIE application.
Apart from the but, I have also moved the debug message inside of the TEXTREL
condition as mprotect is only really called if TELTREL is set.
|
|
_dl_zalloc callers don't check for allocaton failure. It kind of makes
sense since such early allocations are unlikely to fail, and even if
they do, ldso would segv anyways thus bringing the issue to attention.
However there's a gcc nuance which led to this patch.
It seems gcc at -O2 (for DODEBUG build), does additional coge gen
analysis for pointer dereference from erroneous paths and it "isolates"
such code paths with a intrinsic abort/trap etc.
The ldso code fragment which was triggering this:
| add_ldso(struct dyn_elf *rpnt)
| if (rpnt)
| ...
| else
| rpnt = _dl_zalloc()
|
| rpnt->dyn = tpnt <---- potential NULL pointer deref
ARC gcc currently generates an abort() call which doesn't exist in ldso,
causing link errors (with a newer vrsion of binutils).
ARM gcc 6.2.1 behaves similarly, altough instead of abort, it generates
a trap inducing UDF instruction
| 367c: ebfffb79 bl 2468 <_dl_malloc>
| 3680: e51b2068 ldr r2, [fp, #-104] ; 0xffffff98
| 3684: e3500000 cmp r0, #0
| 3688: 0a000006 beq 36a8 <_dl_add_elf_hash_table+0x280>
| ...
| 36a8: e5862000 str r2, [r6]
| 36ac: e7f000f0 udf #
So add an explict dl_exit() in dl_zalloc error case to beat the
compiler.
Note that this error propagagtion analysis stops if the function in
consideration (_dl_zalloc) is NOT inlined. Hence the reason it only
shows up for DODEBUG builds which builds ldso at -O2 which is more
aggressive about inlining.
If this patch is not considered worth applying then the workaround
suggested by Claudiu is to to build ldso with
-fno-isolate-erroneous-paths-dereference
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
|
|
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
|
|
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
|
|
This reverts commit 657c4a9d6c2e649d86307f46ce9d5e44192f6e7a.
This breaks a lot of package cross-compilation as lvm, ruby,
ipsec-tools. :(
|
|
|
|
|
|
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
|
|
the --discard-* toggles take away the symbols which comes in the way
when staring at objdumps for debugging low level issues
So don't discard symbols for DODEBUG builds
before
-----
3388: j_s.d [blink]
338a: add_s sp,sp,0x18
338c: b.d 332c <_dl_add_elf_hash_table+0x50>
3390: mov_s r2,0
3392: nop_s
3394: push_s blink <--- function not called out
3396: st.aw r13,[sp,-20]
339a: std r14r15,[sp,4]
339e: std r16r17,[sp,12]
after
-----
3388: j_s.d [blink]
338a: add_s sp,sp,0x18
338c: b.d 332c <_dl_add_elf_hash_table+0x50>
3390: mov_s r2,0
3392: nop_s
00003394 <add_ldso.isra.9>:
3394: push_s blink
3396: st.aw r13,[sp,-20]
339a: std r14r15,[sp,4]
339e: std r16r17,[sp,12]
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
|
|
Either toolchain defaults or buildsystems should provide the
architecture specific CFLAGS and LDFLAGS.
|
|
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.
|
|
The header is not in sync with GNU libc and Linux kernel and
therefore produces compile errors with qemu-user (2.8.0).
Reported-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
|
|
This follows the recommendations outlined in Network Operations Division
Cryptographic Requirements published on wikileaks on March 2017.
We discard more bytes of the first keystream to reduce possibility of
non-random bytes.
This is similar to a change in FreeBSD:
https://svnweb.freebsd.org/base?view=revision&revision=315225
Signed-off-by: Loganaden Velvindron <logan@hackers.mu>
|
|
... before falling back to ld.so installation path (it is not the same -
gcc uses /lib/ld-uClibc-x86-64.so.0 for uClibc) or default /lib:/usr/lib.
This matches glibc behavior (see trusted-dirs.h generated during glibc
build).
Signed-off-by: Alexey Neyman <stilor@att.net>
|
|
... where install does not have a -D option.
Signed-off-by: Alexey Neyman <stilor@att.net>
|
|
If a source file is compiled with:
#define _XOPEN_SOURCE 700
#define _POSIX_C_SOURCE 200112L
Then including fcntl.h results in the following error:
In file included from fcntl.h:37:0,
from test.c:4:
sys/stat.h:371:54: error: array type has incomplete element type ‘struct timespec’
extern int futimens (int __fd, const struct timespec __times[2]) __THROW;
To fix that, we force the definition of struct timespec in fcntl.h when
__USE_XOPEN2K8 is defined. This mimics the behavior of glibc which
contains the following line in its io/fcntl.h header (included by
fcntlh.h):
#ifdef __USE_XOPEN2K8
# include <bits/types/struct_timespec.h>
#endif
This bug was spotted during the compilation of BoringSSL against uClibc.
Signed-off-by: Damien Riegel <damien.riegel@savoirfairelinux.com>
|
|
|
|
|
|
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
|
|
|
|
As reported by Buildroot developers these files causing static
linking issues. The original contribution with the ARM unwind-resume
rework and GNU libc sync was made before the combined libc change.
But the patch was applied later, after the libc change and
it seems the test coverage for static linking didn't catch it in
the regression testing. Remove the files.
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
|
|
Patch fetched from GNU libc mailinglist.
|
|
The new code get's used by MIPS64 N64 and fails.
Make the new code aarch64 specific.
|
|
|
|
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
|
|
Signed-off-by: mirabilos <m@mirbsd.org>
Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
|
|
Ported over from GNU C Library and runtime tested in Qemu.
|
|
implementation
Signed-off-by: mirabilos <m@mirbsd.org>
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
|
|
(still same implementation though)
Signed-off-by: mirabilos <m@mirbsd.org>
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
|
|
Signed-off-by: mirabilos <m@mirbsd.org>
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
|
|
directory (with O=)
For me it was enabling of UCLIBC_SUSV3_LEGACY=y that broke compilation
in separate directory.
|
|
Follow GNU C Library from c579f48edba88380635ab98cb612030e3ed8691e
and remove the PID caching. These simplifies the architecture specific
assembly code.
The run of the test suite found no regressions, it even solves
some of the test failures for x86/x86_64/sparc.
Reviewed-by: Max Filippov <jcmvbkbc@gmail.com>
Reviewed-by: Vineet Gupta <Vineet.Gupta1@synopsys.com>
Acked-by: Matthew Fortune <Matthew.Fortune@imgtec.com>
Acked-by: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
|
|
|
|
Otherwise, buildroot rejects uClibc-ng in an external toolchain.
Signed-off-by: Alexey Neyman <stilor@att.net>
|
|
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>
|
|
Add a similar fix as in 8dd85e041bdccf630c90e12ea044f55d28da9396.
Reported-By: Steven Seeger <steven.seeger@frontier.com>
|
|
This reverts commit 7921ad851370684cf256f9bf7812b763bfd62fca.
Don't commit stuff before first coffee!
|
|
A wrong filename was present in Makefile.in leaving libintl.h installed
even if libintl support is disabled leading to wrong configure checks
by other packages.
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
|
|
Needed to fix
http://autobuild.buildroot.net/results/6be/6be94fe2542f3ac9fb785dd22f504e25c2a7802e/
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
|
|
This removes _DYNAMIC@gotpc from elf_machine_load_address()
This is a seperate commit to callout the fact that old code was actually
broken but was NOT caught since it never gets called (and will never be)
since ld.so only calls it if kernel doesn't pass AT_BASE auxvt, which is
not true for Linux.
if (!auxvt[AT_BASE].a_un.a_val)
auxvt[AT_BASE].a_un.a_val = elf_machine_load_address();
So while the intent was to remove _DYNAMIC@gotpc construct, we need to
come up with something which works.
The build time address computation of .dynamic which works well is:
- "ld %1, [pcl, _DYNAMIC@gotpc] \n"
+ "ld %1, [pcl, _GLOBAL_OFFSET_TABLE_@pcl] \n"
However the runtime address of .dynamic can only be generated with
"add %0, pcl, _DYNAMIC@pcl \n"
which unfortunately is what is currently broken as it is converted to
i_GLOBAL_OFFSET_TABLE_t and thus refers to runtime address of .got and
not .dyanmic
Thus we resort to using an arbit symbol _dl_start at the expense of an
extra GOT entry and a bogus R_ARC_NONE relo in ldso itself which now
needs to be ignored.
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
|
|
This converts elf_machine_dynamic() to not use the _DYNAMIC@xx construct
which was historically converted by assembler into _GLOBAL_OFFSET_TABLE
Now that "hack" is being removed from assembler, we need to make sure
that no code relies on that magic "conversion".
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
|
|
|
|
|
|
We do not support symbol versioning, so remove these weak aliases.
|
|
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
|