diff options
author | Nick Clifton <nickc@redhat.com> | 2009-12-11 13:42:17 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2009-12-11 13:42:17 +0000 |
commit | 91d6fa6a035cc7d0b7be5c99c194a64cb80924b0 (patch) | |
tree | 214507c313b77d619b52afcae2af0b02c9fa700b /ld/pe-dll.c | |
parent | 01fe1b4183324882e88e8c64748bffdc69ea3a9c (diff) | |
download | gdb-91d6fa6a035cc7d0b7be5c99c194a64cb80924b0.zip gdb-91d6fa6a035cc7d0b7be5c99c194a64cb80924b0.tar.gz gdb-91d6fa6a035cc7d0b7be5c99c194a64cb80924b0.tar.bz2 |
Add -Wshadow to the gcc command line options used when compiling the binutils.
Fix up all warnings generated by the addition of this switch.
Diffstat (limited to 'ld/pe-dll.c')
-rw-r--r-- | ld/pe-dll.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/ld/pe-dll.c b/ld/pe-dll.c index fb94813..9b3c699 100644 --- a/ld/pe-dll.c +++ b/ld/pe-dll.c @@ -1306,7 +1306,7 @@ generate_reloc (bfd *abfd, struct bfd_link_info *info) for (bi = 0, b = info->input_bfds; b; bi++, b = b->link_next) { arelent **relocs; - int relsize, nrelocs, i; + int relsize, nrelocs; for (s = b->sections; s; s = s->next) { @@ -2366,7 +2366,7 @@ make_import_fixup_mark (arelent *rel) static bfd * make_import_fixup_entry (const char *name, const char *fixup_name, - const char *dll_symname, + const char *symname, bfd *parent) { asection *id2; @@ -2390,7 +2390,7 @@ make_import_fixup_entry (const char *name, id2 = quick_section (abfd, ".idata$2", SEC_HAS_CONTENTS, 2); quick_symbol (abfd, U ("_nm_thnk_"), name, "", UNDSEC, BSF_GLOBAL, 0); - quick_symbol (abfd, U (""), dll_symname, "_iname", UNDSEC, BSF_GLOBAL, 0); + quick_symbol (abfd, U (""), symname, "_iname", UNDSEC, BSF_GLOBAL, 0); /* For relocator v2 we have to use the .idata$5 element and not fixup_name. */ if (link_info.pei386_runtime_pseudo_reloc == 2) @@ -2574,7 +2574,7 @@ pe_create_import_fixup (arelent *rel, asection *s, bfd_vma addend) if (need_import_table == 1 && (!name_thunk_sym || name_thunk_sym->type != bfd_link_hash_defined)) { - bfd *b = make_singleton_name_thunk (name, link_info.output_bfd); + b = make_singleton_name_thunk (name, link_info.output_bfd); add_bfd_to_link (b, b->filename, &link_info); /* If we ever use autoimport, we have to cast text section writable. @@ -2595,9 +2595,9 @@ pe_create_import_fixup (arelent *rel, asection *s, bfd_vma addend) && need_import_table == 1) { extern char * pe_data_import_dll; - char * dll_symname = pe_data_import_dll ? pe_data_import_dll : "unknown"; + char * symname = pe_data_import_dll ? pe_data_import_dll : "unknown"; - b = make_import_fixup_entry (name, fixup_name, dll_symname, + b = make_import_fixup_entry (name, fixup_name, symname, link_info.output_bfd); add_bfd_to_link (b, b->filename, &link_info); } @@ -2793,7 +2793,7 @@ pe_find_cdecl_alias_match (char *name) } static void -add_bfd_to_link (bfd *abfd, const char *name, struct bfd_link_info *link_info) +add_bfd_to_link (bfd *abfd, const char *name, struct bfd_link_info *linfo) { lang_input_statement_type *fake_file; @@ -2803,12 +2803,12 @@ add_bfd_to_link (bfd *abfd, const char *name, struct bfd_link_info *link_info) fake_file->the_bfd = abfd; ldlang_add_file (fake_file); - if (!bfd_link_add_symbols (abfd, link_info)) + if (!bfd_link_add_symbols (abfd, linfo)) einfo ("%Xaddsym %s: %E\n", name); } void -pe_process_import_defs (bfd *output_bfd, struct bfd_link_info *link_info) +pe_process_import_defs (bfd *output_bfd, struct bfd_link_info *linfo) { def_file_module *module; @@ -2850,7 +2850,7 @@ pe_process_import_defs (bfd *output_bfd, struct bfd_link_info *link_info) sprintf (name, "%s%s",U (""), pe_def_file->imports[i].internal_name); - blhe = bfd_link_hash_lookup (link_info->hash, name, + blhe = bfd_link_hash_lookup (linfo->hash, name, FALSE, FALSE, FALSE); /* Include the jump stub for <sym> only if the <sym> @@ -2864,7 +2864,7 @@ pe_process_import_defs (bfd *output_bfd, struct bfd_link_info *link_info) sprintf (name, "%s%s%s", "__imp_", U (""), pe_def_file->imports[i].internal_name); - blhe = bfd_link_hash_lookup (link_info->hash, name, + blhe = bfd_link_hash_lookup (linfo->hash, name, FALSE, FALSE, FALSE); } else @@ -2887,7 +2887,7 @@ pe_process_import_defs (bfd *output_bfd, struct bfd_link_info *link_info) if (!do_this_dll) { bfd *ar_head = make_head (output_bfd); - add_bfd_to_link (ar_head, ar_head->filename, link_info); + add_bfd_to_link (ar_head, ar_head->filename, linfo); do_this_dll = 1; } exp.internal_name = pe_def_file->imports[i].internal_name; @@ -2900,13 +2900,13 @@ pe_process_import_defs (bfd *output_bfd, struct bfd_link_info *link_info) exp.flag_data = pe_def_file->imports[i].data; exp.flag_noname = exp.name ? 0 : 1; one = make_one (&exp, output_bfd, (! exp.flag_data) && include_jmp_stub); - add_bfd_to_link (one, one->filename, link_info); + add_bfd_to_link (one, one->filename, linfo); } } if (do_this_dll) { bfd *ar_tail = make_tail (output_bfd); - add_bfd_to_link (ar_tail, ar_tail->filename, link_info); + add_bfd_to_link (ar_tail, ar_tail->filename, linfo); } free (dll_symname); @@ -2955,7 +2955,7 @@ pe_implied_import_dll (const char *filename) unsigned char *expdata; char *erva; bfd_vma name_rvas, ordinals, nexp, ordbase; - const char *dll_name; + const char *dllname; /* Initialization with start > end guarantees that is_data will not be set by mistake, and avoids compiler warning. */ bfd_vma data_start = 1; @@ -3094,15 +3094,15 @@ pe_implied_import_dll (const char *filename) /* Use internal dll name instead of filename to enable symbolic dll linking. */ - dll_name = erva + pe_as32 (expdata + 12); + dllname = erva + pe_as32 (expdata + 12); /* Check to see if the dll has already been added to the definition list and if so return without error. This avoids multiple symbol definitions. */ - if (def_get_module (pe_def_file, dll_name)) + if (def_get_module (pe_def_file, dllname)) { if (pe_dll_extra_pe_debug) - printf ("%s is already loaded\n", dll_name); + printf ("%s is already loaded\n", dllname); return TRUE; } @@ -3128,13 +3128,13 @@ pe_implied_import_dll (const char *filename) || (func_rva >= bss_start && func_rva < bss_end); imp = def_file_add_import (pe_def_file, erva + name_rva, - dll_name, i, 0, NULL); + dllname, i, 0, NULL); /* Mark symbol type. */ imp->data = is_data; if (pe_dll_extra_pe_debug) printf ("%s dll-name: %s sym: %s addr: 0x%lx %s\n", - __FUNCTION__, dll_name, erva + name_rva, + __FUNCTION__, dllname, erva + name_rva, (unsigned long) func_rva, is_data ? "(data)" : ""); } } |