Skip to content

Commit

Permalink
Include config
Browse files Browse the repository at this point in the history
  • Loading branch information
tyfkda committed Apr 26, 2024
1 parent 0f6702a commit e66db13
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/ld/ld.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#include "../config.h"

#include <ar.h>
#include <assert.h>
#include <fcntl.h>
Expand Down
6 changes: 3 additions & 3 deletions src/util/elfutil.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@ void out_elf_header(FILE *fp, uintptr_t entry, int phnum, int shnum, int flags)
.e_shoff = 0, // dummy
.e_flags = flags,
.e_ehsize = sizeof(Elf64_Ehdr),
.e_phentsize = phnum > 0 ? sizeof(Elf64_Phdr) : 0,
.e_phentsize = sizeof(Elf64_Phdr),
.e_phnum = phnum,
.e_shentsize = shnum > 0 ? sizeof(Elf64_Shdr) : 0,
.e_shentsize = sizeof(Elf64_Shdr),
.e_shnum = shnum,
.e_shstrndx = shnum > 0 ? shnum - 1 : 0,
.e_shstrndx = shnum > 0 ? shnum - 1 : SHN_UNDEF,
};

fwrite(&ehdr, sizeof(Elf64_Ehdr), 1, fp);
Expand Down

0 comments on commit e66db13

Please sign in to comment.