This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: creating a shared library on RedHat6.2 using gcc
- To: Denes Demeter <demeterd at ots dot codec dot ro>
- Subject: Re: creating a shared library on RedHat6.2 using gcc
- From: Alexandre Oliva <aoliva at redhat dot com>
- Date: 03 Oct 2000 03:47:00 -0200
- Cc: gcc-help at gcc dot gnu dot org
- Organization: GCC Team, Red Hat
- References: <39D8494A.45A9BE82@ots.codec.ro>
On Oct 2, 2000, Denes Demeter <demeterd@ots.codec.ro> wrote:
> gcc -o hello.so -Wl,-h,hello.so -shared hello.o
> "hello.so: file not recognized: File truncated
IIRC, this is a bug in collect2. It inserts some object file between
`-h' and `hello.so'. Run gcc with -v -Wl,-v to know for sure. Just
move the -Wl flag after the first object file and all will be fine.
> If somebody have a small example with scripts please send it to me .
How about libtool? It will print the commands it uses to create
shared libraries, so you can just follow the examples.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me