GCC 4.0.3 -shared creates segfault
delgarde at ihug.co.nz
Wed Apr 18 02:51:54 PDT 2007
On Tue, 2007-04-17 at 11:24 +0200, Tijnema ! wrote:
> Just wondering that there was no error telling me it shouldn't be used
> on binaries.
There's no error, because what you told it to do was perfectly valid -
just not what you thought you'd told it to do. There's not that much
difference between a dynamic library and an executable, just a few
changes in the file structure and a bit of extra startup code.
Fun trivia fact - it's actually possible for a library to be executable
as well. For example, if you run readelf on /lib/libc.so.6, it shows as
a library, but includes the PHDR and INTERP headers that make something
runnable as a standalone executable. If you try running that library in
a terminal, it'll produce a copyright statement, plus some details of
how glibc was configured. Similarly, /lib/ld-linux.so can be used to
list the dynamic libraries linked to a binary, producing the same output
as the 'ldd' command.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 189 bytes
Desc: This is a digitally signed message part
More information about the blfs-support