From 4b7195c99191637bf59fd4ad626297296bf3610f Mon Sep 17 00:00:00 2001 From: peter 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/exect.S | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'lib/libc/i386/sys/exect.S') diff --git a/lib/libc/i386/sys/exect.S b/lib/libc/i386/sys/exect.S index 74a055b..59ce389 100644 --- a/lib/libc/i386/sys/exect.S +++ b/lib/libc/i386/sys/exect.S @@ -33,12 +33,12 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: exect.S,v 1.1 1994/08/05 01:18:42 wollman Exp $ + * $Id: exect.S,v 1.2 1995/01/23 01:29:46 davidg Exp $ */ #if defined(SYSLIBC_RCS) && !defined(lint) .text - .asciz "$Id$" + .asciz "$Id: exect.S,v 1.2 1995/01/23 01:29:46 davidg Exp $" #endif /* SYSLIBC_RCS and not lint */ #include "SYS.h" @@ -51,5 +51,6 @@ ENTRY(exect) orl $ PSL_T,%edx pushl %edx popf - LCALL(7,0) - jmp cerror /* exect(file, argv, env); */ + KERNCALL + PIC_PROLOGUE + jmp PIC_PLT(HIDENAME(cerror)) /* exect(file, argv, env); */ -- cgit v1.1