summaryrefslogtreecommitdiff
path: root/ld/deffilep.y
diff options
context:
space:
mode:
authorKai Tietz <kai.tietz@onevision.com>2012-02-19 21:18:07 +0000
committerKai Tietz <kai.tietz@onevision.com>2012-02-19 21:18:07 +0000
commit15b77499818ca4981eff67d36838ab923899c164 (patch)
tree7b0aae8143da70dbc71d929e8114fc01c2be5e7a /ld/deffilep.y
parent4d38d59970e143f08d2a00f9ee0d2ac3c77a858f (diff)
downloadbinutils-redhat-15b77499818ca4981eff67d36838ab923899c164.tar.gz
* deffilep.y (cmp_import_elem): Sort first by module name.
* pe-dll.c (process_def_file_and_drectve): Free strings from removed export-element. (add_bfd_to_link): Optimize loop on import-elements and lower allocated memory. (pe_implied_import_dll): Pass NULL instead of 0 for pointer argument.
Diffstat (limited to 'ld/deffilep.y')
-rw-r--r--ld/deffilep.y4
1 files changed, 3 insertions, 1 deletions
diff --git a/ld/deffilep.y b/ld/deffilep.y
index f66ca2d37f..efeff19678 100644
--- a/ld/deffilep.y
+++ b/ld/deffilep.y
@@ -741,13 +741,15 @@ cmp_import_elem (const def_file_import *e, const char *ex_name,
{
int r;
+ if ((r = are_names_equal (module, (e->module ? e->module->name : NULL))))
+ return r;
if ((r = are_names_equal (ex_name, e->name)) != 0)
return r;
if ((r = are_names_equal (in_name, e->internal_name)) != 0)
return r;
if (ord != e->ordinal)
return (ord < e->ordinal ? -1 : 1);
- return are_names_equal (module, (e->module ? e->module->name : NULL));
+ return 0;
}
/* Search the position of the identical element, or returns the position