Data Segment

Wikipedia

In computing, a data segment (often denoted .data) is a portion of an object file or the corresponding address space of a program that contains initialized static variables, that is, global variables and static local variables. The size of this segment is determined by the size of the values in the program’s source code, and does not change at run time.

在计算中,数据段(通常表示为.data)是目标文件或程序对应地址空间的一部分,其中包含初始化的静态变量,即全局变量和静态局部变量。这个段的大小由程序源代码中的值的大小决定,在运行时不会改变。

The data segment is read/write, since the values of variables can be altered at run time. This is in contrast to the read-only data segment (rodata segment or .rodata), which contains static constants rather than variables; it also contrasts to the code segment, also known as the text segment, which is read-only on many architectures. Uninitialized data, both variables and constants, is instead in the BSS segment.
数据段是读/写的,因为变量的值可以在运行时更改。这与只读数据段(rodata段或.rodata)相反,后者包含静态常数而不是变量;就像代码段(也称为文本段),代码段在许多体系结构上是只读的。未初始化的数据(包括变量和常量)则位于BSS段中。

  • data segment( .data) : read/write, the values of variables can be altered at run time.
  • rodata segment( .rodata):read-only data segment,static constants
  • BSS segment:uninitialized data, both variables and constants
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值