Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Signed-off-by: Thorsten Glaser <tg@debian.org>
|
|
|
|
In file included from /home/thomas/external/buildroot2/output/host/mips64-buildroot-linux-uclibc/sysroot/usr/include/linux/fs.h:19,
from /home/thomas/external/buildroot2/output/host/mips64-buildroot-linux-uclibc/sysroot/usr/include/linux/btrfs.h:29,
from libmount/src/btrfs.c:22:
/home/thomas/external/buildroot2/output/host/mips64-buildroot-linux-uclibc/sysroot/usr/include/sys/mount.h:38:3: error: expected identifier before numeric constant
38 | MS_NOSUID = 2, /* Ignore suid and sgid bits. */
| ^~~~~~~~~
Fixes:
- https://github.com/util-linux/util-linux/issues/3501
- https://lore.kernel.org/buildroot/CACXRmJioVq7PUwBkCPNj0k-47hrJ_vtgVYtzp+_84ZgimDe9CA@mail.gmail.com/
Signed-off-by: Thomas Devoogdt <thomas@devoogdt.com>
|
|
is available
The reallocarray() primitive is only provided by the malloc-standard
implementation: neither malloc nor malloc-simple provide it. This
causes issues when building for example util-linux on noMMU platforms
as:
- noMMU platforms can't use malloc-standard, so either malloc or
malloc-simple are used, which means reallocarray() is not
implemented
- util-linux detects the absence of reallocarray(), and provides its
own implementation, but the prototype clashes with the prototype in
uClibc's <stdlib.h>
The combination of which causes the following build failure:
In file included from lib/color-names.c:7:
./include/c.h:586:21: error: static declaration of ‘reallocarray’ follows non-static declaration
586 | static inline void *reallocarray(void *ptr, size_t nmemb, size_t size)
| ^~~~~~~~~~~~
In file included from ./include/c.h:16:
/home/thomas/projets/buildroot/output/host/arm-buildroot-uclinux-uclibcgnueabi/sysroot/usr/include/stdlib.h:898:14: note: previous declaration of ‘reallocarray’ with type ‘void *(void *, size_t, size_t)’ {aka ‘void *(void *, unsigned int, unsigned int)’}
898 | extern void *reallocarray (void *__ptr, size_t __m, size_t __n);
| ^~~~~~~~~~~~
make[3]: *** [Makefile:12354: lib/libtcolors_la-color-names.lo] Error 1
To fix this, let's not expose the prototype of reallocarray() if we
don't provide the implementation for it.
Upstream: https://mailman.openadk.org/mailman3/hyperkitty/list/devel@uclibc-ng.org/thread/BX4ENNZYO23YQJQF5XITW7TETSJHEFK5/
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
|
|
|
|
|
|
Signed-off-by: Jeffrey H. Johnson <trnsz@pobox.com>
|
|
Avoid the warning by marking the unused parameter appropriately.
Signed-off-by: Marcus Haehnel <marcus.haehnel@kernkonzept.com>
|
|
Recent Clang versions (Starting from 20) have this macro built-in. The
compiler does not warn about this normally because <stdint.h> is a
system header. In special cases where stdint.h may be included as normal
header it does warn however. Avoid re-defining if a definition already
exists.
Signed-off-by: Marcus Haehnel <marcus.haehnel@kernkonzept.com>
|
|
The _start symbol does not necessarily have to be on the first page of
the application. But the __ehdr_start symbol is always at address zero
for PIE binaries.
Signed-off-by: Marcus Haehnel <marcus.haehnel@kernkonzept.com>
|
|
So far, uclibc relied on the informal behaviour of GNU ld to put the
link address of the _DYNAMIC symbol in the first GOT entry. This does
not work with LLVM lld which does not follow this convention.
Consequently, glibc has abandoned its usage in favour of using
__ehdr_start as magic symbol to infer the load address [1].
Note that this implies that the link time address of __ehdr_start is
*always* 0! So far, this seems to be the case on all platforms.
[1] https://sourceware.org/bugzilla/show_bug.cgi?id=28203
Signed-off-by: Marcus Haehnel <marcus.haehnel@kernkonzept.com>
|
|
The LLVM linker seems to be quite clever. When resolving relocations,
accesses to the GOT are potentially replaced by PC relative addressing
to the requested symbol. This breaks the old method of calculating the
load address by using an unrelocated GOT entry value. Instead, rely on
__ehdr_start having a link address of zero.
Signed-off-by: Marcus Haehnel <marcus.haehnel@kernkonzept.com>
|
|
Signed-off-by: Thorsten Glaser <tg@debian.org>
|
|
ld.so must be compiled with -ffreestanding to avoid emits of
memset/memcpy from gcc.
Disable some extra warnings for Blackfin to avoid a compile
error.
|
|
The _dl_auxvt is also used on non shared builds to access the values of
the vector from getauxval. Putting the definitions in ldso.h leads to
issues because that header also implements fcntl.h functionality making
it incompatible with files that include that header directly.
Factor out the _dl_auxvt related declarations to a new header dl-auxvt.h
and include from ldso.h as well as include it directly from
__uClibc_main.c to make the definitions available.
Signed-off-by: Marcus Haehnel <marcus.haehnel@kernkonzept.com>
|
|
Commit 227b7c825b6c79479f7222be03e83991b927da26 introduced a dependency
on _dl_auxvt but missed to include the header defining the symbol.
Include the ldso.h header that defines this and safeguard other parts of
that header that do not play nice if fcntl.h has already been included.
The latter is the case only for __uClibc_main.c.
Reviewed-by: Georg Kotheimer <georg.kotheimer@kernkonzept.com>
Signed-off-by: Marcus Haehnel <marcus.haehnel@kernkonzept.com>
|
|
Previously the getauxval implementation was limited to the auxiliary
vector entries cached in _dl_auxvt. To also support entries outside of
that cached subset, store the start address of the auxiliary vector,
and if an uncached entry type is encountered search the entire auxiliary
vector.
Signed-off-by: Marcus Haehnel <marcus.haehnel@kernkonzept.com>
|
|
While for dynamic linking the _dl_auxvt array is provided in
dl-startup.c as part of the ldso, is was undefined for statically
linked binaries. This resulted in a corresponding linker error if
a statically linked program used getauxval.
To provide _dl_auxvt also for statically linked binaries, a definition
of _dl_auxvt is added to dl-support.c and initialized by _dl_aux_init().
Signed-off-by: Marcus Haehnel <marcus.haehnel@kernkonzept.com>
|
|
In a .p2align directive, the maximum number of bytes to skip shall be at
most the intended alignment minus 1. Certain assemblers warn otherwise:
spn.S:97:14: warning: maximum bytes expression exceeds alignment
and has no effect
.p2align 3,,8
^
Change-Id: I5ad48f6f3c3036d8d33d3710ed8d5b5a35bf1fea
Signed-off-by: Marcus Haehnel <marcus.haehnel@kernkonzept.com>
|
|
Fix null pointer access in case SUPPORT_LD_DEBUG configuration option is
enabled (hit in _dl_do_reloc, but fix same old_val/reloc_addr usage pattern
in _dl_do_lazy_reloc too).
Reported-by: Jean-Michel Hautbois <jeanmichel.hautbois@yoseli.org>
Link: https://mailman.openadk.org/mailman3/hyperkitty/list/devel@uclibc-ng.org/thread/ODLJ53XJU5ZG3OLHVJMVWSNBYIFHFBAT/
Reviewed-by: Jean-Michel Hautbois <jeanmichel.hautbois@yoseli.org>
Tested-by: Jean-Michel Hautbois <jeanmichel.hautbois@yoseli.org>
Signed-off-by: Peter Seiderer <ps.report@gmx.net>
|
|
If gethostent_r fails, the h_errnop error code should be set.
Signed-off-by: Marcus Haehnel <marcus.haehnel@kernkonzept.com>
|
|
Clang-19 defines NAN in <float.h>. Check if NAN is already defined to
prevent a compiler warning.
Change-Id: I29ebcb2a7a0c1eade46a73074a1701ea67869128
Signed-off-by: Marcus Haehnel <marcus.haehnel@kernkonzept.com>
|
|
|
|
|
|
It is undefined behavior to compare two pointers belonging to different
objects. This includes the case where the addition overflows. Clang-20
seems to follow this rule more eagerly and optimizes away the old test.
Fix the test by performing the addition on uintptr_t values rather than
on on char pointers.
See also https://github.com/llvm/llvm-project/issues/121909.
Signed-off-by: Marcus Haehnel <marcus.haehnel@kernkonzept.com>
|
|
Signed-off-by: Marcus Haehnel <marcus.haehnel@kernkonzept.com>
|
|
targets on Linux versions prior to 5.1.0
Using 64bit time on 32bit targets was only introduced in Linux 5.1.0.
On versions prior to that, compiling uClibc-ng produces incorrect headers
that cause the `clock_nanosleep` syscall to receive incorrect arguments.
This change was previously introduced in `features.h`, but was reverted due to inclusion errors when compiling other
projects.
Signed-off-by: Nadav Tasher <tashernadav@gmail.com>
|
|
32bit targets on Linux versions prior to 5.1.0"
This reverts previous changes made to features.h which caused redefinitions when including `features.h`.
The reverted functionality will be reintroduced in a future commit.
Signed-off-by: Nadav Tasher <tashernadav@gmail.com>
|
|
Signed-off-by: Marcus Haehnel <marcus.haehnel@kernkonzept.com>
|
|
This variable is used either if __UCLIBC_HAS_FLOATS__ is defined or if
__UCLIBC_HAS_GLIBC_DIGIT_GROUPING__ is defined. Instead of adding more
complicated #ifdef magic, just mark this variable as possibly unused to
satisfy the compiler.
Signed-off-by: marcus.haehnel@kernkonzept.com
|
|
targets on Linux versions prior to 5.1.0
Using 64bit time on 32bit targets was only introduced in Linux 5.1.0.
On versions prior to that, compiling uClibc-ng produces incorrect headers
that cause the `clock_nanosleep` syscall to receive incorrect arguments.
Signed-off-by: Nadav Tasher <tashernadav@gmail.com>
|
|
Signed-off-by: Mingxiang Lu <lu.mingxiang@h3c.com>
Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
|
|
This reverts commit dd01754e21da71706af07f3e56eade66fc9164fb.
Signed-off-by: Dmitry Chestnykh <dm.chestnykh@gmail.com>
|
|
With time64 enabled we have to use statx() instead of stat() or fstat()
If the _dl_fstat implementation isn't selected correctly
we can have multiple errors inside dynamic linker
during startup of the system and of the almost every process
Add sparc exclusion like in other places inside this header
Signed-off-by: Dmitry Chestnykh <dm.chestnykh@gmail.com>
|
|
|
|
|
|
|
|
Neither glibc nor musl use __GNU macro to hide getrandom.
While there sync with glibc and add GRND_INSECURE flag.
|
|
|