summary refs log tree commit diff
path: root/sysdeps/ia64/dl-lookupcfg.h
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-07-26 00:27:15 +0000
committerUlrich Drepper <drepper@redhat.com>2001-07-26 00:27:15 +0000
commit370f00c3a7bfaa50b091a8cbf049c5d3c92639ab (patch)
treeb72cf5ea4172145b97d7cd2de38e026e4dda0fa1 /sysdeps/ia64/dl-lookupcfg.h
parentca13ce66be1bb4d218c89b1680e7aa177a3275cd (diff)
downloadglibc-370f00c3a7bfaa50b091a8cbf049c5d3c92639ab.tar.gz
glibc-370f00c3a7bfaa50b091a8cbf049c5d3c92639ab.tar.xz
glibc-370f00c3a7bfaa50b091a8cbf049c5d3c92639ab.zip
Update.
2001-06-07  David Mosberger  <davidm@hpl.hp.com>

	* sysdeps/ia64/dl-symaddr.c (_dl_symbol_address): Update call to
	__ia64_make_fptr() for new interface.
	(_dl_function_address): Remove.

	* sysdeps/ia64/dl-machine.h (IA64_BOOT_FPTR_TABLE_LEN): Rename
	from IA64_BOOT_FPTR_SIZE and reduce its value from 256 to 200.
	(struct ia64_fdesc): Rename from struct ia64_fptr and drop "next"
	pointer.  Rename member "func" to "ip".
	(struct ia64_fdesc_table): New type.
	(__ia64_make_fptr): Change prototype.
	(__ia64_init_bootstrap_fdesc_table): New function.
	(ELF_MACHINE_BEFORE_RTLD_RELOC): New macro.
	(__boot_ldso_fptr): Removed.
	(__fptr_next): Removed.
	(__fptr_root): Removed.
	(__fptr_count): Removed.
	(TRAMPOLINE_TEMPLATE): Fix typo in comment.  Don't use multi-line
	strings to avoid warning from gcc3.
	(RTLD_START): Don't use multi-line strings.
	(ELF_MACHINE_START_ADDRESS): Use DL_STATIC_FUNCTION_ADDRESS.
	(elf_machine_fixup_plt): Update the code entry point in the
	function descriptor through a "volatile" pointer to ensure proper
	write ordering.
	(elf_machine_rela): Simplify handling of FPTR relocs: always call
	__ia64_make_fptr().

	* sysdeps/ia64/dl-lookupcfg.h (DL_AUTO_FUNCTION_ADDRESS): New macro.
	(DL_STATIC_FUNCTION_ADDRESS): Likewise.
	(DL_DT_INIT_ADDRESS): Use DL_AUTO_FUNCTION_ADDRESS.
	(DL_DT_FINI_ADDRESS): Likewise.

	* sysdeps/ia64/dl-fptr.c: Rewrite for better scalability and to
	avoid deadlocks.

	* include/link.h: Add member machine specific "l_mach" member to
	link_map.

	* sysdeps/generic/bits/link.h: New file.
	* sysdeps/ia64/bits/link.h: Likewise.

	* elf/rtld.c (_dl_start): Fix typo in comment.
	(_dl_start_final): Copy new "l_mach" member from temporary to
	final bootstrap map.
Diffstat (limited to 'sysdeps/ia64/dl-lookupcfg.h')
-rw-r--r--sysdeps/ia64/dl-lookupcfg.h24
1 files changed, 18 insertions, 6 deletions
diff --git a/sysdeps/ia64/dl-lookupcfg.h b/sysdeps/ia64/dl-lookupcfg.h
index 884968e895..2f5ba8ed6c 100644
--- a/sysdeps/ia64/dl-lookupcfg.h
+++ b/sysdeps/ia64/dl-lookupcfg.h
@@ -36,9 +36,21 @@ extern void _dl_unmap (struct link_map *map);
 
 #define DL_UNMAP(map) _dl_unmap (map)
 
-extern Elf64_Addr _dl_function_address (const struct link_map *map,
-					Elf64_Addr start);
-
-#define DL_FUNCTION_ADDRESS(map, addr) _dl_function_address (map, addr)
-#define DL_DT_INIT_ADDRESS(map, addr) DL_FUNCTION_ADDRESS (map, addr)
-#define DL_DT_FINI_ADDRESS(map, addr) DL_FUNCTION_ADDRESS (map, addr)
+#define DL_AUTO_FUNCTION_ADDRESS(map, addr)		\
+({							\
+  unsigned long fptr[2];				\
+  fptr[0] = (addr);					\
+  fptr[1] = (map)->l_info[DT_PLTGOT]->d_un.d_ptr;	\
+  (Elf64_Addr) fptr;					\
+})
+
+#define DL_STATIC_FUNCTION_ADDRESS(map, addr)		\
+({							\
+  static unsigned long fptr[2];				\
+  fptr[0] = (addr);					\
+  fptr[1] = (map)->l_info[DT_PLTGOT]->d_un.d_ptr;	\
+  (Elf64_Addr) fptr;					\
+})
+
+#define DL_DT_INIT_ADDRESS(map, addr) DL_AUTO_FUNCTION_ADDRESS (map, addr)
+#define DL_DT_FINI_ADDRESS(map, addr) DL_AUTO_FUNCTION_ADDRESS (map, addr)