* config/obj-som.[ch]: New files for SOM support in GAS.
[deliverable/binutils-gdb.git] / gas / config / obj-som.c
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
8 published by the Free Software Foundation; either version 2,
9 or (at your option) any later version.
10
11 GAS is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
14 the GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public
17 License along with GAS; see the file COPYING. If not, write
18 to 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 #include "as.h"
24 #include "subsegs.h"
25 #include "aout/stab_gnu.h"
26 #include "obstack.h"
27
28 /* SOM does not need any pseudo-ops. */
29
30 const pseudo_typeS obj_pseudo_table[] =
31 {
32 {NULL}
33 };
34
35 /* SOM does not use this. */
36
37 void
38 obj_read_begin_hook ()
39 {
40 }
41
42 /* Handle a .version directive. FIXME. We just parse the .version
43 directive and throw away the results!. */
44
45 void
46 obj_som_version (unused)
47 int unused;
48 {
49 SKIP_WHITESPACE ()
50 if (*input_line_pointer == '\"')
51 {
52 ++input_line_pointer;
53 while (is_a_char (next_char_of_string ()))
54 ;
55 }
56 else
57 {
58 as_bad ("Expected quoted string");
59 }
60 demand_empty_rest_of_line ();
61 }
62
63 /* Perform any initialization necessary for stabs support.
64
65 For SOM we need to create the space which will contain the
66 two stabs subspaces. Additionally we need to set up the
67 space/subspace relationships and set space/subspace attributes
68 which BFD does not understand. */
69
70 void
71 obj_som_init_stab_section (seg)
72 segT seg;
73 {
74 segT saved_seg = now_seg, space;
75 subsegT saved_subseg = now_subseg;
76
77 /* Make the space which will contain the debug subspaces. */
78 space = bfd_make_section_old_way (stdoutput, "$GDB_DEBUG$");
79
80 /* Set SOM specific attributes for the space. In particular we set
81 the space "defined", "private", "sort_key", and "spnum" values. */
82 obj_set_section_attributes (space, 1, 1, 255, 2);
83
84 /* Set the containing space for both stab sections to be $GDB_DEBUG$
85 (just created above). Also set some attributes which BFD does
86 not understand. In particular, access bits, sort keys, and load
87 quadrant. */
88 obj_set_subsection_attributes (seg, space, 0x1f, 255, 0);
89
90 /* Likewise for the $GDB_STRINGS$ subspace. Note the section
91 hasn't been created at the time of this call, so we create
92 it now. */
93 seg = subseg_new ("$GDB_STRINGS$", 0);
94 obj_set_subsection_attributes (seg, space, 0x1f, 254, 0);
95
96 subseg_set (saved_seg, saved_subseg);
97 }
This page took 0.035046 seconds and 5 git commands to generate.