variables. Add default case to enum switches.
* coff-arm.c (bfd_arm_allocate_interworking_sections): Only
compile if not COFF_IMAGE_WITH_PE.
(record_arm_to_thumb_glue, record_thumb_to_arm_glue): Likewise.
(bfd_arm_get_bfd_for_interworking): Likewise.
(bfd_arm_process_before_allocation): Likewise.
* epoc-pei-arm.c: Don't rename bfd_arm functions.
* pei-arm.c: Likewise.
* elf32-mips.c (mips_elf_link_hash_table_create): Don't declare.
(MIPS_ELF_ADD_DYNAMIC_ENTRY): Correct last change.
(mips_elf_got16_entry): Put parens around & in body of ==.
(mips_elf_calculate_relocation): Correct test for empty string.
* vms-gsd.c: Use _bfd_error_handler rather than fprintf to
stderr.
* vms-misc.c (_bfd_vms_length_hash_symbol): Correct sprintf
format.
+1999-07-12 Ian Lance Taylor <ian@zembu.com>
+
+ * Many files: Changes to avoid gcc warnings: Remove unused local
+ variables. Add default case to enum switches.
+ * coff-arm.c (bfd_arm_allocate_interworking_sections): Only
+ compile if not COFF_IMAGE_WITH_PE.
+ (record_arm_to_thumb_glue, record_thumb_to_arm_glue): Likewise.
+ (bfd_arm_get_bfd_for_interworking): Likewise.
+ (bfd_arm_process_before_allocation): Likewise.
+ * epoc-pei-arm.c: Don't rename bfd_arm functions.
+ * pei-arm.c: Likewise.
+ * elf32-mips.c (mips_elf_link_hash_table_create): Don't declare.
+ (MIPS_ELF_ADD_DYNAMIC_ENTRY): Correct last change.
+ (mips_elf_got16_entry): Put parens around & in body of ==.
+ (mips_elf_calculate_relocation): Correct test for empty string.
+ * vms-gsd.c: Use _bfd_error_handler rather than fprintf to
+ stderr.
+ * vms-misc.c (_bfd_vms_length_hash_symbol): Correct sprintf
+ format.
+
1999-07-11 Ian Lance Taylor <ian@zembu.com>
* Many files: Changes to avoid gcc warnings: Add ATTRIBUTE_UNUSED
PARAMS ((struct bfd_link_info *, CONST char *, bfd *));
static struct coff_link_hash_entry * find_arm_glue
PARAMS ((struct bfd_link_info *, CONST char *, bfd *));
+#ifndef COFF_IMAGE_WITH_PE
static void record_arm_to_thumb_glue
PARAMS ((struct bfd_link_info *, struct coff_link_hash_entry *));
static void record_thumb_to_arm_glue
PARAMS ((struct bfd_link_info *, struct coff_link_hash_entry *));
+#endif
static boolean coff_arm_merge_private_bfd_data
PARAMS ((bfd *, bfd *));
static boolean coff_arm_print_private_bfd_data
return true;
}
-#ifdef COFF_IMAGE_WITH_PE
-static
-#endif
+#ifndef COFF_IMAGE_WITH_PE
+
boolean
bfd_arm_allocate_interworking_sections (info)
struct bfd_link_info * info;
/* Select a BFD to be used to hold the sections used by the glue code.
This function is called from the linker scripts in ld/emultempl/
{armcoff/pe}.em */
-#ifdef COFF_IMAGE_WITH_PE
-static
-#endif
+
boolean
bfd_arm_get_bfd_for_interworking (abfd, info)
bfd * abfd;
return true;
}
-#ifdef COFF_IMAGE_WITH_PE
-static
-#endif
boolean
bfd_arm_process_before_allocation (abfd, info, support_old_code)
bfd * abfd;
return true;
}
+#endif /* ! defined (COFF_IMAGE_WITH_PE) */
+
#define coff_bfd_reloc_type_lookup coff_arm_reloc_type_lookup
#define coff_relocate_section coff_arm_relocate_section
#define coff_bfd_is_local_label_name coff_arm_is_local_label_name
/* BFD back-end for Motorolla MCore COFF/PE
- Copyright 1999
- Free Software Foundation, Inc.
+ Copyright 1999 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
for (; rel < relend; rel++)
{
- asection * toc_section = NULL;
- bfd_vma relocation;
long symndx;
struct internal_syment * sym;
bfd_vma val;
/* Matsushita 10300 specific support for 32-bit ELF
- Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
case bfd_link_hash_common:
return h->root.u.c.p->section;
+
+ default:
+ break;
}
}
}
asection *sym_sec;
const char *sym_name;
char *new_name;
- Elf_Internal_Shdr *hdr;
/* Get cached copy of section contents if it exists. */
if (elf_section_data (section)->this_hdr.contents != NULL)
struct elf32_mn10300_link_hash_entry *sym_hash;
asection *sym_sec;
const char *sym_name;
- Elf_Internal_Shdr *hdr;
char *new_name;
bfd_elf32_swap_symbol_in (input_bfd, esym, &isym);
{
Elf_Internal_Sym isym;
asection *sym_sec;
- Elf_Internal_Shdr *hdr;
const char *sym_name;
char *new_name;
boolean linker;
{
unsigned long val;
- unsigned int i;
- Elf_Internal_Shdr **hdrpp;
- const char *name;
- asection *sec;
switch (bfd_get_mach (abfd))
{
{
long r_type;
unsigned long r_index;
- unsigned char code;
struct elf_link_hash_entry *h;
boolean overflow = false;
bfd_vma upper_insn = bfd_get_16 (input_bfd, hit_data);
bfd_vma lower_insn = bfd_get_16 (input_bfd, hit_data + 2);
- bfd_vma src_mask = 0x007FFFFE;
bfd_signed_vma reloc_signed_max = (1 << (howto->bitsize - 1)) - 1;
bfd_signed_vma reloc_signed_min = ~ reloc_signed_max;
bfd_vma check;
case bfd_link_hash_common:
return h->root.u.c.p->section;
+
+ default:
+ break;
}
}
}
/* D10V-specific support for 32-bit ELF
- Copyright (C) 1996 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1998, 1999 Free Software Foundation, Inc.
Contributed by Martin Hunt (hunt@cygnus.com).
This file is part of BFD, the Binary File Descriptor library.
case bfd_link_hash_common:
return h->root.u.c.p->section;
+
+ default:
+ break;
}
}
}
/* FR30-specific support for 32-bit ELF.
- Copyright (C) 1998 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
case bfd_link_hash_common:
return h->root.u.c.p->section;
+
+ default:
+ break;
}
}
}
/* BFD back-end for HP PA-RISC ELF files.
- Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 1997
+ Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999
Free Software Foundation, Inc.
Written by
case R_PARISC_PCREL17F:
{
bfd_vma location;
- unsigned int len, caller_args, callee_args;
+ unsigned int len;
char *new_name, *stub_name;
/* Get the field selector right. We'll need it in a minute. */
bfd *input_bfd;
asection *section, *stub_sec = 0;
Elf_Internal_Shdr *symtab_hdr;
- Elf_Internal_Sym *local_syms, *isym, **all_local_syms;
- Elf32_External_Sym *ext_syms, *esym;
+ Elf_Internal_Sym *local_syms, **all_local_syms;
unsigned int i, index, bfd_count = 0;
struct elf32_hppa_stub_hash_table *stub_hash_table = 0;
case bfd_link_hash_common:
return h->root.u.c.p->section;
+
+ default:
+ break;
}
}
}
bfd *dynobj;
asection *sgot;
asection *sdyn;
- int plt_entry0_size, plt_off1, plt_off2;
dynobj = elf_hash_table (info)->dynobj;
{
flagword old_flags;
flagword new_flags;
- boolean error;
/* Check if we have the same endianess */
if ( ibfd->xvec->byteorder != obfd->xvec->byteorder
Elf_Internal_Rela * rel = relocs;
Elf_Internal_Rela * relend = relocs + input_section->reloc_count;
boolean ret = true;
- long insn;
#ifdef DEBUG
fprintf (stderr,
case bfd_link_hash_common:
return h->root.u.c.p->section;
+
+ default:
+ break;
}
}
}
PARAMS ((bfd *, const char *));
static struct bfd_hash_entry *mips_elf_link_hash_newfunc
PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
-static struct bfd_link_hash_table *mips_elf_link_hash_table_create
- PARAMS ((bfd *));
static int gptab_compare PARAMS ((const void *, const void *));
static void mips_elf_relocate_hi16
PARAMS ((bfd *, Elf_Internal_Rela *, Elf_Internal_Rela *, bfd_byte *,
#else
#define MIPS_ELF_ADD_DYNAMIC_ENTRY(info, tag, val) \
(ABI_64_P (elf_hash_table (info)->dynobj) \
- : (abort (), false) \
- ? bfd_elf32_add_dynamic_entry (info, tag, val))
+ ? (abort (), false) \
+ : bfd_elf32_add_dynamic_entry (info, tag, val))
#endif
/* The number of local .got entries we reserve. */
{
asection *sgot;
bfd_vma gp;
- char *error_message;
sgot = mips_elf_got_section (dynobj);
gp = _bfd_get_gp_value (output_bfd);
entry += MIPS_ELF_GOT_SIZE (abfd))
{
address = MIPS_ELF_GET_WORD (abfd, entry);
- if (address & 0xffff0000 == value)
+ if ((address & 0xffff0000) == value)
{
/* This entry has the right high-order 16 bits. */
index = MIPS_ELF_GOT_SIZE (abfd) * (entry - sgot->contents);
*namep = bfd_elf_string_from_elf_section (input_bfd,
symtab_hdr->sh_link,
sym->st_name);
- if (*namep = '\0')
+ if (*namep == '\0')
*namep = bfd_section_name (input_bfd, sec);
}
else
const Elf_Internal_Rela *relend;
bfd_vma addend;
bfd_vma last_hi16_addend;
- boolean next_relocation_for_same_address_p = false;
boolean use_saved_addend_p = false;
boolean last_hi16_addend_valid_p = false;
struct elf_backend_data *bed;
{
const char *name;
bfd_vma value;
- int result;
reloc_howto_type *howto;
/* Find the relocation howto for this relocation. */
other dynamic symbol. */
{
unsigned int c, i;
- struct mips_got_info *g;
c = 0;
if (elf_hash_table (info)->dynamic_sections_created)
/* Hitachi SH specific support for 32-bit ELF
- Copyright 1996, 1997, 1998 Free Software Foundation, Inc.
+ Copyright 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
Contributed by Ian Lance Taylor, Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
case bfd_link_hash_common:
return h->root.u.c.p->section;
+
+ default:
+ break;
}
}
}
case bfd_link_hash_common:
return h->root.u.c.p->section;
+
+ default:
+ break;
}
}
}
/* V850-specific support for 32-bit ELF
- Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
hi16s_location * entry;
hi16s_location * previous = NULL;
hi16s_location * prev;
- int i;
bfd_byte * addr;
/* Search the table. Record the most recent entry that matches. */
case bfd_link_hash_common:
return h->root.u.c.p->section;
+
+ default:
+ break;
}
}
}
#define TARGET_BIG_SYM arm_epoc_pei_big_vec
#define TARGET_BIG_NAME "epoc-pei-arm-big"
-#define bfd_arm_allocate_interworking_sections \
- bfd_arm_epoc_pe_allocate_interworking_sections
-#define bfd_arm_get_bfd_for_interworking \
- bfd_arm_epoc_pe_get_bfd_for_interworking
-#define bfd_arm_process_before_allocation \
- bfd_arm_epoc_pe_process_before_allocation
-
#include "pei-arm.c"
#define PCRELOFFSET true
#define COFF_LONG_SECTION_NAMES
-#ifndef bfd_arm_allocate_interworking_sections
-#define bfd_arm_allocate_interworking_sections \
- bfd_arm_pe_allocate_interworking_sections
-#define bfd_arm_get_bfd_for_interworking \
- bfd_arm_pe_get_bfd_for_interworking
-#define bfd_arm_process_before_allocation \
- bfd_arm_pe_process_before_allocation
-#endif
-
#include "coff-arm.c"
/* vms-gsd.c -- BFD back-end for VAX (openVMS/VAX) and
EVAX (openVMS/Alpha) files.
- Copyright 1996, 1997, 1998 Free Software Foundation Inc.
+ Copyright 1996, 1997, 1998, 1999 Free Software Foundation Inc.
go and read the openVMS linker manual (esp. appendix B)
if you don't know what's going on here :-)
section = bfd_make_section (abfd, name);
if (!section)
{
- fprintf (stderr, "bfd_make_section (%s) failed\n", name);
+ (*_bfd_error_handler) (_("bfd_make_section (%s) failed"),
+ name);
return -1;
}
old_flags = bfd_getl16 (vms_rec + 2);
new_flags |= SEC_IS_COMMON;
if (!bfd_set_section_flags (abfd, section, new_flags))
{
- fprintf (stderr, "bfd_set_section_flags (%s, %x) failed\n", name, new_flags);
+ (*_bfd_error_handler)
+ (_("bfd_set_section_flags (%s, %x) failed"),
+ name, new_flags);
return -1;
}
section->alignment_power = vms_rec[1];
section->contents = old_section->contents;
if (section->_raw_size < old_section->_raw_size)
{
- fprintf (stderr, "Size mismatch section %s=%d, %s=%d\n", old_section->name, old_section->_raw_size, section->name, section->_raw_size);
+ (*_bfd_error_handler)
+ (_("Size mismatch section %s=%lx, %s=%lx"),
+ old_section->name,
+ (unsigned long) old_section->_raw_size,
+ section->name,
+ (unsigned long) section->_raw_size);
return -1;
}
else if (section->_raw_size > old_section->_raw_size)
char dummy_name[10];
char *sname;
flagword new_flags, old_flags;
- char *nptr, *uptr;
#if VMS_DEBUG
vms_debug (2, "vms_write_gsd (%p, %d)\n", abfd, objtype);
/* vms-hdr.c -- BFD back-end for VMS/VAX (openVMS/VAX) and
EVAX (openVMS/Alpha) files.
- Copyright 1996, 1997, 1998 Free Software Foundation, Inc.
+ Copyright 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
HDR record handling functions
EMH record handling functions
if (symbol->flags & BSF_FILE)
{
- char *s;
-
if (strncmp ((char *)symbol->name, "<CASE:", 6) == 0)
{
PRIV(flag_hash_long_names) = symbol->name[6] - '0';
/* vms-misc.c -- Miscellaneous functions for VAX (openVMS/VAX) and
EVAX (openVMS/Alpha) files.
- Copyright 1996, 1997, 1998 Free Software Foundation, Inc.
+ Copyright 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
Written by Klaus K"ampf (kkaempf@rmi.de)
const char *in;
int maxlen;
{
- long int init;
long int result;
int in_len;
- char *pnt = 0;
char *new_name;
const char *old_name;
int i;
if ((in_len > maxlen)
&& PRIV(flag_hash_long_names))
- sprintf (out, "_%08x", result);
+ sprintf (out, "_%08lx", result);
else
*out = 0;
/* vms-tir.c -- BFD back-end for VAX (openVMS/VAX) and
EVAX (openVMS/Alpha) files.
- Copyright 1996, 1997, 1998 Free Software Foundation, Inc.
+ Copyright 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
TIR record handling functions
ETIR record handling functions
bfd *abfd;
int idx;
{
- asection *section;
-
#if VMS_DEBUG
_bfd_vms_debug (4, "alloc_section %d\n", idx);
#endif
/* vms.c -- BFD back-end for VAX (openVMS/VAX) and
EVAX (openVMS/Alpha) files.
- Copyright 1996, 1997, 1998 Free Software Foundation, Inc.
+ Copyright 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
Written by Klaus K"ampf (kkaempf@rmi.de)
vms_fixup_sections (abfd)
bfd *abfd;
{
- asection *s;
-
if (PRIV(fixup_done))
return true;
{
asection *sec;
vms_section *es, *es1;
- vms_reloc *er, *er1;
int i;
#if VMS_DEBUG