This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH v2 2/4] gold: Correctly get and put r_info for Mips64el.
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Cary Coutant <ccoutant at gmail dot com>
- Cc: Vladimir Radosavljevic <Vladimir dot Radosavljevic at imgtec dot com>, "binutils at sourceware dot org" <binutils at sourceware dot org>, Petar Jovanovic <Petar dot Jovanovic at imgtec dot com>
- Date: Tue, 12 Jan 2016 12:23:59 -0800
- Subject: Re: [PATCH v2 2/4] gold: Correctly get and put r_info for Mips64el.
- Authentication-results: sourceware.org; auth=none
- References: <3060420525346945A0ADBD567348A91723737257 at BADAG02 dot ba dot imgtec dot org> <CAJimCsFogsVm1t6zjzsP_Es4vjnXHMzjG3RnGZ_zy7VtDLk+qQ at mail dot gmail dot com> <CAMe9rOpHdTG7jyM33jKnnXeOMF2mw+OE-Q9P0KJB7-0basiPQw at mail dot gmail dot com> <CAMe9rOqYTABq9kMdNRagON3wbFE=mZk5AVwuiDxDWFS+vXJgdg at mail dot gmail dot com> <CAJimCsGtRoS7OK8Cing8e7Xcs7ZwetDzCAjb8Rg_fDdCrk3QKg at mail dot gmail dot com>
On Tue, Jan 12, 2016 at 11:42 AM, Cary Coutant <ccoutant@gmail.com> wrote:
>>> It breaks i686 gold:
>>>
>>> gcctestdir/ld: internal error in get_reloc_addend, at
>>> /export/gnu/import/git/sources/binutils-gdb/gold/reloc-types.h:49
>>> collect2: error: ld returned 1 exit status
>>> Makefile:5149: recipe for target 'icf_virtual_function_folding_test' failed
>>> make[7]: *** [icf_virtual_function_folding_test] Error 1
>>>
>>
>> It breaks all REL targets.
>
> Sorry for the breakage, and thanks for the quick analysis.
>
> I've pushed the attached patch:
>
> 2016-01-12 Cary Coutant <ccoutant@gmail.com>
>
> gold/
> * arm.cc (Target_arm::Classify_reloc::get_r_addend): New method.
> * i386.cc (Target_i386::Classify_reloc::get_r_addend): New method.
> * mips.cc (Target_arm::Mips_classify_reloc::get_r_addend): (Both
> specializations) New method.
>
> -cary
I checked in this to fix GCC 4.2 build.
--
H.J.
--
Subject: [PATCH] Fix compile error with use of 'typename' outside of template
* i386.cc (Target_i386::Classify_reloc::get_r_addend): Remove
'typename'.
---
gold/ChangeLog | 5 +++++
gold/i386.cc | 5 ++---
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/gold/ChangeLog b/gold/ChangeLog
index c16b4a3..3560e2f 100644
--- a/gold/ChangeLog
+++ b/gold/ChangeLog
@@ -1,3 +1,8 @@
+2016-01-12 H.J. Lu <hongjiu.lu@intel.com>
+
+ * i386.cc (Target_i386::Classify_reloc::get_r_addend): Remove
+ 'typename'.
+
2016-01-12 Cary Coutant <ccoutant@gmail.com>
* arm.cc (Target_arm::Classify_reloc::get_r_addend): New method.
diff --git a/gold/i386.cc b/gold/i386.cc
index 3715e5e..7946cf7 100644
--- a/gold/i386.cc
+++ b/gold/i386.cc
@@ -743,11 +743,10 @@ class Target_i386 : public Sized_target<32, false>
public gold::Default_classify_reloc<elfcpp::SHT_REL, 32, false>
{
public:
- typedef typename Reloc_types<elfcpp::SHT_REL, 32, false>::Reloc
- Reltype;
+ typedef Reloc_types<elfcpp::SHT_REL, 32, false>::Reloc Reltype;
// Return the explicit addend of the relocation (return 0 for SHT_REL).
- static typename elfcpp::Elf_types<32>::Elf_Swxword
+ static elfcpp::Elf_types<32>::Elf_Swxword
get_r_addend(const Reltype*)
{ return 0; }
--
2.5.0