aboutsummaryrefslogtreecommitdiff
path: root/manual
AgeCommit message (Collapse)AuthorFilesLines
6 daysINSTALL: Update newest tested binutils versionAndreas K. Hüttel1-2/+1
Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
8 daysinstall.texi: Update tested build tool versionsAndreas K. Hüttel1-7/+8
Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
8 dayscontrib.texi: UpdateAndreas K. Hüttel1-14/+39
Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
10 daysDisable SFrame support by defaultAdhemerval Zanella1-4/+7
And add extra checks to enable for binutils 2.45 and if the architecture explicitly enables it. When SFrame is disabled, all the related code is also not enabled for backtrace() and _dl_find_object(), so SFrame backtracking is not used even if the binary has the SFrame segment. This patch also adds some other related fixes: * Fixed an issue with AC_CHECK_PROG_VER, where the READELF_SFRAME usage prevented specifying a different readelf through READELF environment variable at configure time. * Add an extra arch-specific internal definition, libc_cv_support_sframe, to disable --enable-sframe on architectures that have binutils but not glibc support (s390x). * Renamed the tests without the .sframe segment and move the tst-backtrace1 from pthread to debug. * Use the built compiler strip to remove the .sframe segment, instead of the system one (which might not support SFrame). Checked on x86_64-linux-gnu and aarch64-linux-gnu. Reviewed-by: Sam James <sam@gentoo.org>
10 daysmanual: Use @Theglibc{} at sentence start in terminal documentationFlorian Weimer1-3/+3
Fixes commit 5dd2a19ad5218261cee064 ("termios: manual: improve the explanation of various tty concepts") and commit c744519bad8106769760 ("termios: manual: document the SPEED_MAX and BAUD_MAX constants"). Reviewed-by: Collin Funk <collin.funk1@gmail.com>
2025-07-20termios: manual: document the SPEED_MAX and BAUD_MAX constantsH. Peter Anvin1-0/+18
Add the SPEED_MAX and BAUD_MAX constants to the manual. [ v3: drop leading underscores ] Signed-off-by: "H. Peter Anvin" (Intel) <hpa@zytor.com> Reviewed-by: Collin Funk <collin.funk1@gmail.com>
2025-07-20termios: manual: improve the explanation of various tty conceptsH. Peter Anvin1-128/+281
It is a lot easier to understand the meaning of the tty interface if it is explained from the beginning as conceptually emulating an RS232 serial port. This greatly simplifies the discussions of specific items like the meaning of line speed. Distinguish between "modem disconnect request" (deasserting DTR) and "modem disconnect" (DCD deasserted). Conflating the two terms is confusing, especially for non-RS232 devices. In particular, on most systems, a pseudo-terminal will *not* respond to a modem disconnect request by triggering a modem disconnect event for the purpose of the HUPCL flag. It is not necessarily true that the line speed has no effect on non-serial port devices: e.g. an SPI port may interpret it as the clock frequency to use; however, SPI does not use asynchronous framing bits, instead synchronization is handled by the SS# wire. Similarly, it is common but not by any means universal for interfaces that employ various forms of fixed data to symbol rate encodings to encode the data link layer bit rate rather than the physical symbol rate, which may be higher (e.g. 8B10B) or lower (e.g. QAM/Trellis), without the encoding or framing overhead. Finally, a handful of devices use the line rate for entirely nonstandard purposes. One example is Arduino USB interfaces, which often interprets changing the baud rate to 1200 baud as a command to reset the device. [ v2: removed a bogus stray chunk from editing ] Signed-off-by: H. Peter Anvin <hpa@zytor.com> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2025-07-20termios: manual: remove duplicate cfgetospeed() definitionH. Peter Anvin1-10/+0
The function cfsetospeed() is defined twice in the manual. Remove the one that seems out of place. Signed-off-by: "H. Peter Anvin" (Intel) <hpa@zytor.com> Reviewed-by: Collin Funk <collin.funk1@gmail.com>
2025-07-20termios: manual: fix typo: tcsettattr -> tcsetattrH. Peter Anvin1-1/+1
Fix a typo in the manual: tcsetattr misspelled as tcsettattr. Signed-off-by: "H. Peter Anvin" (Intel) <hpa@zytor.com> Reviewed-by: Collin Funk <collin.funk1@gmail.com>
2025-07-14configure: Add --enable-sframe optionClaudiu Zissulescu1-0/+5
Enable SFrame stack track information. The --enable-sframe option allows the glibc build to compile with SFrame stack track information. Thus, enabling glibc's backtrace to work within glibc. Signed-off-by: Claudiu Zissulescu <claudiu.zissulescu-ianculescu@oracle.com> Reviewed-by: DJ Delorie <dj@redhat.com> Reviewed-by: Sam James <sam@gentoo.org>
2025-07-14elf: Add SFrame support to _dl_find_object functionClaudiu Zissulescu1-1/+16
The SFrame provides information to be able to do stack trace is now well defined and implemented in Binutils 2.41. The format simply contains enough information to be able to do stack trace given a program counter (PC) value, the stack pointer, and the frame pointer. The SFrame information is stored in a .sframe ELF section, which is loaded into its own PT_GNU_SFRAME segment. We consider for this support SFrame version 2. This patch adds the bits to _dl_find_object to recognize and store in struct dl_find_object the necessary info about SFrame section. Signed-off-by: Claudiu Zissulescu <claudiu.zissulescu-ianculescu@oracle.com> Reviewed-by: Florian Weimer <fweimer@redhat.com>
2025-07-08fstat: add test and documentation for an edge case.Matteo Croce1-2/+3
The fstatat behaviour when the target is a dangling symlink is different if flags contains AT_SYMLINK_NOFOLLOW or not. Add a test for this and document it.
2025-07-08fstatat: extend tests and documentationMatteo Croce1-0/+4
Document the fstatat behaviour leading to a ENOENT errno, and extend tests to test the case where filename does not exist. Signed-off-by: Matteo Croce <teknoraver@meta.com>
2025-07-03manual: Remove '.info' suffix in manual names passed to @ref [BZ #32962].Collin Funk3-6/+5
Texinfo 7.2 began warning about the '.info' suffix in the manual names passed to @ref and similar commands. They eventually plan to stop stripping the '.info' suffix internally which will lead to broken links in the manuals without this change. Signed-off-by: Collin Funk <collin.funk1@gmail.com> Reviewed-by: Sam James <sam@gentoo.org>
2025-06-26manual: Clarify renameat documentationJitka Obselkova1-1/+4
Clarify the meaning of renameat arguments. Reviewed-by: Collin Funk <collin.funk1@gmail.com>
2025-06-26Revert "manual: Clarify renameat documentation"Florian Weimer1-3/+1
This reverts commit abc2e954af77f8d10f4f54754520814590e79830. Reason for revert: Wrong version of the patch.
2025-06-25manual: Add missing free to open_memstream example [BZ #27866]Ravina Jain1-0/+2
Reviewed-by: Collin Funk <collin.funk1@gmail.com>
2025-06-18manual: Clarify renameat documentationJitka Obselkova1-1/+3
Clarify the meaning of renameat arguments. Signed-off-by: Jitka Obselkova <jobselko@redhat.com> Reviewed-by: Collin Funk <collin.funk1@gmail.com>
2025-06-17termios: add new baud_t interface, defined to be explicitly numericH. Peter Anvin (Intel)1-13/+77
Add an explicitly numeric interface for baudrate setting. For glibc, this only announces what is a fair accompli, but this is a plausible way forward for standardization, and may be possible to infill on non-compliant systems. The POSIX committee has stated: [https://www.austingroupbugs.net/view.php?id=1916#c7135] A future version of this standard is expected to add at least the following symbolic constants for use as values of objects of type speed_t: B57600, B115200, B230400, B460800, and B921600. Implementations are encouraged to propose additional interfaces which will make it possible to set and query a wider range of speeds than just those enumerated by the constants beginning with B. If a set of common interfaces emerges between several implementations, a future version of this standard will likely add those interfaces. This is exactly that interface. The use of the term "baud" is due to the need to have a term contrasting "speed", and it is already well established as a legacy term -- including in the names of the legacy Bxxx constants. Futhermore, it *is* valid from the point of view that the termios interface fundamentally emulates an RS-232 serial port as far as the application software is concerned. The documentation states that for the current version of glibc, speed_t == baud_t, but explicitly declares that this may not be the case in the future. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2025-06-17manual: document all the termios Bxxx constants in the manualH. Peter Anvin (Intel)1-4/+70
Add all the Bxxx constants defined in the now-generic <bits/termios-baud.h> in the manual. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org> Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2025-06-06manual: Add a comparative example of 'clock_nanosleep' useMaciej W. Rozycki1-0/+13
Add an illustrative example of how to express 'nanosleep' in terms of 'clock_nanosleep'.
2025-06-04manual: Document futimens and utimensatArjun Shankar1-1/+62
Document futimens and utimensat. Also document the EINVAL error condition for futimes. It is inherited by futimens and utimensat as well. Reviewed-by: Florian Weimer <fweimer@redhat.com>
2025-06-04manual: Document unlinkatArjun Shankar1-1/+25
Reviewed-by: Florian Weimer <fweimer@redhat.com>
2025-06-04manual: Document renameatArjun Shankar1-1/+11
Reviewed-by: Florian Weimer <fweimer@redhat.com>
2025-06-04manual: Document mkdiratArjun Shankar1-1/+11
Reviewed-by: Florian Weimer <fweimer@redhat.com>
2025-06-04manual: Document faccessatArjun Shankar1-1/+23
Reviewed-by: Florian Weimer <fweimer@redhat.com>
2025-06-04manual: Expand Descriptor-Relative Access sectionArjun Shankar1-6/+33
Improve the clarity of the paragraphs describing common flags and add a list of common error conditions for descriptor-relative functions. Reviewed-by: Florian Weimer <fweimer@redhat.com>
2025-06-04manual: Document error codes missing for 'inet_pton'Maciej W. Rozycki1-0/+11
Add documentation for EAFNOSUPPORT error code returned, and the possible return values on non-success. Reviewed-by: Florian Weimer <fweimer@redhat.com>
2025-06-04manual: Document error codes missing for 'if_nametoindex'Maciej W. Rozycki1-1/+14
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>
2025-06-04manual: Document error codes missing for 'if_indextoname'Maciej W. Rozycki1-5/+16
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>
2025-06-02manual: Correct return value description of 'clock_nanosleep'Arjun Shankar1-19/+14
Commit 1a3d8f2201d4d613401ce5be9a283f4f28c43093 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: 1a3d8f2201d4d613401ce5be9a283f4f28c43093 Reported-by: Mark Harris <mark.hsj@gmail.com> Reviewed-by: Mark Harris <mark.hsj@gmail.com>
2025-05-30manual: Document clock_nanosleepArjun Shankar1-11/+60
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>
2025-05-30manual: Fix invalid 'illegal' usage with 'nanosleep'Maciej W. Rozycki1-1/+1
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'.
2025-05-30manual: Fix duplicate 'consult' erratumMaciej W. Rozycki1-1/+1
Remove 'consult' duplication appearing in Extensible Scheduling section.
2025-05-29manual: Document error codes missing for 'inet_ntop'Maciej W. Rozycki1-1/+13
Add documentation for EAFNOSUPPORT and ENOSPC error codes returned, and the return value on failure. Reviewed-by: Florian Weimer <fweimer@redhat.com>
2025-05-29manual: Document error codes missing for 'socket'Maciej W. Rozycki1-3/+15
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>
2025-05-28manual: mention PKEY_UNRESTRICTED macro in the manualYury Khrustalev1-4/+4
Also use this macro in one of the examples. Reviewed-by: Florian Weimer <fweimer@redhat.com>
2025-05-27doc: Add missing space in documentation of __TIMESIZEJonathan Wakely1-1/+1
2025-05-27doc: Fix typos in documentation of _TIME_BITSJonathan Wakely1-2/+2
2025-05-26manual: Document getopt_long_only with single letter options (bug 32980)Tomas Volf1-1/+30
Signed-off-by: Tomas Volf <~@wolfsden.cz> Reviewed-by: Florian Weimer <fweimer@redhat.com>
2025-05-21manual: Use more inclusive language in comments.Carlos O'Donell1-1/+1
Reviewed-by: Florian Weimer <fweimer@redhat.com>
2025-05-16manual: add sched_getcpu()DJ Delorie1-0/+16
Reviewed-by: Collin Funk <collin.funk1@gmail.com>
2025-05-16manual: Clarifications for listing directoriesFlorian Weimer1-2/+64
Support for seeking is limited. Using the d_off and d_reclen members of struct dirent is discouraged, especially with readdir. Concurrent modification of directories during iteration may result in duplicate or missing etnries.
2025-05-15manual: add remaining CPU_* macrosDJ Delorie1-9/+168
Adds remaining CPU_* macros, including the CPU_*_S macros for dynamic-sized cpu sets. Reviewed-by: Collin Funk <collin.funk1@gmail.com>
2025-05-14Implement C23 rootn.Joseph Myers1-0/+16
C23 adds various <math.h> function families originally defined in TS 18661-4. Add the rootn functions, which compute the Yth root of X for integer Y (with a domain error if Y is 0, even if X is a NaN). The integer exponent has type long long int in C23; it was intmax_t in TS 18661-4, and as with other interfaces changed after their initial appearance in the TS, I don't think we need to support the original version of the interface. As with pown and compoundn, I strongly encourage searching for worst cases for ulps error for these implementations (necessarily non-exhaustively, given the size of the input space). I also expect a custom implementation for a given format could be much faster as well as more accurate, although the implementation is simpler than those for pown and compoundn. This completes adding to glibc those TS 18661-4 functions (ignoring DFP) that are included in C23. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118592 regarding the C23 mathematical functions (not just the TS 18661-4 ones) missing built-in functions in GCC, where such functions might usefully be added. Tested for x86_64 and x86, and with build-many-glibcs.py.
2025-05-14powerpc64le: Remove configure check for objcopy >= 2.26.Stefan Liebler1-4/+0
Due to raising the minimum binutils version to >= 2.26, the configure check for testing support of --update-section is not needed anymore. Reviewed-by: Peter Bergner <bergner@tenstorrent.com>
2025-05-14Raise the minimum binutils version to 2.39Stefan Liebler1-3/+1
The recent commit 27b96e069aad17cefea9437542180bff448ac3a0 raises the minimum GCC version to 12.1 which was released in 2022. The current minimum bintuils version 2.25 was released end of 2014. This patch now raises the minimum binutils version to 2.39 which was also released in 2022. The hint for ARC is not needed anymore. In sysdeps/[alpha|hppa|csky]/configure.ac, PIE is unsupported with this comment: PIE builds fail on binutils 2.37 and earlier, see: https://sourceware.org/bugzilla/show_bug.cgi?id=28672 This patch keeps PIE unsupported and let the machine maintainers test and enable it later. In sysdeps/arm/configure.ac, there is a check whether TPOFF relocs with addends are assembled correctly, which is known to be broken in binutils 2.24 and 2.25. See: https://sourceware.org/bugzilla/show_bug.cgi?id=18383 This patch keeps the check as is and let the machine maintainers check if it still required. According to Florian Weimer: Having at least binutils 2.38 will allow us to assume that this linker bug is fixed: Bug 28743 - -z relro creats holes in the process image on GNU/Linux <https://sourceware.org/bugzilla/show_bug.cgi?id=28743> Reviewed-by: Florian Weimer <fweimer@redhat.com>
2025-05-12manual: fix typo for sched_[sg]etattrDJ Delorie1-2/+2
Originally added in 41a90f3f5f which says it's adding sched_getattr and sched_setattr. Reviewed-by: Collin Funk <collin.funk1@gmail.com>
2025-05-12Document all CLOCK_* valuesJoseph Myers1-1/+30
The manual documents CLOCK_REALTIME and CLOCK_MONOTONIC but not other CLOCK_* values. Add documentation of the POSIX clocks CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID, along with a reference to the Linux man pages for the semantics of the Linux-specific clocks supported (as with some other functionality coming direct from the Linux kernel where the man pages can be considered the main documentation). Note: CLOCK_MONOTONIC_RAW, CLOCK_REALTIME_COARSE and CLOCK_MONOTONIC_COARSE are also defined in the toplevel bits/time.h, as used for Hurd. Nevertheless, I see no sign that the Hurd code in glibc actually has any support for those clocks, so I think it is correct to document them as Linux-specific (and to refer only to the Linux man pages for their semantics). Reviewed-by: Carlos O'Donell <carlos@redhat.com>
2025-05-09Implement C23 compoundnJoseph Myers1-0/+16
C23 adds various <math.h> function families originally defined in TS 18661-4. Add the compoundn functions, which compute (1+X) to the power Y for integer Y (and X at least -1). The integer exponent has type long long int in C23; it was intmax_t in TS 18661-4, and as with other interfaces changed after their initial appearance in the TS, I don't think we need to support the original version of the interface. Note that these functions are "compoundn" with a trailing "n", *not* "compound" (CORE-MATH has the wrong name, for example). As with pown, I strongly encourage searching for worst cases for ulps error for these implementations (necessarily non-exhaustively, given the size of the input space). I also expect a custom implementation for a given format could be much faster as well as more accurate (I haven't tested or benchmarked the CORE-MATH implementation for binary32); this is one of the more complicated and less efficient functions to implement in a type-generic way. As with exp2m1 and exp10m1, this showed up places where the powerpc64le IFUNC setup is not as self-contained as one might hope (in this case, without the changes specific to powerpc64le, there were undefined references to __GI___expf128). Tested for x86_64 and x86, and with build-many-glibcs.py.