From f1703dfbaa221da46f40b698359be2b048e5d6ad Mon Sep 17 00:00:00 2001 From: Peter Wemm Date: Sun, 5 May 1996 07:56:21 +0000 Subject: Add support to enable libc to be compiled in ELF format. (#ifdef __ELF__) In a nutshell, this macroizes the local/global symbol scoping rules that are different in a.out and ELF. It also makes the i386 assembler stubs conform to i386 PIC calling conventions - the a.out ld.so didn't object, but the ELF one needs it as it implements PIC jumps via PLT's as well as calls. The a.out rtld only worked because it was accidently snooping the grandparent calling function's return address off the stack.. This also affects the libc_r code a little, because of cpp macro nesting. --- lib/libc/i386/sys/sigprocmask.S | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'lib/libc/i386/sys/sigprocmask.S') diff --git a/lib/libc/i386/sys/sigprocmask.S b/lib/libc/i386/sys/sigprocmask.S index 69c50a407472..1f48c6b7c022 100644 --- a/lib/libc/i386/sys/sigprocmask.S +++ b/lib/libc/i386/sys/sigprocmask.S @@ -33,18 +33,19 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: sigprocmask.S,v 1.2 1995/01/23 01:30:11 davidg Exp $ + * $Id: sigprocmask.S,v 1.3 1996/01/22 00:00:59 julian Exp $ */ #if defined(SYSLIBC_RCS) && !defined(lint) .text - .asciz "$Id: sigprocmask.S,v 1.2 1995/01/23 01:30:11 davidg Exp $" + .asciz "$Id: sigprocmask.S,v 1.3 1996/01/22 00:00:59 julian Exp $" #endif /* SYSLIBC_RCS and not lint */ #include "SYS.h" err: - jmp cerror + PIC_PROLOGUE + jmp PIC_PLT(HIDENAME(cerror)) #ifdef _THREAD_SAFE ENTRY(_thread_sys_sigprocmask) @@ -59,8 +60,8 @@ ENTRY(sigprocmask) jmp 2f 1: movl (%ecx),%ecx # fetch indirect ... movl %ecx,8(%esp) # to new mask arg -2: movl $ SYS_sigprocmask , %eax - LCALL(0x7,0) +2: lea SYS_sigprocmask,%eax + KERNCALL jb err movl 12(%esp),%ecx # fetch old mask requested cmpl $0,%ecx # test if old mask requested -- cgit v1.2.3