🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.g++.bug
Article #2225

Possible bug in collect (CTOR placing)

#2225
From: Burkhard Neidecker-Lutz
Date: Thu, 01 Mar 1990 10:10
40 lines
1813 bytes
When using g++ 1.37 (with gcc 1.37.1) on a PMAX to build InterViews 2.6
I ran into messages of the form
 
	"__CTOR_LIST__ is both a common and a text symbol"
 
or some such gruft in the linking phase. This seems to stem from
InterViews declaring constructor lists itself, but there's more to it.
 
Tracing constructor lists back to collect.c I found that the
constructors are put in the .text section and the destructors are
placed in .data. Putting the constructor list into the data segment as
well seems to fix the problem for me, but as all this is constant
stuff it should probably go into either .text or .rdata. A patch for
my uneducated fix:
 
*** collect.c	Thu Mar  1 11:01:42 1990
--- collect.c.new	Thu Mar  1 11:02:02 1990
***************
*** 330,336 ****
    /* Write out the CTOR tabel */
    ASM_FILE_START(outfile);
  
!   fprintf (outfile, "%s\n", TEXT_SECTION_ASM_OP);
    ASM_GLOBALIZE_LABEL (outfile, CTOR_TABLE_NAME);
    ASM_OUTPUT_LABEL (outfile, CTOR_TABLE_NAME);
    ASM_OUTPUT_INT_CONST(outfile,ctor_chain_length);
--- 330,336 ----
    /* Write out the CTOR tabel */
    ASM_FILE_START(outfile);
  
!   fprintf (outfile, "%s\n", DATA_SECTION_ASM_OP);
    ASM_GLOBALIZE_LABEL (outfile, CTOR_TABLE_NAME);
    ASM_OUTPUT_LABEL (outfile, CTOR_TABLE_NAME);
    ASM_OUTPUT_INT_CONST(outfile,ctor_chain_length);
 
 
 
		Burkhard Neidecker-Lutz, Digital CEC Karlsruhe
 
		(neideck@nestvx.enet.dec.com)
Technical Details
Message-ID: <9003011009.AA03820@decwrl.dec.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!ogicse!decwrl!

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!ogicse!decwrl!
From: neideck@kaputt.enet.dec.com (Burkhard Neidecker-Lutz)
Newsgroups: gnu.g++.bug
Subject: Possible bug in collect (CTOR placing)
Message-ID: <9003011009.AA03820@decwrl.dec.com>
Date: 1 Mar 90 10:10:04 GMT
Organization: Digital Equipment Corporation
Lines: 40