[comp.os.msdos.programmer] GNU ld is not working

so@brownie.cs.wisc.edu (Bryan S. So) (12/08/90)

I was not able to compile anything with the gcc for MSDOS under
MSDOS 4.01.

      gcc hello.c

gives ld: not defined for a_out

      gcc -o anything hello.c

gives ld: not defined for anything

Has anybody succeeded in compiling using gcc under any version of
DOS?


Bryan

poffen@sj.ate.slb.com (Russ Poffenberger) (12/11/90)

In article <1990Dec7.185856.19276@spool.cs.wisc.edu> so@brownie.cs.wisc.edu (Bryan S. So) writes:
>I was not able to compile anything with the gcc for MSDOS under
>MSDOS 4.01.
>
>      gcc hello.c
>
>gives ld: not defined for a_out
>
>      gcc -o anything hello.c
>
>gives ld: not defined for anything
>
>Has anybody succeeded in compiling using gcc under any version of
>DOS?
>
>

Works fine for me under MSDOS 3.30

Russ Poffenberger               DOMAIN: poffen@sj.ate.slb.com
Schlumberger Technologies       UUCP:   {uunet,decwrl,amdahl}!sjsca4!poffen
1601 Technology Drive		CIS:	72401,276
San Jose, Ca. 95110             (408)437-5254

kid@hpctdkg.HP.COM (Kevin Dietz) (12/13/90)

Yes! I am the same problem with DOS 3.3.  If anyone knows the solution,
could you either post it or send it e-mail to me also.

gag@lobster.NOSC.Mil (Gary A. Gilbreath) (12/17/90)

I used this package several months ago, so keep in mind that my
experiences are dated.

I was using DOS 4.01 with a 320MB hard disk, so I naturally had SHARE.EXE
loaded.  After finding that ld would not work properly, and after wading
through the source and re-compiling it under two different compilers, I
finally tracked it down to a section of code where a file that had already
been opened was being re-opened.  Unless you open the files with the proper
flags set, when you have SHARE loaded This Is Bad.  So I renamed SHARE and
rebooted the PC and it worked fine.

So the way to get ld to work is to make sure you *don't* have SHARE loaded.

Gary Gilbreath, Naval Ocean Systems Center, San Diego, CA
Internet: gag@manta.nosc.mil
uucp: {ihnp4,akgua,decvax,dcdwest,ucbvax}!sdcsvax!nosc!gag
"Laugh'a while you can, monkeyboy!" --John Whorfin, _Buckaroo Banzai_

williams@umaxc.weeg.uiowa.edu (Kent Williams) (12/19/90)

In art. <580@lobster.NOSC.Mil> gag@lobster.NOSC.Mil (Gary A. Gilbreath) writes:
>I used this package several months ago, so keep in mind that my
>experiences are dated.
>
>I was using DOS 4.01 with a 320MB hard disk, so I naturally had SHARE.EXE
>loaded.  After finding that ld would not work properly, and after wading
>through the source and re-compiling it under two different compilers, I
>finally tracked it down to a section of code where a file that had already
>been opened was being re-opened.  Unless you open the files with the proper
>flags set, when you have SHARE loaded This Is Bad.  So I renamed SHARE and
>rebooted the PC and it worked fine.
>
>So the way to get ld to work is to make sure you *don't* have SHARE loaded.
>
If you have large media, and you don't load share, you could have big
trouble with your hard disk.

The REAL problem with gnu-ld has to do with a difference in file-system
semantices between 3.X and 4.XX.  When ld goes to write an output file,
it creates it, and then tries to chmod it without closing it first.  Under
3.3, the directory entry was there, so the chmod worked.  Under 4.XX, the
directory entry isn't there until the file gets closed.  As near as I can
figure out.

I told uchida about this and he changed ld and mailed it to me.  If you
have ftp access, the new loader is on ocf.berkeley.edu in pub/GNU/gcc
or thereabouts.  If you don't have ftp access I can mail it to you.

             Kent Williams --- williams@umaxc.weeg.uiowa.edu 
"'Is this heaven?' --- 'No, this is Iowa'" - from the movie "Field of Dreams"
"This isn't heaven, ... this is Cleveland" - Harry Allard, in "The Stupids Die"


--
             Kent Williams --- williams@umaxc.weeg.uiowa.edu 
"'Is this heaven?' --- 'No, this is Iowa'" - from the movie "Field of Dreams"
"This isn't heaven, ... this is Cleveland" - Harry Allard, in "The Stupids Die"