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
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 )
Is it a ld-Problem? I've just tried it, but it works very well.
Here is my system-info:
reality:~/pascal$ gpc -v Reading specs from /usr/lib/gcc-lib/i486-unknown-linux/2.7.2.1.f.1/specs gpc version 2.0(2.7.2.1.f.1) reality:~/pascal$ ld -v ld version 2.7 (with BFD 2.7.0.3)
Ok, this is the gcc with the g77 compiler. I've sent some patches to Jan-Jaap and they will be added to the FAQ. (In fact it's only in the file toplev.c where some options were added.)
Bye, Nils
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