Resolve relative relocations in partial link Resolve relative relocations in partial link linux linux

Resolve relative relocations in partial link


Per this reference it looks like the reason that the relative symbols are not resolved is to give the linked more flexibility. If we wanted to instead resolve the symbol g to a different address, we would need to change those jumps in the code.

However, if you change your symbol g to be static, then the linker will resolve the jumps. In that case, the symbol is no longer exported and thus not manipulable by future linker calls.