xoreaxeaxeax / movfuscator

The single instruction C compiler
Other
9.29k stars 394 forks source link

Static compilation isssue #15

Open asdfhklrweq opened 7 years ago

asdfhklrweq commented 7 years ago

The static compilation flag does not seem to work, or I don't understand the compilation options.

From the help menu:

-static specify static libraries (default is dynamic)

For example, using the following basic code:

#include<stdio.h>
main(){ printf("Hello World"); }

Compiling as follows:

movcc -static test.c -o test

Testing dependencies:

ldd test
    linux-gate.so.1 =>  (0xf778d000)
    libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xf75a3000)
    libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xf7556000)
    /lib/ld-linux.so.2 (0x565a4000)
GregoryMorse commented 6 years ago

Perhaps try linking to the crt*.o files directly but since they seem to be stubs with a stack reserve, likely static linking is just something never addressed.