debugging strategies

Jan Dvořák mordae at thirdcms.org
Sat Mar 24 04:53:23 PDT 2007


Robert Connolly wrote:
> CFLAGS="-nopie -fno-pic -norelro -nonow -fno-stack-protector -D_FORTIFY_SOURCE=0" 
> should disable the compiler flags. There's a chance -fstack-protector-all is 
> the cause of the crashes (like with Python and -O3), so you might want to 
> leave that in. Even with these flags, you will probably still need to 
> use 'paxctl -spm'. Adding '-g3 -ggdb' might also help.
OK, the only important part for our toolchain is `-nopie`, which 
disables all PIC & PIE and lets gdb do it's job. Anyone knows why?

What if we build another ld, /lib/ld-debug.so.2 with -nopie and use it 
for debugging only? That may work.



More information about the hlfs-dev mailing list