UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

AR# 14615

Virtex-II Pro Developer's Kit - What are the default sections in the linker script? What are the section names? (.text, .sdata, .data, etc.)

描述


General Description:

What are the default sections used in the linker script? What are the section names?

解决方案


The compiler places code and variables in named sections. These sections may then be located in specific areas of memory by a linker command file. The default sections and their names are as follows:



.text - Code generated for functions, global ASM statements, string constants, and large "const" variables (because their values cannot change). "Large" means a size in bytes greater than or equal to the value set by the option "-Xsmall-const" (defaults to 8).



.bss - Large static and global non-"const" variables without initial values. Will be initialized to 0 by startup code. "Large" means a size in bytes greater than or equal to the value set by the option "-Xsmall-const" (defaults to 8).



.sbss - Small static and global non-"const" variables without initial values, initialized to 0 by the startup code. "Small" means a size in bytes less than the value set by the option "-Xsmall-const" (defaults to 8).



.data - Large static and global non-"const" variables with initial values. The values may be copied from "ROM" to "RAM" at startup.



.sdata - Small static and global non-"const" variables with initial values. The values may be copied from "ROM" to "RAM" at startup.



.sdata2 - Small static and global "const" variables, with or without initial values. The values may be copied from "ROM" to "RAM" at startup.
AR# 14615
日期 03/26/2012
状态 Archive
Type 综合文章
的页面