1 /* Subroutines for DJGPP. 2 Copyright (C) 2013-2020 Free Software Foundation, Inc. 3 4 This file is part of GCC. 5 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. 10 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. 15 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/>. */ 19 20 #define IN_TARGET_CODE 1 21 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" 28 29 void 30 i386_djgpp_asm_named_section(const char *name, unsigned int flags, 31 tree) 32 { 33 char flagchars[8], *f = flagchars; 34 35 if (flags & SECTION_WRITE) 36 *f++ = 'w'; 37 if (flags & SECTION_CODE) 38 *f++ = 'x'; 39 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'; 45 46 *f++ = '\0'; 47 48 fprintf (asm_out_file, "\t.section\t%s,\"%s\"\n", name, flagchars); 49 } 50 51 /* Kludge because of missing COFF support for early LTO debug. */ 52 53 static enum debug_info_levels saved_debug_info_level; 54 55 void 56 i386_djgpp_asm_lto_start (void) 57 { 58 saved_debug_info_level = debug_info_level; 59 debug_info_level = DINFO_LEVEL_NONE; 60 } 61 62 void 63 i386_djgpp_asm_lto_end (void) 64 { 65 debug_info_level = saved_debug_info_level; 66 } 67