Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!mcvax!hafro!askja!frisk From: frisk@askja.UUCP (Fridrik Skulason) Newsgroups: comp.sys.ibm.pc,comp.lang.c Subject: (Still another) Turbo C bug Message-ID: <256@askja.UUCP> Date: Fri, 24-Jul-87 06:05:18 EDT Article-I.D.: askja.256 Posted: Fri Jul 24 06:05:18 1987 Date-Received: Sat, 25-Jul-87 14:58:20 EDT Reply-To: frisk@askja.UUCP (Fridrik Skulason) Distribution: world Organization: University of Iceland (RHI) Lines: 60 Keywords: Turbo C bug TLINK Xref: mnetor comp.sys.ibm.pc:6005 comp.lang.c:3257 I have found what I believe is a bug in Turbo-C (actually a bug in TLINK - I think), namely that the HUGE memory model simply does not work. I do not know if this problem has been discussed here before, but if so - does anyone have a patch ? What I am trying to do is to convert a 40K line program from Microsoft C into Turbo C. Only around 3000 lines are program lines, the rest is arrays. In Microsoft C I use the LARGE memory model, linking the data files with /AL /Gt1024 which creates multiple data & code segments, with the restriction that no data element can be larger than 64K. (That's fine with me, my largest array is ~30K) Now, since LARGE in Turbo C means a different thing, I had to use the HUGE memory model. But, when linking I got the message Linker error: Too much global data defined in file Why ????? A (very) simplified version of the files in question: F.C: unsigned char xx[40000]; main() { } F2.C: unsigned char ii[40000]; F.PRJ: F F2 F.MAP: Start Stop Length Name Class 00000H 00322H 00323H _TEXT CODE 00323H 0032CH 0000AH F_TEXT CODE 0032DH 0032DH 00000H F2_TEXT CODE . . 00730H 007B3H 00084H _DATA DATA 007B8H 0A3F7H 09C40H F_DATA DATA 0A3F8H 14037H 09C40H F2_DATA DATA The two large arrays are placed in serparate segments (F_DATA and F2_DATA) as they should be, so why do I get the error message from the linker ??? -- Fridrik Skulason Univ. of Iceland, Computing Center UUCP ...mcvax!hafro!askja!frisk BIX frisk "This line intentionally left blank"