From 440b26ec58c1da582a1b614a476a4b5f3abf43d0 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Fri, 27 Sep 2024 16:02:43 +0200 Subject: sys/linux/test: add ELF binary seed Add a seed that creates and execs something that resembles an ELF binary. --- sys/linux/binfmt.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/linux/binfmt.txt') diff --git a/sys/linux/binfmt.txt b/sys/linux/binfmt.txt index 98a67336f..08938298c 100644 --- a/sys/linux/binfmt.txt +++ b/sys/linux/binfmt.txt @@ -105,7 +105,7 @@ type binfmt_elf64 binfmt_elf[int64, elf64_phdr, ELF64_PHDR_SIZE] type binfmt_elf[ADDR, PHDR, PHENTSIZE] { hdr elf_hdr[ADDR, PHENTSIZE] - phdr array[PHDR, 1:2] + phdr array[PHDR, 1:4] data array[int8] # Just to make the file of a non-trivial size. pad array[array[const[0, int64], 32], 0:10] @@ -130,7 +130,7 @@ type elf_hdr[ADDR, PHENTSIZE] { e_flags int32 e_ehsize int16 e_phentsize const[PHENTSIZE, int16] - e_phnum int16[1:2] + e_phnum len[binfmt_elf:phdr, int16] e_shentsize int16 e_shnum int16 e_shstrndx int16 -- cgit mrf-deployment