(3.235.108.188) 您好!臺灣時間:2021/03/07 21:21
字體大小: 字級放大   字級縮小   預設字形  
回查詢結果

詳目顯示:::

我願授權國圖
: 
twitterline
研究生:李沐恒
研究生(外文):Mu-Heng Li
論文名稱:嵌入式系統之程式記憶體佈局
論文名稱(外文):Program Memory Layout for Embedded Systems
指導教授:陳俊良陳俊良引用關係
指導教授(外文):Chen Chuen-Liang
學位類別:碩士
校院名稱:國立臺灣大學
系所名稱:資訊工程學研究所
學門:工程學門
學類:電資工程學類
論文種類:學術論文
論文出版年:2010
畢業學年度:98
語文別:英文
論文頁數:81
中文關鍵詞:記憶體佈局嵌入式系統連結器命令語言
外文關鍵詞:memory layoutembedded systemldld scriptlinker command langauge
相關次數:
  • 被引用被引用:0
  • 點閱點閱:238
  • 評分評分:系統版面圖檔系統版面圖檔系統版面圖檔系統版面圖檔系統版面圖檔
  • 下載下載:0
  • 收藏至我的研究室書目清單書目收藏:0
嵌入式系統程式開發者在開發程式時,往往需要依照硬體特殊的記憶體架構來分配程式可以使用的記憶體空間,尤以開發大型的程式時,分配記憶體對程式設計師來說,是一件複雜且單調乏味的工作,若能將之交由一套可以自動化分配記憶體空間的程式,對開發者來說,藉由減輕考慮程式的記憶體分配,可以縮短開發時程。
本論文將實作一個可以自動分配記憶體空間的系統,這套系統將以函式為單位來做空間分配,搭配一個輔助的流程架構,可以幫助程式設計師在撰寫好程式之後,不須花費額外心力去設定程式的空間分配。另外,我們使用的是GNU開源軟體,可以應用在多數的嵌入式系統程式開發上。
最後經由實驗,我們可以看到,程式碼的確能依照程式的行為而被配置到合適的記憶體空間,也證實了我們提出的方法的可行性。


When developing a program on an embedded system, programmers often need to allocate memory manually for each segment of codes because of the special hardware architecture. Especially for a large-scale program, it is really a complicated and tedious work. If there is a tool that can help programmers easily adapt codes to different memory blocks, by alleviating programmers’ consideration of program memory distribution, it will save a lot of time for development schedule.
In this thesis, we will implement an automated memory allocating system which allocates memory spaces based on functions. By using this system and following a framework we proposed, programmer can write codes with no considering of space allotment and then have the codes mapping to appropriate memory blocks. On the other hand, our system is constructed on the use of GNU open source software; it can be applied to developments on many kinds of embedded system.
Finally we can see that program codes are arranged on appropriate memory blocks by examining address of each memory access, which indirectly verifies the feasibility of the method we propose.


誌謝 i
摘要 iii
Abstract v
Table of Contents vii
List of Figures ix
List of Tables xi
Chapter 1 Introduction 1
1.1 Research Motivation 1
1.2 Research Objective 1
1.3 Thesis Organization 2
Chapter 2 Background Knowledge 3
2.1 Tool Chain 3
2.1.1 Linker 4
2.2 Object File 6
2.2.1 Executable and Linking Format 6
2.3 GNU Compiler Collection 10
2.4 GNU Binary Utilities 11
2.4.1 ld – GNU Linker 11
2.4.2 gprof 13
2.4.3 objdump 13
2.4.4 readelf 14
2.5 GCC C Language Extension - __attribute__ 15
2.6 Linker Command Language 16
2.6.1 Basic Linker Script Concept 16
2.6.2 Output Section Description 18
2.6.3 Input Section Description 19
2.6.4 MEMORY Command 19
2.6.5 Output Section Region 20
Chapter 3 System Architecture 22
3.1 System Construction 22
3.2 Overall System 23
3.3 Memory Allocation 28
3.4 Source Code Modification 29
3.5 Ld Script Modification 30
Chapter 4 Implementation 31
4.1 Modified GCC 32
4.2 Target GCC 35
4.3 Necessary Information 36
4.3.1 Default Linker Script 36
4.3.2 Memory Description 37
4.3.3 Function List 38
4.3.4 Symbol Table 39
4.3.5 Profiling Data 40
4.3.6 Section Header Table 41
4.4 Memory Allocation 43
4.4.1 Function Execution Rate 43
4.4.2 Memory Allocation Algorithm 44
4.5 Source Code Modification 45
4.6 Ld Script Modification 47
Chapter 5 Evaluation and Discussion 50
5.1 Evaluation Method 50
5.2 GNU Debugger 51
5.3 Benchmark Program 52
5.4 Evaluation and Discussion 53
5.4.1 Evaluation of bc 57
5.4.2 Evaluation of grep 70
6 Chapter 6 Conclusion and Future Work 79
6.1 Conclusion 79
6.2 Future Work 79
References 81


[1]Alfred V. Aho, Ravi Sethi, and Jeffrey D. Ullman, Compilers: Principles, Techniques, and Tools, Addison Wesley, 1st Ed., 1986.
[2]John R. Levine, Linkers & loaders, Morgan Kaufman, 1st Ed., 1999.
[3]“Assemblers, Linkers & Loaders” , http://cs.gmu.edu/~setia/cs365-S02/assembler.pdf
[4]“Tool Interface Standard (TIS) Executable and Linking Format (ELF) Specification Version 1.2”, TIS Committee, 1995.
[5]GCC online manual, http://gcc.gnu.org/onlinedocs/gcc/
[6]GCC online internals, http://gcc.gnu.org/onlinedocs/gccint/
[7]Arthur Griffith, GCC: The Complete Referenc, McGraw-Hill Osborne Media, 1st Ed., 2002.
[8]Kurt Wall and William von Hagen, The Definitive Guide to GCC, Apress, 2003.
[9]GNU Binutils, http://sourceware.org/binutils/
[10]Documentation for Binutils 2.20, http://sourceware.org/binutils/docs-2.20/
[11]Documentation for ld, http://sourceware.org/binutils/docs/ld/index.html
[12]GDB, the GNU Project Debugger, http://www.gnu.org/software/gdb/
[13]Karim Yaghmour, Jon Masters, Gilad Ben-Yossef, and Philippe Gerum, Building Embedded Linux Systems, O''Reilly Media, 2nd Ed., 2008.
[14]Leland L. Beck, System Software: An Introduction to Systems Programming, Addison Wesley, 3rd Ed. 1996.
[15]俞甲子,石凡,與潘愛民,程式設計師的自我修養—連結. 載入. 程式庫,碁峯,2009。


QRCODE
 
 
 
 
 
                                                                                                                                                                                                                                                                                                                                                                                                               
第一頁 上一頁 下一頁 最後一頁 top
無相關論文
 
系統版面圖檔 系統版面圖檔