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.
This partially reverts commit 0d598aca08
.
I don't remember what the problem was but it was the wrong way
to fix it.
This commit is contained in:
parent
d5f4df09ff
commit
92024ab07a
1 changed files with 1 additions and 1 deletions
2
tccelf.c
2
tccelf.c
|
@ -2178,7 +2178,7 @@ static int elf_output_file(TCCState *s1, const char *filename)
|
||||||
/* XXX: ignore sections with allocated relocations ? */
|
/* XXX: ignore sections with allocated relocations ? */
|
||||||
for(i = 1; i < s1->nb_sections; i++) {
|
for(i = 1; i < s1->nb_sections; i++) {
|
||||||
s = s1->sections[i];
|
s = s1->sections[i];
|
||||||
if (s->reloc && s != s1->got && (s->sh_flags & SHF_ALLOC)) //gr
|
if (s->reloc && s != s1->got)
|
||||||
relocate_section(s1, s);
|
relocate_section(s1, s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue