bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug gas/26222] New: Support 64-bit PC relative relocation (R_MIPS_PC64


From: i at maskray dot me
Subject: [Bug gas/26222] New: Support 64-bit PC relative relocation (R_MIPS_PC64 via R_MIPS_PC32/R_MIPS_64/R_MIPS_NONE)
Date: Thu, 09 Jul 2020 05:19:49 +0000

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

            Bug ID: 26222
           Summary: Support 64-bit PC relative relocation  (R_MIPS_PC64
                    via R_MIPS_PC32/R_MIPS_64/R_MIPS_NONE)
           Product: binutils
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: gas
          Assignee: unassigned at sourceware dot org
          Reporter: i at maskray dot me
  Target Milestone: ---

% cat a.s
.globl foo
foo:

.data
.quad foo-.

% mips64el-linux-gnuabi64-as a.s -o a.o
a.s: Assembler messages:
a.s:5: Error: PC-relative reference to a different section

# See https://sourceware.org/pipermail/binutils/2020-February/110231.html
# Since https://reviews.llvm.org/D80390
# will be available in LLVM/clang 11.0.0
% llvm-mc -filetype=obj -triple=mips64el a.s -o a.o
% readelf -Wr a.o

Relocation section '.rela.data' at offset 0xc0 contains 1 entry:
    Offset             Info             Type               Symbol's Value 
Symbol's Name + Addend
0000000000000000  00000001000012f8 R_MIPS_PC32            0000000000000000 foo
+ 0
                    Type2: R_MIPS_64        
                    Type3: R_MIPS_NONE

Having a way to specify 64-bit PC relative relocation will be valuable. I have
seen several places where we have to use SHF_WRITE+R_MIPS_64 due to the lack of
R_MIPS_PC64

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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]