From: Mark Hatle <mark.hatle@windriver.com>
To: <yocto@yoctoproject.org>
Subject: Re: [prelink-cross] error while loading shared libraries: ld-linux.so.3
Date: Tue, 16 Jun 2015 14:12:07 -0500 [thread overview]
Message-ID: <55807507.1080906@windriver.com> (raw)
In-Reply-To: <CALgoR9NG-nVj7qaSSbAVjmhEWSpWaq_oGqFvA0yq+YM9nisF_g@mail.gmail.com>
On 6/16/15 2:01 AM, Florian Boehmak wrote:
> Hi,
>
> I am having difficulties to cross-prelink a simple hello world program.
> Prelinking for my x86 machine works fine (host system) but when using the arm
> cross-compile toolchain I get the error:
>
> prelink: bin_arm/hello: Could not parse `/usr/local/sbin//prelink-rtld: error
> while loading shared libraries: ld-linux.so.3'
The error indicates that it found a library required called 'ld-linux.so.3', but
could not find that in the "path". (The path generally being the sysroot path
passed to the rtld.)
What command did you use to run the prelinker? And does your sysroot contain
the /lib/ld-linux.so.3?
--Mark
> If I understand it correctly then prelink-rtld emulates ld-linux.so but why is
> it parsed by rtld?
>
> Here are my files:
>
> # main.cpp
>
> #include <stdio.h>
> #include "world.h"
> int main (int argc, char *argv[])
> {
> fprintf(stdout, "hello\n");
> World w;
> w.Str();
> return 0;
> }
>
>
> # world.cpp
>
> #include "world.h"
> void World::Str()
> {
> fprintf(stdout, "world\n");
> }
>
>
> # prelink_arm.conf
>
> -l arm-2012.03/arm-none-linux-gnueabi/libc/lib
> -h arm-2012.03/arm-none-linux-gnueabi/libc/lib
> -l arm-2012.03/arm-none-linux-gnueabi/libc/usr/lib
> -h arm-2012.03/arm-none-linux-gnueabi/libc/usr/lib
>
>
> # compiling
>
> ../arm-2012.03/bin/arm-none-linux-gnueabi-gcc -Wall -fPIC -shared -Iinclude -o
> lib_arm/libworld.so src/world.cpp
> arm-2012.03/bin/arm-none-linux-gnueabi-gcc -Wall -Iworld/include
> -Lworld/lib_arm/ -lworld -o bin_arm/hello src/main.cpp
>
>
> # prelink-cross
>
> PATH=/usr/local/sbin prelink --verbose --cache-file=cache/prelink_arm.cache
> --config-file=prelink_arm.conf
> --ld-library-path="world/lib_arm;arm-2012.03/arm-none-linux-gnueabi/libc/lib;arm-2012.03/arm-none-linux-gnueabi/libc/usr/lib;"
> -h bin_arm/hello
>
>
> I am sort of stuck. Could you point me in the right direction. What am I missing
> or doing wrong?
> Thank you.
>
> Cheers
> Florian
>
> Ps. I have put together the code on github this would be the "shared-library"
> branch.
> https://github.com/fnbk/prelink-cross-example
>
> Ps. I posted a similar question on stackoverflow, cross-prelinking but without
> shared libraries.
> http://stackoverflow.com/q/30849060/5011904
>
>
>
>
>
>
>
>
>
>
>
>
next prev parent reply other threads:[~2015-06-16 19:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-16 7:01 [prelink-cross] error while loading shared libraries: ld-linux.so.3 Florian Boehmak
2015-06-16 19:12 ` Mark Hatle [this message]
2015-06-16 22:56 ` Florian Boehmak
2015-06-17 13:28 ` Florian Boehmak
2015-06-17 20:35 ` Mark Hatle
-- strict thread matches above, loose matches on Subject: below --
2015-06-16 16:39 Florian Boehmak
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=55807507.1080906@windriver.com \
--to=mark.hatle@windriver.com \
--cc=yocto@yoctoproject.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.