Re: /usr/bin/ld.so as a symbolic link for the dynamic loader

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Do, 02.12.21 19:38, Florian Weimer (fweimer@xxxxxxxxxx) wrote:

> It would go into glibc-common on x86-64, and the initial version won't
> be able to launch 32-bit programs (“wrong ELF class: ELFCLASS32”).

"the initial version"? That phrasing makes me wonder, what longer term
plans do you have in mind for this? i.e. do you intend to support
other archs, and if so, how? Chain-load the right ld.so in case the
binary is not native?

Another question: in systemd we have code to be able to boot from just
a /usr/ partition, with the root file system being an empty tmpfs
initially. For that to work we have to set up a basic file system
tree, since /usr/ alone is not sufficient — most importantly we have
to set up the right symlinks for /lib/ + /lib64/, since the ELF
interpreter is after all hardcoded in the ELF headers of the various
dynamic binaries in accordance with the ABI of the architecture, and
the ELF interpreter for most archs is placed in /lib/ or
/lib64/. Right now we include a table with the right symlinks we have
to create for each architecture we want to support. If your new
symlink in /usr/bin/ to the right ld.so becomes API though we could
drop this table in the long run, and instead just readlink() your
symlink and thus know which of /lib/ and /lib64/ we actually have to
symlink. Hence my question: do you intend to make this API? i.e. that
this is a symlink? Because only if it's officially API that this is a
symlink (and not a regular file/hardlink) and that it always points to
the interpreter for the primary architecture of the system, in
accordance with the ELF ABI docs we can rely on it.

Lennart

--
Lennart Poettering, Berlin
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux