Message ID | 553802B8.20502@linaro.org |
---|---|
State | Dropped |
Headers |
Received: (qmail 93208 invoked by alias); 22 Apr 2015 20:21:20 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: <libc-alpha.sourceware.org> List-Unsubscribe: <mailto:libc-alpha-unsubscribe-##L=##H@sourceware.org> List-Subscribe: <mailto:libc-alpha-subscribe@sourceware.org> List-Archive: <http://sourceware.org/ml/libc-alpha/> List-Post: <mailto:libc-alpha@sourceware.org> List-Help: <mailto:libc-alpha-help@sourceware.org>, <http://sourceware.org/ml/#faqs> Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 93195 invoked by uid 89); 22 Apr 2015 20:21:19 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-qk0-f176.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:content-type:content-transfer-encoding; bh=XRgiGWx8Lms6GRmEE6Fnyhcm2ewHGkOBZ1bzDIPBtYA=; b=dUIJvN+YYm7NFd4BZrsRT4YAHS3PtagR8TVrJTQ/v8U0ZhUdQuEP/WzVgDJLbzbs+6 yVH4bd3qZo5erewY5dBPNZkkq5moF+wfJfuzxc63rblzBGzjxpSjAK1EGddbXBV//WM6 irPziKsByMl6Nu28KJQg1eI3ixhthSqPHXq2zmj71IB7Pjrtb+a8KVVEbBpdbm+98Gya xubb6tBg56FKhcqYEQAJBTWt8a8BRmIxfSCfAMRKZTX/+Fzka6Ksq3rUbrWqqoEXhdmP +IgUb6OD4MDcsvIKOd4aFe1olwofgA+n6ZwJa1UpZlOZD3S6Wsn4/QDqvTeMKwd03+h8 HjRg== X-Gm-Message-State: ALoCoQlFHPrdAXeLdbPQZLTI+V0c8+NQW35nbGSrAHu1/S12tElr6XUesYiv6SkdrS14M8jOq9In X-Received: by 10.55.21.87 with SMTP id f84mr53476663qkh.50.1429734075875; Wed, 22 Apr 2015 13:21:15 -0700 (PDT) Message-ID: <553802B8.20502@linaro.org> Date: Wed, 22 Apr 2015 17:21:12 -0300 From: Adhemerval Zanella <adhemerval.zanella@linaro.org> User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: libc-alpha@sourceware.org Subject: x86: Fix x32 syscall build Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit |
Commit Message
Adhemerval Zanella Netto
April 22, 2015, 8:21 p.m. UTC
Working on the vDSO refactor I noted that x86_64/x32 build is broken due some vdso declaration in syscall.list that is shadowing the default x86 implementation. This patch fixes it by removing the auto syscall generation and make x32 uses the default Linux x86 code. Tested on x32, ok to commit? -- * sysdeps/unix/sysv/linux/x86_64/x32/syscalls.list (gettimeofday): Remove definition. (time): Likewise. ---
Comments
On Wed, Apr 22, 2015 at 1:21 PM, Adhemerval Zanella <adhemerval.zanella@linaro.org> wrote: > Working on the vDSO refactor I noted that x86_64/x32 build is broken > due some vdso declaration in syscall.list that is shadowing the > default x86 implementation. This patch fixes it by removing the > auto syscall generation and make x32 uses the default Linux x86 > code. > > Tested on x32, ok to commit? > > -- > > * sysdeps/unix/sysv/linux/x86_64/x32/syscalls.list (gettimeofday): > Remove definition. > (time): Likewise. > > --- > > diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/syscalls.list b/sysdeps/unix/sysv/linux/x86_64/x32/syscalls.list > index 2cc58af..7edb6fd 100644 > --- a/sysdeps/unix/sysv/linux/x86_64/x32/syscalls.list > +++ b/sysdeps/unix/sysv/linux/x86_64/x32/syscalls.list > @@ -1,8 +1,6 @@ > # File name Caller Syscall name # args Strong name Weak names > > fallocate - fallocate Ci:iiii fallocate fallocate64 > -gettimeofday - gettimeofday:__vdso_gettimeofday@LINUX_2.6 i:pP __gettimeofday gettimeofday > posix_fadvise - fadvise64 Vi:iiii posix_fadvise posix_fadvise64 > preadv - preadv Ci:ipii preadv preadv64 > pwritev - pwritev Ci:ipii pwritev pwritev64 > -time - time:__vdso_time@LINUX_2.6 Ei:P time X32 builds fine for me without the above change. Why did it fail for you?
On 22-04-2015 17:31, H.J. Lu wrote: > On Wed, Apr 22, 2015 at 1:21 PM, Adhemerval Zanella > <adhemerval.zanella@linaro.org> wrote: >> Working on the vDSO refactor I noted that x86_64/x32 build is broken >> due some vdso declaration in syscall.list that is shadowing the >> default x86 implementation. This patch fixes it by removing the >> auto syscall generation and make x32 uses the default Linux x86 >> code. >> >> Tested on x32, ok to commit? >> >> -- >> >> * sysdeps/unix/sysv/linux/x86_64/x32/syscalls.list (gettimeofday): >> Remove definition. >> (time): Likewise. >> >> --- >> >> diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/syscalls.list b/sysdeps/unix/sysv/linux/x86_64/x32/syscalls.list >> index 2cc58af..7edb6fd 100644 >> --- a/sysdeps/unix/sysv/linux/x86_64/x32/syscalls.list >> +++ b/sysdeps/unix/sysv/linux/x86_64/x32/syscalls.list >> @@ -1,8 +1,6 @@ >> # File name Caller Syscall name # args Strong name Weak names >> >> fallocate - fallocate Ci:iiii fallocate fallocate64 >> -gettimeofday - gettimeofday:__vdso_gettimeofday@LINUX_2.6 i:pP __gettimeofday gettimeofday >> posix_fadvise - fadvise64 Vi:iiii posix_fadvise posix_fadvise64 >> preadv - preadv Ci:ipii preadv preadv64 >> pwritev - pwritev Ci:ipii pwritev pwritev64 >> -time - time:__vdso_time@LINUX_2.6 Ei:P time > > X32 builds fine for me without the above change. Why did it fail for you? > I using default toolchain on Ubuntu 14.04 and I am seeing: (echo '#include <dl-vdso.h>'; \ echo 'extern void *time_ifunc (void) __asm ("time");'; \ echo 'void *'; \ echo 'time_ifunc (void)'; \ echo '{'; \ echo ' PREPARE_VERSION_KNOWN (symver, LINUX_2_6);'; \ echo ' return _dl_vdso_vsym ("__vdso_time", &symver);'; \ echo '}'; \ echo 'asm (".type time, %gnu_indirect_function");'; \ echo 'asm (".globl __GI_time /bin/sh: 10: Syntax error: Unterminated quoted string
On Wed, Apr 22, 2015 at 1:56 PM, Adhemerval Zanella <adhemerval.zanella@linaro.org> wrote: > > > On 22-04-2015 17:31, H.J. Lu wrote: >> On Wed, Apr 22, 2015 at 1:21 PM, Adhemerval Zanella >> <adhemerval.zanella@linaro.org> wrote: >>> Working on the vDSO refactor I noted that x86_64/x32 build is broken >>> due some vdso declaration in syscall.list that is shadowing the >>> default x86 implementation. This patch fixes it by removing the >>> auto syscall generation and make x32 uses the default Linux x86 >>> code. >>> >>> Tested on x32, ok to commit? >>> >>> -- >>> >>> * sysdeps/unix/sysv/linux/x86_64/x32/syscalls.list (gettimeofday): >>> Remove definition. >>> (time): Likewise. >>> >>> --- >>> >>> diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/syscalls.list b/sysdeps/unix/sysv/linux/x86_64/x32/syscalls.list >>> index 2cc58af..7edb6fd 100644 >>> --- a/sysdeps/unix/sysv/linux/x86_64/x32/syscalls.list >>> +++ b/sysdeps/unix/sysv/linux/x86_64/x32/syscalls.list >>> @@ -1,8 +1,6 @@ >>> # File name Caller Syscall name # args Strong name Weak names >>> >>> fallocate - fallocate Ci:iiii fallocate fallocate64 >>> -gettimeofday - gettimeofday:__vdso_gettimeofday@LINUX_2.6 i:pP __gettimeofday gettimeofday >>> posix_fadvise - fadvise64 Vi:iiii posix_fadvise posix_fadvise64 >>> preadv - preadv Ci:ipii preadv preadv64 >>> pwritev - pwritev Ci:ipii pwritev pwritev64 >>> -time - time:__vdso_time@LINUX_2.6 Ei:P time >> >> X32 builds fine for me without the above change. Why did it fail for you? >> > > I using default toolchain on Ubuntu 14.04 and I am seeing: > > (echo '#include <dl-vdso.h>'; \ > echo 'extern void *time_ifunc (void) __asm ("time");'; \ > echo 'void *'; \ > echo 'time_ifunc (void)'; \ > echo '{'; \ > echo ' PREPARE_VERSION_KNOWN (symver, LINUX_2_6);'; \ > echo ' return _dl_vdso_vsym ("__vdso_time", &symver);'; \ > echo '}'; \ > echo 'asm (".type time, %gnu_indirect_function");'; \ > echo 'asm (".globl __GI_time > /bin/sh: 10: Syntax error: Unterminated quoted string Which shell is /bin/sh? Can you try bash?
On 22-04-2015 18:05, H.J. Lu wrote: > On Wed, Apr 22, 2015 at 1:56 PM, Adhemerval Zanella > <adhemerval.zanella@linaro.org> wrote: >> >> >> On 22-04-2015 17:31, H.J. Lu wrote: >>> On Wed, Apr 22, 2015 at 1:21 PM, Adhemerval Zanella >>> <adhemerval.zanella@linaro.org> wrote: >>>> Working on the vDSO refactor I noted that x86_64/x32 build is broken >>>> due some vdso declaration in syscall.list that is shadowing the >>>> default x86 implementation. This patch fixes it by removing the >>>> auto syscall generation and make x32 uses the default Linux x86 >>>> code. >>>> >>>> Tested on x32, ok to commit? >>>> >>>> -- >>>> >>>> * sysdeps/unix/sysv/linux/x86_64/x32/syscalls.list (gettimeofday): >>>> Remove definition. >>>> (time): Likewise. >>>> >>>> --- >>>> >>>> diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/syscalls.list b/sysdeps/unix/sysv/linux/x86_64/x32/syscalls.list >>>> index 2cc58af..7edb6fd 100644 >>>> --- a/sysdeps/unix/sysv/linux/x86_64/x32/syscalls.list >>>> +++ b/sysdeps/unix/sysv/linux/x86_64/x32/syscalls.list >>>> @@ -1,8 +1,6 @@ >>>> # File name Caller Syscall name # args Strong name Weak names >>>> >>>> fallocate - fallocate Ci:iiii fallocate fallocate64 >>>> -gettimeofday - gettimeofday:__vdso_gettimeofday@LINUX_2.6 i:pP __gettimeofday gettimeofday >>>> posix_fadvise - fadvise64 Vi:iiii posix_fadvise posix_fadvise64 >>>> preadv - preadv Ci:ipii preadv preadv64 >>>> pwritev - pwritev Ci:ipii pwritev pwritev64 >>>> -time - time:__vdso_time@LINUX_2.6 Ei:P time >>> >>> X32 builds fine for me without the above change. Why did it fail for you? >>> >> >> I using default toolchain on Ubuntu 14.04 and I am seeing: >> >> (echo '#include <dl-vdso.h>'; \ >> echo 'extern void *time_ifunc (void) __asm ("time");'; \ >> echo 'void *'; \ >> echo 'time_ifunc (void)'; \ >> echo '{'; \ >> echo ' PREPARE_VERSION_KNOWN (symver, LINUX_2_6);'; \ >> echo ' return _dl_vdso_vsym ("__vdso_time", &symver);'; \ >> echo '}'; \ >> echo 'asm (".type time, %gnu_indirect_function");'; \ >> echo 'asm (".globl __GI_time >> /bin/sh: 10: Syntax error: Unterminated quoted string > > Which shell is /bin/sh? Can you try bash? Indeed it seems a limitation of default /bin/sh for Ubuntu (dash).
On Wed, 22 Apr 2015, Adhemerval Zanella wrote: > > Which shell is /bin/sh? Can you try bash? > > Indeed it seems a limitation of default /bin/sh for Ubuntu (dash). See bug 16704, and the patch <https://sourceware.org/ml/libc-alpha/2015-02/msg00396.html> which needs review.
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/syscalls.list b/sysdeps/unix/sysv/linux/x86_64/x32/syscalls.list index 2cc58af..7edb6fd 100644 --- a/sysdeps/unix/sysv/linux/x86_64/x32/syscalls.list +++ b/sysdeps/unix/sysv/linux/x86_64/x32/syscalls.list @@ -1,8 +1,6 @@ # File name Caller Syscall name # args Strong name Weak names fallocate - fallocate Ci:iiii fallocate fallocate64 -gettimeofday - gettimeofday:__vdso_gettimeofday@LINUX_2.6 i:pP __gettimeofday gettimeofday posix_fadvise - fadvise64 Vi:iiii posix_fadvise posix_fadvise64 preadv - preadv Ci:ipii preadv preadv64 pwritev - pwritev Ci:ipii pwritev pwritev64 -time - time:__vdso_time@LINUX_2.6 Ei:P time