> + /* Libraries have to be shared object files. */ > + if (!elf_header->e_type & ET_DYN) This is plainly nutso. elf_header->e_type != ET_DYN is the only that makes sense.