In a function:
Code: Select all
void fun(int a){
int *p = &a;
putd(*p);
}
Code: Select all
lea edi, ss:[xx+xx]
Code: Select all
mov eax, ds:[edi+x]
So if DS != SS, the answer is wrong.... now I have to set DS = SS, this confuse me very much.
Does gcc generate a wrong code ?
Is that some gcc argument or other ways can solve this problem?