diff options
author | Alex Bradbury <asb@igalia.com> | 2023-03-27 04:32:58 +0100 |
---|---|---|
committer | Alex Bradbury <asb@igalia.com> | 2023-03-27 04:32:58 +0100 |
commit | 062065888f645bbe6a8eec99ba58487a539afd62 (patch) | |
tree | dc91ca60f5300a2d9d26cb9630b95589868b0e2f /llvm/lib/Object/ELFObjectFile.cpp | |
parent | 41eafdf9aac4bd23ebff90d072eb595dfc143b7b (diff) | |
download | llvm-062065888f645bbe6a8eec99ba58487a539afd62.zip llvm-062065888f645bbe6a8eec99ba58487a539afd62.tar.gz llvm-062065888f645bbe6a8eec99ba58487a539afd62.tar.bz2 |
[RISCV] Enable tools such as llvm-objdump to process objects with unrecognised base ISA versions
Tools such as llvm-objdump will currently inputs when the base ISA has
an unrecognised version. I addressed a similar issue in LLD in D144353,
introducing parseArchStringNormalized. While it would make sense to
migrate `llvm/lib/Object/ELFObjectFile.cpp` to using
`parseArchStringNormalized` as well, this patch takes a less ambitious
initial step. By tweaking the behaviour of `parseArchString` when
`IgnoreUnknown` is true (which only has one in-tree user), we use the
default supported ISA version when a base ISA with unrecognised version
is encountered.
This means that llvm-objdump and related tools will function better for
objects produced from a recent GCC. This isn't a full fix, as
IgnoreUnknown means that an imafd object with attributes specifying
newer A/F/D versions will have those extensions ignored.
Differential Revision: https://reviews.llvm.org/D146070
Diffstat (limited to 'llvm/lib/Object/ELFObjectFile.cpp')
0 files changed, 0 insertions, 0 deletions