| Issue |
203471
|
| Summary |
[lld][ELF][RISC-V] Imported undefined variant-CC symbol loses STO_RISCV_VARIANT_CC when resolved by plain DSO
|
| Labels |
lld
|
| Assignees |
|
| Reporter |
Ko496-glitch
|
ld.lld drops `STO_RISCV_VARIANT_CC` when an undefined regular symbol marked
with `.variant_cc` is resolved by a shared library definition that is not marked
variant-CC.
This matters because the output still imports the symbol through the PLT, but
the dynamic symbol no longer carries the variant-CC marking and
`DT_RISCV_VARIANT_CC` is not emitted.
Reproducer:
`main.s`
```asm
.text
.globl main
.type main, @function
main:
call target
ret
variant-decl.s
.text
.globl target
.type target, @function
.variant_cc target
provider.s
.text
.globl target
.type target, @function
target:
ret
Expected result:
The imported dynamic symbol should keep STO_RISCV_VARIANT_CC, and the output
should contain DT_RISCV_VARIANT_CC.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs