summaryrefslogtreecommitdiff
path: root/bfd/coff-m68k.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2000-09-10 19:17:08 +0000
committerNick Clifton <nickc@redhat.com>2000-09-10 19:17:08 +0000
commit250de26929a563f2a49bc632fe99070a4d50c6cd (patch)
treefdfb0a3445d771932ac553f7c014746eab1c4829 /bfd/coff-m68k.c
parent2fc4a6b82c9df1783cd1c914e551b87cc1f873c0 (diff)
downloadgdb-250de26929a563f2a49bc632fe99070a4d50c6cd.tar.gz
Emit 8 NULs for target section name instead of dumping core when the target
symbol is undefined.
Diffstat (limited to 'bfd/coff-m68k.c')
-rw-r--r--bfd/coff-m68k.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/bfd/coff-m68k.c b/bfd/coff-m68k.c
index 3ae98dbd12c..c5e60911317 100644
--- a/bfd/coff-m68k.c
+++ b/bfd/coff-m68k.c
@@ -504,7 +504,8 @@ bfd_m68k_coff_create_embedded_relocs (abfd, info, datasec, relsec, errmsg)
bfd_put_32 (abfd,
(irel->r_vaddr - datasec->vma + datasec->output_offset), p);
memset (p + 4, 0, 8);
- strncpy (p + 4, targetsec->output_section->name, 8);
+ if (targetsec != NULL)
+ strncpy (p + 4, targetsec->output_section->name, 8);
}
return true;