This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH v2] Enable VDSO on statically linked programs.
- From: Florian Weimer <fweimer at redhat dot com>
- To: Rafael Avila de Espindola <rafael at espindo dot la>
- Cc: "libc-alpha\@sourceware.org" <libc-alpha at sourceware dot org>, "H.J. Lu" <hjl dot tools at gmail dot com>
- Date: Mon, 24 Sep 2018 10:43:04 +0200
- Subject: Re: [PATCH v2] Enable VDSO on statically linked programs.
- References: <Rt9LNuZNJXNeI-mSgZ_YAja7MzVVLO7IYVyN2uyhHcnpBpJH9yzQATx-2GaiHZoMA6mScM6GvrheNFkdCQK4ZGmDbbXhVJ-RI1dp0AGlezAfirstname.lastname@example.org> <email@example.com> <W5sYikw0DaVk1krLyx4p7_DQVVuFoN1agBD3T1DJiyz7J9F_O8u4UrVKGpCD6_zeL2SlkwEDbbUJwVgF_8Hrfth-GtogXm2QO5BrbD5FkAIfirstname.lastname@example.org>
* Rafael Avila de Espindola:
> "Florian Weimer" <email@example.com> writes:
>> * Rafael Avila de Espindola:
>>> The new version has fixed the indentation of preprocessor directives
>>> and changed a few tests to also be linked statically. The tests don't
>>> show that the VDSO is being used, but show that the functions now
>>> using the VDSO still work.
>> What's the size impact on binaries which did not need rtld before?
> In a trivial program that just calls clock_gettime and printf size
> text data bss dec hex filename
> 641724 20940 6016 668680 a3408 t-glibc
> 642500 20940 6048 669488 a3730 t-glibc-vdso
> So it looks like most of the relevant code was already being linked in.
Hmm, right. printf pulls in dlopen (via libio and gconv), so it is not
the right symbol test.
It currently seems to be impossible to link without dlopen because libio
is always included. However, we want to remove the dependency of libio
(and NSS) on dlopen in the static case, so eventually, that will change.
I guess once this has happened, we can probably build a stripped-down
version of rtld just for processing the vDSO.