mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-27 04:52:05 +08:00
2487ef07c2
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.
15 lines
263 B
Makefile
15 lines
263 B
Makefile
#source: relax-undef-weak.s
|
|
#ld: -pie --export-dynamic
|
|
#readelf: -r
|
|
#...
|
|
Relocation section '\.rela\.dyn' .* 3 .*
|
|
#...
|
|
.*R_XTENSA_RTLD.*
|
|
.*R_XTENSA_RTLD.*
|
|
.*R_XTENSA_GLOB_DAT.*fd.*
|
|
#...
|
|
Relocation section '\.rela\.plt' .* 1 .*
|
|
#...
|
|
.*R_XTENSA_JMP_SLOT.*fd.*
|
|
#...
|