The NativeSymbol class is not that useful, and it is hard to explain what it does. It is currently used in three places:
* As a parameter type, in CLinker::downcallHandle (the entry point of the native function to be invoked)
* As a return type in CLinker::upcallStub
* As a return type in CLinker::lookup/ClassLoader::findNative
Now, in all these cases there are valid (if not superior) alternatives: in parameter position we can replace NativeSymbol with Addresable, and actually gain in expressiveness (as we can just pass raw MemoryAddress, if we happen to have one); in return position we can return a zero-length segment. Support for zero-length segment was made more uniform inJDK-8280460.
* As a parameter type, in CLinker::downcallHandle (the entry point of the native function to be invoked)
* As a return type in CLinker::upcallStub
* As a return type in CLinker::lookup/ClassLoader::findNative
Now, in all these cases there are valid (if not superior) alternatives: in parameter position we can replace NativeSymbol with Addresable, and actually gain in expressiveness (as we can just pass raw MemoryAddress, if we happen to have one); in return position we can return a zero-length segment. Support for zero-length segment was made more uniform in