]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
RISC-V: Stop generating mapping symbol $x, replace with $x<isa>.
authorNelson Chu <nelson@rivosinc.com>
Mon, 24 Feb 2025 07:36:53 +0000 (15:36 +0800)
committerNelson Chu <nelson@rivosinc.com>
Mon, 3 Mar 2025 03:25:35 +0000 (11:25 +0800)
commit759b09f492d764edfba15c49d12a6f8adfeda019
treef9104623af4ac7edb881ee3596bfe74549c93534
parent76622597b66d282477a00cb864609e8274b4895a
RISC-V: Stop generating mapping symbol $x, replace with $x<isa>.

The psABI defined $x to the architecture which is same as the file elf
attribute.  But GNU defined it to that is same as the previous $x<isa>,
and always generated $x<isa> at the begining of each section.  That is
because considering two objects have different architecture in their elf
attributes, then $x will always be wrong after linking since the merged
arch string will be changed.  For example, object A with rv32ic and object
B with rv32ia, $x from A is rv32ic and $x from B is rv32ia, but the final
output is rv32ica, so $x from A and B need to be updated to rv32ic and
rv32ia by linker respectively.  I think let linker to do this is not good,
so in order to follow the psABI, we will stop generating the $x for now.
Instead, all $x will be replaced with the corresponding $x<isa>.  The
dis-assembler will also treat $x like what psABI defined.
gas/config/tc-riscv.c
gas/testsuite/gas/riscv/mapping-symbols.d