[pso] [Tema1][win] Problema la interceptare sys_call
Dragos Sbarlea
sbarlead at yahoo.com
Wed Apr 2 22:41:20 EEST 2008
Ai dreptate, nu mi-a trecut prin cap ca se poate si fara push sau combinate datele. Mea culpa, trebuia sa stiu asta :)
In alta ordine de idei, sectiunea de structuri din ABIul gasit de tine este aur curat :)
---
Dragos
----- Original Message ----
From: Mircea Gherzan <mgherzan at anaconda.cs.pub.ro>
To: Proiectarea Sistemelor de Operare <pso at cursuri.cs.pub.ro>
Sent: Wednesday, April 2, 2008 3:04:44 PM
Subject: Re: [pso] [Tema1][win] Problema la interceptare sys_call
Stefan Bucur wrote:
> 2008/4/2 Dragos Sbarlea <sbarlead at yahoo.com>:
>> Sper ca am inteles intrebarea:
>>
>> http://fatih.kesgin.org/mul06/intel/instr/push.html
>> ---
>> Dragos
Efectul unei instructiuni ASM nu decide neaparat modul in care un
compilator genereaza instructiunile pentru apelul unei functii.
> Da, asa tineam minte si eu, dar doar pe x86, si in plus asta e doar ce
> ofera microprocesorul. Compilatorul (tinand cont de conventiile de ABI
> referitoare la stackframe, zic si eu :-??) poate decide sa impacheteze
> 2 parametri char intr-un registru mai mare, de exemplu. Iar poate asta
> e chiar architecture dependent. Gandesc prea complicat? :)
Ai partial dreptate: compilatorul *respecta* ABI. Pentru Linux IA32,
documentul il gasiti pe site-ul SCO (ironia sortii :) ) [1]. La pagina
36 din document e un tabel cu layout-ul stive si "legile" edificatoare:
"The stack is word aligned. Although the architecture does not require
any alignment of the stack, software convention and the operating system
requires that the stack be aligned on a word boundary."
"An argument’s size is increased, if necessary, to make it a multiple of
words. This may require tail padding, depending on the size of the
argument."
[1] www.sco.com/developers/devspecs/abi386-4.pdf
--
Mircea Gherzan
Faculty of Automatic Control and Computers
Politehnica University of Bucharest
_______________________________________________
pso mailing list
pso at cursuri.cs.pub.ro
http://cursuri.cs.pub.ro/cgi-bin/mailman/listinfo/pso
____________________________________________________________________________________
You rock. That's why Blockbuster's offering you one month of Blockbuster Total Access, No Cost.
http://tc.deals.yahoo.com/tc/blockbuster/text5.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://cursuri.cs.pub.ro/pipermail/pso/attachments/20080402/1f40499c/attachment.htm
More information about the pso
mailing list