[uClibc] Issues with ".hidden" libgcc symbols in soft-float code

Sevy Jonathan J.Sevy at flarion.com
Wed Sep 24 15:59:57 UTC 2003


I've been trying to compile applications for the MPC860 using a powerpc-uclibc-gcc 3.3.1 cross-compiler toolchain, and have been having issues relating to "hidden symbols being referenced by DSO". I'm using uClibc-0.9.21, with shared libraries and soft floating point.


- There seems to be a bug in the get-needed-libgcc-objects.sh script in the uClibc-0.9.21 distribution: the line

if $NM --undefined-only libc.ldr 2>&1 | sed -s 's/ *$//' | sed -e 's/^.*U  *//' | grep -v "main$" | grep -v "_GLOBAL_OFFSET_TABLE_$" | grep -v "_gp_disp" | grep -v "^etext$" | grep -v "^__gmon_start__$" > sym.need ; then

uses "sed -s", which isn't recognized by my version of sed, and the symbols don't get included (but the make doesn't abort!); replacing it with "sed -e" seems to correct the problems:

if $NM --undefined-only libc.ldr 2>&1 | sed -e 's/ *$//' | sed -e 's/^.*U  *//' | grep -v "main$" | grep -v "_GLOBAL_OFFSET_TABLE_$" | grep -v "_gp_disp" | grep -v "^etext$" | grep -v "^__gmon_start__$" > sym.need ; then


- After correcting the above issue, I built the gcc-3.3.1 toolchain and uClibc libraries using Erik Andersen's build scripts, building shared libraries and selecting "INCLUDE_LIBGCC_SYMBOLS" in the uClibc configuration, and found that the libgcc symbols are in fact included in the resulting libc (verified using nm and objdump). However, these come with the ".hidden" attribute that's included in the gcc-3.3.1 libgcc. This wouldn't be a problem except that libm uses some of these symbols as well; normally, libm would be able to resolve these through libc, but with the hidden attribute libm can't use these.


Can anyone suggest the best approach to resolving this issue? I can think of two: 
- finding a way to have the included libgcc symbols not use the ".hidden" attribute (but I don't know how to do this, or if it would be a good thing to do...)
- modify the get-needed-libgcc-objects script to transfer the libgcc stuff into libm as well as libc; but I don't know if there are other libs that would need these as well, and it seems wasteful to include multiple copies of libgcc stuff...

Any ideas?

Thanks!
  \
  Jon




 Jonathan Sevy
 Flarion Technologies Inc.
  
***********************************************************************************************************************
This email may contain confidential and privileged material for the sole use of the intended recipient.
Any review or distribution by others is strictly prohibited.  If you are not the intended recipient please
contact the sender and delete all copies.
***********************************************************************************************************************




More information about the uClibc mailing list