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]

[patch] ld/pe-dll.c: ordinals and noname



Any comments before I apply this?

2000-09-14  DJ Delorie  <dj@redhat.com>

	* pe-dll.c (fill_edata): rearrange the data so that ordinals and
	noname work properly.

Index: pe-dll.c
===================================================================
RCS file: /cvs/src/src/ld/pe-dll.c,v
retrieving revision 1.14
diff -p -2 -r1.14 pe-dll.c
*** pe-dll.c	2000/07/19 00:04:04	1.14
--- pe-dll.c	2000/09/15 00:48:59
*************** fill_edata (abfd, info)
*** 704,720 ****
  				+ ssec->output_section->vma
  				+ ssec->output_offset);
  
! 	  bfd_put_32 (abfd, srva - image_base, (void *) (eaddresses + i));
  	  if (!pe_def_file->exports[s].flag_noname)
  	    {
  	      char *ename = pe_def_file->exports[s].name;
  	      bfd_put_32 (abfd, ERVA (enamestr), (void *) enameptrs);
  	      strcpy (enamestr, ename);
  	      enamestr += strlen (enamestr) + 1;
! 	      bfd_put_16 (abfd, i, (void *) eordinals);
! 	      enameptrs++;
  	      pe_def_file->exports[s].hint = hint++;
  	    }
- 	  eordinals++;
  	}
      }
--- 704,722 ----
  				+ ssec->output_section->vma
  				+ ssec->output_offset);
+ 	  int ord = pe_def_file->exports[s].ordinal;
  
! 	  bfd_put_32 (abfd, srva - image_base,
! 		      (void *) (eaddresses + ord - min_ordinal));
  	  if (!pe_def_file->exports[s].flag_noname)
  	    {
  	      char *ename = pe_def_file->exports[s].name;
  	      bfd_put_32 (abfd, ERVA (enamestr), (void *) enameptrs);
+ 	      enameptrs++;
  	      strcpy (enamestr, ename);
  	      enamestr += strlen (enamestr) + 1;
! 	      bfd_put_16 (abfd, ord, (void *) eordinals);
! 	      eordinals++;
  	      pe_def_file->exports[s].hint = hint++;
  	    }
  	}
      }

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