[ Home | Liste | F.A.Q. | Risorse | Cerca... ]


[ Data: precedente | successivo | indice ] [ Argomento: precedente | successivo | indice ]


Archivio: Maggio 2001 ml@sikurezza.org
Soggetto: Re: %esp
Mittente: Enrico
Data: 30 May 2001 09:08:31 -0000
>Normale dovrebbe sotrae 20 bytes dal %esp.
>20 = (4 * 5).
>In hexa dovrebbe essere : subl $0x14,%esp

Infatti sottrae proprio 20 Byte !!!
Guarda la mia sessione di disassemblamento ...

$ gcc x.c
$ gdb a.out
GNU gdb 19991004
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux"...
(gdb) disassemble seg
Dump of assembler code for function seg:
0x8048398 <seg>:        push   %ebp
0x8048399 <seg+1>:      mov    %esp,%ebp
0x804839b <seg+3>:      sub    $0x14,%esp
0x804839e <seg+6>:      leave
0x804839f <seg+7>:      ret
End of assembler dump.
(gdb)                 


>Ma il problema é che sotrae sempre 40 bytes!
>Provate a compilare ed a usare gdb!
>ecco :
>
>0x80483c0 <seg>:        push   %ebp
>0x80483c1 <seg+1>:      mov    %esp,%ebp
>0x80483c3 <seg+3>:      sub    $0x28,%esp
>0x80483c6 <seg+6>:      leave
>0x80483c7 <seg+7>:      ret


Non so che dirti, io l'ho compilato su una RH 6.2.
Tu su che sistema l'hai compilato ?

ByeZ
	ORK






________________________________________________________
http://www.sikurezza.org - Italian Security Mailing List




[ Home | Liste | F.A.Q. | Risorse | Cerca... ]

www.sikurezza.org - Italian Security Mailing List
(c) 1999-2005