# ELF representation (ivss) The **ELF representation** organizes ivss objects using a header, section headers, section buffers, symbols, and relocations. Initialization identifies the structures as little-endian ELF64 relocatable data: ```c elf->eb_ehdr.e_ident[EI_CLASS] = ELFCLASS64; elf->eb_ehdr.e_ident[EI_DATA] = ELFDATA2LSB; ``` ```c elf->eb_ehdr.e_type = ET_REL; elf->eb_ehdr.e_machine = EM_X86_64; ``` These assignments are from `Elf_Init()`. Despite the class and machine metadata, executable section contents encode ivss's hypothetical 32-bit instruction set. They are not native x86-64 instructions. The representation reuses ELF structures; its metadata should not be mistaken for the simulated architecture. The builder keeps each section's bytes alongside its header. Before serialization, the writer calculates offsets so the reader can locate section headers and contents within the reconstructed byte sequence. For example, `.symtab` holds symbol records, `.strtab` holds their names, and `.relamy_data` holds relocation records associated with `my_data`. [[ivss-hex-serialization|Hex serialization]] writes the header and section structures as textual bytes rather than producing an ordinary binary ELF file directly. Source: [elf.c](https://github.com/yanevskiv/ivss/blob/main/src/elf.c).