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: Add Linux/x32 sysdep.h


On Wed, May 16, 2012 at 3:45 PM, Roland McGrath <roland@hack.frob.com> wrote:
>> ? ? ? * sysdeps/unix/sysv/linux/x86_64/sysdep.h
>> ? ? ? (SYSCALL_SET_ERROR_RETURN): ?New.
>
> Spurious double space here.
>
>> ? ? ? (SYSCALL_ERROR_HANDLER): Use R*LP on long and pointer
>> ? ? ? Use SYSCALL_SET_ERROR_RETURN to set error return.
>>
>> ? ? ? * sysdeps/unix/sysv/linux/x86_64/x32/llseek.S: New file.
>> ? ? ? * sysdeps/unix/sysv/linux/x86_64/x32/sysdep.h: Likewise.
>
> No blank line here, because these are all part of one logical change.
>
>> --- /dev/null
>> +++ b/sysdeps/unix/sysv/linux/x86_64/x32/llseek.S
>> @@ -0,0 +1,35 @@
>> +/* Copyright (C) 2012 Free Software Foundation, Inc.
>> + ? This file is part of the GNU C Library.
>
> Every single time you add a new file, make the top line a descriptive comment.
>
>> +/* Set error return to 64-bit -1 since the lseek system call returns a
>> + ? 64-bit integer. ?*/
>> +#undef SYSCALL_SET_ERROR_RETURN
>> +#define SYSCALL_SET_ERROR_RETURN or $-1, %rax
>> +
>> +PSEUDO (__libc_lseek64, lseek, 3)
>> + ? ? ret
>> +PSEUDO_END (__libc_lseek64)
>
> What does the non-PIC llseek.o look like?
> I bet it jumps to __syscall_error, and so does the wrong thing.
>
> Exactly what I suggested still seems better. ?If you find a different way
> to make the non-PIC case right, I bet it will be more convoluted and
> harder to read.
>

I will fix them.  Thanks.


-- 
H.J.


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