[llvm-branch-commits] [llvm-objdump] -r: support CREL (PR #97382)
Peter Smith via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Jul 2 05:50:03 PDT 2024
================
@@ -2687,6 +2687,15 @@ void Dumper::printRelocations() {
<< "VALUE\n";
for (SectionRef Section : P.second) {
+ // CREL requires decoding and has its specific errors.
+ if (O.isELF() && ELFSectionRef(Section).getType() == ELF::SHT_CREL) {
+ const ELFObjectFileBase *ELF = cast<const ELFObjectFileBase>(&O);
+ StringRef Err = ELF->getCrelError(Section);
+ if (!Err.empty()) {
+ reportUniqueWarning(Err);
----------------
smithp35 wrote:
If we are giving a warning rather than an error, then perhaps we should use something like `getCrelDecodeProblem`
Just looks a bit strange recording errors, but then only reporting a warning.
My expectation for a decode error would be that we report it, but continue as best we can. I would expect a non-zero error code though. Please ignore if this isn't llvm-objdump practice.
https://github.com/llvm/llvm-project/pull/97382
More information about the llvm-branch-commits
mailing list