public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Skip building vDSO entirely
@ 2024-09-26  9:48 Jonathan M. Wilbur
  0 siblings, 0 replies; only message in thread
From: Jonathan M. Wilbur @ 2024-09-26  9:48 UTC (permalink / raw)
  To: linux-kernel

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





^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-09-26  9:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-26  9:48 Skip building vDSO entirely Jonathan M. Wilbur

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox