about summary refs log tree commit diff
path: root/sysdeps/i386
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/i386')
-rw-r--r--sysdeps/i386/dl-machine.h4
-rw-r--r--sysdeps/i386/elf/start.S8
2 files changed, 6 insertions, 6 deletions
diff --git a/sysdeps/i386/dl-machine.h b/sysdeps/i386/dl-machine.h
index 2aaa5b7617..394188d0e4 100644
--- a/sysdeps/i386/dl-machine.h
+++ b/sysdeps/i386/dl-machine.h
@@ -1,5 +1,5 @@
 /* Machine-dependent ELF dynamic relocation inline functions.  i386 version.
-   Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -302,8 +302,6 @@ elf_machine_plt_value (struct link_map *map, const Elf32_Rel *reloc,
 
 #ifdef RESOLVE
 
-extern char **_dl_argv;
-
 /* Perform the relocation specified by RELOC and SYM (which is fully resolved).
    MAP is the object containing the reloc.  */
 
diff --git a/sysdeps/i386/elf/start.S b/sysdeps/i386/elf/start.S
index 7416c0ace9..e8ed2043ff 100644
--- a/sysdeps/i386/elf/start.S
+++ b/sysdeps/i386/elf/start.S
@@ -1,5 +1,5 @@
 /* Startup code compliant to the ELF i386 ABI.
-   Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -88,9 +88,11 @@ _start:
 	call atexit
 	popl %eax
 
-	/* Call the user's main function, and exit with its value.  */
-	call main
+	/* Call the user's main function, and exit with its value.
+	   But let the libc call main.    */
+	movl $main, %eax
 	pushl %eax
+	call __libc_start_main
 	call exit
 	hlt			/* Crash if somehow `exit' does return.  */