[Vm-dev] magic decode for image files

David T. Lewis lewis at mail.msen.com
Mon Apr 10 13:22:34 UTC 2017


Very nice :-)

See also the ckformat program, which is automatically generated as an executeable
from package ImageFormat in the VMMaker repository. It is used for selecting
the appropriate VM for a given image file in the traditional interpreter VM
in the /usr/local/bin/squeak script.

Dave

On Mon, Apr 10, 2017 at 05:52:49PM +0530, K K Subbu wrote:
>  
> Hi,
> 
> I have attached a pattern match file that can be used by the file(1) 
> command to decode Squeak/Cog/Spur image files.
> 
> $ file -m magic Pharo-50770.image Pharo-40627.image
> Pharo-50770.image: Spur image 32b little-endian
> Pharo-40627.image: Cog image 32b little-endian,closure,nativefloat
> 
> $ file -m magic Squeak3.8.1-6747full.image Squeak64-3.8g-6548.image
> Squeak3.8.1-6747full.image: Squeak image 32b little-endian
> Squeak64-3.8g-6548.image: Spur image 64b big-endian
> 
> The file may be appended to /etc/magic (system-wide) or $HOME/.magic 
> (for one user). It will help package maintainers pick the right vm for 
> an Image.
> 
> Ideally, this file should be generated by VMMaker under 
> platforms/Cross/.., so patterns can be kept in sync with ImageFormat.
> 
> I am rejoining this list after a break that took a lot longer than I 
> expected :-(. Glad to be back, though it looks like I have a lot of 
> catchup to do.
> 
> Regards .. Subbu

> 0	lelong		6502		Squeak image 32b little-endian
> 0	belong		6502		Squeak image 32b big-endian
> 0	lelong		6504		Stack image 32b little-endian,closure
> 0	belong		6504		Stack image 32b big-endian,closure
> 0	lelong		6505		Cog image 32b little-endian,closure,nativefloat
> 0	belong		6505		Cog image 32b big-endian,closure,nativefloat
> 0	lelong		6521		Spur image 32b little-endian
> 0	belong		6521		Spur image 32b big-endian
> 0	lequad		68000		Spur image 64b little-endian
> 0	bequad		68000		Spur image 64b big-endian
> 0	lequad		68002		Spur image 64b little-endian,closure
> 0	bequad		68002		Spur image 64b big-endian,closure
> 0	lequad		68003		Spur image 64b little-endian,closure,nativefloat
> 0	bequad		68003		Spur image 64b big-endian,closure,nativefloat
> 0	lequad		68019		Spur image 64b little-endian
> 0	bequad		68019		Spur image 64b big-endian



More information about the Vm-dev mailing list