May 2015
Intermediate to advanced
296 pages
5h 10m
English
Dragonegg is a gcc plugin that allows gcc to make use of the LLVM optimizer and code generator instead of gcc's own optimizer and code generator.
You need to have gcc 4.5 or above, with the target machine being x86-32/x86-64 and an ARM processor. Also, you need to download the dragonegg source code and build the dragonegg.so file.
Do the following steps:
hello world program:$ cat testprog.c #include<stdio.h> int main() { printf("hello world"); }
$ gcc testprog.c -S -O1 -o - .file " testprog.c" .section .rodata.str1.1,"aMS",@progbits,1 .LC0: .string "Hello world!" .text .globl main .type main, @function main: subq $8, %rsp movl ...
Read now
Unlock full access