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
61 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
114 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, ...
1 vote
0 answers
59 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
343 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,...
2 votes
1 answer
279 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; ...
1 vote
0 answers
306 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 | ...
0 votes
1 answer
409 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 ...
1 vote
0 answers
298 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 ...