aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorBernd Schmidt <bernds@codesourcery.com>2014-05-22 16:21:18 +0000
committerBernd Schmidt <bernds@gcc.gnu.org>2014-05-22 16:21:18 +0000
commit4000360e40bee85872f411d1f1f39a7c52e840cb (patch)
treef7d61650256054125bf0451cc2e84c9bed76fc51 /gcc
parentc9aee4508bc514dcea6383921d6b75644aecd35a (diff)
downloadgcc-4000360e40bee85872f411d1f1f39a7c52e840cb.zip
gcc-4000360e40bee85872f411d1f1f39a7c52e840cb.tar.gz
gcc-4000360e40bee85872f411d1f1f39a7c52e840cb.tar.bz2
Create a new header lto-section-names.h
gcc/ * config/darwin.c: Include "lto-section-names.h". (LTO_SEGMENT_NAME): Don't define. * config/i386/winnt.c: Include "lto-section-names.h". * lto-streamer.c: Include "lto-section-names.h". * lto-streamer.h (LTO_SECTION_NAME_PREFIX): Don't define. * lto-wrapper.c: Include "lto-section-names.h". (LTO_SECTION_NAME_PREFIX): Don't define. * lto-section-names.h: New file. * cgraphunit.c: Include "lto-section-names.h". gcc/lto/ * lto-object.c: Include "lto-section-names.h". (LTO_SEGMENT_NAME): Don't define. * lto.c: Include "lto-section-names.h". From-SVN: r210819
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog12
-rw-r--r--gcc/config/darwin.c4
-rw-r--r--gcc/config/i386/winnt.c1
-rw-r--r--gcc/lto-section-names.h28
-rw-r--r--gcc/lto-streamer.c1
-rw-r--r--gcc/lto-streamer.h6
-rw-r--r--gcc/lto-wrapper.c8
-rw-r--r--gcc/lto/ChangeLog6
-rw-r--r--gcc/lto/lto-object.c6
-rw-r--r--gcc/lto/lto.c1
10 files changed, 52 insertions, 21 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 1e11b1a..65fb502 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,15 @@
+2012-05-22 Bernd Schmidt <bernds@codesourcery.com>
+
+ * config/darwin.c: Include "lto-section-names.h".
+ (LTO_SEGMENT_NAME): Don't define.
+ * config/i386/winnt.c: Include "lto-section-names.h".
+ * lto-streamer.c: Include "lto-section-names.h".
+ * lto-streamer.h (LTO_SECTION_NAME_PREFIX): Don't define.
+ * lto-wrapper.c: Include "lto-section-names.h".
+ (LTO_SECTION_NAME_PREFIX): Don't define.
+ * lto-section-names.h: New file.
+ * cgraphunit.c: Include "lto-section-names.h".
+
2014-05-22 Peter Bergner <bergner@vnet.ibm.com>
* config/rs6000/htm.md (ttest): Use correct shift value to get CR0.
diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c
index cec341d..a2c8749 100644
--- a/gcc/config/darwin.c
+++ b/gcc/config/darwin.c
@@ -61,6 +61,7 @@ along with GCC; see the file COPYING3. If not see
#include "gimple.h"
#include "gimplify.h"
#include "lto-streamer.h"
+#include "lto-section-names.h"
/* Darwin supports a feature called fix-and-continue, which is used
for rapid turn around debugging. When code is compiled with the
@@ -1898,9 +1899,6 @@ typedef struct GTY (()) darwin_lto_section_e {
static GTY (()) vec<darwin_lto_section_e, va_gc> *lto_section_names;
-/* Segment for LTO data. */
-#define LTO_SEGMENT_NAME "__GNU_LTO"
-
/* Section wrapper scheme (used here to wrap the unlimited number of LTO
sections into three Mach-O ones).
NOTE: These names MUST be kept in sync with those in
diff --git a/gcc/config/i386/winnt.c b/gcc/config/i386/winnt.c
index 6cdc29f..03e77aa 100644
--- a/gcc/config/i386/winnt.c
+++ b/gcc/config/i386/winnt.c
@@ -49,6 +49,7 @@ along with GCC; see the file COPYING3. If not see
#include "is-a.h"
#include "gimple.h"
#include "lto-streamer.h"
+#include "lto-section-names.h"
/* i386/PE specific attribute support.
diff --git a/gcc/lto-section-names.h b/gcc/lto-section-names.h
new file mode 100644
index 0000000..19a992d
--- /dev/null
+++ b/gcc/lto-section-names.h
@@ -0,0 +1,28 @@
+/* Definitions for LTO section names.
+ Copyright (C) 2013 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 3, or (at your option) any later
+version.
+
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with GCC; see the file COPYING3. If not see
+<http://www.gnu.org/licenses/>. */
+
+/* The string that is the prefix on the section names we make for lto.
+ For decls the DECL_ASSEMBLER_NAME is appended to make the section
+ name for the functions and static_initializers. For other types of
+ sections a '.' and the section type are appended. */
+#define LTO_SECTION_NAME_PREFIX ".gnu.lto_"
+
+/* Segment name for LTO sections. This is only used for Mach-O. */
+
+#define LTO_SEGMENT_NAME "__GNU_LTO"
diff --git a/gcc/lto-streamer.c b/gcc/lto-streamer.c
index e94b787..a352adf 100644
--- a/gcc/lto-streamer.c
+++ b/gcc/lto-streamer.c
@@ -37,6 +37,7 @@ along with GCC; see the file COPYING3. If not see
#include "diagnostic-core.h"
#include "tree-streamer.h"
#include "lto-streamer.h"
+#include "lto-section-names.h"
#include "streamer-hooks.h"
/* Statistics gathered during LTO, WPA and LTRANS. */
diff --git a/gcc/lto-streamer.h b/gcc/lto-streamer.h
index ca66465..521d78d 100644
--- a/gcc/lto-streamer.h
+++ b/gcc/lto-streamer.h
@@ -134,12 +134,6 @@ along with GCC; see the file COPYING3. If not see
String are represented in the table as pairs, a length in ULEB128
form followed by the data for the string. */
-/* The string that is the prefix on the section names we make for lto.
- For decls the DECL_ASSEMBLER_NAME is appended to make the section
- name for the functions and static_initializers. For other types of
- sections a '.' and the section type are appended. */
-#define LTO_SECTION_NAME_PREFIX ".gnu.lto_"
-
#define LTO_major_version 4
#define LTO_minor_version 0
diff --git a/gcc/lto-wrapper.c b/gcc/lto-wrapper.c
index fd604b0..f59d74e 100644
--- a/gcc/lto-wrapper.c
+++ b/gcc/lto-wrapper.c
@@ -46,13 +46,7 @@ along with GCC; see the file COPYING3. If not see
#include "opts.h"
#include "options.h"
#include "simple-object.h"
-
-/* From lto-streamer.h which we cannot include with -fkeep-inline-functions.
- ??? Split out a lto-streamer-core.h. */
-
-#define LTO_SECTION_NAME_PREFIX ".gnu.lto_"
-
-/* End of lto-streamer.h copy. */
+#include "lto-section-names.h"
int debug; /* true if -save-temps. */
int verbose; /* true if -v. */
diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog
index dedabf3..790c6c9 100644
--- a/gcc/lto/ChangeLog
+++ b/gcc/lto/ChangeLog
@@ -1,3 +1,9 @@
+2012-05-22 Bernd Schmidt <bernds@codesourcery.com>
+
+ * lto-object.c: Include "lto-section-names.h".
+ (LTO_SEGMENT_NAME): Don't define.
+ * lto.c: Include "lto-section-names.h".
+
2014-05-17 Jan Hubicka <hubicka@ucw.cz>
PR lto/61012
diff --git a/gcc/lto/lto-object.c b/gcc/lto/lto-object.c
index f43fb3a..c406efb 100644
--- a/gcc/lto/lto-object.c
+++ b/gcc/lto/lto-object.c
@@ -32,13 +32,9 @@ along with GCC; see the file COPYING3. If not see
#include "lto.h"
#include "tm.h"
#include "lto-streamer.h"
+#include "lto-section-names.h"
#include "simple-object.h"
-/* Segment name for LTO sections. This is only used for Mach-O.
- FIXME: This needs to be kept in sync with darwin.c. */
-
-#define LTO_SEGMENT_NAME "__GNU_LTO"
-
/* An LTO file wrapped around an simple_object. */
struct lto_simple_object
diff --git a/gcc/lto/lto.c b/gcc/lto/lto.c
index 8af4946..00f5f62 100644
--- a/gcc/lto/lto.c
+++ b/gcc/lto/lto.c
@@ -43,6 +43,7 @@ along with GCC; see the file COPYING3. If not see
#include "lto.h"
#include "lto-tree.h"
#include "lto-streamer.h"
+#include "lto-section-names.h"
#include "tree-streamer.h"
#include "splay-tree.h"
#include "lto-partition.h"