Move GOLD_SYMTAB_H before header includes.

Sriraman Tallam tmsriram@google.com
Tue Oct 13 00:26:00 GMT 2009


Hi,

  This seems to have slipped through so far and was causing me much
grief today till Cary figured out what the problem was. Here is a
patch to fix it. Please let me know if this is ok to submit.

	* symtab.h: Check for GOLD_SYMTAB_H before header includes. Remove
	includes to gc.h and icf.h.
	* arm.cc: Include gc.h.
	* gold.cc: Likewise.
	* i386.cc: Likewise.
	* powerpc.cc: Likewise.
	* sparc.cc: Likewise.
	* x86_64.cc: Likewise.
	* gc.h: Include icf.h.

Built and ran all tests.

Thanks,
-Sriraman.
-------------- next part --------------
Index: arm.cc
===================================================================
RCS file: /cvs/src/src/gold/arm.cc,v
retrieving revision 1.15
diff -u -u -p -r1.15 arm.cc
--- arm.cc	9 Oct 2009 22:56:41 -0000	1.15
+++ arm.cc	13 Oct 2009 00:23:25 -0000
@@ -42,6 +42,7 @@
 #include "target-select.h"
 #include "tls.h"
 #include "defstd.h"
+#include "gc.h"
 
 namespace
 {
Index: gc.h
===================================================================
RCS file: /cvs/src/src/gold/gc.h,v
retrieving revision 1.2
diff -u -u -p -r1.2 gc.h
--- gc.h	5 Aug 2009 20:51:56 -0000	1.2
+++ gc.h	13 Oct 2009 00:23:25 -0000
@@ -28,6 +28,7 @@
 
 #include "elfcpp.h"
 #include "symtab.h"
+#include "icf.h"
 
 namespace gold
 {
Index: gold.cc
===================================================================
RCS file: /cvs/src/src/gold/gold.cc,v
retrieving revision 1.70
diff -u -u -p -r1.70 gold.cc
--- gold.cc	9 Oct 2009 22:38:07 -0000	1.70
+++ gold.cc	13 Oct 2009 00:23:25 -0000
@@ -41,6 +41,7 @@
 #include "reloc.h"
 #include "defstd.h"
 #include "plugin.h"
+#include "gc.h"
 #include "icf.h"
 #include "incremental.h"
 
Index: i386.cc
===================================================================
RCS file: /cvs/src/src/gold/i386.cc,v
retrieving revision 1.92
diff -u -u -p -r1.92 i386.cc
--- i386.cc	6 Oct 2009 22:58:27 -0000	1.92
+++ i386.cc	13 Oct 2009 00:23:25 -0000
@@ -38,6 +38,7 @@
 #include "target-select.h"
 #include "tls.h"
 #include "freebsd.h"
+#include "gc.h"
 
 namespace
 {
Index: powerpc.cc
===================================================================
RCS file: /cvs/src/src/gold/powerpc.cc,v
retrieving revision 1.15
diff -u -u -p -r1.15 powerpc.cc
--- powerpc.cc	6 Oct 2009 22:58:27 -0000	1.15
+++ powerpc.cc	13 Oct 2009 00:23:25 -0000
@@ -37,6 +37,7 @@
 #include "target-select.h"
 #include "tls.h"
 #include "errors.h"
+#include "gc.h"
 
 namespace
 {
Index: sparc.cc
===================================================================
RCS file: /cvs/src/src/gold/sparc.cc,v
retrieving revision 1.19
diff -u -u -p -r1.19 sparc.cc
--- sparc.cc	6 Oct 2009 22:58:27 -0000	1.19
+++ sparc.cc	13 Oct 2009 00:23:25 -0000
@@ -40,6 +40,7 @@
 #include "target-select.h"
 #include "tls.h"
 #include "errors.h"
+#include "gc.h"
 
 namespace
 {
Index: symtab.h
===================================================================
RCS file: /cvs/src/src/gold/symtab.h,v
retrieving revision 1.93
diff -u -u -p -r1.93 symtab.h
--- symtab.h	9 Oct 2009 23:18:19 -0000	1.93
+++ symtab.h	13 Oct 2009 00:23:25 -0000
@@ -23,20 +23,18 @@
 // Symbol_table
 //   The symbol table.
 
+#ifndef GOLD_SYMTAB_H
+#define GOLD_SYMTAB_H
+
 #include <string>
 #include <utility>
 #include <vector>
 
-#include "gc.h"
-#include "icf.h"
 #include "elfcpp.h"
 #include "parameters.h"
 #include "stringpool.h"
 #include "object.h"
 
-#ifndef GOLD_SYMTAB_H
-#define GOLD_SYMTAB_H
-
 namespace gold
 {
 
Index: x86_64.cc
===================================================================
RCS file: /cvs/src/src/gold/x86_64.cc,v
retrieving revision 1.87
diff -u -u -p -r1.87 x86_64.cc
--- x86_64.cc	6 Oct 2009 22:58:27 -0000	1.87
+++ x86_64.cc	13 Oct 2009 00:23:25 -0000
@@ -38,6 +38,7 @@
 #include "target-select.h"
 #include "tls.h"
 #include "freebsd.h"
+#include "gc.h"
 
 namespace
 {
cvs diff: Diffing po
cvs diff: Diffing testsuite


More information about the Binutils mailing list