mirror of
https://github.com/mirror/tinycc.git
synced 2025-02-04 06:30:10 +08:00
riscv64 relocation fix
This commit is contained in:
parent
baacb0f52a
commit
72250bece2
5
tccelf.c
5
tccelf.c
@ -2133,6 +2133,9 @@ static int final_sections_reloc(TCCState *s1)
|
||||
if (s1->nb_errors != 0)
|
||||
return -1;
|
||||
|
||||
/* Some targets use static data between relocations (riscv64) */
|
||||
tcc_enter_state (s1);
|
||||
|
||||
/* relocate sections */
|
||||
/* XXX: ignore sections with allocated relocations ? */
|
||||
for(i = 1; i < s1->nb_sections; i++) {
|
||||
@ -2141,6 +2144,8 @@ static int final_sections_reloc(TCCState *s1)
|
||||
relocate_section(s1, s);
|
||||
}
|
||||
|
||||
tcc_exit_state();
|
||||
|
||||
/* relocate relocation entries if the relocation tables are
|
||||
allocated in the executable */
|
||||
for(i = 1; i < s1->nb_sections; i++) {
|
||||
|
Loading…
Reference in New Issue
Block a user