From: Roland McGrath Date: Sat, 25 Jun 2011 08:23:01 +0000 (-0700) Subject: Fix missing .ctors/.dtors lead word in soinit X-Git-Tag: glibc-2.15~504 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=78a7eee7fab0802addf500c481335ed6e9899bda;p=thirdparty%2Fglibc.git Fix missing .ctors/.dtors lead word in soinit --- diff --git a/ChangeLog b/ChangeLog index b5458527688..94dac81fabb 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 76033ea90c6..71398308d23 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))