Different versions of system calls in assembly language

joerg at britannica.bec.de joerg at britannica.bec.de
Thu Sep 29 05:57:11 PDT 2005


On Thu, Sep 29, 2005 at 03:38:03AM +0100, Jonathon McKitrick wrote:
> I'm continuing my foray into assembly language programming, and today I ran
> into a problem calling mmap.  The problem came from the fact that the version
> I was apparently calling (libc?) was expecting an additional 'pad' argument.

What do you want to do? If you generate the complete call directly, e.g.
with int $0x80, you have to be aware of the necessary padding. But that
practise is not recommented, since it makes the programs much less
portable. You can run into problems when a syscall is eliminated and
only emulated in userland, for example.

Joerg





More information about the Kernel mailing list