Copy rhead() and rsect() from aslod to aelflod, so aelflod can work
for machine with 64-bit long.
In aelflod, fix ELF header so file(1) no longer reports "corrupted
section header size".
When the bootloader probes the drive geometry, the BIOS can clobber the
es register. If this happens, the bootloader loads the program to the
wrong address, and jumps off the code. This happens with an emulated
floppy drive in Bochs or QEMU, but not with an emulated hard disk.
rhead() and rsect() had assumed sizeof(long) == 4, but OpenBSD/amd64
has sizeof(long) == 8. The problem revealed itself when sect->os_lign
became zero, and align() divided by zero.
These files "magically reappeared" after the conversion from CVS to
Mercurial. The old CVS repository deleted these files but did not
record *when* it deleted these files. The conversion resurrected these
files because they have no history of deletion. These files were
probably deleted before year 1995. The CVS repository begins to record
deletions around 1995.
These files may still appear in older revisions of this Mercurial
repository, when they should already be deleted. There is no way to fix
this, because the CVS repository provides no dates of deletion.
See http://sourceforge.net/mailarchive/message.php?msg_id=29823032
I already did this in abebf1586c06, but I edited the wrong file. Then
in edddc6b7cd17, I deleted that file.
By fixing fit16i(), I can now compile ACK for OpenBSD/amd64.
This continues the fix from changeset aabde0589450. We must use
va_list to forward the arguments, because some of the arguments might
be 64-bit pointers. A pointer does not fit in an int.
Hosts with sizeof(arith) == sizeof(long) == 8 need to set full_mask[1]
through full_mask[8]. Because MAXSIZE == 8, we only had full_mask[0]
through full_mask[7]. This fix declares arith full_mask[MAXSIZE + 1]
and prevents a fatal error: "array full_mask too small for this machine"