https://sourceware.org/bugzilla/show_bug.cgi?id=34244
Bug ID: 34244
Summary: [RISC-V] GNU ld.bfd shared nonpic PCREL HI20 wrong
success
Product: binutils
Version: 2.45
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: ld
Assignee: unassigned at sourceware dot org
Reporter: l784896635 at gmail dot com
Target Milestone: ---
Created attachment 16755
--> https://sourceware.org/bugzilla/attachment.cgi?id=16755&action=edit
Reduced testcase
I reduced this to the attached RISC-V testcase and can reproduce it 3/3 times.
Observed: GNU ld.bfd 2.45 links both RV32 and RV64 shared objects successfully,
leaves `ext` as an undefined dynamic symbol, emits no dynamic relocations, and
rewrites the address materialization into code that computes the DSO load base
(`auipc a0, 0; addi a0, a0, -PC`).
Expected: Link a RISC-V shared object from a non-PIC `AUIPC+ADDI` address
materialization using `R_RISCV_PCREL_HI20`/`R_RISCV_PCREL_LO12_I` against an
external symbol.
--
You are receiving this mail because:
You are on the CC list for the bug.