Linking
According to the JVM Specification, the linking is resolving the references of the loaded class, so the methods of the class can be executed.
Although JVM can reasonably expect that the .class file was produced by the Java compiler and all the instructions satisfy the constraints and requirements of the language, there is no guarantee that the loaded file was produced by the known compiler implementation or a compiler at all. That is why the first step of the linking process is verification, which makes sure that the binary representation of the class is structurally correct: that the arguments of each method invocation are compatible with the method descriptor, that the return instruction matches its method's return type, and so ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access