C++ Issue on GCC 3.0 branch

law@redhat.com law@redhat.com
Mon Apr 23 07:59:00 GMT 2001


  In message < 200104222154.RAA04022@hiauly1.hia.nrc.ca >you write:
  > >   Then, mail them to me, with the PA traget-triplet and cc1plus
  > > command-line options.  I should be able to track down what's going on,
  > > although someone may have to remind me about how some of the PA
  > > assembler directives work...
  > 
  > I think I am beginning to see the light.  In start_objects, there is
  > the code:
  > 
  > #if defined(ASM_OUTPUT_CONSTRUCTOR) && defined(ASM_OUTPUT_DESTRUCTOR)
  >   /* 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
  > 
  > ASM_OUTPUT_CONSTRUCTOR and ASM_OUTPUT_DESTRUCTOR are not defined for
  > hpux 10.20.  The are some defines in pa-64.h for the 64-bit runtime
  > but they are disabled with #undef's following the defines.  As a result,
  > constructors are global.  For the SOM linker, I think we have the section
  > support needed to define these.  I don't know about the startup issues.
  > Hopefully, this would allow the constructors to be static.
There are probably ways that we could make ASM_OUTPUT_* work, then start
tackling startup/runtime for SOM.  However, that wouldn't help AIX (which
we know has similar problems) or other systems which might have this problem.

I'd like to see us look for a general solution for the set of targets which
do not have ASM_OUTPUT_{CONSTRUCTOR,DESTRUCTOR} defined rather than look for
a SOM specific solution.

Jeff




More information about the Gcc mailing list