[llvm-dev] invalid symbol kind for ADRP relocation

Peter Smith via llvm-dev llvm-dev at lists.llvm.org
Wed Nov 18 06:16:28 PST 2020


That particular failure will be coming from the MC layer. Certain symbols have kinds such as VK_GOT, the ELF object writer in AArch64ELFObjectWriter.cpp has encountered a kind that it doesn't understand when trying to resolve a relocation.

I'm not sure what to say beyond that besides tracing through to find out what kind the symbol is being given and why? One potential problem is the triple "arm64-apple-macosx11.0.1-elf". As I understand it MacOS uses MachO objects and not ELF. I don't think that combination is supported or tested. It is possible that there is a MachO specific symbol kind that the ELF backend is not expecting.

Peter

________________________________________
From: llvm-dev <llvm-dev-bounces at lists.llvm.org> on behalf of Carlo Kok via llvm-dev <llvm-dev at lists.llvm.org>
Sent: 18 November 2020 13:38
To: llvm-dev
Subject: [llvm-dev] invalid symbol kind for ADRP relocation

hi,

does anyone know how to resolve this? It's a very simple IR file (below), fails with:

LLVM ERROR: invalid symbol kind for ADRP relocation

PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace.
Stack dump:
0.      Program arguments: \p\llvm-project-bin32\RelWithDebInfo\bin\llc.exe -O0 debug_output(1).ll -filetype=obj
 #0 0x01522349 (C:\p\llvm-project-bin32\RelWithDebInfo\bin\llc.exe+0x1272349)
 #1 0x019bb8fc (C:\p\llvm-project-bin32\RelWithDebInfo\bin\llc.exe+0x170b8fc)

I have no idea where to even start looking, but it seems related to the store.

; ModuleID = '$debug$'
source_filename = "$debug$"
target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
target triple = "arm64-apple-macosx11.0.1-elf"


define void @"$$debug_evaluation_helper"(i8* %0) {
BasicBlock3:
  %1 = alloca void (i8*, void (i8*)*, void (i8*, i8*)*)*
  store void (i8*, void (i8*)*, void (i8*, i8*)*)* @"$$__island_debug_invoke", void (i8*, void (i8*)*, void (i8*, i8*)*)** %1
  %2 = load void (i8*, void (i8*)*, void (i8*, i8*)*)*, void (i8*, void (i8*)*, void (i8*, i8*)*)** %1
  unreachable
}
declare void @"$$__island_debug_invoke"(i8* %0, void (i8*)* %1, void (i8*, i8*)* %2)

attributes #0 = { nounwind }
_______________________________________________
LLVM Developers mailing list
llvm-dev at lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev


More information about the llvm-dev mailing list