diff --git a/tccelf.c b/tccelf.c index ff3ee89d..ae4e2db1 100644 --- a/tccelf.c +++ b/tccelf.c @@ -2317,7 +2317,14 @@ static int final_sections_reloc(TCCState *s1) /* XXX: ignore sections with allocated relocations ? */ for(i = 1; i < s1->nb_sections; i++) { s = s1->sections[i]; +#ifdef TCC_TARGET_I386 if (s->reloc && s != s1->got && (s->sh_flags & SHF_ALLOC)) //gr + /* On X86 gdb 7.3 works in any case but gdb 6.6 will crash if SHF_ALLOC + checking is removed */ +#else + if (s->reloc && s != s1->got) + /* On X86_64 gdb 7.3 will crash if SHF_ALLOC checking is present */ +#endif relocate_section(s1, s); }