stupid red zone...
Posted: Fri May 04, 2012 1:57 am
After debugging a whole day for error that my application generating #PF with unallocated/not present memory upon second printf(), I realized that my newlib compilation did not include -Mno-red-zone, which caused all sort of trouble.
So, if anyone plan to play with 64-bit soon, remember to add it to the build configuration.
So, if anyone plan to play with 64-bit soon, remember to add it to the build configuration.
Code: Select all
> cat build64.sh
#!/bin/sh
mkdir build-x86_64
cd build-x86_64
../src/configure --target=x86_64-elf --prefix=`pwd`/../../../libc/ \
CFLAGS="-mno-red-zone" CPPFLAGS="-mno-red-zone"
make
make install
cd ..