bfd: xtensa: fix shrink_dynamic_reloc_sections for export-dynamic
authorMax Filippov <jcmvbkbc@gmail.com>
Fri, 29 Mar 2019 00:03:57 +0000 (17:03 -0700)
committerMax Filippov <jcmvbkbc@gmail.com>
Fri, 29 Mar 2019 17:02:10 +0000 (10:02 -0700)
commit2487ef07c28b961c6e2b8c51161f88f93b181d07
treeb1e5e978b0105e99f0cc2d3d5a15dad4ed1bef42
parent5f33607b284323ac71fb5b6864ce2fa671379dfc
bfd: xtensa: fix shrink_dynamic_reloc_sections for export-dynamic

shrink_dynamic_reloc_sections must remove PLT entry that was created for
an undefined weak symbol in the presence of --export-dynamic option when
relaxation coalesces literals pointing to that symbol. This fixes the
following assertion:

  ld: BFD (GNU Binutils) 2.31.1 internal error, aborting at
  elf32-xtensa.c:3292 in elf_xtensa_finish_dynamic_sections

2019-03-29  Max Filippov  <jcmvbkbc@gmail.com>
bfd/
* elf32-xtensa.c (shrink_dynamic_reloc_sections): Add
info->export_dynamic to the conditional.

ld/
* testsuite/ld-xtensa/relax-undef-weak-pie-export-dynamic.d: New
test definition.
* testsuite/ld-xtensa/xtensa.exp
(relax-undef-weak-pie-export-dynamic): Add new test.
bfd/ChangeLog
bfd/elf32-xtensa.c
ld/ChangeLog
ld/testsuite/ld-xtensa/relax-undef-weak-pie-export-dynamic.d [new file with mode: 0644]
ld/testsuite/ld-xtensa/xtensa.exp
This page took 0.028374 seconds and 4 git commands to generate.