mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-27 04:52:05 +08:00
235f5ef4a6
the fix for PR22756 only changed behaviour for hidden aliases, but the same situation exists for non-hidden aliases: sym_hashes[] can contain multiple entries pointing to the same symbol structure leading to relaxation adjustment to be applied twice. Fix this by testing for duplicates for everything that looks like it has a version. PR ld/28021 bfd/ * elfnn-riscv.c (riscv_relax_delete_bytes): Check for any versioning. ld/ * testsuite/ld-riscv-elf/relax-twice.ver: New. * testsuite/ld-riscv-elf/relax-twice-1.s: New. * testsuite/ld-riscv-elf/relax-twice-2.s: New. * testsuite/ld-riscv-elf/ld-riscv-elf.exp (run_relax_twice_test): New, and call it.
13 lines
232 B
ArmAsm
13 lines
232 B
ArmAsm
.file "<artificial>"
|
|
.option pic
|
|
.text
|
|
.globl foobar_new
|
|
.weak foobar_new
|
|
.type foobar_new, @function
|
|
foobar_new:
|
|
jr ra
|
|
.size foobar_new, .-foobar_new
|
|
.symver foobar_new, foobar@@New
|
|
|
|
.section .note.GNU-stack,"",@progbits
|