about summary refs log tree commit diff
path: root/sysdeps/stub/dl-machine.h
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1996-06-02 21:35:43 +0000
committerRoland McGrath <roland@gnu.org>1996-06-02 21:35:43 +0000
commit6c03c2cf27b1a12cbf680377e4796b88a20ed9db (patch)
treeb197b18a54a6f15f71e0cd1679f91a25d1d0239f /sysdeps/stub/dl-machine.h
parent9004bc202e5ea7b8eabca183f4e6c6abe573f802 (diff)
downloadglibc-6c03c2cf27b1a12cbf680377e4796b88a20ed9db.tar.gz
glibc-6c03c2cf27b1a12cbf680377e4796b88a20ed9db.tar.xz
glibc-6c03c2cf27b1a12cbf680377e4796b88a20ed9db.zip
* elf/dl-lookup.c (_dl_lookup_symbol): Arg NOSELF renamed to NOPLT.
	Reject SHN_UNDEF defns iff NOPLT is nonzero.
	* elf/link.h (_dl_lookup_symbol): Update prototype and comment.
	* elf/dl-runtime.c (fixup): Pass 1 to _dl_lookup_symbol for NOPLT.
	* elf/dlsym.c (dlsym): Pass 0.
	* elf/rtld.c (dl_main): Likewise.
	* elf/dl-reloc.c (_dl_relocate_object: resolve): Second arg R_OFFSET
	replaced with NOPLT flag.  Pass it through to _dl_lookup_symbol.
	* elf/do-rel.h (elf_dynamic_do_rel): Update prototype of RESOLVE arg.
	Pass `elf_machine_pltrel_p (R->r_type)' result as NOPLT flag value.
	* sysdeps/i386/dl-machine.h (elf_machine_pltrel_p): New macro.
	* sysdeps/m68k/dl-machine.h (elf_machine_pltrel_p): Likewise.
	* sysdeps/stub/dl-machine.h (elf_machine_pltrel_p): Likewise.
Diffstat (limited to 'sysdeps/stub/dl-machine.h')
-rw-r--r--sysdeps/stub/dl-machine.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/sysdeps/stub/dl-machine.h b/sysdeps/stub/dl-machine.h
index d9227233e4..73943f1558 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 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
@@ -81,7 +81,7 @@ elf_machine_rel (Elf32_Addr loadaddr, Elf32_Dyn *info[DT_NUM],
 
 static inline void
 elf_machine_rela (Elf32_Addr loadaddr, Elf32_Dyn *info[DT_NUM],
-		  const Elf32_Rela *reloc, 
+		  const Elf32_Rela *reloc,
 		  Elf32_Addr sym_loadaddr, const Elf32_Sym *sym)
 {
   _dl_signal_error (0, "Elf32_Rela relocation requested -- unused on "
@@ -89,6 +89,11 @@ elf_machine_rela (Elf32_Addr loadaddr, Elf32_Dyn *info[DT_NUM],
 }
 
 
+/* Nonzero iff TYPE describes relocation of a PLT entry, so
+   PLT entries should not be allowed to define the value.  */
+#define elf_machine_pltrel_p(type) ((type) == R_???_JMP_SLOT)
+
+
 /* 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.  */