mikore,
gcc from b127 (gcc 3.4.3 (csl-sol210-3_4-20050802)) compiles ndis-1.2.5. And 
the driver works.
Thank you for help.

The problem with gcc-4.4.2 is that it doesn't put DW_AT_name inside
some Debugging Information Entries (DIE)

Example:
dwarfdump if_ndis.o (if_ndis.o is produced by gcc-4.4.2)
gives:
<1><   80>      DW_TAG_base_type
                DW_AT_byte_size             4
                DW_AT_encoding              DW_ATE_unsigned
<1><   83>      DW_TAG_base_type

dwarfdump if_ndis.o (if_ndis.o is produced by gcc-3.4.3)
<1><   80>      DW_TAG_base_type
                DW_AT_name                  unsigned int
                DW_AT_byte_size             4
                DW_AT_encoding              DW_ATE_unsigned
<1><   87>      DW_TAG_base_type

In the file that was produced by gcc-4.4.2 there is no line "DW_AT_name 
unsigned int"
that is why I got an error:
/opt/onbld/bin/i386/ctfconvert -g -l NDISWRAPPER if_ndis.o
ERROR: ctfconvert: die 80: base type without name


Also I'd like to say that ndis-1.2.5 contains some errors
1.
../if_ndis.c:156: error: static declaration of 'wifi_bcastaddr' follows 
non-static declaration
../include/sys/mac_wifi.h:114: note: previous declaration of 'wifi_bcastaddr' 
was here
2.
excessive | in the file inf-parse.y that leads to reduce/reduce error
*** ndis-1.2.5/inf-parse.y      Thu Jul 17 13:08:26 2008
--- ndis-1.2.5-patch/inf-parse.y        Thu Dec  3 16:08:02 2009
***************
*** 95,101 ****
                { push_word(NULL); }
        | COMMA
                { push_word(NULL); }
-       |
        ;
  
  regkey
--- 95,100 ----

3.
 prinf should has "hh" modificator
*** ndis-1.2.5/ndiscvt.c        Thu Jul 17 13:08:26 2008
--- ndis-1.2.5-patch/ndiscvt.c  Thu Dec  3 14:22:44 2009

*** 392,404 ****
                for (i = 0; i < 10; i++) {
                        cnt++;
                        if (cnt == fsize) {
!                               fprintf(outfp, "0x%.2X};\n", ptr[i]);
                                goto done;
                        } else {
                                if (i == 9)
!                                       fprintf(outfp, "0x%.2X,\n", ptr[i]);
                                else
!                                       fprintf(outfp, "0x%.2X, ", ptr[i]);
                        }
                }
                ptr += 10;
--- 397,409 ----
                for (i = 0; i < 10; i++) {
                        cnt++;
                        if (cnt == fsize) {
!                               fprintf(outfp, "0x%.2hhX};\n", ptr[i]);
                                goto done;
                        } else {
                                if (i == 9)
!                                       fprintf(outfp, "0x%.2hhX,\n", ptr[i]);
                                else
!                                       fprintf(outfp, "0x%.2hhX, ", ptr[i]);
                        }
                }
                ptr += 10;
-- 
This message posted from opensolaris.org
_______________________________________________
driver-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/driver-discuss

Reply via email to