diff options
author | Richard Henderson <rth@redhat.com> | 1998-05-05 23:49:26 +0000 |
---|---|---|
committer | Richard Henderson <rth@redhat.com> | 1998-05-05 23:49:26 +0000 |
commit | 4aa65bb8c1e9ce165e775bef10f0ecc88baa650c (patch) | |
tree | f85ea919c384ab408aab4df5c5054d659d215f82 /bfd/srec.c | |
parent | 4c2cea9dbd2fd068337a6e893ac56cdcc0af4a08 (diff) | |
download | gdb-4aa65bb8c1e9ce165e775bef10f0ecc88baa650c.zip gdb-4aa65bb8c1e9ce165e775bef10f0ecc88baa650c.tar.gz gdb-4aa65bb8c1e9ce165e775bef10f0ecc88baa650c.tar.bz2 |
* srec.c (srec_write_symbols): Use bfd_is_local_label rather than
an ad-hoc test. Kill bogus #if 0 code.
* syms.c (bfd_is_local_label): Consider BSF_DEBUGGING symbols local.
PR 13455
Diffstat (limited to 'bfd/srec.c')
-rw-r--r-- | bfd/srec.c | 31 |
1 files changed, 7 insertions, 24 deletions
@@ -1,5 +1,6 @@ /* BFD back-end for s-record objects. - Copyright 1990, 91, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc. + Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 1998 + Free Software Foundation, Inc. Written by Steve Chamberlain of Cygnus Support <sac@cygnus.com>. This file is part of BFD, the Binary File Descriptor library. @@ -109,6 +110,7 @@ DESCRIPTION #include "libiberty.h" #include <ctype.h> +static void srec_get_symbol_info PARAMS ((bfd *, asymbol *, symbol_info *)); static void srec_print_symbol PARAMS ((bfd *, PTR, asymbol *, bfd_print_symbol_type)); static void srec_init PARAMS ((void)); @@ -285,7 +287,7 @@ srec_bad_byte (abfd, lineno, c, error) buf[1] = '\0'; } (*_bfd_error_handler) - ("%s:%d: Unexpected character `%s' in S-record file\n", + (_("%s:%d: Unexpected character `%s' in S-record file\n"), bfd_get_filename (abfd), lineno, buf); bfd_set_error (bfd_error_bad_value); } @@ -405,7 +407,7 @@ srec_scan (abfd) while ((c = srec_get_byte (abfd, &error)) != EOF && ! isspace (c)) { - if (p - symbuf >= alc) + if ((unsigned int) (p - symbuf) >= alc) { char *n; @@ -1057,26 +1059,7 @@ srec_write_symbols (abfd) for (i = 0; i < count; i++) { asymbol *s = table[i]; -#if 0 - int len = strlen (s->name); - - /* If this symbol has a .[ocs] in it, it's probably a file name - and we'll output that as the module name */ - - if (len > 3 && s->name[len - 2] == '.') - { - int l; - sprintf (buffer, "$$ %s\r\n", s->name); - l = strlen (buffer); - if (bfd_write (buffer, l, 1, abfd) != l) - return false; - } - else -#endif - if (s->flags & (BSF_GLOBAL | BSF_LOCAL) - && (s->flags & BSF_DEBUGGING) == 0 - && s->name[0] != '.' - && s->name[0] != 't') + if (! bfd_is_local_label (abfd, s)) { /* Just dump out non debug symbols */ bfd_size_type l; @@ -1217,7 +1200,7 @@ srec_get_symtab (abfd, alocation) } /*ARGSUSED*/ -void +static void srec_get_symbol_info (ignore_abfd, symbol, ret) bfd *ignore_abfd; asymbol *symbol; |