Skip to content
Back to skills

327 Cross Compilation Checklist E7edbb77

ASecurity

Use this checklist to ensure all critical steps are completed when cross-compiling for a custom MIPS VM.

  • 9 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 11, 2026
businessgotestingdebugging

Works with

  • mcp

Security analysis

A100/100

Scanned October 11, 2026

npx -y skills add tools-only/X-Skills --skill 327-cross-compilation-checklist_e7edbb77 --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of 327 Cross Compilation Checklist E7edbb77?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for 327 Cross Compilation Checklist E7edbb77
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/tools-only-327-cross-compilation-checklist-e7edbb77/badge)](https://www.skillsdirectory.com/skills/tools-only-327-cross-compilation-checklist-e7edbb77)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

SKILL.md
# Cross-Compilation Checklist for Custom MIPS VMs

Use this checklist to ensure all critical steps are completed when cross-compiling for a custom MIPS VM.

## Pre-Compilation Analysis

- [ ] Read and analyze VM source code thoroughly
- [ ] Document syscall numbers and their mappings
- [ ] Identify syscall calling convention (register usage)
- [ ] Determine endianness (little-endian vs big-endian)
- [ ] Identify floating-point support (hard vs soft)
- [ ] Document memory layout (entry point, stack, heap)
- [ ] List any instruction limitations or unimplemented opcodes
- [ ] Identify ELF format expectations (sections, entry symbol)

## Header Preparation

- [ ] Scan all source files for `#include` statements
- [ ] Create complete list of required system headers
- [ ] Create stub headers for ALL required headers before first compile
- [ ] Verify stdarg.h handling for variadic functions
- [ ] Include proper type definitions (size_t, ssize_t, etc.)

## Standard Library Implementation

### Critical Functions (Must Be Complete)

- [ ] `printf` - with format specifier support (%d, %s, %x, %c, %p minimum)
- [ ] `sprintf` / `snprintf` - same format support
- [ ] `fprintf` - with file descriptor support
- [ ] `sscanf` - for configuration parsing
- [ ] `malloc` / `free` / `realloc` - proper heap management
- [ ] `memcpy` / `memset` / `memmove` - memory operations
- [ ] `strlen` / `strcmp` / `strcpy` / `strncpy` - string operations
- [ ] `atoi` / `atol` / `strtol` - number parsing
- [ ] `fopen` / `fread` / `fwrite` / `fclose` - file operations
- [ ] `fseek` / `ftell` - file positioning
- [ ] `open` / `read` / `write` / `close` - low-level I/O

### Verification Checklist

- [ ] No functions return 0 unconditionally
- [ ] No empty function bodies
- [ ] No TODO/stub comments in critical functions
- [ ] Format specifiers properly parsed and handled
- [ ] Error conditions properly reported

## Linker Configuration

- [ ] Entry point symbol matches VM expectations
- [ ] Text section address is correct
- [ ] Data section address is correct
- [ ] BSS section properly placed and zeroed
- [ ] Stack pointer initialized in startup code
- [ ] Map file generation enabled (-Wl,-Map=output.map)

## Compilation Verification

- [ ] No implicit function declaration warnings
- [ ] No ABI mismatch warnings (or properly addressed)
- [ ] ELF entry point verified with readelf
- [ ] Symbol table checked with nm
- [ ] Section layout verified with objdump

## Testing Progression

1. [ ] Minimal test program (print "Hello")
2. [ ] Syscall test program (test each syscall)
3. [ ] Memory allocation test
4. [ ] File I/O test
5. [ ] Complex string operations test
6. [ ] Full application

## Debugging When Things Go Wrong

### Program Terminates Early

- [ ] Get termination PC address from VM
- [ ] Look up address in map file
- [ ] Identify failing function
- [ ] Check for unimplemented instructions
- [ ] Verify syscall parameters are valid
- [ ] Check for stack overflow
- [ ] Verify memory addresses are in valid range

### No Output Produced

- [ ] Verify write syscall implementation
- [ ] Check stdout file descriptor (usually 1)
- [ ] Trace from printf to write syscall
- [ ] Check buffer flushing

### Unexpected Behavior

- [ ] Add diagnostic output at checkpoints
- [ ] Log all syscall invocations
- [ ] Verify data file paths
- [ ] Check endianness of data files

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.