Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Convert a dynamically linked elf binary to statically linked [closed]

Tags:

c++

c

linux

elf

Is it possible to convert a dynamically linked elf binary to a statically linked one?

like image 747
anumi Avatar asked Jun 06 '13 09:06

anumi


2 Answers

Tools which may help Ermine, Statifier, and jumpstart.

like image 141
Dayal rai Avatar answered Oct 20 '22 06:10

Dayal rai


There is a solution to run statifier in systems that has address randomization:

You must disable the randomization before executing statifier, then re-enable it.

 [me@mypc ~]# cat /proc/sys/kernel/randomize_va_space
 2
 [me@mypc ~]# echo -n 0 > /proc/sys/kernel/randomize_va_space    
 [me@mypc ~]# statify xxxxx yyyyyy
 .....
 [me@mypc ~]# echo -n 2 > /proc/sys/kernel/randomize_va_space

statifier.sh should be modified for automatically changing and restore this value if run as root, or to report the problem if not.

like image 21
user3099887 Avatar answered Oct 20 '22 06:10

user3099887