Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pack shared libraries into the elf [closed]

Is there a utility that can take ALL the SO's that an Elf needs turn them into static then converts the Elf to be SO's free?

like image 366
Shay Erlichmen Avatar asked Dec 22 '08 15:12

Shay Erlichmen


People also ask

How are shared libraries loaded?

Static Libraries are linked into a compiled executable (or another library). After the compilation, the new artifact contains the static library's content. Shared Libraries are loaded by the executable (or other shared library) at runtime.

How are shared libraries loaded in Linux?

Shared libraries are the most common way to manage dependencies on Linux systems. These shared resources are loaded into memory before the application starts, and when several processes require the same library, it will be loaded only once on the system. This feature saves on memory usage by the application.

Do shared libraries need executable?

As shared libraries cannot be directly executed, they need to be linked into a system executable or callable shared object. Hence, shared libraries are searched for by the system linker during the link process. This means that a shared library name must always start with the prefix lib and have the extension .

How do shared libraries work?

Simply put, A shared library/ Dynamic Library is a library that is loaded dynamically at runtime for each application that requires it. Dynamic Linking doesn't require the code to be copied, it is done by just placing name of the library in the binary file.


1 Answers

Here are some projects you might find useful:

  • Statifier (basically does what you want)
  • ERESI (might do what you want, also allows for analysis of ELF targets)

NOTE: I've not used either application myself.

like image 54
codelogic Avatar answered Sep 22 '22 20:09

codelogic