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

            Bug ID: 28509
           Summary: ld riscv: R_RISCV_JAL referencing a preemptible symbol
                    should be rejected
           Product: binutils
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: ld
          Assignee: unassigned at sourceware dot org
          Reporter: i at maskray dot me
  Target Milestone: ---

j __sigsetjmp

.globl __sigsetjmp
__sigsetjmp:
  ret

riscv64-linux-gnu-as a.s -o a.o
riscv64-linux-gnu-ld -shared a.o -o a.so  # should fail


The default visibility __sigsetjmp definition is preemptible by default when
linking a shared object. Such a symbol cannot be referenced by non-PLT by-GOT.


% riscv64-linux-gnu-objdump -d a.so

a.so:     file format elf64-littleriscv


Disassembly of section .text:

00000000000001b8 <__sigsetjmp-0x4>:
 1b8:   0040006f                j       1bc <__sigsetjmp>

00000000000001bc <__sigsetjmp>:
 1bc:   00008067                ret

On many architectures there is a diagnostic like R_X86_64_PC32.

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

Reply via email to