This code was originally written when there only were three possible types, but nowadays we also have the DOL/ELF type.