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

Peter S. Mazinger ps.m at gmx.net
Tue Dec 6 20:06:22 UTC 2005


On Tue, 6 Dec 2005, John Z. Bohach wrote:

> On Tuesday 06 December 2005 01:25, Peter S. Mazinger wrote:
> > are you sure you used the correct strip (it is that you render your libs
> > useless, if you use the host strip against the cross-compiled libs)
> >
> > Peter
> 
> Sorry, I thought this would be more obvious.  I don't want to start a big long 
> thread, so specifically, in buildroot/packages/Makefile.in, we have:
> 
> STRIP=$(TARGET_CROSS)strip --remove-section=.comment --remove-section=.note
> 
> which is fine.  But then later, specific package makefiles do this:

generally yes, .note should be stripped only if it is unallocated

> 
> package/ncurses.mk:
> -$(STRIP) --strip-unneeded $(TARGET_DIR)/lib/libncurses.so.$(NCURSES_VER)
> 
> and package/berkelybd.mk
> -$(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.

list those undefined ones...

Peter

> 
> Just an FYI, and a learning point.
> 
> --john
> 
> P.S.:  freetype, directfb, libpng, libsys, and more all suffer from this, so 
> whatever the thinking was, it was contagious...
> 

-- 
Peter S. Mazinger <ps dot m at gmx dot net>           ID: 0xA5F059F2
Key fingerprint = 92A4 31E1 56BC 3D5A 2D08  BB6E C389 975E A5F0 59F2




More information about the busybox mailing list