about summary refs log tree commit diff
path: root/elf/soinit.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-11-26 07:15:17 +0000
committerUlrich Drepper <drepper@redhat.com>2003-11-26 07:15:17 +0000
commit6def43e690998a18fabc938b2924bc3af3231426 (patch)
tree45d8f342aff86a54a7c05d166a1f97fdad792708 /elf/soinit.c
parent0135bde4325a7d2888a4df993252953bd5e2b78c (diff)
downloadglibc-6def43e690998a18fabc938b2924bc3af3231426.tar.gz
glibc-6def43e690998a18fabc938b2924bc3af3231426.tar.xz
glibc-6def43e690998a18fabc938b2924bc3af3231426.zip
Update.
2003-11-21  David Mosberger  <davidm@hpl.hp.com>

	* elf/soinit.c (_fini): Put _fini() in .init_array section if
	HAVE_INITFINI_ARRAY is defined.
Diffstat (limited to 'elf/soinit.c')
-rw-r--r--elf/soinit.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/elf/soinit.c b/elf/soinit.c
index 32ed4454b5..2015ea2d66 100644
--- a/elf/soinit.c
+++ b/elf/soinit.c
@@ -78,9 +78,14 @@ __libc_global_ctors (void)
 
 /* This function becomes the DT_FINI termination function
    for the C library.  */
+#ifndef HAVE_INITFINI_ARRAY
 void _fini (void) __attribute__ ((section (".fini"))); /* Just for kicks.  */
 void
 _fini (void)
+#else
+void
+__libc_fini (void)
+#endif
 {
   /* Call destructor functions.  */
   run_hooks (__DTOR_LIST__);
@@ -96,3 +101,7 @@ _fini (void)
 # endif
 #endif
 }
+#ifdef HAVE_INITFINI_ARRAY
+void (*_fini_ptr) (void) __attribute__ ((section (".fini_array")))
+     = &__libc_fini;
+#endif