]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
LoongArch: Fix the size of tls desc relocations
authormengqinggang <mengqinggang@loongson.cn>
Mon, 6 Jul 2026 00:19:27 +0000 (08:19 +0800)
committermengqinggang <mengqinggang@loongson.cn>
Fri, 10 Jul 2026 01:31:54 +0000 (09:31 +0800)
Change the size of R_LARCH_TLS_DESC64_* from 8 to 4.

bfd/elfxx-loongarch.c

index 11754d62737a4184d2d408d89e4c458c1301ceb1..b39a5c50b8d46dca5b0cdc5a17e534c0597df807 100644 (file)
@@ -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.  */