For a target symbol defined in the same section, currently we don't emit a
relocation (with few exceptions like RISC-V relaxation), while GNU as emits
one. This can break symbol interposition if the assembly is used by a shared
object.
.globl foo foo: call foo # on various targets, may be b foo, etc
ARM/thumb2-beq-fixup.s: we now emit a relocation to global_thumb_fn as GNU as does.
X86/Inputs/align-branch-64-2.s: we now emit R_X86_64_PLT32 to foo as GNU does.
ELF/relax.s: rewrite the test as target-in-same-section.s .
We omitted relocations to global and now emit R_X86_64_PLT32.
Note, GNU as does not emit a relocation for jmp global (maybe its own
bug). Our new behavior is compatible except jmp global.