public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* egcs-1.1.1 (release, target i386-cygwin32): allocate stack worker function name
@ 1999-01-31 23:58 Thomas Sailer
  1999-01-31 23:58 ` Mumit Khan
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Sailer @ 1999-01-31 23:58 UTC (permalink / raw)
  To: egcs

egcs 1.1.1 on said target uses __alloca as the name for the allocate stack worker
function. This is IMHO unfortunate because MS tools seem to have an ordinary
alloca function called _alloca (assembler name __alloca) with completely different
calling conventions. So it is relatively easy to get bogus binaries silently.
It would be better to change that name to something else.

BTW the name is in
config/i386/i386.md: define_insn "allocate_stack_worker"
and config/i386/cygwin32.asm

Tom

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: egcs-1.1.1 (release, target i386-cygwin32): allocate stack worker function name
  1999-01-31 23:58 egcs-1.1.1 (release, target i386-cygwin32): allocate stack worker function name Thomas Sailer
@ 1999-01-31 23:58 ` Mumit Khan
  1999-01-31 23:58   ` Thomas Sailer
  0 siblings, 1 reply; 3+ messages in thread
From: Mumit Khan @ 1999-01-31 23:58 UTC (permalink / raw)
  To: Thomas Sailer; +Cc: egcs

Thomas Sailer <sailer@ife.ee.ethz.ch> writes:
> egcs 1.1.1 on said target uses __alloca as the name for the allocate stack wo
> rker
> function. This is IMHO unfortunate because MS tools seem to have an ordinary
> alloca function called _alloca (assembler name __alloca) with completely diff
> erent
> calling conventions. So it is relatively easy to get bogus binaries silently.
> It would be better to change that name to something else.
> 
> BTW the name is in
> config/i386/i386.md: define_insn "allocate_stack_worker"
> and config/i386/cygwin32.asm
> 

The same issue arises for _chkstk (there is an underscore difference),
but I couldn't afford to change in case it broke existing code. Of
course, since GNU on cygwin/mingw do not profess compatibility to MS
tools, at least it's self consistent. My port for AT&T UWIN does do 
this correctly, but that port *is* compatible with MS tools.

I'm in the process of doing some cleanups for the mainline, and this is
one of the issues that I'll look at. 

Thanks for pointing this out.

Regards,
Mumit

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: egcs-1.1.1 (release, target i386-cygwin32): allocate stack worker function name
  1999-01-31 23:58 ` Mumit Khan
@ 1999-01-31 23:58   ` Thomas Sailer
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Sailer @ 1999-01-31 23:58 UTC (permalink / raw)
  To: Mumit Khan; +Cc: egcs

Mumit Khan wrote:

> course, since GNU on cygwin/mingw do not profess compatibility to MS
> tools, at least it's self consistent. My port for AT&T UWIN does do
> this correctly, but that port *is* compatible with MS tools.

Well, the problem is that some Windows software has a
#define alloca _alloca in the headers, and this is what
silently produces bogus binaries. It would be better
to get a linker error for _alloca in such a case,
so the user immediately knows what went wrong...

Tom

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1999-01-31 23:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-01-31 23:58 egcs-1.1.1 (release, target i386-cygwin32): allocate stack worker function name Thomas Sailer
1999-01-31 23:58 ` Mumit Khan
1999-01-31 23:58   ` Thomas Sailer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).