* 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
This commit is contained in:
parent
4c2cea9dbd
commit
4aa65bb8c1
@ -1,3 +1,16 @@
|
||||
Tue May 5 16:47:54 1998 Richard Henderson <rth@cygnus.com>
|
||||
|
||||
* 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.
|
||||
|
||||
Mon May 4 16:10:33 1998 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* sunos.c (sunos_check_dynamic_reloc): Don't use the PLT address
|
||||
when generating a normal executable for a symbol defined in a
|
||||
regular file. When copying a reloc into the output file, adjust
|
||||
the addend for a PC relative reloc against a global symbol.
|
||||
|
||||
Mon May 4 10:08:18 1998 Tom Tromey <tromey@cygnus.com>
|
||||
|
||||
* libbfd.h: Rebuilt.
|
||||
|
31
bfd/srec.c
31
bfd/srec.c
@ -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;
|
||||
|
10
bfd/syms.c
10
bfd/syms.c
@ -354,6 +354,8 @@ bfd_is_local_label (abfd, sym)
|
||||
return false;
|
||||
if (sym->name == NULL)
|
||||
return false;
|
||||
if (sym->flags & BSF_DEBUGGING)
|
||||
return true;
|
||||
return bfd_is_local_label_name (abfd, sym->name);
|
||||
}
|
||||
|
||||
@ -728,9 +730,9 @@ struct indexentry
|
||||
bfd_vma val;
|
||||
bfd_byte *stab;
|
||||
bfd_byte *str;
|
||||
bfd_byte *directory_name;
|
||||
bfd_byte *file_name;
|
||||
bfd_byte *function_name;
|
||||
char *directory_name;
|
||||
char *file_name;
|
||||
char *function_name;
|
||||
};
|
||||
|
||||
/* Compare two indexentry structures. This is called via qsort. */
|
||||
@ -774,7 +776,7 @@ struct stab_find_info
|
||||
struct indexentry *cached_indexentry;
|
||||
bfd_vma cached_offset;
|
||||
bfd_byte *cached_stab;
|
||||
bfd_byte *cached_file_name;
|
||||
char *cached_file_name;
|
||||
#endif
|
||||
|
||||
/* Saved ptr to malloc'ed filename. */
|
||||
|
Loading…
Reference in New Issue
Block a user