Javadoc
Record (in a format-specific way) that data at the given offset in the file, for the
given number of bytes, should be fixed up according to the value of the given symbol and
the given kind of relocation.
Depending on the object file format, kind of file, and target architecture, the available
kinds of relocation and addend modes all vary considerably. Supporting a uniform
interface is therefore complicated. In particular, the implementation of these methods
somehow has to tell the caller how to fix up the section content, or fix it up itself.
For example, ELF uses explicit addends for dynamic linking on x86-64, but Mach-O in the
same case always uses implicit (inline) addends and cannot encode explicit addends. I can
see two solutions. Firstly, the Mach-O implementation could come back to the caller
saying "here is what you need to add to the current section contents". Or secondly, the
section implementation could take care of it somehow, but that assumes it has access to
the actual contents s.t. any changes will not later be clobbered. TODO: CHECK whether
this is true of our native native image code.