llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
29.43k stars 12.16k forks source link

ld64.lld: eh frame crash for watchOS arm64_32 #56942

Open keith opened 2 years ago

keith commented 2 years ago

This might just be a tracking issue for this FIXME: https://github.com/llvm/llvm-project/blob/11e5275cc266ab5ff07e3685935cebf6e09372f7/lld/MachO/Arch/ARM64_32.cpp#L102

But I found that this line crashed:

https://github.com/llvm/llvm-project/blob/11e5275cc266ab5ff07e3685935cebf6e09372f7/lld/MachO/EhFrame.cpp#L118-L119

When linking realm-swift for watchOS arm64_32. Here's a reproducer: https://drive.google.com/file/d/1xzGsPZHKCs7s_Vj_7thccboMG-7vVrGb/view?usp=sharing (I didn't try to reduce)

If this is expected for now maybe we should just ignore eh frames for this arch for now? To unblock locally I just deleted https://github.com/llvm/llvm-project/blob/11e5275cc266ab5ff07e3685935cebf6e09372f7/lld/MachO/InputFiles.cpp#L1136-L1137

llvmbot commented 2 years ago

@llvm/issue-subscribers-lld-macho

int3 commented 2 years ago

Hmm we should probably just fix the subtractorRelocType = GENERIC_RELOC_INVALID; thing. I can take a look at it when I get back in September