40 lines · plain
1## Test that note values are interpreted correctly for files with multiple sections.2 3## Check NT_PRSTATUS + NT_PRPSINFO.4# RUN: yaml2obj %s -DTYPE1=0x1 -DTYPE2=0x3 -o %t1.o5# RUN: llvm-readelf --elf-output-style=JSON --pretty-print --notes %t1.o | FileCheck %s --check-prefix=CHECK-JSON -DDESC1="NT_PRSTATUS (prstatus structure)" -DDESC2="NT_PRPSINFO (prpsinfo structure)"6# CHECK-JSON: "Size": 40,7# CHECK-JSON-NEXT: "Notes": [8# CHECK-JSON-NEXT: {9# CHECK-JSON-NEXT: "Owner": "CORE",10# CHECK-JSON-NEXT: "Data size": 0,11# CHECK-JSON-NEXT: "Type": "[[DESC1]]"12# CHECK-JSON-NEXT: },13# CHECK-JSON-NEXT: {14# CHECK-JSON-NEXT: "Owner": "CORE",15# CHECK-JSON-NEXT: "Data size": 0,16# CHECK-JSON-NEXT: "Type": "[[DESC2]]"17# CHECK-JSON-NEXT: }18# CHECK-JSON-NEXT: ]19 20--- !ELF21FileHeader:22 Class: ELFCLASS6423 Data: ELFDATA2LSB24 Type: ET_CORE25Sections:26 - Name: .note.first27 Type: SHT_NOTE28 Notes:29 - Name: CORE30 Type: [[TYPE1]]31 - Name: .note.second32 Type: SHT_NOTE33 Notes:34 - Name: CORE35 Type: [[TYPE2]]36ProgramHeaders:37 - Type: PT_NOTE38 FirstSec: .note.first39 LastSec: .note.second40