Movatterモバイル変換


[0]ホーム

URL:


This is the mail archive of thebinutils@sources.redhat.commailing list for thebinutils 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]

Re: LoadLibrary may fail if DLL is built with gcc -shared


Hi Fabrizio,>> Please could you try applying the attached (untested) patch,> I tried it, but unfortunately the result is the same. However, I> wrote another patch. According to the few tests I've made, it seems> to work. It can be summarized as:>> pe-dll.c (fill_edata): scan table pe_dll->exports, which is sorted> alphabetically, instead of exported_symbols, which is sorted by ordinalThanks very much.  I have applied your patch, together with anextended comment, to pe-dll.cCheers        Nick2003-06-02  Fabrizio Gennari  <fabrizio.ge@tiscalinet.it>* pe-dll.c (fill_edata): Scan table pe_dll->exports, which issorted alphabetically, instead of exported_symbols, which issorted by ordinal.Index: ld/pe-dll.c===================================================================RCS file: /cvs/src/src/ld/pe-dll.c,vretrieving revision 1.56diff -c -3 -p -r1.56 pe-dll.c*** ld/pe-dll.c2 Apr 2003 17:39:24 -00001.56--- ld/pe-dll.c2 Jun 2003 08:37:59 -0000*************** fill_edata (abfd, info)*** 959,965 ****       bfd *abfd;       struct bfd_link_info *info ATTRIBUTE_UNUSED;  {!   int i, hint;    unsigned char *edirectory;    unsigned long *eaddresses;    unsigned long *enameptrs;--- 959,965 ----       bfd *abfd;       struct bfd_link_info *info ATTRIBUTE_UNUSED;  {!   int s, hint;    unsigned char *edirectory;    unsigned long *eaddresses;    unsigned long *enameptrs;*************** fill_edata (abfd, info)*** 1000,1012 ****      fill_exported_offsets (abfd, info);  !   /* Ok, now for the filling in part.  */    hint = 0;!   for (i = 0; i < export_table_size; i++)      {!       int s = exported_symbols[i];! !       if (s != -1)  {    struct sec *ssec = exported_symbol_sections[s];    unsigned long srva = (exported_symbol_offsets[s]--- 1000,1015 ----      fill_exported_offsets (abfd, info);  !   /* Ok, now for the filling in part.!      Scan alphabetically - ie the ordering in the exports[] table,!      rather than by ordinal - the ordering in the exported_symbol[]!      table.  See dlltool.c and:!http://sources.redhat.com/ml/binutils/2003-04/msg00379.html!      for more information.  */      hint = 0;!   for (s = 0; s < NE; s++)      {!       if (pe_def_file->exports[s].ordinal != -1)  {    struct sec *ssec = exported_symbol_sections[s];    unsigned long srva = (exported_symbol_offsets[s]

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

[8]ページ先頭

©2009-2025 Movatter.jp