This shows you the differences between two versions of the page.
 
| Both sides previous revision Previous revision Next revision | Previous revision | 
| wiki:aca2019:sscompiler [2019/01/19 20:45]  –  Andreas Moshovos | wiki:aca2019:sscompiler [2019/01/19 20:47] (current)  –  Andreas Moshovos | 
|---|
| Create a c file, say //hello.c//, containing a simple printf. Something like this: | Create a c file, say //hello.c//, containing a simple printf. Something like this: | 
|  |  | 
| ''#include <stdio.h> | ''#include <stdio.h>\\ | 
|  | \\ | 
| main() | main()\\ | 
| { | {\\ | 
| printf ("hello\n"); | printf ("hello\n");\\ | 
| } | }\\ | 
| '' | '' | 
|  |  | 
| Then compile it: | Then compile it: | 
|  |  | 
| ''/usr/local/ss/v3/sslittle-na-sstrix-gcc -O hello.c -o hello' | ''/usr/local/ss/v3/sslittle-na-sstrix-gcc -O hello.c -o hello'' | 
|  |  | 
| Check if things look alright: | Check if things look alright: | 
| ''/usr/local/ss/v3/bin/sslittle-na-sstrix-objdump  --syms hello > hello.syms'' | ''/usr/local/ss/v3/bin/sslittle-na-sstrix-objdump  --syms hello > hello.syms'' | 
|  |  | 
| Look in //hello.syms// to find all the symbols that are defined. YOu should be able to find _main in there, the address where your main function has been compiled to. | Look in //hello.syms// to find all the symbols that are defined. You should be able to find _main in there, the address where your main function has been compiled to. | 
|  |  | 
|  |  | 
|  |  |