aboutsummaryrefslogtreecommitdiff
path: root/bfd/coff-h8300.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2005-02-24 13:34:38 +0000
committerAlan Modra <amodra@gmail.com>2005-02-24 13:34:38 +0000
commitf60ca5e351eb190cc10c1a9d414fc8894737e565 (patch)
tree4feafb4eb5044d995a35150762bd54a85578536b /bfd/coff-h8300.c
parentf3f4bccaf6189a2a28e9c1436fabf2d668f8ef03 (diff)
downloadgdb-f60ca5e351eb190cc10c1a9d414fc8894737e565.zip
gdb-f60ca5e351eb190cc10c1a9d414fc8894737e565.tar.gz
gdb-f60ca5e351eb190cc10c1a9d414fc8894737e565.tar.bz2
* coffcode.h (coff_print_aux): Warning fix.
* elf-m10300.c (mn10300_elf_relax_section): Use section->id instead of section pointer to identify. * coff-h8300.c (h8300_reloc16_extra_cases): Likewise. Allocate the correct size buffer for local sym mangling too. (h8300_bfd_link_add_symbols): Likewise. * elf32-sh-symbian.c (sh_symbian_process_embedded_commands): Fix warning. * elf32-sh64.c (shmedia_prepare_reloc): Use %B and %p in error message * elf32-xtensa.c (literal_value_hash): Warning fix. * versados.c (process_otr): Warning fix. (versados_canonicalize_reloc): Likewise. * vms-gsd.c (_bfd_vms_slurp_gsd): Warning fix. * vms.c (fill_section_ptr): Warning fix.
Diffstat (limited to 'bfd/coff-h8300.c')
-rw-r--r--bfd/coff-h8300.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/bfd/coff-h8300.c b/bfd/coff-h8300.c
index 0dfbd8b..d216f97 100644
--- a/bfd/coff-h8300.c
+++ b/bfd/coff-h8300.c
@@ -1,6 +1,6 @@
/* BFD back-end for Renesas H8/300 COFF binaries.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003, 2004
+ 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
Written by Steve Chamberlain, <sac@cygnus.com>.
@@ -1175,14 +1175,12 @@ h8300_reloc16_extra_cases (bfd *abfd, struct bfd_link_info *link_info,
name = symbol->name;
if (symbol->flags & BSF_LOCAL)
{
- char *new_name = bfd_malloc ((bfd_size_type) strlen (name) + 9);
+ char *new_name = bfd_malloc ((bfd_size_type) strlen (name) + 10);
if (new_name == NULL)
abort ();
- strcpy (new_name, name);
- sprintf (new_name + strlen (name), "_%08x",
- (int) symbol->section);
+ sprintf (new_name, "%s_%08x", name, symbol->section->id);
name = new_name;
}
@@ -1365,13 +1363,11 @@ h8300_bfd_link_add_symbols (bfd *abfd, struct bfd_link_info *info)
{
char *new_name;
- new_name = bfd_malloc ((bfd_size_type) strlen (name) + 9);
+ new_name = bfd_malloc ((bfd_size_type) strlen (name) + 10);
if (new_name == NULL)
abort ();
- strcpy (new_name, name);
- sprintf (new_name + strlen (name), "_%08x",
- (int) symbol->section);
+ sprintf (new_name, "%s_%08x", name, symbol->section->id);
name = new_name;
}