about summary refs log tree commit diff
path: root/elf
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-11-16 18:15:26 +0000
committerUlrich Drepper <drepper@redhat.com>2000-11-16 18:15:26 +0000
commit40306912c9451bdebb5850c97c4d6bf25bfc83cb (patch)
treec02e3bcf8d6f9fe18b3a4bb5b1b79999b2e4440d /elf
parent66bdfcabdbeab9a955a5d41c6eb6fb57a34e3e4c (diff)
downloadglibc-40306912c9451bdebb5850c97c4d6bf25bfc83cb.tar.gz
glibc-40306912c9451bdebb5850c97c4d6bf25bfc83cb.tar.xz
glibc-40306912c9451bdebb5850c97c4d6bf25bfc83cb.zip
Update.
2000-11-15  H.J. Lu  <hjl@gnu.org>

	* sysdeps/generic/ldsodefs.h (DL_DT_INIT_ADDRESS): Defined if
	ELF_FUNCTION_PTR_IS_SPECIAL is not defined.
	(DL_DT_FINI_ADDRESS): Likewise.

	* sysdeps/ia64/dl-lookupcfg.h (_dl_lookup_address): Set the
	return type to ElfW(Addr).
	(_dl_function_address): New prototype.
	(DL_FUNCTION_ADDRESS): Defined.
	(DL_DT_INIT_ADDRESS): Defined as DL_FUNCTION_ADDRESS.
	(DL_DT_FINI_ADDRESS): Likewise.

	* sysdeps/ia64/Versions (GLIBC_2.2): Add _dl_function_address.

	* sysdeps/ia64/dl-machine.h (_dl_start_address): Removed.
	(ELF_MACHINE_START_ADDRESS): Changed to DL_FUNCTION_ADDRESS.

	* sysdeps/ia64/dl-symaddr.c (_dl_start_address): Renamed to ...
	(_dl_function_address): This.

	* elf/dl-fini.c (_dl_fini): Use DL_DT_FINI_ADDRESS to get the
	function pointer for DT_FINI.
	* elf/dl-close.c (_dl_close): Likewise.

	* elf/dl-init.c (_dl_init): Use DL_DT_INIT_ADDRESS to get the
	function pointer for DT_INIT.

2000-11-16  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/generic/printf_fphex.c (__printf_fphex): Compute correctly
	end of wexpbuf buffer.
Diffstat (limited to 'elf')
-rw-r--r--elf/dl-close.c5
-rw-r--r--elf/dl-fini.c2
-rw-r--r--elf/dl-init.c3
3 files changed, 6 insertions, 4 deletions
diff --git a/elf/dl-close.c b/elf/dl-close.c
index 3a6f294b19..6c17593a52 100644
--- a/elf/dl-close.c
+++ b/elf/dl-close.c
@@ -152,8 +152,9 @@ _dl_close (void *_map)
 
 	  /* Next try the old-style destructor.  */
 	  if (imap->l_info[DT_FINI] != NULL)
-	    (*(void (*) (void)) ((void *) imap->l_addr
-				 + imap->l_info[DT_FINI]->d_un.d_ptr)) ();
+	    (*(void (*) (void)) DL_DT_FINI_ADDRESS
+	      (imap, (void *) imap->l_addr
+		     + imap->l_info[DT_FINI]->d_un.d_ptr)) ();
 	}
 
       /* Store the new l_opencount value.  */
diff --git a/elf/dl-fini.c b/elf/dl-fini.c
index c7d4ebc86a..4ed3975bda 100644
--- a/elf/dl-fini.c
+++ b/elf/dl-fini.c
@@ -167,7 +167,7 @@ _dl_fini (void)
 
 	  /* Next try the old-style destructor.  */
 	  if (l->l_info[DT_FINI] != NULL)
-	    ((fini_t) (l->l_addr + l->l_info[DT_FINI]->d_un.d_ptr)) ();
+	    ((fini_t) DL_DT_FINI_ADDRESS (l, l->l_addr + l->l_info[DT_FINI]->d_un.d_ptr)) ();
 	}
     }
 }
diff --git a/elf/dl-init.c b/elf/dl-init.c
index 683b94b9c7..627f823524 100644
--- a/elf/dl-init.c
+++ b/elf/dl-init.c
@@ -105,7 +105,8 @@ _dl_init (struct link_map *main_map, int argc, char **argv, char **env)
       */
       if (l->l_info[DT_INIT] != NULL)
 	{
-	  init = (init_t) (l->l_addr + l->l_info[DT_INIT]->d_un.d_ptr);
+	  init = (init_t) DL_DT_INIT_ADDRESS
+	    (l, l->l_addr + l->l_info[DT_INIT]->d_un.d_ptr);
 
 	  /* Call the function.  */
 	  init (argc, argv, env);