From: ng@piments.com
To: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Cc: crossgcc@sourceware.org
Subject: Re: how to get target ldd ?
Date: Wed, 10 Jun 2009 07:08:00 -0000 [thread overview]
Message-ID: <4A2F5BD4.6000703@piments.com> (raw)
In-Reply-To: <200906100800.51029.yann.morin.1998@anciens.enib.fr>
Yann E. MORIN wrote:
> Peter,
> All,
>
> On Wednesday 10 June 2009 00:16:58 ng@piments.com wrote:
>> # ldd
>> -sh: ldd: not found
>> # ls -ail `which ldd`
>> 3273877 -r-xr-xr-x 1 root root 5583 Jun 8 2009 /usr/bin/ldd
>> So it's there, it's found by which, but "not found". Clearly this is
>> just busybox's challenged error handling spewing garbage. The question
>> is how to debug what is really happending.
>> This error is helpful in itself since it's not even a binary, it's a
>> script.
>
> Running a shell script (or any other script type) first imply running a
> shell, and that shell will interpret the script.
>
>> Binaries give :
>> -sh: gnuplot: Permission denied
>> even though they have x permissions and are being invoked by root.
>
> Hmmm. Sounds like a ld problem. Please run this on the target:
> # ls -l /lib/ld*
>
> It should be marked with the 'x' bit.
>
> I'm off to work, will look in more details tonight...
>
> Regards,
> Yann E. MORIN.
>
Damn! it was that simple.
chmod a+x /lib/ld* fix it. My hello.dyn and gnuplot now work.
I posted quite some time back in another thread that all my libs were
without x perms and it got no comment. So I assumed that it was normal
and the it was regarded as a dumb question.
So the question is: why is it installed with the wrong permissions?
I have just rebuild the toolchain and the perms look correct in sys-root.
3317406 -r-xr-xr-x 1 prof users 160750 2009-06-10 01:49 ld-2.9.so
3317408 lrwxrwxrwx 1 prof users 9 2009-06-10 01:49 ld-linux.so.3
-> ld-2.9.so
However ldd still does not work:
# ldd gnuplot
-sh: ldd: not found
# which ldd
/usr/bin/ldd
I think what may have happened it that , having noted that nothing had x
in /lib I added it to all libs without noting that ld was (possibly)
already executable. When I did not get any comment on that I likely
reverted everything including ld to -x .
I'll do more thorough testing tonight but initial evidence suggests that
it is fixed.
It would be good to have ldd as a tool but I think that is a differenct
problem.
It tool a long time to find something so simple but at least I can
rebuild everything dynamic now.
Many thanks, Peter.
--
For unsubscribe information see http://sourceware.org/lists.html#faq
next prev parent reply other threads:[~2009-06-10 7:08 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-06 7:09 peter
2009-06-06 17:09 ` Dan Wilder
2009-06-07 16:56 ` Yann E. MORIN
2009-06-09 22:17 ` ng
2009-06-10 6:01 ` Yann E. MORIN
2009-06-10 7:08 ` ng [this message]
2009-06-10 21:29 ` ng
2009-06-11 20:39 ` Yann E. MORIN
2009-06-12 8:03 ` ng
2009-06-10 8:34 Nebojša Ćosić
2009-06-10 14:48 ` Dan Wilder
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=4A2F5BD4.6000703@piments.com \
--to=ng@piments.com \
--cc=crossgcc@sourceware.org \
--cc=yann.morin.1998@anciens.enib.fr \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).