On Thu, Dec 30, 2010 at 8:30 PM, Joseph S. Myers <jos...@codesourcery.com> wrote: > On Thu, 30 Dec 2010, H.J. Lu wrote: > >> On Thu, Dec 30, 2010 at 10:42 AM, Joseph S. Myers >> <jos...@codesourcery.com> wrote: >> > On Thu, 30 Dec 2010, H.J. Lu wrote: >> > >> >> Hi, >> >> >> >> This patch adds 32bit x86-64 support to binutils. Support in compiler, >> >> library and OS is required to use it. It can be used to implement the >> >> new 32bit OS for x86-64. Any comments? >> > >> > Do you have a public psABI document? I think the psABI at the ELF level >> > needs to come before the binutils bits, at the function call level needs >> > to come before the GCC bits, etc. >> >> The psABI is the same as x86-64 psABI, except for 32bit ELF instead of >> 64bit. > > I don't think that's an adequate description. If the "ILP32" name is > accurate then it's certainly wrong at the C level since some type sizes > are different, with effects in turn on such things as the description of > initial stack layout storing argv. At the ELF level are you saying that > each relocation applies to a relocatable field of the same width as for > 64-bit (but with the width of the addend being restricted, of course)? Do > any relocations applying to word64 fields need 32-bit variants applying to > word32 for the ILP32 ABI? > > The right thing to do would be to go through the ABI sources and prepare a > patch adding a description of the ILP32 ABI at least place where any > change is needed. > >> > the problems that have plagued the MIPS n32 syscall ABI, which seems like >> > a similar case? >> >> Can you describe MIPS n32 problems? > > Syscalls sometimes need three different versions in the kernel; sometimes > the wrong version gets put in the n32 syscall table. Special syscall > wrappers are often needed in glibc; although for most purposes the glibc > port is a 32-bit one, including having separate functions for 32-bit and > 64-bit off_t, syscalls tend to need to be called in the 64-bit way (long > long values as single arguments, in particular).
Would be nice if LFS would be mandatory on the new ABI, thus off_t being 64bits. Richard.