home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 4 / FreshFish_May-June1994.bin / bbs / gnu / gcc-2.5.8-src.lha / src / amiga / gcc-2.5.8 / config / m68k / dpx2g.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-08-24  |  1.9 KB  |  73 lines

  1. /*
  2.  * dpx2g.h - Bull DPX/2 200 and 300 systems (m68k, SysVr3) with gas
  3.  */
  4.  
  5. #define USE_GAS
  6. #include "m68k/dpx2.h"
  7.  
  8. #ifndef USE_COLLECT2
  9. /* We use set vectors for the constructors/destructors. */ 
  10.  
  11. #undef ASM_OUTPUT_CONSTRUCTOR
  12. #undef ASM_OUTPUT_DESTRUCTOR
  13.  
  14. /* Although the gas we use can create .ctor and .dtor sections from N_SETT
  15.    stabs, it does not support section directives, so we need to have the loader
  16.    define the lists.
  17.  */
  18. #define CTOR_LISTS_DEFINED_EXTERNALLY
  19.  
  20. /* similar to default, but allows for the table defined by ld with gcc.ifile. 
  21.    nptrs is always 0.  So we need to instead check that __DTOR_LIST__[1] != 0.
  22.    The old check is left in so that the same macro can be used if and when  
  23.    a future version of gas does support section directives. */
  24.  
  25. #define DO_GLOBAL_DTORS_BODY {int nptrs = *(int *)__DTOR_LIST__; int i; \
  26.   if (nptrs == -1 || (__DTOR_LIST__[0] == 0 && __DTOR_LIST__[1] != 0))  \
  27.     for (nptrs = 0; __DTOR_LIST__[nptrs + 1] != 0; nptrs++);         \
  28.   for (i = nptrs; i >= 1; i--)                        \
  29.     __DTOR_LIST__[i] (); }
  30.  
  31. #undef STARTFILE_SPEC
  32. #define STARTFILE_SPEC \
  33.   "%{!r:gcc.ifile%s}\
  34.    %{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}\
  35.   huge.o%s"
  36.  
  37. #else /* !USE_COLLECT2 */
  38.  
  39. #undef STARTFILE_SPEC
  40. #define STARTFILE_SPEC \
  41.   "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}\
  42.   huge.o%s"
  43.  
  44. #endif /* !USE_COLLECT2 */
  45.  
  46.  
  47. /*
  48.  * we are using GAS
  49.  */
  50. #undef EXTRA_SECTION_FUNCTIONS
  51. #undef EXTRA_SECTIONS
  52. /* Gas understands dollars in labels. */
  53. #undef NO_DOLLAR_IN_LABEL
  54. /* GAS does not understand .ident so don't output anything for #ident.  */
  55. #undef ASM_OUTPUT_IDENT
  56.  
  57. #undef ASM_LONG
  58. #define ASM_LONG "\t.long"
  59.  
  60. /*
  61.  * put const's in the text section
  62.  */
  63. #define const_section()  text_section()
  64. #define fini_section() while (0)
  65.                    
  66. #undef CTORS_SECTION_ASM_OP
  67. #define CTORS_SECTION_ASM_OP "\t.data"
  68. #undef DTORS_SECTION_ASM_OP
  69. #define DTORS_SECTION_ASM_OP "\t.data"
  70. #undef INIT_SECTION_ASM_OP
  71.  
  72. /* end of dpx2g.h */
  73.