53 lines · yaml
1## Test how yaml2obj sets values for sh_entsize fields of relocation sections.2 3# RUN: yaml2obj -D BITS=64 %s -o %t644# RUN: llvm-readelf --sections %t64 | FileCheck %s --check-prefix=ELF645 6# RUN: yaml2obj -D BITS=32 %s -o %t327# RUN: llvm-readelf --sections %t32 | FileCheck %s --check-prefix=ELF328 9# ELF64: Name Type Address Off Size ES10# ELF64: .rela.default RELA 0000000000000000 000040 000000 1811# ELF64: .rel.default REL 0000000000000000 000040 000000 1012# ELF64: .relr.default RELR 0000000000000000 000040 000000 0813# ELF64: .rela.custom RELA 0000000000000000 000040 000000 ff14# ELF64: .rel.custom REL 0000000000000000 000040 000000 ff15# ELF64: .crel.custom CREL 0000000000000000 000040 000000 ff16# ELF64: .relr.custom RELR 0000000000000000 000040 000000 ff17 18# ELF32: Name Type Address Off Size ES19# ELF32: .rela.default RELA 00000000 000034 000000 0c20# ELF32: .rel.default REL 00000000 000034 000000 0821# ELF32: .relr.default RELR 00000000 000034 000000 0422# ELF32: .rela.custom RELA 00000000 000034 000000 ff23# ELF32: .rel.custom REL 00000000 000034 000000 ff24# ELF32: .crel.custom CREL 00000000 000034 000000 ff25# ELF32: .relr.custom RELR 00000000 000034 000000 ff26 27--- !ELF28FileHeader:29 Class: ELFCLASS[[BITS]]30 Data: ELFDATA2LSB31 Type: ET_REL32Sections:33## Check default sh_entsize field values.34 - Name: .rela.default35 Type: SHT_RELA36 - Name: .rel.default37 Type: SHT_REL38 - Name: .relr.default39 Type: SHT_RELR40## Check we can set sh_entsize fields to arbitrary values.41 - Name: .rela.custom42 Type: SHT_RELA43 EntSize: 0xFF44 - Name: .rel.custom45 Type: SHT_REL46 EntSize: 0xFF47 - Name: .crel.custom48 Type: SHT_CREL49 EntSize: 0xFF50 - Name: .relr.custom51 Type: SHT_RELR52 EntSize: 0xFF53