Unified · Split
| @@ -10353,6 +10353,11 @@ int tcc_relocate(TCCState *s1, void *ptr) · 10352 unmodified lines | ||
| 10353 | 10353 | offset = (offset + length + 15) & ~15; |
| 10354 | 10354 | } |
| 10355 | 10355 | |
| 10356 | + /* relocate symbols */ | |
| 10357 | + relocate_syms(s1, 1); | |
| 10358 | + if (s1->nb_errors) | |
| 10359 | + return -1; | |
| 10360 | + | |
| 10356 | 10361 | #ifdef TCC_TARGET_X86_64 |
| 10357 | 10362 | s1->runtime_plt_and_got_offset = 0; |
| 10358 | 10363 | s1->runtime_plt_and_got = (char *)(mem + offset); |
| @@ -10364,11 +10369,6 @@ int tcc_relocate(TCCState *s1, void *ptr) · 5 unmodified lines | ||
| 10364 | 10369 | if (0 == mem) |
| 10365 | 10370 | return offset + 15; |
| 10366 | 10371 | |
| 10367 | − /* relocate symbols */ | |
| 10368 | − relocate_syms(s1, 1); | |
| 10369 | − if (s1->nb_errors) | |
| 10370 | − return -1; | |
| 10371 | − | |
| 10372 | 10372 | /* relocate each section */ |
| 10373 | 10373 | for(i = 1; i < s1->nb_sections; i++) { |
| 10374 | 10374 | s = s1->sections[i]; |