Agent libraries need to be searched for JNI functions

This makes agent libraries the option of last resort for native
method implementations. This will allow one to not need to manually
link all native methods in an agent library.

Bug: 37522517
Bug: 37432636
Test: ./test.py --host -j40
Change-Id: I5ad78a15e7e2799d2a877c5d603342899e2a1bd1
diff --git a/runtime/ti/agent.h b/runtime/ti/agent.h
index 7408aee..b5ecba1 100644
--- a/runtime/ti/agent.h
+++ b/runtime/ti/agent.h
@@ -29,8 +29,14 @@
 using AgentOnLoadFunction = jint (*)(JavaVM*, const char*, void*);
 using AgentOnUnloadFunction = void (*)(JavaVM*);
 
+// Agents are native libraries that will be loaded by the runtime for the purpose of
+// instrumentation. They will be entered by Agent_OnLoad or Agent_OnAttach depending on whether the
+// agent is being attached during runtime startup or later.
+//
+// The agent's Agent_OnUnload function will be called during runtime shutdown.
+//
 // TODO: consider splitting ti::Agent into command line, agent and shared library handler classes
-
+// TODO Support native-bridge. Currently agents can only be the actual runtime ISA of the device.
 class Agent {
  public:
   enum LoadError {
@@ -56,6 +62,8 @@
     return !GetArgs().empty();
   }
 
+  void* FindSymbol(const std::string& name) const;
+
   LoadError Load(/*out*/jint* call_res, /*out*/std::string* error_msg) {
     VLOG(agents) << "Loading agent: " << name_ << " " << args_;
     return DoLoadHelper(false, call_res, error_msg);