Relocations to undefined weak symbols are unspecified. In practice, on
most targets, linkers resolve absolute relocations to 0. Such
relocations can be generated by -fno-pic code to take addresses.
The behaviors of PC-relative relocations have varying behaviors among
targets. We simply assume that compilers cannot generate PC-relative
relocations to undefined symbols and resolve the relocations arbitrarily
to p+a. AArch64, ARM and PPC32 do similar things so that the relocation cannot overflow.
R_RISCV_CALL (which should be obsoleted) and R_RISCV_CALL_PLT to
undefined weak symbols, if executed, are considered undefined behaviors.
So we can resolve them arbitrarily. Such relocations resolve to a PLT
entry (preemptible) or p+a like R_PC (non-preemptible).