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.
Questions tagged [shared-libraries]
7905 questions
58
votes
9 answers
Load Jenkins Pipeline Shared Library from same repository
TL;DR Is there a way to import code into the Jenkinsfile from the local repository (other than the load step)?
Why?
I've experienced that for complex builds the Jenkinsfile gets kind of bulky and not very maintainable.
Now that the build job is…

schnatterer
- 7,525
- 7
- 61
- 80
58
votes
5 answers
Limiting visibility of symbols when linking shared libraries
Some platforms mandate that you provide a list of a shared library's external symbols to the linker. However, on most unixish systems that's not necessary: all non-static symbols will be available by default.
My understanding is that the GNU…

rafl
- 11,980
- 2
- 55
- 77
58
votes
6 answers
Global variables for node.js standard modules?
I know that global variables are bad.
But if I am using node's module "util" in 40 files in my framework, isn't it better to just declare it as a global variable like:
util = require('util');
in the index.js file instead of writing that line in 40…

ajsie
- 77,632
- 106
- 276
- 381
58
votes
4 answers
Is it OK to delete older versions of Windows 10 SDK?
I just installed the latest SDK(10.0.10586.0) and was wondering if I can delete the libraries from the older Windows 10 SDKs(10.0.10240.0 and 10.0.10150.0)?
Or is there a safe way or a program to do this?

dave
- 14,991
- 26
- 76
- 110
56
votes
3 answers
building a .so that is also an executable
So everyone probably knows that glibc's /lib/libc.so.6 can be executed in the shell like a normal executable in which cases it prints its version information and exits. This is done via defining an entry point in the .so. For some cases it could be…

user175104
- 3,598
- 2
- 23
- 20
53
votes
3 answers
Linking two shared libraries with some of the same symbols
I link with two different shared libraries. Both libraries define some symbols that share a name but have different implementations. I can't make each library use its own implementation over the other.
For example, both libraries define a global…

drewag
- 93,393
- 28
- 139
- 128
53
votes
6 answers
Does Tomcat load the same library file into memory twice if they are in two web apps?
I have two applications under tomcat/webapps folder.
tomcat/webapps/App1
tomcat/webapps/App2
Both applications share the same libraries. Which are stored for example in tomcat/webapps/App1/WEB-INF/lib.
Are both libraries loaded twice in…

Sergio del Amo
- 76,835
- 68
- 152
- 179
53
votes
3 answers
How to link using GCC without -l nor hardcoding path for a library that does not follow the libNAME.so naming convention?
I have a shared library that I wish to link an executable against using GCC. The shared library has a nonstandard name not of the form libNAME.so, so I can not use the usual -l option. (It happens to also be a Python extension, and so has no 'lib'…

kbluck
- 11,530
- 4
- 25
- 25
52
votes
8 answers
list exported functions from dll with ctypes
Is there any way to know which functions are exported from the dll through python foreign function library ctypes?
And if possible to know details about the exported functions through ctypes.
If yes, could someone provide a snippet of code?

Tom
- 581
- 1
- 4
- 4
51
votes
4 answers
Automatically executed functions when loading shared libraries
When loading shared libraries in Windows, LoadLibrary() call causes DllMain in library to execute for each new process and thread library attaches to, and for each process and thread library deattaches from.
Is there similar mechanism for Mac OS X,…

toriningen
- 7,196
- 3
- 46
- 68
51
votes
2 answers
What is __i686.get_pc_thunk.bx? Why do we need this call?
When I disassemble my small function, I happened to see this call
call 0xf60d2f47 <__i686.get_pc_thunk.bx>.
I have no clue why I need this call in my program. Any explanation would be helpful.

Thangaraj
- 3,038
- 7
- 40
- 43
51
votes
2 answers
Where is linux-vdso.so.1 present on the file system
I am learning about VDSO, wrote a simple application which calls gettimeofday()
#define _GNU_SOURCE
#include
#include
#include
#include
#include
#include
int main(int argc,…

md.jamal
- 4,067
- 8
- 45
- 108
51
votes
5 answers
When / How does Linux load shared libraries into address space?
When is the address of shared objects specified in programs? During linking? Loading? If I wanted to find the memory address of the system command inside of libc inside of my program I could find it easily in gdb, but what if I don't want to…

Ryan
- 3,579
- 9
- 47
- 59
51
votes
2 answers
CMake: how to produce binaries "as static as possible"
I would like to have control over the type of the libraries that get found/linked with my binaries in CMake. The final goal is, to generate binaries "as static as possible" that is to link statically against every library that does have a static…

pszilard
- 1,942
- 1
- 15
- 18
51
votes
2 answers
Why does GCC create a shared object instead of an executable binary according to file?
I have a library I am building. All of my objects compile and link successively when I run either one of:
ar rcs lib/libryftts.a $^
gcc -shared $^ -o lib/libryftts.so
in my Makefile. I also am able to successfully install them into…

Luke Smith
- 781
- 3
- 7
- 15