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.
282 questions
0 votes
0 answers
78 views
Why would a relative symlink to a shared library cause a segmentation fault
I have a shared library, say libfoo.so.a.b.c that has been provided to me (I do not know its internals); it runs some static initialisation upon linking with an executable. If I create symlinks with ...
0 votes
0 answers
39 views
Signal handling in debugger in linux
I am working on a debugger and found an issue. I start at the beginning of the dynamic linker (this is a low-level debugger). At this address, I set it so that for a particular signal, the process ...
0 votes
0 answers
132 views
ldd not showing actual shared libraries address
After having deactivated ASLR, with: echo 0 | sudo tee /proc/sys/kernel/randomize_va_space I used ldd /path/to/binary to get the address of the shared library that my binary (written in C) was using, ...
9 votes
1 answer
1k views
dlopen() fails after Debian trixie libc transition: "Cannot enable executable stack"
I've been running the same 32-bit, 3rd-party, closed-source binary since 2018. This week on debian trixie/testing servers (possible due to a libc6 transition?) the program began to crash on startup. ...
1 vote
0 answers
66 views
What is the difference between the ELF Visibility Values STV_INTERNAL and STV_HIDDEN?
I was trying to understand Visibility values in ELF file , and I couldn't Understand the difference between STV_HIDDEN and STV_INTERNAL . After some reseach I found that this may be related to how ...
0 votes
0 answers
211 views
How can I get libc-client.so.2007?
I downloaded the source code for UW-IMAP/imap-2007f_upstream from the URL below. https://github.com/uw-imap/imap/archive/refs/tags/imap-2007f_upstream.tar.gz I compiled it, but libc-client.so.2007 was ...
0 votes
0 answers
356 views
Building GCC 12.4, I get: libisl.so.23: ... No such file or directory
I'm trying to build GCC 12.4.0 on Oracle Linux 9.4 (sorry about that... not my choice of distribution), as a non-root user. So, I've downloaded and built my relevant prerequisites: gmp, mpfr, mpc, isl,...
0 votes
0 answers
668 views
Qt-6-based program needs libxcb-cursor.so.0 - but I don't have a package for that
I'm trying to use a Qt6-based program, namely NVIDIA's Nsight Compute UI, on a machine running SLES 15 SP5 (SUSE Enterprise Linux 2015, service pack 5). No, I can't switch distributions, it's not my ...
2 votes
1 answer
301 views
Linking a 32-bit x86 program on 64-bit x86 Debian
I have an sample application and an make file. main.c file contents #include <stdio.h> /*int mainentry_entry(int argc, char *argv[]) {*/ int main(int argc, char *argv[]) { int i; ...
0 votes
0 answers
517 views
How to detect undefined symbols in shared libraries or objects?
My Linux distribution (openSUSE Slowroll) accidentally shipped some incompatible libraries recently due to its experimental nature, lacking adequate automated testing using openQA, that caused the ...
1 vote
0 answers
333 views
How can I pre-fault and lock memory pages that are mmap'd with MAP_PRIVATE?
I am writing a real-time linux application where I need to prevent any page faults from occuring after the initial startup of my application. My initial thought was just to call mlockall(MCL_CURRENT | ...
1 vote
0 answers
128 views
Why does ldd behave differently on the ldconfig binary?
When we run ldd on some file, there are two possible results: If the file is dynamic executable, the shared dependencies are shown, for example: # ldd /usr/bin/sleep linux-vdso.so.1 (...
0 votes
1 answer
424 views
dlsym, when run from an LD_PRELOAD interposer, does not find any symbols from the main program
/* dlsym-main.c */ #include <stdio.h> void doSomething(char const *msg) { fprintf(stderr, "Main program is doing %s\n", msg); } void (*fnptr)(char const *) = doSomething; int ...
5 votes
2 answers
538 views
Do executables in different containers share shared objects that are define in the same common image layer?
I am investigating the memory impact of containerising two processes that depend on the same shared object. My main question is whether the shared object will be loaded in memory twice or not. This ...
1 vote
0 answers
314 views
Why might RUNPATH be ignored by the loader after system libraries are found?
I have an executable which is linked with several dynamic libraries (.so). These libraries are found in 2 different local folders. When linking the executable, the RUNPATH of the executable is ...