diff options
author | Nick Clifton <nickc@redhat.com> | 2000-09-10 19:17:08 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2000-09-10 19:17:08 +0000 |
commit | ff0829fd43f9844232e794f5be9f70fa20204616 (patch) | |
tree | 1c47022e669c45d8d95a1fd8da6d55ed49a9c2f0 /bfd | |
parent | 9830501b311056b41565a978a75e6f5de98aa8b3 (diff) | |
download | gdb-ff0829fd43f9844232e794f5be9f70fa20204616.zip gdb-ff0829fd43f9844232e794f5be9f70fa20204616.tar.gz gdb-ff0829fd43f9844232e794f5be9f70fa20204616.tar.bz2 |
Emit 8 NULs for target section name instead of dumping core when the target
symbol is undefined.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 6 | ||||
-rw-r--r-- | bfd/coff-m68k.c | 3 |
2 files changed, 8 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 4d85c79..ff7dcd4 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2000-09-10 Michael Sokolov <msokolov@ivan.Harhan.ORG> + + * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): Emit 8 NULs for + target section name instead of dumping core when the target symbol is + undefined. + 2000-09-09 Kazu Hirata <kazu@hxi.com> * riscix.c: Remove DEFUN. diff --git a/bfd/coff-m68k.c b/bfd/coff-m68k.c index 3ae98db..c5e6091 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; |