Last commit removed shstrtab which make gdb/readelf unhappy.
Unified · Split
| @@ -2723,7 +2723,7 @@ static void alloc_sec_names(TCCState *s1, int is_obj) · 2722 unmodified lines | |||
| 2723 | s = s1->sections[i]; | 2723 | s = s1->sections[i]; |
| 2724 | if (is_obj) | 2724 | if (is_obj) |
| 2725 | s->sh_size = s->data_offset; | 2725 | 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)) |
| 2727 | s->sh_name = put_elf_str(strsec, s->name); | 2727 | s->sh_name = put_elf_str(strsec, s->name); |
| 2728 | } | 2728 | } |
| 2729 | strsec->sh_size = strsec->data_offset; | 2729 | strsec->sh_size = strsec->data_offset; |