nixCraft Linux Forum

nixCraft

Linux 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

Register FAQ Members List Calendar Forgotten your password? Mark Forums Read
  #1 (permalink)  
Old 11-29-2005, 12:43 AM
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
Sponsored Links
  #2 (permalink)  
Old 11-30-2005, 01: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 11-30-2005, 02: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 11-30-2005, 04: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

Bookmarks


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 On

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 07-09-2006 05:38 AM


All times are GMT +5.5. The time now is 03:16 AM.


Powered by vBulletin® Version 3.7.4 - Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0

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