This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Patch proposal for ld/pe-dll.c


(the same, with a unified diff & a ChangeLog entry)

Thanks,

--Ivan Warren

2003-09-21  Ivan Warren <ivan@vmfacility.fr>

        ld/ChangeLog
        * pe-dll.c: Correct sym def order & pick right sym for .idata$7
reloc

diff -bu ./binutils-030921-orig/ld/pe-dll.c ./binutils-030921/ld/pe-dll.c
--- ./binutils-030921-orig/ld/pe-dll.c	2003-07-17 17:47:49.000000000 +0200
+++ ./binutils-030921/ld/pe-dll.c	2003-09-21 09:35:10.766250000 +0200
@@ -1780,10 +1780,10 @@
 
   if  (*exp->internal_name == '@')
     {
-      if (! exp->flag_data)
-	quick_symbol (abfd, "", exp->internal_name, "", tx, BSF_GLOBAL, 0);
       quick_symbol (abfd, U ("_head_"), dll_symname, "", UNDSEC,
 		    BSF_GLOBAL, 0);
+      if (! exp->flag_data)
+	quick_symbol (abfd, "", exp->internal_name, "", tx, BSF_GLOBAL, 0);
       quick_symbol (abfd, U ("_imp_"), exp->internal_name, "", id5,
 		    BSF_GLOBAL, 0);
       /* Fastcall applies only to functions,
@@ -1791,11 +1791,11 @@
     }
   else
     {
+      quick_symbol (abfd, U ("_head_"), dll_symname, "", UNDSEC,
+		    BSF_GLOBAL, 0);
       if (! exp->flag_data)
 	quick_symbol (abfd, U (""), exp->internal_name, "", tx,
 		      BSF_GLOBAL, 0);
-      quick_symbol (abfd, U ("_head_"), dll_symname, "", UNDSEC,
-		    BSF_GLOBAL, 0);
       quick_symbol (abfd, U ("_imp__"), exp->internal_name, "", id5,
 		    BSF_GLOBAL, 0);
       /* Symbol to reference ord/name of imported
@@ -1838,7 +1838,7 @@
   d7 = xmalloc (4);
   id7->contents = d7;
   memset (d7, 0, 4);
-  quick_reloc (abfd, 0, BFD_RELOC_RVA, 6);
+  quick_reloc (abfd, 0, BFD_RELOC_RVA, 5);
   save_relocs (id7);
 
   bfd_set_section_size (abfd, id5, 4);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]