Questions tagged [shared-libraries]

Shared libraries are libraries that are loaded by programs when they start. A single shared copy of each library is loaded into physical memory and may be used by multiple processes at the same time. This reduces memory use and improves system performance. This tag should never be used alone.

7905 questions
3
votes
1 answer

How to reverse R_X86_64_JUMP_SLOT relocations?

I am building an ELF binary which needs to be able to process and reverse its own relocations at runtime. (The reversing will happen in a separate buffer, not in the original code page, obviously.) The purpose of this is so that the module contents…
Mitch Lindgren
  • 2,120
  • 1
  • 18
  • 36
3
votes
1 answer

Linking a shared library to an executable using CMAKE

Below is a simple CMake project. On Linux, everything compiles, and running main gives expected output. On Windows, the compilation is successful as well, main doesn't give any output, though. I can't really explain the error, but the moment I call…
user680891
  • 95
  • 6
3
votes
1 answer

Making executable to prefer a shared object library over older version also available in same executable

I am currently building in C a complex executable that depends on multiple libraries. The executable and the some of the libraries it uses depend on a specific library, lets call it libXYZ. I am trying to build the executable with a more recent…
Pedro Perez
  • 330
  • 1
  • 2
  • 11
3
votes
1 answer

How to use OpenGL function pointers between an executable and DLL?

I am trying to make a plugin-based game in Rust, and I am having some difficulties. The way I am making my plugins is through the method shared on this question. At runtime, I will dynamically load all the necessary functions from the plugins, and…
user11494366
3
votes
0 answers

Native Library Load Order in Unity Plugin For Android

I am developing a Unity plugin for Android platform. I have a couple of *.so files and the application needs to load these libraries in a certain order. How can I manage this load order in an Unity Plugin structure? Currently, I just drag and drop…
fatihk
  • 7,789
  • 1
  • 26
  • 48
3
votes
2 answers

How to solve "Symbol lookup error" by using JPL on Ubuntu11.04?

I'm coding a program in Java and I would like to connect to Prolog. Thus, I decided to use JPL. It is perfectly to use JPL on Windows Vista. Later, I have to change the OS platform to be Ubuntu 11.04. Unfortunately, there is an error: symbol lookup…
BB.
  • 707
  • 2
  • 11
  • 22
3
votes
0 answers

Sharing variables in shared library

In the book "The Linux Programming Interface" it reads: Although the code of a shared library is shared among multiple processes, its variables are not. Each process that uses the library has its own copies of the global and static variables that…
ataraxis
  • 1,257
  • 1
  • 15
  • 30
3
votes
0 answers

How to call a C function from assembly file?

I have the source code of a static library. I'm trying to compile it into a dynamic library. The source code has .c files and one .S file. While compiling I'm getting a relocation error from the assembly code. Going through the assembly code, I find…
user45698746
  • 305
  • 2
  • 13
3
votes
0 answers

Why does dynamically loading of PIEs no longer work in glibc?

Note: The purported dupe does NOT answer this question in any way; in particular, the thread-local example can be easily fixed by compiling with -fPIC, just like the bugzilla example already mentioned below. And the rest is just unasked-for opinions…
user10678532
3
votes
2 answers

Jenkins throw error "Library expected to contain at least one of src or vars directories"

I configured Jenkins shared library with git repo which has a structure: resources |__ some_files src |__ some_files vars |__ some_files But i got an error: "Library expected to contain at least one of src or vars directories". What's wrong? I have…
Restman
  • 95
  • 1
  • 8
3
votes
1 answer

Problems when linking shared library with GCC

I try to link a shared library just installed on my system, but for some reason the output doesn't want to execute. This is my compilation: gcc -o test test.c -lgpio When running the output, I get the following error: ./test: error while loading…
Totemi1324
  • 468
  • 1
  • 6
  • 19
3
votes
1 answer

Calling a function in a shared library given its name and signature

I have a little DSL that needs to be able to load shared libraries and run functions that they export. Finally, a solved problem: dlopen, dlsym, LoadLibrary, and GetProcAddress are all you need for cross-platform use of dynamic libraries. This is…
Jon Purdy
  • 53,300
  • 8
  • 96
  • 166
3
votes
1 answer

File runs without header file present

Does deleting a package in Ubuntu delete the associated header files too? Is there a difference between installing packages manually and using the apt command? How to find the right package name required for particular header-file? Why does the…
3
votes
1 answer

A question about how loader locates libraries at runtime

Only a minimum amount of work is done at compile time by the linker; it only records what library routines the program needs and the index names or numbers of the routines in the library. (source) So it means ld.so won't check all…
Je Rog
  • 5,675
  • 8
  • 39
  • 47
3
votes
1 answer

version `libssl.so.10' not found

On Ubuntu 18.04 with apt install I installed libssl1.0.0 and libssl1.0-dev. The following shared objects are…
Paulo Oliveira
  • 2,411
  • 1
  • 31
  • 47