GCC problem on Solaris
Steve Wong
steve_wong@macroview.com.hk
Tue Mar 13 20:10:00 GMT 2001
Thx. Oliva, the problem were solved.
However, I have one qu., -static and -shared seems somehow to have
relationship. I have
tried to specify both for a gcc build statement. It returns:
ld: warning: option -d appears more than once, first setting taken
ld: fatal: option -dn and -z[text|textwarn|textoff] are incompatible
ld: fatal: option -dn and -G are incompatible
ld: fatal: Flags processing errors
Now for my understanding,
-shared means I am going to make a shared object
-static forces the linking to use archive file rather than shared object.
Correct me if I am wrong.
Thx. and Regards.
Steve.
-----Original Message-----
From: gcc-help-owner@gcc.gnu.org [ mailto:gcc-help-owner@gcc.gnu.org]On
Behalf Of Alexandre Oliva
Sent: 13 March 2001 20:30
To: Steve Wong
Cc: gcc-help@gcc.gnu.org
Subject: Re: GCC problem on Solaris
On Mar 13, 2001, steve_wong@macroview.com.hk (Steve Wong) wrote:
> Text relocation remains referenced
> against symbol offset in file
> omapi_listener_trace_setup 0x4e4
> /export/home/steve/dhcp-3.0b2p
> 8/work.sunos5/omapip/libomapi.a(support.o)
It means this library wasn't built with -fPIC. You can manage to add
it to a SO by using gcc -mimpure-text.
> If I remove -shared and add -static, it prompts me :
> ld: fatal: library -ldl: not found
-ldl isn't available as a static library. Note that -static has a
meaning totally unrelated to that of -shared. You use the latter to
*create* a shared library, whereas you use the former to *link with*
static libraries.
--
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
More information about the Gcc-help
mailing list