bug-binutils
[Top][All Lists]
Advanced

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

[Bug ld/27566] [RISC-V] relocation truncated to fit: R_RISCV_GPREL_I aga


From: lifang_xia at linux dot alibaba.com
Subject: [Bug ld/27566] [RISC-V] relocation truncated to fit: R_RISCV_GPREL_I against aymbol
Date: Sat, 06 May 2023 07:20:41 +0000

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

--- Comment #9 from lifang_xia at linux dot alibaba.com ---
Hi we get this error a again.....
-------------
.text

hello:
        .rept 6000
        lla a0, ARCHOR0
        .endr


.section .rodata
        .set ARCHOR0, . + 4598
        .fill 100, 4, 0x12345678

.data
.align 3
world:
    .rept 860
    .long 0x1000
    .endr
-------------
build command:

binutils/build/gas/as-new -o 1.o 1.s -march=rv32gc -mabi=ilp32d
binutils/build/ld/ld-new -o 1 1.o -e hello -m elf32lriscv

we can get the error message:

1.o: in function `hello':
(.text+0x0): relocation truncated to fit: R_RISCV_GPREL_I against `ARCHOR0'
---------------------------------
It looks like the max alignment should include page size if the symbol is not
defined in the same section of GP.

Any idea about this?

-- 
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]