Re: hidden symbol __dso_handle reference: link error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Matthew Woehlke wrote:
Gary Hughes-Fenchel wrote:
I am seeing this:
 /usr/bin/ld: pgmreceiver: hidden symbol `__dso_handle' in
/usr/lib/gcc/x86_6
    4-redhat-linux/4.1.1/crtbegin.o is referenced by DSO
 26 /usr/bin/ld: final link failed: Nonrepresentable section on output
 27 collect2: ld returned 1 exit status

I am calling ld directly. I am building 2 separate libraries and trying
to link with the dynamic libraries. The libraries are being created with:
-fvisibility=default
-shared
-soname foo.so -lc mylib1.a mylib2.a

Are you using '-shared' when you invoke gcc/g++ to compile your source objects?

Yes. I am attaching 3 files: BuildSmall, which is a bash script to build the cpp files, reallysmall.cpp which contains main, and reallysmalllib.cpp which contains a call to stat & printf. I COULD have written a makefile but I think the bash script is even more trivial.

This apparently works using gcc 4.x, but not the version of gcc I am using.
 gcc --version
gcc (GCC) 3.2.3 20030502 (Red Hat Linux 3.2.3-53)

Upgrading gcc is not going to be an option for the actual product.


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux