Fix missing .ctors/.dtors lead word in soinit
authorRoland McGrath <roland@hack.frob.com>
Sat, 25 Jun 2011 08:23:01 +0000 (01:23 -0700)
committerRoland McGrath <roland@hack.frob.com>
Tue, 28 Jun 2011 03:26:54 +0000 (20:26 -0700)
ChangeLog
elf/soinit.c

index b545852..94dac81 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2011-06-27  Roland McGrath  <roland@hack.frob.com>
+
+       * elf/soinit.c (__CTOR_LIST__, __DTOR_LIST__): Add used attribute.
+
 2011-06-27  Ulrich Drepper  <drepper@gmail.com>
 
        [BZ #12350]
index 76033ea..7139830 100644 (file)
@@ -8,11 +8,11 @@
 # include <stdlib.h>
 
 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))