aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elf.c')
-rw-r--r--bfd/elf.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/bfd/elf.c b/bfd/elf.c
index 934052d..397fa62 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -6138,7 +6138,9 @@ assign_file_positions_except_relocs (bfd *abfd,
changed or the programs updated. */
if (alloc > 1
&& tdata->phdr[0].p_type == PT_PHDR
- && ! bed->elf_backend_allow_non_load_phdr (abfd, tdata->phdr, alloc)
+ && (bed->elf_backend_allow_non_load_phdr == NULL
+ || !bed->elf_backend_allow_non_load_phdr (abfd, tdata->phdr,
+ alloc))
&& tdata->phdr[1].p_type == PT_LOAD
&& (tdata->phdr[1].p_vaddr > tdata->phdr[0].p_vaddr
|| (tdata->phdr[1].p_vaddr + tdata->phdr[1].p_memsz)