Re: problem with gcc (g++)

From: Rob Savoye <rob_at_nospam.org>
Date: Fri Apr 14 1995 - 13:27:27 PDT

       From: Evon.Liu@East.Sun.COM (Evon Liu - Sun BOS Software)
       Subject: problem with gcc (g++)

> I'm trying to cross-compile (gcc-cross was built on host
> sparc-sun-sunos4.1.4, targeted for i386-vsta), it gives me:
>
> The problem is that "cc1plus" generates xxx.s file which contains
> these two lines:
> .section .dtor
> .section .ctor
> the assembler (as-cross) doesn't recognize the opcode ".section"..
>
> Does anybody know how to resolve that?

  Oops, when I did the VSTa support for cross compiling I never tested
G++. Down in gcc/config/i386/vsta.h is:

#undef EXTRA_SECTIONS
#define EXTRA_SECTIONS in_ctor, in_dtor

#undef EXTRA_SECTION_FUNCTIONS
#define EXTRA_SECTION_FUNCTIONS \
  CTOR_SECTION_FUNCTION \
  DTOR_SECTION_FUNCTION

#define CTOR_SECTION_FUNCTION \
void \
ctor_section () \
{ \
  if (in_section != in_ctor) \
    { \
      fprintf (asm_out_file, "\t.section .ctor\n"); \
      in_section = in_ctor; \
    } \
}

#define DTOR_SECTION_FUNCTION \
void \
dtor_section () \
{ \
  if (in_section != in_dtor) \
    { \
      fprintf (asm_out_file, "\t.section .dtor\n"); \
      in_section = in_dtor; \
    } \
}

  You might want to remove this. VSTa uses a.out, and that object file
format (like old sun3's) only support three sections, namely .text, .data
and .bss. For a.out I usually stick the ctor and dtor tables in .text.

        - rob -
Received on Fri Apr 14 12:39:48 1995

This archive was generated by hypermail 2.1.8 : Thu Sep 22 2005 - 15:12:27 PDT