[uClibc] sparc32 linux syscall fixes

Stefan Holst mail at s-holst.de
Fri Mar 19 23:48:45 UTC 2004


On 03/19, Erik Andersen wrote:
> I'm extremely hesitant to apply this one...  Doing a
> 
>     grep -r __NR_socket /usr/src/linux-2.6.4/include/
> 
> shows mips, parisc, ia64, x86_64, sparc, alpha, and sparc64 at
> least seem to think they have a __NR_socket syscall, and some of
> these arches do not have __NR_socketcall....  I think this part
> of the patch needs a bit more thought before going in.

done some digging, here are the results:
all non-sparc architectures with __NR_socket defined seem
to implement this syscall (according to syscall tables).
the problem is therefore sparc-specific and the reason is
that linux supports a sunos emulation mode in which
__NR_socket is implemented but __NR_socketcall is not.
moreover, in sparc64 native linux syscall table (64 bit version)
both syscalls are implemented.

i'd suggest a config option like CONFIG_SUNOS_EMUL
for linux/sparc to determine which syscall to use. maybe there
will be some more differences discovered later on and 
legitimate this more generic toggle.

if you are fine with that, i'll do a patch this way.

-- 
RY  Stefan
+-----------------+----------------+
| mail at s-holst.de | www.s-holst.de |
+-----------------+----------------+



More information about the uClibc mailing list