Hidden Symbols

Jakub Jelinek jakub at redhat.com
Thu Aug 12 08:56:44 UTC 2004


On Thu, Aug 12, 2004 at 03:50:01AM -0500, Amrith  wrote:
> 
> Hi all,
> 
> I am having a problem, while compiling a C code program which is
> having a stat64 function.
> 
> /usr/lib/gcc-lib/i586-suse-linux/3.3.3/../../../crt1.o(.text+0x18): In
		   ^^^^^^^^^^^^^^^
Doesn't sound much like Fedora Core.

> function `_start':
> ../sysdeps/i386/elf/start.S:98: undefined reference to `main'
> ld: trial.o: hidden symbol `stat64' in
> /usr/lib/libc_nonshared.a(stat64.oS) is referenced by DSO
> 
> Please can u answer why hidden symbols are used? 
> How to get out of this problem. Actually the definition is in
> libc_nonshared.a.
> Is there any work around for this problem ?

Anyway, this means you have one of the shared libraries you are trying
to link against built incorrectly.
ld -shared should never be used to build shared libraries, always
use gcc -shared or g++ -shared.
gcc/g++ driver needs all the little details how to link proper shared
libraries.

	Jakub





More information about the fedora-devel-list mailing list