diff options
author | Nick Clifton <nickc@redhat.com> | 2003-06-02 08:43:37 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2003-06-02 08:43:37 +0000 |
commit | 03a1c9a70857253f0a7a2d7a29a0f627ffc632bd (patch) | |
tree | 437a3b07087d688556fbb97ce722bd78ff840b79 | |
parent | f4dbdb54685e3f072f93dc9de73ac9230b0f32d2 (diff) | |
download | fsf-binutils-gdb-03a1c9a70857253f0a7a2d7a29a0f627ffc632bd.zip fsf-binutils-gdb-03a1c9a70857253f0a7a2d7a29a0f627ffc632bd.tar.gz fsf-binutils-gdb-03a1c9a70857253f0a7a2d7a29a0f627ffc632bd.tar.bz2 |
Scan table pe_dll->exports, which is sorted alphabetically, instead of
exported_symbols, which is sorted by ordinal.
-rw-r--r-- | ld/ChangeLog | 6 | ||||
-rw-r--r-- | ld/pe-dll.c | 16 |
2 files changed, 16 insertions, 6 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index bfd7846..0af2d4d 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,9 @@ +2003-06-02 Fabrizio Gennari <fabrizio.ge@tiscalinet.it> + + * pe-dll.c (fill_edata): Scan table pe_dll->exports, which is + sorted alphabetically, instead of exported_symbols, which is + sorted by ordinal. + 2003-05-30 Ulrich Drepper <drepper@redhat.com> Jakub Jelinek <jakub@redhat.com> diff --git a/ld/pe-dll.c b/ld/pe-dll.c index 1430754..db9f2df 100644 --- a/ld/pe-dll.c +++ b/ld/pe-dll.c @@ -959,7 +959,7 @@ fill_edata (abfd, info) bfd *abfd; struct bfd_link_info *info ATTRIBUTE_UNUSED; { - int i, hint; + int s, hint; unsigned char *edirectory; unsigned long *eaddresses; unsigned long *enameptrs; @@ -1000,13 +1000,16 @@ fill_edata (abfd, info) fill_exported_offsets (abfd, info); - /* Ok, now for the filling in part. */ + /* 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 (i = 0; i < export_table_size; i++) + for (s = 0; s < NE; s++) { - int s = exported_symbols[i]; - - if (s != -1) + if (pe_def_file->exports[s].ordinal != -1) { struct sec *ssec = exported_symbol_sections[s]; unsigned long srva = (exported_symbol_offsets[s] @@ -1020,6 +1023,7 @@ fill_edata (abfd, info) 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); |