NI Linux Real-Time Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

LDD on NI Linux RT

Solved!
Go to solution

How can we invoke ldd command on NI Linux RT?

ldd doesn't work

/usr/bin/ldd doesn't work

/usr/sbin/ldd doesn't work

 

 


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 1 of 3
(2,753 Views)
Solution
Accepted by topic author TiTou

I don't believe we install ldd by default but it is in the repos. You should be able to install it via:
- opkg update

- opkg install ldd

 

Since Linux RT is meant to be embedded and lightweight, some of the common utilities for development and debugging aren't installed but should generally be in the public repo.

Charlie J.
National Instruments
Message 2 of 3
(2,747 Views)
Solution
Accepted by topic author TiTou

Another (more obscure) way to do this without installing ldd is to run the dynamic loader library directly. For example:

 

admin@boson:~# /lib/ld-2.31.so 
Usage: ld.so [OPTION]... EXECUTABLE-FILE [ARGS-FOR-PROGRAM...]
You have invoked `ld.so', the helper program for shared library executables.
This program usually lives in the file `/lib/ld.so', and special directives
in executable files using ELF shared libraries tell the system's program
loader to load the helper program from this file. This helper program loads
the shared libraries needed by the program executable, prepares the program
to run, and runs it. You may invoke this helper program directly from the
command line to load and run an ELF executable file; this is like executing
that file itself, but always uses this helper program from the file you
specified, instead of the helper program file specified in the executable
file you run. This is mostly of use for maintainers to test new versions
of this helper program; chances are you did not intend to run this program.

--list list all dependencies and how they are resolved
--verify verify that given object really is a dynamically linked
object we can handle
--inhibit-cache Do not use /etc/ld.so.cache
--library-path PATH use given PATH instead of content of the environment
variable LD_LIBRARY_PATH
--inhibit-rpath LIST ignore RUNPATH and RPATH information in object names
in LIST
--audit LIST use objects named in LIST as auditors
--preload LIST preload objects named in LIST

admin@boson:~# /lib/ld-2.31.so --list /usr/local/natinst/labview/lvrt
linux-vdso.so.1 (0x00007fffe2930000)
libni_emb.so.6 => /usr/local/natinst/lib/libni_emb.so.6 (0x00007f832dad5000)
libni_rtlog.so.2 => /usr/local/natinst/lib/libni_rtlog.so.2 (0x00007f832d8d2000)
libdl.so.2 => /lib/libdl.so.2 (0x00007f832d8cd000)
librt.so.1 => /lib/librt.so.1 (0x00007f832d8c2000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f832d6e8000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00007f832d6cf000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00007f832d6ac000)
libc.so.6 => /lib/libc.so.6 (0x00007f832d4f0000)
/lib64/ld-linux-x86-64.so.2 => /lib/ld-2.31.so (0x00007f832dd13000)
libm.so.6 => /lib/libm.so.6 (0x00007f832d3ad000)

 

 

Message 3 of 3
(2,648 Views)