/* Code indicating object file or impure executable. */ #define OMAGIC 0407 /* Code indicating pure executable. */ #define NMAGIC 0410 /* Code indicating demand-paged executable. */ #define ZMAGIC 0413 /* This indicates a demand-paged executable with the header in the text.
The first page is unmapped to help trap NULL pointer references */ #define QMAGIC 0314
/* Address of text segment in memory after it is loaded. */ #if !defined (N_TXTADDR) #define N_TXTADDR(x) (N_MAGIC(x) == QMAGIC ? PAGE_SIZE : 0) #endif
/* Address of data segment in memory after it is loaded. */ #ifndef __KERNEL__ #include <unistd.h> #endif #ifdefined(__i386__) || defined(__mc68000__) #define SEGMENT_SIZE 1024 #else #ifndef SEGMENT_SIZE #ifndef __KERNEL__ #define SEGMENT_SIZE getpagesize() #endif #endif #endif
/* The following type indicates the definition of a symbol as being anindirectreferencetoanothersymbol.Theothersymbol appearsasanundefinedreference,immediatelyfollowingthissymbol.
Indirectionisasymmetrical.Theothersymbol'svaluewillbeused tosatisfyrequestsfortheindirectsymbol,butnotviceversa. Iftheothersymboldoesnothaveadefinition,librarieswill
be searched to find a definition. */ #define N_INDR 0xa
/* The following symbols refer to set elements. AlltheN_SET[ATDB]symbolswiththesamenameformoneset. Spaceisallocatedforthesetinthetextsection,andeachset element'svalueisstoredintoonewordofthespace. Thefirstwordofthespaceisthelengthoftheset(numberofelements).
TheaddressofthesetismadeintoanN_SETVsymbol whosenameisthesameasthenameoftheset. ThissymbolactslikeaN_DATAglobalsymbol
in that it can satisfy undefined external references. */
/* These appear as input to LD, in a .o file. */ #define N_SETA 0x14 /* Absolute set element symbol */ #define N_SETT 0x16 /* Text set element symbol */ #define N_SETD 0x18 /* Data set element symbol */ #define N_SETB 0x1A /* Bss set element symbol */
/* This is output from LD. */ #define N_SETV 0x1C /* Pointer to set vector in data area. */
#if !defined (N_RELOCATION_INFO_DECLARED) /* This structure describes a single relocation to be performed. Thetext-relocationsectionofthefileisavectorofthesestructures, allofwhichapplytothetextsection.
Likewise, the data-relocation section applies to the data section. */
struct relocation_info
{ /* Address (within segment) to be relocated. */ int r_address; /* The meaning of r_symbolnum depends on r_extern. */ unsignedint r_symbolnum:24; /* Nonzero means value is a pc-relative offset anditshouldberelocatedforchangesinitsownaddress
as well as for changes in the symbol or section specified. */ unsignedint r_pcrel:1; /* Length (as exponent of 2) of the field to be relocated.
Thus, a value of 2 indicates 1<<2 bytes. */ unsignedint r_length:2; /* 1 => relocate with value of symbol. r_symbolnumistheindexofthesymbol infile'sthesymboltable. 0=>relocatewiththeaddressofasegment. r_symbolnumisN_TEXT,N_DATA,N_BSSorN_ABS
(the N_EXT bit may be set also, but signifies nothing). */ unsignedint r_extern:1; /* Four bits that aren't used, but when writing an object file
it is desirable to clear them. */ unsignedint r_pad:4;
}; #endif/* no N_RELOCATION_INFO_DECLARED. */
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.