pgubook-readers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Pgubook-readers] the exit executable


From: Jonathan Bartlett
Subject: Re: [Pgubook-readers] the exit executable
Date: Sun, 8 Feb 2004 14:05:25 -0800 (PST)

> * Is there a more or less direct relationship between the fetch-execute
> cycle outlined in chapter 2 and those numbers?

Those numbers consists of three things:
 * the program instructions (each instruction can take up several bytes
and words of memory, depending on how many operands it can hanve, and how
many of those can be memory addresses, etc.)
 * the program's static data (none in this program)
 * the ELF executable format.  This is the file format of the executable.
It takes up more space than the rest of the program.  I would expect that
the program itself is less than 50 bytes, but the ELF file format takes up
most of the space.  linuxassembly.org actually has an example of a program
where theyy tried to make the smallest ELF executable possible.
Interesting, but not for the faint of heart.

> * Are those same bytes the ones loaded in memory before the program is
> executed? I mean, is that the real stuff the computer finally
> understands?

The bytes that are actually program code, yes, is the stuff the computer
understands.  The rest is for the operating system to set everything up.

>
> * Why is the executable six times bigger than the source file?
>

The ELF file format.

Jonathan Bartlett

> -- fxn
>
>
>
> _______________________________________________
> Pgubook-readers mailing list
> address@hidden
> http://mail.nongnu.org/mailman/listinfo/pgubook-readers
>





reply via email to

[Prev in Thread] Current Thread [Next in Thread]