From 38334018ff9ea088c24afd6c2a5b3baa12b6110e Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 13 Feb 1996 07:05:16 +0000 Subject: Tue Feb 13 00:12:12 1996 Roland McGrath * 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. --- sysdeps/i386/dl-machine.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'sysdeps/i386/dl-machine.h') 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. */ -- cgit v1.2.3