From b5b05a6e6524778e20fccd6b019e781727659f42 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Wed, 19 Jun 2024 14:04:18 +0800 Subject: LoongArch: TLS IE needs only one dynamic reloc As the comment in the code says, TLS_IE needs only one dynamic reloc. But commit b67a17aa7c0c ("LoongArch: Fix the issue of excessive relocation generated by GD and IE") has incorrectly allocated the space for two dynamic relocs, causing libc.so to contain 8 R_LARCH_NONE. Adjust tlsdesc-dso.d for the offset changes and add two tests to ensure there are no R_LARCH_NONE with TLS. Signed-off-by: Xi Ruoyao --- ld/testsuite/ld-loongarch-elf/tlsdesc-dso-reloc.d | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 ld/testsuite/ld-loongarch-elf/tlsdesc-dso-reloc.d (limited to 'ld/testsuite/ld-loongarch-elf/tlsdesc-dso-reloc.d') diff --git a/ld/testsuite/ld-loongarch-elf/tlsdesc-dso-reloc.d b/ld/testsuite/ld-loongarch-elf/tlsdesc-dso-reloc.d new file mode 100644 index 0000000..d5afa7c --- /dev/null +++ b/ld/testsuite/ld-loongarch-elf/tlsdesc-dso-reloc.d @@ -0,0 +1,9 @@ +#source: tlsdesc-dso.s +#as: +#ld: -shared -z norelro --hash-style=both +#readelf: -Wr + +#failif +#... +.* +R_LARCH_NONE +.* +#... -- cgit v1.1