brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · 98e8110 Raw
38 lines · plain
1# RUN: yaml2obj %s -o %t2# RUN: not llvm-objcopy %t %t2 2>&1 | FileCheck %s3# CHECK: error: invalid alignment 1 of group section '.group'4 5# In this test, we check that llvm-objcopy reports an error6# for SHT_GROUP section with invalid alignment (not a multiple of 4). 7 8--- !ELF9FileHeader:10  Class:           ELFCLASS6411  Data:            ELFDATA2LSB12  Type:            ET_REL13  Machine:         EM_X86_6414Sections:15## It is not important for passing the test case to have this placeholder,16## but having it would trigger ubsan failure when writing the group section17## into a file if the error tested would not be reported by llvm-objcopy.18  - Name:            .placeholder19    Type:            SHT_PROGBITS20    Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]21    AddressAlign:    0x000000000000000122    Content:         "00"23  - Name:            .group24    Type:            SHT_GROUP25    Link:            .symtab26    AddressAlign:    0x000000000000000127    Info:            foo28    Members:29      - SectionOrType:   GRP_COMDAT30      - SectionOrType:   .text.foo31  - Name:            .text.foo32    Type:            SHT_PROGBITS33    Flags:           [ SHF_ALLOC, SHF_EXECINSTR, SHF_GROUP ]34    AddressAlign:    0x000000000000000135Symbols:36  - Name:            foo37    Section:         .group38