mirror of
git://repo.or.cz/tinycc.git
synced 2026-07-06 03:18:41 +08:00
Add shstrtab name in tccelf.c
Last commit removed shstrtab which make gdb/readelf unhappy.
This commit is contained in:
parent
62c0c4c77a
commit
56f74f2eeb
2
tccelf.c
2
tccelf.c
@ -2723,7 +2723,7 @@ static void alloc_sec_names(TCCState *s1, int is_obj)
|
|||||||
s = s1->sections[i];
|
s = s1->sections[i];
|
||||||
if (is_obj)
|
if (is_obj)
|
||||||
s->sh_size = s->data_offset;
|
s->sh_size = s->data_offset;
|
||||||
if (s->sh_size || (s->sh_flags & SHF_ALLOC))
|
if (s == strsec || s->sh_size || (s->sh_flags & SHF_ALLOC))
|
||||||
s->sh_name = put_elf_str(strsec, s->name);
|
s->sh_name = put_elf_str(strsec, s->name);
|
||||||
}
|
}
|
||||||
strsec->sh_size = strsec->data_offset;
|
strsec->sh_size = strsec->data_offset;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user