about summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1997-05-24 22:55:58 +0000
committerUlrich Drepper <drepper@redhat.com>1997-05-24 22:55:58 +0000
commit4e5f9db6ba48e0b4999d0fa50045764ef60b9c19 (patch)
treebacee82d6186bf7baa46d306a40ea8788d16c4c1
parent6cfad513039800286444b95b53fa2e621d5a33de (diff)
downloadglibc-4e5f9db6ba48e0b4999d0fa50045764ef60b9c19.tar.gz
glibc-4e5f9db6ba48e0b4999d0fa50045764ef60b9c19.tar.xz
glibc-4e5f9db6ba48e0b4999d0fa50045764ef60b9c19.zip
(elf_machine_runtime_setup): Update skeleton definition.
-rw-r--r--sysdeps/stub/dl-machine.h29
1 files changed, 18 insertions, 11 deletions
diff --git a/sysdeps/stub/dl-machine.h b/sysdeps/stub/dl-machine.h
index f44266f7b7..2e61f249d9 100644
--- a/sysdeps/stub/dl-machine.h
+++ b/sysdeps/stub/dl-machine.h
@@ -1,5 +1,5 @@
 /* Machine-dependent ELF dynamic relocation inline functions.  Stub version.
-   Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+   Copyright (C) 1995, 1996, 1997 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
@@ -102,19 +102,26 @@ elf_machine_rela (Elf32_Addr loadaddr, Elf32_Dyn *info[DT_NUM],
 /* Set up the loaded object described by L so its unrelocated PLT
    entries will jump to the on-demand fixup code in dl-runtime.c.  */
 
-static inline void
+static inline int
 elf_machine_runtime_setup (struct link_map *l)
 {
   extern void _dl_runtime_resolve (Elf32_Word);
-  /* The GOT entries for functions in the PLT have not yet been filled
-     in.  Their initial contents will arrange when called to push an
-     offset into the .rel.plt section, push _GLOBAL_OFFSET_TABLE_[1],
-     and then jump to _GLOBAL_OFFSET_TABLE[2].  */
-  Elf32_Addr *got = (Elf32_Addr *) l->l_info[DT_PLTGOT]->d_un.d_ptr;
-  got[1] = (Elf32_Addr) l;	/* Identify this shared object.  */
-  /* This function will get called to fix up the GOT entry indicated by
-     the offset on the stack, and then jump to the resolved address.  */
-  got[2] = (Elf32_Addr) &_dl_runtime_resolve;
+
+  if (lazy)
+    {
+      /* The GOT entries for functions in the PLT have not yet been filled
+         in.  Their initial contents will arrange when called to push an
+         offset into the .rel.plt section, push _GLOBAL_OFFSET_TABLE_[1],
+         and then jump to _GLOBAL_OFFSET_TABLE[2].  */
+      Elf32_Addr *got = (Elf32_Addr *) l->l_info[DT_PLTGOT]->d_un.d_ptr;
+      got[1] = (Elf32_Addr) l;	/* Identify this shared object.  */
+
+      /* This function will get called to fix up the GOT entry indicated by
+         the offset on the stack, and then jump to the resolved address.  */
+      got[2] = (Elf32_Addr) &_dl_runtime_resolve;
+    }
+
+  return lazy;
 }