aboutsummaryrefslogtreecommitdiff
path: root/tccelf.c
diff options
context:
space:
mode:
authorgrischka <grischka>2013-02-05 21:18:29 +0100
committergrischka <grischka>2013-02-05 21:18:29 +0100
commit92024ab07ad8e1c4a05f90add3d3ca7932251016 (patch)
tree5af3f98bee0607d74e9c73dc3e66f5371951fdaf /tccelf.c
parentd5f4df09ff4a84dda5b03525285f03be7723376b (diff)
downloadtinycc-92024ab07ad8e1c4a05f90add3d3ca7932251016.tar.gz
tinycc-92024ab07ad8e1c4a05f90add3d3ca7932251016.tar.bz2
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 0d598aca087e46ea67f97dda50df3eed522d5e7a. I don't remember what the problem was but it was the wrong way to fix it.
Diffstat (limited to 'tccelf.c')
-rw-r--r--tccelf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tccelf.c b/tccelf.c
index 4b8c9a0..cba47b1 100644
--- a/tccelf.c
+++ b/tccelf.c
@@ -2178,7 +2178,7 @@ static int elf_output_file(TCCState *s1, const char *filename)
/* XXX: ignore sections with allocated relocations ? */
for(i = 1; i < s1->nb_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);
}