www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/11/25/07:07:10

Date: Fri, 25 Nov 94 11:27:24 +0100
From: enrico AT deis33 DOT cineca DOT it (Enrico Denti)
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Problems with ld in djgpp 1.12m2

Hi all,
this is my first message to the djgpp mail list, so maybe this
topic has already been addressed in the past. However, my problem
is the ld utility in the last version (1.12m2) of djgpp.

More precisely, I downloaded some months ago djgpp1.11m5 to be
able to exploit the foreign file interface in SICStus Prolog,
which allows people to write C parts and automatically link them
to the SICStus system thru built-in mechanism.
Everything worked fine with djgpp1.11m5.

Then, I downloaded djgpp1.12m2 (which, by the way, is much better
as for the gcc/g++ compiler), but now I get fatal errors when the
SICStus system calls ld to link my files to itself.
At the beginning, it complained about not finding libraries: I
supposed it was because the LIBRARY_PATH env. variable was defined
in djgpp.env ONLY in the [gcc] section. So I added an [ld] section,
but it was not recognized. As a temporary solution, I defined that
variable at top-level (i.e., globally-visible) in djgpp.env.

Now ld seems to find its libraries, but all it does, after a while,
is hanging up my computer issuing a "segmentation violation" error.
More precisely, its output is:

C:> ld @C:\DJGPP\TMP\EXT040

Segmentation violation in pointer 0x0019a000 at d8:10ff
eax=00000000, ebx=000010a8, ecx=ffea7bcc, edx=80157fd4,
esi=00010000, edi=0019a000, ebp=7ffffc58, esp=7fffe698,
cs=d8, ds=48, es=48, fs=48, gs=38, ss=48, cr2=0000a000
Call frame traceback EIPS: 0x000010ff
Unsupported INT 0x2f  0x0000ba62

After this, the system is completely blocked, and can be restarted
only by a hardware reset (ctrl-alt-del does not work).

Since the SAME example, on the SAME machine, with the SAME instal-
lation of SICStus Prolog works perfectly with djgpp1.11m5, the point
is: is there anything wrong with ld in djgpp1.12m2, or what am I
doing wrong?

By the way:
1) where can I find detailed documentation on which sections can be
   added to djgpp.env? The readme.dj file is a bit generic on this...

2) is the ld utility designed to work also as a stand-alone linker,
   and, if so, how? I read all the info available, but I have not
   been able to use it to link even a very simple two-file C program.
   Instead, using gcc for linking is fine and works perfectly in all
   cases (but this is not applicable if, as in my case, you have an
   application which definitely wants to use ld....).

Thanks a lot!

Enrico Denti
University of Bologna, Italy
edenti AT deis DOT unibo DOT it
enrico AT deis33 DOT cineca DOT it
---------------------------------------------------------------------

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019