This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
delta88 also broken - Was: Re: crtstuff.c change is bad for (at least) OpenServer
- To: robertl at dgii dot com
- Subject: delta88 also broken - Was: Re: crtstuff.c change is bad for (at least) OpenServer
- From: Manfred Hollstein <manfred at s-direktnet dot de>
- Date: Thu, 22 Jan 98 13:13:59 +0100
- Cc: egcs at cygnus dot com, kenner at vlsi1 dot ultra dot nyu dot edu
- References: <19980118145012.10990@dgii.com>
- Reply-To: Manfred Hollstein <manfred at s-direktnet dot de>
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