brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · 2b82230 Raw
43 lines · plain
1## Check that a malformed NT_GNU_ABI_TAG note can be dumped without crashing.2# RUN: yaml2obj %s -o %t3# RUN: llvm-readelf --notes %t | FileCheck %s --check-prefix=GNU4# RUN: llvm-readobj --elf-output-style LLVM --notes %t | FileCheck %s --check-prefix=LLVM5## GNU binutils does not print the raw description data when encountering an6## invalid NT_GNU_ABI_TAG, but in LLVM style we print it.7 8# GNU:      Displaying notes found in: .note.ABI-tag9# GNU-NEXT:   Owner                 Data size       Description10# GNU-NEXT:   GNU                   0x00000004      NT_GNU_ABI_TAG (ABI version tag)11# GNU-NEXT:     <corrupt GNU_ABI_TAG>12# GNU-EMPTY:13 14# LLVM:      NoteSections [15# LLVM-NEXT:   NoteSection {16# LLVM-NEXT:     Name: .note.ABI-tag17# LLVM-NEXT:     Offset:18# LLVM-NEXT:     Size: 0x1419# LLVM-NEXT:     Notes [20# LLVM-NEXT:     {21# LLVM-NEXT:       Owner: GNU22# LLVM-NEXT:       Data size: 0x423# LLVM-NEXT:       Type: NT_GNU_ABI_TAG (ABI version tag)24# LLVM-NEXT:       ABI: <corrupt GNU_ABI_TAG>25# LLVM-NEXT:       Description data (26# LLVM-NEXT:         0000: 00000000 |....|27# LLVM-NEXT:       )28# LLVM-NEXT:     }29# LLVM-NEXT:    ]30# LLVM-NEXT:   }31# LLVM-NEXT: ]32 33--- !ELF34FileHeader:35  Class: ELFCLASS6436  Data:  ELFDATA2LSB37  Type:  ET_EXEC38Sections:39  - Name:            .note.ABI-tag40    Type:            SHT_NOTE41    AddressAlign:    0x000000000000000442    Content:         040000000400000001000000474E55000000000043