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-01-07 10:00:21 +0000
committerRoland McGrath <roland@gnu.org>1996-01-07 10:00:21 +0000
commita2e1b046f6891ac76830353f7afc97b0c6d27a64 (patch)
tree4bc169458c918fe9a19aa2946de81ced9ade1124 /sysdeps/i386/dl-machine.h
parentc4b7291877252d1a0b2e2afbc90bab7fe6965a38 (diff)
downloadglibc-a2e1b046f6891ac76830353f7afc97b0c6d27a64.tar.gz
glibc-a2e1b046f6891ac76830353f7afc97b0c6d27a64.tar.xz
glibc-a2e1b046f6891ac76830353f7afc97b0c6d27a64.zip
Sat Jan 6 16:39:14 1996 Roland McGrath <roland@churchy.gnu.ai.mit.edu> cvs/libc-960108 cvs/libc-960107
	* Makefile (subdirs): Added db.

	* resolv/Makefile (routines): Add res_data.
	* resolv/res_data.c, resolv/res_debug.c, resolv/resolv.h:
	Updated from BIND 4.9.3 final release.

	* elf/dynamic-link.h (elf_get_dynamic_info): Handle
	processor-specific tags.
	(ELF_DYNAMIC_DO_REL, ELF_DYNAMIC_DO_RELA): Handle absent DT_PLTREL tag.

	* elf/elf.h (DT_MIPS_NUM, DT_PROCNUM): New macros.
	* elf/link.h (struct link_map): Extend `l_info' by DT_PROCNUM.

	* sysdeps/i386/dl-machine.h (elf_machine_runtime_setup): Take new
	arg LAZY.  Only do our work if LAZY and there is a DT_JMPREL record.
	* elf/dl-reloc.c (_dl_relocate_object): Call
	elf_machine_runtime_setup unconditionally, and pass it LAZY flag.

	* elf/dl-load.c: Fixed ELFMAG check to work for either byte order.
	Align end of load segment only to page size, not to segment alignment.
Diffstat (limited to 'sysdeps/i386/dl-machine.h')
-rw-r--r--sysdeps/i386/dl-machine.h25
1 files changed, 14 insertions, 11 deletions
diff --git a/sysdeps/i386/dl-machine.h b/sysdeps/i386/dl-machine.h
index 7c22305307..4ce4d4b001 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 Free Software Foundation, Inc.
+Copyright (C) 1995, 1996 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
@@ -140,20 +140,23 @@ elf_machine_lazy_rel (struct link_map *map, const Elf32_Rel *reloc)
    entries will jump to the on-demand fixup code in dl-runtime.c.  */
 
 static inline void
-elf_machine_runtime_setup (struct link_map *l)
+elf_machine_runtime_setup (struct link_map *l, int lazy)
 {
   Elf32_Addr *got;
   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].  */
-  got = (Elf32_Addr *) (l->l_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 (l->l_info[DT_JMPREL] && 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].  */
+      got = (Elf32_Addr *) (l->l_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;
+    }
 }