+2010-04-09 Nick Clifton <nickc@redhat.com>
+
+ * aoutx.h (aout_link_input_bfd): Remove unused variable sym_count.
+ * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Remove unused
+ variables htab and hdr_info and mark info parameter as unused.
+ * elf.c (prep_headers): Remove unused variable i_phdrp.
+ (_bfd_elf_write_object_contents): Remove unused variable i_ehdrp.
+ * elf32-i386.c (elf_i386_relocate_section): Mark variabled warned
+ as unused.
+ * peXXigen.c (pe_print_reloc): Remove unused variable datasize.
+ * verilog.c (verilog_write_section): Remove unused variable
+ address.
+
2010-04-07 Alan Modra <amodra@gmail.com>
* warning.m4 (GCC_WARN_CFLAGS): Only add -Wshadow for gcc-4 and above.
/* BFD semi-generic back-end for a.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.
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_vma
_bfd_elf_eh_frame_section_offset (bfd *output_bfd ATTRIBUTE_UNUSED,
- struct bfd_link_info *info,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED,
asection *sec,
bfd_vma offset)
{
struct eh_frame_sec_info *sec_info;
- struct elf_link_hash_table *htab;
- struct eh_frame_hdr_info *hdr_info;
unsigned int lo, hi, mid;
if (sec->sec_info_type != ELF_INFO_TYPE_EH_FRAME)
if (offset >= sec->rawsize)
return offset - sec->rawsize + sec->size;
- htab = elf_hash_table (info);
- hdr_info = &htab->eh_info;
-
lo = 0;
hi = sec_info->count;
mid = 0;
/* Copy object attributes. */
_bfd_elf_copy_obj_attributes (ibfd, obfd);
-
return TRUE;
}
static bfd_boolean
prep_headers (bfd *abfd)
{
- Elf_Internal_Ehdr *i_ehdrp; /* Elf file header, internal form */
- Elf_Internal_Phdr *i_phdrp = 0; /* Program header table, internal form */
+ Elf_Internal_Ehdr *i_ehdrp; /* Elf file header, internal form. */
struct elf_strtab_hash *shstrtab;
const struct elf_backend_data *bed = get_elf_backend_data (abfd);
else
{
i_ehdrp->e_phentsize = 0;
- i_phdrp = 0;
i_ehdrp->e_phoff = 0;
}
_bfd_elf_write_object_contents (bfd *abfd)
{
const struct elf_backend_data *bed = get_elf_backend_data (abfd);
- Elf_Internal_Ehdr *i_ehdrp;
Elf_Internal_Shdr **i_shdrp;
bfd_boolean failed;
unsigned int count, num_sec;
return FALSE;
i_shdrp = elf_elfsections (abfd);
- i_ehdrp = elf_elfheader (abfd);
failed = FALSE;
bfd_map_over_sections (abfd, bed->s->write_relocs, &failed);
}
else
{
- bfd_boolean warned;
+ bfd_boolean warned ATTRIBUTE_UNUSED;
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
r_symndx, symtab_hdr, sym_hashes,
/* Support for the generic parts of PE/PEI; the common executable parts.
Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
- 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+ 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
Written by Cygnus Solutions.
This file is part of BFD, the Binary File Descriptor library.
FILE *file = (FILE *) vfile;
bfd_byte *data = 0;
asection *section = bfd_get_section_by_name (abfd, ".reloc");
- bfd_size_type datasize;
bfd_size_type i;
bfd_size_type start, stop;
fprintf (file,
_("\n\nPE File Base Relocations (interpreted .reloc section contents)\n"));
- datasize = section->size;
if (! bfd_malloc_and_get_section (abfd, section, &data))
{
if (data != NULL)
/* BFD back-end for verilog hex memory dump files.
- Copyright 2009
+ Copyright 2009, 2010
Free Software Foundation, Inc.
Written by Anthony Green <green@moxielogic.com>
verilog_write_address (abfd, list->where);
while (octets_written < list->size)
{
- bfd_vma address;
unsigned int octets_this_chunk = list->size - octets_written;
if (octets_this_chunk > 16)
octets_this_chunk = 16;
- address = list->where + octets_written / bfd_octets_per_byte (abfd);
-
if (! verilog_write_record (abfd,
location,
location + octets_this_chunk))
+2010-04-09 Nick Clifton <nickc@redhat.com>
+
+ * dwarf.c (process_debug_info): Remove unused variable
+ cu_abbrev_offset_ptr.
+ (display_debug_lines_decoded): Remove unused variable prev_line.
+ * elfedit.c (process_archive): Remove unused variable
+ file_name_size.
+ * ieee.c (ieee_start_compilation_unit): Remove unused variable
+ nindx.
+ (ieee_set_type): Remove unused variables info, targetindx and
+ baseindx.
+ * objdump.c (disassmble_byte): Remove unused variable done_dot.
+ * rddbg.c (read_section_stabs_debugging_info): Remove unused
+ variable other.
+ * readelf.c (dump_section_as_strings): Remove unused variable
+ addr.
+ (process_archive): Remove unused variable file_name_size.
+ * stabs.c (parse_stab_string): Mark desc parameter as unused.
+ Remove unused variable lineno.
+ (parse_stab_struct_type): Remove unused variable orig.
+ (stab_demangle_type): Remove unused variables constp, volatilep
+ and hold.
+
2010-04-07 Alan Modra <amodra@gmail.com>
* configure: Regenerate.
{
DWARF2_Internal_CompUnit compunit;
unsigned char *hdrptr;
- unsigned char *cu_abbrev_offset_ptr;
unsigned char *tags;
int level;
unsigned long cu_offset;
cu_offset = start - section_begin;
- cu_abbrev_offset_ptr = hdrptr;
compunit.cu_abbrev_offset = byte_get (hdrptr, offset_size);
hdrptr += offset_size;
int i;
File_Entry *file_table = NULL;
unsigned char **directory_table = NULL;
- unsigned int prev_line = 0;
hdrptr = data;
int is_special_opcode = 0;
op_code = *data++;
- prev_line = state_machine_regs.line;
if (op_code >= linfo.li_opcode_base)
{
void *file ATTRIBUTE_UNUSED)
{
unsigned char *start = section->start;
- unsigned char *section_end;
unsigned long bytes;
unsigned char *section_begin = start;
unsigned int num_range_list, i;
struct range_entry *range_entries, *range_entry_fill;
bytes = section->size;
- section_end = start + bytes;
if (bytes == 0)
{
struct archive_info arch;
struct archive_info nested_arch;
size_t got;
- size_t file_name_size;
int ret;
/* The ARCH structure is used to hold information about this archive. */
goto out;
}
- file_name_size = strlen (file_name);
ret = 0;
while (1)
/* ieee.c -- Read and write IEEE-695 debugging information.
Copyright 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006, 2007,
- 2008, 2009 Free Software Foundation, Inc.
+ 2008, 2009, 2010 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
This file is part of GNU Binutils.
const char *backslash;
#endif
char *c, *s;
- unsigned int nindx;
if (info->filename != NULL)
{
|| ! ieee_write_id (info, info->modname))
return FALSE;
- nindx = info->name_indx;
++info->name_indx;
if (! ieee_change_buffer (info, &info->vars)
|| ! ieee_write_byte (info, (int) ieee_bb_record_enum)
static bfd_boolean
ieee_offset_type (void *p)
{
- struct ieee_handle *info = (struct ieee_handle *) p;
- unsigned int targetindx, baseindx;
-
- targetindx = ieee_pop_type (info);
- baseindx = ieee_pop_type (info);
-
/* FIXME: The MRI C++ compiler does not appear to generate any
useful type information about an offset type. It just records a
pointer to member as an integer. The MRI/HP IEEE spec does
struct objdump_disasm_info *aux;
asection *section;
int octets_per_line;
- bfd_boolean done_dot;
int skip_addr_chars;
bfd_vma addr_offset;
unsigned int opb = inf->octets_per_byte;
inf->insn_info_valid = 0;
- done_dot = FALSE;
addr_offset = start_offset;
while (addr_offset < stop_offset)
{
int bpc = 0;
int pb = 0;
- done_dot = FALSE;
-
if (with_line_numbers || with_source_code)
show_line (aux->abfd, section, addr_offset);
/* rddbg.c -- Read debugging information into a generic form.
- Copyright 1995, 1996, 1997, 2000, 2002, 2003, 2005, 2007, 2008
- Free Software Foundation, Inc.
+ Copyright 1995, 1996, 1997, 2000, 2002, 2003, 2005, 2007, 2008,
+ 2010 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
This file is part of GNU Binutils.
{
unsigned int strx;
int type;
- int other;
+ int other ATTRIBUTE_UNUSED;
int desc;
bfd_vma value;
{
Elf_Internal_Shdr * relsec;
bfd_size_type num_bytes;
- bfd_vma addr;
char * data;
char * end;
char * start;
}
num_bytes = section->sh_size;
- addr = section->sh_addr;
data = start;
end = start + num_bytes;
some_strings_shown = FALSE;
struct archive_info arch;
struct archive_info nested_arch;
size_t got;
- size_t file_name_size;
int ret;
show_name = 1;
}
}
- file_name_size = strlen (file_name);
ret = 0;
while (1)
/* stabs.c -- Parse stabs debugging information
Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
- 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+ 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
This file is part of GNU Binutils.
static bfd_boolean
parse_stab_string (void *dhandle, struct stab_handle *info, int stabtype,
- int desc, bfd_vma value, const char *string)
+ int desc ATTRIBUTE_UNUSED, bfd_vma value, const char *string)
{
const char *p;
char *name;
debug_type dtype;
bfd_boolean synonym;
bfd_boolean self_crossref;
- unsigned int lineno;
debug_type *slot;
p = strchr (string, ':');
}
}
- /* GCC 2.x puts the line number in desc. SunOS apparently puts in
- the number of bytes occupied by a type or object, which we
- ignore. */
- if (info->gcc_compiled >= 2)
- lineno = desc;
- else
- lineno = 0;
-
/* FIXME: Sometimes the special C++ names start with '.'. */
name = NULL;
if (string[0] == '$')
const char *tagname, const char **pp,
bfd_boolean structp, const int *typenums)
{
- const char *orig;
bfd_vma size;
debug_baseclass *baseclasses;
debug_field *fields;
debug_type vptrbase;
bfd_boolean ownvptr;
- orig = *pp;
-
/* Get the size. */
size = parse_number (pp, (bfd_boolean *) NULL);
case 'M':
case 'O':
{
- bfd_boolean memberp, constp, volatilep;
+ bfd_boolean memberp;
debug_type class_type = DEBUG_TYPE_NULL;
debug_type *args;
bfd_boolean varargs;
const char *name;
memberp = **pp == 'M';
- constp = FALSE;
- volatilep = FALSE;
args = NULL;
varargs = FALSE;
{
if (**pp == 'C')
{
- constp = TRUE;
++*pp;
}
else if (**pp == 'V')
{
- volatilep = TRUE;
++*pp;
}
if (**pp != 'F')
case 'Q':
{
- const char *hold;
-
- hold = *pp;
if (! stab_demangle_qualified (minfo, pp, ptype))
return FALSE;
}
+2010-04-09 Nick Clifton <nickc@redhat.com>
+
+ * as.c (create_obj_attrs_section): Remove unused variable addr.
+ * listing.c (listing_listing): Remove unused variable message.
+ * read.c: Remove unnecessary register type qualifiers.
+ (s_mri): Only define/use old_flag variable if MRI_MODE_CHANGE is
+ defined.
+
2010-04-07 Eric B. Weddington <eric.weddington@atmel.com>
* config/tc-avr.c (mcu_types): Add support for atmega16a, atmega168a,
{
segT s;
char *p;
- addressT addr;
offsetT size;
const char *name;
elf_section_type (s)
= get_elf_backend_data (stdoutput)->obj_attrs_section_type;
bfd_set_section_flags (stdoutput, s, SEC_READONLY | SEC_DATA);
- addr = frag_now_fix ();
+ frag_now_fix ();
p = frag_more (size);
bfd_elf_set_obj_attr_contents (stdoutput, (bfd_byte *)p, size);
}
{
list_info_type *list = head;
file_info_type *current_hll_file = (file_info_type *) NULL;
- char *message;
char *buffer;
char *p;
int show_listing = 1;
{
/* Scan down the list and print all the stuff which can be done
with this line (or lines). */
- message = 0;
-
if (list->hll_file)
current_hll_file = list->hll_file;
/* read.c - read a source file -
Copyright 1986, 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
- 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
- Free Software Foundation, Inc.
+ 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
+ 2010 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
s_data (int ignore ATTRIBUTE_UNUSED)
{
segT section;
- register int temp;
+ int temp;
temp = get_absolute_expression ();
if (flag_readonly_data_in_text)
void
s_app_file (int appfile)
{
- register char *s;
+ char *s;
int length;
/* Some assemblers tolerate immediately following '"'. */
{
expressionS rep_exp;
long size = 1;
- register long fill = 0;
+ long fill = 0;
char *p;
#ifdef md_flush_pending_output
void
s_lsym (int ignore ATTRIBUTE_UNUSED)
{
- register char *name;
- register char c;
- register char *p;
+ char *name;
+ char c;
+ char *p;
expressionS exp;
- register symbolS *symbolP;
+ symbolS *symbolP;
/* We permit ANY defined expression: BSD4.2 demands constants. */
name = input_line_pointer;
void
s_mri (int ignore ATTRIBUTE_UNUSED)
{
- int on, old_flag;
+ int on;
+#ifdef MRI_MODE_CHANGE
+ int old_flag;
+#endif
on = get_absolute_expression ();
+#ifdef MRI_MODE_CHANGE
old_flag = flag_mri;
+#endif
if (on != 0)
{
flag_mri = 1;
void
s_org (int ignore ATTRIBUTE_UNUSED)
{
- register segT segment;
+ segT segment;
expressionS exp;
- register long temp_fill;
+ long temp_fill;
#ifdef md_flush_pending_output
md_flush_pending_output ();
void
s_text (int ignore ATTRIBUTE_UNUSED)
{
- register int temp;
+ int temp;
temp = get_absolute_expression ();
subseg_set (text_section, (subsegT) temp);
Clobbers input_line_pointer and checks end-of-line. */
static void
-cons_worker (register int nbytes, /* 1=.byte, 2=.word, 4=.long. */
+cons_worker (int nbytes, /* 1=.byte, 2=.word, 4=.long. */
int rva)
{
int c;
emit_expr (expressionS *exp, unsigned int nbytes)
{
operatorT op;
- register char *p;
+ char *p;
valueT extra_digit = 0;
/* Don't do anything if we are going to make another pass. */
if (op == O_constant)
{
- register valueT get;
- register valueT use;
- register valueT mask;
+ valueT get;
+ valueT use;
+ valueT mask;
valueT hibit;
- register valueT unmask;
+ valueT unmask;
/* JF << of >= number of bits in the object is undefined. In
particular SPARC (Sun 4) has problems. */
unsigned int nbytes;
{
expressionS count;
- register int i;
+ int i;
expression (exp);
void
float_cons (/* Clobbers input_line-pointer, checks end-of-line. */
- register int float_type /* 'f':.ffloat ... 'F':.float ... */)
+ int float_type /* 'f':.ffloat ... 'F':.float ... */)
{
- register char *p;
+ char *p;
int length; /* Number of chars in an object. */
- register char *err; /* Error from scanning floating literal. */
+ char *err; /* Error from scanning floating literal. */
char temp[MAXIMUM_NUMBER_OF_CHARS_FOR_FLOAT];
if (is_it_end_of_statement ())
static inline int
sizeof_sleb128 (offsetT value)
{
- register int size = 0;
- register unsigned byte;
+ int size = 0;
+ unsigned byte;
do
{
static inline int
sizeof_uleb128 (valueT value)
{
- register int size = 0;
- register unsigned byte;
+ int size = 0;
do
{
- byte = (value & 0x7f);
value >>= 7;
size += 1;
}
static inline int
output_sleb128 (char *p, offsetT value)
{
- register char *orig = p;
- register int more;
+ char *orig = p;
+ int more;
do
{
unsigned int
next_char_of_string (void)
{
- register unsigned int c;
+ unsigned int c;
c = *input_line_pointer++ & CHAR_MASK;
switch (c)
}
\f
static segT
-get_segmented_expression (register expressionS *expP)
+get_segmented_expression (expressionS *expP)
{
- register segT retval;
+ segT retval;
retval = expression (expP);
if (expP->X_op == O_illegal
}
static segT
-get_known_segmented_expression (register expressionS *expP)
+get_known_segmented_expression (expressionS *expP)
{
- register segT retval;
+ segT retval;
if ((retval = get_segmented_expression (expP)) == undefined_section)
{
char *
demand_copy_C_string (int *len_pointer)
{
- register char *s;
+ char *s;
if ((s = demand_copy_string (len_pointer)) != 0)
{
- register int len;
+ int len;
for (len = *len_pointer; len > 0; len--)
{
char *
demand_copy_string (int *lenP)
{
- register unsigned int c;
- register int len;
+ unsigned int c;
+ int len;
char *retval;
len = 0;
+2010-04-09 Nick Clifton <nickc@redhat.com>
+
+ * ldlang.c (wild_sort): Remove unused variable section_name.
+
2010-04-07 Alan Modra <amodra@gmail.com>
* configure: Regenerate.
lang_input_statement_type *file,
asection *section)
{
- const char *section_name;
lang_statement_union_type *l;
if (!wild->filenames_sorted
&& (sec == NULL || sec->spec.sorted == none))
return NULL;
- section_name = bfd_get_section_name (file->the_bfd, section);
for (l = wild->children.head; l != NULL; l = l->header.next)
{
lang_input_section_type *ls;
+2010-04-09 Nick Clifton <nickc@redhat.com>
+
+ * i386-dis.c (print_insn): Remove unused variable op.
+ (OP_sI): Remove unused variable mask.
+
2010-04-07 Alan Modra <amodra@gmail.com>
* configure: Regenerate.
int sizeflag;
const char *p;
struct dis_private priv;
- unsigned char op;
int prefix_length;
int default_prefixes;
return 1;
}
- op = 0;
-
if (*codep == 0x0f)
{
unsigned char threebyte;
OP_sI (int bytemode, int sizeflag)
{
bfd_signed_vma op;
- bfd_signed_vma mask = -1;
switch (bytemode)
{
op = *codep++;
if ((op & 0x80) != 0)
op -= 0x100;
- mask = 0xffffffff;
break;
case v_mode:
USED_REX (REX_W);
if (sizeflag & DFLAG)
{
op = get32s ();
- mask = 0xffffffff;
}
else
{
- mask = 0xffffffff;
op = get16 ();
if ((op & 0x8000) != 0)
op -= 0x10000;
break;
case w_mode:
op = get16 ();
- mask = 0xffffffff;
if ((op & 0x8000) != 0)
op -= 0x10000;
break;