Commit | Line | Data |
---|---|---|
0fa747c4 JL |
1 | /* SOM object file format. |
2 | Copyright (C) 1993 Free Software Foundation, Inc. | |
3 | ||
4 | This file is part of GAS, the GNU Assembler. | |
5 | ||
6 | GAS is free software; you can redistribute it and/or modify | |
7 | it under the terms of the GNU General Public License as published by | |
8 | the Free Software Foundation; either version 1, or (at your option) | |
9 | any later version. | |
10 | ||
11 | GAS is distributed in the hope that it will be useful, | |
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | GNU General Public License for more details. | |
15 | ||
16 | You should have received a copy of the GNU General Public License | |
17 | along with GAS; see the file COPYING. If not, write to | |
18 | the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. | |
19 | ||
20 | Written by the Center for Software Science at the University of Utah | |
21 | and by Cygnus Support. */ | |
22 | ||
23 | #ifndef _OBJ_SOM_H | |
24 | #define _OBJ_SOM_H | |
25 | ||
26 | #define OBJ_SOM 1 | |
27 | ||
28 | #include <bfd.h> | |
29 | #include "../bfd/som.h" | |
30 | #include "targ-cpu.h" | |
31 | ||
32 | #ifndef FALSE | |
33 | #define FALSE 0 | |
34 | #define TRUE !FALSE | |
35 | #endif | |
36 | ||
37 | #define TARGET_SYMBOL_FIELDS int local:1; unsigned long sy_name_offset; | |
38 | ||
39 | ||
40 | /* should be conditional on address size! */ | |
41 | #define som_symbol(asymbol) ((som_symbol_type *)(&(asymbol)->the_bfd)) | |
42 | ||
43 | #define S_SET_OTHER(S,V) (som_symbol((S)->bsym)->other = (V)) | |
44 | #define S_SET_TYPE(S,T) (som_symbol((S)->bsym)->type = (T)) | |
45 | #define S_SET_DESC(S,D) (som_symbol((S)->bsym)->desc = (D)) | |
46 | #define S_GET_OTHER(S) (som_symbol((S)->bsym)->other) | |
47 | #define S_GET_TYPE(S) (som_symbol((S)->bsym)->type) | |
48 | #define S_GET_DESC(S) (som_symbol((S)->bsym)->desc) | |
49 | ||
50 | #define S_SET_SIZE(S,V) (som_symbol((S)->bsym)->internal_som_sym.st_size) | |
51 | ||
52 | extern void som_file_symbol PARAMS ((char *)); | |
53 | extern void obj_som_version PARAMS ((int)); | |
54 | extern void obj_som_init_stab_section PARAMS ((segT)); | |
55 | ||
56 | #define obj_symbol_new_hook(s) {;} | |
57 | ||
58 | /* SOM has several attributes for spaces/subspaces which can not | |
59 | be easily expressed in BFD. We use these macros to trigger calls | |
60 | into the SOM BFD backend to set these attributes. */ | |
61 | #define obj_set_section_attributes bfd_som_set_section_attributes | |
62 | #define obj_set_subsection_attributes bfd_som_set_subsection_attributes | |
63 | ||
e75acd68 JL |
64 | /* Likewise for symbol types. */ |
65 | #define obj_set_symbol_type bfd_som_set_symbol_type | |
66 | ||
0fa747c4 JL |
67 | /* Stabs go in a separate sections. GDB expects to find them in sections |
68 | with the names $GDB_SYMBOLS$ and $GDB_STRINGS$ rather than .stab and | |
69 | .stabstr. */ | |
70 | #define SEPARATE_STAB_SECTIONS | |
71 | #define STAB_SECTION_NAME "$GDB_SYMBOLS$" | |
72 | #define STAB_STRING_SECTION_NAME "$GDB_STRINGS$" | |
73 | ||
74 | /* We use INIT_STAB_SECTION to record the space/subspace relationships | |
75 | for the various debugging sections. */ | |
76 | #define INIT_STAB_SECTION(seg) obj_som_init_stab_section (seg) | |
77 | ||
f197d7eb JL |
78 | /* We'll be updating the magic 1st stab entry once the entire assembly |
79 | fail has been processed. */ | |
80 | #define obj_frob_file() som_frob_file() | |
81 | ||
0fa747c4 | 82 | #endif /* _OBJ_SOM_H */ |