PATCH: PR binutils/16318: Objcopy loses EI_OSABI
Andreas Schwab
schwab@linux-m68k.org
Fri Dec 13 18:07:00 GMT 2013
"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.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
More information about the Binutils
mailing list