History

Add shstrtab name in tccelf.c

Last commit removed shstrtab which make gdb/readelf unhappy.

herman ten brugge committed 5 years ago

Commit 56f74f21 parent 62c0c4c1 file · +1 −1Browse files

Unified · Split

tccelf.c+1−1
@@ -2723,7 +2723,7 @@ static void alloc_sec_names(TCCState *s1, int is_obj) · 2722 unmodified lines
27232723 s = s1->sections[i];
27242724 if (is_obj)
27252725 s->sh_size = s->data_offset;
2726− if (s->sh_size || (s->sh_flags & SHF_ALLOC))
2726+ if (s == strsec || s->sh_size || (s->sh_flags & SHF_ALLOC))
27272727 s->sh_name = put_elf_str(strsec, s->name);
27282728 }
27292729 strsec->sh_size = strsec->data_offset;

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