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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Wen_Liao
June 28, 2015
Technology
1.2k
0
Share
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
780
A successful Git branching model 導讀
wen_liao
0
710
GNU ld的linker script簡介
wen_liao
0
1.4k
Trace 程式碼之皮
wen_liao
0
920
淺談Debian套件打包
wen_liao
0
660
Other Decks in Technology
See All in Technology
AIにより大幅に強化された AWS Transform Customを触ってみる
0air
0
240
Databricks Appsで実現する社内向けAIアプリ開発の効率化
r_miura
0
210
AI時代のシステム開発者の仕事_20260328
sengtor
0
320
昔話で振り返るAWSの歩み ~S3誕生から20年、クラウドはどう進化したのか~
nrinetcom
PRO
0
120
Oracle Cloud Infrastructure(OCI):Onboarding Session(はじめてのOCI/Oracle Supportご利⽤ガイド)
oracle4engineer
PRO
2
17k
OCI技術資料 : ロード・バランサ 概要 - FLB・NLB共通
ocise
4
27k
40代からのアウトプット ― 経験は価値ある学びに変わる / 20260404 Naoki Takahashi
shift_evolve
PRO
3
540
第26回FA設備技術勉強会 - Claude/Claude_codeでデータ分析 -
happysamurai294
0
280
Bref でサービスを運用している話
sgash708
0
220
Cursor Subagentsはいいぞ
yug1224
2
130
スケーリングを封じられたEC2を救いたい
senseofunity129
0
130
CloudFrontのHost Header転送設定でパケットの中身はどう変わるのか?
nagisa53
1
230
Featured
See All Featured
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
1.9k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
61k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
140
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
300
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
320
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2k
It's Worth the Effort
3n
188
29k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Designing for Performance
lara
611
70k
Visualization
eitanlees
150
17k
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
500
Building AI with AI
inesmontani
PRO
1
840
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+ 參數