diff options
Diffstat (limited to 'ld')
-rw-r--r-- | ld/ChangeLog | 10 | ||||
-rw-r--r-- | ld/Makefile.in | 3 | ||||
-rwxr-xr-x | ld/configure | 2 | ||||
-rw-r--r-- | ld/deffilep.y | 213 | ||||
-rw-r--r-- | ld/emultempl/elf32.em | 30 | ||||
-rw-r--r-- | ld/ldlang.c | 10 | ||||
-rw-r--r-- | ld/ldmain.c | 14 | ||||
-rw-r--r-- | ld/pe-dll.c | 40 |
8 files changed, 167 insertions, 155 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index 0abce2d..2f7b131 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,13 @@ +2009-12-11 Nick Clifton <nickc@redhat.com> + + * Makefile.in: Regenerate. + * configure: Regenerate. + * deffilep.y: Fix shadowed variable warnings. + * ldlang.c: Likewise. + * ldmain.c: Likewise. + * pe-dll.c: Likewise. + * emultempl/elf32.em: Likewise. + 2009-12-09 Alan Modra <amodra@bigpond.net.au> PR ld/11012 diff --git a/ld/Makefile.in b/ld/Makefile.in index 0da0fff..2c2e014 100644 --- a/ld/Makefile.in +++ b/ld/Makefile.in @@ -49,12 +49,15 @@ DIST_COMMON = NEWS README ChangeLog $(srcdir)/Makefile.in \ $(srcdir)/../ylwrap $(ld_TEXINFOS) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/../bfd/acinclude.m4 \ + $(top_srcdir)/../config/zlib.m4 \ $(top_srcdir)/../bfd/warning.m4 $(top_srcdir)/../config/acx.m4 \ $(top_srcdir)/../config/depstand.m4 \ $(top_srcdir)/../config/gettext-sister.m4 \ + $(top_srcdir)/../config/largefile.m4 \ $(top_srcdir)/../config/lead-dot.m4 \ $(top_srcdir)/../config/nls.m4 \ $(top_srcdir)/../config/override.m4 \ + $(top_srcdir)/../config/plugins.m4 \ $(top_srcdir)/../config/po.m4 \ $(top_srcdir)/../config/progtest.m4 \ $(top_srcdir)/../libtool.m4 $(top_srcdir)/../ltoptions.m4 \ diff --git a/ld/configure b/ld/configure index 6febc32..e0ff758 100755 --- a/ld/configure +++ b/ld/configure @@ -4336,7 +4336,7 @@ $as_echo "#define GOT_HANDLING_DEFAULT GOT_HANDLING_MULTIGOT" >>confdefs.h esac -GCC_WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes" +GCC_WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow" # Check whether --enable-werror was given. if test "${enable_werror+set}" = set; then : diff --git a/ld/deffilep.y b/ld/deffilep.y index 672c186..43847bc 100644 --- a/ld/deffilep.y +++ b/ld/deffilep.y @@ -357,183 +357,185 @@ def_file_parse (const char *filename, def_file *add_to) } void -def_file_free (def_file *def) +def_file_free (def_file *fdef) { int i; - if (!def) + if (!fdef) return; - if (def->name) - free (def->name); - if (def->description) - free (def->description); + if (fdef->name) + free (fdef->name); + if (fdef->description) + free (fdef->description); - if (def->section_defs) + if (fdef->section_defs) { - for (i = 0; i < def->num_section_defs; i++) + for (i = 0; i < fdef->num_section_defs; i++) { - if (def->section_defs[i].name) - free (def->section_defs[i].name); - if (def->section_defs[i].class) - free (def->section_defs[i].class); + if (fdef->section_defs[i].name) + free (fdef->section_defs[i].name); + if (fdef->section_defs[i].class) + free (fdef->section_defs[i].class); } - free (def->section_defs); + free (fdef->section_defs); } - if (def->exports) + if (fdef->exports) { for (i = 0; i < def->num_exports; i++) { - if (def->exports[i].internal_name - && def->exports[i].internal_name != def->exports[i].name) - free (def->exports[i].internal_name); - if (def->exports[i].name) - free (def->exports[i].name); - if (def->exports[i].its_name) - free (def->exports[i].its_name); + if (fdef->exports[i].internal_name + && fdef->exports[i].internal_name != fdef->exports[i].name) + free (fdef->exports[i].internal_name); + if (fdef->exports[i].name) + free (fdef->exports[i].name); + if (fdef->exports[i].its_name) + free (fdef->exports[i].its_name); } - free (def->exports); + free (fdef->exports); } - if (def->imports) + if (fdef->imports) { - for (i = 0; i < def->num_imports; i++) + for (i = 0; i < fdef->num_imports; i++) { - if (def->imports[i].internal_name - && def->imports[i].internal_name != def->imports[i].name) - free (def->imports[i].internal_name); - if (def->imports[i].name) - free (def->imports[i].name); - if (def->imports[i].its_name) - free (def->imports[i].its_name); + if (fdef->imports[i].internal_name + && fdef->imports[i].internal_name != fdef->imports[i].name) + free (fdef->imports[i].internal_name); + if (fdef->imports[i].name) + free (fdef->imports[i].name); + if (fdef->imports[i].its_name) + free (fdef->imports[i].its_name); } - free (def->imports); + free (fdef->imports); } - while (def->modules) + while (fdef->modules) { - def_file_module *m = def->modules; - def->modules = def->modules->next; + def_file_module *m = fdef->modules; + + fdef->modules = fdef->modules->next; free (m); } - while (def->aligncomms) + while (fdef->aligncomms) { - def_file_aligncomm *c = def->aligncomms; - def->aligncomms = def->aligncomms->next; + def_file_aligncomm *c = fdef->aligncomms; + + fdef->aligncomms = fdef->aligncomms->next; free (c->symbol_name); free (c); } - free (def); + free (fdef); } #ifdef DEF_FILE_PRINT void -def_file_print (FILE *file, def_file *def) +def_file_print (FILE *file, def_file *fdef) { int i; - fprintf (file, ">>>> def_file at 0x%08x\n", def); - if (def->name) - fprintf (file, " name: %s\n", def->name ? def->name : "(unspecified)"); - if (def->is_dll != -1) - fprintf (file, " is dll: %s\n", def->is_dll ? "yes" : "no"); - if (def->base_address != (bfd_vma) -1) - fprintf (file, " base address: 0x%08x\n", def->base_address); - if (def->description) - fprintf (file, " description: `%s'\n", def->description); - if (def->stack_reserve != -1) - fprintf (file, " stack reserve: 0x%08x\n", def->stack_reserve); - if (def->stack_commit != -1) - fprintf (file, " stack commit: 0x%08x\n", def->stack_commit); - if (def->heap_reserve != -1) - fprintf (file, " heap reserve: 0x%08x\n", def->heap_reserve); - if (def->heap_commit != -1) - fprintf (file, " heap commit: 0x%08x\n", def->heap_commit); - - if (def->num_section_defs > 0) + fprintf (file, ">>>> def_file at 0x%08x\n", fdef); + if (fdef->name) + fprintf (file, " name: %s\n", fdef->name ? fdef->name : "(unspecified)"); + if (fdef->is_dll != -1) + fprintf (file, " is dll: %s\n", fdef->is_dll ? "yes" : "no"); + if (fdef->base_address != (bfd_vma) -1) + fprintf (file, " base address: 0x%08x\n", fdef->base_address); + if (fdef->description) + fprintf (file, " description: `%s'\n", fdef->description); + if (fdef->stack_reserve != -1) + fprintf (file, " stack reserve: 0x%08x\n", fdef->stack_reserve); + if (fdef->stack_commit != -1) + fprintf (file, " stack commit: 0x%08x\n", fdef->stack_commit); + if (fdef->heap_reserve != -1) + fprintf (file, " heap reserve: 0x%08x\n", fdef->heap_reserve); + if (fdef->heap_commit != -1) + fprintf (file, " heap commit: 0x%08x\n", fdef->heap_commit); + + if (fdef->num_section_defs > 0) { fprintf (file, " section defs:\n"); - for (i = 0; i < def->num_section_defs; i++) + for (i = 0; i < fdef->num_section_defs; i++) { fprintf (file, " name: `%s', class: `%s', flags:", - def->section_defs[i].name, def->section_defs[i].class); - if (def->section_defs[i].flag_read) + fdef->section_defs[i].name, fdef->section_defs[i].class); + if (fdef->section_defs[i].flag_read) fprintf (file, " R"); - if (def->section_defs[i].flag_write) + if (fdef->section_defs[i].flag_write) fprintf (file, " W"); - if (def->section_defs[i].flag_execute) + if (fdef->section_defs[i].flag_execute) fprintf (file, " X"); - if (def->section_defs[i].flag_shared) + if (fdef->section_defs[i].flag_shared) fprintf (file, " S"); fprintf (file, "\n"); } } - if (def->num_exports > 0) + if (fdef->num_exports > 0) { fprintf (file, " exports:\n"); - for (i = 0; i < def->num_exports; i++) + for (i = 0; i < fdef->num_exports; i++) { fprintf (file, " name: `%s', int: `%s', ordinal: %d, flags:", - def->exports[i].name, def->exports[i].internal_name, - def->exports[i].ordinal); - if (def->exports[i].flag_private) + fdef->exports[i].name, fdef->exports[i].internal_name, + fdef->exports[i].ordinal); + if (fdef->exports[i].flag_private) fprintf (file, " P"); - if (def->exports[i].flag_constant) + if (fdef->exports[i].flag_constant) fprintf (file, " C"); - if (def->exports[i].flag_noname) + if (fdef->exports[i].flag_noname) fprintf (file, " N"); - if (def->exports[i].flag_data) + if (fdef->exports[i].flag_data) fprintf (file, " D"); fprintf (file, "\n"); } } - if (def->num_imports > 0) + if (fdef->num_imports > 0) { fprintf (file, " imports:\n"); - for (i = 0; i < def->num_imports; i++) + for (i = 0; i < fdef->num_imports; i++) { fprintf (file, " int: %s, from: `%s', name: `%s', ordinal: %d\n", - def->imports[i].internal_name, - def->imports[i].module, - def->imports[i].name, - def->imports[i].ordinal); + fdef->imports[i].internal_name, + fdef->imports[i].module, + fdef->imports[i].name, + fdef->imports[i].ordinal); } } - if (def->version_major != -1) - fprintf (file, " version: %d.%d\n", def->version_major, def->version_minor); + if (fdef->version_major != -1) + fprintf (file, " version: %d.%d\n", fdef->version_major, fdef->version_minor); fprintf (file, "<<<< def_file at 0x%08x\n", def); } #endif def_file_export * -def_file_add_export (def_file *def, +def_file_add_export (def_file *fdef, const char *external_name, const char *internal_name, int ordinal, const char *its_name) { def_file_export *e; - int max_exports = ROUND_UP(def->num_exports, 32); + int max_exports = ROUND_UP(fdef->num_exports, 32); - if (def->num_exports >= max_exports) + if (fdef->num_exports >= max_exports) { - max_exports = ROUND_UP(def->num_exports + 1, 32); - if (def->exports) - def->exports = xrealloc (def->exports, + max_exports = ROUND_UP(fdef->num_exports + 1, 32); + if (fdef->exports) + fdef->exports = xrealloc (fdef->exports, max_exports * sizeof (def_file_export)); else - def->exports = xmalloc (max_exports * sizeof (def_file_export)); + fdef->exports = xmalloc (max_exports * sizeof (def_file_export)); } - e = def->exports + def->num_exports; + e = fdef->exports + fdef->num_exports; memset (e, 0, sizeof (def_file_export)); if (internal_name && !external_name) external_name = internal_name; @@ -543,16 +545,16 @@ def_file_add_export (def_file *def, e->internal_name = xstrdup (internal_name); e->its_name = (its_name ? xstrdup (its_name) : NULL); e->ordinal = ordinal; - def->num_exports++; + fdef->num_exports++; return e; } def_file_module * -def_get_module (def_file *def, const char *name) +def_get_module (def_file *fdef, const char *name) { def_file_module *s; - for (s = def->modules; s; s = s->next) + for (s = fdef->modules; s; s = s->next) if (strcmp (s->name, name) == 0) return s; @@ -560,22 +562,22 @@ def_get_module (def_file *def, const char *name) } static def_file_module * -def_stash_module (def_file *def, const char *name) +def_stash_module (def_file *fdef, const char *name) { def_file_module *s; - if ((s = def_get_module (def, name)) != NULL) + if ((s = def_get_module (fdef, name)) != NULL) return s; s = xmalloc (sizeof (def_file_module) + strlen (name)); s->next = def->modules; - def->modules = s; + fdef->modules = s; s->user_data = 0; strcpy (s->name, name); return s; } def_file_import * -def_file_add_import (def_file *def, +def_file_add_import (def_file *fdef, const char *name, const char *module, int ordinal, @@ -583,19 +585,19 @@ def_file_add_import (def_file *def, const char *its_name) { def_file_import *i; - int max_imports = ROUND_UP (def->num_imports, 16); + int max_imports = ROUND_UP (fdef->num_imports, 16); - if (def->num_imports >= max_imports) + if (fdef->num_imports >= max_imports) { - max_imports = ROUND_UP (def->num_imports+1, 16); + max_imports = ROUND_UP (fdef->num_imports+1, 16); - if (def->imports) - def->imports = xrealloc (def->imports, + if (fdef->imports) + fdef->imports = xrealloc (fdef->imports, max_imports * sizeof (def_file_import)); else - def->imports = xmalloc (max_imports * sizeof (def_file_import)); + fdef->imports = xmalloc (max_imports * sizeof (def_file_import)); } - i = def->imports + def->num_imports; + i = fdef->imports + fdef->num_imports; memset (i, 0, sizeof (def_file_import)); if (name) i->name = xstrdup (name); @@ -607,7 +609,7 @@ def_file_add_import (def_file *def, else i->internal_name = i->name; i->its_name = (its_name ? xstrdup (its_name) : NULL); - def->num_imports++; + fdef->num_imports++; return i; } @@ -660,7 +662,7 @@ def_file_add_directive (def_file *my_def, const char *param, int len) for (i = 0; diropts[i].param; i++) { - int len = strlen (diropts[i].param); + len = strlen (diropts[i].param); if (tend - param >= len && strncmp (param, diropts[i].param, len) == 0 @@ -704,6 +706,7 @@ def_image_name (const char *name, int base, int is_dll) if (*name) { const char* image_name = lbasename (name); + if (image_name != name) einfo ("%s:%d: Warning: path components stripped from %s, '%s'\n", def_filename, linenumber, is_dll ? "LIBRARY" : "NAME", diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em index b07ab15..7215ff0 100644 --- a/ld/emultempl/elf32.em +++ b/ld/emultempl/elf32.em @@ -342,14 +342,14 @@ gld${EMULATION_NAME}_try_needed (struct dt_needed *needed, if (! force) { - struct bfd_link_needed_list *needed; + struct bfd_link_needed_list *needs; - if (! bfd_elf_get_bfd_needed_list (abfd, &needed)) + if (! bfd_elf_get_bfd_needed_list (abfd, &needs)) einfo ("%F%P:%B: bfd_elf_get_bfd_needed_list failed: %E\n", abfd); - if (needed != NULL) + if (needs != NULL) { - global_vercheck_needed = needed; + global_vercheck_needed = needs; global_vercheck_failed = FALSE; lang_for_each_input_file (gld${EMULATION_NAME}_vercheck); if (global_vercheck_failed) @@ -374,7 +374,7 @@ case ${target} in { struct bfd_link_needed_list *l; - for (l = needed; l != NULL; l = l->next) + for (l = needs; l != NULL; l = l->next) if (CONST_STRNEQ (l->name, "libc.so")) break; if (l == NULL) @@ -884,9 +884,9 @@ fragment <<EOF static bfd_size_type gld${EMULATION_NAME}_id_note_section_size (bfd *abfd, - struct bfd_link_info *link_info) + struct bfd_link_info *linfo) { - const char *style = link_info->emit_note_gnu_build_id; + const char *style = linfo->emit_note_gnu_build_id; bfd_size_type size; abfd = abfd; @@ -1414,23 +1414,23 @@ fragment <<EOF /* used by before_allocation and handle_option. */ static void -gld${EMULATION_NAME}_append_to_separated_string (char **to, char *optarg) +gld${EMULATION_NAME}_append_to_separated_string (char **to, char *op_arg) { if (*to == NULL) - *to = xstrdup (optarg); + *to = xstrdup (op_arg); else { size_t to_len = strlen (*to); - size_t optarg_len = strlen (optarg); + size_t op_arg_len = strlen (op_arg); char *buf; char *cp = *to; /* First see whether OPTARG is already in the path. */ do { - if (strncmp (optarg, cp, optarg_len) == 0 - && (cp[optarg_len] == 0 - || cp[optarg_len] == config.rpath_separator)) + if (strncmp (op_arg, cp, op_arg_len) == 0 + && (cp[op_arg_len] == 0 + || cp[op_arg_len] == config.rpath_separator)) /* We found it. */ break; @@ -1443,9 +1443,9 @@ gld${EMULATION_NAME}_append_to_separated_string (char **to, char *optarg) if (cp == NULL) { - buf = xmalloc (to_len + optarg_len + 2); + buf = xmalloc (to_len + op_arg_len + 2); sprintf (buf, "%s%c%s", *to, - config.rpath_separator, optarg); + config.rpath_separator, op_arg); free (*to); *to = buf; } diff --git a/ld/ldlang.c b/ld/ldlang.c index 019fe0e..2321ae2 100644 --- a/ld/ldlang.c +++ b/ld/ldlang.c @@ -305,7 +305,7 @@ typedef struct } section_iterator_callback_data; static bfd_boolean -section_iterator_callback (bfd *bfd ATTRIBUTE_UNUSED, asection *s, void *data) +section_iterator_callback (bfd *abfd ATTRIBUTE_UNUSED, asection *s, void *data) { section_iterator_callback_data *d = (section_iterator_callback_data *) data; @@ -2204,9 +2204,6 @@ lang_add_section (lang_statement_list_type *ptr, { bfd_boolean first; lang_input_section_type *new_section; - flagword flags; - - flags = section->flags; /* We don't copy the SEC_NEVER_LOAD flag from an input section to an output section, because we want to be able to include a @@ -2214,7 +2211,6 @@ lang_add_section (lang_statement_list_type *ptr, section (I don't know why we want to do this, but we do). build_link_order in ldwrite.c handles this case by turning the embedded SEC_NEVER_LOAD section into a fill. */ - flags &= ~ SEC_NEVER_LOAD; switch (output->sectype) @@ -4618,12 +4614,12 @@ static void os_region_check (lang_output_section_statement_type *os, lang_memory_region_type *region, etree_type *tree, - bfd_vma base) + bfd_vma rbase) { if ((region->current < region->origin || (region->current - region->origin > region->length)) && ((region->current != region->origin + region->length) - || base == 0)) + || rbase == 0)) { if (tree != NULL) { diff --git a/ld/ldmain.c b/ld/ldmain.c index e0917f6..08679ec 100644 --- a/ld/ldmain.c +++ b/ld/ldmain.c @@ -1104,7 +1104,7 @@ warning_callback (struct bfd_link_info *info ATTRIBUTE_UNUSED, einfo ("%B: %s%s\n", abfd, _("warning: "), warning); else { - struct warning_callback_info info; + struct warning_callback_info cinfo; /* Look through the relocs to see if we can find a plausible address. */ @@ -1112,13 +1112,13 @@ warning_callback (struct bfd_link_info *info ATTRIBUTE_UNUSED, if (!bfd_generic_link_read_symbols (abfd)) einfo (_("%B%F: could not read symbols: %E\n"), abfd); - info.found = FALSE; - info.warning = warning; - info.symbol = symbol; - info.asymbols = bfd_get_outsymbols (abfd); - bfd_map_over_sections (abfd, warning_find_reloc, &info); + cinfo.found = FALSE; + cinfo.warning = warning; + cinfo.symbol = symbol; + cinfo.asymbols = bfd_get_outsymbols (abfd); + bfd_map_over_sections (abfd, warning_find_reloc, &cinfo); - if (! info.found) + if (! cinfo.found) einfo ("%B: %s%s\n", abfd, _("warning: "), warning); } 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)" : ""); } } |