aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-arm.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2009-08-29 22:11:02 +0000
committerNick Clifton <nickc@redhat.com>2009-08-29 22:11:02 +0000
commitd3ce72d070fa3a519388b0eca00d6cb45d337071 (patch)
tree104599ed64e14c9642bc50cde90b3ed942cf7653 /bfd/elf32-arm.c
parent0aec8eb1b5dae3bf88546abd22dbdffc7888b747 (diff)
downloadgdb-d3ce72d070fa3a519388b0eca00d6cb45d337071.zip
gdb-d3ce72d070fa3a519388b0eca00d6cb45d337071.tar.gz
gdb-d3ce72d070fa3a519388b0eca00d6cb45d337071.tar.bz2
Updated sources to avoid using the identifier name "new", which is a
keyword in c++. * bfd/aoutx.h (NAME (aout, make_empty_symbol)): Rename variable new to new_symbol. * bfd/coffgen.c (coff_make_empty_symbol) (coff_bfd_make_debug_symbol): Rename variable new to new_symbol. * bfd/cpu-ia64-opc.c (ext_reg, ins_imms_scaled): Rename variable new to new_insn. * bfd/doc/chew.c (newentry, add_intrinsic): Rename variable new to new_d. * bfd/ecoff.c (_bfd_ecoff_make_empty_symbol): Rename variable new to new_symbol. * bfd/elf32-m68k.c (elf_m68k_get_got_entry_type): Rename argument new to new_reloc. * bfd/hash.c (bfd_hash_lookup): Rename variable new to new_string. * bfd/ieee.c (ieee_make_empty_symbol): Rename variable new to new_symbol. * bfd/linker.c (bfd_new_link_order): Rename variable new to new_lo. * bfd/mach-o.c (bfd_mach_o_sizeof_headers): Rename variable new to symbol. * bfd/oasys.c (oasys_make_empty_symbol): Rename variable new to new_symbol_type. * bfd/pdp11.c (NAME (aout, make_empty_symbol)): Rename variable new to new_symbol_type. * bfd/plugin.c (bfd_plugin_make_empty_symbol): Rename variable new to new_symbol. * bfd/rs6000-core.c (CoreHdr, VmInfo): Rename union member new to new_dump. (read_hdr, rs6000coff_core_p) (rs6000coff_core_file_matches_executable_p) (rs6000coff_core_file_failing_command) (rs6000coff_core_file_failing_signal): Updated function to use new union member name. * bfd/som.c (som_make_empty_symbol): Rename variable new to new_symbol_type. * bfd/syms.c (_bfd_generic_make_empty_symbol): Rename variable new to new_symbol. * bfd/tekhex.c (first_phase, tekhex_make_empty_symbol): Rename variable new to new_symbol. * binutils/nlmconv.c (main): Rename variable new to new_name. * gas/config/tc-arm.c (insert_reg_alias): Rename variable new to new_reg. * gas/config/tc-dlx.c (parse_operand): Rename variable new to new_pos. * gas/config/tc-ia64.c (ia64_gen_real_reloc_type): Rename variable new to newr. * gas/config/tc-mcore.c (parse_exp, parse_imm): Rename variable new to new_pointer. * gas/config/tc-microblaze.c (parse_exp, parse_imm, check_got): Change name from new to new_pointer. * gas/config/tc-or32.c (parse_operand): Rename variable new to new_pointer. * gas/config/tc-pdp11.c (md_assemble): Rename variable new to new_pointer. * gas/config/tc-pj.c (alias): Change argument new to new_name. * gas/config/tc-score.c (s3_build_score_ops_hsh): Rename variable new to new_opcode. (s3_build_dependency_insn_hsh) Rename variable new to new_i2n. (s3_convert): Rename variables old and new to r_old and r_new. * gas/config/tc-score7.c (s7_build_score_ops_hsh): Rename variable new to new_opcode. (s7_build_dependency_insn_hsh): Rename variable new to new_i2d. (s7_b32_relax_to_b16, s7_convert_frag): Rename variables old and new to r_old and r_new. * gas/config/tc-sh.c (parse_exp): Rename variable new to new_pointer. * gas/config/tc-sh64.c (shmedia_parse_exp): Rename variable new to new_pointer. * gas/config/tc-tic4x.c (tic4x_operand_parse): Rename variable new to new_pointer. * gas/config/tc-z8k.c (parse_exp): Rename variable new to new_pointer. * gas/listing.c (listing_newline): Rename variable new to new_i. * ld/ldexp.c (exp_intop, exp_bigintop, exp_relop, exp_binop) (exp_trinop, exp_unop, exp_nameop, exp_assop): Rename variable new to new_e. * ld/ldfile.c (ldfile_add_library_path): Rename variable new to new_dirs. (ldfile_add_arch): Rename variable new to new_arch. * ld/ldlang.c (new_statement, lang_final, lang_add_wild) (lang_target, lang_add_fill, lang_add_data, lang_add_assignment) (lang_add_insert): Rename variable new to new_stmt. (new_afile): Added missing cast. (lang_memory_region_lookup): Rename variable new to new_region. (init_os): Rename variable new to new_userdata. (lang_add_section): Rename variable new to new_section. (ldlang_add_undef): Rename variable new to new_undef. (realsymbol): Rename variable new to new_name. * opcodes/z8kgen.c (internal, gas): Rename variable new to new_op. Updated sources to avoid using the identifier name "template", which is a keyword in c++. * bfd/elf32-arm.c (struct stub_def): Rename member template to template_sequence. (arm_build_one_stub, find_stub_size_and_template, arm_size_one_stub, arm_map_one_stub): Rename variable template to template_sequence. * bfd/elfxx-ia64.c (elfNN_ia64_relax_br, elfNN_ia64_relax_brl): Rename variable template to template_val. * gas/config/tc-arm.c (struct asm_cond, struct asm_psr, struct asm_barrier_opt): Change member template to template_name. (md_begin): Update code to reflect new member names. * gas/config/tc-i386.c (struct templates, struct _i386_insn) (match_template, cpu_flags_match, match_reg_size, match_mem_size) (operand_size_match, md_begin, i386_print_statistics, pi) (build_vex_prefix, md_assemble, parse_insn, optimize_imm) (optimize_disp): Updated code to use new names. (parse_insn): Added casts. * gas/config/tc-ia64.c (dot_template, emit_one_bundle): Updated code to use new names. * gas/config/tc-score.c (struct s3_asm_opcode): Renamed member template to template_name. (s3_parse_16_32_inst, s3_parse_48_inst, s3_do_macro_ldst_label, s3_build_score_ops_hsh): Update code to use new names. * gas/config/tc-score7.c (struct s7_asm_opcode): Renamed member template to template_name. (s7_parse_16_32_inst, s7_do_macro_ldst_label, s7_build_score_ops_hsh): Update code to use new names. * gas/config/tc-tic30.c (md_begin, struct tic30_insn) (md_assemble): Update code to use new names. * gas/config/tc-tic54x.c (struct _tic54x_insn, md_begin) (optimize_insn, tic54x_parse_insn, next_line_shows_parallel): Update code to use new names. * include/opcode/tic30.h (template): Rename type template to insn_template. Updated code to use new name. * include/opcode/tic54x.h (template): Rename type template to insn_template. * opcodes/cris-dis.c (bytes_to_skip): Update code to use new name. * opcodes/i386-dis.c (putop): Update code to use new name. * opcodes/i386-gen.c (process_i386_opcodes): Update code to use new name. * opcodes/i386-opc.h (struct template): Rename struct template to insn_template. Update code accordingly. * opcodes/i386-tbl.h (i386_optab): Update type to use new name. * opcodes/ia64-dis.c (print_insn_ia64): Rename variable template to template_val. * opcodes/tic30-dis.c (struct instruction, get_tic30_instruction): Update code to use new name. * opcodes/tic54x-dis.c (has_lkaddr, get_insn_size) (print_parallel_instruction, print_insn_tic54x, tic54x_get_insn): Update code to use new name. * opcodes/tic54x-opc.c (tic54x_unknown_opcode, tic54x_optab): Update type to new name.
Diffstat (limited to 'bfd/elf32-arm.c')
-rw-r--r--bfd/elf32-arm.c82
1 files changed, 43 insertions, 39 deletions
diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c
index 5a0d9c3..2dbf23cf 100644
--- a/bfd/elf32-arm.c
+++ b/bfd/elf32-arm.c
@@ -2235,7 +2235,7 @@ enum elf32_arm_stub_type {
typedef struct
{
- const insn_sequence* template;
+ const insn_sequence* template_sequence;
int template_size;
} stub_def;
@@ -3443,7 +3443,7 @@ arm_build_one_stub (struct bfd_hash_entry *gen_entry,
bfd_vma sym_value;
int template_size;
int size;
- const insn_sequence *template;
+ const insn_sequence *template_sequence;
int i;
struct elf32_arm_link_hash_table * globals;
int stub_reloc_idx[MAXRELOCS] = {-1, -1};
@@ -3480,18 +3480,18 @@ arm_build_one_stub (struct bfd_hash_entry *gen_entry,
+ stub_entry->target_section->output_offset
+ stub_entry->target_section->output_section->vma);
- template = stub_entry->stub_template;
+ template_sequence = stub_entry->stub_template;
template_size = stub_entry->stub_template_size;
size = 0;
for (i = 0; i < template_size; i++)
{
- switch (template[i].type)
+ switch (template_sequence[i].type)
{
case THUMB16_TYPE:
{
- bfd_vma data = template[i].data;
- if (template[i].reloc_addend != 0)
+ bfd_vma data = (bfd_vma) template_sequence[i].data;
+ if (template_sequence[i].reloc_addend != 0)
{
/* We've borrowed the reloc_addend field to mean we should
insert a condition code into this (Thumb-1 branch)
@@ -3505,11 +3505,12 @@ arm_build_one_stub (struct bfd_hash_entry *gen_entry,
break;
case THUMB32_TYPE:
- put_thumb_insn (globals, stub_bfd, (template[i].data >> 16) & 0xffff,
+ put_thumb_insn (globals, stub_bfd,
+ (template_sequence[i].data >> 16) & 0xffff,
loc + size);
- put_thumb_insn (globals, stub_bfd, template[i].data & 0xffff,
+ put_thumb_insn (globals, stub_bfd, template_sequence[i].data & 0xffff,
loc + size + 2);
- if (template[i].r_type != R_ARM_NONE)
+ if (template_sequence[i].r_type != R_ARM_NONE)
{
stub_reloc_idx[nrelocs] = i;
stub_reloc_offset[nrelocs++] = size;
@@ -3518,10 +3519,11 @@ arm_build_one_stub (struct bfd_hash_entry *gen_entry,
break;
case ARM_TYPE:
- put_arm_insn (globals, stub_bfd, template[i].data, loc + size);
+ put_arm_insn (globals, stub_bfd, template_sequence[i].data,
+ loc + size);
/* Handle cases where the target is encoded within the
instruction. */
- if (template[i].r_type == R_ARM_JUMP24)
+ if (template_sequence[i].r_type == R_ARM_JUMP24)
{
stub_reloc_idx[nrelocs] = i;
stub_reloc_offset[nrelocs++] = size;
@@ -3530,7 +3532,7 @@ arm_build_one_stub (struct bfd_hash_entry *gen_entry,
break;
case DATA_TYPE:
- bfd_put_32 (stub_bfd, template[i].data, loc + size);
+ bfd_put_32 (stub_bfd, template_sequence[i].data, loc + size);
stub_reloc_idx[nrelocs] = i;
stub_reloc_offset[nrelocs++] = size;
size += 4;
@@ -3557,22 +3559,23 @@ arm_build_one_stub (struct bfd_hash_entry *gen_entry,
BFD_ASSERT (nrelocs != 0 && nrelocs <= MAXRELOCS);
for (i = 0; i < nrelocs; i++)
- if (template[stub_reloc_idx[i]].r_type == R_ARM_THM_JUMP24
- || template[stub_reloc_idx[i]].r_type == R_ARM_THM_JUMP19
- || template[stub_reloc_idx[i]].r_type == R_ARM_THM_CALL
- || template[stub_reloc_idx[i]].r_type == R_ARM_THM_XPC22)
+ if (template_sequence[stub_reloc_idx[i]].r_type == R_ARM_THM_JUMP24
+ || template_sequence[stub_reloc_idx[i]].r_type == R_ARM_THM_JUMP19
+ || template_sequence[stub_reloc_idx[i]].r_type == R_ARM_THM_CALL
+ || template_sequence[stub_reloc_idx[i]].r_type == R_ARM_THM_XPC22)
{
Elf_Internal_Rela rel;
bfd_boolean unresolved_reloc;
char *error_message;
int sym_flags
- = (template[stub_reloc_idx[i]].r_type != R_ARM_THM_XPC22)
+ = (template_sequence[stub_reloc_idx[i]].r_type != R_ARM_THM_XPC22)
? STT_ARM_TFUNC : 0;
bfd_vma points_to = sym_value + stub_entry->target_addend;
rel.r_offset = stub_entry->stub_offset + stub_reloc_offset[i];
- rel.r_info = ELF32_R_INFO (0, template[stub_reloc_idx[i]].r_type);
- rel.r_addend = template[stub_reloc_idx[i]].reloc_addend;
+ rel.r_info = ELF32_R_INFO (0,
+ template_sequence[stub_reloc_idx[i]].r_type);
+ rel.r_addend = template_sequence[stub_reloc_idx[i]].reloc_addend;
if (stub_entry->stub_type == arm_stub_a8_veneer_b_cond && i == 0)
/* The first relocation in the elf32_arm_stub_a8_veneer_b_cond[]
@@ -3588,7 +3591,7 @@ arm_build_one_stub (struct bfd_hash_entry *gen_entry,
rather than only for certain relocations listed in the enclosing
conditional, for the sake of consistency. */
elf32_arm_final_link_relocate (elf32_arm_howto_from_type
- (template[stub_reloc_idx[i]].r_type),
+ (template_sequence[stub_reloc_idx[i]].r_type),
stub_bfd, info->output_bfd, stub_sec, stub_sec->contents, &rel,
points_to, info, stub_entry->target_section, "", sym_flags,
(struct elf_link_hash_entry *) stub_entry->h, &unresolved_reloc,
@@ -3597,10 +3600,10 @@ arm_build_one_stub (struct bfd_hash_entry *gen_entry,
else
{
_bfd_final_link_relocate (elf32_arm_howto_from_type
- (template[stub_reloc_idx[i]].r_type), stub_bfd, stub_sec,
+ (template_sequence[stub_reloc_idx[i]].r_type), stub_bfd, stub_sec,
stub_sec->contents, stub_entry->stub_offset + stub_reloc_offset[i],
sym_value + stub_entry->target_addend,
- template[stub_reloc_idx[i]].reloc_addend);
+ template_sequence[stub_reloc_idx[i]].reloc_addend);
}
return TRUE;
@@ -3615,17 +3618,17 @@ find_stub_size_and_template (enum elf32_arm_stub_type stub_type,
const insn_sequence **stub_template,
int *stub_template_size)
{
- const insn_sequence *template = NULL;
+ const insn_sequence *template_sequence = NULL;
int template_size = 0, i;
unsigned int size;
- template = stub_definitions[stub_type].template;
+ template_sequence = stub_definitions[stub_type].template_sequence;
template_size = stub_definitions[stub_type].template_size;
size = 0;
for (i = 0; i < template_size; i++)
{
- switch (template[i].type)
+ switch (template_sequence[i].type)
{
case THUMB16_TYPE:
size += 2;
@@ -3644,7 +3647,7 @@ find_stub_size_and_template (enum elf32_arm_stub_type stub_type,
}
if (stub_template)
- *stub_template = template;
+ *stub_template = template_sequence;
if (stub_template_size)
*stub_template_size = template_size;
@@ -3661,7 +3664,7 @@ arm_size_one_stub (struct bfd_hash_entry *gen_entry,
{
struct elf32_arm_stub_hash_entry *stub_entry;
struct elf32_arm_link_hash_table *htab;
- const insn_sequence *template;
+ const insn_sequence *template_sequence;
int template_size, size;
/* Massage our args to the form they really have. */
@@ -3671,11 +3674,11 @@ arm_size_one_stub (struct bfd_hash_entry *gen_entry,
BFD_ASSERT((stub_entry->stub_type > arm_stub_none)
&& stub_entry->stub_type < ARRAY_SIZE(stub_definitions));
- size = find_stub_size_and_template (stub_entry->stub_type, &template,
+ size = find_stub_size_and_template (stub_entry->stub_type, &template_sequence,
&template_size);
stub_entry->stub_size = size;
- stub_entry->stub_template = template;
+ stub_entry->stub_template = template_sequence;
stub_entry->stub_template_size = template_size;
size = (size + 7) & ~7;
@@ -4679,7 +4682,7 @@ elf32_arm_size_stubs (bfd *output_bfd,
unsigned int section_id = a8_fixes[i].section->id;
asection *link_sec = htab->stub_group[section_id].link_sec;
asection *stub_sec = htab->stub_group[section_id].stub_sec;
- const insn_sequence *template;
+ const insn_sequence *template_sequence;
int template_size, size = 0;
stub_entry = arm_stub_hash_lookup (&htab->stub_hash_table, stub_name,
@@ -4702,11 +4705,12 @@ elf32_arm_size_stubs (bfd *output_bfd,
stub_entry->orig_insn = a8_fixes[i].orig_insn;
stub_entry->st_type = STT_ARM_TFUNC;
- size = find_stub_size_and_template (a8_fixes[i].stub_type, &template,
+ size = find_stub_size_and_template (a8_fixes[i].stub_type,
+ &template_sequence,
&template_size);
stub_entry->stub_size = size;
- stub_entry->stub_template = template;
+ stub_entry->stub_template = template_sequence;
stub_entry->stub_template_size = template_size;
}
@@ -12976,7 +12980,7 @@ arm_map_one_stub (struct bfd_hash_entry * gen_entry,
bfd_vma addr;
char *stub_name;
output_arch_syminfo *osi;
- const insn_sequence *template;
+ const insn_sequence *template_sequence;
enum stub_insn_type prev_type;
int size;
int i;
@@ -12999,8 +13003,8 @@ arm_map_one_stub (struct bfd_hash_entry * gen_entry,
addr = (bfd_vma) stub_entry->stub_offset;
stub_name = stub_entry->output_name;
- template = stub_entry->stub_template;
- switch (template[0].type)
+ template_sequence = stub_entry->stub_template;
+ switch (template_sequence[0].type)
{
case ARM_TYPE:
if (!elf32_arm_output_stub_sym (osi, stub_name, addr, stub_entry->stub_size))
@@ -13021,7 +13025,7 @@ arm_map_one_stub (struct bfd_hash_entry * gen_entry,
size = 0;
for (i = 0; i < stub_entry->stub_template_size; i++)
{
- switch (template[i].type)
+ switch (template_sequence[i].type)
{
case ARM_TYPE:
sym_type = ARM_MAP_ARM;
@@ -13041,14 +13045,14 @@ arm_map_one_stub (struct bfd_hash_entry * gen_entry,
return FALSE;
}
- if (template[i].type != prev_type)
+ if (template_sequence[i].type != prev_type)
{
- prev_type = template[i].type;
+ prev_type = template_sequence[i].type;
if (!elf32_arm_output_map_sym (osi, sym_type, addr + size))
return FALSE;
}
- switch (template[i].type)
+ switch (template_sequence[i].type)
{
case ARM_TYPE:
case THUMB32_TYPE: