This changes the printNotesHelper to report warnings on its side when
there are errors when dumping notes.
With that we can provide more content when reporting warnings about broken notes.
Paths
| Differential D92636
[llvm-readelf/obj] - Improve diagnostics when printing NT_FILE notes. ClosedPublic Authored by grimar on Dec 4 2020, 12:00 AM.
Details Summary This changes the printNotesHelper to report warnings on its side when With that we can provide more content when reporting warnings about broken notes.
Diff Detail
Event TimelineComment Actions Thanks!
grimar marked 5 inline comments as done. Comment Actions
This revision is now accepted and ready to land.Dec 8 2020, 12:40 AM Closed by commit rGbdfafc4613bd: [llvm-readelf/obj] - Improve diagnostics when printing NT_FILE notes. (authored by grimar). · Explain WhyDec 9 2020, 1:32 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 310453 llvm/test/tools/llvm-readobj/ELF/note-core-ntfile-bad.test
llvm/tools/llvm-readobj/ELFDumper.cpp
|
This is checking more than just the file mappings number, it also includes the page size (note the check above is for 2 bytes).
How about: "the note of size 0x1 is too short, expected at least 0x2"?