I have been reading some articles in order to figure out the answer for this question. After that, I think a.out contains only DATA and TEXT segments, it does not contain BSS segment. Am I correct?
And please tell me why BSS is not included in a.out.
a.out
contains the bss
segment in its segment table, which includes the length and offset of that segment. But bss
segments do not require any data, since they are initialized to 0 by the loader, so there is no corresponding data in the executable file.
The segment must exist in the segment table in order for the loader to map it to memory and initialize it to 0.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.