Reputation: 65
Copied from http://wiki.debian.org/Multiarch/LibraryPathOverview :
any directory named in the (deprecated) DT_RPATH dynamic tag of the requesting object, or, recursively, any parent object (note that DT_RPATH is ignored if DT_RUNPATH is also present)
I can't seem to find the definition of a dynamic tag anywhere.
Upvotes: 2
Views: 1231
Reputation: 213789
Every dynamically linked ELF image (executable of type ET_EXEC
or library of type ET_DYN
) has a dynamic table (which you can see via objdump -p a.out
or readelf -d a.out
). Each entry in a table contains a set of Elf32_Dyn
or Elf64_Dyn
entries, and each entry has a d_tag
and d_value
members. Documentation here.
The dynamic tag
is the d_tag
entry, which is just an integer tag (DT_NEEDED
, DT_STRTAB
, etc.) describing what the d_value
of this particular entry in the table represents.
Dynamic loader uses the dynamic table to load ELF image, find libraries that are needed by it (using DT_NEEDED
and DT_RPATH
or DT_RUNPATH
entries), initialize it (using DT_INIT
or DT_INIT_ARRAY
), find symbols in it (DT_SYMTAB
, DT_STRTAB
, DT_HASH
), relocate it, etc. etc.
Upvotes: 6
Reputation: 98446
It simply refers to the entries in the Dynamic Section (DT probably stands for Dynamic Table or something).
You can see them with the command:
$ objdump -p program
Upvotes: 1