Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Quelches a compiler warning by that memset was implicitly declared.
|
|
The variable is used since 04a676f3c8d2443499f27612f69ee88e12089e61.
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Signed-off-by: Dmitry Chestnykh <dm.chestnykh@gmail.com>
|
|
With time64 enabled we use statx() system call and the appropriate
routines for results conversion. There is no need in `__ts32_struct`
anymore.
Signed-off-by: Dmitry Chestnykh <dm.chestnykh@gmail.com>
|
|
Previously the common definition of this structure was broken by a mistake.
Restore it correctly for all needed architectures and all use cases.
Signed-off-by: Dmitry Chestnykh <dm.chestnykh@gmail.com>
|
|
By some reason sparc ld.so cannot work properly with
statx() system call, so fallback to regular stat() family in ld.so.
Signed-off-by: Dmitry Chestnykh <dm.chestnykh@gmail.com>
|
|
Signed-off-by: Dmitry Chestnykh <dm.chestnykh@gmail.com>
|
|
With time64 enabled we need to pass structure
which consists of two 64bit fields to clock_gettime64()
and clock_nanosleep_time64() syscalls with proper conversion
to regular timespec structure after syscall execution.
Signed-off-by: Dmitry Chestnykh <dm.chestnykh@gmail.com>
|
|
Signed-off-by: Dmitry Chestnykh <dm.chestnykh@gmail.com>
|
|
Signed-off-by: Dmitry Chestnykh <dm.chestnykh@gmail.com>
|
|
To obtain correct `st_atim`, `st_mtim` and `st_ctim` fields
we need to use statx() syscall and then convert the data from the kernel
to the regular stat structure.
Signed-off-by: Dmitry Chestnykh <dm.chestnykh@gmail.com>
|
|
Signed-off-by: Dmitry Chestnykh <dm.chestnykh@gmail.com>
|
|
- Renamed `ts32_struct` to `__ts32_struct` like `__ts64_struct`
and moved its definition to the header.
- Removed extra space from TO_ITS64_P() macro.
Signed-off-by: Dmitry Chestnykh <dm.chestnykh@gmail.com>
|
|
Signed-off-by: Dmitry Chestnykh <dm.chestnykh@gmail.com>
|
|
For BE architectures there is one significant difference
in comparison with time64 support for little-endian
architectures like ARMv7.
The difference is that we strictly need to pass two 64bit
values to system calls because Linux Kernel internally uses
`struct __kernel_timespec` and similar, which consists of two
64bit fields.
For this reason many files have been changed to convert
pointers to timespec-family structures (mixed of 64bit and 32bit values)
to the pointer of the similar but 64bit-only structures
for using as system calls args.
This is general prerequisite for any BE architecture.
Signed-off-by: Dmitry Chestnykh <dm.chestnykh@gmail.com>
|
|
Inside `if` branches the conditions
`as->ino == bs->ino` and `as->dev == bs->dev`
are always false.
Signed-off-by: Dmitry Chestnykh <dm.chestnykh@gmail.com>
|
|
We use semicolons in the place of
`DL_RELOCATE_RELR()` and `DL_DO_RELOCATE_RELR()` 'calling'
so the semicolon in the macro definition leads to
semicolon duplication after preprocessing.
Signed-off-by: Dmitry Chestnykh <dm.chestnykh@gmail.com>
|
|
- xtensa is the second architecture that supports
time64 inside uClibc-ng.
- Linux Kernel always uses 32bit time variables
inside `stat` structures, so there is a need
to use `st_atime`, `st_mtime` and `st_ctime` structures with the same
32bit-wide `tv_sec` and `tv_nsec` variables even if time64 is enabled.
Signed-off-by: Dmitry Chestnykh <dm.chestnykh@gmail.com>
|
|
This patch introduces *time64 syscalls support for uClibc-ng.
Currently the redirection of syscalls to their *time64
analogs is fully supported for 32bit ARM (ARMv5, ARMv6, ARMv7).
The main changes that take effect when time64 feature is enabled are:
- sizeof(time_t) is 8.
- There is a possibility os setting date beyond year 2038.
- some syscalls are redirected:
clock_adjtime -> clock_adjtime64
clock_getres -> clock_getres_time64
clock_gettime -> clock_gettime64
clock_nanosleep -> clock_nanosleep_time64
clock_settime -> clock_settime64
futex -> futex_time64
mq_timedreceive -> mq_timedreceive_time64
mq_timedsend -> mq_timedsend_time64
ppoll -> ppoll_time64
pselect6 -> pselect6_time64
recvmmsg -> recvmmsg_time64
rt_sigtimedwait -> rt_sigtimedwait_time64
sched_rr_get_interval -> sched_rr_get_interval_time64
semtimedop -> semtimedop_time64
timer_gettime -> timer_gettime64
timer_settime -> timer_settime64
timerfd_gettime -> timerfd_gettime64
timerfd_settime -> timerfd_settime64
utimensat -> utimensat_time64.
- settimeofday uses clock_settime (like in glibc/musl).
- gettimeofday uses clock_gettime (like in glibc/musl).
- nanosleep uses clock_nanosleep (like in glibc/musl).
- There are some fixes in data structures used by libc and kernel
for correct data handling both with and without enabled time64 support.
Signed-off-by: Dmitry Chestnykh <dm.chestnykh@gmail.com>
|
|
Clang warns about null-pointer subtractions, which are undefined
behavior per the C standards. Replace the subtractions with
explicit casts to `uintptr_t`.
|
|
|
|
While they are not a problem per-se they cause issues with some tooling
(such as clang coverage) and are confusing to the reader.
|
|
There is a check for (*rpnt == NULL) a few lines above but the "else"
case performing an allocation does only exist if SHARED is not defined.
If SHARED is defined, the allocation is not performed and it may happen
(at least in theory) that *rpnt == NULL when executing
(*rpnt)->dyn = tpnt;
Add the null-pointer check.
Signed-off-by: Frank Mehnert <frank.mehnert@kernkonzept.com>
|
|
|
|
Here is the warning:
ldso/ldso/dl-elf.c: In function '_dl_fixup':
./ldso/include/dl-elf.h:259:37: warning: declaration of 'reloc_addr' shadows a previous local [-Wshadow]
259 | ElfW(Addr) *reloc_addr = 0; \
| ^~~~~~~~~~
./ldso/include/dl-elf.h:290:33: note: in expansion of macro 'DL_DO_RELOCATE_RELR'
290 | DL_DO_RELOCATE_RELR(dyn->loadaddr, relr_start, relr_end); \
| ^~~~~~~~~~~~~~~~~~~
ldso/ldso/dl-elf.c:1032:9: note: in expansion of macro 'DL_RELOCATE_RELR'
1032 | DL_RELOCATE_RELR(tpnt);
| ^~~~~~~~~~~~~~~~
In file included from ldso/ldso/ldso.c:1462:
ldso/ldso/dl-elf.c:1012:20: note: shadowed declaration is here
1012 | ElfW(Addr) reloc_addr
Signed-off-by: Dmitry Chestnykh <dm.chestnykh@gmail.com>
|
|
During buildroot compilation with latest uClibc
I've encoutered linking error due to multiple definition
of some symbols from DNS code.
The error happens because the same file resolv.c
is included inside many other .c files:
res_comp.c:(.text+0x0): multiple definition of `__GI___dn_expand'; libc/libc_so.a(encodeq.os):encodeq.c:(.text+0x8a0): first defined here
res_comp.c:(.text+0x0): multiple definition of `__dn_expand'; libc/libc_so.a(encodeq.os):encodeq.c:(.text+0x8a0): first defined here
res_comp.c:(.text+0x34): multiple definition of `__GI___dn_comp'; libc/libc_so.a(encodeq.os):encodeq.c:(.text+0xc68): first defined here
res_comp.c:(.text+0x34): multiple definition of `__dn_comp'; libc/libc_so.a(encodeq.os):encodeq.c:(.text+0xc68): first defined here
ns_name.c:(.text+0x4c): multiple definition of `__GI___ns_name_ntop'; libc/libc_so.a(encodeq.os):encodeq.c:(.text+0x4c): first defined here
ns_name.c:(.text+0x4c): multiple definition of `__ns_name_ntop'; libc/libc_so.a(encodeq.os):encodeq.c:(.text+0x4c): first defined here
ns_name.c:(.text+0x1f8): multiple definition of `__GI___ns_name_pton'; libc/libc_so.a(encodeq.os):encodeq.c:(.text+0x1f8): first defined here
ns_name.c:(.text+0x1f8): multiple definition of `__ns_name_pton'; libc/libc_so.a(encodeq.os):encodeq.c:(.text+0x1f8): first defined here
ns_name.c:(.text+0x624): multiple definition of `__hnbad'; libc/libc_so.a(encodeq.os):encodeq.c:(.text+0x624): first defined here
ns_name.c:(.text+0x718): multiple definition of `__GI___ns_name_unpack'; libc/libc_so.a(encodeq.os):encodeq.c:(.text+0x718): first defined here
ns_name.c:(.text+0x718): multiple definition of `__ns_name_unpack'; libc/libc_so.a(encodeq.os):encodeq.c:(.text+0x718): first defined here
ns_name.c:(.text+0x84c): multiple definition of `__GI___ns_name_uncompress'; libc/libc_so.a(encodeq.os):encodeq.c:(.text+0x84c): first defined here
ns_name.c:(.text+0x84c): multiple definition of `__ns_name_uncompress'; libc/libc_so.a(encodeq.os):encodeq.c:(.text+0x84c): first defined here
ns_name.c:(.text+0x8a0): multiple definition of `__GI___ns_name_pack'; libc/libc_so.a(encodeq.os):encodeq.c:(.text+0x8d4): first defined here
ns_name.c:(.text+0x8a0): multiple definition of `__ns_name_pack'; libc/libc_so.a(encodeq.os):encodeq.c:(.text+0x8d4): first defined here
ns_name.c:(.text+0xbe4): multiple definition of `__GI___ns_name_compress'; libc/libc_so.a(encodeq.os):encodeq.c:(.text+0xc18): first defined here
ns_name.c:(.text+0xbe4): multiple definition of `__ns_name_compress'; libc/libc_so.a(encodeq.os):encodeq.c:(.text+0xc18): first defined here
ns_name.c:(.text+0xc34): multiple definition of `__GI___ns_name_skip'; libc/libc_so.a(encodeq.os):encodeq.c:(.text+0xcdc): first defined here
ns_name.c:(.text+0xc34): multiple definition of `__ns_name_skip'; libc/libc_so.a(encodeq.os):encodeq.c:(.text+0xcdc): first defined here
ns_name.c:(.text+0xcd4): multiple definition of `__GI___dn_skipname'; libc/libc_so.a(encodeq.os):encodeq.c:(.text+0xd7c): first defined here
ns_name.c:(.text+0xcd4): multiple definition of `__dn_skipname'; libc/libc_so.a(encodeq.os):encodeq.c:(.text+0xd7c): first defined here
My previous commit that fixes build error of DNS code is okay,
but there are some 'bottlenecks' in uClibc-ng code, so if
we don't want to completely rewrite resolv.c we need to make some
symbols weak to prevent linking errors.
|
|
During checking whether a temporary name can be created, it may happen
that a file with this name already exists. Avoid falling through to
opening the file name in this case, and return with an error instead.
Signed-off-by: Sven Linker <sven.linker@kernkonzept.com>
|