Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
GNU AS簡介
Search
Wen_Liao
June 28, 2015
Technology
1.3k
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
Transcript
18 slides
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+ 參數
More Decks by Wen_Liao
See All by Wen_Liao
COSCUP-2020-Linux 軟體組裝工和他的工具們
wen_liao
2
1.5k
開放街圖 自助旅行的好幫手
wen_liao
0
1.4k
UPnP 1.0 簡介
wen_liao
0
1.2k
自由軟體和 Richard Stallman
wen_liao
0
2.4k
Hello world在那邊?背景說明 0
wen_liao
0
850
A successful Git branching model 導讀
wen_liao
0
780
GNU ld的linker script簡介
wen_liao
0
1.5k
Trace 程式碼之皮
wen_liao
0
990
淺談Debian套件打包
wen_liao
0
750
Other Decks in Technology
See All in Technology
統制されたID・権限をどう利用するか : DPoP/FAPIによるAPIセキュリティ強化
oidfj
2
340
Taking back control of your AI development
inesmontani
PRO
0
320
プラガブルで宣言的なソフトウェアファクトリーを支えるTypeScript
timakin
5
1.8k
Agent Routerで作るマルチテナント 推論基盤 #CNDW2026 / Building Multi-Tenant Inference Platform with Agent Router #CNDW2026
everpeace
5
650
パスワードのない鍵で、 データを手元に置く
ginjihayashi
0
400
NutanixへのSSHアクセスの今後について
shadowhat
0
180
Well, that’s weird…
csswizardry
3
250
そのイメージ、どのCIが作った? Artifact Attestationsで来歴を固定する / Which CI system created that image? Pinning provenance with Artifact Attestations
chmikata
0
290
セキュリティチームは どのコンテナイメージの脆弱性対応を優先すべきか 〜CISA新指針とSCCで作る脆弱性トリアージ〜
swdtkuy
0
360
「個社」ではなく「業界」の課題を解く AI 対話開発 ー 価値を広げる設計と、価値を守るエンジニアリング ー
ivry_presentationmaterials
4
910
20261119_AgentCore
takuyay0ne
2
340
Zero Data Loss Autonomous Recovery Service サービス概要
oracle4engineer
PRO
5
18k
Featured
See All Featured
Reality Check: Gamification 10 Years Later
codingconduct
0
2.4k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
1.1k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
370
WENDY [Excerpt]
tessaabrams
15
41k
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
6
970
Leo the Paperboy
mayatellez
11
2.5k
Making Projects Easy
brettharned
120
6.9k
Exploring anti-patterns in Rails
aemeredith
4
590
A Tale of Four Properties
chriscoyier
163
24k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
570
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.3k