[llvm] [X86][MC] Support R_X86_64_CODE_4_GOTPC32_TLSDESC (PR #116908)
Shengchen Kan via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 20 04:31:14 PST 2024
================
@@ -191,6 +191,8 @@ static unsigned getRelocType64(MCContext &Ctx, SMLoc Loc,
case MCSymbolRefExpr::VK_TLSCALL:
return ELF::R_X86_64_TLSDESC_CALL;
case MCSymbolRefExpr::VK_TLSDESC:
+ if ((unsigned)Kind == X86::reloc_riprel_4byte_relax_rex2)
+ return ELF::R_X86_64_CODE_4_GOTPC32_TLSDESC;
return ELF::R_X86_64_GOTPC32_TLSDESC;
----------------
KanRobert wrote:
Use condition operator?
https://github.com/llvm/llvm-project/pull/116908
More information about the llvm-commits
mailing list