Robert Pengelly
2024-02-07 14:31:50 UTC
I've been doing a little research into a.out and found two references that I'm confused about.
Looking at https://gunkies.org/wiki/UNIX_a.out_file it has:
Offset Contents
0 A magic number (below)
2 Program text size
4 Initialized data size
6 Uninitialized (BSS) data size
010 Symbol table size
012 Entry location
014 Unused
016 Flag indicating relocation information has been suppressed
and looking at https://www.bell-labs.com/usr/dmr/www/man51.pdf it has:
The header always contains 6 words:
1 a “br .+14” instruction (205(8))
2 The size of the program text
3 The size of the symbol table
4 The size of the relocation bits area
5 The size of a data area
6 A zero word (unused at present)
What size is a word exactly? I know that a.out is from the original Unix that ran on the PDP-7/PDP-11 but I don't know what a word size was (16-bits vs 32-bits).
Looking at https://gunkies.org/wiki/UNIX_a.out_file it has:
Offset Contents
0 A magic number (below)
2 Program text size
4 Initialized data size
6 Uninitialized (BSS) data size
010 Symbol table size
012 Entry location
014 Unused
016 Flag indicating relocation information has been suppressed
and looking at https://www.bell-labs.com/usr/dmr/www/man51.pdf it has:
The header always contains 6 words:
1 a “br .+14” instruction (205(8))
2 The size of the program text
3 The size of the symbol table
4 The size of the relocation bits area
5 The size of a data area
6 A zero word (unused at present)
What size is a word exactly? I know that a.out is from the original Unix that ran on the PDP-7/PDP-11 but I don't know what a word size was (16-bits vs 32-bits).