2014/11/28

ARM Code Sections

In source code
#pragma arm section [section_type_list]

Valid section types are:
code
rodata
rwdata
zidata

Example
#pragma arm section rwdata = "foo", rodata = "bar"


In scatter file 
RO
Constants (ex: const TEMP, etc.) and Code 

RW
Expressed initialized global variables 

ZI
Uninitialized global variables, and the variable is initialized to 0


GCC world
.text
program code

.rodata
read-only data;

.data
read-write initialized data;

.bss
read-write zero initialized data.


Reference
http://www.cprogramdevelop.com/912436/
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0491g/BCFJBABB.html
https://sourceware.org/binutils/docs/ld/REGION_005fALIAS.html#REGION_005fALIAS

No comments:

Post a Comment

Post Code on Blogger

Simplest way to post code to blogger for me: <pre style="background: #f0f0f0; border: 1px dashed #CCCCCC; color: black;overflow-x:...