elf & pe 文件中 主要 section.

来源:互联网 发布:笔记本安装centos 编辑:程序博客网 时间:2024/05/21 20:43

Hello

Here are the predefined section used by the compiler is using:

.text : Contains the code.
.data : Contains the initialized global variables.
e.g. int a = 1, b= 2;
.stack: Contains the stack.
.bss : Contains the static un-initialized global variables.
e.g. static int c, d ;
.common : Contains the un-initialized global variables (not static).
e.g. int e, f;
.rodata : Contains the constant variables .
e.g. const int c1=2, c2=4 ;
.rodata1 : Contains all the string constants.
e.g. #define mystr = “Hello world

I hope this helps.

CrasyCat

原创粉丝点击