This is the mail archive of the gcc@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]

RE: MIPS gcc/crtstuff.c force_to_data[] not working for me


...sigh... found it.

I was defining  CTORS_SECTION_ASM_OP and DTORS_SECTION_ASM_OP, so I got the
force_to_data instead of the attribute((section(.[cd]tors))).

My bad.
GP

> -----Original Message-----
> From:	Graeme Peterson [SMTP:gp@qnx.com]
> Sent:	Tuesday, May 18, 2004 12:48 PM
> To:	'gcc@gcc.gnu.org'
> Subject:	MIPS gcc/crtstuff.c force_to_data[] not working for me
> 
> When I use my mips port of gcc-3.3.3 to build crtbegin.o, my ctor list is
> not being built correctly.  I think this is because the force_to_data[]
> variable is being put in the .lcomm instead of .data, so __CTOR_LIST__
> gets
> put in the .data, because cc1 is not 'in_data'.
> 
> The assembly from crtbegin.i that I am seeing is:
> 
>         .lcomm  force_to_data,0
>         .section        .ctors,"aw"
>         .data
>         .align  2
>         .type   __CTOR_LIST__, @object
> __CTOR_LIST__:
>         .word   -1
>         .section        .dtors,"aw"
>         .align  2
>         .type   __DTOR_LIST__, @object
> __DTOR_LIST__:
>         .word   -1
> 
> I am having a hard time finding the right way to fix this.  I am tempted
> to
> define CTOR_LIST_BEGIN, CTOR_LIST_END, DTOR_LIST_BEGIN and DTOR_LIST_END
> to
> be the raw mips assembly that would work for me.  However, no-one else is
> doing that, so I must be missing something in my backend.
> 
> Any pointers?
> 
> Thanks.
> GP


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