Fix relocation of got table.
This commit is contained in:
parent
900be40e8b
commit
f636cf3d48
5
tccelf.c
5
tccelf.c
|
@ -1844,7 +1844,7 @@ static int final_sections_reloc(TCCState *s1)
|
|||
/* 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)
|
||||
if (s->reloc)
|
||||
/* On X86_64 gdb 7.3 will crash if SHF_ALLOC checking is present */
|
||||
#endif
|
||||
relocate_section(s1, s);
|
||||
|
@ -2226,8 +2226,7 @@ static int elf_output_file(TCCState *s1, const char *filename)
|
|||
}
|
||||
}
|
||||
|
||||
/* if building executable or DLL, then relocate each section
|
||||
except the GOT which is already relocated */
|
||||
/* if building executable or DLL, then relocate each section */
|
||||
if (file_type != TCC_OUTPUT_OBJ) {
|
||||
ret = final_sections_reloc(s1);
|
||||
if (ret)
|
||||
|
|
Loading…
Reference in New Issue