patch for "objdump/cygwin crashes on auto-imported libs" bug

Ralf Habacker Ralf.Habacker@freenet.de
Thu Apr 25 07:10:00 GMT 2002


Hi all,

currently I'm working on an ordinal linking option for ld (performance benefits
for the kde-port) and have analysed the auto-import internals. While doing this
I got the knowledge to fix the bug
described in http://sources.redhat.com/ml/binutils/2002-01/msg00093.html.


$ diff -ubBp bfd/peigen.c.org bfd/peigen.c
--- bfd/peigen.c.org    Thu Apr 25 15:37:26 2002
+++ bfd/peigen.c        Thu Apr 25 15:57:50 2002
@@ -1226,7 +1226,15 @@ pe_print_idata (abfd, vfile)

          idx2 = first_thunk - adj;

-         for (j = 0; j < datasize; j += 4)
+          /* indicates that first_thunk points to an
+             data reference in the text segment (auto-import) */
+          if (idx2 < 0)
+            {
+           fprintf (file,
+            _("\tThe Import Address Table isn't identical (auto-import
descriptor)\n"));
+            differ = 1;
+           }
+         else for (j = 0; j < datasize; j += 4)
            {
              int ordinal;
              char *member_name;

bfd/ChangeLog---------------------------------------

2002-04-25  Ralf Habacker  <Ralf.Habacker@freenet.de>

	* peigen.c (pe_print_idata): bugfix for segfault in
        displaying auto-import image-import-descriptors

Any comments ?

Ralf




More information about the Cygwin-apps mailing list