summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--binutils-2.24.51.midipix.patch50
1 files changed, 33 insertions, 17 deletions
diff --git a/binutils-2.24.51.midipix.patch b/binutils-2.24.51.midipix.patch
index 68e6ec9..c6baf39 100644
--- a/binutils-2.24.51.midipix.patch
+++ b/binutils-2.24.51.midipix.patch
@@ -581,24 +581,40 @@ diff -ru a/ld/pe-dll.c b/ld/pe-dll.c
}
if (pe_details->underscored && *sn == '_')
-@@ -761,7 +781,20 @@
- /* Fill data flag properly, from dlltool.c. */
- if (!is_dup)
- p->flag_data = !(symbols[j]->flags & BSF_FUNCTION);
+@@ -756,12 +776,30 @@
+ int is_dup = 0;
+ def_file_export *p;
+
+- p = def_file_add_export (pe_def_file, sn, 0, -1,
+- NULL, &is_dup);
+- /* Fill data flag properly, from dlltool.c. */
+- if (!is_dup)
+- p->flag_data = !(symbols[j]->flags & BSF_FUNCTION);
+- }
++ if (weaksym) {
++ blhew = bfd_link_hash_lookup (info->hash, weaksym,
++ FALSE, FALSE, FALSE);
++ }
+
-+ if (weaksym)
-+ {
-+ blhew = bfd_link_hash_lookup (info->hash, weaksym,
-+ FALSE, FALSE, FALSE);
-+ if (blhew->type != bfd_link_hash_defined)
-+ {
-+ free (p->internal_name);
-+ p->internal_name = objsym;
-+ }
-+ }
- }
-+ if (weaksym)
-+ free (weaksym);
++ if (!weaksym || blhew) {
++ p = def_file_add_export (pe_def_file, sn, 0, -1,
++ NULL, &is_dup);
++
++ /* Fill data flag properly, from dlltool.c. */
++ if (!is_dup)
++ p->flag_data = !(symbols[j]->flags & BSF_FUNCTION);
++
++ if (weaksym) {
++ if (blhew->type != bfd_link_hash_defined) {
++ free (p->internal_name);
++ p->internal_name = objsym;
++ }
++ }
++
++ if (weaksym)
++ free (weaksym);
++ }
++ }
}
}
}