D224 - The bundled stubs must not be named after a library, and the guard was checking the wrong list
The stubs were named libc and libSceFios2,
matching what a real package bundles, on the reasoning that the system
loads that directory by name. It does not - when they
were malformed the loader reported errors about
libSceFios2.prx by name, so it enumerates the directory and
loads what it finds. Any name works.
The names mattered in the other direction, and this was very nearly shipped:
$ cut -d' ' -f1 build/symbols.txt | sort -u | grep -xE 'libc|libSceFios2'
libSceFios2
libc
The full probe imports from 352 libraries and both
stub names are among them. A stub under either name is a library the
probe imports from, shipped inside the probe's own package, exporting
nothing - so every import against it would have bound to nothing and
reported that a platform function exists and returns zero. The
probe would have measured itself and found no fault. They are
now obscene-placeholder, a name nothing imports.
The guard was real and looked in the wrong place
sce-module-guard existed for exactly this and checked
src/imports.c - twelve libraries, and libc is
not among them, so it passed. The list that decides resolution is
$(BUILD)/symbols.txt, generated by
obscene-host --symbols from the 352-library census, and
that is the file the guard now checks as well.
A guard that checks a plausible-looking list rather than the operative one is worse than no guard: it was written, it was reasoned about in a decision entry, and it would have let the exact failure it names straight through.
And the directory was never emptied
sce-module did mkdir -p and no more, so
renaming the modules left the old ones behind and
build-pkg.sh shipped all three - including the two names
the rename existed to stop using. It is rm -rf then
mkdir now. Stale build output that a packaging step globs
is a way to ship something nobody chose.