Skip to content

[codex] Normalize PSP archive metadata#6

Merged
doodlewind merged 6 commits into
masterfrom
codex/normalize-psp-archives
Jun 19, 2026
Merged

[codex] Normalize PSP archive metadata#6
doodlewind merged 6 commits into
masterfrom
codex/normalize-psp-archives

Conversation

@doodlewind

Copy link
Copy Markdown
Collaborator

Summary

Normalize generated PSP archive objects before packaging PSPDEV builds.

The clang-built SDK archives currently expose two issues when linked by rust-lld from rustc's current mipsel-sony-psp target:

  • local STT_FILE symbols in archive members can trip symbol has invalid binding: 0
  • clang emits MIPS metadata such as machine-extension/single-float flags, while rustc's PSP target and the legacy SDK emit the metadata shape rust-lld accepts for this target

This script runs after the normal SDK build steps and before CI packaging. It strips only STT_FILE symbols and normalizes MIPS ELF metadata to match rustc/legacy PSP SDK objects: MIPS2 O32, no machine extension, hard-float double ABI metadata.

Validation

  • bash -n scripts/006-normalize-llvm-psp-archives.sh
  • Ran the script against a copied clang-built PSP SDK archive tree.
  • Verified libc.a(libc_a-abort.o) no longer contains STT_FILE symbols and reports Flags: 0x10001001, noreorder, o32, mips2 plus FP ABI: Hard float (double precision).
  • Used the normalized SDK locally in Dreamcart: env -u PSPJS_SUPPRESS_LINKER_MESSAGES bun play psp adventure3d built EBOOT.PBP with no linker warnings/errors.

@doodlewind
doodlewind force-pushed the codex/normalize-psp-archives branch from 0d0814a to 96b07a7 Compare June 19, 2026 09:33
@doodlewind
doodlewind merged commit 0ea4bc4 into master Jun 19, 2026
12 checks passed
@doodlewind
doodlewind deleted the codex/normalize-psp-archives branch June 19, 2026 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant