Questions tagged [dynamic-linking]

In computing, a dynamic linking is the process of an operating system (OS) that loads (copies from persistent storage to RAM) and links (fills jump tables and relocates pointers) the shared libraries needed by an executable at run time, that is, when it is executed.

In computing, a dynamic linking is the process of an operating system (OS) that loads (copies from persistent storage to RAM) and links (fills jump tables and relocates pointers) the shared libraries needed by an executable at run time, that is, when it is executed.

The specific operating system and executable format determine how the dynamic linker functions and how it is implemented.

Linking is often referred to as a process that is performed at compile time of the executable while a dynamic linker is in actuality a special loader that loads external shared libraries into a running process and then binds those shared libraries dynamically to the running process. The specifics of how a dynamic linker functions is operating-system dependent.

In case of dynamic linking the linker while creating the executable does minimal work. For the dynamic linker to work it actually has to load the libraries too. Hence, it's also called linking loader.

Reference: Dynamic linker.

264 questions
16
votes
2 answers

Get a list of the functions in a shared library?

How can I get a list of the functions defined in a shared object library, or find out if a particular function is defined in one?
delete
15
votes
2 answers

Can I use my own ld.so.cache?

ldconfig has two interesting options: -f conf Use conf instead of /etc/ld.so.conf. -C cache Use cache instead of /etc/ld.so.cache. I tried copying /etc/ld.so.conf to my own home directory, and edited it to include paths to my local…
syockit
  • 753
  • 2
  • 6
  • 17
8
votes
1 answer

finding undefined symbol

I am trying to run a program whose source I downloaded and compiled. When I try to run the program I keep getting the message: unable to load undefined symbol _z15InvalidateImageSs I am trying to determine why I am getting this error. The program…
dnraikes
  • 303
6
votes
3 answers

Finding the absolute path of shared libraries used by an executable

Considering lshw as a sample program, here is what ldd gives: $ ldd /usr/sbin/lshw linux-vdso.so.1 => (0x00007fff8bdaf000) libresolv.so.2 => /lib64/libresolv.so.2 (0x000000360e400000) libsqlite3.so.0 => /lib64/libsqlite3.so.0…
Amit
  • 412
5
votes
2 answers

Why does ldd show this dynamic linker location?

Here's the link command. Notice the specially defined dynamic linker near the beginning. time gcc -Wl,-rpath,/data/data/org.freesoft.Macaulay2/files/lib -Wl,-rpath,/data/data/org.freesoft.Macaulay2/files/lib/Macaulay2/armv7l-Linux-Ubuntu-12.04/lib…
4
votes
4 answers

Command to list the directories in which to look for shared libraries?

I've read which equivalent for shared libraries and Where do executables look for shared objects at runtime, but is there a command to list all the directories in which the shared libraries will be searched? Something like a command that…
mgarciaisaia
  • 252
  • 4
  • 9
4
votes
1 answer

How to determine where an executable searches for a shared library?

I know I have the library, but the executable can't find it. If I knew where it was searching, I could just create a symlink where it expects to find the lib. $ ~/Apps/simutrans/simutrans /home/dan/Apps/simutrans/simutrans: error while loading…
Dan Ross
  • 615
  • 2
  • 6
  • 14
3
votes
1 answer

What does "statically linked" mean?

As my understanding, so file is the dynamic library. We can use ldd to print its dependencies. For example, I can execute ldd -r /usr/lib/aarch64-linux-gnu/libstdc++.so.6 to get the output as below: linux-vdso.so.1 => (0x0000ffff793f7000) …
Yves
  • 3,291
2
votes
1 answer

Program linked against two versions of the same library?

I have two systems, both running Debian Jessie 8.4, and both have open-vm-tools installed. Files are identical on both sides. However, on one side the vmtoolsd links to an old libicu, althougth the file are identical, which gives me: vmtoolsd: error…
Daniel
  • 789
2
votes
2 answers

Is there any useful metadata inside shared objects, and if so, how do I extract it?

I have a file called mod_dav_svn.so. I would like to find out if this is a custom version of the file or a standard one. I have tried searching Google for the md5sum of the file, but nothing has turned up, suggesting it is a custom compilation. Is…
Rich
  • 4,529
2
votes
3 answers

libcurl.so.4 undefined reference error

Even after installation of curl and all concerned libcurl packages such as curl libcurl3 libcurl3-gnutls libcurl4-doc libcurl4-nss-dev libcurl-ocaml libcurl3-dbg libcurl3-nss libcurl4-gnutls-dev libcurl4-openssl-dev libcurl-ocaml-dev I get errors…
Altanai Bisht
  • 147
  • 1
  • 1
  • 6
1
vote
0 answers

undefined symbol on one system but not another with identical files

I'm starting vim on 2 systems, one works, the other fails with undefined symbol. The problem is that on one system libogg is not loaded but I can't see any differences in the systems: Working system: 0 root@cpcsrv ~ # ldd -d -r /usr/bin/vim …
1
vote
1 answer

ldd shows a set of libraries linked in, but using rabin2 -l shows differently. Why is that so?

While trying to debug something, i noticed that ldd would show a bunch of libraries like libldap_r, libkrb5 and libroken, amongst others. On the other hand a rabin2 -l does not show the same set of libraries. I've grepped…
1
vote
2 answers

Why is chrpath limited to maximum length 6?

I'm trying to change the RUNPATH of a shared object but I get an error that it cannot be longer than 6 characters. What is the reason for this? This is chrpath version 0.16 on Raspbian. $ chrpath -r ../../..…
Elliott B
  • 565
1
vote
1 answer

Can two application share library loaded at runtime?

I have 2 application lets say A1 ,A2 shared one shared object(lets say lib1) which loaded in application at runtime. A1 load lib1 using dlopen successfully. Now A2 wants to load library. Can A2?(as lib1 loaded in A1 address space). What if A1 load…
Suri
  • 391
  • 2
  • 4
  • 9
1
2