From 78a7eee7fab0802addf500c481335ed6e9899bda Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 25 Jun 2011 01:23:01 -0700 Subject: [PATCH] Fix missing .ctors/.dtors lead word in soinit --- ChangeLog | 4 ++++ elf/soinit.c | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index b545852..94dac81 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2011-06-27 Roland McGrath + + * elf/soinit.c (__CTOR_LIST__, __DTOR_LIST__): Add used attribute. + 2011-06-27 Ulrich Drepper [BZ #12350] diff --git a/elf/soinit.c b/elf/soinit.c index 76033ea..7139830 100644 --- a/elf/soinit.c +++ b/elf/soinit.c @@ -8,11 +8,11 @@ # include static void (*const __CTOR_LIST__[1]) (void) - __attribute__ ((section (".ctors"))) - = { (void (*) (void)) -1 }; + __attribute__ ((used, section (".ctors"))) + = { (void (*) (void)) -1 }; static void (*const __DTOR_LIST__[1]) (void) - __attribute__ ((section (".dtors"))) - = { (void (*) (void)) -1 }; + __attribute__ ((used, section (".dtors"))) + = { (void (*) (void)) -1 }; static inline void run_hooks (void (*const list[]) (void)) -- 2.7.4