Skip to content

Commit

Permalink
Fix last commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
hermantb committed Oct 20, 2024
1 parent 5a467dd commit d7f9166
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tccelf.c
Original file line number Diff line number Diff line change
Expand Up @@ -2527,8 +2527,6 @@ static int tcc_output_elf(TCCState *s1, FILE *f, int phnum, ElfW(Phdr) *phdr)
ElfW(Ehdr) ehdr;
ElfW(Shdr) shdr, *sh;

sort_syms(s1, s1->symtab);

file_type = s1->output_type;
shnum = s1->nb_sections;

Expand Down Expand Up @@ -2578,6 +2576,8 @@ static int tcc_output_elf(TCCState *s1, FILE *f, int phnum, ElfW(Phdr) *phdr)
return -1;
}

sort_syms(s1, s1->symtab);

ehdr.e_machine = EM_TCC_TARGET;
ehdr.e_version = EV_CURRENT;
ehdr.e_shoff = (sizeof(ElfW(Ehdr)) + phnum * sizeof(ElfW(Phdr)) + 3) & -4;
Expand Down

0 comments on commit d7f9166

Please sign in to comment.