Skip to main content

Questions tagged [dynamic-loading]

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

/* 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
525 views

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
129 views

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
846 views

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,479
4 votes
0 answers
367 views

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
466 views

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
402 views

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
67 views

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

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

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

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
980 views

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

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

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

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
4 votes
1 answer
2k views

How can I list all loaded libraries of a process in FreeBSD? On Linux I can use /proc cat /proc/$pid/maps on Solaris there is pldd pldd $pid For FreeBSD /proc also works: cat /proc/$pid/map however,...
Thomas Erker's user avatar
  • 2,937
4 votes
2 answers
6k views

If I run the command foo specifying a a different libc to use as follows: LD_LIBRARY_PATH=$PATH_TO_MY_CUSTOM_LIBC foo Is the globally defined libc used to run any of the command given above? For the ...
user213575's user avatar
35 votes
5 answers
22k views

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 ...
Melab's user avatar
  • 4,496
8 votes
2 answers
2k views

My application loads custom code using dlopen on the fly. For common symbols, the global symbol table is used by default. However, I want to provide the functionality where - if the user has linked ...
amisax's user avatar
  • 3,093
1 vote
0 answers
146 views

I am facing a rather strange problem. I have a 32 bit qmake binary placed at a very deep path. So for ease of use I created a link using ln -s /complicated/path/to/qmake ~/qmake I am running a 64 ...
theadnangondal's user avatar
1 vote
1 answer
888 views

I'm setting the environment variable LD_PRELOAD to a shared library file I created, in order to let LD_PRELOAD to point to my created shared library file, I need to give the full path like this: ...
user4016367's user avatar
2 votes
2 answers
5k views

— 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-...
poige's user avatar
  • 6,424
5 votes
3 answers
4k views

I am looking for a way to allow an executable to find its shared library, but in order to avoid conflict with any package that could use a different version of the same shared library I prefer to keep ...
mpromonet's user avatar
  • 413
1 vote
1 answer
66 views

I've been through dependency issues, but, finally, have my application running. The problem is I need to force install of some old libraries with dpkg to achieve this, which, in turn, breaks my ...
dom_hutton's user avatar
15 votes
2 answers
13k views

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, ...
Dutchy's user avatar
  • 163
2 votes
1 answer
3k views

I installed the mod_qos module using the steps found here, every step went perfectly fine without any problems, however, when attempting to restart the apache service it returned the following error: ...
xorinzor's user avatar
10 votes
2 answers
2k views

Could self-modifying code be used to speed up function calling in dynamically linked libraries? As far as I understand it, ELF shared libraries use a kind of indirect jump table (the procedure ...
lxgr's user avatar
  • 213
14 votes
2 answers
50k views

I want to export LD_LIBRARY_PATH to system services and all users. System services are run before login, so .bashrc is not applicable. How to achieve this?
linquize's user avatar
  • 1,069
5 votes
1 answer
2k views

Can I reload xserver-xorg-input-mouse driver on the fly? For example, after I modify and recompile the source
Jakub M.'s user avatar
  • 449