Last active
January 26, 2017 12:24
-
-
Save infosec-intern/8e07f0688714cfddeb5077a667f969ee to your computer and use it in GitHub Desktop.
Compile a C program without using the standard entry method. For example, if you supply your own _start function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gcc -nostdlib -o test test.c # don't use the standard library when compiling (enables using _start() directly) | |
gcc -m32 -o test test.c # compile a 32-bit executable | |
gcc -m64 -o test test.c # compile a 64-bit executable | |
gcc -c -o obj1.o obj1.c # create an object file, but do not link the result(s) into an executable | |
# Can be combined with -m{32,64} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment