about summary refs log tree commit diff
path: root/sysdeps/i386/dl-machine.h
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1996-02-13 07:05:16 +0000
committerRoland McGrath <roland@gnu.org>1996-02-13 07:05:16 +0000
commit38334018ff9ea088c24afd6c2a5b3baa12b6110e (patch)
treee9f7d34d82c062e2140e8affd34c8c2e70f7fd28 /sysdeps/i386/dl-machine.h
parentdbdb6189d5d66b165b4b502498572cbe7e78874e (diff)
downloadglibc-38334018ff9ea088c24afd6c2a5b3baa12b6110e.tar.gz
glibc-38334018ff9ea088c24afd6c2a5b3baa12b6110e.tar.xz
glibc-38334018ff9ea088c24afd6c2a5b3baa12b6110e.zip
Tue Feb 13 00:12:12 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
	* sysdeps/i386/dl-machine.h (ELF_MACHINE_RUNTIME_TRAMPOLINE,
	elf_machine_relplt): New macros.
	* elf/dl-runtime.c: New file.
	* sysdeps/i386/dl-runtime.c, sysdeps/stub/dl-runtime.c: Files removed.
	* sysdeps/i386/dl-machine.h (ELF_MACHINE_RUNTIME_TRAMPOLINE,
	elf_machine_relplt): New macros.
	* elf/dl-runtime.c: New file.
	* sysdeps/i386/dl-runtime.c, sysdeps/stub/dl-runtime.c: Files removed.
Diffstat (limited to 'sysdeps/i386/dl-machine.h')
-rw-r--r--sysdeps/i386/dl-machine.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/sysdeps/i386/dl-machine.h b/sysdeps/i386/dl-machine.h
index 4ce4d4b001..8f720736f0 100644
--- a/sysdeps/i386/dl-machine.h
+++ b/sysdeps/i386/dl-machine.h
@@ -157,8 +157,20 @@ elf_machine_runtime_setup (struct link_map *l, int lazy)
 	 the offset on the stack, and then jump to the resolved address.  */
       got[2] = (Elf32_Addr) &_dl_runtime_resolve;
     }
-}
 
+  /* This code is used in dl-runtime.c to call the `fixup' function
+     and then redirect to the address it returns.  */
+#define ELF_MACHINE_RUNTIME_TRAMPOLINE asm ("\
+	.globl _dl_runtime_resolve
+	.type _dl_runtime_resolve, @function
+_dl_runtime_resolve:
+	call fixup	# Args pushed by PLT.
+	addl $8, %esp	# Pop args.
+	jmp *%eax	# Jump to function address.
+");
+/* The PLT uses Elf32_Rel relocs.  */
+#define elf_machine_relplt elf_machine_rel
+}
 
 /* Mask identifying addresses reserved for the user program,
    where the dynamic linker should not map anything.  */