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

--- Comment #5 from rhn <sowaac.rhn at porcupinefactory dot org> ---
Yes, the ihex bfd is the output bfd. Thank you for pointing me the right
direction with ihex_set_section_contents().

It turns out that the last time the input section/bfd may be access is in
copy_section(), when bfd_set_section_contents() is called. This, in turn, calls
ihex_set_section_contents(), where no access to the input bfd is possible.

Seeing that the signature for both _set_section_contents() function contains
input bfd data:

bfd_boolean
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?

Cheers,
rhn

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to