[lldb][ObjectFileELF] Improve error output for unsupported arch/relocations
authorStefan Gränitz <stefan.graenitz@gmail.com>
Thu, 13 Apr 2023 12:21:20 +0000 (14:21 +0200)
committerStefan Gränitz <stefan.graenitz@gmail.com>
Thu, 13 Apr 2023 12:32:15 +0000 (14:32 +0200)
commitcc6ab268d89b27723f62517a07e86df85e999c89
tree991fd09c07a590bcd71a137883405519f1192b84
parentdf3f1e2f31300f95845c39a76a45c95dab64cd12
[lldb][ObjectFileELF] Improve error output for unsupported arch/relocations

ObjectFileELF::ApplyRelocations() considered all 32-bit input objects to be i386 and didn't provide good error messages for AArch32 objects. Please find an example in https://github.com/llvm/llvm-project/issues/61948
While we are here, let' improve the situation for unsupported architectures as well. I think we should report the error here too and not silently fail (or crash with assertions enabled).

Reviewed By: SixWeining

Differential Revision: https://reviews.llvm.org/D147627
lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp