Compiler projects using llvm
## Check --set-section-flags/--set-section-types work with sections added by --add-section.

# RUN: yaml2obj %s -o %t
# RUN: llvm-objcopy --add-section=foo=/dev/null --set-section-flags=foo=alloc,exclude %t %t.1
# RUN: llvm-readobj -S %t.1 | FileCheck %s

# CHECK:      Name: foo
# CHECK-NEXT: Type: SHT_PROGBITS
# CHECK-NEXT: Flags [
# CHECK-NEXT:   SHF_ALLOC
# CHECK-NEXT:   SHF_EXCLUDE
# CHECK-NEXT:   SHF_WRITE
# CHECK-NEXT: ]

# RUN: llvm-objcopy --add-section=foo=/dev/null --set-section-type=foo=7 %t %t.2
# RUN: llvm-readobj -S %t.2 | FileCheck %s --check-prefix=CHECK2

# CHECK2:      Name: foo
# CHECK2-NEXT: Type: SHT_NOTE (0x7)
# CHECK2-NEXT: Flags [
# CHECK2-NEXT: ]

--- !ELF
FileHeader:
  Class:   ELFCLASS64
  Data:    ELFDATA2LSB
  Type:    ET_EXEC
  Machine: EM_X86_64