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.

Filter by
Sorted by
Tagged with
0
votes
1answer
24 views

Dynamic loader: Strange behavior (Debian 8)

I'm trying to setup and run a scientific application on Debian 8 guest OS (OpenVZ containerized environment). Since the OS-bundled GNU C++ library is quite old and doesn't contain all needed symbols, ...
1
vote
0answers
40 views

Official ELF reference & ignoring DT_RPATH in shared libraries

What is the official ELF format reference for Linux? There is the ELF 1.2 specification, which is from 1995 and outdated (does not include DT_RUNPATH for instance). But apart from that, it seems ...
1
vote
1answer
19 views

Make error: DSO missing from command line

I am attempting to install rejoystick, and when I run make, I get this: Making all in src make[1]: Entering directory '/home/chrx/Downloads/joystick/rejoystick-0.8.1/src' make[2]: Entering directory '...
0
votes
0answers
27 views

What is the entry point of a so (shared object?)'s source code?

Specifically I'm trying to port libcroco's functionality to a cross-platform BASIC dialect and need to know where to start looking at the code. In short, what is the equivalent of Window's DLLMAIN?
0
votes
0answers
33 views

Why is the postgresql `libpq.so.5` shared library not being found on Nixos?

I'm trying to get an executable to work, it's currently running fine on one Nixos host, but not the new one. On old host: [root@XenonKiloCranberry:~/blog]# ldd app linux-vdso.so.1 (...
0
votes
0answers
23 views

How does my application in Linux know how to find libraries in the common places [duplicate]

When I compile a simple C program for Linux, how does it automatically know where to find the standard C libraries when I run it? Take the simple Hello World program for example which uses printf to ...
0
votes
0answers
7 views

QNX throws an error as login: -sh: cant access shared libraries

