If paths with both $(objpfx)/ and $(objpfx) (which already includes
a trailing slash) appear during the build, this can trigger unexpected
rebuilds, or incorrect concurrent rebuilds.
Add documentation for EAFNOSUPPORT error code returned, and the possible
return values on non-success.
Reviewed-by: Florian Weimer <fweimer@redhat.com>
Add documentation for ENODEV error code returned and refer to 'socket'
for further possible codes from the underlying function call.
While changing the text clarify the description by mentioning 'ifname'.
Reviewed-by: Florian Weimer <fweimer@redhat.com>
Add documentation for ENXIO error code returned and refer to 'socket'
for further possible codes from the underlying function call.
While changing the text clarify the description by mentioning 'ifname'
and replace @code tags with @var ones where referring to a function
parameter.
Reviewed-by: Florian Weimer <fweimer@redhat.com>
The name "the former Yugoslav Republic of Macedonia" is no longer in use
since the signing of the Prespa Agreement [1][2]. This resolved the
country's naming dispute with Greece and changed the name to "North
Macedonia".
The name field of this locale/iso-3166.def is not used, so this does not
affect binaries.
[1] https://en.wikipedia.org/wiki/Prespa_Agreement
[2] https://treaties.un.org/Pages/showDetails.aspx?objid=0800000280544ac1
Signed-off-by: Collin Funk <collin.funk1@gmail.com>
Reviewed-by: Florian Weimer <fweimer@redhat.com>
Currently tcache requires 2 global variable accesses to determine
whether a block can be added to the tcache. Change the counts array
to 'num_slots' to indicate the number of entries that could be added.
If 'num_slots' reaches zero, no more blocks can be added. If the entries
pointer is not NULL, at least one block is available for allocation.
Now each tcache bin can support a different maximum number of entries,
and they can be individually switched on or off (a zero initialized
num_slots+entry means the tcache bin is not available for free or malloc).
Reviewed-by: DJ Delorie <dj@redhat.com>
sparc start.S does not provide the final argument for
__libc_start_main, which is the highest stack address used to
update the __libc_stack_end.A
This fixes elf/tst-execstack-prog-static-tunable on sparc64.
On sparcv9 this does not happen because the kernel puts an
auxv value, which turns to point to a value in the stack itself.
Checked on sparc64-linux-gnu.
Reviewed-by: Florian Weimer <fweimer@redhat.com>
The name was changed in 2018 [1].
The name is not used in locale/programs/ld-address.c so this does not
change any binaries or data.
[1] https://www.un.org/en/about-us/member-states/eswatini
Signed-off-by: Collin Funk <collin.funk1@gmail.com>
Reviewed-by: Florian Weimer <fweimer@redhat.com>
* stdio-common/stdio_ext.h (__fbufsize, __freading, __fwriting)
(__freadable, __fwritable, __flbf, __fpurge, __fpending, __fsetlocking):
Add __nonnull ((1)) to these functions since they access the FP without
checking if it is NULL.
Signed-off-by: Collin Funk <collin.funk1@gmail.com>
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
On 32-bit architecture ubsan triggers:
UBSAN: Undefined behaviour in dl-load.c:1345:54 pointer index expression with base 0x00612508 overflowed to 0xf7c3a508
Use explicit uintptr_t operation instead.
Reviewed-by: Florian Weimer <fweimer@redhat.com>
It removes the wrapper by moving the error/EDOM handling to an
out-of-line implementation (__math_invalidf_i/__math_invalidf_li).
Also, __glibc_unlikely is used on errors case since it helps
code generation on recent gcc.
The code now builds to with gcc-14 on aarch64:
0000000000000000 <__ilogbf>:
0: 1e260000 fmov w0, s0
4: d3577801 ubfx x1, x0, #23, #8
8: 340000e1 cbz w1, 24 <__ilogbf+0x24>
c: 5101fc20 sub w0, w1, #0x7f
10: 7103fc3f cmp w1, #0xff
14: 54000040 b.eq 1c <__ilogbf+0x1c> // b.none
18: d65f03c0 ret
1c: 12b00000 mov w0, #0x7fffffff // #2147483647
20: 14000000 b 0 <__math_invalidf_i>
24: 53175800 lsl w0, w0, #9
28: 340000a0 cbz w0, 3c <__ilogbf+0x3c>
2c: 5ac01000 clz w0, w0
30: 12800fc1 mov w1, #0xffffff81 // #-127
34: 4b000020 sub w0, w1, w0
38: d65f03c0 ret
3c: 320107e0 mov w0, #0x80000001 // #-2147483647
40: 14000000 b 0 <__math_invalidf_i>
Some ABI requires additional adjustments:
* i386 and m68k requires to use the template version, since
both provide __ieee754_ilogb implementatations.
* loongarch uses a custom implementation as well.
* powerpc64le also has a custom implementation for POWER9, which
is also used for float and float128 version. The generic
e_ilogb.c implementation is moved on powerpc to keep the
current code as-is.
Checked on aarch64-linux-gnu and x86_64-linux-gnu.
Reviewed-by: Wilco Dijkstra <Wilco.Dijkstra@arm.com>
It removes the wrapper by moving the error/EDOM handling to an
out-of-line implementation (__math_invalid_i/__math_invalid_li).
Also, __glibc_unlikely is used on errors case since it helps
code generation on recent gcc.
The code now builds to with gcc-14 on aarch64:
0000000000000000 <__ilogb>:
0: 9e660000 fmov x0, d0
4: d374f801 ubfx x1, x0, #52, #11
8: 340000e1 cbz w1, 24 <__ilogb+0x24>
c: 510ffc20 sub w0, w1, #0x3ff
10: 711ffc3f cmp w1, #0x7ff
14: 54000040 b.eq 1c <__ilogb+0x1c> // b.none
18: d65f03c0 ret
1c: 12b00000 mov w0, #0x7fffffff // #2147483647
20: 14000000 b 0 <__math_invalid_i>
24: d374cc00 lsl x0, x0, #12
28: b40000a0 cbz x0, 3c <__ilogb+0x3c>
2c: dac01000 clz x0, x0
30: 12807fc1 mov w1, #0xfffffc01 // #-1023
34: 4b000020 sub w0, w1, w0
38: d65f03c0 ret
3c: 320107e0 mov w0, #0x80000001 // #-2147483647
40: 14000000 b 0 <__math_invalid_i>
Some ABI requires additional adjustments:
* i386 and m68k requires to use the template version, since
both provide __ieee754_ilogb implementatations.
* loongarch uses a custom implementation as well.
* powerpc64le also has a custom implementation for POWER9, which
is also used for float and float128 version. The generic
e_ilogb.c implementation is moved on powerpc to keep the
current code as-is.
Checked on aarch64-linux-gnu and x86_64-linux-gnu.
Reviewed-by: Wilco Dijkstra <Wilco.Dijkstra@arm.com>
Commit 1a3d8f2201 incorrectly described
'clock_nanosleep' as having the same return values as 'nanosleep'. Fix
this, clarifying that 'clock_nanosleep' returns a positive error number
upon failure instead of setting 'errno'. Also clarify that 'nanosleep'
returns '-1' upon error.
Fixes: 1a3d8f2201
Reported-by: Mark Harris <mark.hsj@gmail.com>
Reviewed-by: Mark Harris <mark.hsj@gmail.com>
Make minor clarifications in the documentation for 'nanosleep' and add
an entry for 'clock_nanosleep' as a generalized variant of the former
function that allows clock selection.
Reviewed-by: Maciej W. Rozycki <macro@redhat.com>
The GNU Coding Standards demand that 'illegal' only be used to refer to
activities prohibited by law. Replace it with 'invalid' accordingly in
the description of the EINVAL error condition for 'nanosleep'.
Add missing EAFNOSUPPORT, ESOCKTNOSUPPORT, EPROTOTYPE, EINVAL, EPERM,
and ENOMEM error codes, and adjust existing descriptions accordingly.
On Linux either ENOBUFS or ENOMEM is returned in the case of a memory
allocation failure, depending on the namespace requested, e.g. AF_INET
returns ENOMEM while AF_INET6 returns ENOBUFS, so document these codes
as alternatives.
Similarly EPERM is returned rather than EACCES on Linux, so document
these codes as alternatives as well. We might want to convert EPERM to
EACCES for POSIX compliance, but it is beyond the scope of this change,
and software has to expect either anyway, owing to the long-established
practice.
Finally ESOCKTNOSUPPORT is returned rather than EPROTONOSUPPORT for an
unsupported style except for the AF_QIPCRTR namespace where EPROTOTYPE
is used, so document these codes as alternatives too.
Reviewed-by: Florian Weimer <fweimer@redhat.com>
Make the only place use 'num_digits_len' enumeration constant where 10
is referred literally for a digit index in i18n handling for decimal
integers. No change in code produced.
Reviewed-by: Arjun Shankar <arjun@redhat.com>
Linux 6.15 adds the new syscall open_tree_attr. Update
syscall-names.list and regenerate the arch-syscall.h headers with
build-many-glibcs.py update-syscalls.
Tested with build-many-glibcs.py.
Reviewed-by: Florian Weimer <fweimer@redhat.com>
When using a -mcpu option in CFLAGS, GCC can report errors when building libmvec.
Fix this by overriding both -mcpu and -march with a generic variant with SVE added.
Also use a tune for a modern SVE core.
Reviewed-by: Yury Khrustalev <yury.khrustalev@arm.com>
Update the list of RISC-V relocations from the ELF psABI as of June 2024.
It removes binutils-internal only relocations that were never part of
actual object files. The GNU_VTINHERIT and GNU_VTENTRY relocations were
never used because the corresponding GCC option -fvtable-gc was never
supported on RISC-V.
This works around incompatibility of GMP 6.3.0 with GCC 15 (defaulting
to C23) following an approach suggested by Florian.
Tested with build-many-glibcs.py (host-libraries build only).
Reviewed-by: Florian Weimer <fweimer@redhat.com>
__ptmalloc_init was called too early in __libc_early_init: it uses
__libc_initial which is not set yet. Fix this by moving initialization
to the end of __libc_early_init.
Reviewed-by: Florian Weimer <fweimer@redhat.com>
Due to raising the minimum binutils version to version >=2.28,
the used cfi_escape for cfi_val_offset can now be ommitted.
The commit 0fc76d8762
has already adjusted it for the 64bit part of mcount.
This patch also adjusts it for the 31bit part of mcount.
Checked with "objdump -WF" / "objdump -Wf" that the previous
cfi_escape and the new cfi_val_offset are equal.
Add initial inputs for asinpi(f), acospi(f), atanpi(f) and atan2pi(f) based
on existing asin/acos/atan inputs.
Benchtests now works on the new libmvec function.
Reviewed-by: Yury Khrustalev <yury.khrustalev@arm.com>
This fixes make dist on systems with the latest texinfo installed.
GNU texinfo 7.2 changes @xrefs in proper plain text sentences instead
of pseudo info references.
Tested-By: Collin Funk <collin.funk1@gmail.com>
Reviewed-by: Andreas K. Huettel <dilfridge@gentoo.org>