This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
loading from the stack segment
- From: David Livshin <dlivshin at inter dot net dot il>
- To: binutils at sources dot redhat dot com
- Date: Thu, 19 Aug 2004 23:42:41 +0300
- Subject: loading from the stack segment
Hi,
Changing the sequence of instructions from
subl $9980,%esp
movl -9976(%ebp),%eax
to
movl -9976(%ebp),%eax
subl $9980,%esp
causes segmentation fault while executing memory load
movl -9976(%ebp),%eax
I don't see any dependency between those two instructions.
My guess is that
subl $9980,%esp
somehow establishes stack segment that
movl -9976(%ebp),%eax
reads from – however debugging the faulty/correct programs didn't show
any significant difference between the state of CPU at
movl -9976(%ebp),%eax
and I couldnt locate any documentation to support such an assumption.
Any thoughts and clarifications would be greatly appreciated.
Thank you in advance.
David Livshin
dlivshin@internet-zahav.net
http://www.dalsoft.esmartweb.com/