diff options
| author | seyko <seyko2@gmail.com> | 2015-03-10 14:21:14 +0300 |
|---|---|---|
| committer | seyko <seyko2@gmail.com> | 2015-03-10 14:21:14 +0300 |
| commit | 4ba7e5dc5a7dcc91b8c02132c2304be0b6a8e5b4 (patch) | |
| tree | 7f3466869c4383b9ea792d10ef31bfe79f04adcc /tccelf.c | |
| parent | 896a0c881ac350ba9f7fbeeef8f75b7d1ec0510e (diff) | |
| download | tinycc-4ba7e5dc5a7dcc91b8c02132c2304be0b6a8e5b4.tar.gz tinycc-4ba7e5dc5a7dcc91b8c02132c2304be0b6a8e5b4.tar.bz2 | |
A correction for the commit: revert a grischka patch: gdb refused to know "main"
keep revert (check SHF_ALLOC) only for x86 target and keep a grishka patch for
other targets
Diffstat (limited to 'tccelf.c')
| -rw-r--r-- | tccelf.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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); } |
