Skip to main content

Questions tagged [dynamic-loading]

0 votes
1 answer
387 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 ...
user3384486's user avatar
0 votes
1 answer
489 views

Changing the path opened by openat of a program using LD_PRELOAD

I want to change a path that a program actually opens on filesystem for some paths. The reason is that I want to run a program in parallel, but that program uses /tmp/somedir/ as its temporary ...
Tomáš Zato's user avatar
  • 1,816
0 votes
1 answer
110 views

tcpdump doesn't appear to call any libpcap's exported function

Digging into tcpdump implementation, I can see that it actually loads the libpcap.so dynamic library in userspace. However, by use of strace, I can't see any occurrence of calls to any function ...
CarloC's user avatar
  • 385
0 votes
1 answer
827 views

Understanding LD_ASSUME_KERNEL usage

I am trying to make sense of the env variable LD_ASSUME_KERNEL on my system (Debian/bullseye+bpo). Accoring to : $ man pthreads I should be able to run something like this, however on my system here ...
malat's user avatar
  • 3,459
4 votes
0 answers
341 views

Is there any solution to ltrace calls made by libs opened using dlopen()?

I wrote different two different types of queues. Bundled them in different .sos. I have a driver main.c which tests functions offered by those queues. main.c makes use dlfcn.h to load, unload required ...
Vishwajith.K's user avatar
0 votes
1 answer
447 views

How can I "give" a forked process a diferent dynamic library than the one it "asks" for?

I want to know how I can "give" a forked process a different dynamic library than the one it "asks" for. For example, if the fork "asks" for the library "foo.so"...
Sally Beuford's user avatar
0 votes
0 answers
395 views

What is the best way of finding library conflicts in a large application?

I have a large application (let's call it P) with lots of dependencies to boost, Qt, zlib, libpng, etc. Recently, I have added a feature to P that needs to dynamically load a new shared object (let's ...
TonySalimi's user avatar
1 vote
0 answers
62 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 ...
炸鱼薯条德里克's user avatar
0 votes
2 answers
1k 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 ...
bashbin's user avatar
  • 451
6 votes
1 answer
1k views

Are .text sections shared between loaded ELF executables?

If one program, for example grep, is curretly running, and a user executes another instance, do the two instances share the read-only .text sections between them to save memory? Would the sharing of ...
novice's user avatar
  • 429
2 votes
1 answer
2k 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() ...
Tim's user avatar
  • 107k
1 vote
1 answer
948 views

What kinds of files can be dynamically loaded?

Operating System Concepts, by Silberschatz A., Galvin P. B., Gagne G. - Operating System Concepts, 9th Edition - 2012 says 8.1.4 Dynamic Loading In our discussion so far, it has been necessary ...
Tim's user avatar
  • 107k
1 vote
1 answer
4k 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 ...
Tim's user avatar
  • 107k
5 votes
1 answer
12k 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 ...
x-yuri's user avatar
  • 3,623
0 votes
2 answers
2k views

Will the execution of the binaries that is sitting on a mounted NFS directory fails when network interruption happen?

So I have a Linux machine that acts as an NFS server. Lots of programs has been installed to the folder that is being exported. On another Linux machine, I've been running one of the program that is ...
D-Glucose's user avatar

15 30 50 per page