aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/i386/dl-machine.h
diff options
context:
space:
mode:
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. */