[ELF,SPARC] Add the GOT header entry and place R_SPARC_JMP_SLOT in .plt (#212161)
SPARC dynamic linker finds _DYNAMIC by dereferencing the GOT pointer
register (glibc elf_machine_dynamic), so reserve .got[0] for it. It
resolves a PLT entry by rewriting the entry's instructions (glibc
sparc64_fixup_plt), so R_SPARC_JMP_SLOT applies to .plt and there is no
.got.plt.
Add TargetInfo::usesGotPlt, which SPARC sets to false, and use it to
place the relocation and derive the sh_info of .rela.plt. The four
reserved PLT entries stay zeroed, as with GNU ld; the dynamic linker
fills in .PLT0 and .PLT1 at startup.
Co-authored-by: Kirill A. Korinsky <kirill at korins.ky>
Co-authored-by: LemonBoy <thatlemon at gmail.com>
[clangd] Respect ArgumentLists for struct templates (#212094)
Also fix a bug in index::getSymbolKind where the returned symbol kind
would be Class for a struct template.
Fixes https://github.com/clangd/clangd/issues/2684
[LoongArch] Simplify addReloc relocation handling. NFC (#211755)
Remove the unused return value of addReloc and simplify the control
flow for linker relaxation and PC-relative relocation handling.