[PATCH v0 1/4] LoongArch: Fix the size of tls desc relocations

mengqinggang <[email protected]>
Newsgroups gmane.comp.gnu.binutils
Message-ID <[email protected]>
Change the size of R_LARCH_TLS_DESC64_* from 8 to 4.
---
 bfd/elfxx-loongarch.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/bfd/elfxx-loongarch.c b/bfd/elfxx-loongarch.c
index 11754d62737..b39a5c50b8d 100644
--- a/bfd/elfxx-loongarch.c
+++ b/bfd/elfxx-loongarch.c
@@ -1642,7 +1642,7 @@ static loongarch_reloc_howto_type loongarch_howto_table[] =
   /* TLS_DESC64 LARGE PCREL.  */
   LOONGARCH_HOWTO (R_LARCH_TLS_DESC64_PC_LO20, /* type (113).  */
 	32,				       /* rightshift.  */
-	8,				       /* size.  */
+	4,				       /* size.  */
 	20,				       /* bitsize.  */
 	true,				       /* pc_relative.  */
 	5,				       /* bitpos.  */
@@ -1659,7 +1659,7 @@ static loongarch_reloc_howto_type loongarch_howto_table[] =
 
   LOONGARCH_HOWTO (R_LARCH_TLS_DESC64_PC_HI12, /* type (114).  */
 	52,				       /* rightshift.  */
-	8,				       /* size.  */
+	4,				       /* size.  */
 	12,				       /* bitsize.  */
 	true,				       /* pc_relative.  */
 	10,				       /* bitpos.  */
@@ -1712,7 +1712,7 @@ static loongarch_reloc_howto_type loongarch_howto_table[] =
   /* TLS_DESC64 LARGE ABS.  */
   LOONGARCH_HOWTO (R_LARCH_TLS_DESC64_LO20,    /* type (117).  */
 	32,				       /* rightshift.  */
-	8,				       /* size.  */
+	4,				       /* size.  */
 	20,				       /* bitsize.  */
 	false,				       /* pc_relative.  */
 	5,				       /* bitpos.  */
@@ -1729,7 +1729,7 @@ static loongarch_reloc_howto_type loongarch_howto_table[] =
 
   LOONGARCH_HOWTO (R_LARCH_TLS_DESC64_HI12,    /* type (118).  */
 	52,				       /* rightshift.  */
-	8,				       /* size.  */
+	4,				       /* size.  */
 	12,				       /* bitsize.  */
 	false,				       /* pc_relative.  */
 	10,				       /* bitpos.  */
-- 
2.34.1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.