This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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/




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]