From where does the ldd command retrieve dependency information?

227 views Asked by At

Kindly bare if the question is very basic. ldd command displays the dependent libraries over the executable file is what i know. In executable file, where these information is kept?.

1

There are 1 answers

2
NPE On BEST ANSWER

This is stored in the .dynamic section of the ELF executable. See ELF-64 Object File Format, starting on page 14 (Dynamic Tables):

Dynamically-bound object files will have a PT_DYNAMIC program header entry. This program header entry refers to a segment containing the .dynamic section, whose contents are an array of Elf64_Dyn structures.