When I am trying to login with non root user the QNX throws an error as login: -sh: cant access shared libraries. Why is it so? I have already checked the permissions they are as below: /lib (...
1
vote
1answer
33 views

Why (and how) do I have (seemingly!) duplicate symbols in my shared libraries?

I happened to need to work out which symbols were exported by which library from a flat list of exported shared library symbols. There were just enough symbols (20 or so) in the list that I wasn't ...
0
votes
0answers
9 views

Remove or change default .so paths from library

With the usual cmake structure, we end up with a devel/lib directory of libraries we have built, and a install/lib/ directory with these installed files. If I run ldd install/lib/libFOO.so I see ...
0
votes
0answers
60 views

Error while attemping to run OpenRCT2 on Debian Stretch. libicuuc.so.60 cannot be opened: No such file or directory

I've been trying to get OpenRCT2 working on my laptop, which runs Debian Stretch (9.9 amd64), and I'm running into an issue. When running the executable after extracting OpenRCT2 in a folder, it tells ...
4
votes
3answers
235 views

Compile program in GNU GuixSD with cmake

I am trying to compile Xash3D on GuixSD v1.0.0 and gcc 8.3.0. In essence, ld cannot find crt1.o, crti.o, and libgcc_s.so, and it is quite possible that just like before, after linking or installing ...
1
vote
0answers
21 views

After setcap on executable, curl_easy_perform throws out of memory error

I've cross compiled an executable to run on Debian Stretch that requires a specific version of cURL (greater than 7.56) to run, and needs specific capabilities during execution. So on the executable ...
0
votes
1answer
38 views

Installing gtkmm from source

I know that gtkmm can be installed using package manager, but here I am keen to install it from source. It requires me to install the Dependencies: libsigc++ 2.0 GTK+ 3.0 glibmm cairomm pangomm ...
17
votes
1answer
2k views

Why don't Unix/Linux systems traverse through directories until they find the required version of a linked library?

I have a binary executable named "alpha" that requires a linked library (libz.so.1.2.7) which is placed at /home/username/myproduct/lib/libz.so.1.2.7 I export the same to my terminal instance before ...
0
votes
0answers
13 views

How to globally install dylib created by clang on MacOS

I have this in my Makefile: test: @clang -shared -fpic -O2 -install_name libasdf.dylib -o libasdf.dylib asdf.c @cp -f asdf.h /usr/local/include @cp -f asdf.dylib /usr/local/lib ...
0
votes
0answers
23 views

Check dependancies in compiled executables and shared objects

I'm trying to find what symbols are used by pam_ldap library that uses openssl dependancies. Also I'm trying to figure out same symbols but, in this case, from the executable ldapsearch. I tryed ...
7
votes
2answers
2k views

gcc - unknown switches (absent also from the manpage)

I'm trying to experiment with shared objects and found the below snippet on http://www.gambas-it.org/wiki/index.php?title=Creare_una_Libreria_condivisa_(Shared_Library)_.so gcc -g -shared -Wl,-soname,...
1
vote
0answers
22 views

Why does the address of an internal symbol needs to be recorded in .got?

I am reading the blog https://eli.thegreenplace.net/2011/11/11/position-independent-code-pic-in-shared-libraries-on-x64 In the part "x64 PIC with data references - an example", it seems that the ...
4
votes
0answers
126 views

Compile a library aiming to reduce size as much as possible

I have to 'squeeze' all the needed code to run ldaps on an embedded system. So the 3 MiB of lybcrypto and almost 700KiB of libssl are way too much. I'm now experimenting on ldapsearch because reading ...
0
votes
1answer
231 views

What does a “failed to map segment from shared object” error mean?

Many answers to other questions help resolve an error of the form "failed to map segment from shared object," but they usually have very specific answers that I find difficult to apply to other ...
0
votes
0answers
91 views

Symlink resolution and the $ORIGIN variable in RPATH

Are symlinks resolved before or after the dynamic loader figures out the value for the $ORIGIN in the rpath from an executable? Longer explanation: I'd like to know if there's an standards-compliant ...
0
votes
2answers
86 views

$LIB variable does not expand to anything in Ubuntu Server 18.10

I have the same exact problem as this question previously posted, where /etc/ld.so.preload does not intercept the right architecture. A little background: I have compiled a shared object (64-bit) that ...
2
votes
1answer
328 views

ldd equivalent which fail when library not found

Assume I perform ldd /bin/ls with the pthread library removed. I obtain linux-vdso.so.1 (0x00007ffcc3563000) libselinux.so.1 => /lib64/libselinux.so.1 (0x00007f87e5459000) libcap.so.2 => /...
-1
votes
1answer
132 views

what are the executable ELF files respectively for static linker, dynamic linker, loader and dynamic loader?

In Linux, what are the executable ELF files respectively for static linker dynamic linker loader dynamic loader? Which of them are invoked by execve() by dlopen()? How are they invoked by execve(...
0
votes
1answer
446 views

How does Linux kernel dynamically use a module?

Understanding the Linux Kernel says The kernel has two key tasks to perform in managing modules. The first task is mak- ing sure the rest of the kernel can reach the module’s global symbols, such ...
0
votes
1answer
424 views

Running a custom-compiled executable returns “No such file or directory”

I have an executable but when I run it I get "No such file or directory" $ chmod a+x bin $ file bin bin: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib/...
1
vote
0answers
46 views

How to add ssmtp into initramfs?

I'm trying to add ssmtp into initramfs. However, I can not find (or compile at the moment) the statically linked version. I guess my only option is adding the current, dynamically linked version. I'...
0
votes
1answer
971 views

How to run programs with ld-linux.so?

The dynamic linker can be run either indirectly by running some dynamically linked program or shared object (in which case no command-line options to the dynamic linker can be passed and, in the ELF ...
1
vote
0answers
1k views

Apache + mod_ssl build not linking to my OpenSSL build

I have spent some time searching online but none of what I found seems to help. I'm running CentOS 6 64bit and would like to compile Apache with mod_ssl and need to link it to my own OpenSSL build (...
-1
votes
1answer
36 views

Can I programmatically remove funcionality from a shared library that is not used by a specified executable? [closed]

I have a library taking up a lot of disk space. Only one program I use links to that library. I am pretty sure that the program uses only a tiny fraction of the functionality provided by that library. ...
1
vote
1answer
156 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
222 views

Interpreting the unhandled signal exception in Linux

I'm trying to debug a prototype CPU that throws unhandled signal 11s and signal 7s in the startup process. Here is what the kernel prints out. I have added extra print statements to the kernel to ...
2
votes
0answers
42 views

Does Debian define what GPL compliance means for the purposes of packaging?

The GPL license speaks of "derivative works". Debian has taken the position that deterministically linking against a library with LD_PRELOAD does not make your program a derivative work. This allows ...
0
votes
1answer
318 views

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: ...
4
votes
1answer
530 views

Fix hardcoded dynamic linking for executable

I have an executable file called reg with the following shared library dependencies: [terminal]$ ldd ./reg linux-vdso.so.1 => (0x00007ffc40d90000) libpthread.so.0 => /lib64/libpthread.so.0 (...
2
votes
1answer
685 views

Why can't I find the symbol tables in the C libraries in MacOS?

I've looked at the hexdump of both libc.dylib and xlib.dylib, and I can't find the symbols for the C functions in those libraries within those files. I figure they should be in there, because I've ...
2
votes
1answer
310 views

De-prioritize ld.conf.so.d library path resolution

From a separate question, and other articles on the subject, it appears that additional library paths defined by ld.so.conf.d will always be resolved (i.e. in the case of a name clash, such as when ...
0
votes
1answer
46 views

When is the dynamic library needed [duplicate]

I was told that the dynamic library is good because it can save RAM, it's only needed while the program is running. Now I have a question: if a program can be executed, can I say that all of dynamic ...
2
votes
1answer
526 views

Are shared library ABI compatible as long as their versions are the same?

Suppose I have a program compiled that's linked against libc.so.6 on one system (e.g., Ubuntu x64). If I take this binary to another system that has the same libc version 6 (e.g., Fedora x64), it ...
0
votes
1answer
230 views

Undefined reference problems with libusb

I'm trying to use pyuvc module which depends on libuvc which depends on libusb. However, when I try to import uvc in python, I get ImportError: /usr/local/lib/libuvc.so.0: undefined symbol: ...
0
votes
2answers
249 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 ...
1
vote
0answers
42 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
302 views

A strange problem when trying to install GNU MPFR

I'm trying to install GNU MPFR. I've downloaded the source, cd'd into it and typed ./configure, which goes through a load of checks (which are all okay, as far as I can see.) The problem occurs when ...
4
votes
2answers
661 views

ld.so.cache file is not a binary file

I am currently studying for Comptia Linux+ exam and I am at the Shared Library chapter. Among all, it says that the /etc/ld.so.cache file is a binary file, but in my case it is not. It is a regular ...
3
votes
2answers
1k views

What does the interpreter reported by `file` refer to?

I'm trying to run perl executable provided by a debug library on Ubuntu 16.04, but for some reason the file "isn't executable" even though it seems to be a match for my architecture. The perl ...
3
votes
1answer
128 views

Shared library minor version management

I have a simple program called main: #include <iostream> #include "random.h" int main() { std::cout << "The program has started\n"; return get_another_random_number(); } ...
3
votes
2answers
3k views

Get hex-only output from objdump

Say for example I've got this C function: void f(int *x, int *y) { (*x) = (*x) * (*y); } When saved to f.c, compiling with gcc -c f.c produces f.o. objdump -d f.o gives this: f.o: file ...
0
votes
1answer
699 views

Library is found by ldconfig but not by ldd for any program using this library

Running arch linux, I have qt5-base installed, which provides libQt5Core.so.5. Running ldconfig finds the shared object: $ sudo ldconfig -v | grep libQt5Core libQt5Core.so.5 -> libQt5Core.so.5.10....
4
votes
1answer
974 views

anaconda Qt vs system Qt

The anaconda python framework includes its own Qt shared libraries, among other ones. Because of the nature of the framework, it must appear first in the PATH environment variable so its python ...
4
votes
0answers
729 views

Shared library link time reference relocation error

I'm using a custom Linux distribution on an ARM box, that is based off of Ångström. Since all of the packages that I could find in the package manager are horribly out of date, I rebuilt all of the ...