[GCC] Problem with running GCC on my OS - search_line_fast()
Posted: Sun Feb 05, 2012 3:47 am
Hello,
I'm writing on this forum because I have ported GCC on my OS and I have been stuck for weeks now with quite an annoying problem. Indeed, by debugging I could see that search_line_fast function pointer was not initialized. It should have been done by init_vectorized_lexer(), but this function is called nowhere in the code. Consequently, the following instruction (that I could interprete as a call to search_line_fast() thanks to the intermixed source) :
(from cc1 binary disassembly)
obviously generates a Page Fault exception, as the double word stored at 0x4098a5e4 is 0x00000000, and thus not a valid address (I could check it with debugging, also).
It seems that GCC was not compiled well... Maybe the configure options I used may help :
In $PREFIX directory, I have compiled GMP, MPFR and MPC libraries for my OS, as you can see.
$TARGET is i586-pc-myos (I have built an OS specific toolchain thanks to the tutorial on the Wiki, with i586-pc-myos-gcc, i586-pc-myos-ld...)
Thanks for your help.
I'm writing on this forum because I have ported GCC on my OS and I have been stuck for weeks now with quite an annoying problem. Indeed, by debugging I could see that search_line_fast function pointer was not initialized. It should have been done by init_vectorized_lexer(), but this function is called nowhere in the code. Consequently, the following instruction (that I could interprete as a call to search_line_fast() thanks to the intermixed source) :
Code: Select all
call *4098a5e4
obviously generates a Page Fault exception, as the double word stored at 0x4098a5e4 is 0x00000000, and thus not a valid address (I could check it with debugging, also).
It seems that GCC was not compiled well... Maybe the configure options I used may help :
Code: Select all
../gcc-4.6.1/configure --target=$TARGET --host=$TARGET --prefix=/usr/local/cross/formyos/ --with-newlib --enable-languages=c,c++ --disable-nls --with-gmp=$PREFIX --with-mpfr=$PREFIX --with-mpc=$PREFIX
$TARGET is i586-pc-myos (I have built an OS specific toolchain thanks to the tutorial on the Wiki, with i586-pc-myos-gcc, i586-pc-myos-ld...)
Thanks for your help.