2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
[official-gcc.git] / gcc / config / i386 / djgpp.c
blobd187c3a745229c248e2d1c40970fa93aebb22749
1 /* Subroutines for DJGPP.
2 Copyright (C) 2013-2018 Free Software Foundation, Inc.
4 This file is part of GCC.
6 GCC is free software; you can redistribute it and/or modify it under
7 the terms of the GNU General Public License as published by the Free
8 Software Foundation; either version 3, or (at your option) any later
9 version.
11 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 for more details.
16 You should have received a copy of the GNU General Public License
17 along with GCC; see the file COPYING3. If not see
18 <http://www.gnu.org/licenses/>. */
20 #define IN_TARGET_CODE 1
22 #include "config.h"
23 #include "system.h"
24 #include "coretypes.h"
25 #include "tm.h"
26 #include "output.h"
27 #include "lto-section-names.h"
29 void
30 i386_djgpp_asm_named_section(const char *name, unsigned int flags,
31 tree)
33 char flagchars[8], *f = flagchars;
35 if (flags & SECTION_WRITE)
36 *f++ = 'w';
37 if (flags & SECTION_CODE)
38 *f++ = 'x';
40 /* LTO sections need 1-byte alignment to avoid confusing the
41 zlib decompression algorithm with trailing zero pad bytes. */
42 if (strncmp (name, LTO_SECTION_NAME_PREFIX,
43 strlen (LTO_SECTION_NAME_PREFIX)) == 0)
44 *f++ = '0';
46 *f++ = '\0';
48 fprintf (asm_out_file, "\t.section\t%s,\"%s\"\n", name, flagchars);
51 /* Kludge because of missing COFF support for early LTO debug. */
53 static enum debug_info_levels saved_debug_info_level;
55 void
56 i386_djgpp_asm_lto_start (void)
58 saved_debug_info_level = debug_info_level;
59 debug_info_level = DINFO_LEVEL_NONE;
62 void
63 i386_djgpp_asm_lto_end (void)
65 debug_info_level = saved_debug_info_level;