gpc linking problem cd._(re)

Mon, 17 Feb 1997 11:33:17 +0100 (MET)




On Wed, 29 Jan 1997, Krzysztof Kwapien wrote:

> I wrote the hello world program.
> begin
>    writeln('Hello World');
> end. 
> 
> I compiled it with 
>   gpc -o hello hello.pas
> and it Worked!!
> But when i tried to compile it with
>   gpc -c hello.pas     <- this worked
>   gpc -o hello hello.o <- this crashed with a SIGSEGV .....
> it crashed when linking.
> What's the problem? 
> ( I tried the -v option, and it seems as if some of the temporary files,
> where not linked in )
> Because RHIDE also does it in the same manner it crashes too
>    Help: kkwapien@mimuw.edu.pl
> 
>
Here is the output you wanted.
----->  This is from : gpc -v -o hello hello.pas
 
Reading specs from d:/djgpp/lib\specs.gpc
gpc version 1.2(2.7.2)
 d:/djgpp/bin\gpc-cpp.exe -lang-pascal -v -nocharescape -undef -D__GNUC__=1 -D__GPC__=1 -D__GNUC_MINOR__=2(2 -D__unix__ -D__i386__ -D__GO32__ -D__MSDOS__ -D__DJGPP__=2 -D__DJGPP_MINOR__=1 -D__unix -D__i386 -D__GO32 -D__MSDOS -D__DJGPP=2
-D__DJGPP_MINOR=1 
hello.pas d:/djgpp/tmp\ccbaaaaa.i
GNU CPP version 1.2(2.7.2) (80386, BSD syntax)
#include "..." search starts here:
#include <...> search starts here:
 d:/djgpp/include
 d:/djgpp/lang/pascal
 /usr/local/include
 /usr/local/go32/include
 /usr/local/lib/gcc-lib/go32/2.7.2/include
 /usr/include
End of search list.
 d:/djgpp/bin\gpc1.exe d:/djgpp/tmp\ccbaaaaa.i -quiet -dumpbase hello.pas -version -o d:/djgpp/tmp\cccaaaaa.s
GNU Pascal version 1.2(2.7.2) (80386, BSD syntax) compiled by GNU C version 2.7.2.
hello.pas:1: warning: missing program header
 d:/djgpp/bin\as.exe -o d:/djgpp/tmp\ccdaaaaa.o d:/djgpp/tmp\cccaaaaa.s
 d:/djgpp/bin\ld.exe -o hello d:/djgpp/lib\crt0.o -Ld:/djgpp/lib d:/djgpp/tmp\ccdaaaaa.o -Tdjgpp.djl -lgcc -lgpc -lm -lc -lgcc
 d:/djgpp/bin\stubify.exe -v hello
stubify for djgpp V2.X executables, Copyright (C) 1995 DJ Delorie
stubify: hello -> hello.000 -> hello.exe

----> This is from gpc -v -c hello.pas

Reading specs from d:/djgpp/lib\specs.gpc
gpc version 1.2(2.7.2)
 d:/djgpp/bin\gpc-cpp.exe -lang-pascal -v -nocharescape -undef -D__GNUC__=1 -D__GPC__=1 -D__GNUC_MINOR__=2(2 -D__unix__ -D__i386__ -D__GO32__ -D__MSDOS__ -D__DJGPP__=2 -D__DJGPP_MINOR__=1 -D__unix -D__i386 -D__GO32 -D__MSDOS -D__DJGPP=2
-D__DJGPP_MINOR=1 
hello.pas d:/djgpp/tmp\ccbaaaaa.i
GNU CPP version 1.2(2.7.2) (80386, BSD syntax)
#include "..." search starts here:
#include <...> search starts here:
 d:/djgpp/include
 d:/djgpp/lang/pascal
 /usr/local/include
 /usr/local/go32/include
 /usr/local/lib/gcc-lib/go32/2.7.2/include
 /usr/include
End of search list.
 d:/djgpp/bin\gpc1.exe d:/djgpp/tmp\ccbaaaaa.i -quiet -dumpbase hello.pas -version -o d:/djgpp/tmp\cccaaaaa.s
GNU Pascal version 1.2(2.7.2) (80386, BSD syntax) compiled by GNU C version 2.7.2.
hello.pas:1: warning: missing program header
 d:/djgpp/bin\as.exe -o hello.o d:/djgpp/tmp\cccaaaaa.s

-----> This is from gpc -v -o hello hello.o

Reading specs from d:/djgpp/lib\specs.gpc
gpc version 1.2(2.7.2)
Exiting due to signal SIGSEGV
Page fault at eip=0000c928, error=0004
eax=00000000 ebx=0005debc ecx=0005debc edx=00000000 esi=fffffffc edi=00066fe8
ebp=0005dd94 esp=0005dd90 cs=00e7 ds=00ef es=00ef fs=00cf gs=00ff ss=00ef
Call frame traceback EIPs:
  0x0000c928
  0x0000925e
  0x0000a0f0
  0x0000b79f



Krzysztof Kwapien (kkwapien@mazur.mimuw.edu.pl)

HTML conversion by Lluís de Yzaguirre i Maura
Institut de Lingüística Aplicada - Universitat "Pompeu Fabra"
e-mail: de_yza@upf.es