浏览 2589 次
锁定老帖子 主题:Cleanups Done
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
|
|
---|---|
作者 | 正文 |
发表时间:2007-08-04
NASM 0.99.01 was buggy for the 32bit/16bit codegen. When an instruction which access register and mem, it would be generated with 0x67 prefix for a 16bit segment. This blocks the elf2 bootsect, which has size limitation, extra 0x67 makes the code bloated, so the compilation breaks. I did a quick hack, and posted the new compiled binary to the ReactOS Build Environment maintainer. Also I filed it as a bug, though the nasm64developer told me that this couldn't be reproduced in 0.99.02 CVS snapshot. O_O , after a try , yes, it's already fixed. ;) so my hacking over nasm is useless. Though another thing interesting is spotted about GDB. GDB itself is a nice debugger. But... c 代码
when you try to gdb下调试
This is the reason why gdb couldn't get all symbols work in Kernel Debugging. Remarks: __stdcall __fastcall are calling convention in Windows, they both add @ to the mangled name, seems like gdb fail to deal with mangle name with '@' mangle name(link time symbol): c mangle convention: underscore prefix, so every C symbols in asm would be prefixed with an underscore. so a typical link with ASM files would be test.c c 代码
asm 代码
gcc -c myasm.S gcc -c test.c gcc test.o myasm.o -o test.exe 声明:ITeye文章版权属于作者,受法律保护。没有作者书面许可不得转载。
推荐链接
|
|
返回顶楼 | |