This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

trouble.texi AIX addition


	A number of people have been surprised at the G++ behavior on AIX
linking in additional code and/or generating additional symbol references
which the user expected could remain undefined.

David


	* doc/trouble.texi (Disappointments): Add static constructor and
	destructor dependency information for AIX.

Index: trouble.texi
===================================================================
RCS file: /cvs/gcc/egcs/gcc/doc/trouble.texi,v
retrieving revision 1.8
diff -c -p -r1.8 trouble.texi
*** trouble.texi	16 Jul 2002 02:16:45 -0000	1.8
--- trouble.texi	12 Aug 2002 18:17:35 -0000
*************** option (@pxref{Optimize Options}).
*** 895,900 ****
--- 895,911 ----
  On AIX and other platforms without weak symbol support, templates
  need to be instantiated explicitly and symbols for static members
  of templates will not be generated.
+ 
+ @item
+ On AIX, GCC scans object files and library archives for static
+ constructors and destructors when linking an application before the
+ linker prunes unreferenced symbols.  This is necessary to prevent the
+ AIX linker from mistakenly assuming that static constructor or
+ destructor are unused and removing them before the scanning can occur.
+ All static constructors and destructors found will be referenced even
+ though the modules in which they occur may not be used by the program.
+ This may lead to both increased executable size and unexpected symbol
+ references.
  @end itemize
  
  @node C++ Misunderstandings


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]