* srec.c (srec_write_symbols): Restore '$' prefix to address

accidentally removed in 2002-04-04 change.
	(srec_get_symtab): Use 0 instead of `(long) FALSE'.
This commit is contained in:
Alan Modra 2002-12-03 23:55:48 +00:00
parent 2af579c444
commit c5c1944d0f
2 changed files with 12 additions and 5 deletions

View file

@ -1,3 +1,9 @@
2002-12-04 Alan Modra <amodra@bigpond.net.au>
* srec.c (srec_write_symbols): Restore '$' prefix to address
accidentally removed in 2002-04-04 change.
(srec_get_symtab): Use 0 instead of `(long) FALSE'.
2002-12-03 Nick Clifton <nickc@redhat.com> 2002-12-03 Nick Clifton <nickc@redhat.com>
* elf32-ppc.c (apuinfo_list_init): New function. * elf32-ppc.c (apuinfo_list_init): New function.

View file

@ -1095,24 +1095,25 @@ srec_write_symbols (abfd)
&& (s->flags & BSF_DEBUGGING) == 0) && (s->flags & BSF_DEBUGGING) == 0)
{ {
/* Just dump out non debug symbols. */ /* Just dump out non debug symbols. */
char buf[42], *p; char buf[43], *p;
len = strlen (s->name); len = strlen (s->name);
if (bfd_bwrite (" ", (bfd_size_type) 2, abfd) != 2 if (bfd_bwrite (" ", (bfd_size_type) 2, abfd) != 2
|| bfd_bwrite (s->name, len, abfd) != len) || bfd_bwrite (s->name, len, abfd) != len)
return FALSE; return FALSE;
sprintf_vma (buf + 1, (s->value sprintf_vma (buf + 2, (s->value
+ s->section->output_section->lma + s->section->output_section->lma
+ s->section->output_offset)); + s->section->output_offset));
p = buf + 1; p = buf + 2;
while (p[0] == '0' && p[1] != 0) while (p[0] == '0' && p[1] != 0)
p++; p++;
len = strlen (p); len = strlen (p);
p[len] = '\r'; p[len] = '\r';
p[len + 1] = '\n'; p[len + 1] = '\n';
*--p = '$';
*--p = ' '; *--p = ' ';
len += 3; len += 4;
if (bfd_bwrite (p, len, abfd) != len) if (bfd_bwrite (p, len, abfd) != len)
return FALSE; return FALSE;
} }
@ -1203,7 +1204,7 @@ srec_get_symtab (abfd, alocation)
csymbols = (asymbol *) bfd_alloc (abfd, symcount * sizeof (asymbol)); csymbols = (asymbol *) bfd_alloc (abfd, symcount * sizeof (asymbol));
if (csymbols == NULL && symcount != 0) if (csymbols == NULL && symcount != 0)
return (long) FALSE; return 0;
abfd->tdata.srec_data->csymbols = csymbols; abfd->tdata.srec_data->csymbols = csymbols;
for (s = abfd->tdata.srec_data->symbols, c = csymbols; for (s = abfd->tdata.srec_data->symbols, c = csymbols;