brintos

brintos / llvm-project-archived public Read only

0
0
Text · 895 B · 3c3cb9f Raw
23 lines · plain
1# Check the properties of added sections.2# By default, sections are SHT_PROGBITS, but .note sections (excluding3# .note.GNU-stack) are SHT_NOTE sections.4 5# RUN: yaml2obj %s -o %t.o6# RUN: llvm-objcopy --add-section=.foo=/dev/null %t.o %t-foo.o7# RUN: llvm-objcopy --add-section=.note.foo=/dev/null %t.o %t-regular-note.o8# RUN: llvm-objcopy --add-section=.note.GNU-stack=/dev/null %t.o %t-gnu-stack.o9# RUN: llvm-readelf --sections %t-foo.o | FileCheck %s --check-prefix=NORMAL10# RUN: llvm-readelf --sections %t-regular-note.o | FileCheck %s --check-prefix=NOTE11# RUN: llvm-readelf --sections %t-gnu-stack.o | FileCheck %s --check-prefix=GNU-STACK12 13!ELF14FileHeader:15  Class:           ELFCLASS6416  Data:            ELFDATA2LSB17  Type:            ET_REL18  Machine:         EM_X86_6419 20# NORMAL:    .foo            PROGBITS21# NOTE:      .note.foo       NOTE22# GNU-STACK: .note.GNU-stack PROGBITS23