source: trunk/third/gcc/config/aoutos.h @ 8834

Revision 8834, 3.1 KB checked in by ghudson, 28 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r8833, which included commits to RCS files with non-trunk default branches.
Line 
1/* aoutos.h  --  operating system specific defines to be used when
2   targeting GCC for some system that uses a.out file format.
3   Copyright (C) 1992 Free Software Foundation, Inc.
4
5   Written by Ron Guilmette (rfg@netcom.com).
6
7This file is part of GNU CC.
8
9GNU CC is free software; you can redistribute it and/or modify
10it under the terms of the GNU General Public License as published by
11the Free Software Foundation; either version 2, or (at your option)
12any later version.
13
14GNU CC is distributed in the hope that it will be useful,
15but WITHOUT ANY WARRANTY; without even the implied warranty of
16MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17GNU General Public License for more details.
18
19You should have received a copy of the GNU General Public License
20along with GNU CC; see the file COPYING.  If not, write to
21the Free Software Foundation, 59 Temple Place - Suite 330,
22Boston, MA 02111-1307, USA.  */
23
24/* To use this file, make up a file with a name like:
25
26        ?????aout.h
27
28   where ????? is replaced by the name of the basic hardware that you
29   are targeting for.  Then, in the file ?????aout.h, put something
30   like:
31
32        #include "?????.h"
33        #include "aoutos.h"
34
35   followed by any really system-specific defines (or overrides of
36   defines) which you find that you need.  Now, modify the configure
37   or configure.in script to properly use the new ?????aout.h file
38   when configuring for the system.  */
39
40/* Define a symbol indicating that we are using aoutos.h.  */
41#define USING_AOUTOS_H
42
43/* A C statement (sans semicolon) to output an element in the table of
44   global constructors.
45   If using GNU LD, tell it that this is part of the static destructor set.
46   This code works for any machine provided you use GNU as/ld.
47   If not using GNU LD, rely on a "collect" program to look for names defined
48   in the particular form we choose as global constructor function names.  */
49
50#define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME)                               \
51  do {                                                                  \
52    if (flag_gnu_linker)                                                \
53      {                                                                 \
54        /* Output an N_SETT (0x16, 22.) for the name.  */               \
55        fprintf (FILE, "%s \"___CTOR_LIST__\",22,0,0,", ASM_STABS_OP);  \
56        assemble_name (FILE, NAME);                                     \
57        fputc ('\n', FILE);                                             \
58      }                                                                 \
59  } while (0)
60
61
62/* A C statement (sans semicolon) to output an element in the table of
63   global destructors.  */
64
65#define ASM_OUTPUT_DESTRUCTOR(FILE,NAME)                                \
66  do {                                                                  \
67    if (flag_gnu_linker)                                                \
68      {                                                                 \
69        /* Output an N_SETT (0x16, 22.) for the name.  */               \
70        fprintf (FILE, "%s \"___DTOR_LIST__\",22,0,0,", ASM_STABS_OP);  \
71        assemble_name (FILE, NAME);                                     \
72        fputc ('\n', FILE);                                             \
73      }                                                                 \
74  } while (0)
75
76/* Likewise for entries we want to record for garbage collection.
77   Garbage collection is still under development.  */
78
79#define ASM_OUTPUT_GC_ENTRY(FILE,NAME)                                  \
80  do {                                                                  \
81    if (flag_gnu_linker)                                                \
82      {                                                                 \
83        /* Output an N_SETT (0x16, 22.) for the name.  */               \
84        fprintf (FILE, "%s \"___PTR_LIST__\",22,0,0,", ASM_STABS_OP);   \
85        assemble_name (FILE, NAME);                                     \
86        fputc ('\n', FILE);                                             \
87      }                                                                 \
88  } while (0)
Note: See TracBrowser for help on using the repository browser.