|
From: <zh...@ya...> - 2003-05-17 08:09:14
|
Hi,
When I repot a x86 problem , I get some segment
error. I test the following codes, it can work at
x86, but not sh5.
/* test.c */
char str[ ]={
'a','b','c'
};
int main(void)
{
char *ptr;
short i;
ptr=str+1;
i=*(short *) ptr; /* here error. I can't convert an
odd pointer to short */
return 0;
}
The codes are well in x86, but will get segment error
in sh5.
To coross compile the codes, I use the following
commands:
sh64-superh-linux-gnu-gcc -O2 -o test test.c
When I port a x86 program to sh5, what I should pay
more attention to ?
Thanks,
Hui
_________________________________________________________
Do You Yahoo!?
相见不如聊天!不出门一样面对面!网络摄像头对对派送中~赶快用你的雅虎电邮帐号参与吧……
http://cn.rd.yahoo.com/mail_cn/tag/?http://cn.messenger.yahoo.com/
|