From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Pavel Pisa;research student" To: gcc@gcc.gnu.org Subject: GCC and NT DDK - still problems Date: Thu, 30 Sep 1999 18:02:00 -0000 Message-ID: X-SW-Source: 1999-09n/msg00476.html Message-ID: <19990930180200.hB50_FnmbSDGbewhvfA0iW__yfqjS_zqbVhcumWBlv0@z> Hello everybody, I am developing GPLed RS-485 9-bit driver for Linux and NT. It works OK under both OS, but I like to compile it by GCC under NT in future. GCC team helped me some time ago with anonymous structs and unions. Latest versions of MinGW32 port of GCC can parse and compile my patched vesions of NTDDK.H and NTDEF.H. If somebody have interrest I can send diffs. But I have stuck on "fastcall" calling convention. It is register calling convention used in VC 6.0 and NT Kernel. It is similar to attrib((regparms(2))) but uses another order of registers. GCC : EAX, EDX, ECX VC : ECX, EDX I have looked at GCC source, but it seems, that registers for parameters are used in hardcoded order based on registers numbering in GCC. I do not like to change numbering => it leads to many other problems. It would be great, if allocation order of registers used for parameters can be described same way as allocation order of registers for local parameters. There is second problem, function names of "fastcall" functions are decorated such way, that they begin with "@" instead of "_". GCC doesnot use this. It makes problems to binutils too. I have some more points to binutils. They are related to above, so I hope, that I can add them to GCC list. I have problems with binutils-2.9x and empty libraries. It leads to SIGSEGV. 2.8x was OK. Repair is there binutils-empty-ar-patch ------------------------------------------------------- --- ldfile.c.orig Sat Jul 10 15:57:03 1999 +++ ldfile.c Fri Aug 6 09:44:02 1999 @@ -143,11 +143,18 @@ else check = entry->the_bfd; + if(! check) + { + einfo (_("%P: openning empty archive %s when searching for %s\n"), + attempt, entry->local_sym_name); + return true; + } + if (! bfd_check_format (check, bfd_object)) return true; if (bfd_arch_get_compatible (check, output_bfd) == NULL) { - einfo (_("%P: skipping incompatible %s when searching for %s"), + einfo (_("%P: skipping incompatible %s when searching for %s\n"), attempt, entry->local_sym_name); bfd_close (entry->the_bfd); entry->the_bfd = NULL; ------------------------------------------------------- I have written program, which is able to parse MS import libraries. Output is DEF file, but there are problems with "@" in front again. I can send my source on request. Best regards and thanks for attention Pavel Pisa pisa@cmp.felk.cvut.cz http://cmp.felk.cvut.cz/~pisa PS: I will be pleased, if you can CC directly to me