Functions matched (all EQUAL via hardened comparator):
- _code_0005bff0 (PackBitsPreEncode): 0x40 bytes, 2 relocs
- _code_0005c030 (PackBitsEncode): 0x230 bytes, 7 relocs
- _code_0005c260 (PackBitsDecode): 0x110 bytes, 3 relocs
- _code_0005c370 (PackBitsEncodeChunk): 0x50 bytes, 1 reloc
- _TIFFInitPackBits: 0x50 bytes, 4 relocs
Changes:
- Remove #include <assert.h> and assert() call
- Rename static functions to target VA-based symbol names
- Replace bcopy() with _csmemcpy() (XDK standard)
- Put RCSID string in .data as _data_002daf38
- Use direct offset stores for struct fields whose layout
differs between this repo's tiffioP.h and the original binary
- Reorder function definitions alphabetically to match section
ordering in the original COFF
Root cause: TIFFGetFileSize was excluded on xbox by #if guard
checking only unix/__unix/MSDOS/VMS. The Xbox XDK sys/stat.h
provides fstat(), and the original Jan 2002 build included
this function.
Fix: add defined(xbox) to the preprocessor guard and map
fstat->_fstat to match the original build's name decoration
convention (original compiler prepends _ even to names
already starting with _, producing __fstat symbol).
Verification:
- .text section (48 bytes, MD5 36278163024e40f7...): MATCH
- .data section (90 bytes, MD5 ac8cc86417f9c2db...): MATCH
- External symbol __fstat: MATCH
- objdiff-cli interactive diff: 100.00%
Canonical report 0/1 previously due to the #if guard causing
zero functions to be emitted in the base build.