obj-macho.c revision 1.1 1 1.1 christos /* Mach-O object file format
2 1.1 christos Copyright 2009 Free Software Foundation, Inc.
3 1.1 christos
4 1.1 christos This file is part of GAS, the GNU Assembler.
5 1.1 christos
6 1.1 christos GAS is free software; you can redistribute it and/or modify
7 1.1 christos it under the terms of the GNU General Public License as
8 1.1 christos published by the Free Software Foundation; either version 3,
9 1.1 christos or (at your option) any later version.
10 1.1 christos
11 1.1 christos GAS is distributed in the hope that it will be useful, but
12 1.1 christos WITHOUT ANY WARRANTY; without even the implied warranty of
13 1.1 christos MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
14 1.1 christos the GNU General Public License for more details.
15 1.1 christos
16 1.1 christos You should have received a copy of the GNU General Public License
17 1.1 christos along with GAS; see the file COPYING. If not, write to the Free
18 1.1 christos Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
19 1.1 christos 02110-1301, USA. */
20 1.1 christos
21 1.1 christos #define OBJ_HEADER "obj-macho.h"
22 1.1 christos
23 1.1 christos #include "as.h"
24 1.1 christos #include "mach-o.h"
25 1.1 christos
26 1.1 christos static void
27 1.1 christos obj_mach_o_weak (int ignore ATTRIBUTE_UNUSED)
28 1.1 christos {
29 1.1 christos char *name;
30 1.1 christos int c;
31 1.1 christos symbolS *symbolP;
32 1.1 christos
33 1.1 christos do
34 1.1 christos {
35 1.1 christos /* Get symbol name. */
36 1.1 christos name = input_line_pointer;
37 1.1 christos c = get_symbol_end ();
38 1.1 christos symbolP = symbol_find_or_make (name);
39 1.1 christos S_SET_WEAK (symbolP);
40 1.1 christos *input_line_pointer = c;
41 1.1 christos SKIP_WHITESPACE ();
42 1.1 christos
43 1.1 christos if (c != ',')
44 1.1 christos break;
45 1.1 christos input_line_pointer++;
46 1.1 christos SKIP_WHITESPACE ();
47 1.1 christos }
48 1.1 christos while (*input_line_pointer != '\n');
49 1.1 christos demand_empty_rest_of_line ();
50 1.1 christos }
51 1.1 christos
52 1.1 christos const pseudo_typeS mach_o_pseudo_table[] =
53 1.1 christos {
54 1.1 christos {"weak", obj_mach_o_weak, 0},
55 1.1 christos
56 1.1 christos {NULL, NULL, 0}
57 1.1 christos };
58