+2010-06-27 Alan Modra <amodra@gmail.com>
+
+ * bout.c (aligncode): Delete set but unused variables.
+ * coff-mcore.c (coff_mcore_relocate_section): Likewise.
+ * coff-ppc.c (ppc_record_toc_entry): Likewise.
+ (coff_ppc_relocate_section): Likewise.
+ * coff-rs6000.c (xcoff_complain_overflow_bitfield_func): Likewise.
+ * elf-m10200.c (mn10200_elf_relax_delete_bytes): Likewise.
+ * elf-m10300.c (mn10300_elf_final_link_relocate): Likewise.
+ (mn10300_elf_relax_section): Likewise.
+ * elf32-arm.c (arm_build_one_stub, arm_size_one_stub): Likewise.
+ (record_vfp11_erratum_veneer): Likewise.
+ (bfd_elf32_arm_vfp11_erratum_scan): Likewise.
+ (elf32_arm_final_link_relocate): Likewise.
+ (elf32_arm_check_relocs, arm_map_one_stub): Likewise.
+ * elf32-avr.c (elf32_avr_relax_delete_bytes): Likewise.
+ (elf32_avr_relax_section): Likewise.
+ (avr_mark_stub_not_to_be_necessary): Likewise.
+ * elf32-bfin.c (_bfin_create_got_section): Likewise.
+ * elf32-cr16.c (cr16_elf_final_link_relocate): Likewise.
+ (elf32_cr16_relax_delete_bytes): Likewise.
+ * elf32-cr16c.c (cr16c_elf_final_link_relocate): Likewise.
+ * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
+ * elf32-crx.c (elf32_crx_relax_delete_bytes): Likewise.
+ * elf32-h8300.c (elf32_h8_relax_section): Likewise.
+ (elf32_h8_relax_delete_bytes): Likewise.
+ * elf32-hppa.c (elf32_hppa_check_relocs): Likewise.
+ * elf32-i370.c (i370_elf_check_relocs): Likewise.
+ (elf_relocate_section): Likewise.
+ * elf32-ip2k.c (adjust_all_relocations): Likewise.
+ (ip2k_elf_relax_section): Likewise.
+ * elf32-lm32.c (lm32_elf_relocate_section): Likewise.
+ (lm32_elf_check_relocs): Likewise.
+ (lm32_elf_finish_dynamic_sections): Likewise.
+ (lm32_elf_finish_dynamic_symbol): Likewise.
+ * elf32-m32c.c (m32c_offset_for_reloc): Likewise.
+ (m32c_elf_relax_delete_bytes): Likewise.
+ * elf32-m32r.c (m32r_elf_finish_dynamic_symbol): Likewise.
+ (m32r_elf_finish_dynamic_sections): Likewise.
+ (m32r_elf_check_relocs, m32r_elf_fake_sections): Likewise.
+ * elf32-m68hc11.c (m68hc11_elf_relax_section): Likewise.
+ * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
+ * elf32-m68k.c (elf_m68k_gc_sweep_hook): Likewise.
+ * elf32-microblaze.c (microblaze_elf_relocate_section): Likewise.
+ (microblaze_elf_check_relocs): Likewise.
+ (microblaze_elf_finish_dynamic_symbol): Likewise.
+ * elf32-msp430.c (msp430_elf_relax_delete_bytes): Likewise.
+ * elf32-ppc.c (ppc_elf_tls_optimize): Likewise.
+ * elf32-rx.c (rx_elf_relocate_section): Likewise.
+ (elf32_rx_relax_delete_bytes, rx_offset_for_reloc): Likewise.
+ (elf32_rx_relax_section): Likewise.
+ * elf32-score.c (score_elf_got_offset_from_index): Likewise.
+ (score_elf_final_link_relocate): Likewise.
+ (s3_bfd_score_elf_relocate_section): Likewise.
+ * elf32-score7.c (score_elf_got_offset_from_index): Likewise.
+ (s7_bfd_score_elf_relocate_section): Likewise.
+ * elf32-sh.c (sh_elf_check_relocs): Likewise.
+ * elf32-spu.c (spu_elf_relocate_section): Likewise.
+ * elf32-v850.c (v850_elf_check_relocs): Likewise.
+ (find_remembered_hi16s_reloc): Likewise.
+ * elf32-vax.c (elf32_vax_merge_private_bfd_data): Likewise.
+ (elf_vax_relocate_section): Likewise.
+ * elf32-xc16x.c (elf32_xc16x_relocate_section): Likewise.
+ * elf32-xtensa.c (xlate_offset_with_removed_text): Likewise.
+ (move_literal): Likewise.
+ * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
+ (elf64_hppa_check_relocs): Likewise.
+ (elf64_hppa_finish_dynamic_symbol): Likewise.
+ (elf64_hppa_relocate_section): Likewise.
+ * elf64-mmix.c (mmix_elf_reloc, mmix_elf_relax_section): Likewise.
+ * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
+ (ppc64_elf_edit_opd, ppc64_elf_edit_toc): Likewise.
+ * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
+ (elfNN_vms_section_from_shdr): Likewise.
+ * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
+ (_bfd_sparc_elf_relocate_section): Likewise.
+ * hp300hpux.c (slurp_symbol_table): Likewise.
+ * i386lynx.c (swap_std_reloc_out, swap_std_reloc_in): Likewise.
+ * mach-o.c (bfd_mach_o_write_thread): Likewise.
+ * mmo.c (mmo_scan, mmo_write_symbols_and_terminator): Likewise.
+ * nlm32-sparc.c (nlm_sparc_read_reloc): Likewise.
+ * pdp11.c (pdp11_aout_link_input_section): Likewise.
+ (aout_link_input_section, aout_link_input_bfd): Likewise.
+ * pe-mips.c (mips_swap_reloc_out): Likewise.
+ (coff_pe_mips_relocate_section): Likewise.
+ * som.c (som_bfd_ar_write_symbol_stuff): Likewise.
+ * vms-alpha.c (_bfd_vms_slurp_egsd): Likewise.
+ * xsym.c (bfd_sym_fetch_type_information_table_ent): Likewise.
+
+ * coff-i860.c (i860_reloc_processing): Avoid set but unused warning.
+ * coffcode.h (coff_compute_section_file_positions): Likewise.
+ (coff_slurp_reloc_table): Likewise.
+ * cpu-arm.c (arm_check_note): Likewise.
+ * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Likewise.
+ * elf32-avr.c (elf32_avr_relocate_section): Likewise.
+ * elf32-bfin.c (elf32_bfin_merge_private_bfd_data): Likewise.
+ * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
+ * elf32-moxie.c (moxie_elf_relocate_section): Likewise.
+ * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
+ * elf32-sh64.c (_bfd_sh_align_load_span): Likewise.
+ * ieee.c (parse_expression): Likewise.
+ (ieee_slurp_external_symbols, drop_int): Likewise.
+ * peXXigen.c (pe_print_pdata): Likewise.
+ * versados.c (process_esd): Likewise.
+
2010-06-25 Tristan Gingold <gingold@adacore.com>
* vms-alpha.c (_bfd_vms_write_egsd): Check absolute section with
/* BFD back-end for Intel 960 b.out binaries.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+ 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
Free Software Foundation, Inc.
Written by Cygnus Support.
unsigned int shrink)
{
bfd_vma dot = output_addr (input_section) + r->address;
- bfd_vma gap;
bfd_vma old_end;
bfd_vma new_end;
unsigned int shrink_delta;
than we used to be. */
new_end = ((dot - shrink + size) & ~size);
- /* This is the new end. */
- gap = old_end - ((dot + size) & ~size);
-
shrink_delta = (old_end - new_end) - shrink;
if (shrink_delta)
/* BFD back-end for Intel i860 COFF files.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1999, 2000, 2001, 2002,
- 2003, 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
+ 2003, 2004, 2005, 2007, 2008, 2010 Free Software Foundation, Inc.
Created mostly by substituting "860" for "386" in coff-i386.c
Harry Dolan <dolan@ssd.intel.com>, October 1995
/* Calculate any reloc addend by looking at the symbol. */
CALC_ADDEND (abfd, ptr, (*dst), cache_ptr);
+ (void) ptr;
cache_ptr->address -= asect->vma;
/* BFD back-end for Motorola MCore COFF/PE
- Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007
+ Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2010
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
{
struct internal_reloc * rel;
struct internal_reloc * relend;
- bfd_boolean hihalf;
- bfd_vma hihalf_val;
/* If we are performing a relocatable link, we don't need to do a
thing. The caller will take care of adjusting the reloc
return FALSE;
}
- hihalf = FALSE;
- hihalf_val = 0;
-
rel = relocs;
relend = rel + input_section->reloc_count;
/* BFD back-end for PowerPC Microsoft Portable Executable files.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+ 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
Free Software Foundation, Inc.
Original version pieced together by Kim Knuttila (krk@cygnus.com)
enum toc_type toc_kind ATTRIBUTE_UNUSED;
{
struct ppc_coff_link_hash_entry *h;
- const char *name;
-
int *local_syms;
h = 0;
}
else
{
- name = h->root.root.root.string;
-
/* Check to see if there's a toc slot allocated. If not, do it
here. It will be used in relocate_section. */
if (IS_UNALLOCATED(h->toc_offset))
{
struct internal_reloc *rel;
struct internal_reloc *relend;
- bfd_boolean hihalf;
- bfd_vma hihalf_val;
asection *toc_section = 0;
bfd_vma relocation;
reloc_howto_type *howto = 0;
if (info->relocatable)
return TRUE;
- hihalf = FALSE;
- hihalf_val = 0;
-
rel = relocs;
relend = rel + input_section->reloc_count;
for (; rel < relend; rel++)
appearing on the call instruction is a glue function or not.
A glue function must announce itself via a IMGLUE reloc, and
the reloc contains the required toc restore instruction. */
- bfd_vma x;
- const char *my_name;
-
DUMP_RELOC2 (howto->name, rel);
if (h != 0)
{
- my_name = h->root.root.root.string;
if (h->symbol_is_glue == 1)
{
- x = bfd_get_32 (input_bfd, loc);
bfd_put_32 (input_bfd, (bfd_vma) h->glue_insn, loc);
}
}
bfd_vma relocation;
struct reloc_howto_struct *howto;
{
- bfd_vma addrmask, fieldmask, signmask, ss;
+ bfd_vma fieldmask, signmask, ss;
bfd_vma a, b, sum;
/* Get the values to be added together. For signed and unsigned
the size of an address. For bitfields, all the bits matter.
See also bfd_check_overflow. */
fieldmask = N_ONES (howto->bitsize);
- addrmask = N_ONES (bfd_arch_bits_per_address (input_bfd)) | fieldmask;
a = relocation;
b = val & howto->src_mask;
coff_compute_section_file_positions (bfd * abfd)
{
asection *current;
- asection *previous = NULL;
file_ptr sofar = bfd_coff_filhsz (abfd);
bfd_boolean align_adjust;
int target_index;
#ifdef ALIGN_SECTIONS_IN_FILE
+ asection *previous = NULL;
file_ptr old_sofar;
#endif
bfd_set_section_vma (abfd, current, 0);
#endif
+#ifdef ALIGN_SECTIONS_IN_FILE
previous = current;
+#endif
}
/* It is now safe to write to the output file. If we needed an
/* Calculate any reloc addend by looking at the symbol. */
CALC_ADDEND (abfd, ptr, dst, cache_ptr);
+ (void) ptr;
cache_ptr->address -= asect->vma;
/* !! cache_ptr->section = NULL;*/
/* BFD support for the ARM processor
- Copyright 1994, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, 2007, 2009
- Free Software Foundation, Inc.
+ Copyright 1994, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, 2007,
+ 2009, 2010 Free Software Foundation, Inc.
Contributed by Richard Earnshaw (rwe@pegasus.esprit.ec.org)
This file is part of BFD, the Binary File Descriptor library.
}
/* FIXME: We should probably check the type as well. */
+ (void) type;
if (description_return != NULL)
* description_return = descr;
return FALSE; \
warned = TRUE; \
} \
+ (void) unresolved_reloc; \
+ (void) warned; \
} \
while (0)
/* Matsushita 10200 specific support for 32-bit ELF
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+ 2007, 2010
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
unsigned int sec_shndx;
bfd_byte *contents;
Elf_Internal_Rela *irel, *irelend;
- Elf_Internal_Rela *irelalign;
bfd_vma toaddr;
Elf_Internal_Sym *isym;
Elf_Internal_Sym *isymend;
contents = elf_section_data (sec)->this_hdr.contents;
- /* The deletion must stop at the next ALIGN reloc for an aligment
- power larger than the number of bytes we are deleting. */
-
- irelalign = NULL;
toaddr = sec->size;
irel = elf_section_data (sec)->relocs;
unsigned long r_type = howto->type;
bfd_byte * hit_data = contents + offset;
bfd * dynobj;
- bfd_vma * local_got_offsets;
asection * sgot;
asection * splt;
asection * sreloc;
dynobj = elf_hash_table (info)->dynobj;
- local_got_offsets = elf_local_got_offsets (input_bfd);
-
sgot = NULL;
splt = NULL;
sreloc = NULL;
section = section->next)
{
struct elf32_mn10300_link_hash_entry *hash;
- Elf_Internal_Sym *sym;
asection *sym_sec = NULL;
const char *sym_name;
char *new_name;
/* We need the name and hash table entry of the target
symbol! */
hash = NULL;
- sym = NULL;
sym_sec = NULL;
if (r_index < symtab_hdr->sh_info)
struct bfd_link_info *info;
asection *stub_sec;
bfd *stub_bfd;
- bfd_vma stub_addr;
bfd_byte *loc;
bfd_vma sym_value;
int template_size;
stub_bfd = stub_sec->owner;
- /* This is the address of the start of the stub. */
- stub_addr = stub_sec->output_section->vma + stub_sec->output_offset
- + stub_entry->stub_offset;
-
/* This is the address of the stub destination. */
sym_value = (stub_entry->target_value
+ stub_entry->target_section->output_offset
static bfd_boolean
arm_size_one_stub (struct bfd_hash_entry *gen_entry,
- void * in_arg)
+ void *in_arg ATTRIBUTE_UNUSED)
{
struct elf32_arm_stub_hash_entry *stub_entry;
- struct elf32_arm_link_hash_table *htab;
const insn_sequence *template_sequence;
int template_size, size;
/* Massage our args to the form they really have. */
stub_entry = (struct elf32_arm_stub_hash_entry *) gen_entry;
- htab = (struct elf32_arm_link_hash_table *) in_arg;
BFD_ASSERT((stub_entry->stub_type > arm_stub_none)
&& stub_entry->stub_type < ARRAY_SIZE(stub_definitions));
struct bfd_link_hash_entry *bh;
bfd_vma val;
struct _arm_elf_section_data *sec_data;
- int errcount;
elf32_vfp11_erratum_list *newerr;
hash_table = elf32_arm_hash_table (link_info);
myh->forced_local = 1;
/* Link veneer back to calling location. */
- errcount = ++(sec_data->erratumcount);
+ sec_data->erratumcount += 1;
newerr = (elf32_vfp11_erratum_list *)
bfd_zmalloc (sizeof (elf32_vfp11_erratum_list));
{
elf32_vfp11_erratum_list *newerr =(elf32_vfp11_erratum_list *)
bfd_zmalloc (sizeof (elf32_vfp11_erratum_list));
- int errcount;
- errcount = ++(elf32_arm_section_data (sec)->erratumcount);
+ elf32_arm_section_data (sec)->erratumcount += 1;
newerr->u.b.vfp_insn = veneer_of_insn;
unsigned long r_symndx;
bfd_byte * hit_data = contents + rel->r_offset;
bfd * dynobj = NULL;
- Elf_Internal_Shdr * symtab_hdr;
- struct elf_link_hash_entry ** sym_hashes;
bfd_vma * local_got_offsets;
asection * sgot = NULL;
asection * splt = NULL;
sgot = bfd_get_section_by_name (dynobj, ".got");
splt = bfd_get_section_by_name (dynobj, ".plt");
}
- symtab_hdr = & elf_symtab_hdr (input_bfd);
- sym_hashes = elf_sym_hashes (input_bfd);
local_got_offsets = elf_local_got_offsets (input_bfd);
r_symndx = ELF32_R_SYM (rel->r_info);
const Elf_Internal_Rela *rel_end;
bfd *dynobj;
asection *sreloc;
- bfd_vma *local_got_offsets;
struct elf32_arm_link_hash_table *htab;
bfd_boolean needs_plt;
unsigned long nsyms;
}
dynobj = elf_hash_table (info)->dynobj;
- local_got_offsets = elf_local_got_offsets (abfd);
-
symtab_hdr = & elf_symtab_hdr (abfd);
sym_hashes = elf_sym_hashes (abfd);
nsyms = NUM_SHDR_ENTRIES (symtab_hdr);
void * in_arg)
{
struct elf32_arm_stub_hash_entry *stub_entry;
- struct bfd_link_info *info;
asection *stub_sec;
bfd_vma addr;
char *stub_name;
stub_entry = (struct elf32_arm_stub_hash_entry *) gen_entry;
osi = (output_arch_syminfo *) in_arg;
- info = osi->info;
-
stub_sec = stub_entry->stub_sec;
/* Ensure this stub is attached to the current section being
r_type = ELF32_R_TYPE (rel->r_info);
r_symndx = ELF32_R_SYM (rel->r_info);
- howto = elf_avr_howto_table + ELF32_R_TYPE (rel->r_info);
+ howto = elf_avr_howto_table + r_type;
h = NULL;
sym = NULL;
sec = NULL;
unsigned int sec_shndx;
bfd_byte *contents;
Elf_Internal_Rela *irel, *irelend;
- Elf_Internal_Rela *irelalign;
Elf_Internal_Sym *isym;
Elf_Internal_Sym *isymbuf = NULL;
bfd_vma toaddr;
sec_shndx = _bfd_elf_section_from_bfd_section (abfd, sec);
contents = elf_section_data (sec)->this_hdr.contents;
- /* The deletion must stop at the next ALIGN reloc for an aligment
- power larger than the number of bytes we are deleting. */
-
- irelalign = NULL;
toaddr = sec->size;
irel = elf_section_data (sec)->relocs;
for (irel = elf_section_data (sec)->relocs; irel < irelend; irel++)
{
bfd_vma old_reloc_address;
- bfd_vma shrinked_insn_address;
old_reloc_address = (sec->output_section->vma
+ sec->output_offset + irel->r_offset);
- shrinked_insn_address = (sec->output_section->vma
- + sec->output_offset + addr - count);
/* Get the new reloc address. */
if ((irel->r_offset > addr
Elf_Internal_Rela *irel, *irelend;
bfd_byte *contents = NULL;
Elf_Internal_Sym *isymbuf = NULL;
- static asection *last_input_section = NULL;
- static Elf_Internal_Rela *last_reloc = NULL;
struct elf32_avr_link_hash_table *htab;
if (link_info->relocatable)
if (internal_relocs == NULL)
goto error_return;
- if (sec != last_input_section)
- last_reloc = NULL;
-
- last_input_section = sec;
-
/* Walk through the relocs looking for relaxing opportunities. */
irelend = internal_relocs + sec->reloc_count;
for (irel = internal_relocs; irel < irelend; irel++)
static bfd_boolean
avr_mark_stub_not_to_be_necessary (struct bfd_hash_entry *bh,
- void *in_arg)
+ void *in_arg ATTRIBUTE_UNUSED)
{
struct elf32_avr_stub_hash_entry *hsh;
- struct elf32_avr_link_hash_table *htab;
- htab = in_arg;
hsh = avr_stub_hash_entry (bh);
hsh->is_actually_needed = FALSE;
struct elf_link_hash_entry *h;
const struct elf_backend_data *bed = get_elf_backend_data (abfd);
int ptralign;
- int offset;
/* This function may be called more than once. */
s = bfd_get_section_by_name (abfd, ".got");
return FALSE;
bfinfdpic_gotfixup_section (info) = s;
- offset = -2048;
flags = BSF_GLOBAL;
}
else
{
- offset = 2048;
flags = BSF_GLOBAL | BSF_WEAK;
}
if (new_flags & EF_BFIN_FDPIC)
new_flags &= ~EF_BFIN_PIC;
-#ifdef DEBUG
+#ifndef DEBUG
+ if (0)
+#endif
(*_bfd_error_handler) ("old_flags = 0x%.8lx, new_flags = 0x%.8lx, init = %s, filename = %s",
old_flags, new_flags, elf_flags_init (obfd) ? "yes" : "no",
bfd_get_filename (ibfd));
-#endif
if (!elf_flags_init (obfd)) /* First call, no flags set. */
{
bfd_byte *hit_data = contents + offset;
bfd_vma reloc_bits, check, Rvalue1;
bfd * dynobj;
- bfd_vma * local_got_offsets;
dynobj = elf_hash_table (info)->dynobj;
- local_got_offsets = elf_local_got_offsets (input_bfd);
switch (r_type)
{
unsigned int sec_shndx;
bfd_byte *contents;
Elf_Internal_Rela *irel, *irelend;
- Elf_Internal_Rela *irelalign;
bfd_vma toaddr;
Elf_Internal_Sym *isym;
Elf_Internal_Sym *isymend;
contents = elf_section_data (sec)->this_hdr.contents;
- /* The deletion must stop at the next ALIGN reloc for an aligment
- power larger than the number of bytes we are deleting. */
- irelalign = NULL;
toaddr = sec->size;
irel = elf_section_data (sec)->relocs;
/* BFD back-end for National Semiconductor's CR16C ELF
- Copyright 2004, 2005, 2006, 2007, 2009 Free Software Foundation, Inc.
+ Copyright 2004, 2005, 2006, 2007, 2009, 2010
+ Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
unsigned long format, addr_type, code_factor;
unsigned short size;
unsigned short r_type;
- asymbol *symbol = NULL;
unsigned long disp20_opcod;
char neg = 0;
addr_type = r_type & R_ADDRTYPE;
code_factor = ((addr_type == R_CODE_ADDR) ? 1 : 0);
- if (sym_sec)
- symbol = sym_sec->symbol;
-
switch (format)
{
case R_NUMBER:
{
asection *splt;
asection *sgotplt;
- asection *sgot;
asection *srela;
bfd_vma got_base;
BFD_ASSERT (h->dynindx != -1);
splt = bfd_get_section_by_name (dynobj, ".plt");
- sgot = bfd_get_section_by_name (dynobj, ".got");
sgotplt = bfd_get_section_by_name (dynobj, ".got.plt");
srela = bfd_get_section_by_name (dynobj, ".rela.plt");
BFD_ASSERT (splt != NULL && sgotplt != NULL
/* BFD back-end for National Semiconductor's CRX ELF
- Copyright 2004, 2005, 2006, 2007, 2009 Free Software Foundation, Inc.
+ Copyright 2004, 2005, 2006, 2007, 2009, 2010
+ Free Software Foundation, Inc.
Written by Tomer Levi, NSC, Israel.
This file is part of BFD, the Binary File Descriptor library.
unsigned int sec_shndx;
bfd_byte *contents;
Elf_Internal_Rela *irel, *irelend;
- Elf_Internal_Rela *irelalign;
bfd_vma toaddr;
Elf_Internal_Sym *isym;
Elf_Internal_Sym *isymend;
contents = elf_section_data (sec)->this_hdr.contents;
- /* The deletion must stop at the next ALIGN reloc for an aligment
- power larger than the number of bytes we are deleting. */
-
- irelalign = NULL;
toaddr = sec->size;
irel = elf_section_data (sec)->relocs;
/* BFD back-end for Renesas H8/300 ELF binaries.
Copyright 1993, 1995, 1998, 1999, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2009 Free Software Foundation, Inc.
+ 2007, 2009, 2010 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
{
arelent bfd_reloc;
- reloc_howto_type *h;
elf32_h8_info_to_howto (abfd, &bfd_reloc, irel);
- h = bfd_reloc.howto;
}
/* Keep track of the previous reloc so that we can delete
some long jumps created by the compiler. */
unsigned int sec_shndx;
bfd_byte *contents;
Elf_Internal_Rela *irel, *irelend;
- Elf_Internal_Rela *irelalign;
Elf_Internal_Sym *isym;
Elf_Internal_Sym *isymend;
bfd_vma toaddr;
contents = elf_section_data (sec)->this_hdr.contents;
- /* The deletion must stop at the next ALIGN reloc for an aligment
- power larger than the number of bytes we are deleting. */
-
- irelalign = NULL;
toaddr = sec->size;
irel = elf_section_data (sec)->relocs;
const Elf_Internal_Rela *rela_end;
struct elf32_hppa_link_hash_table *htab;
asection *sreloc;
- asection *stubreloc;
int tls_type = GOT_UNKNOWN, old_tls_type = GOT_UNKNOWN;
if (info->relocatable)
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
eh_syms = elf_sym_hashes (abfd);
sreloc = NULL;
- stubreloc = NULL;
rela_end = relocs + sec->reloc_count;
for (rela = relocs; rela < rela_end; rela++)
/* i370-specific support for 32-bit ELF
Copyright 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004,
- 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+ 2005, 2006, 2007, 2008, 2010 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
Hacked by Linas Vepstas for i370 linas@linas.org
struct elf_link_hash_entry **sym_hashes;
const Elf_Internal_Rela *rel;
const Elf_Internal_Rela *rel_end;
- bfd_vma *local_got_offsets;
asection *sreloc;
if (info->relocatable)
dynobj = elf_hash_table (info)->dynobj;
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
sym_hashes = elf_sym_hashes (abfd);
- local_got_offsets = elf_local_got_offsets (abfd);
sreloc = NULL;
Elf_Internal_Rela *rel = relocs;
Elf_Internal_Rela *relend = relocs + input_section->reloc_count;
asection *sreloc = NULL;
- bfd_vma *local_got_offsets;
bfd_boolean ret = TRUE;
#ifdef DEBUG
/* Initialize howto table if needed. */
i370_elf_howto_init ();
- local_got_offsets = elf_local_got_offsets (input_bfd);
-
for (; rel < relend; rel++)
{
enum i370_reloc_type r_type = (enum i370_reloc_type) ELF32_R_TYPE (rel->r_info);
/* Ubicom IP2xxx specific support for 32-bit ELF
- Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009
+ Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
Elf_Internal_Shdr *symtab_hdr;
Elf_Internal_Sym *isymbuf, *isym, *isymend;
unsigned int shndx;
- bfd_byte *contents;
Elf_Internal_Rela *irel, *irelend, *irelbase;
struct elf_link_hash_entry **sym_hashes;
struct elf_link_hash_entry **end_hashes;
shndx = _bfd_elf_section_from_bfd_section (abfd, sec);
- contents = elf_section_data (sec)->this_hdr.contents;
-
irelbase = elf_section_data (sec)->relocs;
irelend = irelbase + sec->reloc_count;
if (sym_sec == sec)
{
const char *name;
- unsigned long strx;
- unsigned char type, other;
- unsigned short desc;
+ unsigned char type;
bfd_vma value;
bfd_vma baseaddr = BASEADDR (sec);
bfd_vma symval = BASEADDR (sym_sec) + isym->st_value
stabp = stabcontents + irel->r_offset - 8;
/* Go pullout the stab entry. */
- strx = bfd_h_get_32 (abfd, stabp + STRDXOFF);
type = bfd_h_get_8 (abfd, stabp + TYPEOFF);
- other = bfd_h_get_8 (abfd, stabp + OTHEROFF);
- desc = bfd_h_get_16 (abfd, stabp + DESCOFF);
value = bfd_h_get_32 (abfd, stabp + VALOFF);
name = bfd_get_stab_name (type);
for (;stabp < stabend; stabp += STABSIZE)
{
/* Go pullout the stab entry. */
- strx = bfd_h_get_32 (abfd, stabp + STRDXOFF);
type = bfd_h_get_8 (abfd, stabp + TYPEOFF);
- other = bfd_h_get_8 (abfd, stabp + OTHEROFF);
- desc = bfd_h_get_16 (abfd, stabp + DESCOFF);
value = bfd_h_get_32 (abfd, stabp + VALOFF);
name = bfd_get_stab_name (type);
static bfd_boolean new_pass = FALSE;
static bfd_boolean changed = FALSE;
struct misc misc;
- asection *stab;
/* Assume nothing changes. */
*again = FALSE;
if (internal_relocs == NULL)
goto error_return;
- /* Make sure the stac.rela stuff gets read in. */
- stab = bfd_get_section_by_name (abfd, ".stab");
-
- if (stab)
- {
- /* So stab does exits. */
- Elf_Internal_Rela * irelbase;
-
- irelbase = _bfd_elf_link_read_relocs (abfd, stab, NULL, NULL,
- link_info->keep_memory);
- }
-
/* Get section contents cached copy if it exists. */
if (contents == NULL)
{
r_type = ELF32_R_TYPE (rel->r_info);
r_symndx = ELF32_R_SYM (rel->r_info);
- howto = ip2k_elf_howto_table + ELF32_R_TYPE (rel->r_info);
+ howto = ip2k_elf_howto_table + r_type;
h = NULL;
sym = NULL;
sec = NULL;
struct elf_lm32_link_hash_table *htab = lm32_elf_hash_table (info);
bfd *dynobj;
bfd_vma *local_got_offsets;
- asection *sgot, *splt, *sreloc;
+ asection *sgot;
if (htab == NULL)
return FALSE;
local_got_offsets = elf_local_got_offsets (input_bfd);
sgot = htab->sgot;
- splt = htab->splt;
- sreloc = NULL;
symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
sym_hashes = elf_sym_hashes (input_bfd);
bfd_vma gp;
bfd_reloc_status_type r;
const char *name = NULL;
- asection *osec;
r_symndx = ELF32_R_SYM (rel->r_info);
r_type = ELF32_R_TYPE (rel->r_info);
{
/* It's a local symbol. */
sym = local_syms + r_symndx;
- osec = sec = local_sections[r_symndx];
+ sec = local_sections[r_symndx];
relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
name = bfd_elf_string_from_elf_section
(input_bfd, symtab_hdr->sh_link, sym->st_name);
r_symndx, symtab_hdr, sym_hashes,
h, sec, relocation,
unresolved_reloc, warned);
- osec = sec;
name = h->root.root.string;
}
const Elf_Internal_Rela *rel_end;
struct elf_lm32_link_hash_table *htab;
bfd *dynobj;
- bfd_vma *local_got_offsets;
- asection *sgot, *srelgot, *sreloc;
if (info->relocatable)
return TRUE;
- sgot = srelgot = sreloc = NULL;
-
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
sym_hashes = elf_sym_hashes (abfd);
sym_hashes_end = sym_hashes + symtab_hdr->sh_size/sizeof (Elf32_External_Sym);
return FALSE;
dynobj = htab->root.dynobj;
- local_got_offsets = elf_local_got_offsets (abfd);
rel_end = relocs + sec->reloc_count;
for (rel = relocs; rel < rel_end; rel++)
for (; dyncon < dynconend; dyncon++)
{
Elf_Internal_Dyn dyn;
- const char *name;
asection *s;
bfd_elf32_swap_dyn_in (dynobj, dyncon, &dyn);
break;
case DT_PLTGOT:
- name = ".got";
s = htab->sgot->output_section;
goto get_vma;
case DT_JMPREL:
- name = ".rela.plt";
s = htab->srelplt->output_section;
get_vma:
BFD_ASSERT (s != NULL);
Elf_Internal_Sym *sym)
{
struct elf_lm32_link_hash_table *htab;
- bfd *dynobj;
bfd_byte *loc;
htab = lm32_elf_hash_table (info);
if (htab == NULL)
return FALSE;
- dynobj = htab->root.dynobj;
-
if (h->plt.offset != (bfd_vma) -1)
{
asection *splt;
/* M16C/M32C specific support for 32-bit ELF.
- Copyright (C) 2005, 2006, 2007, 2008, 2009
+ Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
m32c_offset_for_reloc (bfd *abfd,
Elf_Internal_Rela *rel,
Elf_Internal_Shdr *symtab_hdr,
- Elf_External_Sym_Shndx *shndx_buf,
+ Elf_External_Sym_Shndx *shndx_buf ATTRIBUTE_UNUSED,
Elf_Internal_Sym *intsyms)
{
bfd_vma symval;
{
/* A local symbol. */
Elf_Internal_Sym *isym;
- Elf_External_Sym_Shndx *shndx;
asection *ssec;
-
isym = intsyms + ELF32_R_SYM (rel->r_info);
ssec = bfd_section_from_elf_index (abfd, isym->st_shndx);
- shndx = shndx_buf + (shndx_buf ? ELF32_R_SYM (rel->r_info) : 0);
-
symval = isym->st_value;
if (ssec)
symval += ssec->output_section->vma
bfd_byte *contents;
Elf_Internal_Rela *irel;
Elf_Internal_Rela *irelend;
- Elf_Internal_Rela *irelalign;
bfd_vma toaddr;
Elf_Internal_Sym *isym;
Elf_Internal_Sym *isymend;
contents = elf_section_data (sec)->this_hdr.contents;
- /* The deletion must stop at the next ALIGN reloc for an aligment
- power larger than the number of bytes we are deleting. */
- irelalign = NULL;
toaddr = sec->size;
irel = elf_section_data (sec)->relocs;
Elf_Internal_Sym *sym)
{
struct elf_m32r_link_hash_table *htab;
- bfd *dynobj;
bfd_byte *loc;
#ifdef DEBUG_PIC
if (htab == NULL)
return FALSE;
- dynobj = htab->root.dynobj;
-
if (h->plt.offset != (bfd_vma) -1)
{
asection *splt;
for (; dyncon < dynconend; dyncon++)
{
Elf_Internal_Dyn dyn;
- const char *name;
asection *s;
bfd_elf32_swap_dyn_in (dynobj, dyncon, &dyn);
break;
case DT_PLTGOT:
- name = ".got";
s = htab->sgot->output_section;
goto get_vma;
case DT_JMPREL:
- name = ".rela.plt";
s = htab->srelplt->output_section;
get_vma:
BFD_ASSERT (s != NULL);
const Elf_Internal_Rela *rel_end;
struct elf_m32r_link_hash_table *htab;
bfd *dynobj;
- bfd_vma *local_got_offsets;
- asection *sgot, *srelgot, *sreloc;
+ asection *sreloc;
if (info->relocatable)
return TRUE;
- sgot = srelgot = sreloc = NULL;
-
+ sreloc = NULL;
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
sym_hashes = elf_sym_hashes (abfd);
return FALSE;
dynobj = htab->root.dynobj;
- local_got_offsets = elf_local_got_offsets (abfd);
rel_end = relocs + sec->reloc_count;
for (rel = relocs; rel < rel_end; rel++)
Elf_Internal_Shdr *hdr ATTRIBUTE_UNUSED,
asection *sec)
{
- const char *name;
-
- name = bfd_get_section_name (abfd, sec);
-
/* The generic elf_fake_sections will set up REL_HDR using the
default kind of relocations. But, we may actually need both
kinds of relocations, so we set up the second header here.
struct bfd_link_info *link_info, bfd_boolean *again)
{
Elf_Internal_Shdr *symtab_hdr;
- Elf_Internal_Shdr *shndx_hdr;
Elf_Internal_Rela *internal_relocs;
Elf_Internal_Rela *free_relocs = NULL;
Elf_Internal_Rela *irel, *irelend;
return TRUE;
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
- shndx_hdr = &elf_tdata (abfd)->symtab_shndx_hdr;
/* Get a copy of the native relocations. */
internal_relocs = (_bfd_elf_link_read_relocs
bfd_vma insn_page;
bfd_boolean is_far = FALSE;
struct elf_link_hash_entry *h;
- const char* stub_name = 0;
r_symndx = ELF32_R_SYM (rel->r_info);
r_type = ELF32_R_TYPE (rel->r_info);
+ sec->output_offset
+ sym->st_value);
is_far = (sym && (sym->st_other & STO_M68HC12_FAR));
- if (is_far)
- stub_name = (bfd_elf_string_from_elf_section
- (input_bfd, symtab_hdr->sh_link,
- sym->st_name));
}
else
{
warned);
is_far = (h && (h->other & STO_M68HC12_FAR));
- stub_name = h->root.root.string;
}
if (sec != NULL && elf_discarded_section (sec))
struct elf_link_hash_entry **sym_hashes;
const Elf_Internal_Rela *rel, *relend;
bfd *dynobj;
- asection *sgot;
- asection *srelgot;
struct elf_m68k_got *got;
if (info->relocatable)
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
sym_hashes = elf_sym_hashes (abfd);
-
- sgot = bfd_get_section_by_name (dynobj, ".got");
- srelgot = bfd_get_section_by_name (dynobj, ".rela.got");
got = NULL;
relend = relocs + sec->reloc_count;
{
Elf_Internal_Rela outrel;
bfd_byte *loc;
- bfd_boolean skip, relocate = FALSE;
+ bfd_boolean skip;
/* When generating a shared object, these relocations
are copied into the output file to be resolved at run
if (outrel.r_offset == (bfd_vma) -1)
skip = TRUE;
else if (outrel.r_offset == (bfd_vma) -2)
- skip = TRUE, relocate = TRUE;
+ skip = TRUE;
outrel.r_offset += (input_section->output_section->vma
+ input_section->output_offset);
const Elf_Internal_Rela * rel;
const Elf_Internal_Rela * rel_end;
struct elf32_mb_link_hash_table *htab;
- bfd_vma *local_got_offsets;
asection *sreloc = NULL;
if (info->relocatable)
if (htab == NULL)
return FALSE;
- local_got_offsets = elf_local_got_offsets (abfd);
symtab_hdr = & elf_tdata (abfd)->symtab_hdr;
sym_hashes = elf_sym_hashes (abfd);
sym_hashes_end = sym_hashes + symtab_hdr->sh_size / sizeof (Elf32_External_Sym);
struct elf_link_hash_entry *h,
Elf_Internal_Sym *sym)
{
- bfd *dynobj;
struct elf32_mb_link_hash_table *htab;
htab = elf32_mb_hash_table (info);
if (htab == NULL)
return FALSE;
- dynobj = htab->elf.dynobj;
-
if (h->plt.offset != (bfd_vma) -1)
{
asection *splt;
/* moxie-specific support for 32-bit ELF.
- Copyright 2009 Free Software Foundation, Inc.
+ Copyright 2009, 2010 Free Software Foundation, Inc.
Copied from elf32-fr30.c which is..
Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
int r_type;
r_type = ELF32_R_TYPE (rel->r_info);
-
r_symndx = ELF32_R_SYM (rel->r_info);
-
- howto = moxie_elf_howto_table + ELF32_R_TYPE (rel->r_info);
+ howto = moxie_elf_howto_table + r_type;
h = NULL;
sym = NULL;
sec = NULL;
/* MSP430-specific support for 32-bit ELF
- Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007
+ Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2010
Free Software Foundation, Inc.
Contributed by Dmitry Diky <diwil@mail.ru>
r_type = ELF32_R_TYPE (rel->r_info);
r_symndx = ELF32_R_SYM (rel->r_info);
- howto = elf_msp430_howto_table + ELF32_R_TYPE (rel->r_info);
+ howto = elf_msp430_howto_table + r_type;
h = NULL;
sym = NULL;
sec = NULL;
bfd_byte *contents;
Elf_Internal_Rela *irel;
Elf_Internal_Rela *irelend;
- Elf_Internal_Rela *irelalign;
bfd_vma toaddr;
Elf_Internal_Sym *isym;
Elf_Internal_Sym *isymend;
contents = elf_section_data (sec)->this_hdr.contents;
- /* The deletion must stop at the next ALIGN reloc for an aligment
- power larger than the number of bytes we are deleting. */
-
- irelalign = NULL;
toaddr = sec->size;
irel = elf_section_data (sec)->relocs;
}
else
{
- Elf_Internal_Sym *sym;
bfd_signed_vma *lgot_refs;
struct plt_entry **local_plt;
char *lgot_masks;
return FALSE;
}
}
- sym = locsyms + r_symndx;
lgot_refs = elf_local_got_refcounts (ibfd);
if (lgot_refs == NULL)
abort ();
/* Renesas RX specific support for 32-bit ELF.
- Copyright (C) 2008, 2009
+ Copyright (C) 2008, 2009, 2010
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
struct elf_link_hash_entry ** sym_hashes;
Elf_Internal_Rela * rel;
Elf_Internal_Rela * relend;
- bfd * dynobj;
- asection * splt;
symtab_hdr = & elf_tdata (input_bfd)->symtab_hdr;
sym_hashes = elf_sym_hashes (input_bfd);
relend = relocs + input_section->reloc_count;
-
- dynobj = elf_hash_table (info)->dynobj;
- splt = NULL;
- if (dynobj != NULL)
- splt = bfd_get_section_by_name (dynobj, ".plt");
-
for (rel = relocs; rel < relend; rel ++)
{
reloc_howto_type * howto;
bfd_byte * contents;
Elf_Internal_Rela * irel;
Elf_Internal_Rela * irelend;
- Elf_Internal_Rela * irelalign;
Elf_Internal_Sym * isym;
Elf_Internal_Sym * isymend;
bfd_vma toaddr;
/* The deletion must stop at the next alignment boundary, if
ALIGNMENT_REL is non-NULL. */
- irelalign = NULL;
toaddr = sec->size;
if (alignment_rel)
toaddr = alignment_rel->r_offset;
rx_offset_for_reloc (bfd * abfd,
Elf_Internal_Rela * rel,
Elf_Internal_Shdr * symtab_hdr,
- Elf_External_Sym_Shndx * shndx_buf,
+ Elf_External_Sym_Shndx * shndx_buf ATTRIBUTE_UNUSED,
Elf_Internal_Sym * intsyms,
Elf_Internal_Rela ** lrel,
bfd * input_bfd,
{
/* A local symbol. */
Elf_Internal_Sym *isym;
- Elf_External_Sym_Shndx *shndx;
asection *ssec;
isym = intsyms + ELF32_R_SYM (rel->r_info);
ssec = bfd_section_from_elf_index (abfd,
isym->st_shndx);
- shndx = shndx_buf + (shndx_buf ? ELF32_R_SYM (rel->r_info) : 0);
-
/* Initial symbol value. */
symval = isym->st_value;
Elf_External_Sym_Shndx * shndx_buf = NULL;
bfd_vma pc;
bfd_vma sec_start;
- bfd_vma sec_end;
bfd_vma symval = 0;
int pcrel = 0;
int code = 0;
shndx_hdr = &elf_tdata (abfd)->symtab_shndx_hdr;
sec_start = sec->output_section->vma + sec->output_offset;
- sec_end = sec->output_section->vma + sec->output_offset + sec->size;
/* Get the section contents. */
if (elf_section_data (sec)->this_hdr.contents != NULL)
{
asection *sgot;
bfd_vma gp;
- struct score_got_info *g;
- g = score_elf_got_info (dynobj, &sgot);
+ score_elf_got_info (dynobj, &sgot);
gp = _bfd_get_gp_value (output_bfd);
return sgot->output_section->vma + sgot->output_offset + got_index - gp;
bfd_vma gp = MINUS_ONE;
/* The place (section offset or address) of the storage unit being relocated. */
bfd_vma rel_addr;
- /* The value of GP used to create the relocatable object. */
- bfd_vma gp0 = MINUS_ONE;
/* The offset into the global offset table at which the address of the relocation entry
symbol, adjusted by the addend, resides during execution. */
bfd_vma g = MINUS_ONE;
case R_SCORE_HI16:
case R_SCORE_LO16:
case R_SCORE_GPREL32:
- gp0 = _bfd_get_gp_value (input_bfd);
gp = _bfd_get_gp_value (output_bfd);
break;
asection **local_sections)
{
Elf_Internal_Shdr *symtab_hdr;
- struct elf_link_hash_entry **sym_hashes;
Elf_Internal_Rela *rel;
Elf_Internal_Rela *relend;
const char *name;
symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
extsymoff = (elf_bad_symtab (input_bfd)) ? 0 : symtab_hdr->sh_info;
- sym_hashes = elf_sym_hashes (input_bfd);
rel = relocs;
relend = relocs + input_section->reloc_count;
for (; rel < relend; rel++)
{
asection *sgot;
bfd_vma gp;
- struct score_got_info *g;
- g = score_elf_got_info (dynobj, &sgot);
+ score_elf_got_info (dynobj, &sgot);
gp = _bfd_get_gp_value (output_bfd);
return sgot->output_section->vma + sgot->output_offset + got_index - gp;
asection **local_sections)
{
Elf_Internal_Shdr *symtab_hdr;
- struct elf_link_hash_entry **sym_hashes;
Elf_Internal_Rela *rel;
Elf_Internal_Rela *relend;
const char *name;
symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
extsymoff = (elf_bad_symtab (input_bfd)) ? 0 : symtab_hdr->sh_info;
- sym_hashes = elf_sym_hashes (input_bfd);
rel = relocs;
relend = relocs + input_section->reloc_count;
for (; rel < relend; rel++)
struct elf_sh_link_hash_table *htab;
const Elf_Internal_Rela *rel;
const Elf_Internal_Rela *rel_end;
- bfd_vma *local_got_offsets;
- asection *sgot;
- asection *srelgot;
asection *sreloc;
unsigned int r_type;
int got_type, old_got_type;
- sgot = NULL;
- srelgot = NULL;
sreloc = NULL;
if (info->relocatable)
if (htab == NULL)
return FALSE;
- local_got_offsets = elf_local_got_offsets (abfd);
-
rel_end = relocs + sec->reloc_count;
for (rel = relocs; rel < rel_end; rel++)
{
/* SuperH SH64-specific support for 32-bit ELF
- Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009
+ Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
/* This COFF-only function (only compiled with COFF support, making
ELF-only chains problematic) returns TRUE early for SH4, so let's just
define it TRUE here. */
-#define _bfd_sh_align_load_span(a,b,c,d,e,f,g,h,i,j) TRUE
+#define _bfd_sh_align_load_span(a,b,c,d,e,f,g,h,i,j) \
+ ((void) f, (void) h, (void) i, TRUE)
#define GOT_BIAS (-((long)-32768))
#define INCLUDE_SHMEDIA
/* SPU specific support for 32-bit ELF
- Copyright 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+ Copyright 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
bfd_vma addend;
bfd_reloc_status_type r;
bfd_boolean unresolved_reloc;
- bfd_boolean warned;
enum _stub_type stub_type;
r_symndx = ELF32_R_SYM (rel->r_info);
r_type = ELF32_R_TYPE (rel->r_info);
howto = elf_howto_table + r_type;
unresolved_reloc = FALSE;
- warned = FALSE;
h = NULL;
sym = NULL;
sec = NULL;
input_section,
rel->r_offset, err))
return FALSE;
- warned = TRUE;
}
sym_name = h->root.root.string;
}
/* V850-specific support for 32-bit ELF
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
- 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+ 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
const Elf_Internal_Rela *relocs)
{
bfd_boolean ret = TRUE;
- bfd *dynobj;
Elf_Internal_Shdr *symtab_hdr;
struct elf_link_hash_entry **sym_hashes;
const Elf_Internal_Rela *rel;
sec, abfd);
#endif
- dynobj = elf_hash_table (info)->dynobj;
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
sym_hashes = elf_sym_hashes (abfd);
{
hi16s_location *match = NULL;
hi16s_location *entry;
- hi16s_location *previous = NULL;
- hi16s_location *prev;
bfd_byte *addr;
/* Search the table. Record the most recent entry that matches. */
if (entry->addend == addend
&& (match == NULL || match->counter < entry->counter))
{
- previous = prev;
match = entry;
}
-
- prev = entry;
}
if (match == NULL)
static bfd_boolean
elf32_vax_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
{
- flagword out_flags;
flagword in_flags;
if ( bfd_get_flavour (ibfd) != bfd_target_elf_flavour
return TRUE;
in_flags = elf_elfheader (ibfd)->e_flags;
- out_flags = elf_elfheader (obfd)->e_flags;
if (!elf_flags_init (obfd))
{
bfd *dynobj;
Elf_Internal_Shdr *symtab_hdr;
struct elf_link_hash_entry **sym_hashes;
- bfd_vma *local_got_offsets;
bfd_vma plt_index;
bfd_vma got_offset;
asection *sgot;
dynobj = elf_hash_table (info)->dynobj;
symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
sym_hashes = elf_sym_hashes (input_bfd);
- local_got_offsets = elf_local_got_offsets (input_bfd);
sgot = NULL;
splt = NULL;
/* Infineon XC16X-specific support for 16-bit ELF.
- Copyright 2006, 2007, 2009 Free Software Foundation, Inc.
+ Copyright 2006, 2007, 2009, 2010 Free Software Foundation, Inc.
Contributed by KPIT Cummins Infosystems
This file is part of BFD, the Binary File Descriptor library.
asection *sec;
struct elf_link_hash_entry *h;
bfd_vma relocation;
- bfd_reloc_status_type r;
/* This is a final link. */
r_symndx = ELF32_R_SYM (rel->r_info);
if (info->relocatable)
continue;
- r = elf32_xc16x_final_link_relocate (r_type, input_bfd, output_bfd,
- input_section,
- contents, rel->r_offset,
- relocation, rel->r_addend,
- info, sec, h == NULL);
+ elf32_xc16x_final_link_relocate (r_type, input_bfd, output_bfd,
+ input_section,
+ contents, rel->r_offset,
+ relocation, rel->r_addend,
+ info, sec, h == NULL);
}
return TRUE;
text_action_list *action_list,
bfd_vma offset)
{
- xlate_map_entry_t tmp;
void *r;
xlate_map_entry_t *e;
if (map->entry_count == 0)
return offset;
- tmp.orig_address = offset;
- tmp.new_address = offset;
- tmp.size = 1;
-
r = bsearch (&offset, map->entry, map->entry_count,
sizeof (xlate_map_entry_t), &xlate_compare);
e = (xlate_map_entry_t *) r;
{
int r_type;
unsigned i;
- asection *target_sec;
reloc_bfd_fix *fix;
unsigned insert_at;
r_type = ELF32_R_TYPE (r_rel->rela.r_info);
- target_sec = r_reloc_get_section (r_rel);
/* This is the difficult case. We have to create a fix up. */
this_rela.r_offset = offset;
const char *name,
int shindex)
{
- asection *newsect;
-
switch (hdr->sh_type)
{
case SHT_PARISC_EXT:
if (! _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex))
return FALSE;
- newsect = hdr->bfd_section;
return TRUE;
}
const Elf_Internal_Rela *relend;
Elf_Internal_Shdr *symtab_hdr;
const Elf_Internal_Rela *rel;
- asection *dlt, *plt, *stubs;
- char *buf;
- size_t buf_len;
unsigned int sec_symndx;
if (info->relocatable)
else
sec_symndx = 0;
- dlt = plt = stubs = NULL;
- buf = NULL;
- buf_len = 0;
-
relend = relocs + sec->reloc_count;
for (rel = relocs; rel < relend; ++rel)
{
}
}
- if (buf)
- free (buf);
return TRUE;
err_out:
- if (buf)
- free (buf);
return FALSE;
}
Elf_Internal_Sym *sym)
{
struct elf64_hppa_link_hash_entry *hh = hppa_elf_hash_entry (eh);
- asection *stub, *splt, *sdlt, *sopd, *spltrel, *sdltrel;
+ asection *stub, *splt, *sopd, *spltrel;
struct elf64_hppa_link_hash_table *hppa_info;
hppa_info = hppa_link_hash_table (info);
stub = hppa_info->stub_sec;
splt = hppa_info->plt_sec;
- sdlt = hppa_info->dlt_sec;
sopd = hppa_info->opd_sec;
spltrel = hppa_info->plt_rel_sec;
- sdltrel = hppa_info->dlt_rel_sec;
/* Incredible. It is actually necessary to NOT use the symbol's real
value when building the dynamic symbol table for a shared library.
asection *sym_sec;
bfd_vma relocation;
bfd_reloc_status_type r;
- bfd_boolean warned_undef;
r_type = ELF_R_TYPE (rel->r_info);
if (r_type < 0 || r_type >= (int) R_PARISC_UNIMPLEMENTED)
eh = NULL;
sym = NULL;
sym_sec = NULL;
- warned_undef = FALSE;
if (r_symndx < symtab_hdr->sh_info)
{
/* This is a local symbol, hh defaults to NULL. */
else
{
/* This is not a local symbol. */
- bfd_boolean unresolved_reloc;
struct elf_link_hash_entry **sym_hashes = elf_sym_hashes (input_bfd);
/* It seems this can happen with erroneous or unsupported
|| eh->root.type == bfd_link_hash_warning)
eh = (struct elf_link_hash_entry *) eh->root.u.i.link;
- warned_undef = FALSE;
- unresolved_reloc = FALSE;
relocation = 0;
if (eh->root.type == bfd_link_hash_defined
|| eh->root.type == bfd_link_hash_defweak)
{
sym_sec = eh->root.u.def.section;
- if (sym_sec == NULL
- || sym_sec->output_section == NULL)
- /* Set a flag that will be cleared later if we find a
- relocation value for this symbol. output_section
- is typically NULL for symbols satisfied by a shared
- library. */
- unresolved_reloc = TRUE;
- else
+ if (sym_sec != NULL
+ && sym_sec->output_section != NULL)
relocation = (eh->root.u.def.value
+ sym_sec->output_section->vma
+ sym_sec->output_offset);
input_section,
rel->r_offset, err))
return FALSE;
- warned_undef = TRUE;
}
if (!info->relocatable
(info, eh_name (eh), input_bfd,
input_section, rel->r_offset, FALSE))
return FALSE;
- warned_undef = TRUE;
}
}
}
/* MMIX-specific support for 64-bit ELF.
- Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009
+ Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010
Free Software Foundation, Inc.
Contributed by Hans-Peter Nilsson <hp@bitrange.com>
asection *reloc_target_output_section;
bfd_reloc_status_type flag = bfd_reloc_ok;
bfd_vma output_base = 0;
- bfd_vma addr;
r = bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data,
input_section, output_bfd, error_message);
relocation += output_base + symbol->section->output_offset;
- /* Get position of relocation. */
- addr = (reloc_entry->address + input_section->output_section->vma
- + input_section->output_offset);
if (output_bfd != (bfd *) NULL)
{
/* Add in supplied addend. */
spot a missing actual initialization. */
size_t bpono = (size_t) -1;
size_t pjsno = 0;
- bfd *bpo_greg_owner;
Elf_Internal_Sym *isymbuf = NULL;
bfd_size_type size = sec->rawsize ? sec->rawsize : sec->size;
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
- bpo_greg_owner = (bfd *) link_info->base_file;
-
if (bpodata != NULL)
{
bpo_gregs_section = bpodata->bpo_greg_section;
{
struct ppc_link_hash_table *htab;
Elf_Internal_Shdr *symtab_hdr;
- struct elf_link_hash_entry **sym_hashes, **sym_hashes_end;
+ struct elf_link_hash_entry **sym_hashes;
const Elf_Internal_Rela *rel;
const Elf_Internal_Rela *rel_end;
asection *sreloc;
dottga = elf_link_hash_lookup (&htab->elf, ".__tls_get_addr",
FALSE, FALSE, TRUE);
symtab_hdr = &elf_symtab_hdr (abfd);
-
sym_hashes = elf_sym_hashes (abfd);
- sym_hashes_end = (sym_hashes
- + symtab_hdr->sh_size / sizeof (Elf64_External_Sym)
- - symtab_hdr->sh_info);
-
sreloc = NULL;
opd_sym_map = NULL;
if (strcmp (sec->name, ".opd") == 0)
Elf_Internal_Rela *relstart, *rel, *relend;
Elf_Internal_Shdr *symtab_hdr;
Elf_Internal_Sym *local_syms;
- struct elf_link_hash_entry **sym_hashes;
bfd_vma offset;
struct _opd_sec_data *opd;
bfd_boolean need_edit, add_aux_fields;
local_syms = NULL;
symtab_hdr = &elf_symtab_hdr (ibfd);
- sym_hashes = elf_sym_hashes (ibfd);
/* Read the relocations. */
relstart = _bfd_elf_link_read_relocs (ibfd, sec, NULL, NULL,
asection *toc, *sec;
Elf_Internal_Shdr *symtab_hdr;
Elf_Internal_Sym *local_syms;
- struct elf_link_hash_entry **sym_hashes;
Elf_Internal_Rela *relstart, *rel;
unsigned long *skip, *drop;
unsigned char *used;
local_syms = NULL;
symtab_hdr = &elf_symtab_hdr (ibfd);
- sym_hashes = elf_sym_hashes (ibfd);
/* Look at sections dropped from the final link. */
skip = NULL;
const char *name,
int shindex)
{
- asection *newsect;
-
/* There ought to be a place to keep ELF backend specific flags, but
at the moment there isn't one. We just keep track of the
sections by their name, instead. Fortunately, the ABI gives
if (! _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex))
return FALSE;
- newsect = hdr->bfd_section;
return TRUE;
}
const char *name,
int shindex)
{
- asection *newsect;
-
switch (hdr->sh_type)
{
case SHT_IA_64_VMS_TRACE:
if (! _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex))
return FALSE;
- newsect = hdr->bfd_section;
return TRUE;
}
struct _bfd_sparc_elf_link_hash_table *htab;
Elf_Internal_Shdr *symtab_hdr;
struct elf_link_hash_entry **sym_hashes;
- bfd_vma *local_got_offsets;
const Elf_Internal_Rela *rel;
const Elf_Internal_Rela *rel_end;
asection *sreloc;
BFD_ASSERT (htab != NULL);
symtab_hdr = &elf_symtab_hdr (abfd);
sym_hashes = elf_sym_hashes (abfd);
- local_got_offsets = elf_local_got_offsets (abfd);
sreloc = NULL;
if (info->shared)
{
Elf_Internal_Rela outrel;
- bfd_boolean skip, relocate = FALSE;
+ bfd_boolean skip;
BFD_ASSERT (sreloc != NULL);
skip = FALSE;
if (outrel.r_offset == (bfd_vma) -1)
skip = TRUE;
else if (outrel.r_offset == (bfd_vma) -2)
- skip = TRUE, relocate = TRUE;
+ skip = TRUE;
outrel.r_offset += (input_section->output_section->vma
+ input_section->output_offset);
if (skip)
/* BFD backend for hp-ux 9000/300
Copyright 1990, 1991, 1993, 1994, 1995, 1997, 1999, 2000, 2001, 2002,
- 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
+ 2003, 2004, 2005, 2007, 2010 Free Software Foundation, Inc.
Written by Glenn Engel.
This file is part of BFD, the Binary File Descriptor library.
/* OK, now walk the new symtable, caching symbol properties */
{
aout_symbol_type *cache_ptr = cached;
- aout_symbol_type cache_save;
/* Run through table and copy values */
for (sym_pointer = syms, cache_ptr = cached;
sym_pointer < sym_end; sym_pointer++, cache_ptr++)
length = bfd_get_8 (abfd, sym_pointer->e_length);
cache_ptr->other = length; /* other not used, save length here */
- cache_save = *cache_ptr;
convert_sym_type (sym_pointer, cache_ptr, abfd);
if (!translate_from_native_sym_flags (abfd, cache_ptr))
return FALSE;
/* BFD back-end for i386 a.out binaries under LynxOS.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1999, 2001, 2002,
- 2003, 2005, 2007, 2009 Free Software Foundation, Inc.
+ 2003, 2005, 2007, 2009, 2010 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
unsigned int r_length;
int r_pcrel;
int r_baserel, r_jmptable, r_relative;
- unsigned int r_addend;
asection *output_section = sym->section->output_section;
PUT_WORD (abfd, g->address, natptr->r_address);
r_jmptable = 0;
r_relative = 0;
- r_addend = g->addend + (*(g->sym_ptr_ptr))->section->output_section->vma;
-
/* name was clobbered by aout_write_syms to be symbol index */
/* If this relocation is relative to a symbol then set the
int r_extern;
unsigned int r_length;
int r_pcrel;
- int r_baserel, r_jmptable, r_relative;
struct aoutdata *su = &(abfd->tdata.aout_data->a);
cache_ptr->address = H_GET_32 (abfd, bytes->r_address);
r_index = bytes->r_index[1];
r_extern = (0 != (bytes->r_index[0] & RELOC_STD_BITS_EXTERN_BIG));
r_pcrel = (0 != (bytes->r_index[0] & RELOC_STD_BITS_PCREL_BIG));
- r_baserel = (0 != (bytes->r_index[0] & RELOC_STD_BITS_BASEREL_BIG));
- r_jmptable = (0 != (bytes->r_index[0] & RELOC_STD_BITS_JMPTABLE_BIG));
- r_relative = (0 != (bytes->r_index[0] & RELOC_STD_BITS_RELATIVE_BIG));
r_length = (bytes->r_index[0] & RELOC_STD_BITS_LENGTH_BIG)
>> RELOC_STD_BITS_LENGTH_SH_BIG;
next_byte (&(ieee->h));
*pcrel = TRUE;
section_n = must_parse_int (&(ieee->h));
+ (void) section_n;
PUSH (NOSYMBOL, bfd_abs_section_ptr, 0);
break;
}
ieee_symbol_index_type sy1;
POP (sy1, section1, *extra);
+ (void) section1;
+ (void) sy1;
}
POP (*symbol, dummy, *value);
case ieee_attribute_record_enum:
symbol_name_index = must_parse_int (&(ieee->h));
symbol_type_index = must_parse_int (&(ieee->h));
+ (void) symbol_type_index;
symbol_attribute_def = must_parse_int (&(ieee->h));
switch (symbol_attribute_def)
{
next_byte (&(ieee->h));
symbol_name_index = must_parse_int (&(ieee->h));
+ (void) symbol_name_index;
parse_expression (ieee,
&symbol->symbol.value,
&symbol_ignore,
break;
}
}
+ (void) ch;
OUT (0x84);
buf->ptrp = output_ptr;
buf->buffer = output_buffer;
unsigned int i;
unsigned char buf[8];
unsigned int offset;
- unsigned int nflavours;
BFD_ASSERT ((command->type == BFD_MACH_O_LC_THREAD)
|| (command->type == BFD_MACH_O_LC_UNIXTHREAD));
offset = 8;
- nflavours = 0;
for (i = 0; i < cmd->nflavours; i++)
{
BFD_ASSERT ((cmd->flavours[i].size % 4) == 0);
/* BFD back-end for mmo objects (MMIX-specific object-format).
- Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009
+ Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010
Free Software Foundation, Inc.
Written by Hans-Peter Nilsson (hp@bitrange.com).
Infrastructure and other bits originally copied from srec.c and
asection *sec = bfd_make_section_old_way (abfd, MMO_TEXT_SECTION_NAME);
asection *non_spec_sec = NULL;
bfd_vma non_spec_vma = 0;
- char *current_filename = NULL;
bfd_size_type nbytes_read = 0;
/* Buffer with room to read a 64-bit value. */
bfd_byte buf[8];
goto error_return;
}
- current_filename = file_names[y];
lineno = 0;
break;
mmo_write_symbols_and_terminator (bfd *abfd)
{
int count = bfd_get_symcount (abfd);
- asymbol *maintable[2];
asymbol **table;
asymbol **orig_table = bfd_get_outsymbols (abfd);
int serno;
fakemain->value = bfd_get_start_address (abfd);
fakemain->name = MMIX_START_SYMBOL_NAME;
fakemain->section = bfd_abs_section_ptr;
- maintable[0] = fakemain;
- maintable[1] = NULL;
memset (&root, 0, sizeof (root));
/* Support for 32-bit SPARC NLM (NetWare Loadable Module)
Copyright 1993, 1994, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2009 Free Software Foundation, Inc.
+ 2007, 2009, 2010 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
unsigned int howto_index;
unsigned int type;
struct nlm32_sparc_reloc_ext tmp_reloc;
- asection *code_sec, *data_sec;
+ asection *code_sec;
if (bfd_bread (&tmp_reloc, (bfd_size_type) 12, abfd) != 12)
return FALSE;
code_sec = bfd_get_section_by_name (abfd, NLM_CODE_NAME);
- data_sec = bfd_get_section_by_name (abfd, NLM_INITIALIZED_DATA_NAME);
-
*secp = code_sec;
val = bfd_get_32 (abfd, tmp_reloc.offset);
/* BFD back-end for PDP-11 a.out binaries.
- Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009
+ Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
char *strings;
struct aout_link_hash_entry **sym_hashes;
int *symbol_map;
- bfd_size_type reloc_count;
bfd_byte *rel;
bfd_byte *rel_end;
sym_hashes = obj_aout_sym_hashes (input_bfd);
symbol_map = finfo->symbol_map;
- reloc_count = rel_size / RELOC_SIZE;
rel = relocs;
rel_end = rel + rel_size;
for (; rel < rel_end; rel += RELOC_SIZE)
static bfd_boolean
aout_link_input_bfd (struct aout_final_link_info *finfo, bfd *input_bfd)
{
- bfd_size_type sym_count;
-
BFD_ASSERT (bfd_get_format (input_bfd) == bfd_object);
/* If this is a dynamic object, it may need special handling. */
if (! aout_get_external_symbols (input_bfd))
return FALSE;
- sym_count = obj_aout_external_sym_count (input_bfd);
-
/* Write out the symbols and get a map of the new indices. The map
is placed into finfo->symbol_map. */
if (! aout_link_write_symbols (finfo, input_bfd))
/* BFD back-end for MIPS PE COFF files.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009
+ 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010
Free Software Foundation, Inc.
Modified from coff-i386.c by DJ Delorie, dj@cygnus.com
static unsigned int
mips_swap_reloc_out (bfd * abfd, void * src, void * dst)
{
- static int prev_offset = 1;
static bfd_vma prev_addr = 0;
struct internal_reloc *reloc_src = (struct internal_reloc *)src;
struct external_reloc *reloc_dst = (struct external_reloc *)dst;
{
case MIPS_R_REFHI:
prev_addr = reloc_src->r_vaddr;
- prev_offset = reloc_src->r_offset;
break;
case MIPS_R_REFLO:
if (reloc_src->r_vaddr == prev_addr)
struct internal_syment *syms,
asection **sections)
{
- bfd_vma gp;
- bfd_boolean gp_undefined;
- size_t adjust;
struct internal_reloc *rel;
struct internal_reloc *rel_end;
unsigned int i;
- bfd_boolean got_lo;
if (info->relocatable)
{
BFD_ASSERT (input_bfd->xvec->byteorder
== output_bfd->xvec->byteorder);
- gp = _bfd_get_gp_value (output_bfd);
- gp_undefined = (gp == 0) ? TRUE : FALSE;
- got_lo = FALSE;
- adjust = 0;
rel = relocs;
rel_end = rel + input_section->reloc_count;
bfd_vma eh_handler;
bfd_vma eh_data;
bfd_vma prolog_end_addr;
+#if !defined(COFF_WITH_pep) || defined(COFF_WITH_pex64)
int em_data;
+#endif
if (i + PDATA_ROW_SIZE > stop)
break;
/* We are probably into the padding of the section now. */
break;
+#if !defined(COFF_WITH_pep) || defined(COFF_WITH_pex64)
em_data = ((eh_handler & 0x1) << 2) | (prolog_end_addr & 0x3);
+#endif
eh_handler &= ~(bfd_vma) 0x3;
prolog_end_addr &= ~(bfd_vma) 0x3;
/* bfd back-end for HP PA-RISC SOM objects.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+ 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
Free Software Foundation, Inc.
Contributed by the Center for Software Science at the
struct som_external_lst_header lst,
unsigned elength)
{
- file_ptr lst_filepos;
char *strings = NULL, *p;
struct som_external_lst_symbol_record *lst_syms = NULL, *curr_lst_sym;
bfd *curr_bfd;
if (last_hash_entry == NULL && hash_size != 0)
goto error_return;
- /* Lots of fields are file positions relative to the start
- of the lst record. So save its location. */
- lst_filepos = bfd_tell (abfd) - sizeof (struct som_external_lst_header);
-
/* Symbols have som_index fields, so we have to keep track of the
index of each SOM in the archive.
/* BFD back-end for VERSAdos-E objects.
Copyright 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
- 2006, 2007, 2009 Free Software Foundation, Inc.
+ 2006, 2007, 2009, 2010 Free Software Foundation, Inc.
Written by Steve Chamberlain of Cygnus Support <sac@cygnus.com>.
Versados is a Motorola trademark.
case ESD_ABS:
size = get_4 (&ptr);
+ (void) size;
start = get_4 (&ptr);
+ (void) start;
break;
case ESD_STD_REL_SEC:
case ESD_SHRT_REL_SEC:
case EGSD__C_SYMG:
{
- int nameoff;
struct vms_symbol_entry *entry;
struct vms_egst *egst = (struct vms_egst *)vms_rec;
old_flags = bfd_getl16 (egst->header.flags);
- if (old_flags & EGSY__V_DEF)
- nameoff = ESDF__B_NAMLNG;
- else
- nameoff = ESRF__B_NAMLNG;
entry = add_symbol (abfd, &egst->namlng);
/* xSYM symbol-file support for BFD.
Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
- 2009 Free Software Foundation, Inc.
+ 2009, 2010 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
unsigned long offset)
{
unsigned char buf[4];
- bfd_sym_data_struct *sdata = NULL;
BFD_ASSERT (bfd_sym_valid (abfd));
- sdata = abfd->tdata.sym_data;
if (offset == 0)
return -1;
+2010-06-27 Alan Modra <amodra@gmail.com>
+
+ * resbin.c (res_to_bin_accelerator): Delete set but unused variables.
+
2010-06-17 Nick Clifton <nickc@redhat.com>
PR binutils/11711
/* resbin.c -- manipulate the Windows binary resource format.
- Copyright 1997, 1998, 1999, 2002, 2003, 2005, 2006, 2007, 2009
+ Copyright 1997, 1998, 1999, 2002, 2003, 2005, 2006, 2007, 2009, 2010
Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
Rewritten by Kai Tietz, Onevision.
res_to_bin_accelerator (windres_bfd *wrbfd, rc_uint_type off,
const rc_accelerator *accelerators)
{
- bindata *first, **pp;
const rc_accelerator *a;
- first = NULL;
- pp = &first;
-
for (a = accelerators; a != NULL; a = a->next)
{
if (wrbfd)
+2010-06-27 Alan Modra <amodra@gmail.com>
+
+ * pe-dll.c (fill_edata): Avoid set but unused warning.
+ (pe_walk_relocs_of_symbol): Delete set but unused variables.
+ (generate_reloc, pe_implied_import_dll): Likewise.
+ * emultempl/aix.em (open_dynamic_archive): Likewise.
+ * emultempl/xtensaelf.em (replace_insn_sec_with_prop_sec): Likewise.
+ (xtensa_layout_wild): Likewise.
+ (xtensa_colocate_output_literals_callback): Likewise.
+
2010-06-25 Alan Modra <amodra@gmail.com>
* emultempl/ppc64elf.em (prelim_size_sections): New function.
/* AIX emulation code for ${EMULATION_NAME}
Copyright 1991, 1993, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
- 2003, 2004, 2005, 2006, 2007, 2008, 2009
+ 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
Free Software Foundation, Inc.
Written by Steve Chamberlain <sac@cygnus.com>
AIX support by Ian Lance Taylor <ian@cygnus.com>
search_dirs_type *search,
lang_input_statement_type *entry)
{
- const char *filename;
char *path;
if (!entry->is_archive)
return FALSE;
- filename = entry->filename;
path = concat (search->name, "/lib", entry->filename, arch, ".a", NULL);
if (!ldfile_try_open_bfd (path, entry))
{
# This shell script emits a C file. -*- C -*-
-# Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009
+# Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
# Free Software Foundation, Inc.
#
# This file is part of the GNU Binutils.
bfd_byte *insn_contents = NULL;
unsigned entry_count;
unsigned entry;
- Elf_Internal_Shdr *symtab_hdr;
Elf_Internal_Rela *internal_relocs = NULL;
unsigned reloc_count;
if (internal_relocs)
{
unsigned i;
- symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
for (i = 0; i < reloc_count; i++)
{
static void
xtensa_colocate_output_literals_callback (lang_statement_union_type *statement)
{
- lang_output_section_statement_type *os;
reloc_deps_graph *deps;
if (statement->header.type == lang_output_section_statement_enum)
{
#endif
bfd_boolean no_reorder = FALSE;
- os = &statement->output_section_statement;
-
#if EXTRA_VALIDATION
old_child_count = ld_count_children (statement);
#endif
/* Note use of array pointer math here. */
edirectory = edata_d;
- eaddresses = edata_d + 40;
+ eaddresses = edirectory + 40;
enameptrs = eaddresses + 4 * export_table_size;
eordinals = enameptrs + 4 * count_exported_byname;
enamestr = (char *) eordinals + 2 * count_exported_byname;
for (b = info->input_bfds; b; b = b->link_next)
{
asymbol **symbols;
- int nsyms;
if (!bfd_generic_link_read_symbols (b))
{
}
symbols = bfd_get_outsymbols (b);
- nsyms = bfd_get_symcount (b);
for (s = b->sections; s; s = s->next)
{
{
bfd_vma sec_vma = s->output_section->vma + s->output_offset;
asymbol **symbols;
- int nsyms;
/* If it's not loaded, we don't need to relocate it this way. */
if (!(s->output_section->flags & SEC_LOAD))
}
symbols = bfd_get_outsymbols (b);
- nsyms = bfd_get_symcount (b);
relsize = bfd_get_reloc_upper_bound (b, s);
relocs = xmalloc (relsize);
nrelocs = bfd_canonicalize_reloc (b, s, relocs, symbols);
if (!relocs[i]->howto->pc_relative
&& relocs[i]->howto->type != pe_details->imagebase_reloc)
{
- bfd_vma sym_vma;
struct bfd_symbol *sym = *relocs[i]->sym_ptr_ptr;
/* Don't create relocs for undefined weak symbols. */
continue;
}
- sym_vma = (relocs[i]->addend
- + sym->value
- + sym->section->vma
- + sym->section->output_offset
- + sym->section->output_section->vma);
reloc_data[total_relocs].vma = sec_vma + relocs[i]->address;
#define BITS_AND_SHIFT(bits, shift) (bits * 1000 | shift)
bfd_vma exp_funcbase;
unsigned char *expdata;
char *erva;
- bfd_vma name_rvas, ordinals, nexp, ordbase;
+ bfd_vma name_rvas, nexp;
const char *dllname;
/* Initialization with start > end guarantees that is_data
will not be set by mistake, and avoids compiler warning. */
nexp = pe_as32 (expdata + 24);
name_rvas = pe_as32 (expdata + 32);
- ordinals = pe_as32 (expdata + 36);
- ordbase = pe_as32 (expdata + 16);
exp_funcbase = pe_as32 (expdata + 28);
/* Use internal dll name instead of filename
+2010-06-27 Alan Modra <amodra@gmail.com>
+
+ * arc-dis.c (arc_sprintf): Delete set but unused variables.
+ (decodeInstr): Likewise.
+ * dlx-dis.c (print_insn_dlx): Likewise.
+ * h8300-dis.c (bfd_h8_disassemble_init): Likewise.
+ * maxq-dis.c (check_move, print_insn): Likewise.
+ * mep-dis.c (mep_examine_ivc2_insns): Likewise.
+ * msp430-dis.c (msp430_branchinstr): Likewise.
+ * bfin-dis.c (_print_insn_bfin): Avoid set but unused warning.
+ * cgen-asm.in (parse_insn_normal, _cgen_assemble_insn): Likewise.
+ * sparc-dis.c (print_insn_sparc): Likewise.
+ * fr30-asm.c: Regenerate.
+ * frv-asm.c: Regenerate.
+ * ip2k-asm.c: Regenerate.
+ * iq2000-asm.c: Regenerate.
+ * lm32-asm.c: Regenerate.
+ * m32c-asm.c: Regenerate.
+ * m32r-asm.c: Regenerate.
+ * mep-asm.c: Regenerate.
+ * mt-asm.c: Regenerate.
+ * openrisc-asm.c: Regenerate.
+ * xc16x-asm.c: Regenerate.
+ * xstormy16-asm.c: Regenerate.
+
2010-06-16 Vincent Rivière <vincent.riviere@freesbee.fr>
PR gas/11673
/* Instruction printing code for the ARC.
- Copyright 1994, 1995, 1997, 1998, 2000, 2001, 2002, 2005, 2007, 2009
+ Copyright 1994, 1995, 1997, 1998, 2000, 2001, 2002, 2005, 2007, 2009, 2010
Free Software Foundation, Inc.
Contributed by Doug Evans (dje@cygnus.com).
char *bp;
const char *p;
int size, leading_zero, regMap[2];
- long auxNum;
va_list ap;
va_start (ap, format);
bp = buf;
*bp = 0;
p = format;
- auxNum = -1;
regMap[0] = 0;
regMap[1] = 0;
struct arcDisState s; /* ARC Disassembler state. */
void *stream = info->stream; /* Output stream. */
fprintf_ftype func = info->fprintf_func;
- int bytes;
memset (&s, 0, sizeof(struct arcDisState));
s.instName = _instName;
/* Disassemble. */
- bytes = dsmOneArcInst (address, & s);
+ dsmOneArcInst (address, & s);
/* Display the disassembly instruction. */
(*func) (stream, "%08lx ", s.words[0]);
/* Disassemble ADI Blackfin Instructions.
- Copyright 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+ Copyright 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
This file is part of libopcodes.
int rv = 0;
status = (*outf->read_memory_func) (pc & ~0x1, buf, 2, outf);
+ /* FIXME */
+ (void) status;
status = (*outf->read_memory_func) ((pc + 2) & ~0x1, buf + 2, 2, outf);
+ /* FIXME */
+ (void) status;
iw0 = bfd_getl16 (buf);
iw1 = bfd_getl16 (buf + 2);
int count = 0;
status = (*outf->read_memory_func) (pc & ~0x01, buf, 2, outf);
+ /* FIXME */
+ (void) status;
iw0 = bfd_getl16 (buf);
count += _print_insn_bfin (pc, outf);
continue;
}
+#ifdef CGEN_MNEMONIC_OPERANDS
+ (void) past_opcode_p;
+#endif
/* We have an operand of some sort. */
- errmsg = cd->parse_operand (cd, CGEN_SYNTAX_FIELD (*syn),
- &str, fields);
+ errmsg = cd->parse_operand (cd, CGEN_SYNTAX_FIELD (*syn), &str, fields);
if (errmsg)
return errmsg;
{
static char errbuf[150];
-#ifdef CGEN_VERBOSE_ASSEMBLER_ERRORS
const char *tmp_errmsg;
-
- /* If requesting verbose error messages, use insert_errmsg.
- Failing that, use parse_errmsg. */
- tmp_errmsg = (insert_errmsg ? insert_errmsg :
- parse_errmsg ? parse_errmsg :
- recognized_mnemonic ?
- _("unrecognized form of instruction") :
- _("unrecognized instruction"));
-
- if (strlen (start) > 50)
- /* xgettext:c-format */
- sprintf (errbuf, "%s `%.50s...'", tmp_errmsg, start);
- else
- /* xgettext:c-format */
- sprintf (errbuf, "%s `%.50s'", tmp_errmsg, start);
+#ifdef CGEN_VERBOSE_ASSEMBLER_ERRORS
+#define be_verbose 1
#else
- if (strlen (start) > 50)
- /* xgettext:c-format */
- sprintf (errbuf, _("bad instruction `%.50s...'"), start);
- else
- /* xgettext:c-format */
- sprintf (errbuf, _("bad instruction `%.50s'"), start);
+#define be_verbose 0
#endif
+
+ if (be_verbose)
+ {
+ /* If requesting verbose error messages, use insert_errmsg.
+ Failing that, use parse_errmsg. */
+ tmp_errmsg = (insert_errmsg ? insert_errmsg :
+ parse_errmsg ? parse_errmsg :
+ recognized_mnemonic ?
+ _("unrecognized form of instruction") :
+ _("unrecognized instruction"));
+
+ if (strlen (start) > 50)
+ /* xgettext:c-format */
+ sprintf (errbuf, "%s `%.50s...'", tmp_errmsg, start);
+ else
+ /* xgettext:c-format */
+ sprintf (errbuf, "%s `%.50s'", tmp_errmsg, start);
+ }
+ else
+ {
+ if (strlen (start) > 50)
+ /* xgettext:c-format */
+ sprintf (errbuf, _("bad instruction `%.50s...'"), start);
+ else
+ /* xgettext:c-format */
+ sprintf (errbuf, _("bad instruction `%.50s'"), start);
+ }
*errmsg = errbuf;
return NULL;
/* Instruction printing code for the DLX Microprocessor
- Copyright 2002, 2005, 2007 Free Software Foundation, Inc.
+ Copyright 2002, 2005, 2007, 2010 Free Software Foundation, Inc.
Contributed by Kuang Hwa Lin. Written by Kuang Hwa Lin, 03/2002.
This file is part of the GNU opcodes library.
bfd_byte buffer[4];
int insn_idx;
unsigned long insn_word;
- unsigned char rtn_code;
unsigned long dlx_insn_type[] =
{
(unsigned long) dlx_r_type,
#endif
/* Scan through all the insn type and print the insn out. */
- rtn_code = 0;
current_insn_addr = (unsigned long) memaddr;
for (insn_idx = 0; dlx_insn_type[insn_idx] != 0x0; insn_idx++)
continue;
}
+#ifdef CGEN_MNEMONIC_OPERANDS
+ (void) past_opcode_p;
+#endif
/* We have an operand of some sort. */
- errmsg = cd->parse_operand (cd, CGEN_SYNTAX_FIELD (*syn),
- &str, fields);
+ errmsg = cd->parse_operand (cd, CGEN_SYNTAX_FIELD (*syn), &str, fields);
if (errmsg)
return errmsg;
{
static char errbuf[150];
-#ifdef CGEN_VERBOSE_ASSEMBLER_ERRORS
const char *tmp_errmsg;
-
- /* If requesting verbose error messages, use insert_errmsg.
- Failing that, use parse_errmsg. */
- tmp_errmsg = (insert_errmsg ? insert_errmsg :
- parse_errmsg ? parse_errmsg :
- recognized_mnemonic ?
- _("unrecognized form of instruction") :
- _("unrecognized instruction"));
-
- if (strlen (start) > 50)
- /* xgettext:c-format */
- sprintf (errbuf, "%s `%.50s...'", tmp_errmsg, start);
- else
- /* xgettext:c-format */
- sprintf (errbuf, "%s `%.50s'", tmp_errmsg, start);
+#ifdef CGEN_VERBOSE_ASSEMBLER_ERRORS
+#define be_verbose 1
#else
- if (strlen (start) > 50)
- /* xgettext:c-format */
- sprintf (errbuf, _("bad instruction `%.50s...'"), start);
- else
- /* xgettext:c-format */
- sprintf (errbuf, _("bad instruction `%.50s'"), start);
+#define be_verbose 0
#endif
+
+ if (be_verbose)
+ {
+ /* If requesting verbose error messages, use insert_errmsg.
+ Failing that, use parse_errmsg. */
+ tmp_errmsg = (insert_errmsg ? insert_errmsg :
+ parse_errmsg ? parse_errmsg :
+ recognized_mnemonic ?
+ _("unrecognized form of instruction") :
+ _("unrecognized instruction"));
+
+ if (strlen (start) > 50)
+ /* xgettext:c-format */
+ sprintf (errbuf, "%s `%.50s...'", tmp_errmsg, start);
+ else
+ /* xgettext:c-format */
+ sprintf (errbuf, "%s `%.50s'", tmp_errmsg, start);
+ }
+ else
+ {
+ if (strlen (start) > 50)
+ /* xgettext:c-format */
+ sprintf (errbuf, _("bad instruction `%.50s...'"), start);
+ else
+ /* xgettext:c-format */
+ sprintf (errbuf, _("bad instruction `%.50s'"), start);
+ }
*errmsg = errbuf;
return NULL;
continue;
}
+#ifdef CGEN_MNEMONIC_OPERANDS
+ (void) past_opcode_p;
+#endif
/* We have an operand of some sort. */
- errmsg = cd->parse_operand (cd, CGEN_SYNTAX_FIELD (*syn),
- &str, fields);
+ errmsg = cd->parse_operand (cd, CGEN_SYNTAX_FIELD (*syn), &str, fields);
if (errmsg)
return errmsg;
{
static char errbuf[150];
-#ifdef CGEN_VERBOSE_ASSEMBLER_ERRORS
const char *tmp_errmsg;
-
- /* If requesting verbose error messages, use insert_errmsg.
- Failing that, use parse_errmsg. */
- tmp_errmsg = (insert_errmsg ? insert_errmsg :
- parse_errmsg ? parse_errmsg :
- recognized_mnemonic ?
- _("unrecognized form of instruction") :
- _("unrecognized instruction"));
-
- if (strlen (start) > 50)
- /* xgettext:c-format */
- sprintf (errbuf, "%s `%.50s...'", tmp_errmsg, start);
- else
- /* xgettext:c-format */
- sprintf (errbuf, "%s `%.50s'", tmp_errmsg, start);
+#ifdef CGEN_VERBOSE_ASSEMBLER_ERRORS
+#define be_verbose 1
#else
- if (strlen (start) > 50)
- /* xgettext:c-format */
- sprintf (errbuf, _("bad instruction `%.50s...'"), start);
- else
- /* xgettext:c-format */
- sprintf (errbuf, _("bad instruction `%.50s'"), start);
+#define be_verbose 0
#endif
+
+ if (be_verbose)
+ {
+ /* If requesting verbose error messages, use insert_errmsg.
+ Failing that, use parse_errmsg. */
+ tmp_errmsg = (insert_errmsg ? insert_errmsg :
+ parse_errmsg ? parse_errmsg :
+ recognized_mnemonic ?
+ _("unrecognized form of instruction") :
+ _("unrecognized instruction"));
+
+ if (strlen (start) > 50)
+ /* xgettext:c-format */
+ sprintf (errbuf, "%s `%.50s...'", tmp_errmsg, start);
+ else
+ /* xgettext:c-format */
+ sprintf (errbuf, "%s `%.50s'", tmp_errmsg, start);
+ }
+ else
+ {
+ if (strlen (start) > 50)
+ /* xgettext:c-format */
+ sprintf (errbuf, _("bad instruction `%.50s...'"), start);
+ else
+ /* xgettext:c-format */
+ sprintf (errbuf, _("bad instruction `%.50s'"), start);
+ }
*errmsg = errbuf;
return NULL;
/* Disassemble h8300 instructions.
Copyright 1993, 1994, 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007 Free Software Foundation, Inc.
+ 2007, 2010 Free Software Foundation, Inc.
This file is part of the GNU opcodes library.
for (p = h8_opcodes, pi = h8_instructions; p->name; p++, pi++)
{
- int n1 = 0;
- int n2 = 0;
-
- if ((int) p->data.nib[0] < 16)
- n1 = (int) p->data.nib[0];
- else
- n1 = 0;
-
- if ((int) p->data.nib[1] < 16)
- n2 = (int) p->data.nib[1];
- else
- n2 = 0;
-
/* Just make sure there are an even number of nibbles in it, and
that the count is the same as the length. */
for (i = 0; p->data.nib[i] != (op_type) E; i++)
continue;
}
+#ifdef CGEN_MNEMONIC_OPERANDS
+ (void) past_opcode_p;
+#endif
/* We have an operand of some sort. */
- errmsg = cd->parse_operand (cd, CGEN_SYNTAX_FIELD (*syn),
- &str, fields);
+ errmsg = cd->parse_operand (cd, CGEN_SYNTAX_FIELD (*syn), &str, fields);
if (errmsg)
return errmsg;
{
static char errbuf[150];
-#ifdef CGEN_VERBOSE_ASSEMBLER_ERRORS
const char *tmp_errmsg;
-
- /* If requesting verbose error messages, use insert_errmsg.
- Failing that, use parse_errmsg. */
- tmp_errmsg = (insert_errmsg ? insert_errmsg :
- parse_errmsg ? parse_errmsg :
- recognized_mnemonic ?
- _("unrecognized form of instruction") :
- _("unrecognized instruction"));
-
- if (strlen (start) > 50)
- /* xgettext:c-format */
- sprintf (errbuf, "%s `%.50s...'", tmp_errmsg, start);
- else
- /* xgettext:c-format */
- sprintf (errbuf, "%s `%.50s'", tmp_errmsg, start);
+#ifdef CGEN_VERBOSE_ASSEMBLER_ERRORS
+#define be_verbose 1
#else
- if (strlen (start) > 50)
- /* xgettext:c-format */
- sprintf (errbuf, _("bad instruction `%.50s...'"), start);
- else
- /* xgettext:c-format */
- sprintf (errbuf, _("bad instruction `%.50s'"), start);
+#define be_verbose 0
#endif
+
+ if (be_verbose)
+ {
+ /* If requesting verbose error messages, use insert_errmsg.
+ Failing that, use parse_errmsg. */
+ tmp_errmsg = (insert_errmsg ? insert_errmsg :
+ parse_errmsg ? parse_errmsg :
+ recognized_mnemonic ?
+ _("unrecognized form of instruction") :
+ _("unrecognized instruction"));
+
+ if (strlen (start) > 50)
+ /* xgettext:c-format */
+ sprintf (errbuf, "%s `%.50s...'", tmp_errmsg, start);
+ else
+ /* xgettext:c-format */
+ sprintf (errbuf, "%s `%.50s'", tmp_errmsg, start);
+ }
+ else
+ {
+ if (strlen (start) > 50)
+ /* xgettext:c-format */
+ sprintf (errbuf, _("bad instruction `%.50s...'"), start);
+ else
+ /* xgettext:c-format */
+ sprintf (errbuf, _("bad instruction `%.50s'"), start);
+ }
*errmsg = errbuf;
return NULL;
continue;
}
+#ifdef CGEN_MNEMONIC_OPERANDS
+ (void) past_opcode_p;
+#endif
/* We have an operand of some sort. */
- errmsg = cd->parse_operand (cd, CGEN_SYNTAX_FIELD (*syn),
- &str, fields);
+ errmsg = cd->parse_operand (cd, CGEN_SYNTAX_FIELD (*syn), &str, fields);
if (errmsg)
return errmsg;
{
static char errbuf[150];
-#ifdef CGEN_VERBOSE_ASSEMBLER_ERRORS
const char *tmp_errmsg;
-
- /* If requesting verbose error messages, use insert_errmsg.
- Failing that, use parse_errmsg. */
- tmp_errmsg = (insert_errmsg ? insert_errmsg :
- parse_errmsg ? parse_errmsg :
- recognized_mnemonic ?
- _("unrecognized form of instruction") :
- _("unrecognized instruction"));
-
- if (strlen (start) > 50)
- /* xgettext:c-format */
- sprintf (errbuf, "%s `%.50s...'", tmp_errmsg, start);
- else
- /* xgettext:c-format */
- sprintf (errbuf, "%s `%.50s'", tmp_errmsg, start);
+#ifdef CGEN_VERBOSE_ASSEMBLER_ERRORS
+#define be_verbose 1
#else
- if (strlen (start) > 50)
- /* xgettext:c-format */
- sprintf (errbuf, _("bad instruction `%.50s...'"), start);
- else
- /* xgettext:c-format */
- sprintf (errbuf, _("bad instruction `%.50s'"), start);
+#define be_verbose 0
#endif
+
+ if (be_verbose)
+ {
+ /* If requesting verbose error messages, use insert_errmsg.
+ Failing that, use parse_errmsg. */
+ tmp_errmsg = (insert_errmsg ? insert_errmsg :
+ parse_errmsg ? parse_errmsg :
+ recognized_mnemonic ?
+ _("unrecognized form of instruction") :
+ _("unrecognized instruction"));
+
+ if (strlen (start) > 50)
+ /* xgettext:c-format */
+ sprintf (errbuf, "%s `%.50s...'", tmp_errmsg, start);
+ else
+ /* xgettext:c-format */
+ sprintf (errbuf, "%s `%.50s'", tmp_errmsg, start);
+ }
+ else
+ {
+ if (strlen (start) > 50)
+ /* xgettext:c-format */
+ sprintf (errbuf, _("bad instruction `%.50s...'"), start);
+ else
+ /* xgettext:c-format */
+ sprintf (errbuf, _("bad instruction `%.50s'"), start);
+ }
*errmsg = errbuf;
return NULL;
continue;
}
+#ifdef CGEN_MNEMONIC_OPERANDS
+ (void) past_opcode_p;
+#endif
/* We have an operand of some sort. */
- errmsg = cd->parse_operand (cd, CGEN_SYNTAX_FIELD (*syn),
- &str, fields);
+ errmsg = cd->parse_operand (cd, CGEN_SYNTAX_FIELD (*syn), &str, fields);
if (errmsg)
return errmsg;
{
static char errbuf[150];
-#ifdef CGEN_VERBOSE_ASSEMBLER_ERRORS
const char *tmp_errmsg;
-
- /* If requesting verbose error messages, use insert_errmsg.
- Failing that, use parse_errmsg. */
- tmp_errmsg = (insert_errmsg ? insert_errmsg :
- parse_errmsg ? parse_errmsg :
- recognized_mnemonic ?
- _("unrecognized form of instruction") :
- _("unrecognized instruction"));
-
- if (strlen (start) > 50)
- /* xgettext:c-format */
- sprintf (errbuf, "%s `%.50s...'", tmp_errmsg, start);
- else
- /* xgettext:c-format */
- sprintf (errbuf, "%s `%.50s'", tmp_errmsg, start);
+#ifdef CGEN_VERBOSE_ASSEMBLER_ERRORS
+#define be_verbose 1
#else
- if (strlen (start) > 50)
- /* xgettext:c-format */
- sprintf (errbuf, _("bad instruction `%.50s...'"), start);
- else
- /* xgettext:c-format */
- sprintf (errbuf, _("bad instruction `%.50s'"), start);
+#define be_verbose 0
#endif
+
+ if (be_verbose)
+ {
+ /* If requesting verbose error messages, use insert_errmsg.
+ Failing that, use parse_errmsg. */
+ tmp_errmsg = (insert_errmsg ? insert_errmsg :
+ parse_errmsg ? parse_errmsg :
+ recognized_mnemonic ?
+ _("unrecognized form of instruction") :
+ _("unrecognized instruction"));
+
+ if (strlen (start) > 50)
+ /* xgettext:c-format */
+ sprintf (errbuf, "%s `%.50s...'", tmp_errmsg, start);
+ else
+ /* xgettext:c-format */
+ sprintf (errbuf, "%s `%.50s'", tmp_errmsg, start);
+ }
+ else
+ {
+ if (strlen (start) > 50)
+ /* xgettext:c-format */
+ sprintf (errbuf, _("bad instruction `%.50s...'"), start);
+ else
+ /* xgettext:c-format */
+ sprintf (errbuf, _("bad instruction `%.50s'"), start);
+ }
*errmsg = errbuf;
return NULL;
continue;
}
+#ifdef CGEN_MNEMONIC_OPERANDS
+ (void) past_opcode_p;
+#endif
/* We have an operand of some sort. */
- errmsg = cd->parse_operand (cd, CGEN_SYNTAX_FIELD (*syn),
- &str, fields);
+ errmsg = cd->parse_operand (cd, CGEN_SYNTAX_FIELD (*syn), &str, fields);
if (errmsg)
return errmsg;
{
static char errbuf[150];
-#ifdef CGEN_VERBOSE_ASSEMBLER_ERRORS
const char *tmp_errmsg;
-
- /* If requesting verbose error messages, use insert_errmsg.
- Failing that, use parse_errmsg. */
- tmp_errmsg = (insert_errmsg ? insert_errmsg :
- parse_errmsg ? parse_errmsg :
- recognized_mnemonic ?
- _("unrecognized form of instruction") :
- _("unrecognized instruction"));
-
- if (strlen (start) > 50)
- /* xgettext:c-format */
- sprintf (errbuf, "%s `%.50s...'", tmp_errmsg, start);
- else
- /* xgettext:c-format */
- sprintf (errbuf, "%s `%.50s'", tmp_errmsg, start);
+#ifdef CGEN_VERBOSE_ASSEMBLER_ERRORS
+#define be_verbose 1
#else
- if (strlen (start) > 50)
- /* xgettext:c-format */
- sprintf (errbuf, _("bad instruction `%.50s...'"), start);
- else
- /* xgettext:c-format */
- sprintf (errbuf, _("bad instruction `%.50s'"), start);
+#define be_verbose 0
#endif
+
+ if (be_verbose)
+ {
+ /* If requesting verbose error messages, use insert_errmsg.
+ Failing that, use parse_errmsg. */
+ tmp_errmsg = (insert_errmsg ? insert_errmsg :
+ parse_errmsg ? parse_errmsg :
+ recognized_mnemonic ?
+ _("unrecognized form of instruction") :
+ _("unrecognized instruction"));
+
+ if (strlen (start) > 50)
+ /* xgettext:c-format */
+ sprintf (errbuf, "%s `%.50s...'", tmp_errmsg, start);
+ else
+ /* xgettext:c-format */
+ sprintf (errbuf, "%s `%.50s'", tmp_errmsg, start);
+ }
+ else
+ {
+ if (strlen (start) > 50)
+ /* xgettext:c-format */
+ sprintf (errbuf, _("bad instruction `%.50s...'"), start);
+ else
+ /* xgettext:c-format */
+ sprintf (errbuf, _("bad instruction `%.50s'"), start);
+ }
*errmsg = errbuf;
return NULL;
continue;
}
+#ifdef CGEN_MNEMONIC_OPERANDS
+ (void) past_opcode_p;
+#endif
/* We have an operand of some sort. */
- errmsg = cd->parse_operand (cd, CGEN_SYNTAX_FIELD (*syn),
- &str, fields);
+ errmsg = cd->parse_operand (cd, CGEN_SYNTAX_FIELD (*syn), &str, fields);
if (errmsg)
return errmsg;
{
static char errbuf[150];
-#ifdef CGEN_VERBOSE_ASSEMBLER_ERRORS
const char *tmp_errmsg;
-
- /* If requesting verbose error messages, use insert_errmsg.
- Failing that, use parse_errmsg. */
- tmp_errmsg = (insert_errmsg ? insert_errmsg :
- parse_errmsg ? parse_errmsg :
- recognized_mnemonic ?
- _("unrecognized form of instruction") :
- _("unrecognized instruction"));
-
- if (strlen (start) > 50)
- /* xgettext:c-format */
- sprintf (errbuf, "%s `%.50s...'", tmp_errmsg, start);
- else
- /* xgettext:c-format */
- sprintf (errbuf, "%s `%.50s'", tmp_errmsg, start);
+#ifdef CGEN_VERBOSE_ASSEMBLER_ERRORS
+#define be_verbose 1
#else
- if (strlen (start) > 50)
- /* xgettext:c-format */
- sprintf (errbuf, _("bad instruction `%.50s...'"), start);
- else
- /* xgettext:c-format */
- sprintf (errbuf, _("bad instruction `%.50s'"), start);
+#define be_verbose 0
#endif
+
+ if (be_verbose)
+ {
+ /* If requesting verbose error messages, use insert_errmsg.
+ Failing that, use parse_errmsg. */
+ tmp_errmsg = (insert_errmsg ? insert_errmsg :
+ parse_errmsg ? parse_errmsg :
+ recognized_mnemonic ?
+ _("unrecognized form of instruction") :
+ _("unrecognized instruction"));
+
+ if (strlen (start) > 50)
+ /* xgettext:c-format */
+ sprintf (errbuf, "%s `%.50s...'", tmp_errmsg, start);
+ else
+ /* xgettext:c-format */
+ sprintf (errbuf, "%s `%.50s'", tmp_errmsg, start);
+ }
+ else
+ {
+ if (strlen (start) > 50)
+ /* xgettext:c-format */
+ sprintf (errbuf, _("bad instruction `%.50s...'"), start);
+ else
+ /* xgettext:c-format */
+ sprintf (errbuf, _("bad instruction `%.50s'"), start);
+ }
*errmsg = errbuf;
return NULL;
/* Instruction printing code for the MAXQ
- Copyright 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
+ Copyright 2004, 2005, 2007, 2009, 2010 Free Software Foundation, Inc.
Written by Vineet Sharma(vineets@noida.hcltech.com) Inderpreet
S.(inderpreetb@noida.hcltech.com)
{
bfd_boolean first = FALSE;
bfd_boolean second = FALSE;
- char *first_reg;
- char *second_reg;
reg_entry const *reg_x;
const unsigned char module1 = insn0 & MASK_LOW_BYTE;
const unsigned char index1 = ((insn0 & 0x70) >> 4);
/* A[AP] not allowed. */
if ((reg_x->Mod_name == 0x0A) && (reg_x->Mod_index == 0x01))
continue;
- first_reg = reg_x->reg_name;
first = TRUE;
break;
}
&& (reg_x->Mod_index == (((insn8 & 0xf0) >> 4))))
{
second = TRUE;
- second_reg = reg_x->reg_name;
break;
}
}
enum bfd_endian endianess)
{
/* The raw instruction. */
- unsigned char insn[2], insn0, insn8, derived_code;
+ unsigned char insn[2], derived_code;
unsigned int format;
unsigned int actual_operands;
unsigned int i;
return -1;
}
- insn8 = insn[1];
- insn0 = insn[0];
-
/* FIXME: Endianness always little. */
if (endianess == BFD_ENDIAN_BIG)
get_insn_opcode (((insn[0] << 8) | (insn[1])), &grp);
return 2;
}
- /* The opcode is always in insn0. */
+ /* The opcode is always in insn[0]. */
for (opcode = &op_table[0]; opcode->name != NULL; ++opcode)
{
if (opcode->instr_id == derived_code)
continue;
}
+#ifdef CGEN_MNEMONIC_OPERANDS
+ (void) past_opcode_p;
+#endif
/* We have an operand of some sort. */
- errmsg = cd->parse_operand (cd, CGEN_SYNTAX_FIELD (*syn),
- &str, fields);
+ errmsg = cd->parse_operand (cd, CGEN_SYNTAX_FIELD (*syn), &str, fields);
if (errmsg)
return errmsg;
{
static char errbuf[150];
-#ifdef CGEN_VERBOSE_ASSEMBLER_ERRORS
const char *tmp_errmsg;
-
- /* If requesting verbose error messages, use insert_errmsg.
- Failing that, use parse_errmsg. */
- tmp_errmsg = (insert_errmsg ? insert_errmsg :
- parse_errmsg ? parse_errmsg :
- recognized_mnemonic ?
- _("unrecognized form of instruction") :
- _("unrecognized instruction"));
-
- if (strlen (start) > 50)
- /* xgettext:c-format */
- sprintf (errbuf, "%s `%.50s...'", tmp_errmsg, start);
- else
- /* xgettext:c-format */
- sprintf (errbuf, "%s `%.50s'", tmp_errmsg, start);
+#ifdef CGEN_VERBOSE_ASSEMBLER_ERRORS
+#define be_verbose 1
#else
- if (strlen (start) > 50)
- /* xgettext:c-format */
- sprintf (errbuf, _("bad instruction `%.50s...'"), start);
- else
- /* xgettext:c-format */
- sprintf (errbuf, _("bad instruction `%.50s'"), start);
+#define be_verbose 0
#endif
+
+ if (be_verbose)
+ {
+ /* If requesting verbose error messages, use insert_errmsg.
+ Failing that, use parse_errmsg. */
+ tmp_errmsg = (insert_errmsg ? insert_errmsg :
+ parse_errmsg ? parse_errmsg :
+ recognized_mnemonic ?
+ _("unrecognized form of instruction") :
+ _("unrecognized instruction"));
+
+ if (strlen (start) > 50)
+ /* xgettext:c-format */
+ sprintf (errbuf, "%s `%.50s...'", tmp_errmsg, start);
+ else
+ /* xgettext:c-format */
+ sprintf (errbuf, "%s `%.50s'", tmp_errmsg, start);
+ }
+ else
+ {
+ if (strlen (start) > 50)
+ /* xgettext:c-format */
+ sprintf (errbuf, _("bad instruction `%.50s...'"), start);
+ else
+ /* xgettext:c-format */
+ sprintf (errbuf, _("bad instruction `%.50s'"), start);
+ }
*errmsg = errbuf;
return NULL;
{
int status;
int buflength;
- int cop2buflength;
bfd_byte buf[8];
bfd_byte insn[8];
int e;
/* At this time we're not supporting internally parallel
coprocessors, so cop2buflength will always be 0. */
- cop2buflength = 0;
/* Read in 64 bits. */
buflength = 8; /* VLIW insn spans 8 bytes. */
/* Disassemble MSP430 instructions.
- Copyright (C) 2002, 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004, 2005, 2007, 2009, 2010
+ Free Software Foundation, Inc.
Contributed by Dmitry Diky <diwil@mail.ru>
int *cycles)
{
int regs = 0, regd = 0;
- int ad = 0, as = 0;
+ int as = 0;
int cmd_len = 2;
short dst = 0;
regd = insn & 0x0f;
regs = (insn & 0x0f00) >> 8;
as = (insn & 0x0030) >> 4;
- ad = (insn & 0x0080) >> 7;
if (regd != 0) /* Destination register is not a PC. */
return 0;
continue;
}
+#ifdef CGEN_MNEMONIC_OPERANDS
+ (void) past_opcode_p;
+#endif
/* We have an operand of some sort. */
- errmsg = cd->parse_operand (cd, CGEN_SYNTAX_FIELD (*syn),
- &str, fields);
+ errmsg = cd->parse_operand (cd, CGEN_SYNTAX_FIELD (*syn), &str, fields);
if (errmsg)
return errmsg;
{
static char errbuf[150];
-#ifdef CGEN_VERBOSE_ASSEMBLER_ERRORS
const char *tmp_errmsg;
-
- /* If requesting verbose error messages, use insert_errmsg.
- Failing that, use parse_errmsg. */
- tmp_errmsg = (insert_errmsg ? insert_errmsg :
- parse_errmsg ? parse_errmsg :
- recognized_mnemonic ?
- _("unrecognized form of instruction") :
- _("unrecognized instruction"));
-
- if (strlen (start) > 50)
- /* xgettext:c-format */
- sprintf (errbuf, "%s `%.50s...'", tmp_errmsg, start);
- else
- /* xgettext:c-format */
- sprintf (errbuf, "%s `%.50s'", tmp_errmsg, start);
+#ifdef CGEN_VERBOSE_ASSEMBLER_ERRORS
+#define be_verbose 1
#else
- if (strlen (start) > 50)
- /* xgettext:c-format */
- sprintf (errbuf, _("bad instruction `%.50s...'"), start);
- else
- /* xgettext:c-format */
- sprintf (errbuf, _("bad instruction `%.50s'"), start);
+#define be_verbose 0
#endif
+
+ if (be_verbose)
+ {
+ /* If requesting verbose error messages, use insert_errmsg.
+ Failing that, use parse_errmsg. */
+ tmp_errmsg = (insert_errmsg ? insert_errmsg :
+ parse_errmsg ? parse_errmsg :
+ recognized_mnemonic ?
+ _("unrecognized form of instruction") :
+ _("unrecognized instruction"));
+
+ if (strlen (start) > 50)
+ /* xgettext:c-format */
+ sprintf (errbuf, "%s `%.50s...'", tmp_errmsg, start);
+ else
+ /* xgettext:c-format */
+ sprintf (errbuf, "%s `%.50s'", tmp_errmsg, start);
+ }
+ else
+ {
+ if (strlen (start) > 50)
+ /* xgettext:c-format */
+ sprintf (errbuf, _("bad instruction `%.50s...'"), start);
+ else
+ /* xgettext:c-format */
+ sprintf (errbuf, _("bad instruction `%.50s'"), start);
+ }
*errmsg = errbuf;
return NULL;
continue;
}
+#ifdef CGEN_MNEMONIC_OPERANDS
+ (void) past_opcode_p;
+#endif
/* We have an operand of some sort. */
- errmsg = cd->parse_operand (cd, CGEN_SYNTAX_FIELD (*syn),
- &str, fields);
+ errmsg = cd->parse_operand (cd, CGEN_SYNTAX_FIELD (*syn), &str, fields);
if (errmsg)
return errmsg;
{
static char errbuf[150];
-#ifdef CGEN_VERBOSE_ASSEMBLER_ERRORS
const char *tmp_errmsg;
-
- /* If requesting verbose error messages, use insert_errmsg.
- Failing that, use parse_errmsg. */
- tmp_errmsg = (insert_errmsg ? insert_errmsg :
- parse_errmsg ? parse_errmsg :
- recognized_mnemonic ?
- _("unrecognized form of instruction") :
- _("unrecognized instruction"));
-
- if (strlen (start) > 50)
- /* xgettext:c-format */
- sprintf (errbuf, "%s `%.50s...'", tmp_errmsg, start);
- else
- /* xgettext:c-format */
- sprintf (errbuf, "%s `%.50s'", tmp_errmsg, start);
+#ifdef CGEN_VERBOSE_ASSEMBLER_ERRORS
+#define be_verbose 1
#else
- if (strlen (start) > 50)
- /* xgettext:c-format */
- sprintf (errbuf, _("bad instruction `%.50s...'"), start);
- else
- /* xgettext:c-format */
- sprintf (errbuf, _("bad instruction `%.50s'"), start);
+#define be_verbose 0
#endif
+
+ if (be_verbose)
+ {
+ /* If requesting verbose error messages, use insert_errmsg.
+ Failing that, use parse_errmsg. */
+ tmp_errmsg = (insert_errmsg ? insert_errmsg :
+ parse_errmsg ? parse_errmsg :
+ recognized_mnemonic ?
+ _("unrecognized form of instruction") :
+ _("unrecognized instruction"));
+
+ if (strlen (start) > 50)
+ /* xgettext:c-format */
+ sprintf (errbuf, "%s `%.50s...'", tmp_errmsg, start);
+ else
+ /* xgettext:c-format */
+ sprintf (errbuf, "%s `%.50s'", tmp_errmsg, start);
+ }
+ else
+ {
+ if (strlen (start) > 50)
+ /* xgettext:c-format */
+ sprintf (errbuf, _("bad instruction `%.50s...'"), start);
+ else
+ /* xgettext:c-format */
+ sprintf (errbuf, _("bad instruction `%.50s'"), start);
+ }
*errmsg = errbuf;
return NULL;
/* Print SPARC instructions.
Copyright 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+ 2000, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010
Free Software Foundation, Inc.
This file is part of the GNU opcodes library.
if (opcode->flags & (F_UNBR|F_CONDBR|F_JSR))
{
- /* FIXME -- check is_annulled flag. */
+ /* FIXME -- check is_annulled flag. */
+ (void) is_annulled;
if (opcode->flags & F_UNBR)
info->insn_type = dis_branch;
if (opcode->flags & F_CONDBR)
continue;
}
+#ifdef CGEN_MNEMONIC_OPERANDS
+ (void) past_opcode_p;
+#endif
/* We have an operand of some sort. */
- errmsg = cd->parse_operand (cd, CGEN_SYNTAX_FIELD (*syn),
- &str, fields);
+ errmsg = cd->parse_operand (cd, CGEN_SYNTAX_FIELD (*syn), &str, fields);
if (errmsg)
return errmsg;
{
static char errbuf[150];
-#ifdef CGEN_VERBOSE_ASSEMBLER_ERRORS
const char *tmp_errmsg;
-
- /* If requesting verbose error messages, use insert_errmsg.
- Failing that, use parse_errmsg. */
- tmp_errmsg = (insert_errmsg ? insert_errmsg :
- parse_errmsg ? parse_errmsg :
- recognized_mnemonic ?
- _("unrecognized form of instruction") :
- _("unrecognized instruction"));
-
- if (strlen (start) > 50)
- /* xgettext:c-format */
- sprintf (errbuf, "%s `%.50s...'", tmp_errmsg, start);
- else
- /* xgettext:c-format */
- sprintf (errbuf, "%s `%.50s'", tmp_errmsg, start);
+#ifdef CGEN_VERBOSE_ASSEMBLER_ERRORS
+#define be_verbose 1
#else
- if (strlen (start) > 50)
- /* xgettext:c-format */
- sprintf (errbuf, _("bad instruction `%.50s...'"), start);
- else
- /* xgettext:c-format */
- sprintf (errbuf, _("bad instruction `%.50s'"), start);
+#define be_verbose 0
#endif
+
+ if (be_verbose)
+ {
+ /* If requesting verbose error messages, use insert_errmsg.
+ Failing that, use parse_errmsg. */
+ tmp_errmsg = (insert_errmsg ? insert_errmsg :
+ parse_errmsg ? parse_errmsg :
+ recognized_mnemonic ?
+ _("unrecognized form of instruction") :
+ _("unrecognized instruction"));
+
+ if (strlen (start) > 50)
+ /* xgettext:c-format */
+ sprintf (errbuf, "%s `%.50s...'", tmp_errmsg, start);
+ else
+ /* xgettext:c-format */
+ sprintf (errbuf, "%s `%.50s'", tmp_errmsg, start);
+ }
+ else
+ {
+ if (strlen (start) > 50)
+ /* xgettext:c-format */
+ sprintf (errbuf, _("bad instruction `%.50s...'"), start);
+ else
+ /* xgettext:c-format */
+ sprintf (errbuf, _("bad instruction `%.50s'"), start);
+ }
*errmsg = errbuf;
return NULL;
continue;
}
+#ifdef CGEN_MNEMONIC_OPERANDS
+ (void) past_opcode_p;
+#endif
/* We have an operand of some sort. */
- errmsg = cd->parse_operand (cd, CGEN_SYNTAX_FIELD (*syn),
- &str, fields);
+ errmsg = cd->parse_operand (cd, CGEN_SYNTAX_FIELD (*syn), &str, fields);
if (errmsg)
return errmsg;
{
static char errbuf[150];
-#ifdef CGEN_VERBOSE_ASSEMBLER_ERRORS
const char *tmp_errmsg;
-
- /* If requesting verbose error messages, use insert_errmsg.
- Failing that, use parse_errmsg. */
- tmp_errmsg = (insert_errmsg ? insert_errmsg :
- parse_errmsg ? parse_errmsg :
- recognized_mnemonic ?
- _("unrecognized form of instruction") :
- _("unrecognized instruction"));
-
- if (strlen (start) > 50)
- /* xgettext:c-format */
- sprintf (errbuf, "%s `%.50s...'", tmp_errmsg, start);
- else
- /* xgettext:c-format */
- sprintf (errbuf, "%s `%.50s'", tmp_errmsg, start);
+#ifdef CGEN_VERBOSE_ASSEMBLER_ERRORS
+#define be_verbose 1
#else
- if (strlen (start) > 50)
- /* xgettext:c-format */
- sprintf (errbuf, _("bad instruction `%.50s...'"), start);
- else
- /* xgettext:c-format */
- sprintf (errbuf, _("bad instruction `%.50s'"), start);
+#define be_verbose 0
#endif
+
+ if (be_verbose)
+ {
+ /* If requesting verbose error messages, use insert_errmsg.
+ Failing that, use parse_errmsg. */
+ tmp_errmsg = (insert_errmsg ? insert_errmsg :
+ parse_errmsg ? parse_errmsg :
+ recognized_mnemonic ?
+ _("unrecognized form of instruction") :
+ _("unrecognized instruction"));
+
+ if (strlen (start) > 50)
+ /* xgettext:c-format */
+ sprintf (errbuf, "%s `%.50s...'", tmp_errmsg, start);
+ else
+ /* xgettext:c-format */
+ sprintf (errbuf, "%s `%.50s'", tmp_errmsg, start);
+ }
+ else
+ {
+ if (strlen (start) > 50)
+ /* xgettext:c-format */
+ sprintf (errbuf, _("bad instruction `%.50s...'"), start);
+ else
+ /* xgettext:c-format */
+ sprintf (errbuf, _("bad instruction `%.50s'"), start);
+ }
*errmsg = errbuf;
return NULL;