What’s in an Object File or Executable?
int j = 327;
char* s = “hello\n”;
char sbuf[512];
int p() {
int k = 0;
j = write(1, s, 6);
return(j);
}
Used by linker; may be removed after final link step and strip.
Header “magic number”
indicates type of image.
Section table an array
of (offset, len, startVA)
program sections
program instructions
p
immutable data (constants)
“hello\n”
writable global/static data
j, s
j, s ,p,sbuf
Previous slide
Next slide
Back to first slide
View graphic version