diff options
author | Sergey Bugaev <bugaevc@gmail.com> | 2023-03-19 18:09:51 +0300 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2023-04-03 00:56:34 +0200 |
commit | 543f0cfc9a82db19cc7e52c27dbdbeccd4fe68ea (patch) | |
tree | b6024d6d0fec27e7f226075c0df901c93aa3bf42 /stdio-common/scanf8.c | |
parent | 6a73ea505bc47fdb148f3fe506c1ed3f3d76db46 (diff) | |
download | glibc-543f0cfc9a82db19cc7e52c27dbdbeccd4fe68ea.tar glibc-543f0cfc9a82db19cc7e52c27dbdbeccd4fe68ea.tar.gz glibc-543f0cfc9a82db19cc7e52c27dbdbeccd4fe68ea.tar.bz2 glibc-543f0cfc9a82db19cc7e52c27dbdbeccd4fe68ea.zip |
hurd: Disable O_TRUNC and FS_RETRY_MAGICAL in rtld
hurd/lookup-retry.c is compiled into rtld, the dynamic linker/loader. To
avoid pulling in file_set_size, file_utimens, tty/ctty stuff, more
string/memory code (memmove, strncpy, strcpy), and more strtoul/itoa
code, compile out support for O_TRUNC and FS_RETRY_MAGICAL when building
hurd/lookup-retry.c for rtld. None of that functionality is useful to
rtld during startup anyway. Keep support for FS_RETRY_MAGICAL("/"),
since that does not pull in much, and is required for following absolute
symlinks.
The large number of extra code being pulled into rtld was noticed by
reviewing librtld.map & elf/librtld.os.map in the build tree.
It is worth noting that once libc.so is loaded, the real __open, __stat,
etc. replace the minimal versions used initially by rtld -- this is
especially important in the Hurd port, where the minimal rtld versions
do not use the dtable and just pass real Mach port names as fds. Thus,
once libc.so is loaded, rtld will gain access to the full
__hurd_file_name_lookup_retry () version, complete with FS_RETRY_MAGICAL
support, which is important in case the program decides to
dlopen ("/proc/self/fd/...") or some such.
Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
Message-Id: <20230319151017.531737-9-bugaevc@gmail.com>
Diffstat (limited to 'stdio-common/scanf8.c')
0 files changed, 0 insertions, 0 deletions