All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] where is 'ldd'?
@ 2013-07-08 13:56 Woody Wu
  2013-07-08 14:14 ` Zoltan Gyarmati
  0 siblings, 1 reply; 10+ messages in thread
From: Woody Wu @ 2013-07-08 13:56 UTC (permalink / raw)
  To: buildroot

Hi,

I just cann't find what is the menu item in buildroot to enable building
of 'ldd' for my target.  Does anyone know it?

Thanks in advance.

-- 
I can't go back to yesterday - because I was a different person then

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Buildroot] where is 'ldd'?
  2013-07-08 13:56 [Buildroot] where is 'ldd'? Woody Wu
@ 2013-07-08 14:14 ` Zoltan Gyarmati
  2013-07-08 14:27   ` Woody Wu
  0 siblings, 1 reply; 10+ messages in thread
From: Zoltan Gyarmati @ 2013-07-08 14:14 UTC (permalink / raw)
  To: buildroot

On 07/08/2013 03:56 PM, Woody Wu wrote:
> Hi,
>
> I just cann't find what is the menu item in buildroot to enable building
> of 'ldd' for my target.  Does anyone know it?
>
> Thanks in advance.
>
Sure you don't have it already on your system? What toolchain / libc 
are you using?

-- 
br, 
Zoltan Gyarmati
mail: mr.zoltan.gyarmati at gmail.com
freenode nick: zgyarmati

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Buildroot] where is 'ldd'?
  2013-07-08 14:14 ` Zoltan Gyarmati
@ 2013-07-08 14:27   ` Woody Wu
  2013-07-08 16:49     ` Thomas De Schampheleire
  0 siblings, 1 reply; 10+ messages in thread
From: Woody Wu @ 2013-07-08 14:27 UTC (permalink / raw)
  To: buildroot

On Mon, Jul 08, 2013 at 04:14:37PM +0200, Zoltan Gyarmati wrote:
> On 07/08/2013 03:56 PM, Woody Wu wrote:
> > Hi,
> >
> > I just cann't find what is the menu item in buildroot to enable building
> > of 'ldd' for my target.  Does anyone know it?
> >
> > Thanks in advance.
> >
> Sure you don't have it already on your system? What toolchain / libc 
> are you using?

I also feel strange, but its sure. I am using Code Sorucery, downloaded
it's lite version (arm linux eabi version, 2013-05-24). It comes with an
installer, which created a seperated directory in my home. I searched
through its installation directory (via 'find'), sure not have anything
like "*ldd".

-
woody

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Buildroot] where is 'ldd'?
  2013-07-08 14:27   ` Woody Wu
@ 2013-07-08 16:49     ` Thomas De Schampheleire
  2013-07-09  1:05       ` Woody Wu
  2013-07-09 10:40       ` Thomas Petazzoni
  0 siblings, 2 replies; 10+ messages in thread
From: Thomas De Schampheleire @ 2013-07-08 16:49 UTC (permalink / raw)
  To: buildroot

Hi,

On Mon, Jul 8, 2013 at 4:27 PM, Woody Wu <narkewoody@gmail.com> wrote:
> On Mon, Jul 08, 2013 at 04:14:37PM +0200, Zoltan Gyarmati wrote:
>> On 07/08/2013 03:56 PM, Woody Wu wrote:
>> > Hi,
>> >
>> > I just cann't find what is the menu item in buildroot to enable building
>> > of 'ldd' for my target.  Does anyone know it?
>> >
>> > Thanks in advance.
>> >
>> Sure you don't have it already on your system? What toolchain / libc
>> are you using?
>
> I also feel strange, but its sure. I am using Code Sorucery, downloaded
> it's lite version (arm linux eabi version, 2013-05-24). It comes with an
> installer, which created a seperated directory in my home. I searched
> through its installation directory (via 'find'), sure not have anything
> like "*ldd".

You really don't need a special ldd.
ldd is just a script. In its most basic usage (ldd <executable>), it just runs:
# LD_TRACE_LOADED_OBJECTS=1 <executable>

