This is the mail archive of the binutils@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]

Re: [PATCH 1/3] binutils/testsuite: Enable strip-13 test for `hppa*-*'


On Wed, Apr 4, 2018 at 1:57 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Wed, Apr 4, 2018 at 1:09 PM, Maciej W. Rozycki <macro@mips.com> wrote:
>> Based on relocations defined in include/elf/*.h files we have relocation
>> numbers: 143, 159, 214 and 215 currently not used by any of our ELF
>> targets.  Use 143 then instead of 241 to enable the `strip-13' test for
>> `hppa*-*' targets.  It has a side effect with some targets of verifying
>> that unused relocations whose numbers are below the respective R_*_max
>> value are handled correctly.
>>
>>         binutils/
>>         * testsuite/binutils-all/strip-13.s: Use 143 (0x8f) rather than
>>         241 (0xf1) for the relocation number and RELA addend.
>>         * testsuite/binutils-all/strip-13.d: Remove `hppa*-*' from the
>>         `not-target' list.
>> ---
>> Hi,
>>
>>  As previously discussed this causes an issue with x86-64 targets and the
>> R_X86_64_converted_reloc_bit bit added with commit 78984959cb38 ("x86-64:
>> Add R_X86_64_converted_reloc_bit"), resulting in a test regression.  This
>> is a bug in the x86-64 target backend, acknowledged by H.J.
>>
>
> I will deal with x86 regressions.
>

I am testing this patch.


-- 
H.J.
From bfc502c212de42eec36f416f433e5ac28f03a4cb Mon Sep 17 00:00:00 2001
From: "H.J. Lu" <hjl.tools@gmail.com>
Date: Thu, 5 Apr 2018 15:49:17 -0700
Subject: [PATCH] x86-64: Don't mask out R_X86_64_converted_reloc_bit

R_X86_64_converted_reloc_bit is set in elf_x86_64_convert_load_reloc
which is called from elf_x86_64_check_relocs.  Since it is used only
internally by linker, there is no need to mask it out in
elf_x86_64_info_to_howto.

	* elf64-x86-64.c (elf_x86_64_info_to_howto): Don't mask out
	R_X86_64_converted_reloc_bit.
---
 bfd/elf64-x86-64.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
index fcc8236373..25723797ba 100644
--- a/bfd/elf64-x86-64.c
+++ b/bfd/elf64-x86-64.c
@@ -344,9 +344,6 @@ elf_x86_64_info_to_howto (bfd *abfd, arelent *cache_ptr,
   unsigned r_type;
 
   r_type = ELF32_R_TYPE (dst->r_info);
-  if (r_type != (unsigned int) R_X86_64_GNU_VTINHERIT
-      && r_type != (unsigned int) R_X86_64_GNU_VTENTRY)
-    r_type &= ~R_X86_64_converted_reloc_bit;
   cache_ptr->howto = elf_x86_64_rtype_to_howto (abfd, r_type);
   if (cache_ptr->howto == NULL)
     return FALSE;
-- 
2.14.3


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