Questions tagged [dynamic-linking]

Dynamic linking defers much of the linking process until a program starts running. Dynamic linking permits a program to load and unload routines at runtine, a facility that can otherwise be very difficult to provide.

Filter by
Sorted by
Tagged with
3
votes
0answers
79 views

Dynamically load user code from a common library

My project aims to provide a common interface between multiple different HDL simulators, so users can write test benches that will work no matter the simulator used. In this situation, it is the ...
-1
votes
1answer
57 views

Creating a “lite” version of shared library on Linux/POSIX in addition to full version

I have a large shared library, a collection of functions created from numerous .a files into libeverything.so. The code for the .a files is obviously compiled with -fPIC. I also have libeverything.a ...
2
votes
1answer
110 views

Dynamic *dll substitution?

I got an architectural problem here. Let say there is an IShell. It mainly responsible to map user's commands (represented as a linux-like strings) to an appropriate IExecutable's. Those ...
1
vote
1answer
703 views

Merging algorithm for overlapping intervals

I have been searching for an efficient algorithm to merge overlapping intervals on a dynamic array of intervals. For example, (start time, end time) wise, [(1, 2), (4, 8), (3, 10)] becomes [(1, 2)...
2
votes
2answers
494 views

Why use dynamic linking for less-popular libraries?

I know the difference between static and dynamic linking. I know why the notion of a library is important. And I even know why you'd want to link something like OpenGL, platform-specific APIs, or ...
1
vote
2answers
292 views

Will issues arise packaging libc and pthread with your C apps?

The issue I hit, is that I am packaging shared libraries with my code in order to load GNUTLS, except for libc, because I figured any system will have it. Most of them don't have the required 2.14 for ...
3
votes
2answers
5k views

Could Java import C++ classes from a library using JNA or JNI?

In past, I used JNI to access some winapi functions, however winapi is C and therefore just procedural. Now my plan is different and I need to know whether I'm going in the right direction. What I ...
5
votes
1answer
729 views

Hot-patching a server: dynamically loading types from an uploaded assembly

In the current project I'm working on, some of the C# classes are being stored as source code in SQL Server database records, and executed as needed using CSScript. This is being done so that the ...
3
votes
3answers
230 views

Can I include an LGPLv2.0-licensed XSLT stylesheet into my Apache v2.0-license nodejs package?

I am creating an open source tool which leverages some XSLT stylesheets in order to do its work, which is transforming XML to Java code. One of the stylesheets that I want to use is licensed under ...
2
votes
1answer
94 views

Ensuring reliability of cross-compilation

Provided that my code is fully standards compliant with no undefined behaviour, how can I best assure that it will be possible to cross-compile my software for any architecture? I had some ideas, but ...
5
votes
3answers
2k views

Why are there two different kinds of linking, i.e. static and dynamic?

I've been bitten for the n-th time now by a library mismatch between a build and deployment environment. The build environment had libruby.so.2.0 and the deployment environment had libruby.a. One ruby ...
11
votes
2answers
6k views

Why does Apple only allow for Static Frameworks on iOS?

Clearly Apple has the ability to create dynamically loaded libraries (known as frameworks) for iOS, as they ship several with XCode (such as UIKit). App developers only have the ability to create ...
2
votes
2answers
2k views

Use of LGPL libraries on android devices (in a single closed source .apk) [duplicate]

Well this question is actually asked multiple times here already. but the answers are contradictory So that's why I ask it again (maybe time changed things). Can LGPL licensed libraries be used in ...
1
vote
2answers
293 views

What is global mutable variable behaviour in dynamically-linked libraries?

When a dynamically linked library includes a global mutable variable, such as a container for state initialised when loading the library, how do references to that variable behave when running an ...
0
votes
4answers
159 views

How could distribution and reuse flexibility be hurt by linking my program as a static or dynamic library?

I'm writing a small program that I want to be able to link with other programs. I also intend to run it from a command line interface, and maybe later with a GUI interface. How could distribution ...
3
votes
1answer
1k views

How does a dynamic library's references to a global variable get translated once in the running app?

If a dynamic library exports the address to a global variable defined within the library, how are accesses to that variable translated during dynamic linking so that a running application can interact ...
4
votes
2answers
1k views

How do .so files avoid problems associated with passing header-only templates like MS dll files have?

Based on the discussion around this question. I'd like to know how .so files/the ELF format/the gcc toolchain avoid problems passing classes defined purely in header files (like the std library). ...
4
votes
1answer
393 views

What should developers know about Windows executable binary file compression?

I'd never heard of this before, so shame on me, but programs like UPX can compress my files by 80% which is totally sweet, but I have no idea what the the disadvantages are in doing this. Or even ...
10
votes
3answers
25k views

Is it important to obfuscate C++ application code?

In the Java world, it seems to sometimes be a problem, but, what about C++? Are there different solutions? I was thinking about the fact that someone can replace the C++ library of a specific OS ...