?? a.out.5
字號(hào):
.TH A.OUT 5 .SH NAMEa.out \- assembler and link editor output.SH SYNOPSIS.B #include <a.out.h>.SH DESCRIPTION.I A.outis the output file of the assembler.IR as (1)and the link editor.IR ld (1).Both programs make.I a.outexecutable if there were noerrors and no unresolved external references.Layout information as given in the include file for the PDP11 is:.PP.nf.ta 8n +9n +11n.PP.so /usr/include/a.out.h.fi.PPThe file has four sections:a header, the program and data text,relocation information, and a symbol table(in that order).The last two may be emptyif the program was loadedwith the `\-s' optionof.I ldor if the symbols and relocation have beenremoved by.IR strip (1)..PPIn the header the sizes of each section are given in bytes, but are even.The size of the header is not included in any of the other sizes..PPWhen an.I a.outfile is loaded into core for execution, three logical segments areset up: the text segment, the data segment(with uninitialized data, which starts off as all 0, followinginitialized),and a stack.The text segment begins at 0in the core image; the header is not loaded.If the magic number in the header is 0407(8), it indicates that the textsegment is not to be write-protected and shared,so the data segment is immediately contiguouswith the text segment.If the magic number is 0410,the data segment begins at the first 0 mod 8K byteboundary following the text segment,and the text segment is not writable by the program;if other processes are executing the same file,they will share the text segment.If the magic number is 411,the text segment is again pure, write-protected, and shared,and moreover instruction and data space are separated;the text and data segment both begin at location 0.If the magic number is 0405, the text segmentis overlaid on an existing (0411 or 0405) text segmentand the existing data segment is preserved..PPThe stack will occupy the highest possible locationsin the core image: from 0177776(8) and growing downwards.The stack is automatically extended as required.The data segment is only extended as requested by.IR brk (2)..PPThe start of the text segment in the file is 020(8);the start of the data segment is 020+S\s6\dt\u\s10 (the size of the text)the start of the relocation information is020+S\s6\dt\u\s10+S\s6\dd\u\s10;the start of the symbol table is020+2(S\s6\dt\u\s10+S\s6\dd\u\s10)if therelocation information is present,020+S\s6\dt\u\s10+S\s6\dd\u\s10if not..PPThe layout of a symbol table entry and the principal flag valuesthat distinguish symbol types are given in the include file.Other flag values may occur if an assembly language programdefines machine instructions..PPIf a symbol's type is undefined external,and the value field is non-zero,the symbol is interpreted by the loader.I ldasthe name of a common regionwhose size is indicated by the value of thesymbol..PPThe value of a word in the text or data portions which is nota reference to an undefined external symbolis exactly that value which will appear in corewhen the file is executed.If a word in the text or data portioninvolves a reference to an undefined external symbol,as indicated by the relocation informationfor that word,then the value of the word as stored in the fileis an offset from the associated external symbol.When the file is processed by thelink editor and the external symbol becomesdefined, the value of the symbol willbe added into the word in the file..PPIf relocationinformation is present, it amounts to one word perword of program text or initialized data.There is no relocation information if the `relocation info stripped'flag in the header is on..PPBits 3-1 of a relocation word indicate the segment referredto by the text or data word associated with the relocationword:.TP000absolute number.br.ns.TP002reference to text segment.br.ns.TP004reference to initialized data.br.ns.TP006reference to uninitialized data (bss).br.ns.TP010reference to undefined external symbol.PPBit 0 of the relocation word indicates, if 1,that thereference is relative to the pc (e.g. `clr x');if 0,thatthe reference is to the actual symbol (e.g.,`clr *$x')..PPThe remainder of the relocation word (bits 15-4)contains a symbol number in the case of externalreferences, and is unused otherwise.The first symbol is numbered 0, the second 1, etc..SH "SEE ALSO"as(1), ld(1), nm(1)
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -