The attached diff shaves four bytes from every syscall wrapper (e.g., __sys_write, etc.)
In looking carefully at library sizes, I became curious why a simple system call required 20 bytes; turns out a lot of that was alignment padding. Tim Kientzle
Index: lib/libc/i386/SYS.h =================================================================== RCS file: /mnt/cvs/src/lib/libc/i386/SYS.h,v retrieving revision 1.24 diff -c -r1.24 SYS.h *** lib/libc/i386/SYS.h 17 Sep 2002 01:48:51 -0000 1.24 --- lib/libc/i386/SYS.h 8 Nov 2002 06:15:21 -0000 *************** *** 48,54 **** .set CNAME(__CONCAT(_,x)),CNAME(__CONCAT(__sys_,x)); \ mov __CONCAT($SYS_,x),%eax; KERNCALL; jb 2b ! #define RSYSCALL(x) SYSCALL(x); ret #define PSEUDO(x) ENTRY(__CONCAT(__sys_,x)); \ .weak CNAME(__CONCAT(_,x)); \ --- 48,63 ---- .set CNAME(__CONCAT(_,x)),CNAME(__CONCAT(__sys_,x)); \ mov __CONCAT($SYS_,x),%eax; KERNCALL; jb 2b ! /* Version 1: More compact source */ ! /* #define RSYSCALL(x) SYSCALL(x); ret */ ! /* Version 2: More compact object code (fewer alignment requirements) */ ! #define RSYSCALL(x) ENTRY(__CONCAT(__sys_,x)); \ ! .weak CNAME(x); \ ! .set CNAME(x),CNAME(__CONCAT(__sys_,x)); \ ! .weak CNAME(__CONCAT(_,x)); \ ! .set CNAME(__CONCAT(_,x)),CNAME(__CONCAT(__sys_,x)); \ ! mov __CONCAT($SYS_,x),%eax; KERNCALL; jb 2f; ret; \ ! 2: PIC_PROLOGUE; jmp PIC_PLT(HIDENAME(cerror)) #define PSEUDO(x) ENTRY(__CONCAT(__sys_,x)); \ .weak CNAME(__CONCAT(_,x)); \