Revert a grischka patch: gdb refused to know "main"

It is a strange patch because before this commit a gdb is working well
and after this commit there is exactly the same problem on Linux:
gdb refuses to know "main"

    Author: grischka <grischka>
    Date:   Tue Feb 5 21:18:29 2013 +0100
    tccelf: fix debug section relocation
    With:
       tcc -g hello.c
       gdb a.out
         b main
    gdb refused to know "main" because of broken dwarf info.
master
seyko 2015-03-03 14:39:27 +03:00
parent 252a151fc6
commit 09d4e4f408
1 changed files with 1 additions and 1 deletions

View File

@ -2302,7 +2302,7 @@ 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];
if (s->reloc && s != s1->got)
if (s->reloc && s != s1->got && (s->sh_flags & SHF_ALLOC)) //gr
relocate_section(s1, s);
}