public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* GCC and NT DDK - still problems
@ 1999-09-13  0:40 Pavel Pisa;research student
  1999-09-13  8:52 ` Rask Ingemann Lambertsen
  1999-09-30 18:02 ` Pavel Pisa;research student
  0 siblings, 2 replies; 4+ messages in thread
From: Pavel Pisa;research student @ 1999-09-13  0:40 UTC (permalink / raw)
  To: gcc

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



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1999-09-30 18:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-09-13  0:40 GCC and NT DDK - still problems Pavel Pisa;research student
1999-09-13  8:52 ` Rask Ingemann Lambertsen
1999-09-30 18:02   ` Rask Ingemann Lambertsen
1999-09-30 18:02 ` Pavel Pisa;research student

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).