This is the mail archive of the
mailing list for the glibc project.
Re: PATCH: Add Linux/x32 sysdep.h
> Leaving out SYSCALL_RETURN_INT64 makes is impossible to test
> the change on Linux/x32.
It only leaves lseek broken. Everything else will be fine.
But if you prefer, we can do lseek first instead.
It's really just more obfuscation to use syscall-template.S for that.
What I'd do is just write it out:
/* lseek system call stub for Linux/x32.
/* Comment about why this is needed at all. */
#define SYSCALL_ERROR_LABEL 0f
PSEUDO (__libc_lseek64, lseek, 3)
Then modify x86_64/sysdep.h so it defines a macro SYSCALL_SET_ERRNO
that is just the part of SYSCALL_ERROR_HANDLER after the label and
before setting %rax. Then it's:
orq $-1, %rax /* Return -1LL in a full 64 bits. */
You can do the break-out of the SYSCALL_SET_ERRNO macro and the addition of
x32/llseek.S in one change. Then you can make the existing sysdep.h macros
uses R*_LP macros in a second change.