View Single Post
Old 08-20-2012, 06:46 PM   #12
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 4,922
Karma: 4492231
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW & PW2
@twobo/knc1: The K3 does use ld-linux.so.3 (while my x86 host uses ld-linux.so.2. ARM ABI specific thingy?).

@twobob: That doesn't change the fact that the binutils ld you built seems to want to rely on the ld helper from the glibc you built, not the one shipped with the K3. (EDIT: because your 'new' glibc is seen before the K3's with your custom LD_LIBRARY_PATH, which I guess is what the LD_PRELOAD hack was used to workaround, although I have *no* idea if it's safe, or even a good idea at all. Having to use LD_PRELOAD isn't usually a great thing to begin with, and preloading the glibc does seem a bit extreme to me ^^).

Use readelf -l to check what ld helper your binaries are looking for, which is probably /lib/ld-linux.so.3 right now.

Keep in mind that ld-linux is a part of glibc, and I've never tried what you're doing (ie. loading a newer glibc with an older loader), but it's probably not all that surprising that it's failing . The 'best' way to handle this is probably to use the newer version of everything (glibc AND loader), or the older version of everything (which is what I'm usually doing).

As for how to achieve that (using the new loader), besides replacing the Kindle's loader in the rootfs (which is not necessarily safe, like knc1 said, check, check, and triple check, before you try it ^^), I have no idea. Messing with the INTERP header on your custom binaries?

EDITē: A quick google search leads to this utility: http://nixos.org/patchelf.html
So I guess switching the interp header in an elf binary isn't so crazy after all .
The info about the dynamic-loader LDFLAGS is good to know, if you want to go that way without having to patch every single binaries after building them .

Last edited by NiLuJe; 08-20-2012 at 07:14 PM.
NiLuJe is offline   Reply With Quote