--- bfd/elf.c 2004-09-27 21:46:06.000000000 +0100 +++ bfd/elf.c 2005-05-09 13:48:46.000000000 +0100 @@ -796,7 +796,8 @@ /* Look through the phdrs to see if we need to adjust the lma. If all the p_paddr fields are zero, we ignore them, since some ELF linkers produce such output. */ - phdr = elf_tdata (abfd)->phdr; + if ((phdr = elf_tdata (abfd)->phdr) == NULL) + return FALSE; for (i = 0; i < elf_elfheader (abfd)->e_phnum; i++, phdr++) { if (phdr->p_paddr != 0)