Mail Archives: djgpp-workers/2001/07/29/09:22:29
On Sun, 29 Jul 2001, Andrew Cottrell wrote:
> > > My question is where is _CRT0_FLAG_UNIX_SBRK used in the startup code?
> >
> > It's in crt1.c.
>
> I modified crt1.c and re-built LIBC from today's CVS tarball (29th
> July-2001) which includes all the patches needed so far. The mod to crt1.c
> is src\libc\crt0\crt1.c:int _crt0_startup_flags = _CRT0_FLAG_UNIX_SBRK;
>
> This did not make any difference in repect that make still crashed in the
> same place with the same call stack and info.
Sorry, I don't understand. You already succeeded to produce a version of
Make which used Unixy sbrk, without hacking crt1.c, and you then reported
that Make didn't crash, but cc1.exe did. So why did you need at all to
build Make with the hacked crt1? I thought you needed to modify crt1 to
build cc1.exe and gcc.exe, because you couldn't find an easy way to do
that; but with Make this wasn't the problem, right?
> I am still confused with the usage of UNIX Sbrk as I cannot find any
> reference to it in the code.
Look in crt0.S (that's where sbrk is implemented), for lines like this:
testb $0x8, __crt0_startup_flags+1
8 is the value of _CRT0_FLAG_UNIX_SBRK (actually, it's 0x0800, but you
get the picture).
- Raw text -