This is the mail archive of the binutils-cvs@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb/binutils-2_28-branch] Fix compile errors with GCC 4.2.


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=930624ccb207a0e1bb16500a4d812e9671fb78de

commit 930624ccb207a0e1bb16500a4d812e9671fb78de
Author: Cary Coutant <ccoutant@gmail.com>
Date:   Wed Jan 11 11:47:27 2017 -0800

    Fix compile errors with GCC 4.2.
    
    gold/
    	PR gold/21040
    	* x86_64.cc (Output_data_plt_x86_64_bnd::do_fill_first_plt_entry):
    	Remove unnecessary 'typename' keyword.
    	(Output_data_plt_x86_64_bnd::do_fill_plt_entry): Likewise.
    	(Output_data_plt_x86_64_bnd::do_fill_tlsdesc_entry): Likewise.
    	(Output_data_plt_x86_64_bnd::fill_aplt_entry): Likewise.
    	* testsuite/copy_test_relro_1.cc (p, b, c, q): Add separate extern
    	declarations.

Diff:
---
 gold/ChangeLog                      | 11 +++++++++++
 gold/testsuite/copy_test_relro_1.cc | 14 ++++++++++----
 gold/x86_64.cc                      | 18 +++++++++---------
 3 files changed, 30 insertions(+), 13 deletions(-)

diff --git a/gold/ChangeLog b/gold/ChangeLog
index f97433a..64a2dbe 100644
--- a/gold/ChangeLog
+++ b/gold/ChangeLog
@@ -1,5 +1,16 @@
 2017-01-11  Cary Coutant  <ccoutant@gmail.com>
 
+	PR gold/21040
+	* x86_64.cc (Output_data_plt_x86_64_bnd::do_fill_first_plt_entry):
+	Remove unnecessary 'typename' keyword.
+	(Output_data_plt_x86_64_bnd::do_fill_plt_entry): Likewise.
+	(Output_data_plt_x86_64_bnd::do_fill_tlsdesc_entry): Likewise.
+	(Output_data_plt_x86_64_bnd::fill_aplt_entry): Likewise.
+	* testsuite/copy_test_relro_1.cc (p, b, c, q): Add separate extern
+	declarations.
+
+2017-01-11  Cary Coutant  <ccoutant@gmail.com>
+
 	PR gold/21039
 	* testsuite/script_test_13.sh: Adjust patterns to work for i386.
 	* testsuite/script_test_15a.sh: Likewise.
diff --git a/gold/testsuite/copy_test_relro_1.cc b/gold/testsuite/copy_test_relro_1.cc
index c5f280b..3628214 100644
--- a/gold/testsuite/copy_test_relro_1.cc
+++ b/gold/testsuite/copy_test_relro_1.cc
@@ -21,10 +21,16 @@
 // MA 02110-1301, USA.
 
 extern int a;
-extern int* const p = &a;
 
-extern const int b[] = { 100, 200, 300, 400 };
+extern int* const p;
+extern const int b[];
+extern const int c;
+extern const int* const q;
 
-extern const int c = 500;
+int* const p = &a;
 
-extern const int* const q = &c;
+const int b[] = { 100, 200, 300, 400 };
+
+const int c = 500;
+
+const int* const q = &c;
diff --git a/gold/x86_64.cc b/gold/x86_64.cc
index 4116429..d4d76b5 100644
--- a/gold/x86_64.cc
+++ b/gold/x86_64.cc
@@ -478,29 +478,29 @@ class Output_data_plt_x86_64_bnd : public Output_data_plt_x86_64<64>
 
   virtual void
   do_fill_first_plt_entry(unsigned char* pov,
-			  typename elfcpp::Elf_types<64>::Elf_Addr got_addr,
-			  typename elfcpp::Elf_types<64>::Elf_Addr plt_addr);
+			  elfcpp::Elf_types<64>::Elf_Addr got_addr,
+			  elfcpp::Elf_types<64>::Elf_Addr plt_addr);
 
   virtual unsigned int
   do_fill_plt_entry(unsigned char* pov,
-		    typename elfcpp::Elf_types<64>::Elf_Addr got_address,
-		    typename elfcpp::Elf_types<64>::Elf_Addr plt_address,
+		    elfcpp::Elf_types<64>::Elf_Addr got_address,
+		    elfcpp::Elf_types<64>::Elf_Addr plt_address,
 		    unsigned int got_offset,
 		    unsigned int plt_offset,
 		    unsigned int plt_index);
 
   virtual void
   do_fill_tlsdesc_entry(unsigned char* pov,
-			typename elfcpp::Elf_types<64>::Elf_Addr got_address,
-			typename elfcpp::Elf_types<64>::Elf_Addr plt_address,
-			typename elfcpp::Elf_types<64>::Elf_Addr got_base,
+			elfcpp::Elf_types<64>::Elf_Addr got_address,
+			elfcpp::Elf_types<64>::Elf_Addr plt_address,
+			elfcpp::Elf_types<64>::Elf_Addr got_base,
 			unsigned int tlsdesc_got_offset,
 			unsigned int plt_offset);
 
   void
   fill_aplt_entry(unsigned char* pov,
-		  typename elfcpp::Elf_types<64>::Elf_Addr got_address,
-		  typename elfcpp::Elf_types<64>::Elf_Addr plt_address,
+		  elfcpp::Elf_types<64>::Elf_Addr got_address,
+		  elfcpp::Elf_types<64>::Elf_Addr plt_address,
 		  unsigned int got_offset,
 		  unsigned int plt_offset,
 		  unsigned int plt_index);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]