{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

G unix unix executing on a typical 32 bit

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ace system (e.g., Unix) Unix) executing on a typical 32-bit architecture. The The Birth of a Program myprogram.c int int j; const char* s = “hello\n”; myprogram.o assembler object file data int p() { j = write(1, s, 6); return(j); } data data data ….. compiler p: store this store that push jsr _write ret etc. myprogram.s libraries and other objects linker data program myprogram (executable file) What’s What’s in an Object File or Executable? Header “magic number” indicates type of image. Section table an array of (offset, len, startVA) header text program instructions p data idata program sections immutable data (constants) “hello\n” wdata writable global/static data j, s MIPS/COFF binary int j = 327; char* s = “hello\n”; char sbuf[512]; int p() { int k = 0; j = write(1, s, 6); return(j); } The The Program and the Process VAS: Unix example Process text segment is initialized directly from program text section. sections Process data segment(s) are initialized from idata and an...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online