diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2019-04-21 04:11:43 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2019-04-21 04:11:43 +0000 |
commit | ba1873ca791ec6212fbfc1c06e9b8628466b1e57 (patch) | |
tree | 94667e9a3becbb0a8dc0d2208e043973d3e6c3fb /libexec | |
parent | 71b3650713950a82f5bc9fff2ab1a4a76d8ff81f (diff) |
Now that all Elf_foo types are correct, we don't need to use Elf32_Word
anywhere and can use Elf_Word instead.
ok guenther
Diffstat (limited to 'libexec')
-rw-r--r-- | libexec/ld.so/resolve.c | 18 | ||||
-rw-r--r-- | libexec/ld.so/resolve.h | 12 |
2 files changed, 15 insertions, 15 deletions
diff --git a/libexec/ld.so/resolve.c b/libexec/ld.so/resolve.c index 97df474a04e..26bde40ac7e 100644 --- a/libexec/ld.so/resolve.c +++ b/libexec/ld.so/resolve.c @@ -1,4 +1,4 @@ -/* $OpenBSD: resolve.c,v 1.88 2019/04/21 03:41:13 guenther Exp $ */ +/* $OpenBSD: resolve.c,v 1.89 2019/04/21 04:11:42 deraadt Exp $ */ /* * Copyright (c) 1998 Per Fogelstrom, Opsycon AB @@ -361,13 +361,13 @@ _dl_finalize_object(const char *objname, Elf_Dyn *dynp, Elf_Phdr *phdrp, object->Dyn.info[DT_PREINIT_ARRAY] += obase; if (gnu_hash) { - Elf32_Word *hashtab = (Elf32_Word *)(gnu_hash + obase); - Elf32_Word nbuckets = hashtab[0]; - Elf32_Word nmaskwords = hashtab[2]; + Elf_Word *hashtab = (Elf_Word *)(gnu_hash + obase); + Elf_Word nbuckets = hashtab[0]; + Elf_Word nmaskwords = hashtab[2]; /* validity check */ if (nbuckets > 0 && (nmaskwords & (nmaskwords - 1)) == 0) { - Elf32_Word symndx = hashtab[1]; + Elf_Word symndx = hashtab[1]; int bloom_size32 = (ELFSIZE / 32) * nmaskwords; object->nbuckets = nbuckets; @@ -385,11 +385,11 @@ _dl_finalize_object(const char *objname, Elf_Dyn *dynp, Elf_Phdr *phdrp, * the entries in the GNU hash chain. */ if (object->Dyn.info[DT_HASH] == 0) { - Elf32_Word n; + Elf_Word n; for (n = 0; n < nbuckets; n++) { Elf_Word bkt = object->buckets_gnu[n]; - const Elf32_Word *hashval; + const Elf_Word *hashval; if (bkt == 0) continue; hashval = &object->chains_gnu[bkt]; @@ -633,8 +633,8 @@ _dl_find_symbol_obj(elf_object_t *obj, struct symlookup *sl) Elf_Addr bloom_word; unsigned int h1; unsigned int h2; - Elf32_Word bucket; - const Elf32_Word *hashval; + Elf_Word bucket; + const Elf_Word *hashval; /* pick right bitmask word from Bloom filter array */ bloom_word = obj->bloom_gnu[(hash / ELFSIZE) & diff --git a/libexec/ld.so/resolve.h b/libexec/ld.so/resolve.h index 9a5f0c66b59..6a87eb538cd 100644 --- a/libexec/ld.so/resolve.h +++ b/libexec/ld.so/resolve.h @@ -1,4 +1,4 @@ -/* $OpenBSD: resolve.h,v 1.89 2019/04/21 03:41:13 guenther Exp $ */ +/* $OpenBSD: resolve.h,v 1.90 2019/04/21 04:11:42 deraadt Exp $ */ /* * Copyright (c) 1998 Per Fogelstrom, Opsycon AB @@ -149,12 +149,12 @@ struct elf_object { } u_elf; struct { /* specific to GNU hash */ - const Elf32_Word *buckets; - const Elf32_Word *chains; + const Elf_Word *buckets; + const Elf_Word *chains; const Elf_Addr *bloom; - Elf32_Word mask_bm; - Elf32_Word shift2; - Elf32_Word symndx; + Elf_Word mask_bm; + Elf_Word shift2; + Elf_Word symndx; } u_gnu; } hash_u; #define buckets_elf hash_u.u_elf.buckets |