Re: [AD] proposed patch for nicer asm symbols exports

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Wed, Aug 04, 2004, Chris wrote:

> This part seems to go for DOS and Windows, as well as Unix, yes? The 
> COFF object format won't like the .type construct there like that and 
> possibly break compilation.

   Ah, then here is my second try. Only uses .type when using GCC.

-- 
Sam.
Index: src/i386/asmdef.c
===================================================================
RCS file: /cvsroot/alleg/allegro/src/i386/asmdef.c,v
retrieving revision 1.19
diff -u -r1.19 asmdef.c
--- src/i386/asmdef.c	30 Mar 2004 07:02:13 -0000	1.19
+++ src/i386/asmdef.c	4 Aug 2004 09:04:52 -0000
@@ -235,6 +235,8 @@
 #endif
 #ifdef ALLEGRO_WATCOM
   {"#define FUNC(name)            .globl " PREFIX "name ; nop ; _align_ ; " PREFIX "name:", 0},
+#elif defined(__GNUC__)
+  {"#define FUNC(name)            .globl " PREFIX "name ; _align_ ; .type name,@function ; " PREFIX "name:", 0},
 #else
   {"#define FUNC(name)            .globl " PREFIX "name ; _align_ ; " PREFIX "name:", 0},
 #endif


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/