Validate defined versions in prelink_image
Validate the list of defined versions explicitly, during library
prelinking, rather than implicitly as part of constructing the
VersionTracker in soinfo::link_image.
Doing the validation upfront allows removing the symbol lookup failure
code paths, which only happen on a library with invalid version
information.
Helps on the walleye 64-bit linker relocation benchmark (146.2ms ->
131.6ms)
Bug: none
Test: bionic unit tests
Change-Id: Id17508aba3af2863909f0526897c4277419322b7
diff --git a/linker/linker.h b/linker/linker.h
index 789640c..16c65a1 100644
--- a/linker/linker.h
+++ b/linker/linker.h
@@ -204,3 +204,5 @@
size_t reserved_size = 0;
bool must_use_address = false;
};
+
+ElfW(Versym) find_verdef_version_index(const soinfo* si, const version_info* vi);