Re: Linux asm code



spamtrap@xxxxxxxxxx wrote:
> I have compiled a useless C module with Gcc under Linux just to see
> what compiled C code looks like. The C code is this:
>
> print1(char * str)
> {
> printf(str);
> }
>
> The output asm code is as follows (generated by objdump)

Compilers have their own logic. They may want specific alignment for the
stack variable, or some other things in "mind". I've seen even more
intrigueing things, like when you request 3 bytes array, on the stack
will be 24 bytes, but if you request 8 bytes array, you get exactly 8
bytes on the stack. Go figure.

After all it's not assembler, but C that you use. So if such things
bother you, then switch to assembler :)

--
Minds, like parachutes, function best when open

.