* ldexp.c (exp_fold_tree): Don't lose the old flag bits.
authorIan Lance Taylor <ian@airs.com>
Thu, 10 Jun 1993 21:02:59 +0000 (21:02 +0000)
committerIan Lance Taylor <ian@airs.com>
Thu, 10 Jun 1993 21:02:59 +0000 (21:02 +0000)
* ldgram.y (statement_list_opt): New nonterminal, either empty or
statement_list.
(section): Use statement_list_opt, not statement_list.
* m68kcoff.sc-sh: Gather constructors and destructors and define
__CTOR_LIST__ and __DTOR_LIST__ appropriately.
* sa29200.sc-sh: Gather constructors and destructors and define
___CTOR_LIST__ and ___DTOR_LIST__ appropriately.

ld/m68kcoff.sc-sh
ld/sa29200.sc-sh

index 1ef0265d8917756b9b8a098a9198ce42f4d4a987..519791c110c854b787a599e3383abc1d59bc06b3 100644 (file)
@@ -15,7 +15,17 @@ SECTIONS
 {
   .text : {
     *(.text)
-    ${RELOCATING+ etext  =  .};
+    ${RELOCATING+ etext  =  .;}
+    ${CONSTRUCTING+ __CTOR_LIST__ = .;}
+    ${CONSTRUCTING+ LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2)}
+    *(.ctors)
+    ${CONSTRUCTING+ LONG(0)}
+    ${CONSTRUCTING+ __CTOR_END__ = .;}
+    ${CONSTRUCTING+ __DTOR_LIST__ = .;}
+    ${CONSTRUCTING+ LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2)}
+    *(.dtors)
+    ${CONSTRUCTING+ LONG(0)}
+    ${CONSTRUCTING+ __DTOR_END__ = .;}
     *(.lit)
     *(.shdata)
   } ${RELOCATING+ > text}
index d0a395bebe31039f327dcd13b7b968633f1a1507..6526614762e382e36cfa4927bb5e5efc55adbb2e 100755 (executable)
@@ -22,6 +22,16 @@ SECTIONS {
        *(.data2);
        ${RELOCATING+_edata = .};
        ${CONSTRUCTING+CONSTRUCTORS}
+       ${CONSTRUCTING+ ___CTOR_LIST__ = .;}
+       ${CONSTRUCTING+ LONG((___CTOR_END__ - ___CTOR_LIST__) / 4 - 2)}
+       *(.ctors)
+       ${CONSTRUCTING+ LONG(0)}
+       ${CONSTRUCTING+ ___CTOR_END__ = .;}
+       ${CONSTRUCTING+ ___DTOR_LIST__ = .;}
+       ${CONSTRUCTING+ LONG((___DTOR_END__ - ___DTOR_LIST__) / 4 - 2)}
+       *(.dtors)
+       ${CONSTRUCTING+ LONG(0)}
+       ${CONSTRUCTING+ ___DTOR_END__ = .;}
     }
 
   .bss  . :