#if defined(_MSC_VER)
static struct finsh_syscall* _next_syscall(struct finsh_syscall* call)
{
unsigned int *ptr;
ptr = (unsigned int*) (call + 1);
while ((*ptr == 0) && ((unsigned int*)ptr < (unsigned int*) _syscall_table_end))
ptr ++;
return (struct finsh_syscall*)ptr;
}
#define _NEXT_SYSCALL(index) index=_next_syscall(index)
#else
#define _NEXT_SYSCALL(index) index++
#endif
在list_tc()中也这样处理后就没问题了,完整补丁见附件。
可是我不太明白为什么会需要这样处理,为什么链接之后第一个symbol在0x00cdd110,第二个在0x00cdd11c,跟前一个差0x0c,第三个的正确位置是在0x00cdd12c,跟前一个差0x10,第四个实际上也是差了0x10,是MSVC的链接器的问题?