/* BFD back-end for s-record objects.
- Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 1998
+ Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999
Free Software Foundation, Inc.
Written by Steve Chamberlain of Cygnus Support <sac@cygnus.com>.
&& (c == ' ' || c == '\t'))
;
- if (c == '\n')
+ if (c == '\n' || c == '\r')
break;
if (c == EOF)
}
while (c == ' ' || c == '\t');
- if (c != '\n')
+ if (c == '\n')
+ ++lineno;
+ else if (c != '\r')
{
srec_bad_byte (abfd, lineno, c, error);
goto error_return;
}
- ++lineno;
-
break;
case 'S':
|| ! srec_scan (abfd))
return NULL;
+ if (abfd->symcount > 0)
+ abfd->flags |= HAS_SYMS;
+
return abfd->xvec;
}
|| ! srec_scan (abfd))
return NULL;
+ if (abfd->symcount > 0)
+ abfd->flags |= HAS_SYMS;
+
return abfd->xvec;
}
}
else if ((section->lma + offset + bytes_to_do - 1) <= 0xffffff
- && tdata->type < 2)
+ && tdata->type <= 2)
{
tdata->type = 2;
}
for (i = 0; i < count; i++)
{
asymbol *s = table[i];
- if (! bfd_is_local_label (abfd, s))
+ if (! bfd_is_local_label (abfd, s)
+ && (s->flags & BSF_DEBUGGING) == 0)
{
/* Just dump out non debug symbols */
bfd_size_type l;
/*ARGSUSED*/
static int
srec_sizeof_headers (abfd, exec)
- bfd *abfd;
- boolean exec;
+ bfd *abfd ATTRIBUTE_UNUSED;
+ boolean exec ATTRIBUTE_UNUSED;
{
return 0;
}
/*ARGSUSED*/
static void
srec_get_symbol_info (ignore_abfd, symbol, ret)
- bfd *ignore_abfd;
+ bfd *ignore_abfd ATTRIBUTE_UNUSED;
asymbol *symbol;
symbol_info *ret;
{
/*ARGSUSED*/
static void
srec_print_symbol (ignore_abfd, afile, symbol, how)
- bfd *ignore_abfd;
+ bfd *ignore_abfd ATTRIBUTE_UNUSED;
PTR afile;
asymbol *symbol;
bfd_print_symbol_type how;
#define srec_bfd_get_relocated_section_contents \
bfd_generic_get_relocated_section_contents
#define srec_bfd_relax_section bfd_generic_relax_section
+#define srec_bfd_gc_sections bfd_generic_gc_sections
#define srec_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
#define srec_bfd_link_add_symbols _bfd_generic_link_add_symbols
#define srec_bfd_final_link _bfd_generic_final_link