delorie.com is funded by banner ads.
  www.delorie.com/djgpp/v2faq/faq066.html   search  

| Previous | Next | Up | Top |

8.16 Linker fails for large object files or large libraries

Q: Whenever I define very large static arrays in my program, the linker fails saying "could not read symbols: Bad value". Huh??

Q: I have some large libraries that I cannot link because the linker fails on them with a message saying "memory exhausted". I have plenty of virtual memory on my system, so why would ld fail?


A: This is a known bug in ld.exe from GNU Binutils 2.5.2. Please upgrade to DJGPP v2.01 which comes with Binutils 2.7. If you can't upgrade, or if the latest ld.exe exhibits such bugs, these are your alternatives for a work-around: ld.exe from GNU Binutils 2.7 (which comes with DJGPP v2.01) doesn't have most of these problems, but there are still some cases where you might see such messages. One such case is the POVRAY package, where the failure is caused by an object file called _pmlite.o in the pmode.a library. The problem here is that _pmlite.o is a TASM-compiled file, processed by EMXAOUT. EMXAOUT produces a.out object files which ld.exe cannot link if they are in a library. Either taking that object file out of the library, or processing the original _pmlite.obj with another tool (such as OBJ2BFD or OBJ2COFF) will solve these problems. Note however, that the authors of OBJ2COFF have explicitly forbidden commercial use of their tool.


  webmaster   donations   bookstore     delorie software   privacy  
  Copyright ⌐ 1998   by Eli Zaretskii     Updated Sep 1998  

Powered by Apache!

You can help support this site by visiting the advertisers that sponsor it! (only once each, though)