From 6def43e690998a18fabc938b2924bc3af3231426 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 26 Nov 2003 07:15:17 +0000 Subject: [PATCH] Update. 2003-11-21 David Mosberger * elf/soinit.c (_fini): Put _fini() in .init_array section if HAVE_INITFINI_ARRAY is defined. --- ChangeLog | 5 +++++ elf/soinit.c | 9 +++++++++ 2 files changed, 14 insertions(+) diff --git a/ChangeLog b/ChangeLog index 2ac6130..31b6dfd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-11-21 David Mosberger + + * elf/soinit.c (_fini): Put _fini() in .init_array section if + HAVE_INITFINI_ARRAY is defined. + 2003-11-25 Ulrich Drepper * sysdeps/i386/fpu/bits/mathinline.h: Introduce __libc_sqrtl symbol. diff --git a/elf/soinit.c b/elf/soinit.c index 32ed445..2015ea2 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 -- 2.7.4