Revert 137452.
[official-gcc.git] / gcc / config / i386 / nwld.c
blob9ae2aad3d35e70710b34934823814fb3a9c12f0c
1 /* Subroutines for insn-output.c for NetWare.
2 Contributed by Jan Beulich (jbeulich@novell.com)
3 Copyright (C) 2004, 2007 Free Software Foundation, Inc.
5 This file is part of GCC.
7 GCC is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3, or (at your option)
10 any later version.
12 GCC is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with GCC; see the file COPYING3. If not see
19 <http://www.gnu.org/licenses/>. */
21 #include "config.h"
22 #include "system.h"
23 #include "coretypes.h"
24 #include "tm.h"
25 #include "rtl.h"
26 #include "regs.h"
27 #include "hard-reg-set.h"
28 #include "output.h"
29 #include "tree.h"
30 #include "flags.h"
31 #include "tm_p.h"
32 #include "toplev.h"
34 void
35 nwld_named_section_asm_out_constructor (rtx symbol, int priority)
37 #if !SUPPORTS_INIT_PRIORITY
38 const char section[] = ".ctors"TARGET_SUB_SECTION_SEPARATOR;
39 #else
40 char section[20];
42 sprintf (section,
43 ".ctors"TARGET_SUB_SECTION_SEPARATOR"%.5u",
44 /* Invert the numbering so the linker puts us in the proper
45 order; constructors are run from right to left, and the
46 linker sorts in increasing order. */
47 MAX_INIT_PRIORITY - priority);
48 #endif
50 switch_to_section (get_section (section, 0, NULL));
51 assemble_align (POINTER_SIZE);
52 assemble_integer (symbol, POINTER_SIZE / BITS_PER_UNIT, POINTER_SIZE, 1);
55 void
56 nwld_named_section_asm_out_destructor (rtx symbol, int priority)
58 #if !SUPPORTS_INIT_PRIORITY
59 const char section[] = ".dtors"TARGET_SUB_SECTION_SEPARATOR;
60 #else
61 char section[20];
63 sprintf (section, ".dtors"TARGET_SUB_SECTION_SEPARATOR"%.5u",
64 /* Invert the numbering so the linker puts us in the proper
65 order; destructors are run from left to right, and the
66 linker sorts in increasing order. */
67 MAX_INIT_PRIORITY - priority);
68 #endif
70 switch_to_section (get_section (section, 0, NULL));
71 assemble_align (POINTER_SIZE);
72 assemble_integer (symbol, POINTER_SIZE / BITS_PER_UNIT, POINTER_SIZE, 1);