l4-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: status of l4-hurd


From: Jean Wolter
Subject: Re: status of l4-hurd
Date: 04 Sep 2001 11:38:08 +0200

Michael Hohmuth <address@hidden> writes:

> Farid Hajji <address@hidden> writes:
> > Did you generate this modified library manually, or do you use
> > some kind of {sed,perl,awk...}script that would work on the most
> > actual glibc versions?
> 
> I mostly forgot, but I seem to remember that Jean Wolter (who
> implemented this hack) just modified a single macro in Glibc.  I'm
> Cc'ing him this message and hope that he will elaborate.

I did it manually. The diff contains about  37 Lines in about 7 files.

/home/jw5/src/port/diffs> grep "^---" diff.glib 
--- glibc-2.0.7t/sysdeps/unix/sysv/linux/i386/brk.c 
--- glibc-2.0.7t/sysdeps/unix/sysv/linux/i386/clone.S 
--- glibc-2.0.7t/sysdeps/unix/sysv/linux/i386/mmap.S 
--- glibc-2.0.7t/sysdeps/unix/sysv/linux/i386/sigaction.c 
--- glibc-2.0.7t/sysdeps/unix/sysv/linux/i386/socket.S 
--- glibc-2.0.7t/sysdeps/unix/sysv/linux/i386/syscall.S 
--- glibc-2.0.7t/sysdeps/unix/sysv/linux/i386/sysdep.h 

The diff defines three macros and replaces int $0x80 with an
invocation of the macro. I could could have done this using sed and some
other tools, but I used Emacs 'search and replace' since I had to do it
only once. sysdep.h contains the necessary macros, the other .c and .S
files invoke them.

/home/jw5/src/port/diffs> grep "^[-+][^-+]" diff.glib 

-       C_INVOKE_SYSCALL       /* Perform the system call.  */
+       "int $0x80 # %2\n"      /* Perform the system call.  */
-       ASM_INVOKE_SYSCALL
+       int     $0x80
-       ASM_INVOKE_SYSCALL
+       int $0x80
-               C_INVOKE_SYSCALL
+               "int $0x80\n"
-       ASM_INVOKE_SYSCALL
+       int $0x80
-       ASM_INVOKE_SYSCALL      /* Do the system call.  */
+       int $0x80               /* Do the system call.  */
-#define L4Linux
-#ifdef L4Linux
-#define C_INVOKE_SYSTEM_CALL                                                 \
-                   "1:                 \n\t"                                 \
-                   "pushl $2f          \n\t"                                 \
-                   "pushl $0xa0008000  \n\t"                                 \
-                   "ret                \n\t"                                 \
-                   "jmp 1b             \n\t"                                 \
-                   "2:                 \n\t"
-#define ASM_INVOKE_SYSTEM_CALL                                               \
-                   1:;                                                       \
-                   pushl $2f;                                                \
-                   pushl $0xa0008000;                                        \
-                   ret;                                                      \
-                   jmp 1b;                                                   \
-                   2:;
-#undef DO_CALL
-#define DO_CALL(args, syscall_name)                                          \
-    PUSHARGS_##args                                                          \
-    DOARGS_##args                                                            \
-    movl $SYS_ify (syscall_name), %eax;
      \
-    ASM_INVOKE_SYSCALL
-    POPARGS_##args
-#else
-#endif

Jean
-- 
I get up each morning, gather my wits.
Pick up the paper, read the obits.
if I'm not there I know I'm not dead.
So I eat a good breakfast and go back to bed. Peete Seeger



reply via email to

[Prev in Thread] Current Thread [Next in Thread]