https://sourceware.org/bugzilla/show_bug.cgi?id=34258

            Bug ID: 34258
           Summary: [RISC-V] GNU ld.bfd PLT gotplt out of range 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 16767
  --> https://sourceware.org/bugzilla/attachment.cgi?id=16767&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 successfully with no diagnostic, emits
`.rela.plt R_RISCV_JUMP_SLOT ext` at `.got.plt+0x10`, but the synthesized PLT
header and `ext@plt` entry address `0xffffffff90000000` and
`0xffffffff90000010` rather than the real `.got.plt` VMA `0x0000000090000000`
and slot `0x0000000090000010`.
Expected: Link a valid RV64 RISC-V shared object that needs a PLT entry for an
undefined function while a linker script places `.plt` at `0x10000` and
`.got.plt` at `0x90000000`, outside the RV64 AUIPC+load PC-relative range used
by the ordinary PLT sequence.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Reply via email to