From: "Jonathan M. Wilbur" <jonathan@wilbur.space>
To: linux-kernel@vger.kernel.org
Subject: Skip building vDSO entirely
Date: Thu, 26 Sep 2024 09:48:28 +0000 [thread overview]
Message-ID: <J8ZEKS.JKAFCY4LP2XL1@wilbur.space> (raw)
Hello,
I am trying to build the Linux kernel with as minimal tooling as
possible. To give you an idea, I am writing binaries like "bc" that are
hard-coded to do only what their invocation in the Linux kernel build
steps require and nothing more, and I plan to do something similar for
"ld" in the form of a single-file C program that can perform the
absolutely minimal linking needed to build the kernel.
Based on my research, it looks like not a whole lot is actually needed
from the linker. I believe a minimal kernel should be able to be built
using static linking with few special flags, if any. However, the one
big barnacle in all this is that vDSO is a shared library and seems to
require a lot of shared-object functionality from ld. If vDSO could be
omitted from the build, it would cut down on the code footprint needed
to build the Linux kernel significantly. I tried setting CONFIG_VDSO to
"n" and CONFIG_HAVE_GENERIC_VDSO to "n" and neither of these resulted
in the vDSO shared object's omission from the build. I even ran an
"allnoconfig" build of the Linux kernel, and I see that the vDSO shared
object is still getting linked. Eventually, I ended up modifying the
Makefiles only to find that I got linker errors ("undefined reference").
I wanted to ask (1) if I am doing something wrong and there actually is
a way to skip vDSO (on x86 / x86-64), and (2) whether for some
technical reason, vDSO absolutely must be built, even if this feature
is not made available to userspace.
Thank you in advance,
- Jonathan M. Wilbur
reply other threads:[~2024-09-26 9:48 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=J8ZEKS.JKAFCY4LP2XL1@wilbur.space \
--to=jonathan@wilbur.space \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox