Skip to content

Commit

Permalink
[tools] elf2elks: fix: forgot to write data seg. reloc. count
Browse files Browse the repository at this point in the history
in a.out header

Should fix tkchia/gcc-ia16#117 .
  • Loading branch information
tkchia committed Jul 11, 2022
1 parent 077d2f3 commit e69a8db
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions elks/tools/elf2elks/elf2elks.c
Original file line number Diff line number Diff line change
Expand Up @@ -654,6 +654,7 @@ output_header (void)
{
mh.hlen = sizeof mh + sizeof esuph1 + sizeof esuph2;
esuph1.trsize = (uint32_t) text_n_rels * sizeof (struct minix_reloc);
esuph1.drsize = (uint32_t) data_n_rels * sizeof (struct minix_reloc);
esuph2.ftseg = ftext_sh->sh_size;
esuph2.ftrsize = (uint32_t) ftext_n_rels * sizeof (struct minix_reloc);
output (&mh, sizeof mh);
Expand All @@ -664,6 +665,7 @@ output_header (void)
{
mh.hlen = sizeof mh + sizeof esuph1;
esuph1.trsize = (uint32_t) text_n_rels * sizeof (struct minix_reloc);
esuph1.drsize = (uint32_t) data_n_rels * sizeof (struct minix_reloc);
output (&mh, sizeof mh);
output (&esuph1, sizeof esuph1);
}
Expand Down

0 comments on commit e69a8db

Please sign in to comment.