Some updates to elf loading.