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
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

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