Unified · Split
| @@ -2541,7 +2541,7 @@ static void elf_patch_global_offset_size(TCCState *s1, Section *s) · 2540 unmodified lines | |||
| 2541 | { | 2541 | { |
| 2542 | int sym_index; | 2542 | int sym_index; |
| 2543 | 2543 | ||
| 2544 | if ((sym_index = find_elf_sym(s, "_GLOBAL_OFFSET_TABLE_"))) | 2544 | if (s && (sym_index = find_elf_sym(s, "_GLOBAL_OFFSET_TABLE_"))) |
| 2545 | ((ElfW(Sym) *)s->data)[sym_index].st_size = s1->got->data_offset; | 2545 | ((ElfW(Sym) *)s->data)[sym_index].st_size = s1->got->data_offset; |
| 2546 | } | 2546 | } |
| 2547 | 2547 | ||