Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
GNU AS簡介
Search
Wen_Liao
June 28, 2015
Technology
1.2k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
GNU AS簡介
Gnu AS簡介,歡迎debug
Wen_Liao
June 28, 2015
More Decks by Wen_Liao
See All by Wen_Liao
COSCUP-2020-Linux 軟體組裝工和他的工具們
wen_liao
2
1.5k
開放街圖 自助旅行的好幫手
wen_liao
0
1.3k
UPnP 1.0 簡介
wen_liao
0
1.1k
自由軟體和 Richard Stallman
wen_liao
0
2.4k
Hello world在那邊?背景說明 0
wen_liao
0
800
A successful Git branching model 導讀
wen_liao
0
720
GNU ld的linker script簡介
wen_liao
0
1.4k
Trace 程式碼之皮
wen_liao
0
950
淺談Debian套件打包
wen_liao
0
690
Other Decks in Technology
See All in Technology
FORENSIA: ローカルLLMフォレンジックハーネス
sumeshi
2
420
Digitization部 紹介資料
sansan33
PRO
2
7.7k
コーチングの奥義 何もしないテクニック
jinwatanabe
0
120
SO-101×VLAによる3色キューブのピック&プレース
abeja
0
220
【CEDEC2026】Creative Approaches to Localizing the Dialects and Unique Speech of Umamusume: Pretty Derby Characters in English
cygames
PRO
3
25k
ハーレムエンジニアリング
kazuma777777
0
190
強化学習「理論」入門
enakai00
3
3.6k
自宅NWにISR4331を導入してみた話
okaits
0
110
TypeScript入門 2026
recruitengineers
PRO
3
700
Bits AI を制するものは Datadog を制す / The player that controls Bits AI, controls Datadog
kaminashi
0
130
Invisible to AI? Making TYPO3 Sites Quotable by AI Search Systems
wolfgangwagner
0
230
Head First モブプログラミング / Head First Mobprogramming
takaking22
10
12k
Featured
See All Featured
Optimising Largest Contentful Paint
csswizardry
37
3.9k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
250
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.8k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
420
Designing Experiences People Love
moore
143
24k
GitHub's CSS Performance
jonrohan
1033
470k
sira's awesome portfolio website redesign presentation
elsirapls
0
330
Deep Space Network (abreviated)
tonyrice
0
260
Art, The Web, and Tiny UX
lynnandtonic
304
22k
Building AI with AI
inesmontani
PRO
1
1.1k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.4k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.5k
Transcript
Wen Liao GNU AS 簡介 台南市,虎尾寮
Disclaimer 投影片資料為作者整理資料及個人意見,沒有經 過嚴謹確認,請讀者自行斟酌
目標 介紹GNU AS以及binutils的用法
測試環境:Guest OS
測試環境:Qemu
關於GNU AS • 簡稱gas,或是直接as • 組合語言是也 ◦ 把組合語言轉成binary的object file
gas原始碼組成 • Symbol ◦ label也是一個symbol • directive ◦ .開頭的字 ◦
有些通用,有些和CPU平台相關 • Expression • Instruction ◦ 最後會轉成機械碼的東西
今天不會提到的 • 巨集 • 條件式directive • 除錯相關directive • 硬體架構相關
還記得linker script嘛? • Sections ◦ .text ◦ .bss ◦ .data
◦ .rodata ◦ … • 進入點 • 這些全部要自行處理
還記得ABI嘛? • 一樣要自己處理 ◦ Call convention ◦ Frame pointer ◦
Call stack
在組合語言中一切自己來 • printf?沒這東西 • 開檔案?寫東西,請愛用system call
兩光的Hello World directives
兩光的Hello World section
兩光的Hello World symbol
兩光的Hello World system call r0 = write(1, hello_str, hello_len) exit(r0)
兩光的Hello World expression
上面是爛程式碼示範 • 好的程式碼示範 ( 感謝Scott Tasi大大)
回家作業:九九乘法表 • 檔案結構 ◦ Makefile ◦ main.S ◦ multi_table.S •
執行 • nm 觀察 • objdump 反組譯比對。看Symbol • gdb ◦ Hint ▪ --gstabs+ 參數