[klibc] HUGE change soon coming to a klibc near you

H. Peter Anvin hpa at zytor.com
Mon Aug 23 06:25:49 PDT 2004


Olaf Hering wrote:
>  On Sun, Jun 06, H. Peter Anvin wrote:
> 
> 
>>Hold on to your hats, because the world is about to break...
>>
>>I have been trying to figure out for a while now how to migrate klibc to 
>>a 64-bit off_t, and to handle other things like getuid32().  The final 
>>decision is that the _syscall*() macros just got to go; they aren't 
>>flexible enough, and the hope that they would make it easier to port 
>>between platforms hasn't worked out - they're far too often simply broken.
> 
> 
> How does the new scheme deal with types? Some syscalls return int, some
> void * or other things.
> mmap on ppc64 would return a long int instead of a void *. errno is also
> not handled correctly.
> 

It relies on the register/stack image set up by a function call, and 
assumes there is a "general" transform that can put it into the image of 
a system call.  This seems to be true for nearly all platforms, and the 
few exceptions can be handled as just that.

At the moment, although that'll hopefully change soon, I don't have 
access to any ppc (32 or 64) systems, so I can't really vouch for 
either, unfortunately.

	-hpa



More information about the klibc mailing list