gas: correctly output XCOFF tbss symbols with XTY_CM type.
authorClément Chigot <clement.chigot@atos.net>
Fri, 30 Jul 2021 13:58:40 +0000 (15:58 +0200)
committerClément Chigot <clement.chigot@atos.net>
Wed, 4 Aug 2021 06:54:59 +0000 (08:54 +0200)
Global tbss symbols weren't correctly handled and were generating
a symbol with XTY_SD instead of XTY_CM as expected.

gas/
* config/tc-ppc.c (ppc_frog_symbol): Generate a XTY_CM when
a symbol has a storage class of XMC_UL.

gas/config/tc-ppc.c

index b7567083f662cedcdb1f1a87f8fa077df6112b06..af025af32ffc97a125249f52ceacd1ce2d1fe8a0 100644 (file)
@@ -6001,7 +6001,8 @@ ppc_frob_symbol (symbolS *sym)
              a->x_csect.x_scnlen.l = (S_GET_VALUE (symbol_get_tc (sym)->next)
                                       - S_GET_VALUE (sym));
            }
-         if (symbol_get_tc (sym)->symbol_class == XMC_BS)
+         if (symbol_get_tc (sym)->symbol_class == XMC_BS
+             || symbol_get_tc (sym)->symbol_class == XMC_UL)
            a->x_csect.x_smtyp = (symbol_get_tc (sym)->align << 3) | XTY_CM;
          else
            a->x_csect.x_smtyp = (symbol_get_tc (sym)->align << 3) | XTY_SD;