delta88 also broken - Was: Re: crtstuff.c change is bad for (at least) OpenServer
Manfred Hollstein
manfred@s-direktnet.de
Fri Jan 23 16:33:00 GMT 1998
On Sun, 18 January 1998, 14:50:12, robertl@dgii.com wrote:
> I can't figure out of this is actually a bug or not, but I've partially
> analyzed a one line change that EGCS just inherited from 2.8.0 that kills
> COFF code generation on OpenServer dead.
Same here with an m88k-motorola-sysv3 COFF system!
> I've cc'ed Richard in hopes
> he can further comment becuase I think this change was his on Dec. 23.
>
> crtstuff.c has recently started to look like this:
>
> before we start to execute any of the user's code. */
>
> static void
> __do_global_ctors_aux () /* prologue goes in .text section */
> {
> asm (INIT_SECTION_ASM_OP);
> DO_GLOBAL_CTORS_BODY;
> ON_EXIT (__do_global_dtors, 0);
> #ifdef FORCE_INIT_SECTION_ALIGN
> FORCE_INIT_SECTION_ALIGN;
> #endif
> // robertl This next line is the one that does us in.
> asm (TEXT_SECTION_ASM_OP);
> } /* epilogue and body go in .init section */
>
> #endif /* OBJECT_FORMAT_ELF */
>
> #else /* defined(INIT_SECTION_ASM_OP) */
>
[snip]
>
> The /APP stuff correlates with the commented out entry in the above
> source.
>
> Citing the comment that is above this code:
>
> Note that we use some tricks here to get *just* the body and just
> a function epilogue (but no function prologue) into the .init
> section of the crtend.o file. Specifically, we switch to the .text
>
> With this one line change, our epilogue is no longer in .init. It's in
> .text.
>
> Can someone that understands this change please comment if it really
> was intentional? If it was, does it really contradict that comment
> or do I misunderstand? If it doesn't and this really is a target-
> specifc thing (doubt it, but I'll defer), how can I resolve this in
> a target-specific way?
Removing the `asm (TEXT_SECTION_ASM_OP);' cured it for me.
>
> Richard, if this really wasn't the plan, can it please be addressed in
> the GCC 2.8.1 branch?
I guess, all COFF systems which use gcc's crtbegin/crtend are broken; hence
we actually need to address this!
Manfred
More information about the Gcc
mailing list