Fix compile errors with GCC 4.2.
authorCary Coutant <ccoutant@gmail.com>
Wed, 11 Jan 2017 19:47:27 +0000 (11:47 -0800)
committerCary Coutant <ccoutant@gmail.com>
Wed, 11 Jan 2017 19:47:27 +0000 (11:47 -0800)
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.

gold/ChangeLog
gold/testsuite/copy_test_relro_1.cc
gold/x86_64.cc

index f97433adc47b1e65e2d213c1aceb33b06af05037..64a2dbe1cd42ff29b33428807b6f0982d4a4107e 100644 (file)
@@ -1,3 +1,14 @@
+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
index c5f280b476c11ba7362d8545ac710a925c4b78c6..3628214a13c069a2ff7d582b5444b882e044e26d 100644 (file)
 // 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;
index 4116429e27b99fc1952ba4fd1f0375c4682449f9..d4d76b51ec66da3dfd20e18165737e0e65c6b5ea 100644 (file)
@@ -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);