aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorXi Ruoyao <xry111@xry111.site>2024-06-30 15:18:24 +0800
committerliuzhensong <liuzhensong@loongson.cn>2024-07-05 12:11:11 +0800
commitd89ecf33ab6dd86290b43dc3751d66f263614e68 (patch)
tree821af070648fc48bc14cd3ebfcf3eb1b70bbe18e /binutils
parent17cae6980b15b96570908cebba29a04ab5e8ea41 (diff)
downloadbinutils-d89ecf33ab6dd86290b43dc3751d66f263614e68.zip
binutils-d89ecf33ab6dd86290b43dc3751d66f263614e68.tar.gz
binutils-d89ecf33ab6dd86290b43dc3751d66f263614e68.tar.bz2
LoongArch: Add DT_RELR support
The logic is same as a71d87680110 ("aarch64: Add DT_RELR support"). As LoongArch does not have -z dynamic-undefined-weak, we don't need to consider UNDEFWEAK_NO_DYNAMIC_RELOC. The linker relaxation adds another layer of complexity. When we delete bytes in a section during relaxation, we need to fix up the offset in the to-be-packed relative relocations against this section. Signed-off-by: Xi Ruoyao <xry111@xry111.site>
Diffstat (limited to 'binutils')
-rw-r--r--binutils/testsuite/lib/binutils-common.exp1
1 files changed, 1 insertions, 0 deletions
diff --git a/binutils/testsuite/lib/binutils-common.exp b/binutils/testsuite/lib/binutils-common.exp
index f013657..ce7413a 100644
--- a/binutils/testsuite/lib/binutils-common.exp
+++ b/binutils/testsuite/lib/binutils-common.exp
@@ -474,6 +474,7 @@ proc supports_dt_relr {} {
|| [istarget i?86-*-*]
|| [istarget powerpc64*-*-*]
|| [istarget aarch64*-*-*])
+ || [istarget loongarch64*-*-*]
&& ([istarget *-*-linux*]
|| [istarget *-*-gnu*]) } {
return 1