Suche senden
Hochladen
程式設計師的自我修養 Chapter 3.4
•
2 gefällt mir
•
1,402 views
Shu-Yu Fu
Folgen
Melden
Teilen
Melden
Teilen
1 von 8
Jetzt herunterladen
Downloaden Sie, um offline zu lesen
Empfohlen
TLPI - Chapter 44 Pipe and Fifos
TLPI - Chapter 44 Pipe and Fifos
Shu-Yu Fu
程式設計師的自我修養 Chapter 1
程式設計師的自我修養 Chapter 1
Shu-Yu Fu
程式設計師的自我修養 Chapter 10 記憶體
程式設計師的自我修養 Chapter 10 記憶體
Shu-Yu Fu
程式設計師的自我修養 Chapter 5
程式設計師的自我修養 Chapter 5
Shu-Yu Fu
TLPI Chapter 14 File Systems
TLPI Chapter 14 File Systems
Shu-Yu Fu
Tlpi chapter 38 writing secure privileged programs
Tlpi chapter 38 writing secure privileged programs
Shu-Yu Fu
TLPI - 6 Process
TLPI - 6 Process
Shu-Yu Fu
TLPI - 7 Memory Allocation
TLPI - 7 Memory Allocation
Shu-Yu Fu
Empfohlen
TLPI - Chapter 44 Pipe and Fifos
TLPI - Chapter 44 Pipe and Fifos
Shu-Yu Fu
程式設計師的自我修養 Chapter 1
程式設計師的自我修養 Chapter 1
Shu-Yu Fu
程式設計師的自我修養 Chapter 10 記憶體
程式設計師的自我修養 Chapter 10 記憶體
Shu-Yu Fu
程式設計師的自我修養 Chapter 5
程式設計師的自我修養 Chapter 5
Shu-Yu Fu
TLPI Chapter 14 File Systems
TLPI Chapter 14 File Systems
Shu-Yu Fu
Tlpi chapter 38 writing secure privileged programs
Tlpi chapter 38 writing secure privileged programs
Shu-Yu Fu
TLPI - 6 Process
TLPI - 6 Process
Shu-Yu Fu
TLPI - 7 Memory Allocation
TLPI - 7 Memory Allocation
Shu-Yu Fu
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
Skeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
Introduction to Data Science
Introduction to Data Science
Christy Abraham Joy
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
Vit Horky
The six step guide to practical project management
The six step guide to practical project management
MindGenius
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
Weitere ähnliche Inhalte
Empfohlen
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
Skeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
Introduction to Data Science
Introduction to Data Science
Christy Abraham Joy
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
Vit Horky
The six step guide to practical project management
The six step guide to practical project management
MindGenius
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
Empfohlen
(20)
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
Skeleton Culture Code
Skeleton Culture Code
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
How to have difficult conversations
How to have difficult conversations
Introduction to Data Science
Introduction to Data Science
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
The six step guide to practical project management
The six step guide to practical project management
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
程式設計師的自我修養 Chapter 3.4
1.
程式設計師的自我修養 Chapter 3.4 ELF檔結構描述
Shu-Yu Fu
2.
ELF結構
3.
檔頭
常量 值 含义 ET_REL 1 可重定位文件,一般 为.o文件 typedef struct { ET_EXEC 2 可执行文件 ET_DYN 3 共享目标文件,一般为.so文件 unsigned char e_ident[16]; Elf32_Half e_type; Elf32_Half e_machine; Elf32_Word e_version; Elf32_Addr e_entry; Elf32_Off e_phoff; 常量 值 含义 EM_M32 1 AT&T WE 32100 Elf32_Off e_shoff; Magic: 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00SPARC EM_SPARC 2 00 00 Elf32_Word e_flags; ELF32 Class: EM_386 3 Intel x86 Elf32_Half e_ehsize; complement, little endian Data: 2's EM_68K 4 Motorola Version: 1 (current) Elf32_Half e_phentsize;- System V OS/ABI: UNIX 68000 EM_88K 5 Motorola Elf32_Half e_phnum; 0 ABI Version: 88000 Elf32_Half e_shentsize; EM_860 6 Intel 80860 Elf32_Half e_shnum; Elf32_Half e_shstrndx; } Elf32_Ehdr;
4.
段頭表【Section Header Table】 ●
描述了ELF各個區段的資 訊 ● 是Elf32_Shdr陣列 ● 第一個是無效的段述項 【Section Descriptor】 ● 編譯器、連結器和載入器 都是依靠段頭表來定位和 存取各個區段的屬性 ● 段頭表在ELF檔案中的位 置由ELF檔頭的e_shoff成 員決定
5.
段頭表【續】
區段名稱是個字串, 它位於一個叫做. shstrtab的字串表。 typedef struct { sh_name是區段名稱 Elf32_Word sh_name; 字串在.shstrtab中的 Elf32_Word sh_type; 偏移 Elf32_Word sh_flags; Elf32_Addr sh_addr; Elf32_Off sh_offset; Elf32_Word sh_size; 區段類型和區段旗標 Elf32_Word sh_link; 位元決定區段屬性 Elf32_Word sh_info; 我們接下來會看到 Elf32_Word sh_addralign; SHT_REL和 Elf32_Word sh_entsize; SHT_STRTAB } Elf32_Shdr;
6.
重定表【Relocation Table】 ● 一個重定表同時也是ELF的一個區段
○ 它的sh_type為SHT_REL ○ sh_link表示符號表的索引 ○ sh_info表示它作用的區段 ● 細節可參考4.2.2節【重定表】
7.
字串表 ● 把ELF檔中用到的字串集中起來存放 ● 一般常見的區段名稱為.strtab或.shstrtab
○ 字串表【String Table】用來保存普通字串 ○ 段頭字串表【Section Header String Table】用來保存段 頭表中用到的字串 ● ELF檔頭中的e_shstrndx表示.shstrtab在段頭表 中的索引
8.
作業 ● 平常我們在程式裡用的const char
*是存在那 個section? ● 用sh_name去查找在.shstrtab對應的字串
Jetzt herunterladen