Subject: Re: CVS commit: basesrc/usr.bin/file
To: None <mouse@Rodents.Montreal.QC.CA, firstname.lastname@example.org>
From: None <email@example.com>
Date: 06/05/2002 15:23:39
| The object of the magic.mgc is so that you don't have to interpret the
| uncompiled file each time around. If the overhead of unpacking the
| struct all the time is going to outweigh the advantages of the compiled
| format, we may as well not worry about using the compiled format.
Trying to pack the structure makes no sense since this is a speed hack
over reading the source magic file and any machine that needs proper
alignment will need lots of shift and mask code. Padding it out to
worst case bounadries will break binary compatibility with
architectures that don't bother with alignment.
We could do something similar to genassym.cf to calculate the native
structure layout with the cross compiler. Or we could add this to
some postinstall script.