neideck@kaputt.enet.dec.com (Burkhard Neidecker-Lutz) (03/01/90)
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)
ham@Neon.Stanford.EDU (Peter R. Ham) (03/02/90)
Did you have to change collect.c to ensure that NO_UNDERSCORES was defined? -- Peter Ham PO Box 3430 (h)(415) 322-4390 MS Computer Science Student Stanford, CA ham@cs.stanford.edu Stanford University 94309 (o)(415) 723-2067