summaryrefslogtreecommitdiff
path: root/cross/i386-netbsdpe/patches/binutils-af
diff options
context:
space:
mode:
Diffstat (limited to 'cross/i386-netbsdpe/patches/binutils-af')
-rw-r--r--cross/i386-netbsdpe/patches/binutils-af68
1 files changed, 65 insertions, 3 deletions
diff --git a/cross/i386-netbsdpe/patches/binutils-af b/cross/i386-netbsdpe/patches/binutils-af
index 5ef084e586e..a97a4903611 100644
--- a/cross/i386-netbsdpe/patches/binutils-af
+++ b/cross/i386-netbsdpe/patches/binutils-af
@@ -1,8 +1,8 @@
-$NetBSD: binutils-af,v 1.2 2003/04/27 13:50:10 kent Exp $
+$NetBSD: binutils-af,v 1.3 2004/03/09 12:19:12 kent Exp $
---- binutils/dlltool.c.orig Fri Dec 13 06:10:09 2002
+--- binutils/dlltool.c.orig 2003-07-08 12:35:36.000000000 +0900
+++ binutils/dlltool.c
-@@ -1403,6 +1403,8 @@
+@@ -1437,6 +1437,8 @@ match_exclude (string)
for (excl_item = excludes; excl_item; excl_item = excl_item->next)
if (strcmp (string, excl_item->string) == 0)
return TRUE;
@@ -11,3 +11,65 @@ $NetBSD: binutils-af,v 1.2 2003/04/27 13:50:10 kent Exp $
return FALSE;
}
+@@ -2351,6 +2353,7 @@ make_one_lib_file (exp, i)
+ asymbol * exp_label;
+ asymbol * iname = 0;
+ asymbol * iname2;
++ asymbol * iname_nm = 0;
+ asymbol * iname_lab;
+ asymbol ** iname_lab_pp;
+ asymbol ** iname_pp;
+@@ -2362,7 +2365,7 @@ make_one_lib_file (exp, i)
+ #ifndef EXTRA
+ #define EXTRA 0
+ #endif
+- asymbol * ptrs[NSECS + 4 + EXTRA + 1];
++ asymbol * ptrs[NSECS + 5 + EXTRA + 1];
+ flagword applicable;
+
+ char * outname = xmalloc (strlen (TMP_STUB) + 10);
+@@ -2460,6 +2463,15 @@ make_one_lib_file (exp, i)
+ iname2->flags = BSF_GLOBAL;
+ iname2->value = 0;
+
++ if (exp->data)
++ {
++ iname_nm = bfd_make_empty_symbol (abfd);
++ iname_nm->name = make_imp_label ("__nm_", exp->name);
++ iname_nm->section = secdata[IDATA6].sec;
++ iname_nm->flags = BSF_GLOBAL;
++ iname_nm->value = 0;
++ }
++
+ iname_lab = bfd_make_empty_symbol(abfd);
+
+ iname_lab->name = head_label;
+@@ -2471,6 +2483,8 @@ make_one_lib_file (exp, i)
+ if (create_compat_implib)
+ ptrs[oidx++] = iname;
+ ptrs[oidx++] = iname2;
++ if (exp->data)
++ ptrs[oidx++] = iname_nm;
+
+ iname_lab_pp = ptrs + oidx;
+ ptrs[oidx++] = iname_lab;
+@@ -2781,7 +2795,7 @@ make_head ()
+ fprintf (f, "\t%sdoesn't load DLLs when this is set.\n", ASM_C);
+ fprintf (f, "\t%s\t0\t%s loaded time\n", ASM_LONG, ASM_C);
+ fprintf (f, "\t%s\t0\t%s Forwarder chain\n", ASM_LONG, ASM_C);
+- fprintf (f, "\t%s__%s_iname%s\t%s imported dll's name\n",
++ fprintf (f, "\t%s_%s_iname%s\t%s imported dll's name\n",
+ ASM_RVA_BEFORE,
+ imp_name_lab,
+ ASM_RVA_AFTER,
+@@ -2862,8 +2876,8 @@ make_tail ()
+ fprintf (f, "\t.section .idata$7\n");
+ #endif
+
+- fprintf (f, "\t%s\t__%s_iname\n", ASM_GLOBAL, imp_name_lab);
+- fprintf (f, "__%s_iname:\t%s\t\"%s\"\n",
++ fprintf (f, "\t%s\t_%s_iname\n", ASM_GLOBAL, imp_name_lab);
++ fprintf (f, "_%s_iname:\t%s\t\"%s\"\n",
+ imp_name_lab, ASM_TEXT, dll_name);
+
+ fclose (f);