more tweaks to elf.c