Backport following patches:
- RISC-V: Add shorten_memrefs pass.
- RISC-V: Make unique SECCAT_SRODATA names start with .srodata (not .sdata2)
- RISC-V: Update march parser
- RISC-V: Handle implied extension for -march parser
- Fix alignment for local variable [PR90811]
- RISC-V: Optimize si to di zero-extend followed by left shift.
- RISC-V: Make __divdi3 handle div by zero same as hardware.
- RISC-V: Describe correct USEs for gpr_save pattern [PR95252]
- RISC-V: Unify the output asm pattern between gpr_save and gpr_restore pattern.
This reverts commit b6561b1a6a.
qemu 5.0 using new kernel struct define for rv32, which require latest
glibc, however it's not upstream yet, so I decide delay the update
until rv32 glibc upstream.
This testcase is used to check whether the linker is work normally when both
the --wrap=SYMBOL and -flto are set. It seems that the current fix only can
work when the wrapped symbol `SYMBOL` is defined in the other files and will be
linked. See the pr-24406-1 test, the `read` symbol is defined in the glibc’s
libc.so.6, and we will also link the libc.so.6 by the linux toolchain, so it
works. But the `read` symbol isn’t defined in the newlib, or other linked
objects or archives. Therefore, the pr-24406-1 testsuite is always failed
for riscv elf toolchain, but seems to work for riscv linux toolchain.
On the other hand, if the wrapped symbol is `read_p`, it isn't defined in the
other linked files, so we also get the error link for the linux toolchain.
The fix in upstream seems not complete. I suppose that we shoud just skip the
pr-24406-1 testcase until upstream fix or remove it.