about summary refs log tree commit diff
path: root/elf/dlfcn.h
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1996-06-03 04:46:40 +0000
committerRoland McGrath <roland@gnu.org>1996-06-03 04:46:40 +0000
commit710f7bab59b9bb02f1cd46fa2db14e2b4b0a806a (patch)
treece514b2cae73e161177b1a390c7c4118efcff0b0 /elf/dlfcn.h
parent6c03c2cf27b1a12cbf680377e4796b88a20ed9db (diff)
downloadglibc-710f7bab59b9bb02f1cd46fa2db14e2b4b0a806a.tar.gz
glibc-710f7bab59b9bb02f1cd46fa2db14e2b4b0a806a.tar.xz
glibc-710f7bab59b9bb02f1cd46fa2db14e2b4b0a806a.zip
Mon Jun 3 00:30:35 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu> cvs/libc-960603
	* elf/dl-lookup.c (_dl_lookup_symbol): Take new arg RELOC_ADDR and
	don't allow a defn resolving to that address.
	* elf/link.h: Update prototype and comment.
	* elf/dl-runtime.c (fixup): Define local `resolve' function and pass
	it to elf_machine_relplt.
	* elf/dl-reloc.c (_dl_relocate_object: resolve): Take new arg
	RELOC_ADDR and pass it through to _dl_lookup_symbol.
	* elf/do-rel.h (elf_dynamic_do_rel): Pass RESOLVE to elf_machine_rel
	instead of calling it ourselves and passing its results.
	(elf_dynamic_do_rel): RESOLVE fn takes new arg RELOC_ADDR.
	* elf/rtld.c (dl_main): Pass 0 for RELOC_ADDR to _dl_lookup_symbol.
	* sysdeps/i386/dl-machine.h (elf_machine_rel): Remove SYM_LOADADDR
	arg.  Add RESOLVE function ptr arg.  Call *RESOLVE as necessary.
	* sysdeps/m68k/dl-machine.h (elf_machine_rela): Likewise.
	* sysdeps/stub/dl-machine.h: Likewise.

	* csu/initfini.c (_fini): Add extern decl for i_am_not_a_leaf.

	* elf/dlfcn.h (dl_open_mode): Enumerated type removed.
	(RTLD_LAZY, RTLD_NOW): Define these as macros instead.
	(RTLD_GLOBAL): New macro.
	(dlopen): Take arg of type int instead of dl_open_mode.
	* elf/dlopen.c: Likewise.

	* math/math.h (_Mldbl): New macro, either produces L suffix or not.
	(M_*): Use it for these constants.
Diffstat (limited to 'elf/dlfcn.h')
-rw-r--r--elf/dlfcn.h18
1 files changed, 10 insertions, 8 deletions
diff --git a/elf/dlfcn.h b/elf/dlfcn.h
index e5d68f82be..a405baa473 100644
--- a/elf/dlfcn.h
+++ b/elf/dlfcn.h
@@ -1,5 +1,5 @@
 /* dlfcn.h -- User functions for run-time dynamic loading.
-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
@@ -21,16 +21,18 @@ Cambridge, MA 02139, USA.  */
 #define	_DLFCN_H 1
 
 
-/* Type of the second argument to `dlopen'.  */
-typedef enum
-  {
-    RTLD_LAZY =       1,	/* Lazy function call binding.  */
-    RTLD_NOW =        2		/* Immediate function call binding.  */
-  } dl_open_mode;
+/* The MODE argument to `dlopen' contains one of the following: */
+#define RTLD_LAZY	0x001	/* Lazy function call binding.  */
+#define RTLD_NOW	0x002	/* Immediate function call binding.  */
+
+/* If the following bit is set in the MODE argument to `dlopen',
+   the symbols of the loaded object and its dependencies are made
+   visible as if the object were linked directly into the program.  */
+#define RTLD_GLOBAL	0x100
 
 /* Open the shared object FILE and map it in; return a handle that can be
    passed to `dlsym' to get symbol values from it.  */
-extern void *dlopen (const char *__file, dl_open_mode);
+extern void *dlopen (const char *__file, int __mode);
 
 /* Unmap and close a shared object opened by `dlopen'.
    The handle cannot be used again after calling `dlclose'.  */