History

Fix core dump in case -static is used

herman ten brugge committed 4 years ago

Commit afc13621 parent a4e0f7e1 file · +1 −1Browse files

Unified · Split

tccelf.c+1−1
@@ -2541,7 +2541,7 @@ static void elf_patch_global_offset_size(TCCState *s1, Section *s) · 2540 unmodified lines
25412541 {
25422542 int sym_index;
25432543
2544− if ((sym_index = find_elf_sym(s, "_GLOBAL_OFFSET_TABLE_")))
2544+ if (s && (sym_index = find_elf_sym(s, "_GLOBAL_OFFSET_TABLE_")))
25452545 ((ElfW(Sym) *)s->data)[sym_index].st_size = s1->got->data_offset;
25462546 }
25472547

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t