In the ABI for the 64-bit Arm architecture the section on weak references states:
During linking, the symbol value of an undefined weak reference is:
- Zero if the relocation type is absolute
- The address of the place if the relocation type is pc-relative.The relocations associated with an ADRP are relative so we should resolve the undefined weak reference to the place instead of 0. This matches GNU ld.bfd behaviour.
fixes pr34928 (https://bugs.llvm.org/show_bug.cgi?id=34928)