aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeffrey A Law <law@cygnus.com>1999-02-21 19:58:22 +0000
committerJeff Law <law@gcc.gnu.org>1999-02-21 12:58:22 -0700
commit14686fcda5034dac9dda0cb615129ee38a9808c6 (patch)
tree96c04fba31baa7810b3fe1a78322e9cf838bd523
parentb4bb92e52f7d5f1dbd2f95e829c2d789d57609af (diff)
downloadgcc-14686fcda5034dac9dda0cb615129ee38a9808c6.zip
gcc-14686fcda5034dac9dda0cb615129ee38a9808c6.tar.gz
gcc-14686fcda5034dac9dda0cb615129ee38a9808c6.tar.bz2
tm.texi: Update docs for constructors and destructors.
* tm.texi: Update docs for constructors and destructors. And update comment in cp/decl2.c From-SVN: r25356
-rw-r--r--gcc/ChangeLog1
-rw-r--r--gcc/cp/decl2.c3
-rw-r--r--gcc/tm.texi13
3 files changed, 13 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index b01bd65..f54f6a3 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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>
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index dddf4a8..61a88eb 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -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
diff --git a/gcc/tm.texi b/gcc/tm.texi
index d3dac9f..cd45f74 100644
--- a/gcc/tm.texi
+++ b/gcc/tm.texi
@@ -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