bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug binutils/23699] ihex output fails for mipsel-elf-objcopy


From: nickc at redhat dot com
Subject: [Bug binutils/23699] ihex output fails for mipsel-elf-objcopy
Date: Wed, 03 Oct 2018 11:04:00 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=23699

--- Comment #6 from Nick Clifton <nickc at redhat dot com> ---
Hi rhn,

(In reply to rhn from comment #5)

> bfd_set_section_contents (bfd *abfd,
>                         sec_ptr section,
>                         const void *location,
>                         file_ptr offset,
>                         bfd_size_type count)
> 
> , then I think adding a new parameter `bool sign_extend_vma` might do the
> job, if inelegantly. The address would be set correctly inside
> ihex_set_section_contents() in this scenario.
> 
> What do you think about that?

Not a good idea IMHO, because it will mean changing a lot of code in order
to fix a very minor bug.  (I apologise if you do not consider this bug to
be minor, but from the perspective of all of the architectures and file 
formats supported by the BFD library, mips+ihex is a rather obscure 
combination).

I am beginning to think that the original patch might actually be the best
approach.  Perhaps with a small modification so that it only checks and
masks out the top 32-bits of the address.  Ie it ignores the sign bit in
bit-31 and clips all addresses to 32-bits, issuing a warning only if the
upper 32 bits are not identical.

Cheers
  Nick

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]