2015年2月22日 星期日

使用gcc編譯出assembly code

用gcc -S[1]指令就可以在編譯出assembly code時停下並輸出

不會直接輸出binary file

但輸出的檔案是AT&A的syntex格式[2]

要加入-masm=intel才會變成Intel的格式


下一步打算查查看gcc和gnu assembler的設定



GNU Assembler[3]
How to use assembly language to write an OS[4]

ISA extensions and compiler/assembler/linker flow from source code to an executable[5]
有一個非常詳細的程式compile流程圖

[1]http://ccckmit.wikidot.com/cp:callasasm
[2]http://stackoverflow.com/questions/4070922/assembly-instruction-set-for-my-processor
[3]https://linux.web.cern.ch/linux/scientific4/docs/rhel-as-en-4/index.html
[4]http://mikeos.sourceforge.net/write-your-own-os.html
[5]http://www.gordoni.com/cygnus/evaluate.html

沒有留言:

張貼留言