Fix the build

This commit is contained in:
Justine Tunney 2023-07-11 05:48:39 -07:00
parent 1ee2e89326
commit 18536950b3
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
8 changed files with 212 additions and 42 deletions

View file

@ -450,8 +450,8 @@ static void LoadSymbols(struct Package *pkg, uint32_t object) {
}
}
static Elf64_Shdr *FindElfSectionByName(Elf64_Ehdr *elf, size_t esize,
const char *name) {
static Elf64_Shdr *FindElfSection(Elf64_Ehdr *elf, size_t esize,
const char *name) {
long i;
Elf64_Shdr *shdr;
const char *secname;
@ -472,7 +472,7 @@ static void LoadPriviligedRefsToUndefs(struct Package *pkg,
const char *s;
Elf64_Shdr *shdr;
Elf64_Rela *rela, *erela;
if ((shdr = FindElfSectionByName(obj->elf, obj->size, ".rela.privileged"))) {
if ((shdr = FindElfSection(obj->elf, obj->size, ".rela.privileged"))) {
if (!(rela = GetElfSectionAddress(obj->elf, obj->size, shdr))) {
Die("error", "elf overflow");
}