Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

67
votes
2answers
47k views

Getting “Not found” message when running a 32-bit binary on a 64-bit system

I have currently a strange problem on debian (wheezy/amd64). I have created a chroot to install a server (i can't give any more detail about it, sorry). Let's call its path /chr_path/. To make things ...
94
votes
4answers
105k views

Where do executables look for shared objects at runtime?

I understand how to define include shared objects at linking/compile time. However, I still wonder how do executables look for the shared object (*.so libraries) at execution time. For instance, my ...
14
votes
1answer
8k views

Installing two glibc alongside in debian/ubuntu

Is it possible to install and use two different glibc versions on the same machine. Where one version is only used to run legacy software, which relies on old glibc binaries? Is it possible to do ...
51
votes
7answers
127k views

How to find out the dynamic libraries executables loads when run?

I want to find out the list of dynamic libraries a binary loads when run (With their full paths). I am using CentOS 6.0. How to do this?
10
votes
1answer
6k views

Which parts of an ELF executable get loaded into memory, and where?

What I already know: An ELF executable has a number of sections, obviously the .text and .data sections get loaded into memory as these are the main parts of the program. But for a program to work, ...
16
votes
9answers
69k views

Problem to launch java at Debian: “error while loading shared libraries: libjli.so”

I'm trying to launch java: $ java -version java: error while loading shared libraries: libjli.so: cannot open shared object file: No such file or directory $ ldd /usr/lib/jvm/java-6-openjdk/jre/bin/...
16
votes
2answers
8k views

How to upgrade shared library without crash?

Here it says that you can rewrite an executable file and the process will run just fine - it will be re-read when a process restarts. However, when I try to replace a binary file while the process is ...
12
votes
3answers
19k views

Linux executable fails with “File not found” even though the file is there and in PATH

I want to launch the wine executable (Version 2.12), but I get the following error ($=shell prompt): $ wine bash: /usr/bin/wine: No such file or directory $ /usr/bin/wine bash: /usr/bin/wine: No such ...
11
votes
2answers
3k views

Cannot execute binary in NixOS - No such file or directory

I tried to install the current oracle jre on a VM running NixOS. Now the following happens: [michas@cc:~]$ tar xvzf jre-7u40-linux-x64.tar.gz |grep bin/java jre1.7.0_40/bin/javaws jre1.7.0_40/bin/...
8
votes
2answers
3k views

Identifying running programs that are using the old version of a library I just replaced

After installing updates to address CVE-2014-0160 (the OpenSSL Heartbleed bug), I had to take care to restart anything that might be using libssl -- many services, such as Apache and my VPN software, ...
4
votes
2answers
6k views

Confusion about linking boost library while compilation

For a client I needed to add boost 1.54 to the system. So I downloaded the latest version (1.55) and built it within a special directory: /usr/local/lib/boost1.55/. This works. Then I had to adapt the ...
0
votes
2answers
220 views

Will dynamic link library must be loaded into RAM

As we know, any executable file, which is running, is loaded into RAM. Also, we have two kinds of libs: static link library and dynamic link library. The two kinds of libs should be loaded into RAM ...
121
votes
4answers
68k views

How do SO (shared object) numbers work?

I'm aware that shared objects under Linux use "so numbers", namely that different versions of a shared object are given different extensions, for example: example.so.1 example.so.2 I understand the ...
22
votes
5answers
9k views

What system call is used to load libraries in Linux?

In strace outputs, the paths to the libraries that executables call are in calls to open(). Is this the system call used by executables that are dynamically linked? What about dlopen()? open() isn't a ...
10
votes
1answer
5k views

Linux, GNU GCC, ld, version scripts and the ELF binary format — How does it work?

I'm trying to learn more about library versioning in Linux and how to put it all to work. Here's the context: -- I have two versions of a dynamic library which expose the same set of interfaces, say ...
11
votes
1answer
10k views

What is the order that Linux's dynamic linker searches paths in?

This is not a duplicate because this is dealing with a peculiarity I noticed when I use /etc/ld.so.conf. To get the paths that the dynamic linker searches in for libraries, I run the command ldconfig ...
8
votes
2answers
6k views

How to use libraries installed by nix at run-time?

I'm using nix in "single-user mode" in a system where I'm not the root (see below for a description of my nix setup). I wanted to quickly run one of my binaries which is dynamically linked with a ...
9
votes
2answers
333 views

Is there a mechanism that protects applications during library upgrade?

If user works on an application that is dynamically linked, and system is being upgraded, is there any protection mechanism that prevents application corruption? Or is it up to application?
1
vote
1answer
257 views

In what library on Linux are the system calls and how is this library linked to the executable object file that contains the system calls?

I know that the system calls are not in the C standard Library. Is there any library (some sort of a system library) where the system calls are? If there is such a library how is this library linked ...
1
vote
2answers
4k views

ld.so.preload doesn't differ x86_32 and x86_64

— It's known you can run x86_32 programms with x86_64 kernel if it was compiled with support for that. But dynamic linker doesn't provide any way to define a separate set of preload libraries for 32-...
4
votes
1answer
2k views

Environment settings on setuid executables

I am observing a curious behavior when running a program with setuid bit enabled. Program foo is owned by user bar with setuid bit set. User execbar runs foo foo reports that one of the dynamic ...
9
votes
3answers
2k views

“which” equivalent for shared libraries

I am looking for a utility that would behave in the same way as which, but to look up shared libraries (*.so) in the directories defined in $LD_LIBRARY_PATH?
5
votes
3answers
7k views

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) ...
3
votes
1answer
796 views

Error while building snipersim: “relocation R_X86_64_32S against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC”

I know that snipersim isn't a very typical "project" but this is more a linux/linking problem than anything else, so I think it goes here. I have also contacted the developers, but have yet to receive ...
1
vote
1answer
997 views

dynamic linker/loader libs - missing ld.so

Following manual describes dynamic linker/loader libs: The program ld.so handles a.out binaries, a format used long ago; ld-linux.so* handles ELF (/lib/ld-linux.so.1 for libc5, /lib/ld-linux.so.2 ...
1
vote
0answers
40 views

list the link files of a process [duplicate]

Saying that there is a running process named a. Is it possible to list all of the lib files that a needs, including static link files and dynamic link files (.a, .so)?
1
vote
1answer
147 views

executed “chmod 666 ld-2.17.so” - how can i recover?

While trying to learn about how ld-2.17.so works to change the permission of chmod executable itself, and thought if i can change the permission of ld-2.17.so itself. I ran chmod 666 ld-2.17.so in a ...
1
vote
1answer
11k views

“symbol lookup error: /usr/lib/x86_64-linux-gnu/libxfconf-0.so.2: undefined symbol: g_type_class_adjust_private_offset”

Just upgraded my dev system from Debian Wheezy to Debian Jessie, by the straight-forward method of changing sources.list and apt-get upgrade/dist-upgrade. Now I'm seeing failures when I try to log in ...
0
votes
1answer
1k views

Shared object “libarchive.so.7” not found, required by “pkg”

I'm using FreeBSD 12-CURRENT and recently I tried to update my packages with pkg. pkg update finished successfully, but pkg upgrade returned the following error: Shared object "libarchive.so.5" not ...