Created
October 4, 2014 12:50
-
-
Save erincandescent/09b058a1072e3fc19706 to your computer and use it in GitHub Desktop.
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
oshepherd@Asuka ~/elfload | |
$ uname -a | |
CYGWIN_NT-6.1 Asuka 1.7.32(0.274/5/3) 2014-08-13 23:06 x86_64 Cygwin | |
oshepherd@Asuka ~/elfload | |
$ cat hi.c | |
void _start(int (*puts)(const char *s)) | |
{ | |
puts("Hello, world!"); | |
} | |
oshepherd@Asuka ~/elfload | |
$ /opt/toolchains/bin/x86_64-elf-gcc -nostdlib -fno-use-linker-plugin -pie -fPIC -o hi hi.c -mabi=ms | |
oshepherd@Asuka ~/elfload | |
$ ./elfloader hi | |
Loading seg fileoff 0, vaddr 0 to 0x6ffffc00000 | |
Loading seg fileoff 288, vaddr 200288 to 0x6ffffe00288 | |
Found rel@0, relent=0, relsz=0 | |
Binary entrypoint is 221; invoking 0x6ffffc00221 | |
Hello, world! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment