kit

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

pe-image.sh (910B)


      1 # Golden: -f / -h / -p / -T / -R over a committed freestanding x86_64 PE32+
      2 # executable (pe-image.exe). Exercises the COFF/PE *image* reader and the
      3 # raw-fields escape hatch end to end through the neutral objdump path:
      4 #   -f  EXEC_P / D_PAGED flags, real entry point, Windows subsystem
      5 #   -h  the PE section table (CONTENTS/ALLOC/CODE/... + raw Characteristics)
      6 #   -p  PE32+ optional-header highlights, data directories, import tables
      7 #   -T  the dynamic symbol table (the imported ExitProcess)
      8 #   -R  the base-relocation records (X64_RELATIVE for the PIE .data pointer)
      9 #
     10 # Committed as a binary (like test/objdump/aarch64/exec.elf) so the golden is
     11 # stable and decoupled from the code generator. Needs no external toolchain.
     12 # Regenerate with:  build/test/pe-image-read <path>  (see test/coff/pe-image-read.c).
     13 cp "$(dirname "$0")/pe-image.exe" pe-image.exe
     14 "$KIT" objdump -f -h -p -T -R pe-image.exe