LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
 
Search this Thread
Old 03-27-2013, 12:57 PM   #1
harig
LQ Newbie
 
Registered: Jun 2012
Posts: 10

Rep: Reputation: Disabled
hidden symbol `stat' in /usr/lib/libc_nonshared.a(stat.oS) is referenced by DSO


OS : RHEL 6.3 i686

$ gcc -v
Target: i686-redhat-linux
gcc version 4.4.6 20120305 (Red Hat 4.4.6-4) (GCC)
$ ld -v
GNU ld version 2.20.51.0.2-5.34.el6 20100205

I am getting the following error while linking c program and compiled with -fPIC flag
hidden symbol `stat' in /usr/lib/libc_nonshared.a(stat.oS) is referenced by DSO
/usr/bin/ld: final link failed: Nonrepresentable section on output

I tried with -shared flag while linking.

After this I see no linker error but if I run the process it immediately crashes.
Not even going to the main.

please shed some light on the linker error and the problem.
 
Old 03-28-2013, 06:34 AM   #2
pan64
Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 6,041

Rep: Reputation: 1581Reputation: 1581Reputation: 1581Reputation: 1581Reputation: 1581Reputation: 1581Reputation: 1581Reputation: 1581Reputation: 1581Reputation: 1581Reputation: 1581
is your gcc installed properly? (maybe some files damaged?)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] gcc linker error - hidden symbol `stat' in /usr/lib/libc_nonshared.a(stat.oS) chaosless Linux - Software 1 09-17-2009 12:33 PM
symbol lookup error: /usr/lib/libavcodec.so.51: undefined symbol: av_crc04C11DB7 priceey Linux - Software 0 05-06-2009 08:14 AM
symbol lookup error: /usr/lib/libgtk-x11.2.0.so.0: undefined symbol:... IamI Slackware 17 02-29-2008 11:10 AM
./firefox-bin: symbol lookup error: /usr/lib/libpango-1.0.so.0: undefined symbol: g_s cb8100 Slackware 3 10-05-2006 10:55 AM
Linux stat to Windows Stat sridurai Programming 3 09-24-2004 04:07 PM


All times are GMT -5. The time now is 11:55 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration