Author: archaic Date: 2005-02-22 17:01:20 -0700 (Tue, 22 Feb 2005) New Revision: 846
Added: trunk/hlfs/linux-libc-headers-2.6.10.0-unistd_x86_PIC-1.patch trunk/linux-libc-headers/linux-libc-headers-2.6.10.0-unistd_x86_PIC-1.patch Log: Added PIC patch for linux-libc-headers. Added: trunk/hlfs/linux-libc-headers-2.6.10.0-unistd_x86_PIC-1.patch =================================================================== --- trunk/hlfs/linux-libc-headers-2.6.10.0-unistd_x86_PIC-1.patch 2005-02-22 04:21:56 UTC (rev 845) +++ trunk/hlfs/linux-libc-headers-2.6.10.0-unistd_x86_PIC-1.patch 2005-02-23 00:01:20 UTC (rev 846) @@ -0,0 +1,175 @@ +Submitted By: Robert Connolly <robert at linuxfromscratch dot org> (ashes) +Date: 2005-02-22 +Initial Package Version: 2.6.10.0 +Upstream Status: Not submitted +Origin: Gentoo - unistd.h-i386-pic.patch +Description: This patch adds position independent assembly for syscalls. +This fixes problems with llseek(), util-linux, vsftpd, proftpd, and more. + +Also see: +http://www.linuxfromscratch.org/hlfs/ + +diff -Naur linux-libc-headers-2.6.10.0.orig/include/asm-i386/unistd.h linux-libc-headers-2.6.10.0/include/asm-i386/unistd.h +--- linux-libc-headers-2.6.10.0.orig/include/asm-i386/unistd.h 2005-01-08 14:04:09.000000000 +0000 ++++ linux-libc-headers-2.6.10.0/include/asm-i386/unistd.h 2005-02-22 10:34:01.836076592 +0000 +@@ -321,6 +321,21 @@ + __syscall_return(type,__res); \ + } + ++#ifdef __PIC__ ++#define _syscall1(type,name,type1,arg1) \ ++type name(type1 arg1) \ ++{ \ ++long __res; \ ++__asm__ volatile (\ ++ "pushl %%ebx\n\t" \ ++ "movl %2,%%ebx\n\t" \ ++ "int $0x80\n\t" \ ++ "popl %%ebx\n\t" \ ++ : "=a" (__res) \ ++ : "0" (__NR_##name),"r" ((long)(arg1))); \ ++__syscall_return(type,__res); \ ++} ++#else + #define _syscall1(type,name,type1,arg1) \ + type name(type1 arg1) \ + { \ +@@ -330,7 +345,23 @@ + : "0" (__NR_##name),"b" ((long)(arg1))); \ + __syscall_return(type,__res); \ + } ++#endif + ++#ifdef __PIC__ ++#define _syscall2(type,name,type1,arg1,type2,arg2) \ ++type name(type1 arg1,type2 arg2) \ ++{ \ ++long __res; \ ++__asm__ volatile (\ ++ "pushl %%ebx\n\t" \ ++ "movl %2,%%ebx\n\t" \ ++ "int $0x80\n\t" \ ++ "popl %%ebx\n\t" \ ++ : "=a" (__res) \ ++ : "0" (__NR_##name),"r" ((long)(arg1)),"c" ((long)(arg2))); \ ++__syscall_return(type,__res); \ ++} ++#else + #define _syscall2(type,name,type1,arg1,type2,arg2) \ + type name(type1 arg1,type2 arg2) \ + { \ +@@ -340,7 +371,24 @@ + : "0" (__NR_##name),"b" ((long)(arg1)),"c" ((long)(arg2))); \ + __syscall_return(type,__res); \ + } ++#endif + ++#ifdef __PIC__ ++#define _syscall3(type,name,type1,arg1,type2,arg2,type3,arg3) \ ++type name(type1 arg1,type2 arg2,type3 arg3) \ ++{ \ ++long __res; \ ++__asm__ volatile (\ ++ "pushl %%ebx\n\t" \ ++ "movl %2,%%ebx\n\t" \ ++ "int $0x80\n\t" \ ++ "popl %%ebx\n\t" \ ++ : "=a" (__res) \ ++ : "0" (__NR_##name),"r" ((long)(arg1)),"c" ((long)(arg2)), \ ++ "d" ((long)(arg3))); \ ++__syscall_return(type,__res); \ ++} ++#else + #define _syscall3(type,name,type1,arg1,type2,arg2,type3,arg3) \ + type name(type1 arg1,type2 arg2,type3 arg3) \ + { \ +@@ -351,7 +399,24 @@ + "d" ((long)(arg3))); \ + __syscall_return(type,__res); \ + } ++#endif + ++#ifdef __PIC__ ++#define _syscall4(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \ ++type name (type1 arg1, type2 arg2, type3 arg3, type4 arg4) \ ++{ \ ++long __res; \ ++__asm__ volatile (\ ++ "pushl %%ebx\n\t" \ ++ "movl %2,%%ebx\n\t" \ ++ "int $0x80\n\t" \ ++ "popl %%ebx\n\t" \ ++ : "=a" (__res) \ ++ : "0" (__NR_##name),"r" ((long)(arg1)),"c" ((long)(arg2)), \ ++ "d" ((long)(arg3)),"S" ((long)(arg4))); \ ++__syscall_return(type,__res); \ ++} ++#else + #define _syscall4(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \ + type name (type1 arg1, type2 arg2, type3 arg3, type4 arg4) \ + { \ +@@ -362,7 +427,25 @@ + "d" ((long)(arg3)),"S" ((long)(arg4))); \ + __syscall_return(type,__res); \ + } ++#endif + ++#ifdef __PIC__ ++#define _syscall5(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \ ++ type5,arg5) \ ++type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5) \ ++{ \ ++long __res; \ ++__asm__ volatile (\ ++ "pushl %%ebx\n\t" \ ++ "movl %2,%%ebx\n\t" \ ++ "int $0x80\n\t" \ ++ "popl %%ebx\n\t" \ ++ : "=a" (__res) \ ++ : "0" (__NR_##name),"m" ((long)(arg1)),"c" ((long)(arg2)), \ ++ "d" ((long)(arg3)),"S" ((long)(arg4)),"D" ((long)(arg5))); \ ++__syscall_return(type,__res); \ ++} ++#else + #define _syscall5(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \ + type5,arg5) \ + type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5) \ +@@ -374,7 +457,30 @@ + "d" ((long)(arg3)),"S" ((long)(arg4)),"D" ((long)(arg5))); \ + __syscall_return(type,__res); \ + } ++#endif + ++#ifdef __PIC__ ++#define _syscall6(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \ ++ type5,arg5,type6,arg6) \ ++type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5,type6 arg6) \ ++{ \ ++long __res; \ ++__asm__ volatile (\ ++ "pushl %%ebp\n\t" \ ++ "movl %%eax,%%ebp\n\t" \ ++ "movl %1,%%eax\n\t" \ ++ "pushl %%ebx\n\t" \ ++ "movl %2,%%ebx\n\t" \ ++ "int $0x80\n\t" \ ++ "popl %%ebx\n\t" \ ++ "popl %%ebp\n\t" \ ++ : "=a" (__res) \ ++ : "i" (__NR_##name),"m" ((long)(arg1)),"c" ((long)(arg2)), \ ++ "d" ((long)(arg3)),"S" ((long)(arg4)),"D" ((long)(arg5)), \ ++ "0" ((long)(arg6))); \ ++__syscall_return(type,__res); \ ++} ++#else + #define _syscall6(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \ + type5,arg5,type6,arg6) \ + type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5,type6 arg6) \ +@@ -387,6 +493,7 @@ + "0" ((long)(arg6))); \ + __syscall_return(type,__res); \ + } ++#endif + + #ifdef __KERNEL_SYSCALLS__ + Added: trunk/linux-libc-headers/linux-libc-headers-2.6.10.0-unistd_x86_PIC-1.patch =================================================================== --- trunk/linux-libc-headers/linux-libc-headers-2.6.10.0-unistd_x86_PIC-1.patch 2005-02-22 04:21:56 UTC (rev 845) +++ trunk/linux-libc-headers/linux-libc-headers-2.6.10.0-unistd_x86_PIC-1.patch 2005-02-23 00:01:20 UTC (rev 846) @@ -0,0 +1 @@ +link ../hlfs/linux-libc-headers-2.6.10.0-unistd_x86_PIC-1.patch \ No newline at end of file Property changes on: trunk/linux-libc-headers/linux-libc-headers-2.6.10.0-unistd_x86_PIC-1.patch ___________________________________________________________________ Name: svn:special + * -- http://linuxfromscratch.org/mailman/listinfo/patches FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page
