You can do bash -x ldd /bin/ls to understand what ldd does. ldd script is not "cryptic". It basically works
LD_TRACE_LOADED_OBJECTS=1 /lib64/ld-linux-x86-64.so.2 /bin/ls
therefore, it uses a dynamic system loader (because the result of ldd depends on your real environment and system!). But you can examine objdump -x /bin/ls dynamic section of the executable, for example
% objdump -x /bin/ls /bin/ls: file format elf64-x86-64 /bin/ls architecture: i386:x86-64, flags 0x00000112: EXEC_P, HAS_SYMS, D_PAGED start address 0x00000000004046d4 Program Header: PHDR off 0x0000000000000040 vaddr 0x0000000000400040 paddr 0x0000000000400040 align 2**3 filesz 0x00000000000001c0 memsz 0x00000000000001c0 flags rx INTERP off 0x0000000000000200 vaddr 0x0000000000400200 paddr 0x0000000000400200 align 2**0 filesz 0x000000000000001c memsz 0x000000000000001c flags r-- LOAD off 0x0000000000000000 vaddr 0x0000000000400000 paddr 0x0000000000400000 align 2**21 filesz 0x0000000000019ef4 memsz 0x0000000000019ef4 flags rx LOAD off 0x000000000001a000 vaddr 0x000000000061a000 paddr 0x000000000061a000 align 2**21 filesz 0x000000000000077c memsz 0x0000000000001500 flags rw- DYNAMIC off 0x000000000001a028 vaddr 0x000000000061a028 paddr 0x000000000061a028 align 2**3 filesz 0x00000000000001d0 memsz 0x00000000000001d0 flags rw- NOTE off 0x000000000000021c vaddr 0x000000000040021c paddr 0x000000000040021c align 2**2 filesz 0x0000000000000044 memsz 0x0000000000000044 flags r-- EH_FRAME off 0x0000000000017768 vaddr 0x0000000000417768 paddr 0x0000000000417768 align 2**2 filesz 0x00000000000006fc memsz 0x00000000000006fc flags r-- STACK off 0x0000000000000000 vaddr 0x0000000000000000 paddr 0x0000000000000000 align 2**3 filesz 0x0000000000000000 memsz 0x0000000000000000 flags rw- Dynamic Section: NEEDED libselinux.so.1 NEEDED librt.so.1 NEEDED libacl.so.1 NEEDED libc.so.6 INIT 0x0000000000402148 FINI 0x00000000004125f8 HASH 0x0000000000400260 GNU_HASH 0x00000000004005c0 STRTAB 0x0000000000401100 SYMTAB 0x0000000000400620 STRSZ 0x00000000000004d7 SYMENT 0x0000000000000018 DEBUG 0x0000000000000000 PLTGOT 0x000000000061a208 PLTRELSZ 0x0000000000000990 PLTREL 0x0000000000000007 JMPREL 0x00000000004017b8 RELA 0x0000000000401740 RELASZ 0x0000000000000078 RELAENT 0x0000000000000018 VERNEED 0x00000000004016c0 VERNEEDNUM 0x0000000000000003 VERSYM 0x00000000004015d8 Version References: required from librt.so.1: 0x09691a75 0x00 05 GLIBC_2.2.5 required from libacl.so.1: 0x05822452 0x00 06 ACL_1.2 0x05822450 0x00 04 ACL_1.0 required from libc.so.6: 0x09691a75 0x00 03 GLIBC_2.2.5 0x0d696913 0x00 02 GLIBC_2.3
Again, the actual dependency depends on the system your binary is running on (for example, since I could have LD_LIBRARY_PATH with my own libc.so.6 somewhere, which would be a bad idea).
So you need a cross version of objdump
Basile Starynkevitch Apr 07 2018-12-12T00: 00Z
source share