1## Test how yaml2obj sets values for sh_entsize fields of relocation sections. 2 3# RUN: yaml2obj -D BITS=64 %s -o %t64 4# RUN: llvm-readelf --sections %t64 | FileCheck %s --check-prefix=ELF64 5 6# RUN: yaml2obj -D BITS=32 %s -o %t32 7# RUN: llvm-readelf --sections %t32 | FileCheck %s --check-prefix=ELF32 8 9# ELF64: Name Type Address Off Size ES 10# ELF64: .rela.default RELA 0000000000000000 000040 000000 18 11# ELF64: .rel.default REL 0000000000000000 000040 000000 10 12# ELF64: .relr.default RELR 0000000000000000 000040 000000 08 13# ELF64: .rela.custom RELA 0000000000000000 000040 000000 ff 14# ELF64: .rel.custom REL 0000000000000000 000040 000000 ff 15# ELF64: .relr.custom RELR 0000000000000000 000040 000000 ff 16 17# ELF32: Name Type Address Off Size ES 18# ELF32: .rela.default RELA 00000000 000034 000000 0c 19# ELF32: .rel.default REL 00000000 000034 000000 08 20# ELF32: .relr.default RELR 00000000 000034 000000 04 21# ELF32: .rela.custom RELA 00000000 000034 000000 ff 22# ELF32: .rel.custom REL 00000000 000034 000000 ff 23# ELF32: .relr.custom RELR 00000000 000034 000000 ff 24 25--- !ELF 26FileHeader: 27 Class: ELFCLASS[[BITS]] 28 Data: ELFDATA2LSB 29 Type: ET_REL 30Sections: 31## Check default sh_entsize field values. 32 - Name: .rela.default 33 Type: SHT_RELA 34 - Name: .rel.default 35 Type: SHT_REL 36 - Name: .relr.default 37 Type: SHT_RELR 38## Check we can set sh_entsize fields to arbitrary values. 39 - Name: .rela.custom 40 Type: SHT_RELA 41 EntSize: 0xFF 42 - Name: .rel.custom 43 Type: SHT_REL 44 EntSize: 0xFF 45 - Name: .relr.custom 46 Type: SHT_RELR 47 EntSize: 0xFF 48