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: PR binutils/16318: Objcopy loses EI_OSABI


On Fri, Dec 13, 2013 at 10:07 AM, Andreas Schwab <schwab@linux-m68k.org> wrote:
> "H.J. Lu" <hjl.tools@gmail.com> writes:
>
>> On Fri, Dec 13, 2013 at 7:23 AM, Andreas Schwab <schwab@linux-m68k.org> wrote:
>>> "H.J. Lu" <hongjiu.lu@intel.com> writes:
>>>
>>>> diff --git a/bfd/elf64-sh64.c b/bfd/elf64-sh64.c
>>>> index e70887b..4f49820 100644
>>>> --- a/bfd/elf64-sh64.c
>>>> +++ b/bfd/elf64-sh64.c
>>>> @@ -2268,6 +2268,9 @@ sh_elf64_copy_private_data_internal (bfd *ibfd, bfd *obfd)
>>>>        || bfd_get_flavour (obfd) != bfd_target_elf_flavour)
>>>>      return TRUE;
>>>>
>>>> +  if (! _bfd_elf_copy_private_bfd_data (ibfd, obfd))
>>>> +    return FALSE;
>>>> +
>>>>    o_shdrp = elf_elfsections (obfd);
>>>>    for (osec = obfd->sections; osec; osec = osec->next)
>>>>      {
>>>> @@ -2285,10 +2288,7 @@ sh_elf64_copy_private_data_internal (bfd *ibfd, bfd *obfd)
>>>>       }
>>>>      }
>>>>
>>>> -  /* Copy object attributes.  */
>>>> -  _bfd_elf_copy_obj_attributes (ibfd, obfd);
>>>> -
>>>> -  return sh_elf64_set_private_flags (obfd, elf_elfheader (ibfd)->e_flags);
>>>> +  return sh_elf64_set_mach_from_flags (obfd);
>>>>  }
>>>
>>> What about the other caller of sh_elf64_copy_private_data_internal?
>>
>> I don't know it enough to tell.
>
> I don't think _bfd_elf_copy_private_bfd_data is appropriate in a
> merge_private_bfd_data hook, so some refactoring is probably needed.
>

I can leave out the change in elf64-sh64.c and let target
maintainer decide what to do.

-- 
H.J.


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