We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 427b624 commit 222f222Copy full SHA for 222f222
src/ELF/ELFVersion.jl
@@ -24,6 +24,14 @@ end
24
vn_next::UInt32
25
end
26
27
+@io struct ELFVernAux{H <: ELFHandle}
28
+ vna_hash::UInt32
29
+ vna_flags::UInt16
30
+ vna_other::UInt16
31
+ vna_name::UInt32
32
+ vna_next::UInt32
33
+end
34
+
35
struct ELFVersionEntry{H <: ELFHandle}
36
ver_def::ELFVerDef{H}
37
names::Vector{String}
@@ -62,4 +70,20 @@ function ELFVersionData(oh::H) where {H <: ELFHandle}
62
70
63
71
64
72
return version_defs
65
-end
73
74
75
+"""
76
+Hash function used to create vd_hash from vda_name, or vna_hash from vna_name
77
78
+function ELFHash(v::Vector{UInt8})
79
+ h = UInt32(0)
80
+ for b in v
81
+ h = (h << 4) + b
82
+ hi = h & 0xf0000000
83
+ if (hi != 0)
84
+ h ⊻= (hi >> 24)
85
+ end
86
+ h &= ~hi
87
88
+ return h
89
0 commit comments