xtensa: bfd: fix assertion in xlate_offset_with_removed_text
authorMax Filippov <jcmvbkbc@gmail.com>
Thu, 15 Mar 2018 17:35:59 +0000 (10:35 -0700)
committerMax Filippov <jcmvbkbc@gmail.com>
Thu, 15 Mar 2018 20:53:33 +0000 (13:53 -0700)
commit0854d50445a11847f80e655482fd180d7c4e4d00
tree5d212be4070c5fd1eb9addb5e80080ae8cb345e2
parent202d116e5714a0c21d0c38b7dd45b5d4ee494880
xtensa: bfd: fix assertion in xlate_offset_with_removed_text

Linking objects containing jumps targeting the end of a section triggers
assertion in the xlate_offset_with_removed_text. Such jumps may be
generated by a compiler as a dead code and not removed at -O0. Allow
such jumps.
While at it make bsearch argument match comparison function expectations
and use bfd_vma for address fields in the struct xlate_map_entry.

bfd/
2018-03-15  Max Filippov  <jcmvbkbc@gmail.com>

* elf32-xtensa.c (xlate_map_entry): Change types of address
fields from 'unsigned' to 'bfd_vma'.
(xlate_offset_with_removed_text): Use struct xlate_map_entry as
the key argument to bsearch. Allow offsets past the end of a
section, use the last map entry for translation of such offsets.
bfd/ChangeLog
bfd/elf32-xtensa.c
This page took 0.024881 seconds and 4 git commands to generate.