Skip to content

Commit

Permalink
kldxref: fix build on 32 bits arches
Browse files Browse the repository at this point in the history
  • Loading branch information
bapt committed Dec 13, 2023
1 parent 92aa071 commit 9753089
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions usr.sbin/kldxref/ef.h
Original file line number Diff line number Diff line change
Expand Up @@ -218,15 +218,15 @@ int elf_read_shdrs(struct elf_file *efile, size_t *nshdrp,
* Read the dynamic table from a section of an ELF file into a
* dynamically-allocated array of GElf_Dyn objects.
*/
int elf_read_dynamic(struct elf_file *efile, int section_index, long *ndynp,
int elf_read_dynamic(struct elf_file *efile, int section_index, size_t *ndynp,
GElf_Dyn **dynp);

/*
* Read a symbol table from a section of an ELF file into a
* dynamically-allocated array of GElf_Sym objects.
*/
int elf_read_symbols(struct elf_file *efile, int section_index,
long *nsymp, GElf_Sym **symp);
size_t *nsymp, GElf_Sym **symp);

/*
* Read a string table described by a section header of an ELF file
Expand Down
4 changes: 2 additions & 2 deletions usr.sbin/kldxref/ef_obj.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ struct ef_file {
int nrel;

GElf_Sym *ddbsymtab; /* The symbol table we are using */
long ddbsymcnt; /* Number of symbols */
size_t ddbsymcnt; /* Number of symbols */
caddr_t ddbstrtab; /* String table */
long ddbstrcnt; /* number of bytes in string table */

Expand Down Expand Up @@ -155,7 +155,7 @@ ef_obj_symaddr(elf_file_t ef, GElf_Size symidx)
{
const GElf_Sym *sym;

if (symidx >= (size_t)ef->ddbsymcnt)
if (symidx >= ef->ddbsymcnt)
return (0);
sym = ef->ddbsymtab + symidx;

Expand Down
6 changes: 3 additions & 3 deletions usr.sbin/kldxref/elf.c
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ elf_read_shdrs(struct elf_file *efile, size_t *nshdrp, GElf_Shdr **shdrp)
}

int
elf_read_dynamic(struct elf_file *efile, int section_index, long *ndynp,
elf_read_dynamic(struct elf_file *efile, int section_index, size_t *ndynp,
GElf_Dyn **dynp)
{
GElf_Shdr shdr;
Expand Down Expand Up @@ -365,14 +365,14 @@ elf_read_dynamic(struct elf_file *efile, int section_index, long *ndynp,
}

int
elf_read_symbols(struct elf_file *efile, int section_index, long *nsymp,
elf_read_symbols(struct elf_file *efile, int section_index, size_t *nsymp,
GElf_Sym **symp)
{
GElf_Shdr shdr;
Elf_Scn *scn;
Elf_Data *data;
GElf_Sym *sym;
long i, nsym;
size_t i, nsym;

scn = elf_getscn(efile->ef_elf, section_index);
if (scn == NULL)
Expand Down

0 comments on commit 9753089

Please sign in to comment.