Rajat <myself_rajat@xxxxxxxxx> writes: > 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? crtbegin.o is defining the symbol __dso_handle. Some shared library is referring to the symbol __dso_handle. That reference shouldn't be coming from crtbegin.o--crtbegin.o should define the symbol. Where is the reference? The linker error message doesn't say. Ian > ----- Original Message ---- > From: Ian Lance Taylor <iant@xxxxxxxxxx> > To: Rajat <myself_rajat@xxxxxxxxx> > Sent: Wed, September 23, 2009 11:13:22 AM > Subject: Re: G++ Linking issue : hidden symbol `__dso_handle' > > Rajat <myself_rajat@xxxxxxxxx> 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.