]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gas/config/tc-ppc.c
Update year range in copyright notice of binutils files
[thirdparty/binutils-gdb.git] / gas / config / tc-ppc.c
index 1ff1cd9eab2bd1ea1267db2f31edaf1c2a773fd3..95000fd28a9fbaec58a300c0da69d5f7e095e04b 100644 (file)
@@ -1,5 +1,5 @@
 /* tc-ppc.c -- Assemble for the PowerPC or POWER (RS/6000)
-   Copyright (C) 1994-2020 Free Software Foundation, Inc.
+   Copyright (C) 1994-2021 Free Software Foundation, Inc.
    Written by Ian Lance Taylor, Cygnus Support.
 
    This file is part of GAS, the GNU Assembler.
@@ -2464,7 +2464,7 @@ ppc_elf_localentry (int ignore ATTRIBUTE_UNUSED)
       if (ok)
        {
          bfdsym = symbol_get_bfdsym (sym);
-         elfsym = elf_symbol_from (bfd_asymbol_bfd (bfdsym), bfdsym);
+         elfsym = elf_symbol_from (bfdsym);
          gas_assert (elfsym);
          elfsym->internal_elf_sym.st_other &= ~STO_PPC64_LOCAL_MASK;
          elfsym->internal_elf_sym.st_other |= encoded;
@@ -3882,7 +3882,8 @@ md_assemble (char *str)
 
   /* The prefix part of an 8-byte instruction always occupies the lower
      addressed word in a doubleword, regardless of endianness.  */
-  if (!target_big_endian && insn_length == 8)
+  if (insn_length == 8
+      && (sizeof (insn) > sizeof (valueT) || !target_big_endian))
     {
       md_number_to_chars (f, PPC_GET_PREFIX (insn), 4);
       md_number_to_chars (f + 4, PPC_GET_SUFFIX (insn), 4);
@@ -6160,8 +6161,7 @@ ppc_force_relocation (fixS *fix)
       if (fix->fx_addsy)
        {
          asymbol *bfdsym = symbol_get_bfdsym (fix->fx_addsy);
-         elf_symbol_type *elfsym
-           = elf_symbol_from (bfd_asymbol_bfd (bfdsym), bfdsym);
+         elf_symbol_type *elfsym = elf_symbol_from (bfdsym);
          gas_assert (elfsym);
          if ((STO_PPC64_LOCAL_MASK & elfsym->internal_elf_sym.st_other) != 0)
            return 1;
@@ -6197,8 +6197,7 @@ ppc_fix_adjustable (fixS *fix)
       if (fix->fx_addsy)
        {
          asymbol *bfdsym = symbol_get_bfdsym (fix->fx_addsy);
-         elf_symbol_type *elfsym
-           = elf_symbol_from (bfd_asymbol_bfd (bfdsym), bfdsym);
+         elf_symbol_type *elfsym = elf_symbol_from (bfdsym);
          gas_assert (elfsym);
          if ((STO_PPC64_LOCAL_MASK & elfsym->internal_elf_sym.st_other) != 0)
            return 0;