tm.texi: Update docs for constructors and destructors.
authorJeffrey A Law <law@cygnus.com>
Sun, 21 Feb 1999 19:58:22 +0000 (19:58 +0000)
committerJeff Law <law@gcc.gnu.org>
Sun, 21 Feb 1999 19:58:22 +0000 (12:58 -0700)
        * tm.texi: Update docs for constructors and destructors.
And update comment in cp/decl2.c

From-SVN: r25356

gcc/ChangeLog
gcc/cp/decl2.c
gcc/tm.texi

index b01bd657ded36d06f047112faa230679198e1893..f54f6a38f1e12d59b589bacad8cf20ecf5fb64d4 100644 (file)
@@ -2,6 +2,7 @@ Sun Feb 21 20:35:10 1999  Jeffrey A Law  (law@cygnus.com)
 
        * config/aoutos.h (ASM_OUTPUT_CONSTRUCTOR): Delete.
        (ASM_OUTPUT_DESTRUCTOR, ASM_OUTPUT_GC_ENTRY): Likewise.
+       * tm.texi: Update docs for constructors and destructors.
 
 Sun Feb 21 17:11:18 1999  Richard Henderson  <rth@cygnus.com>
 
index dddf4a8d3e70b3154d95bdf75d620a2ec72d35f2..61a88eb4a402745b9b007343a4449287749e0677 100644 (file)
@@ -2938,7 +2938,8 @@ start_objects (method_type, initp)
                  NULL_TREE, 0);
 
 #if defined(ASM_OUTPUT_CONSTRUCTOR) && defined(ASM_OUTPUT_DESTRUCTOR)
-  /* It can be a static function with .ctors/.dtors sections. */
+  /* It can be a static function as long as collect2 does not have
+     to scan the object file to find its ctor/dtor routine.  */
   TREE_PUBLIC (current_function_decl) = 0;
 #endif
 
index d3dac9fd938b5cdbded822175d41a41bbe720d47..cd45f74498e83322ef03c1de2c580b8cede46120 100644 (file)
@@ -5976,13 +5976,20 @@ names.
 @findex ASM_OUTPUT_DESTRUCTOR
 This is like @code{ASM_OUTPUT_CONSTRUCTOR} but used for termination
 functions rather than initialization functions.
+
+When @code{ASM_OUTPUT_CONSTRUCTOR} and @code{ASM_OUTPUT_DESTRUCTOR} are
+defined, the initializaiton routine generated for the generated object
+file will have static linkage.
 @end table
 
 If your system uses @code{collect2} as the means of processing
 constructors, then that program normally uses @code{nm} to scan an
-object file for constructor functions to be called.  On certain kinds of
-systems, you can define these macros to make @code{collect2} work faster
-(and, in some cases, make it work at all):
+object file for constructor functions to be called.  On such systems you
+must not define @code{ASM_OUTPUT_CONSTRUCTOR} and @code{ASM_OUTPUT_DESTRUCTOR}
+as the object file's initialization routine must have global scope.
+
+On certain kinds of systems, you can define these macros to make
+@code{collect2} work faster (and, in some cases, make it work at all):
 
 @table @code
 @findex OBJECT_FORMAT_COFF