aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorseyko <seyko2@gmail.com>2015-03-03 14:39:27 +0300
committerseyko <seyko2@gmail.com>2015-03-03 14:39:27 +0300
commit09d4e4f408387fa897a9c5d28ef4e50969574da6 (patch)
treea79611eece59f259a63491db745dba844c32ecf1
parent252a151fc6b701b23745d1d076e10a6fa465ed84 (diff)
downloadtinycc-09d4e4f408387fa897a9c5d28ef4e50969574da6.tar.gz
tinycc-09d4e4f408387fa897a9c5d28ef4e50969574da6.tar.bz2
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.
-rw-r--r--tccelf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tccelf.c b/tccelf.c
index 2b07f60..419a0e1 100644
--- a/tccelf.c
+++ b/tccelf.c
@@ -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);
}