This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
[patch] to bfd: small buglet in my m68k COFF embedded relocs code
- To: binutils at sources dot redhat dot com
- Subject: [patch] to bfd: small buglet in my m68k COFF embedded relocs code
- From: msokolov at ivan dot Harhan dot ORG (Michael Sokolov)
- Date: Sun, 10 Sep 00 12:20:38 CDT
Hi there,
Here is a patch for bfd fixing the small buglet in my m68k COFF ld --embedded-
relocs I've just mentioned.
--
Michael Sokolov Harhan Engineering Laboratory
Public Service Agent International Free Computing Task Force
International Engineering and Science Task Force
615 N GOOD LATIMER EXPY STE #4
DALLAS TX 75204-5852 USA
Phone: +1-214-824-7693 (Harhan Eng Lab office)
E-mail: msokolov@ivan.Harhan.ORG (ARPA TCP/SMTP) (UUCP coming soon)
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.
Index: coff-m68k.c
===================================================================
RCS file: /cvs/src/src/bfd/coff-m68k.c,v
retrieving revision 1.4
diff -c -r1.4 coff-m68k.c
*** coff-m68k.c 2000/07/21 23:31:53 1.4
--- coff-m68k.c 2000/09/10 03:44:09
***************
*** 504,510 ****
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);
}
return true;
--- 504,511 ----
bfd_put_32 (abfd,
(irel->r_vaddr - datasec->vma + datasec->output_offset), p);
memset (p + 4, 0, 8);
! if (targetsec != NULL)
! strncpy (p + 4, targetsec->output_section->name, 8);
}
return true;