[uClibc]Correct fix for uClibc_syscall_exit

Manuel Novoa III mnovoa3 at bellsouth.net
Sun Jan 7 18:38:15 UTC 2001


Erik,

This time it is correct.  ;-)
-----------------------------------------------
#define uClibc_syscall_exit(type,name,type1,arg1) \
__asm__ ( \
".text\n.align 4\n.global "###name"\n"#name":;\npushl %ebp;\n" \
"movl %esp,%ebp;\nsubl $4,%esp;\npushl %ebx;\nmovl 8(%ebp),%ebx;\n" \
"jmp _start_exit" \
)

#define unified_syscall_body(name) \
__asm__ ( \
".text\n.align 4\n.global "###name"\n"#name":\nmovb $"__STR_NR_##name \
",%al;\n jmp __uClibc_syscall" \
)

-----------------------------------------------
The whole idea was to eliminate linking in __uClibc_syscall for something
like bin/true or bin/false where the only syscall done is _exit.  In my haste,
I forgot the exit code.  :-(  I also added an align directive to both
uClibc_syscall_exit and unified_syscall_body. 

The correct file is attached below.

Manuel


-------------- next part --------------
A non-text attachment was scrubbed...
Name: unified_syscall_i386.h
Type: text/x-c
Size: 1055 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/uclibc/attachments/20010107/3706f9a4/attachment.bin 


More information about the uClibc mailing list