summaryrefslogtreecommitdiff
path: root/binutils-2.24.51.midipix.patch
diff options
context:
space:
mode:
Diffstat (limited to 'binutils-2.24.51.midipix.patch')
-rw-r--r--binutils-2.24.51.midipix.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/binutils-2.24.51.midipix.patch b/binutils-2.24.51.midipix.patch
index 369b820..ae202c5 100644
--- a/binutils-2.24.51.midipix.patch
+++ b/binutils-2.24.51.midipix.patch
@@ -521,3 +521,29 @@ diff -ru --new-file a/gas/configure.tgt b/gas/configure.tgt
case ${cpu} in
x86_64*) fmt=coff em=pep ;;
i*) fmt=coff em=pe ;;
+diff -ru a/bfd/cofflink.c b/bfd/cofflink.c
+--- a/bfd/cofflink.c 2014-07-03 01:37:20.000000000 -0400
++++ b/bfd/cofflink.c 2015-06-06 11:07:57.716291339 -0400
+@@ -320,6 +320,7 @@
+ bfd_byte *esym;
+ bfd_byte *esym_end;
+ bfd_size_type amt;
++ char *weaksym;
+
+ symcount = obj_raw_syment_count (abfd);
+
+@@ -476,6 +477,14 @@
+ addit = FALSE;
+ }
+
++ if (!strncmp (name, ".weak.", 6) && strchr (name + 6, '.'))
++ {
++ weaksym = strdup (name + 6);
++ *(strchr(weaksym, '.')) = 0;
++ name = weaksym;
++ flags |= BSF_WEAK;
++ }
++
+ if (addit)
+ {
+ if (! (bfd_coff_link_add_one_symbol