nixCraft Linux Forum

nixCraft

Linux / UNIX Tech Support Forum

Hidden symbol error using libgcc.a

This is a discussion on Hidden symbol error using libgcc.a within the Coding in General forums, part of the Development/Scripting category; I am trying to build an application using shared libraries for vxWorks. The compiler is based on the GNU 3.3.2 ...


Go Back   nixCraft Linux Forum > Development/Scripting > Coding in General

Linux answers from nixCraft.


Coding in General Discussion on PHP/Perl/Python/Ruby/GNU C or C++. MySQL, PgSQL and (X)HTML or any other programming languages you want.

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 28-11-2005, 11:43 PM
HB
Guest
 
Posts: n/a
Default Hidden symbol error using libgcc.a

I am trying to build an application using shared libraries for
vxWorks. The compiler is based on the GNU 3.3.2 tools.
When I build my very trivial test application, which uses the
ACE library (libACE.so), I get the following error message:

myRTP.vxe: hidden symbol `_Unwind_SjLj_Unregister' in /home/local1/vx/VxWorks_6.1/gnu/3.3.2-vxworks61/target/powerpc-wrs-vxworks/lib/mrtp/libgcc.a(unwind-sjlj.o) is referenced by DSO
collect2: ld returned 1 exit status

As I read it, this message is telling me that there is a hidden symbol
(_Unwind_SjLj_Unregister) in libgcc.a that is being referenced by the
shared library (libACE.so).

Is this a correct interpretation?

I don't know why this symbol is referenced from libACE.so. If I put
--trace-symbol=_Unwind_SjLj_Unregister on the ld command line when
building the libACE.so library, sure enough, it shows that many object
files making up the library reference this symbol. I can find nothing
in the source files to suggest why, so I assume it is some kind of
built-into-gcc construct.

Does anyone know what is going on here or how I might resolve this?
Is there a way to cause the symbols in libgcc.a to not be hidden?

Thanks in advance for any help you can give...
Reply With Quote
  #2 (permalink)  
Old 30-11-2005, 12:29 AM
HB
Guest
 
Posts: n/a
Default Additional info

P.S. The build is on linux (Mandrake 10) and the target is vxWorks 6.1 on a PPC 604. The ACE library was linked with the -shared -fpic -Bdynamic flags to create a shared library.
Reply With Quote
  #3 (permalink)  
Old 30-11-2005, 01:06 AM
Guest
 
Posts: n/a
Default

Have u tried rpath option while compiling code? e.g.
-rpath /home/local1/path/2/ACE library

???
Reply With Quote
  #4 (permalink)  
Old 30-11-2005, 03:46 AM
HB
Guest
 
Posts: n/a
Default

Good question. I did some checking and I think I am doing it correctly:
I use -rpath on the link of the application so the loader knows where to find the library at run-time.
However, the error occurs when I try to build the application, not when I run it. I use the -L switch to indicate where to find the library at build time, at it appears to find it - since it complains about it referenceing a hidden symbol.
I think the real question comes down to: What is this _Unwind_SjLj_Unregister_ symbol and why is it referenced from a shared library whose source code does not contain anything like "*Unwind*", "*unwind*", etc.?
It must be part of the way gcc generates code...(?)
Also, the error message refers to "unwind-sjlj.o" as part of libgcc.a.
Anybody know what that is for? Are apps supposed to reference symbols from there?

Messy question, I know. Thanks for taking a stab at it...
HB
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
Invalid ICMP type 3 code 3 error to a broadcast -samba error raj Linux software 0 09-07-2006 04:38 AM


All times are GMT +5.5. The time now is 12:18 PM.


Powered by vBulletin® Version 3.8.5 - Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2
©2005-2010 nixCraft. All rights reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38