kit

kit
git clone https://git.ryansepassi.com/git/kit.git
Log | Files | Refs | README

01_return42.c (879B)


      1 /* Trivial function: no relocations, single .text section.
      2  *
      3  * Marked .xfail until kit's data model preserves a few details clang
      4  * emits in even the simplest .o:
      5  *   - STT_NOTYPE on defined symbols (AArch64 mapping symbols `$x`/`$d`)
      6  *     — currently round-trip as STT_OBJECT because SymKind has no slot
      7  *     for "defined but typeless".
      8  *   - Custom sh_type values like SHT_LLVM_ADDRSIG — read_elf collapses
      9  *     unknown types to SSEM_PROGBITS.
     10  *   - Section ordering / single-vs-split strtab+shstrtab — clang reuses
     11  *     one .strtab for both; kit writes them separately. Cosmetic, but
     12  *     affects the structural diff.
     13  *
     14  * Roundtrip is structurally sound (same sections, symbols, and relocs);
     15  * the lossy bits are why this case is xfail. Removing the .xfail file
     16  * is the regression check once the model is extended. */
     17 
     18 int main(void) { return 42; }