From: torvalds@klaava.Helsinki.FI (Linus Benedict Torvalds) Subject: Re: kermit5A.tar.Z Date: 12 Apr 1992 19:53:45 GMT
In article <1992Apr11.234044.27436@athena.mit.edu> wet!dhl@netcom.com (Dahai Li) writes:
>
>I have seen your notice about re-uploading a working version of kermit5A to
>tsx-11.mit.edu, and downloaded it (it is dated 4/10/92, I think). However,
>it still fails to work with a "segment fault".
>
>I am running Linux 0.95c+ on a 8Meg 486 (with 16Meg swap space). Could you
>check it again please?
This might not have anything to do with this particular problem, but I'd
just like to say:
When using gcc-2.1 to compile binaries that you distribute on the net,
/PLEASE/ use the "-static" flag to get a statically linked binary.
Otherwise, the binary won't work on a machine without the library, and
the result is a segfault. The binary should really print out "unable to
find /lib/libXX.XX.XX", but due to a minor bug in the crt0.s code, it
doesn't: it just dies with the segmentation fault.
There is a very easy way to check if a binary is linked with a shared
library: the first 1200 bytes (or so) will contain the ascii string
"unable to find /lib/libXX.YY.ZZ" (where XX.YY.ZZ probably is 92.04.06,
but it really depends on the shared-library version). The signature can
easily be found using "strings xxx | head" or "od -c xxx | head" or
similar ("head -c1200 xxx", "less xxx" also work)
Linus
PS. The crt0.s bug is being fixed, and future versions will give a
clear error message telling you why it doesn't work...