This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v4] Enable VDSO on x86_64 statically linked programs.


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.

Thanks.

-- 
H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]