================
@@ -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);
----------------
MaskRay wrote:
Adopted `getCrelDecodeProblem`.
> 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.
llvm-readobj tries to continue execution and report warnings. While a lot of
code in llvm-objdump reports errors, there have been efforts to migrate to
warnings: https://reviews.llvm.org/D154754
https://github.com/llvm/llvm-project/pull/97382
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits