This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: x86: Fix x32 syscall build
- From: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Wed, 22 Apr 2015 17:56:40 -0300
- Subject: Re: x86: Fix x32 syscall build
- Authentication-results: sourceware.org; auth=none
- References: <553802B8 dot 20502 at linaro dot org> <CAMe9rOo6byGR-9c-FUpACXgH0G=MVjUoBi7m4QYBkinYN1px=g at mail dot gmail dot com>
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