Closed nickdesaulniers closed 1 year ago
@llvm/issue-subscribers-backend-aarch64
@llvm/issue-subscribers-lld-elf
https://maskray.me/blog/2021-08-29-all-about-global-offset-table#got-optimization ld64 uses .loh
to perform GOT optimizations. To some degree it is a mechanism to lift the relocation type size limitation of Mach-O. ELF platforms supports more relocation types and don't need a separate metadata section.
I noticed that clang on macos is emitting
.loh
assembler directives. I couldn't find much documentation on these, but it seems there's some logic implemented in llvm/include/llvm/MC/MCLinkerOptimizationHint.h.It looks like the linker is able to fold:
I don't understand what
#36
is. Is that some kind of slot that the loader will relocate?llvm-objdump -dr
andotool -tVr
don't show any kind of specifial relocations for these.cc @TNorthover @MaskRay @smithp35