a question about pageable a.out
Ian Lance Taylor
ian@airs.com
Sat Mar 22 02:49:00 GMT 2003
More information about the Binutils mailing list
Sat Mar 22 02:49:00 GMT 2003
- Previous message (by thread): a question about pageable a.out
- Next message (by thread): [patch] xstormy16: support merged sections
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
jemarch@gnu.org writes: > I read in the Linker Book, about the ZMAGIC (pageable a.out) format: > > "On systems with 4K pages, the a.out header is expanded to 4K, and the > text segment's size is rounded up to the next 4K boundar. There's no > need to round up the size of the data segment, since the BSS segment > logically follows the data segment, and is zeroed by the program > loader anyway." > > I dont understand the last phrase. Why there is no need to align the > data segment? It is because it is aligned at load-time, taking care > the BSS size? Hmmm. It doesn't say that there is no need to align the data segment (to me, those words imply ensuring that the data segment starts on an aligned boundary). It says that there is no need to round up the size of the data segment. The reason to round up the size of the text segment is so that the data segment, which in a.out immediately follows the text segment, starts on a page boundary. This permits the data segment and the text segment to be paged differently, permitting the text segment to read-only, and, in some cases, to be shared between processes. There is no need to round up the size of the data segment because it is not important for the BSS segment and the data segment to be paged differently. The BSS segment is simply allocated and zeroed out by the loader. Note that the a.out object file format is totally obsolete. In ELF, unlike a.out, the data segment has an explicit load address, so none of this alignment folderol is required. Ian
- Previous message (by thread): a question about pageable a.out
- Next message (by thread): [patch] xstormy16: support merged sections
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Binutils mailing list