Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Michael S. Zick <minimod@morethan.org>
To: buildroot@busybox.net
Subject: [Buildroot] Shared objects, load order?
Date: Wed, 2 Dec 2009 06:44:40 -0600	[thread overview]
Message-ID: <200912020644.43103.minimod@morethan.org> (raw)
In-Reply-To: <op.u4auhacnyqa4qb@jap>

On Wed December 2 2009, Joachim Pihl wrote:
> 
> I only have one hurdle left before the upgrade from 0.10.0 to 2009.11 is  
> in place. It may be related to .so's referring other .so's.
> 
> In the beginning, I thought that _none_ of our C++ applications would run  
> on the updated platform, they would all die with a segmentation fault  
> before reaching main(). Then I discovered something interesting, namely  
> that _one_ application actually runs. All the apps are production code,  
> they run on the same hardware with the old buildroot system, so the fact  
> that they do not all behave the same is intriguing. I think it may be  
> caused by some .so referring something in another .so that has not been  
> loaded yet. ldd shows that the working app and one of the crashing ones  
> reference (in essence) the same .so's, but lists them in different order.
> 
> Works:
> 
> # ldd /multicon/gyda
> 	libxml2.so.2 => /usr/lib/libxml2.so.2 (0x4000e000)
> 	libgd.so.2 => /usr/lib/libgd.so.2 (0x4012b000)
> 	libpng12.so.0 => /usr/lib/libpng12.so.0 (0x4016b000)
> 	libpthread.so.0 => /lib/libpthread.so.0 (0x40191000)
> 	libz.so.1 => /usr/lib/libz.so.1 (0x401ab000)
> 	libboost_thread-mt.so => /usr/lib/libboost_thread-mt.so (0x401c4000)
> 	libspread.so.2 => /usr/lib/libspread.so.2 (0x401d8000)
> 	libcrypt.so.0 => /lib/libcrypt.so.0 (0x4023f000)
> 	libsqlite3.so.0 => /usr/lib/libsqlite3.so.0 (0x4025c000)
> 	libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x402c5000)
> 	libm.so.0 => /lib/libm.so.0 (0x40376000)
> 	libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x40390000)
> 	libc.so.0 => /lib/libc.so.0 (0x403a3000)
> 	libdl.so.0 => /lib/libdl.so.0 (0x40401000)
> 	librt.so.0 => /lib/librt.so.0 (0x4040c000)
> 	libnsl.so.0 => /lib/libnsl.so.0 (0x40415000)
> 	ld-uClibc.so.0 => /lib/ld-uClibc.so.0 (0x40000000)
> 
> 
> Crashes:
> 
> # ldd /multicon/phy
> 	libboost_thread-mt.so => /usr/lib/libboost_thread-mt.so (0x4000e000)
> 	libspread.so.2 => /usr/lib/libspread.so.2 (0x40022000)
> 	libcrypt.so.0 => /lib/libcrypt.so.0 (0x40089000)
> 	libsqlite3.so.0 => /usr/lib/libsqlite3.so.0 (0x400a6000)
> 	libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x4010f000)
> 	libm.so.0 => /lib/libm.so.0 (0x401c0000)
> 	libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x401da000)
> 	libc.so.0 => /lib/libc.so.0 (0x401ed000)
> 	libpthread.so.0 => /lib/libpthread.so.0 (0x4024b000)
> 	librt.so.0 => /lib/librt.so.0 (0x40265000)
> 	libnsl.so.0 => /lib/libnsl.so.0 (0x4026e000)
> 	libdl.so.0 => /lib/libdl.so.0 (0x40277000)
> 	ld-uClibc.so.0 => /lib/ld-uClibc.so.0 (0x40000000)
> 
> 
> Any changes in uclibc regarding this over the last two years? I have seen  
> that linkers are sometimes fuzzy about the ordering of static libraries, I  
> have never had a problem with shared ones.
> 
> 

Did you enable sstrip?
The sstrip in the 2009.8 (and probably in 2009.11, since I never saw it fixed)
creates object (and statically linked) objects with corrupted headers.

Turn it off, rebuild, report back.

Mike

  parent reply	other threads:[~2009-12-02 12:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-02  7:16 [Buildroot] Shared objects, load order? Joachim Pihl
     [not found] ` <4d28d4b50912020059t6ae52e8bx7b0f76db774e4cdd@mail.gmail.com>
2009-12-02  9:04   ` Joachim Pihl
2009-12-02 12:54     ` Joachim Pihl
2009-12-02 13:04       ` Lionel Landwerlin
2009-12-02 12:44 ` Michael S. Zick [this message]
2009-12-02 13:04   ` Joachim Pihl
2009-12-02 13:03     ` Michael S. Zick

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200912020644.43103.minimod@morethan.org \
    --to=minimod@morethan.org \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox