This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: G++ Linking issue : hidden symbol `__dso_handle'
- From: Rajat <myself_rajat at yahoo dot com>
- To: Ian Lance Taylor <iant at google dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Thu, 8 Oct 2009 06:58:38 -0700 (PDT)
- Subject: Re: G++ Linking issue : hidden symbol `__dso_handle'
- References: <837066.15359.qm@web54008.mail.re2.yahoo.com> <m3ocpba00y.fsf@google.com> <549030.13699.qm@web54008.mail.re2.yahoo.com> <m38wgf9e4r.fsf@google.com> <251438.92515.qm@web54011.mail.re2.yahoo.com> <m3ocp2gtww.fsf@google.com> <659607.80744.qm@web54003.mail.re2.yahoo.com> <m3d45igqrp.fsf@google.com>
Hi Ian,
Couldn't resolve this issue yet. :(
As you said, "That means that it can only be referenced from within the executable, not from a shared library."
So it seems this symbol is being referenced in crtbegin.o. If so then how to aviod it?
Thanks,
Rajat.
----- Original Message ----
From: Ian Lance Taylor <iant@google.com>
To: Rajat <myself_rajat@yahoo.com>
Sent: Wed, September 23, 2009 11:13:22 AM
Subject: Re: G++ Linking issue : hidden symbol `__dso_handle'
Rajat <myself_rajat@yahoo.com> writes:
> But it seems linker is not able to resolve this symbol, defined in crtbegin.o .
>
> /usr/bin/ld: <binary_name> :hidden symbol `__dso_handle' in /usr/lib/gcc/i386-redhat-linux/3.4.6/crtbegin.o is referenced by DSO
> /usr/bin/ld: final link failed: Nonrepresentable section on output
> collect2: ld returned 1 exit status
Please reply to the mailing list, not just to me.
As the error message says, the symbol is marked as hidden in crtbegin.o.
That means that it can only be referenced from within the executable,
not from a shared library.
Ian