Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F145856246
D1724.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D1724.diff
View Options
Index: libexec/rtld-elf/rtld.c
===================================================================
--- libexec/rtld-elf/rtld.c
+++ libexec/rtld-elf/rtld.c
@@ -876,7 +876,6 @@
const Elf32_Word *hashval;
Elf32_Word bkt, nmaskwords;
int bloom_size32;
- bool nmw_power2;
int plttype = DT_REL;
*dyn_rpath = NULL;
@@ -986,16 +985,15 @@
obj->symndx_gnu = hashtab[1];
nmaskwords = hashtab[2];
bloom_size32 = (__ELF_WORD_SIZE / 32) * nmaskwords;
- /* Number of bitmask words is required to be power of 2 */
- nmw_power2 = ((nmaskwords & (nmaskwords - 1)) == 0);
obj->maskwords_bm_gnu = nmaskwords - 1;
obj->shift2_gnu = hashtab[3];
obj->bloom_gnu = (Elf_Addr *) (hashtab + 4);
obj->buckets_gnu = hashtab + 4 + bloom_size32;
obj->chain_zero_gnu = obj->buckets_gnu + obj->nbuckets_gnu -
obj->symndx_gnu;
- obj->valid_hash_gnu = nmw_power2 && obj->nbuckets_gnu > 0 &&
- obj->buckets_gnu != NULL;
+ /* Number of bitmask words is required to be power of 2 */
+ obj->valid_hash_gnu = powerof2(nmaskwords) &&
+ obj->nbuckets_gnu > 0 && obj->buckets_gnu != NULL;
}
break;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Feb 26, 7:00 AM (3 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29001986
Default Alt Text
D1724.diff (1 KB)
Attached To
Mode
D1724: rtld-elf should use powerof2() (PR 192238)
Attached
Detach File
Event Timeline
Log In to Comment