[llvm] [llvm-objcopy] Add possibility to verify .note section format (PR #90458)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 10 11:02:41 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:
----------------
MaskRay wrote:

Some note sections (`.note.gnu.property`) have 8-byte alignment. Perhaps add a test that they are supported. @serge-sans-paille 

https://github.com/llvm/llvm-project/pull/90458


More information about the llvm-commits mailing list