Make kldxref work for Elf64 (which has 32 bit hash tables)

This commit is contained in:
Peter Wemm 2002-04-11 09:30:15 +00:00
parent 2aa6b97298
commit f23aa297ee
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=94414
2 changed files with 7 additions and 7 deletions

View File

@ -148,7 +148,7 @@ int
ef_parse_dynamic(elf_file_t ef)
{
Elf_Dyn *dp;
Elf_Off hashhdr[2];
Elf_Hashelt hashhdr[2];
/* int plttype = DT_REL;*/
int error;
@ -165,7 +165,7 @@ ef_parse_dynamic(elf_file_t ef)
ef->ef_nbuckets = hashhdr[0];
ef->ef_nchains = hashhdr[1];
error = ef_read_entry(ef, -1,
(hashhdr[0] + hashhdr[1]) * sizeof(Elf_Off),
(hashhdr[0] + hashhdr[1]) * sizeof(Elf_Hashelt),
(void**)&ef->ef_hashtab);
if (error) {
warnx("can't read hash table");

View File

@ -15,11 +15,11 @@ typedef struct elf_file {
void* ef_fpage; /* First block of the file */
int ef_fplen; /* length of first block */
Elf_Dyn* ef_dyn; /* Symbol table etc. */
Elf_Off ef_nbuckets;
Elf_Off ef_nchains;
Elf_Off* ef_buckets;
Elf_Off* ef_chains;
Elf_Off* ef_hashtab;
Elf_Hashelt ef_nbuckets;
Elf_Hashelt ef_nchains;
Elf_Hashelt* ef_buckets;
Elf_Hashelt* ef_chains;
Elf_Hashelt* ef_hashtab;
Elf_Off ef_stroff;
caddr_t ef_strtab;
int ef_strsz;