From 7ead5aa3032e3cf04f0beb03a8833147db0a2639 Mon Sep 17 00:00:00 2001 From: midipix Date: Sat, 6 Jun 2015 14:04:45 -0400 Subject: binutils-2.24.51: updated patch. + PE shared libraries: fix the logic that allows weak definitions to be exported (cf. commit ddd1583). signed-off by Z. Gilboa; see copying.midipix (9cd0746c) for additional information. --- binutils-2.24.51.midipix.patch | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'binutils-2.24.51.midipix.patch') diff --git a/binutils-2.24.51.midipix.patch b/binutils-2.24.51.midipix.patch index ae202c5..4cf660e 100644 --- a/binutils-2.24.51.midipix.patch +++ b/binutils-2.24.51.midipix.patch @@ -371,7 +371,7 @@ diff -ru --new-file a/binutils/winduni.c b/binutils/winduni.c { 437, "MS-ANSI" }, { 737, "MS-GREEK" }, --- a/ld/pe-dll.c 2014-07-03 01:37:48.000000000 -0400 -+++ b/ld/pe-dll.c 2015-06-05 01:41:53.468944737 -0400 ++++ b/ld/pe-dll.c 2015-06-06 13:29:26.820285683 -0400 @@ -40,6 +40,7 @@ #include "coff/internal.h" #include "../bfd/libcoff.h" @@ -424,7 +424,7 @@ diff -ru --new-file a/binutils/winduni.c b/binutils/winduni.c + if (weaksym) + { + free (p->internal_name); -+ p->internal_name = strdup (symbols[j]->name); ++ p->internal_name = strdup (weaksym); + } } + if (weaksym) @@ -432,6 +432,23 @@ diff -ru --new-file a/binutils/winduni.c b/binutils/winduni.c } } } +@@ -910,6 +933,7 @@ + + if (blhe + && (blhe->type == bfd_link_hash_defined ++ || (blhe->type == bfd_link_hash_defweak) + || (blhe->type == bfd_link_hash_common))) + { + count_exported++; +@@ -919,7 +943,7 @@ + /* Only fill in the sections. The actual offsets are computed + in fill_exported_offsets() after common symbols are laid + out. */ +- if (blhe->type == bfd_link_hash_defined) ++ if ((blhe->type == bfd_link_hash_defined) || (blhe->type == bfd_link_hash_defweak)) + exported_symbol_sections[i] = blhe->u.def.section; + else + exported_symbol_sections[i] = blhe->u.c.p->section; diff -ru --new-file a/bfd/config.bfd b/bfd/config.bfd --- a/bfd/config.bfd 2014-07-03 01:37:20.000000000 -0400 +++ b/bfd/config.bfd 2015-02-14 11:27:08.199179775 -0500 -- cgit v1.2.3