This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v4] Enable VDSO on x86_64 statically linked programs.
- From: Rafael Avila de Espindola <rafael at espindo dot la>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: Florian Weimer <fweimer at redhat dot com>, GNU C Library <libc-alpha at sourceware dot org>, "szabolcs.nagy" <szabolcs dot nagy at arm dot com>
- Date: Tue, 20 Nov 2018 17:25:03 +0000
- Subject: Re: [PATCH v4] Enable VDSO on x86_64 statically linked programs.
- References: <RGVOvESiWL9rORzqdlMj8F4Z-GPqaLH_b-oN-2Sd9BnVpVwllUDIcl9l0SLea0upmTEAWddbNsnqSWferS9awDUGk6N9yiFkQJCMAQd-5C8=@espindo.la> <877ehiqwmb.fsf@oldenburg.str.redhat.com> <2L5vAwL1Dbn5HAap_wUEZpI24EF_Tlwhc88DvKmxb-yHd_Qxdc8A9wHavFzKr11pj-kD44Q-fIE0PubxE5qvepV9WK_Rg8isazIA3Sw6pa4=@espindo.la> <CAMe9rOpTs-VBdwjcfkz2A_VfdSCC56dgfCMPxL3Sb5U=+QuuKA@mail.gmail.com>
- Reply-to: Rafael Avila de Espindola <rafael at espindo dot la>
"H.J. Lu" <hjl.tools@gmail.com> writes:
> On Mon, Nov 12, 2018 at 2:38 PM Rafael Avila de Espindola
> <rafael@espindo.la> wrote:
>>
>> > > object-suffixes += .os
>> > > -CPPFLAGS-.os = -DPIC -DSHARED
>> > > +CPPFLAGS-.os = -DPIC -DSHARED -DUSE_VSYSCALL
>> > > CFLAGS-.os = $(filter %frame-pointer,$(+cflags)) $(pic-ccflag)
>> > > libtype.os := lib%_pic.a
>> > >
>> > > This can be changed by a sysdep makefile
>> > >
>> > > =========================================
>> >
>> > This doesn't seem to be the right place to define the macro. We also
>> > prefer macros that are always defined and which change there value
>> > between 0 and 1.
>> >
>> > USE_VSYSCALL seems to be a Linux thing and thus should go into
>> > sysdeps/unix/sysv/linux.
>> >
>> > It may be clearer to define
>> >
>> > #define USE_VSYSCALL (defined (SHARED) || ALWAYS_USE_VSYSCALL)
>> >
>> > and then default ALWAYS_USE_VSYSCALL to 0 and override that to 1 for
>> > x86_64.
>>
>>
>> Thanks. A new version is attached and it uses your suggestion.
>>
>> The new ChangeLog is
>>
>> 2018-11-12 Rafael Ávila de Espíndola <rafael@espindo.la>
>>
>> [BZ #19767]
>> * nptl/Makefile: Add tst-cond11-static to tests-static and tests.
>> * nptl/tst-cond11-static.c: New File.
>> * sysdeps/unix/sysv/linux/Makefile: Add tst-affinity-static to
>> tests-static and tests
>> * sysdeps/unix/sysv/linux/sysdep-vdso.h: Use USE_VSYSCALL instead
>> of SHARED.
>> * sysdeps/unix/sysv/linux/sysdep.h: Define ALWAYS_USE_VSYSCALL and
>> USE_VSYSCALL.
>> * sysdeps/unix/sysv/linux/tst-affinity-static.c: New file.
>> * sysdeps/unix/sysv/linux/x86/libc-vdso.h: Use USE_VSYSCALL
>> instead of SHARED.
>> * sysdeps/unix/sysv/linux/x86_64/init-first.c: remove #ifdef SHARED.
>> * sysdeps/unix/sysv/linux/x86_64/sysdep.h: define ALWAYS_USE_VSYSCALL.
>>
>>
>
> LGTM.
If you could commit it that would be awesome.
Thanks,
Rafael