aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorDoug Evans <dje@sebabeach.org>2003-06-13 06:20:12 +0000
committerDoug Evans <devans@gcc.gnu.org>2003-06-13 06:20:12 +0000
commitdc9ed76ab65c4fbb0c571c7f8031c7e56125b2b1 (patch)
tree8fca9cbca92c0172cfd2c146410c90e4c6d7a1af /gcc
parentee4336ea817d3e6f91c0d2b33dc92bc8227538a8 (diff)
downloadgcc-dc9ed76ab65c4fbb0c571c7f8031c7e56125b2b1.zip
gcc-dc9ed76ab65c4fbb0c571c7f8031c7e56125b2b1.tar.gz
gcc-dc9ed76ab65c4fbb0c571c7f8031c7e56125b2b1.tar.bz2
back out previous patch, instead do
back out previous patch, instead do * config/m32r/initfini.c (__CTOR_LIST__,__DTOR_LIST__): Attribute used. (__do_global_ctors,__do_global_dtors): Ditto. From-SVN: r67886
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog3
-rw-r--r--gcc/config/m32r/initfini.c32
2 files changed, 17 insertions, 18 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 5396c79..8ad93fe 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -8,8 +8,7 @@
2003-06-13 Doug Evans <dje@sebabeach.org>
Remove some build warnings.
- * config/m32r/initfini.c (__CTOR_LIST__,__DTOR_LIST__): No longer
- static.
+ * config/m32r/initfini.c (__CTOR_LIST__,__DTOR_LIST__): Attribute used.
(__do_global_ctors,__do_global_dtors): Ditto.
2003-06-12 Richard Henderson <rth@redhat.com>
diff --git a/gcc/config/m32r/initfini.c b/gcc/config/m32r/initfini.c
index 8ae3085..5cbf8e1 100644
--- a/gcc/config/m32r/initfini.c
+++ b/gcc/config/m32r/initfini.c
@@ -46,12 +46,12 @@ typedef void (*func_ptr) (void);
refer to only the __CTOR_END__ symbol in crtfini.o and the __DTOR_LIST__
symbol in crtinit.o, where they are defined. */
-func_ptr __CTOR_LIST__[1]
- __attribute__ ((section (".ctors")))
+static func_ptr __CTOR_LIST__[1]
+ __attribute__ ((used, section (".ctors")))
= { (func_ptr) (-1) };
-func_ptr __DTOR_LIST__[1]
- __attribute__ ((section (".dtors")))
+static func_ptr __DTOR_LIST__[1]
+ __attribute__ ((used, section (".dtors")))
= { (func_ptr) (-1) };
/* Run all the global destructors on exit from the program. */
@@ -68,11 +68,11 @@ func_ptr __DTOR_LIST__[1]
refers to one particular associated `__DTOR_LIST__' which belongs to the
same particular root executable or shared library file. */
-void __do_global_dtors (void)
-asm ("__do_global_dtors") __attribute__ ((section (".text")));
+static void __do_global_dtors (void)
+asm ("__do_global_dtors") __attribute__ ((used, section (".text")));
-void
-__do_global_dtors (void)
+static void
+__do_global_dtors ()
{
func_ptr *p;
@@ -122,22 +122,22 @@ __fini:\n\
last, these words naturally end up at the very ends of the two lists
contained in these two sections. */
-func_ptr __CTOR_END__[1]
- __attribute__ ((section (".ctors")))
+static func_ptr __CTOR_END__[1]
+ __attribute__ ((used, section (".ctors")))
= { (func_ptr) 0 };
-func_ptr __DTOR_END__[1]
- __attribute__ ((section (".dtors")))
+static func_ptr __DTOR_END__[1]
+ __attribute__ ((used, section (".dtors")))
= { (func_ptr) 0 };
/* Run all global constructors for the program.
Note that they are run in reverse order. */
-void __do_global_ctors (void)
-asm ("__do_global_ctors") __attribute__ ((section (".text")));
+static void __do_global_ctors (void)
+asm ("__do_global_ctors") __attribute__ ((used, section (".text")));
-void
-__do_global_ctors (void)
+static void
+__do_global_ctors ()
{
func_ptr *p;