]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* tm.texi: Update docs for constructors and destructors.
authorJeffrey A Law <law@cygnus.com>
Sun, 21 Feb 1999 20:00:16 +0000 (20:00 +0000)
committerJeff Law <law@gcc.gnu.org>
Sun, 21 Feb 1999 20:00:16 +0000 (13:00 -0700)
From-SVN: r25357

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

index bafaff5f0fbc994d2fc866d62e2041357919fcf7..be4e0ffc3fc5576abc42e2715c79fdca1e358251 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.
 
 Tue Feb 16 21:02:07 1999  Anton Hartl <toni@devsoft.com>
 
index b7fe1394d3b3db7a1be2c730c9c95483f85054f9..c87c6079dbf9fa74e74a65cd4de8c3857d522d5c 100644 (file)
@@ -2944,7 +2944,8 @@ start_objects (method_type)
                  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 1c5d3b665a2c7f0df8bb3d513e44552ac5537131..8265773175d4a97b0190e74556ec0189c47dfcd8 100644 (file)
@@ -5906,13 +5906,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