[buildroot] $(STRIP) --strip-unneeded on a SHARED library...WHY?

John Z. Bohach jzb at aexorsyst.com
Tue Dec 6 17:20:01 UTC 2005

On Tuesday 06 December 2005 08:44, Paul Fox wrote:
>  > > -$(STRIP) --strip-unneeded $(TARGET_DIR)/lib/libdb*so*
>  > >
>  > > which is not fine, because all symbol information from the libraries
>  > > is now removed, and whenever a linker tries linking against thusly
>  > > stripped libraries, you get "undefined symbol..." errors.
>  >
>  > cant say ive had this issue before and as solar pointed out, we've been
>  > using --strip-unneeded on *all* shared libraries for quite a long time
>  > now without any linking issues
> we use --strip-unneeded too, and it's fine.  but it's fine for
> runtime.  is it perhaps the case that libraries stripped like
> that can no longer be used in development?

BINGO.  Executables that have been linked have addresses hardwired where the 
symbols were.  The library code didn't change, but '$(LD) ... -l{somelib} 
...etc' won't find the symbols, and you'll get undefined symbol errors.

The most obvious side effect of this is try running a 'make menuconfig' of 
buildroot in a self-hosted environment, i.e. one created by buildroot.  Since 
lib/libncurses*so* is stripped of symbols, you'll get undefined symbol 
"libgettext_...' errors, etc.

> paul
> =---------------------
>  paul fox, pgf at brightstareng.com
> _______________________________________________
> busybox mailing list
> busybox at busybox.net
> http://busybox.net/cgi-bin/mailman/listinfo/busybox

     ###  Any similarity between my views and the truth is completely ###
     ###  coincidental, except that they are endorsed by NO ONE       ###

More information about the busybox mailing list