[llvm] [llvm-objdump] Error with relevant message when adding invalid notes (PR #90458)
James Henderson via llvm-commits
llvm-commits at lists.llvm.org
Wed May 22 00:38:07 PDT 2024
================
@@ -623,6 +623,58 @@ handleUserSection(const NewSectionInfo &NewSection,
return F(NewSection.SectionName, Data);
}
+static Error verifyNoteSection(StringRef Name, endianness Endianness,
+ ArrayRef<uint8_t> Data) {
+ // An ELF note has the following structure:
----------------
jh7370 wrote:
Random thought: I wonder if there's a way to leverage existing code in the `Object` library or llvm-readobj to verify the note, rather than duplicating things? (There might not be a sensible way of doing this, I haven't looked).
https://github.com/llvm/llvm-project/pull/90458
More information about the llvm-commits
mailing list