Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does the hex address mean in ldd output?

Tags:

linux

bash

For example:

$ ldd /bin/ls
      linux-vdso.so.1 (0x00007ffcc3563000)
      libselinux.so.1 => /lib64/libselinux.so.1 (0x00007f87e5459000)

What do "0x00007ffcc3563000" and "0x00007f87e5459000" mean here?

I have queried man page, according to the it:

ldd displays the location of the matching object and the (hexadecimal) address at which it is loaded.

Does it mean the shared object's virtual address in the kernel space? But what if this shared object has not been loaded?

like image 534
Yalou Wang Avatar asked Oct 20 '25 13:10

Yalou Wang


1 Answers

They are loaded (if not before then certainly while running ldd), that's actually how ldd works.

The ldd program uses the dynamic linker ld.so to find and load the objects needed to satisfy dependencies.

This is described in the man-page for ldd along with a warning that you may want to heed about it possibly executing the program you give it under certain circumstances (and giving an alternative). Basically, don't use it on untrusted binaries.

like image 189
paxdiablo Avatar answered Oct 23 '25 03:10

paxdiablo



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!