For example on busybox:
# LD_TRACE_LOADED_OBJECTS=1 /bin/busybox
        linux-vdso32.so.1 =>  (0x00100000)
        libc.so.6 => /lib/libc.so.6 (0x0fe70000)
        /lib/ld.so.1 (0x48000000

So for sporadic usage, an ldd script isn't even needed.

See 'man ld.so' for information on this LD_TRACE_LOADED_OBJECTS
variable (and several other useful variables that change the behavior
of the executable.

See also: http://www.catonmat.net/blog/ldd-arbitrary-code-execution/

Best regards,
Thomas

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Buildroot] where is 'ldd'?
  2013-07-08 16:49     ` Thomas De Schampheleire
@ 2013-07-09  1:05       ` Woody Wu
  2013-07-09 10:40       ` Thomas Petazzoni
  1 sibling, 0 replies; 10+ messages in thread
From: Woody Wu @ 2013-07-09  1:05 UTC (permalink / raw)
  To: buildroot

On Mon, Jul 08, 2013 at 06:49:40PM +0200, Thomas De Schampheleire wrote:
> Hi,
> 
> On Mon, Jul 8, 2013 at 4:27 PM, Woody Wu <narkewoody@gmail.com> wrote:
> > On Mon, Jul 08, 2013 at 04:14:37PM +0200, Zoltan Gyarmati wrote:
> >> On 07/08/2013 03:56 PM, Woody Wu wrote:
> >> > Hi,
> >> >
> >> > I just cann't find what is the menu item in buildroot to enable building
> >> > of 'ldd' for my target.  Does anyone know it?
> >> >
> >> > Thanks in advance.
> >> >
> >> Sure you don't have it already on your system? What toolchain / libc
> >> are you using?
> >
> > I also feel strange, but its sure. I am using Code Sorucery, downloaded
> > it's lite version (arm linux eabi version, 2013-05-24). It comes with an
> > installer, which created a seperated directory in my home. I searched
> > through its installation directory (via 'find'), sure not have anything
> > like "*ldd".
> 
> You really don't need a special ldd.
> ldd is just a script. In its most basic usage (ldd <executable>), it just runs:
> # LD_TRACE_LOADED_OBJECTS=1 <executable>
> 
> For example on busybox:
> # LD_TRACE_LOADED_OBJECTS=1 /bin/busybox
>         linux-vdso32.so.1 =>  (0x00100000)
>         libc.so.6 => /lib/libc.so.6 (0x0fe70000)
>         /lib/ld.so.1 (0x48000000
> 
> So for sporadic usage, an ldd script isn't even needed.
> 
> See 'man ld.so' for information on this LD_TRACE_LOADED_OBJECTS
> variable (and several other useful variables that change the behavior
> of the executable.
> 
> See also: http://www.catonmat.net/blog/ldd-arbitrary-code-execution/
> 

Cool! learned a thing!

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Buildroot] where is 'ldd'?
  2013-07-08 16:49     ` Thomas De Schampheleire
  2013-07-09  1:05       ` Woody Wu
@ 2013-07-09 10:40       ` Thomas Petazzoni
  2013-07-09 17:39         ` Thomas De Schampheleire
  1 sibling, 1 reply; 10+ messages in thread
From: Thomas Petazzoni @ 2013-07-09 10:40 UTC (permalink / raw)
  To: buildroot

Dear Thomas De Schampheleire,

On Mon, 8 Jul 2013 18:49:40 +0200, Thomas De Schampheleire wrote:

> You really don't need a special ldd.
> ldd is just a script. In its most basic usage (ldd <executable>), it just runs:
> # LD_TRACE_LOADED_OBJECTS=1 <executable>
> 
> For example on busybox:
> # LD_TRACE_LOADED_OBJECTS=1 /bin/busybox
>         linux-vdso32.so.1 =>  (0x00100000)
>         libc.so.6 => /lib/libc.so.6 (0x0fe70000)
>         /lib/ld.so.1 (0x48000000
> 
> So for sporadic usage, an ldd script isn't even needed.

Right, but does this work with the uClibc dynamic loader? Anyway, if
those features don't exist with the uClibc dynamic loader, then
implementing ldd is simply impossible.

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Buildroot] where is 'ldd'?
  2013-07-09 10:40       ` Thomas Petazzoni
@ 2013-07-09 17:39         ` Thomas De Schampheleire
  2013-07-09 17:43           ` Baruch Siach
  0 siblings, 1 reply; 10+ messages in thread
From: Thomas De Schampheleire @ 2013-07-09 17:39 UTC (permalink / raw)
  To: buildroot

Op 9-jul.-2013 12:40 schreef "Thomas Petazzoni" <
thomas.petazzoni@free-electrons.com> het volgende:
>
> Dear Thomas De Schampheleire,
>
> On Mon, 8 Jul 2013 18:49:40 +0200, Thomas De Schampheleire wrote:
>
> > You really don't need a special ldd.
> > ldd is just a script. In its most basic usage (ldd <executable>), it
just runs:
> > # LD_TRACE_LOADED_OBJECTS=1 <executable>
> >
> > For example on busybox:
> > # LD_TRACE_LOADED_OBJECTS=1 /bin/busybox
> >         linux-vdso32.so.1 =>  (0x00100000)
> >         libc.so.6 => /lib/libc.so.6 (0x0fe70000)
> >         /lib/ld.so.1 (0x48000000
> >
> > So for sporadic usage, an ldd script isn't even needed.
>
> Right, but does this work with the uClibc dynamic loader? Anyway, if
> those features don't exist with the uClibc dynamic loader, then
> implementing ldd is simply impossible.

I haven't tried this on uClibc yet. Anyone that has such a target at hand
willing to give it a shot?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20130709/4e9803f9/attachment-0001.html>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Buildroot] where is 'ldd'?
  2013-07-09 17:39         ` Thomas De Schampheleire
@ 2013-07-09 17:43           ` Baruch Siach
  2013-07-09 18:13             ` Thomas De Schampheleire
  2013-07-10  7:18             ` Thomas Petazzoni
  0 siblings, 2 replies; 10+ messages in thread
From: Baruch Siach @ 2013-07-09 17:43 UTC (permalink / raw)
  To: buildroot

Hi Thomas,

On Tue, Jul 09, 2013 at 07:39:49PM +0200, Thomas De Schampheleire wrote:
> Op 9-jul.-2013 12:40 schreef "Thomas Petazzoni" <
> thomas.petazzoni at free-electrons.com> het volgende:
> >
> > Dear Thomas De Schampheleire,
> >
> > On Mon, 8 Jul 2013 18:49:40 +0200, Thomas De Schampheleire wrote:
> >
> > > You really don't need a special ldd.
> > > ldd is just a script. In its most basic usage (ldd <executable>), it
> just runs:
> > > # LD_TRACE_LOADED_OBJECTS=1 <executable>
> > >
> > > For example on busybox:
> > > # LD_TRACE_LOADED_OBJECTS=1 /bin/busybox
> > >         linux-vdso32.so.1 =>  (0x00100000)
> > >         libc.so.6 => /lib/libc.so.6 (0x0fe70000)
> > >         /lib/ld.so.1 (0x48000000
> > >
> > > So for sporadic usage, an ldd script isn't even needed.
> >
> > Right, but does this work with the uClibc dynamic loader? Anyway, if
> > those features don't exist with the uClibc dynamic loader, then
> > implementing ldd is simply impossible.
> 
> I haven't tried this on uClibc yet. Anyone that has such a target at hand
> willing to give it a shot?

Trying on uClibc (0.9.33.2) xtensa target I see:

# LD_TRACE_LOADED_OBJECTS=1 /bin/busybox
    libc.so.0 => /lib/libc.so.0 (0x20008000)
    ld-uClibc.so.0 => /lib/ld-uClibc.so.0 (0x20000000)

baruch

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Buildroot] where is 'ldd'?
  2013-07-09 17:43           ` Baruch Siach
@ 2013-07-09 18:13             ` Thomas De Schampheleire
  2013-07-10  7:18             ` Thomas Petazzoni
  1 sibling, 0 replies; 10+ messages in thread
From: Thomas De Schampheleire @ 2013-07-09 18:13 UTC (permalink / raw)
  To: buildroot

Op 9-jul.-2013 19:43 schreef "Baruch Siach" <baruch@tkos.co.il> het
volgende:
>
> Hi Thomas,
>
> On Tue, Jul 09, 2013 at 07:39:49PM +0200, Thomas De Schampheleire wrote:
> > Op 9-jul.-2013 12:40 schreef "Thomas Petazzoni" <
> > thomas.petazzoni at free-electrons.com> het volgende:
> > >
> > > Dear Thomas De Schampheleire,
> > >
> > > On Mon, 8 Jul 2013 18:49:40 +0200, Thomas De Schampheleire wrote:
> > >
> > > > You really don't need a special ldd.
> > > > ldd is just a script. In its most basic usage (ldd <executable>), it
> > just runs:
> > > > # LD_TRACE_LOADED_OBJECTS=1 <executable>
> > > >
> > > > For example on busybox:
> > > > # LD_TRACE_LOADED_OBJECTS=1 /bin/busybox
> > > >         linux-vdso32.so.1 =>  (0x00100000)
> > > >         libc.so.6 => /lib/libc.so.6 (0x0fe70000)
> > > >         /lib/ld.so.1 (0x48000000
> > > >
> > > > So for sporadic usage, an ldd script isn't even needed.
> > >
> > > Right, but does this work with the uClibc dynamic loader? Anyway, if
> > > those features don't exist with the uClibc dynamic loader, then
> > > implementing ldd is simply impossible.
> >
> > I haven't tried this on uClibc yet. Anyone that has such a target at
hand
> > willing to give it a shot?
>
> Trying on uClibc (0.9.33.2) xtensa target I see:
>
> # LD_TRACE_LOADED_OBJECTS=1 /bin/busybox
>     libc.so.0 => /lib/libc.so.0 (0x20008000)
>     ld-uClibc.so.0 => /lib/ld-uClibc.so.0 (0x20000000)

Thanks! So, it seems to work fine on uClibc as well...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20130709/8afdf76a/attachment.html>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Buildroot] where is 'ldd'?
  2013-07-09 17:43           ` Baruch Siach
  2013-07-09 18:13             ` Thomas De Schampheleire
@ 2013-07-10  7:18             ` Thomas Petazzoni
  1 sibling, 0 replies; 10+ messages in thread
From: Thomas Petazzoni @ 2013-07-10  7:18 UTC (permalink / raw)
  To: buildroot

Dear Baruch Siach,

On Tue, 9 Jul 2013 20:43:06 +0300, Baruch Siach wrote:

> Trying on uClibc (0.9.33.2) xtensa target I see:
> 
> # LD_TRACE_LOADED_OBJECTS=1 /bin/busybox
>     libc.so.0 => /lib/libc.so.0 (0x20008000)
>     ld-uClibc.so.0 => /lib/ld-uClibc.so.0 (0x20000000)

Nice, thanks for testing!

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2013-07-10  7:18 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-08 13:56 [Buildroot] where is 'ldd'? Woody Wu
2013-07-08 14:14 ` Zoltan Gyarmati
2013-07-08 14:27   ` Woody Wu
2013-07-08 16:49     ` Thomas De Schampheleire
2013-07-09  1:05       ` Woody Wu
2013-07-09 10:40       ` Thomas Petazzoni
2013-07-09 17:39         ` Thomas De Schampheleire
2013-07-09 17:43           ` Baruch Siach
2013-07-09 18:13             ` Thomas De Schampheleire
2013-07-10  7:18             ` Thomas Petazzoni

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.