+2005-02-24 Alan Modra <amodra@bigpond.net.au>
+
+ * 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.
+
2005-02-23 H.J. Lu <hongjiu.lu@intel.com>
* coff-tic54x.c (SWAP_OUT_RELOC_EXTRA): Defined.
/* 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>.
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;
}
{
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;
}
/* Support for the generic parts of most COFF variants, for BFD.
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 Cygnus Support.
{
BFD_ASSERT (! aux->fix_scnlen);
#ifdef XCOFF64
- fprintf (file, "val %5lld", aux->u.auxent.x_csect.x_scnlen.l);
+ fprintf (file, "val %5lld",
+ (long long) aux->u.auxent.x_csect.x_scnlen.l);
#else
fprintf (file, "val %5ld", (long) aux->u.auxent.x_csect.x_scnlen.l);
#endif
fprintf (file, "indx ");
if (! aux->fix_scnlen)
#ifdef XCOFF64
- fprintf (file, "%4lld", aux->u.auxent.x_csect.x_scnlen.l);
+ fprintf (file, "%4lld",
+ (long long) aux->u.auxent.x_csect.x_scnlen.l);
#else
fprintf (file, "%4ld", (long) aux->u.auxent.x_csect.x_scnlen.l);
#endif
/* Matsushita 10300 specific support for 32-bit ELF
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
if (new_name == 0)
goto error_return;
- sprintf (new_name, "%s_%08x",
- sym_name, (int) sym_sec);
+ sprintf (new_name, "%s_%08x", sym_name, sym_sec->id);
sym_name = new_name;
elftab = &hash_table->static_hash_table->root;
if (new_name == 0)
goto error_return;
- sprintf (new_name, "%s_%08x",
- sym_name, (int) sym_sec);
+ sprintf (new_name, "%s_%08x", sym_name, sym_sec->id);
sym_name = new_name;
elftab = &hash_table->static_hash_table->root;
new_name = bfd_malloc (amt);
if (new_name == 0)
goto error_return;
- sprintf (new_name, "%s_%08x", sym_name, (int) sym_sec);
+ sprintf (new_name, "%s_%08x", sym_name, sym_sec->id);
sym_name = new_name;
elftab = &hash_table->static_hash_table->root;
new_name = bfd_malloc ((bfd_size_type) strlen (sym_name) + 10);
if (new_name == 0)
goto error_return;
- sprintf (new_name, "%s_%08x", sym_name, (int) sym_sec);
+ sprintf (new_name, "%s_%08x", sym_name, sym_sec->id);
sym_name = new_name;
h = (struct elf32_mn10300_link_hash_entry *)
if (! result)
{
if (DEBUG)
- fprintf (stderr, "offset into .directive section: %d\n",
- directive - (char *) contents);
+ fprintf (stderr, "offset into .directive section: %ld\n",
+ (long) (directive - (char *) contents));
bfd_set_error (bfd_error_invalid_operation);
_bfd_error_handler (_("%B: Unrecognised .directive command: %s"),
if (dropped != 0)
{
(*_bfd_error_handler)
- (_("%s: error: unaligned relocation type %d at %08x reloc %08x\n"),
- bfd_get_filename (input_section->owner), ELF32_R_TYPE (rel->r_info),
- (unsigned)rel->r_offset, (unsigned)relocation);
+ (_("%B: error: unaligned relocation type %d at %08x reloc %p\n"),
+ input_section->owner, ELF32_R_TYPE (rel->r_info),
+ (unsigned) rel->r_offset, relocation);
return FALSE;
}
sec_or_hash = r_reloc_get_section (&src->r_rel);
else
sec_or_hash = r_reloc_get_hash_entry (&src->r_rel);
- hash_val += hash_bfd_vma ((bfd_vma) (unsigned) sec_or_hash);
+ hash_val += hash_bfd_vma ((bfd_vma) (size_t) sec_or_hash);
}
return hash_val;
}
EDATA (abfd, otr->esdid - 1).section->relocation + rn;
n->address = dst_idx;
- n->sym_ptr_ptr = (asymbol **) esdid;
+ n->sym_ptr_ptr = (asymbol **) (size_t) esdid;
n->addend = 0;
n->howto = versados_howto_table + ((j & 1) * 2) + (sizeinwords - 1);
}
/* translate from indexes to symptr ptrs */
for (count = 0; count < section->reloc_count; count++)
{
- int esdid = (int) src[count].sym_ptr_ptr;
+ int esdid = (int) (size_t) src[count].sym_ptr_ptr;
if (esdid == 0)
{
/* vms-gsd.c -- BFD back-end for VAX (openVMS/VAX) and
EVAX (openVMS/Alpha) files.
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2004
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2004, 2005
Free Software Foundation, Inc.
go and read the openVMS linker manual (esp. appendix B)
else
psect = vms_rec[value_offset-1];
- symbol->section = (asection *)psect;
+ symbol->section = (asection *) (size_t) psect;
#if VMS_DEBUG
vms_debug(4, "gsd sym def #%d (%s, %d [%p], %04x=%s)\n", abfd->symcount,
symbol->name, (int)symbol->section, symbol->section, old_flags, flag2str(gsyflagdesc, old_flags));
/* vms.c -- BFD back-end for VAX (openVMS/VAX) and
EVAX (openVMS/Alpha) files.
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
Written by Klaus K"ampf (kkaempf@rmi.de)
/* fill forward references (these contain section number, not section ptr). */
- if ((unsigned int) sec < priv_section_count)
+ if ((unsigned int) (size_t) sec < priv_section_count)
{
- sec = ((vms_symbol_entry *)entry)->symbol->section =
- ((asection **)sections)[(int)sec];
+ sec = ((vms_symbol_entry *) entry)->symbol->section =
+ ((asection **) sections)[(unsigned int) (size_t) sec];
}
if (strcmp (sym->name, sec->name) == 0)