Questions tagged [dynamic-loading]
The dynamic-loading tag has no usage guidance.
26
questions
0
votes
1
answer
369
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 ...
4
votes
0
answers
183
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 ...
0
votes
1
answer
239
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"...
0
votes
0
answers
246
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 ...
1
vote
0
answers
41
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 ...
0
votes
2
answers
893
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 ...
5
votes
1
answer
778
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 ...
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(...
1
vote
1
answer
665
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 ...
0
votes
1
answer
3k
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 ...
3
votes
1
answer
10k
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 ...
0
votes
2
answers
1k
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 ...
4
votes
1
answer
1k
views
List loaded libraries of a process on FreeBSD
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
...
4
votes
2
answers
5k
views
Specifying local libc does call global libc?
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 ...
32
votes
5
answers
18k
views
What system call is used to load libraries in Linux?
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 ...
8
votes
2
answers
2k
views
Is there a way to check whether a .so has been compiled with -Bsymbolic-functions flag?
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 ...
1
vote
0
answers
95
views
binary is able to run only when run after creating a symbolic link to it
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 ...
1
vote
1
answer
819
views
Linux environment variable using non-fullpath
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:
...
2
votes
2
answers
5k
views
ld.so.preload doesn't differ x86_32 and x86_64
— 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-...
4
votes
3
answers
3k
views
Is it possible to configure dynamic loader for an executable
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 ...
1
vote
1
answer
57
views
Is there a way to monitor the Shareable Objects (.so) loaded on launch of a specific application?
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 ...
12
votes
2
answers
9k
views
Which parts of an ELF executable get loaded into memory, and where?
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, ...
1
vote
1
answer
2k
views
(debian) installing mod_qos on apache results in error on start
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:
...
10
votes
2
answers
2k
views
ELF shared libraries - motivation for the PLT
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 ...
14
votes
2
answers
46k
views
How to export LD_LIBRARY_PATH to all users and system services
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?
5
votes
1
answer
2k
views
Reload xserver-xorg-input-mouse
Can I reload xserver-xorg-input-mouse driver on the fly? For example, after I modify and recompile the source