I got busybox running on ia64 today, which ended up being a
lot more work then expected. On most architectures, you
can use the _syscall[0-5] macros from
/usr/include/asm/unistd.h, but for some silly reason that I
don't understand, the ia64 developers made those macros
reference a kernel symbol. Ugh. I only needed two
syscalls that were not in glibc on ia64, and those I just
stuck in wrapper functions which use syscall() to do the
dirty work. Managed to shave off about 500bytes in the
process -- even more if you include insmod.
While fixing up busybox, I fixed up uClibc's syscall support
a bit by adding a few obscure syscalls also provided by
glibc. Mostly kernel module related stuff. This has the
nice side effect that busybox compiles vs uClibc again (the
syscall adjustment had broken it).