mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-02-17 13:10:12 +08:00
There is no overflow check for the relaxation of pcalau12i+ld.d => pcalau12i+addi.d. For instruction sequences that can be relaxed, they are directly relaxed to pcalau12i+addi.d. However, when the relative distance between the symbol and the pc exceeds the 32-bit range, the symbol value cannot be obtained correctly. Adds an overflow check for the relaxation of pcalau12i+ld.d. If it is found that the relaxation will overflow, it will not be relaxed.
26 lines
280 B
Plaintext
26 lines
280 B
Plaintext
OUTPUT_ARCH(loongarch)
|
|
ENTRY(_start)
|
|
SECTIONS
|
|
{
|
|
PROVIDE (__executable_start = 0x8000);
|
|
. = 0x10000;
|
|
.text :
|
|
{
|
|
*(.text)
|
|
} =0
|
|
. = 0x2000000;
|
|
.got :
|
|
{
|
|
*(.got.plt) *(.got)
|
|
}
|
|
. = 0x82000000;
|
|
.other :
|
|
{
|
|
*(.other)
|
|
}
|
|
/DISCARD/ :
|
|
{
|
|
*(*)
|
|
}
|
|
}
|