branch-updates
authorMatthias Klose <doko@debian.org>
Wed, 21 Feb 2024 22:41:40 +0000 (23:41 +0100)
committerMatthias Klose <doko@debian.org>
Wed, 21 Feb 2024 22:41:40 +0000 (23:41 +0100)
# DP: updates from the binutils-2.42 branch

# DP: updates from the binutils-2.42 branch

# git diff c7f28aad0c99d1d2fec4e52ebfa3735d90ceb8e9 303aeec545892bc02ef63a7c8de599853077cf65

Gbp-Pq: Name branch-updates.diff

51 files changed:
bfd/bfd-in2.h
bfd/configure
bfd/development.sh
bfd/doc/chew.c
bfd/doc/proto.str
bfd/elf.c
bfd/elf64-x86-64.c
bfd/libbfd.h
bfd/po/bfd.pot
bfd/reloc.c
bfd/version.h
bfd/version.m4
binutils/README-how-to-make-a-release
binutils/config.in
binutils/configure
binutils/configure.ac
binutils/doc/binutils.texi
binutils/winduni.c
elfcpp/x86_64.h
gas/NEWS
gas/config/tc-i386.c
gas/config/tc-loongarch.c
gas/config/tc-ppc.c
gas/configure
gas/doc/c-ppc.texi
gas/testsuite/gas/i386/oversized16.l
gas/testsuite/gas/i386/oversized64.l
gas/testsuite/gas/i386/x86-64-apx-inval.l [new file with mode: 0644]
gas/testsuite/gas/i386/x86-64-apx-inval.s [new file with mode: 0644]
gas/testsuite/gas/i386/x86-64-gottpoff.d
gas/testsuite/gas/i386/x86-64-gottpoff.s
gas/testsuite/gas/i386/x86-64.exp
gas/testsuite/gas/loongarch/tls_le_r_sym_type.d [new file with mode: 0644]
gas/testsuite/gas/loongarch/tls_le_r_sym_type.s [new file with mode: 0644]
gas/testsuite/gas/scfi/x86_64/ginsn-cofi-1.l [new file with mode: 0644]
gas/testsuite/gas/scfi/x86_64/ginsn-cofi-1.s [new file with mode: 0644]
gold/testsuite/x86_64_ie_to_le.s
gold/testsuite/x86_64_ie_to_le.sh
gold/x86_64.cc
gprof/configure
include/elf/x86-64.h
ld/configure
ld/scripttempl/avr.sc
ld/testsuite/ld-x86-64/tlsbindesc.dd
ld/testsuite/ld-x86-64/tlsbindesc.rd
ld/testsuite/ld-x86-64/tlsbindesc.s
ld/testsuite/ld-x86-64/x86-64.exp
opcodes/configure
opcodes/i386-opc.tbl
opcodes/i386-tbl.h
opcodes/ppc-dis.c

index 581d8fe0b3e14f7267c18436dab6b394c2611cd3..dbafcf8da3684c8e7c860cea689fd86b9aff6c57 100644 (file)
@@ -3894,6 +3894,12 @@ enum bfd_reloc_code_real
   BFD_RELOC_X86_64_CODE_4_GOTPCRELX,
   BFD_RELOC_X86_64_CODE_4_GOTTPOFF,
   BFD_RELOC_X86_64_CODE_4_GOTPC32_TLSDESC,
+  BFD_RELOC_X86_64_CODE_5_GOTPCRELX,
+  BFD_RELOC_X86_64_CODE_5_GOTTPOFF,
+  BFD_RELOC_X86_64_CODE_5_GOTPC32_TLSDESC,
+  BFD_RELOC_X86_64_CODE_6_GOTPCRELX,
+  BFD_RELOC_X86_64_CODE_6_GOTTPOFF,
+  BFD_RELOC_X86_64_CODE_6_GOTPC32_TLSDESC,
 
   /* ns32k relocations.  */
   BFD_RELOC_NS32K_IMM_8,
index 5618c5d3217a3d95d1519decc4accfed4f1e74b7..acbac2f364a73b18e4acb7d3ca1293b557924f00 100755 (executable)
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for bfd 2.42.
+# Generated by GNU Autoconf 2.69 for bfd 2.42.0.
 #
 #
 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -587,8 +587,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='bfd'
 PACKAGE_TARNAME='bfd'
-PACKAGE_VERSION='2.42'
-PACKAGE_STRING='bfd 2.42'
+PACKAGE_VERSION='2.42.0'
+PACKAGE_STRING='bfd 2.42.0'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
@@ -1411,7 +1411,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures bfd 2.42 to adapt to many kinds of systems.
+\`configure' configures bfd 2.42.0 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1482,7 +1482,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of bfd 2.42:";;
+     short | recursive ) echo "Configuration of bfd 2.42.0:";;
    esac
   cat <<\_ACEOF
 
@@ -1627,7 +1627,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-bfd configure 2.42
+bfd configure 2.42.0
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2221,7 +2221,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by bfd $as_me 2.42, which was
+It was created by bfd $as_me 2.42.0, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -3204,7 +3204,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='bfd'
- VERSION='2.42'
+ VERSION='2.42.0'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -18090,7 +18090,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by bfd $as_me 2.42, which was
+This file was extended by bfd $as_me 2.42.0, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -18156,7 +18156,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-bfd config.status 2.42
+bfd config.status 2.42.0
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
index 535d74063b65606c0c20c74a4266e4c72e933836..1112d2ecd2aa7ad3291e02ba90aaacece04748a5 100644 (file)
@@ -16,7 +16,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Controls whether to enable development-mode features by default.
-development=false
+development=true
 
 # Indicate whether this is a release branch.
 experimental=false
index 28c8072c27259492fbe726d6a05dbf37628b0c20..842d4153005ec4d26c78ba49a562db163fb73efb 100644 (file)
@@ -541,8 +541,6 @@ wrap_comment (void)
 
   overwrite_string (tos - 1, &out);
   drop ();
-
-  pc++;
 }
 
 /* Mod tos so that only lines with leading dots remain */
index ee06c31fa7cdbe99561b887fdd06f937c25191dc..9a56397d719eb6d199caf81e14a9308a1bd3201c 100644 (file)
 : SUBSUBSECTION ignore ;
 : INODE ignore ;
 : DESCRIPTION ignore ;
+: DOCDD ignore ;
 : ENDDD EXTERNAL ;
 : FUNCTION EXTERNAL ;
 : INTERNAL_FUNCTION INTERNAL ;
index 88c75ae3ce046000dbcf4b918bad6758a550d435..8bffd3c514183711de5c638141f7aec1a9a0a4c0 100644 (file)
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -5789,7 +5789,7 @@ _bfd_elf_map_sections_to_segments (bfd *abfd,
       elf_seg_map (abfd) = mfirst;
     }
 
-  if (!elf_modify_segment_map (abfd, info, no_user_phdrs))
+  if (!elf_modify_segment_map (abfd, info, no_user_phdrs || info == NULL))
     return false;
 
   for (count = 0, m = elf_seg_map (abfd); m != NULL; m = m->next)
index f1253751bbd2c57cad1f88caaed99a794dfaf846..2ed120af7801647458c554e4cb68b2c9d9338d7b 100644 (file)
@@ -179,12 +179,30 @@ static reloc_howto_type x86_64_elf_howto_table[] =
   HOWTO(R_X86_64_CODE_4_GOTPC32_TLSDESC, 0, 4, 32, true, 0,
        complain_overflow_bitfield, bfd_elf_generic_reloc,
        "R_X86_64_CODE_4_GOTPC32_TLSDESC", false, 0, 0xffffffff, true),
+  HOWTO(R_X86_64_CODE_5_GOTPCRELX, 0, 4, 32, true, 0,
+       complain_overflow_signed, bfd_elf_generic_reloc,
+       "R_X86_64_CODE_5_GOTPCRELX", false, 0, 0xffffffff, true),
+  HOWTO(R_X86_64_CODE_5_GOTTPOFF, 0, 4, 32, true, 0,
+       complain_overflow_signed, bfd_elf_generic_reloc,
+       "R_X86_64_CODE_5_GOTTPOFF", false, 0, 0xffffffff, true),
+  HOWTO(R_X86_64_CODE_5_GOTPC32_TLSDESC, 0, 4, 32, true, 0,
+       complain_overflow_bitfield, bfd_elf_generic_reloc,
+       "R_X86_64_CODE_5_GOTPC32_TLSDESC", false, 0, 0xffffffff, true),
+  HOWTO(R_X86_64_CODE_6_GOTPCRELX, 0, 4, 32, true, 0,
+       complain_overflow_signed, bfd_elf_generic_reloc,
+       "R_X86_64_CODE_6_GOTPCRELX", false, 0, 0xffffffff, true),
+  HOWTO(R_X86_64_CODE_6_GOTTPOFF, 0, 4, 32, true, 0,
+       complain_overflow_signed, bfd_elf_generic_reloc,
+       "R_X86_64_CODE_6_GOTTPOFF", false, 0, 0xffffffff, true),
+  HOWTO(R_X86_64_CODE_6_GOTPC32_TLSDESC, 0, 4, 32, true, 0,
+       complain_overflow_bitfield, bfd_elf_generic_reloc,
+       "R_X86_64_CODE_6_GOTPC32_TLSDESC", false, 0, 0xffffffff, true),
 
   /* We have a gap in the reloc numbers here.
      R_X86_64_standard counts the number up to this point, and
      R_X86_64_vt_offset is the value to subtract from a reloc type of
      R_X86_64_GNU_VT* to form an index into this table.  */
-#define R_X86_64_standard (R_X86_64_CODE_4_GOTPC32_TLSDESC + 1)
+#define R_X86_64_standard (R_X86_64_CODE_6_GOTPC32_TLSDESC + 1)
 #define R_X86_64_vt_offset (R_X86_64_GNU_VTINHERIT - R_X86_64_standard)
 
 /* GNU extension to record C++ vtable hierarchy.  */
@@ -256,6 +274,12 @@ static const struct elf_reloc_map x86_64_reloc_map[] =
   { BFD_RELOC_X86_64_CODE_4_GOTPCRELX, R_X86_64_CODE_4_GOTPCRELX, },
   { BFD_RELOC_X86_64_CODE_4_GOTTPOFF, R_X86_64_CODE_4_GOTTPOFF, },
   { BFD_RELOC_X86_64_CODE_4_GOTPC32_TLSDESC, R_X86_64_CODE_4_GOTPC32_TLSDESC, },
+  { BFD_RELOC_X86_64_CODE_5_GOTPCRELX, R_X86_64_CODE_5_GOTPCRELX, },
+  { BFD_RELOC_X86_64_CODE_5_GOTTPOFF, R_X86_64_CODE_5_GOTTPOFF, },
+  { BFD_RELOC_X86_64_CODE_5_GOTPC32_TLSDESC, R_X86_64_CODE_5_GOTPC32_TLSDESC, },
+  { BFD_RELOC_X86_64_CODE_6_GOTPCRELX, R_X86_64_CODE_6_GOTPCRELX, },
+  { BFD_RELOC_X86_64_CODE_6_GOTTPOFF, R_X86_64_CODE_6_GOTTPOFF, },
+  { BFD_RELOC_X86_64_CODE_6_GOTPC32_TLSDESC, R_X86_64_CODE_6_GOTPC32_TLSDESC, },
   { BFD_RELOC_VTABLE_INHERIT,  R_X86_64_GNU_VTINHERIT, },
   { BFD_RELOC_VTABLE_ENTRY,    R_X86_64_GNU_VTENTRY, },
 };
@@ -1283,6 +1307,23 @@ elf_x86_64_check_tls_transition (bfd *abfd,
 
       goto check_gottpoff;
 
+    case R_X86_64_CODE_6_GOTTPOFF:
+      /* Check transition from IE access model:
+               add %reg1, foo@gottpoff(%rip), %reg2
+               where reg1/reg2 are one of r16 to r31.  */
+
+      if (offset < 6
+         || (offset + 4) > sec->size
+         || contents[offset - 6] != 0x62)
+       return false;
+
+      val = bfd_get_8 (abfd, contents + offset - 2);
+      if (val != 0x01 && val != 0x03)
+       return false;
+
+      val = bfd_get_8 (abfd, contents + offset - 1);
+      return (val & 0xc7) == 5;
+
     case R_X86_64_GOTTPOFF:
       /* Check transition from IE access model:
                mov foo@gottpoff(%rip), %reg
@@ -1417,6 +1458,7 @@ elf_x86_64_tls_transition (struct bfd_link_info *info, bfd *abfd,
     case R_X86_64_TLSDESC_CALL:
     case R_X86_64_GOTTPOFF:
     case R_X86_64_CODE_4_GOTTPOFF:
+    case R_X86_64_CODE_6_GOTTPOFF:
       if (bfd_link_executable (info))
        {
          if (h == NULL)
@@ -1464,6 +1506,8 @@ elf_x86_64_tls_transition (struct bfd_link_info *info, bfd *abfd,
   /* Return TRUE if there is no transition.  */
   if (from_type == to_type
       || (from_type == R_X86_64_CODE_4_GOTTPOFF
+         && to_type == R_X86_64_GOTTPOFF)
+      || (from_type == R_X86_64_CODE_6_GOTTPOFF
          && to_type == R_X86_64_GOTTPOFF))
     return true;
 
@@ -2177,6 +2221,7 @@ elf_x86_64_scan_relocs (bfd *abfd, struct bfd_link_info *info,
 
        case R_X86_64_GOTTPOFF:
        case R_X86_64_CODE_4_GOTTPOFF:
+       case R_X86_64_CODE_6_GOTTPOFF:
          if (!bfd_link_executable (info))
            info->flags |= DF_STATIC_TLS;
          /* Fall through */
@@ -2214,6 +2259,7 @@ elf_x86_64_scan_relocs (bfd *abfd, struct bfd_link_info *info,
                break;
              case R_X86_64_GOTTPOFF:
              case R_X86_64_CODE_4_GOTTPOFF:
+             case R_X86_64_CODE_6_GOTTPOFF:
                tls_type = GOT_TLS_IE;
                break;
              case R_X86_64_GOTPC32_TLSDESC:
@@ -2503,6 +2549,26 @@ elf_x86_64_scan_relocs (bfd *abfd, struct bfd_link_info *info,
            }
          break;
 
+       case R_X86_64_CODE_5_GOTPCRELX:
+       case R_X86_64_CODE_5_GOTTPOFF:
+       case R_X86_64_CODE_5_GOTPC32_TLSDESC:
+       case R_X86_64_CODE_6_GOTPCRELX:
+       case R_X86_64_CODE_6_GOTPC32_TLSDESC:
+           {
+             /* These relocations are added only for completeness and
+                aren't be used.  */
+             if (h)
+               name = h->root.root.string;
+             else
+               name = bfd_elf_sym_name (abfd, symtab_hdr, isym,
+                                        NULL);
+             _bfd_error_handler
+               /* xgettext:c-format */
+               (_("%pB: unsupported relocation %s against symbol `%s'"),
+                abfd, x86_64_elf_howto_table[r_type].name, name);
+           }
+         break;
+
          /* This relocation describes the C++ object vtable hierarchy.
             Reconstruct it for later use during GC.  */
        case R_X86_64_GNU_VTINHERIT:
@@ -3570,6 +3636,7 @@ elf_x86_64_relocate_section (bfd *output_bfd,
        case R_X86_64_TLSDESC_CALL:
        case R_X86_64_GOTTPOFF:
        case R_X86_64_CODE_4_GOTTPOFF:
+       case R_X86_64_CODE_6_GOTTPOFF:
          tls_type = GOT_UNKNOWN;
          if (h == NULL && local_got_offsets)
            tls_type = elf_x86_local_got_tls_type (input_bfd) [r_symndx];
@@ -3920,6 +3987,50 @@ elf_x86_64_relocate_section (bfd *output_bfd,
                              contents + roff);
                  continue;
                }
+             else if (r_type == R_X86_64_CODE_6_GOTTPOFF)
+               {
+                 /* IE->LE transition:
+                    Originally it is
+                    add %reg1, foo@gottpoff(%rip), %reg2
+                    or
+                    add foo@gottpoff(%rip), %reg1, %reg2
+                    We change it into:
+                    add $foo@tpoff, %reg1, %reg2
+                  */
+                 unsigned int reg, byte1;
+                 unsigned int updated_byte1;
+
+                 if (roff < 6)
+                   goto corrupt_input;
+
+                 /* Move the R bits to the B bits in EVEX payload
+                    byte 1.  */
+                 byte1 = bfd_get_8 (input_bfd, contents + roff - 5);
+                 updated_byte1 = byte1;
+
+                 /* Set the R bits since they is inverted.  */
+                 updated_byte1 |= 1 << 7 | 1 << 4;
+
+                 /* Update the B bits from the R bits.  */
+                 if ((byte1 & (1 << 7)) == 0)
+                   updated_byte1 &= ~(1 << 5);
+                 if ((byte1 & (1 << 4)) == 0)
+                   updated_byte1 |= 1 << 3;
+
+                 reg = bfd_get_8 (input_bfd, contents + roff - 1);
+                 reg >>= 3;
+
+                 bfd_put_8 (output_bfd, updated_byte1,
+                            contents + roff - 5);
+                 bfd_put_8 (output_bfd, 0x81,
+                            contents + roff - 2);
+                 bfd_put_8 (output_bfd, 0xc0 | reg,
+                            contents + roff - 1);
+                 bfd_put_32 (output_bfd,
+                             elf_x86_64_tpoff (info, relocation),
+                             contents + roff);
+                 continue;
+               }
              else
                BFD_ASSERT (false);
            }
index ebd4f24149b05a78fad38670bf9f6a295b451474..40bbe6a3886aa8b5d792b325e20ba0c1259f4c37 100644 (file)
@@ -1463,6 +1463,12 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
   "BFD_RELOC_X86_64_CODE_4_GOTPCRELX",
   "BFD_RELOC_X86_64_CODE_4_GOTTPOFF",
   "BFD_RELOC_X86_64_CODE_4_GOTPC32_TLSDESC",
+  "BFD_RELOC_X86_64_CODE_5_GOTPCRELX",
+  "BFD_RELOC_X86_64_CODE_5_GOTTPOFF",
+  "BFD_RELOC_X86_64_CODE_5_GOTPC32_TLSDESC",
+  "BFD_RELOC_X86_64_CODE_6_GOTPCRELX",
+  "BFD_RELOC_X86_64_CODE_6_GOTTPOFF",
+  "BFD_RELOC_X86_64_CODE_6_GOTPC32_TLSDESC",
   "BFD_RELOC_NS32K_IMM_8",
   "BFD_RELOC_NS32K_IMM_16",
   "BFD_RELOC_NS32K_IMM_32",
index 0a05b63df5348516fba66035ff26d269ca5ac15f..a8eddc272201d08cbd130ddc2a7eba0548e05d5c 100644 (file)
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: https://sourceware.org/bugzilla/\n"
-"POT-Creation-Date: 2024-01-29 14:43+0000\n"
+"POT-Creation-Date: 2024-01-29 15:59+0000\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
index e74cbd75e96d32f3423445ffd112f3ffd4ae95b7..7583b7fd5525d8271fc3a7f7772876388c599543 100644 (file)
@@ -2481,6 +2481,18 @@ ENUMX
   BFD_RELOC_X86_64_CODE_4_GOTTPOFF
 ENUMX
   BFD_RELOC_X86_64_CODE_4_GOTPC32_TLSDESC
+ENUMX
+  BFD_RELOC_X86_64_CODE_5_GOTPCRELX
+ENUMX
+  BFD_RELOC_X86_64_CODE_5_GOTTPOFF
+ENUMX
+  BFD_RELOC_X86_64_CODE_5_GOTPC32_TLSDESC
+ENUMX
+  BFD_RELOC_X86_64_CODE_6_GOTPCRELX
+ENUMX
+  BFD_RELOC_X86_64_CODE_6_GOTTPOFF
+ENUMX
+  BFD_RELOC_X86_64_CODE_6_GOTPC32_TLSDESC
 ENUMDOC
   x86-64/elf relocations.
 
index 1cac0616e30f126ec2ef250a2289259aba16f1c4..2c4718f6f245af1cc58ac1aa1c58b7c49512854b 100644 (file)
@@ -16,7 +16,7 @@
 
    In releases, the date is not included in either version strings or
    sonames.  */
-#define BFD_VERSION_DATE 20240129
+#define BFD_VERSION_DATE 20240221
 #define BFD_VERSION @bfd_version@
 #define BFD_VERSION_STRING  @bfd_version_package@ @bfd_version_string@
 #define REPORT_BUGS_TO @report_bugs_to@
index c7def01a11f7760c0731ec65ae48cded620ec01b..19045f7f8e427c6272da01a06f51203cd4b833a1 100644 (file)
@@ -1 +1 @@
-m4_define([BFD_VERSION], [2.42])
+m4_define([BFD_VERSION], [2.42.0])
index bdda9e48d81def2ecebb006fd7adaf9a0bb433fa..674cba2f59cac0f756d46e9d2725547d5735ce36 100644 (file)
@@ -340,7 +340,7 @@ How to create the release.
         make install-gas install-gold install-ld install-binutils install-gprofng
 
         # Needed for step 29...
-       make html pdf html-libctf pdf-libctf html-libsframe pdf-libsframe
+       make html pdf html-libctf pdf-libctf html-libsframe pdf-libsframe#
 
         popd
 
@@ -349,7 +349,7 @@ How to create the release.
        enter a tag message such as: "Official GNU Binutils 2.4x release"
 
            git tag -a <TAG>         -u <Your Key>
-           git tag -a binutils-2_42 -u DD9E3C4F      <=== Be careful to get the tag right
+           git tag -a binutils-2_42 -u DD9E3C4F -m "Official GNU Binutils 2.4x release"       <=== Be careful to get the tag right
 
         NB/ If you do sign the binaries make sure to use a key
        that has been published with the FSF.
index a9a9f71b31ff581ba5c9b6653e3de903be5897a6..ee148c756f45c7e95fdf031231d8a516d84cf97a 100644 (file)
@@ -7,6 +7,9 @@
 #endif
 #define __CONFIG_H__ 1
 
+/* Define if building universal (internal helper macro) */
+#undef AC_APPLE_UNIVERSAL_BUILD
+
 /* Should ar and ranlib use -D behavior by default? */
 #undef DEFAULT_AR_DETERMINISTIC
 
 /* Version number of package */
 #undef VERSION
 
+/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
+   significant byte first (like Motorola and SPARC, unlike Intel). */
+#if defined AC_APPLE_UNIVERSAL_BUILD
+# if defined __BIG_ENDIAN__
+#  define WORDS_BIGENDIAN 1
+# endif
+#else
+# ifndef WORDS_BIGENDIAN
+#  undef WORDS_BIGENDIAN
+# endif
+#endif
+
 /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
    `char[]'. */
 #undef YYTEXT_POINTER
index 94a0d4a177e5024ed4dddf886bd50b1ec74c6be5..a1092735311731b1ff45a2342945b5c72d2bfe68 100755 (executable)
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for binutils 2.42.
+# Generated by GNU Autoconf 2.69 for binutils 2.42.0.
 #
 #
 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -587,8 +587,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='binutils'
 PACKAGE_TARNAME='binutils'
-PACKAGE_VERSION='2.42'
-PACKAGE_STRING='binutils 2.42'
+PACKAGE_VERSION='2.42.0'
+PACKAGE_STRING='binutils 2.42.0'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
@@ -1407,7 +1407,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures binutils 2.42 to adapt to many kinds of systems.
+\`configure' configures binutils 2.42.0 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1478,7 +1478,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of binutils 2.42:";;
+     short | recursive ) echo "Configuration of binutils 2.42.0:";;
    esac
   cat <<\_ACEOF
 
@@ -1640,7 +1640,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-binutils configure 2.42
+binutils configure 2.42.0
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2108,7 +2108,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by binutils $as_me 2.42, which was
+It was created by binutils $as_me 2.42.0, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -3091,7 +3091,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='binutils'
- VERSION='2.42'
+ VERSION='2.42.0'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -4725,6 +4725,231 @@ $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
 
 
 
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
+$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
+if ${ac_cv_c_bigendian+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_c_bigendian=unknown
+    # See if we're dealing with a universal compiler.
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifndef __APPLE_CC__
+              not a universal capable compiler
+            #endif
+            typedef int dummy;
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+       # Check for potential -arch flags.  It is not universal unless
+       # there are at least two -arch flags with different values.
+       ac_arch=
+       ac_prev=
+       for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
+        if test -n "$ac_prev"; then
+          case $ac_word in
+            i?86 | x86_64 | ppc | ppc64)
+              if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
+                ac_arch=$ac_word
+              else
+                ac_cv_c_bigendian=universal
+                break
+              fi
+              ;;
+          esac
+          ac_prev=
+        elif test "x$ac_word" = "x-arch"; then
+          ac_prev=arch
+        fi
+       done
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    if test $ac_cv_c_bigendian = unknown; then
+      # See if sys/param.h defines the BYTE_ORDER macro.
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+            #include <sys/param.h>
+
+int
+main ()
+{
+#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
+                    && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
+                    && LITTLE_ENDIAN)
+             bogus endian macros
+            #endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  # It does; now see whether it defined to BIG_ENDIAN or not.
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+               #include <sys/param.h>
+
+int
+main ()
+{
+#if BYTE_ORDER != BIG_ENDIAN
+                not big endian
+               #endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_c_bigendian=yes
+else
+  ac_cv_c_bigendian=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    fi
+    if test $ac_cv_c_bigendian = unknown; then
+      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <limits.h>
+
+int
+main ()
+{
+#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
+             bogus endian macros
+            #endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  # It does; now see whether it defined to _BIG_ENDIAN or not.
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <limits.h>
+
+int
+main ()
+{
+#ifndef _BIG_ENDIAN
+                not big endian
+               #endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_c_bigendian=yes
+else
+  ac_cv_c_bigendian=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    fi
+    if test $ac_cv_c_bigendian = unknown; then
+      # Compile a test program.
+      if test "$cross_compiling" = yes; then :
+  # Try to guess by grepping values from an object file.
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+short int ascii_mm[] =
+                 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
+               short int ascii_ii[] =
+                 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
+               int use_ascii (int i) {
+                 return ascii_mm[i] + ascii_ii[i];
+               }
+               short int ebcdic_ii[] =
+                 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
+               short int ebcdic_mm[] =
+                 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
+               int use_ebcdic (int i) {
+                 return ebcdic_mm[i] + ebcdic_ii[i];
+               }
+               extern int foo;
+
+int
+main ()
+{
+return use_ascii (foo) == use_ebcdic (foo);
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
+             ac_cv_c_bigendian=yes
+           fi
+           if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
+             if test "$ac_cv_c_bigendian" = unknown; then
+               ac_cv_c_bigendian=no
+             else
+               # finding both strings is unlikely to happen, but who knows?
+               ac_cv_c_bigendian=unknown
+             fi
+           fi
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+
+            /* Are we little or big endian?  From Harbison&Steele.  */
+            union
+            {
+              long int l;
+              char c[sizeof (long int)];
+            } u;
+            u.l = 1;
+            return u.c[sizeof (long int) - 1] == 1;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  ac_cv_c_bigendian=no
+else
+  ac_cv_c_bigendian=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+    fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
+$as_echo "$ac_cv_c_bigendian" >&6; }
+ case $ac_cv_c_bigendian in #(
+   yes)
+     $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
+;; #(
+   no)
+      ;; #(
+   universal)
+
+$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
+
+     ;; #(
+   *)
+     as_fn_error $? "unknown endianness
+ presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
+ esac
+
+
 case `pwd` in
   *\ * | *\    *)
     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
@@ -10858,7 +11083,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 10861 "configure"
+#line 11086 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -10964,7 +11189,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 10967 "configure"
+#line 11192 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -16532,6 +16757,7 @@ if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
   as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+
 if test -z "${ENABLE_LIBCTF_TRUE}" && test -z "${ENABLE_LIBCTF_FALSE}"; then
   as_fn_error $? "conditional \"ENABLE_LIBCTF\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -16941,7 +17167,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by binutils $as_me 2.42, which was
+This file was extended by binutils $as_me 2.42.0, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -17007,7 +17233,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-binutils config.status 2.42
+binutils config.status 2.42.0
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
index b03e36c9e0ecc07f19a313d09a9cf370d1f919bf..dac72c1bdd4de6a248ef19dbd16a916d750d3049 100644 (file)
@@ -31,6 +31,8 @@ AC_PROG_CC
 AC_GNU_SOURCE
 AC_USE_SYSTEM_EXTENSIONS
 
+AC_C_BIGENDIAN
+
 LT_INIT
 ACX_LARGEFILE
 
index e0028ee0169a51538aedb9d7711faf1701a2ea59..50cc4707e143b31445cfa4a527a12bf5698a5460 100644 (file)
@@ -2662,11 +2662,12 @@ rather than @code{li}.  All of the @option{-m} arguments for
 @option{e300}, @option{e500}, @option{e500mc}, @option{e500mc64},
 @option{e500x2}, @option{e5500}, @option{e6500}, @option{efs},
 @option{power4}, @option{power5}, @option{power6}, @option{power7},
-@option{power8}, @option{power9}, @option{power10}, @option{ppc},
-@option{ppc32}, @option{ppc64}, @option{ppc64bridge}, @option{ppcps},
-@option{pwr}, @option{pwr2}, @option{pwr4}, @option{pwr5}, @option{pwr5x},
-@option{pwr6}, @option{pwr7}, @option{pwr8}, @option{pwr9}, @option{pwr10},
-@option{pwrx}, @option{titan}, @option{vle}, and @option{future}.
+@option{power8}, @option{power9}, @option{power10}, @option{power11},
+@option{ppc}, @option{ppc32}, @option{ppc64}, @option{ppc64bridge},
+@option{ppcps}, @option{pwr}, @option{pwr2}, @option{pwr4}, @option{pwr5},
+@option{pwr5x}, @option{pwr6}, @option{pwr7}, @option{pwr8}, @option{pwr9},
+@option{pwr10}, @option{pwr11}, @option{pwrx}, @option{titan}, @option{vle},
+and @option{future}.
 @option{32} and @option{64} modify the default or a prior CPU
 selection, disabling and enabling 64-bit insns respectively.  In
 addition, @option{altivec}, @option{any}, @option{lsp}, @option{htm},
index 5b659764948a5238a82bb24c9802e9d02a78b3ee..f19de4f8cb3928ce206a7d6f28f2a633e5bb0ff4 100644 (file)
@@ -771,7 +771,13 @@ wind_MultiByteToWideChar (rc_uint_type cp, const char *mb,
 
   if (!mb || !iconv_name)
     return 0;
-  iconv_t cd = iconv_open ("UTF-16LE", iconv_name);
+  iconv_t cd = iconv_open (
+#if WORDS_BIGENDIAN
+                          "UTF-16BE",
+#else
+                          "UTF-16LE",
+#endif
+                          iconv_name);
 
   while (1)
     {
@@ -844,7 +850,13 @@ wind_WideCharToMultiByte (rc_uint_type cp, const unichar *u, char *mb, rc_uint_t
 
   if (!u || !iconv_name)
     return 0;
-  iconv_t cd = iconv_open (iconv_name, "UTF-16LE");
+  iconv_t cd = iconv_open (iconv_name,
+#if WORDS_BIGENDIAN
+                          "UTF-16BE"
+#else
+                          "UTF-16LE"
+#endif
+                          );
 
   while (1)
     {
index 135f339fccf6caaa667b50a715aba62dd5cec381..5d254ce483b2b80047219fd2999bbb00c37f83e9 100644 (file)
@@ -110,6 +110,30 @@ enum
                                        // descriptor in GOT if the
                                        // instruction starts at 4 bytes
                                        // before the relocation offset.
+  R_X86_64_CODE_5_GOTPCRELX = 46, // 32 bit signed PC relative offset to
+                                 // GOT if the instruction starts at 5
+                                 // bytes before the relocation offset,
+                                 // relaxable.
+  R_X86_64_CODE_5_GOTTPOFF = 47,  // 32 bit signed PC relative offset to
+                                 // GOT entry for IE symbol if the
+                                 // instruction starts at 5 bytes before
+                                 // the relocation offset.
+  R_X86_64_CODE_5_GOTPC32_TLSDESC = 48, // 32-bit PC relative to TLS
+                                       // descriptor in GOT if the
+                                       // instruction starts at 5 bytes
+                                       // before the relocation offset.
+  R_X86_64_CODE_6_GOTPCRELX = 49, // 32 bit signed PC relative offset to
+                                 // GOT if the instruction starts at 6
+                                 // bytes before the relocation offset,
+                                 // relaxable.
+  R_X86_64_CODE_6_GOTTPOFF = 50,  // 32 bit signed PC relative offset to
+                                 // GOT entry for IE symbol if the
+                                 // instruction starts at 6 bytes before
+                                 // the relocation offset.
+  R_X86_64_CODE_6_GOTPC32_TLSDESC = 51, // 32-bit PC relative to TLS
+                                       // descriptor in GOT if the
+                                       // instruction starts at 6 bytes
+                                       // before the relocation offset.
   // GNU vtable garbage collection extensions.
   R_X86_64_GNU_VTINHERIT = 250,
   R_X86_64_GNU_VTENTRY = 251
index f19fd471c22dd44a8b05ad25de2973092ccaa9b7..67d806cbf89e07ea5507968086e84934649dfec6 100644 (file)
--- a/gas/NEWS
+++ b/gas/NEWS
@@ -2,6 +2,8 @@
 
 Changes in 2.42:
 
+* Added support for AMD znver5 processor (available from GNU Binutils 2.42 release).
+
 * Add support for the AArch64 Scalable Vector Extension version 2.1 (SVE2.1).
 
 * Add support for the AArch64 Scalable Matrix Extension version 2.1 (SME2.1).
index 51166ef3f027b12292d82cea9617c921d793531e..769a02fc691a697c042f62db1f588b1071569651 100644 (file)
@@ -3641,6 +3641,7 @@ tc_i386_fix_adjustable (fixS *fixP)
       || fixP->fx_r_type == BFD_RELOC_X86_64_DTPOFF64
       || fixP->fx_r_type == BFD_RELOC_X86_64_GOTTPOFF
       || fixP->fx_r_type == BFD_RELOC_X86_64_CODE_4_GOTTPOFF
+      || fixP->fx_r_type == BFD_RELOC_X86_64_CODE_6_GOTTPOFF
       || fixP->fx_r_type == BFD_RELOC_X86_64_TPOFF32
       || fixP->fx_r_type == BFD_RELOC_X86_64_TPOFF64
       || fixP->fx_r_type == BFD_RELOC_X86_64_GOTOFF64
@@ -6761,10 +6762,19 @@ md_assemble (char *line)
       for (j = i.imm_operands; j < i.operands; ++j)
        switch (i.reloc[j])
          {
+         case BFD_RELOC_X86_64_GOTTPOFF:
+           if (i.tm.mnem_off == MN_add
+               && i.tm.opcode_space == SPACE_EVEXMAP4
+               && i.mem_operands == 1
+               && i.base_reg
+               && i.base_reg->reg_num == RegIP
+               && i.tm.operand_types[0].bitfield.class == Reg
+               && i.tm.operand_types[2].bitfield.class == Reg)
+             /* Allow APX: add %reg1, foo@gottpoff(%rip), %reg2.  */
+             break;
+           /* Fall through.  */
          case BFD_RELOC_386_TLS_GOTIE:
          case BFD_RELOC_386_TLS_LE_32:
-         case BFD_RELOC_X86_64_GOTTPOFF:
-         case BFD_RELOC_X86_64_CODE_4_GOTTPOFF:
          case BFD_RELOC_X86_64_TLSLD:
            as_bad (_("TLS relocation cannot be used with `%s'"), insn_name (&i.tm));
            return;
@@ -11759,8 +11769,8 @@ output_insn (const struct last_insn *last_insn)
        {
          j = encoding_length (insn_start_frag, insn_start_off, frag_more (0));
          if (j > 15)
-           as_warn (_("instruction length of %u bytes exceeds the limit of 15"),
-                    j);
+           as_bad (_("instruction length of %u bytes exceeds the limit of 15"),
+                   j);
          else if (fragP)
            {
              /* NB: Don't add prefix with GOTPC relocation since
@@ -11990,6 +12000,7 @@ output_disp (fragS *insn_start_frag, offsetT insn_start_off)
                    case BFD_RELOC_X86_64_TLSLD:
                    case BFD_RELOC_X86_64_GOTTPOFF:
                    case BFD_RELOC_X86_64_CODE_4_GOTTPOFF:
+                   case BFD_RELOC_X86_64_CODE_6_GOTTPOFF:
                    case BFD_RELOC_X86_64_GOTPC32_TLSDESC:
                    case BFD_RELOC_X86_64_CODE_4_GOTPC32_TLSDESC:
                    case BFD_RELOC_X86_64_TLSDESC_CALL:
@@ -12006,9 +12017,30 @@ output_disp (fragS *insn_start_frag, offsetT insn_start_off)
                  && !i.prefix[ADDR_PREFIX])
                fixP->fx_signed = 1;
 
-             /* Set fx_tcbit3 for REX2 prefix.  */
-             if (is_apx_rex2_encoding ())
-               fixP->fx_tcbit3 = 1;
+             if (reloc_type == BFD_RELOC_X86_64_GOTTPOFF
+                 && i.tm.opcode_space == SPACE_EVEXMAP4)
+               {
+                 /* Only "add %reg1, foo@gottpoff(%rip), %reg2" is
+                    allowed in md_assemble.  Set fx_tcbit2 for EVEX
+                    prefix.  */
+                 fixP->fx_tcbit2 = 1;
+                 continue;
+               }
+
+             if (i.base_reg && i.base_reg->reg_num == RegIP)
+               {
+                 if (reloc_type == BFD_RELOC_X86_64_GOTPC32_TLSDESC)
+                   {
+                     /* Set fx_tcbit for REX2 prefix.  */
+                     if (is_apx_rex2_encoding ())
+                       fixP->fx_tcbit = 1;
+                     continue;
+                   }
+               }
+             /* In 64-bit, i386_validate_fix updates only (%rip)
+                relocations.  */
+             else if (object_64bit)
+               continue;
 
              /* Check for "call/jmp *mem", "mov mem, %reg",
                 "test %reg, mem" and "binop mem, %reg" where binop
@@ -12033,10 +12065,22 @@ output_disp (fragS *insn_start_frag, offsetT insn_start_off)
                {
                  if (object_64bit)
                    {
-                     fixP->fx_tcbit = i.rex != 0;
-                     if (i.base_reg
-                         && (i.base_reg->reg_num == RegIP))
-                     fixP->fx_tcbit2 = 1;
+                     if (reloc_type == BFD_RELOC_X86_64_GOTTPOFF)
+                       {
+                         /* Set fx_tcbit for REX2 prefix.  */
+                         if (is_apx_rex2_encoding ())
+                           fixP->fx_tcbit = 1;
+                       }
+                     else
+                       {
+                         /* Set fx_tcbit3 for REX2 prefix.  */
+                         if (is_apx_rex2_encoding ())
+                           fixP->fx_tcbit3 = 1;
+                         else if (i.rex)
+                           fixP->fx_tcbit2 = 1;
+                         else
+                           fixP->fx_tcbit = 1;
+                       }
                    }
                  else
                    fixP->fx_tcbit2 = 1;
@@ -15513,6 +15557,7 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED)
       case BFD_RELOC_X86_64_TLSLD:
       case BFD_RELOC_X86_64_GOTTPOFF:
       case BFD_RELOC_X86_64_CODE_4_GOTTPOFF:
+      case BFD_RELOC_X86_64_CODE_6_GOTTPOFF:
       case BFD_RELOC_X86_64_GOTPC32_TLSDESC:
       case BFD_RELOC_X86_64_CODE_4_GOTPC32_TLSDESC:
        value = 0; /* Fully resolved at runtime.  No addend.  */
@@ -16753,7 +16798,7 @@ md_show_usage (FILE *stream)
   -muse-unaligned-vector-move\n\
                           encode aligned vector move as unaligned vector move\n"));
   fprintf (stream, _("\
-  -msse-check=[none|error|warning] (default: warning)\n\
+  -msse-check=[none|error|warning] (default: none)\n\
                           check SSE instructions\n"));
   fprintf (stream, _("\
   -moperand-check=[none|error|warning] (default: warning)\n\
@@ -17093,13 +17138,27 @@ i386_validate_fix (fixS *fixp)
           && (!S_IS_DEFINED (fixp->fx_addsy)
               || S_IS_EXTERNAL (fixp->fx_addsy));
 
-  if (fixp->fx_tcbit3)
+  /* BFD_RELOC_X86_64_GOTTPOFF:
+      1. fx_tcbit -> BFD_RELOC_X86_64_CODE_4_GOTTPOFF
+      2. fx_tcbit2 -> BFD_RELOC_X86_64_CODE_6_GOTTPOFF
+    BFD_RELOC_X86_64_GOTPC32_TLSDESC:
+      1. fx_tcbit -> BFD_RELOC_X86_64_CODE_4_GOTPC32_TLSDESC
+    BFD_RELOC_32_PCREL:
+      1. fx_tcbit -> BFD_RELOC_X86_64_GOTPCRELX
+      2. fx_tcbit2 -> BFD_RELOC_X86_64_REX_GOTPCRELX
+      3. fx_tcbit3 -> BFD_RELOC_X86_64_CODE_4_GOTPCRELX
+      4. else -> BFD_RELOC_X86_64_GOTPCREL
+   */
+  if (fixp->fx_r_type == BFD_RELOC_X86_64_GOTTPOFF)
     {
-      if (fixp->fx_r_type == BFD_RELOC_X86_64_GOTTPOFF)
+      if (fixp->fx_tcbit)
        fixp->fx_r_type = BFD_RELOC_X86_64_CODE_4_GOTTPOFF;
-      else if (fixp->fx_r_type == BFD_RELOC_X86_64_GOTPC32_TLSDESC)
-       fixp->fx_r_type = BFD_RELOC_X86_64_CODE_4_GOTPC32_TLSDESC;
+      else if (fixp->fx_tcbit2)
+       fixp->fx_r_type = BFD_RELOC_X86_64_CODE_6_GOTTPOFF;
     }
+  else if (fixp->fx_r_type == BFD_RELOC_X86_64_GOTPC32_TLSDESC
+          && fixp->fx_tcbit)
+    fixp->fx_r_type = BFD_RELOC_X86_64_CODE_4_GOTPC32_TLSDESC;
 #endif
 
   if (fixp->fx_subsy)
@@ -17111,15 +17170,12 @@ i386_validate_fix (fixS *fixp)
              if (!object_64bit)
                abort ();
 #if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
-             if (fixp->fx_tcbit2)
-               {
-                 if (fixp->fx_tcbit3)
-                   fixp->fx_r_type = BFD_RELOC_X86_64_CODE_4_GOTPCRELX;
-                 else
-                   fixp->fx_r_type = (fixp->fx_tcbit
-                                      ? BFD_RELOC_X86_64_REX_GOTPCRELX
-                                      : BFD_RELOC_X86_64_GOTPCRELX);
-               }
+             if (fixp->fx_tcbit)
+               fixp->fx_r_type = BFD_RELOC_X86_64_GOTPCRELX;
+             else if (fixp->fx_tcbit2)
+               fixp->fx_r_type = BFD_RELOC_X86_64_REX_GOTPCRELX;
+             else if (fixp->fx_tcbit3)
+               fixp->fx_r_type = BFD_RELOC_X86_64_CODE_4_GOTPCRELX;
              else
 #endif
                fixp->fx_r_type = BFD_RELOC_X86_64_GOTPCREL;
@@ -17245,6 +17301,7 @@ tc_gen_reloc (asection *section ATTRIBUTE_UNUSED, fixS *fixp)
     case BFD_RELOC_X86_64_DTPOFF64:
     case BFD_RELOC_X86_64_GOTTPOFF:
     case BFD_RELOC_X86_64_CODE_4_GOTTPOFF:
+    case BFD_RELOC_X86_64_CODE_6_GOTTPOFF:
     case BFD_RELOC_X86_64_TPOFF32:
     case BFD_RELOC_X86_64_TPOFF64:
     case BFD_RELOC_X86_64_GOTOFF64:
@@ -17389,6 +17446,7 @@ tc_gen_reloc (asection *section ATTRIBUTE_UNUSED, fixS *fixp)
          case BFD_RELOC_X86_64_TLSLD:
          case BFD_RELOC_X86_64_GOTTPOFF:
          case BFD_RELOC_X86_64_CODE_4_GOTTPOFF:
+         case BFD_RELOC_X86_64_CODE_6_GOTTPOFF:
          case BFD_RELOC_X86_64_GOTPC32_TLSDESC:
          case BFD_RELOC_X86_64_CODE_4_GOTPC32_TLSDESC:
          case BFD_RELOC_X86_64_TLSDESC_CALL:
index af4426bff94ee8f0c9bd4c80115231dc25d5fd57..d52e5d2e47a77a281ba52626f62968725d00a337 100644 (file)
@@ -1353,6 +1353,9 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED)
     case BFD_RELOC_LARCH_TLS_DESC_LO12:
     case BFD_RELOC_LARCH_TLS_DESC64_LO20:
     case BFD_RELOC_LARCH_TLS_DESC64_HI12:
+    case BFD_RELOC_LARCH_TLS_LE_ADD_R:
+    case BFD_RELOC_LARCH_TLS_LE_HI20_R:
+    case BFD_RELOC_LARCH_TLS_LE_LO12_R:
       /* Add tls lo (got_lo reloc type).  */
       if (fixP->fx_addsy == NULL)
        as_bad_where (fixP->fx_file, fixP->fx_line,
index 2e92d14ca85ae577d42855ba6d94bfa6e88dbe17..8c00d01f6f289226b459ad1a48ecabc12efa291c 100644 (file)
@@ -1392,6 +1392,8 @@ PowerPC options:\n"));
   fprintf (stream, _("\
 -mpower10, -mpwr10      generate code for Power10 architecture\n"));
   fprintf (stream, _("\
+-mpower11, -mpwr11      generate code for Power11 architecture\n"));
+  fprintf (stream, _("\
 -mlibresoc              generate code for Libre-SOC architecture\n"));
   fprintf (stream, _("\
 -mfuture                generate code for 'future' architecture\n"));
index 0bcb1611f4a89987f1945c7575ef7b1454931afb..5f8c849358959f07e4249c208cfb5711c82bfaeb 100755 (executable)
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for gas 2.42.
+# Generated by GNU Autoconf 2.69 for gas 2.42.0.
 #
 #
 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -587,8 +587,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='gas'
 PACKAGE_TARNAME='gas'
-PACKAGE_VERSION='2.42'
-PACKAGE_STRING='gas 2.42'
+PACKAGE_VERSION='2.42.0'
+PACKAGE_STRING='gas 2.42.0'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
@@ -1392,7 +1392,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures gas 2.42 to adapt to many kinds of systems.
+\`configure' configures gas 2.42.0 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1463,7 +1463,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of gas 2.42:";;
+     short | recursive ) echo "Configuration of gas 2.42.0:";;
    esac
   cat <<\_ACEOF
 
@@ -1619,7 +1619,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-gas configure 2.42
+gas configure 2.42.0
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2030,7 +2030,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by gas $as_me 2.42, which was
+It was created by gas $as_me 2.42.0, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -3010,7 +3010,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='gas'
- VERSION='2.42'
+ VERSION='2.42.0'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -16857,7 +16857,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by gas $as_me 2.42, which was
+This file was extended by gas $as_me 2.42.0, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -16923,7 +16923,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-gas config.status 2.42
+gas config.status 2.42.0
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
index 428492f5f105e4b9bc70e47cef7bfe04a4abd42e..c8cabdebfef8f932e49d18a66a82bd9e2912f1f5 100644 (file)
@@ -156,6 +156,9 @@ Generate code for Power9 architecture.
 @item -mpower10, -mpwr10
 Generate code for Power10 architecture.
 
+@item -mpower11, -mpwr11
+Generate code for Power11 architecture.
+
 @item -mfuture
 Generate code for 'future' architecture.
 
index 3bf7e1d809561296930390574a4af94b76d2d1d3..e0fc7619bdc187347f7b3473a5f75c558f006de3 100644 (file)
@@ -1,9 +1,9 @@
 .*: Assembler messages:
-.*:6: Warning: instruction length.*
-.*:7: Warning: instruction length.*
-.*:8: Warning: instruction length.*
-.*:10: Warning: instruction length.*
-.*:11: Warning: instruction length.*
+.*:6: Error: instruction length.*
+.*:7: Error: instruction length.*
+.*:8: Error: instruction length.*
+.*:10: Error: instruction length.*
+.*:11: Error: instruction length.*
 GAS LISTING .*
 
 
@@ -12,29 +12,29 @@ GAS LISTING .*
 [      ]*3[    ]+\.code16
 [      ]*4[    ]+
 [      ]*5[    ]+long16:
-[      ]*6[    ]+0000 26678FEA[        ]+lwpins        eax, es:\[eax\*8\], 0x11223344
-\*\*\*\*  Warning: instruction length of 16 bytes exceeds the limit of 15
+[      ]*6[    ]+\?\?\?\? 26678FEA[    ]+lwpins        eax, es:\[eax\*8\], 0x11223344
+\*\*\*\*  Error: instruction length of 16 bytes exceeds the limit of 15
 [      ]*6[    ]+781204C5[     ]*
 [      ]*6[    ]+00000000[     ]*
 [      ]*6[    ]+44332211[     ]*
-[      ]*7[    ]+0010 26678FEA[        ]+lwpval        eax, es:\[eax\*4\], 0x11223344
-\*\*\*\*  Warning: instruction length of 16 bytes exceeds the limit of 15
+[      ]*7[    ]+\?\?\?\? 26678FEA[    ]+lwpval        eax, es:\[eax\*4\], 0x11223344
+\*\*\*\*  Error: instruction length of 16 bytes exceeds the limit of 15
 [      ]*7[    ]+78120C85[     ]*
 [      ]*7[    ]+00000000[     ]*
 [      ]*7[    ]+44332211[     ]*
-[      ]*8[    ]+0020 26678FEA[        ]+bextr eax, es:\[eax\*2\], 0x11223344
-\*\*\*\*  Warning: instruction length of 16 bytes exceeds the limit of 15
+[      ]*8[    ]+\?\?\?\? 26678FEA[    ]+bextr eax, es:\[eax\*2\], 0x11223344
+\*\*\*\*  Error: instruction length of 16 bytes exceeds the limit of 15
 [      ]*8[    ]+78100445[     ]*
 [      ]*8[    ]+00000000[     ]*
 [      ]*8[    ]+44332211[     ]*
 [      ]*9[    ]+
-[      ]*10[   ]+0030 266766F2[        ]+xacquire lock add dword ptr es:\[eax\*2\], 0x11223344
-\*\*\*\*  Warning: instruction length of 16 bytes exceeds the limit of 15
+[      ]*10[   ]+\?\?\?\? 266766F2[    ]+xacquire lock add dword ptr es:\[eax\*2\], 0x11223344
+\*\*\*\*  Error: instruction length of 16 bytes exceeds the limit of 15
 [      ]*10[   ]+F0810445[     ]*
 [      ]*10[   ]+00000000[     ]*
 [      ]*10[   ]+44332211[     ]*
-[      ]*11[   ]+0040 266766F3[        ]+xrelease lock sub dword ptr es:\[eax\*2\], 0x11223344
-\*\*\*\*  Warning: instruction length of 16 bytes exceeds the limit of 15
+[      ]*11[   ]+\?\?\?\? 266766F3[    ]+xrelease lock sub dword ptr es:\[eax\*2\], 0x11223344
+\*\*\*\*  Error: instruction length of 16 bytes exceeds the limit of 15
 [      ]*11[   ]+F0812C45[     ]*
 [      ]*11[   ]+00000000[     ]*
 [      ]*11[   ]+44332211[     ]*
index dc63fb5ae7702066ce46bba21bb759bc4039e825..ac32c4d813951a7ea9620fcc9a305ef9e153f940 100644 (file)
@@ -1,9 +1,9 @@
 .*: Assembler messages:
-.*:5: Warning: instruction length.*
-.*:6: Warning: instruction length.*
-.*:7: Warning: instruction length.*
-.*:9: Warning: instruction length.*
-.*:10: Warning: instruction length.*
+.*:5: Error: instruction length.*
+.*:6: Error: instruction length.*
+.*:7: Error: instruction length.*
+.*:9: Error: instruction length.*
+.*:10: Error: instruction length.*
 GAS LISTING .*
 
 
@@ -11,29 +11,29 @@ GAS LISTING .*
 [      ]*2[    ]+\.intel_syntax noprefix
 [      ]*3[    ]+
 [      ]*4[    ]+long64:
-[      ]*5[    ]+0000 64678FEA[        ]+lwpins        rax, fs:\[eax\*8\], 0x11223344
-\*\*\*\*  Warning: instruction length of 16 bytes exceeds the limit of 15
+[      ]*5[    ]+\?\?\?\? 64678FEA[    ]+lwpins        rax, fs:\[eax\*8\], 0x11223344
+\*\*\*\*  Error: instruction length of 16 bytes exceeds the limit of 15
 [      ]*5[    ]+F81204C5[     ]*
 [      ]*5[    ]+00000000[     ]*
 [      ]*5[    ]+44332211[     ]*
-[      ]*6[    ]+0010 64678FEA[        ]+lwpval        eax, fs:\[eax\*4\], 0x11223344
-\*\*\*\*  Warning: instruction length of 16 bytes exceeds the limit of 15
+[      ]*6[    ]+\?\?\?\? 64678FEA[    ]+lwpval        eax, fs:\[eax\*4\], 0x11223344
+\*\*\*\*  Error: instruction length of 16 bytes exceeds the limit of 15
 [      ]*6[    ]+78120C85[     ]*
 [      ]*6[    ]+00000000[     ]*
 [      ]*6[    ]+44332211[     ]*
-[      ]*7[    ]+0020 64678FEA[        ]+bextr rax, fs:\[eax\*2\], 0x11223344
-\*\*\*\*  Warning: instruction length of 16 bytes exceeds the limit of 15
+[      ]*7[    ]+\?\?\?\? 64678FEA[    ]+bextr rax, fs:\[eax\*2\], 0x11223344
+\*\*\*\*  Error: instruction length of 16 bytes exceeds the limit of 15
 [      ]*7[    ]+F8100445[     ]*
 [      ]*7[    ]+00000000[     ]*
 [      ]*7[    ]+44332211[     ]*
 [      ]*8[    ]+
-[      ]*9[    ]+0030 6567F2F0[        ]+xacquire lock add qword ptr gs:\[eax\*8\], 0x11223344
-\*\*\*\*  Warning: instruction length of 16 bytes exceeds the limit of 15
+[      ]*9[    ]+\?\?\?\? 6567F2F0[    ]+xacquire lock add qword ptr gs:\[eax\*8\], 0x11223344
+\*\*\*\*  Error: instruction length of 16 bytes exceeds the limit of 15
 [      ]*9[    ]+488104C5[     ]*
 [      ]*9[    ]+00000000[     ]*
 [      ]*9[    ]+44332211[     ]*
-[      ]*10[   ]+0040 6567F3F0[        ]+xrelease lock sub qword ptr gs:\[eax\*8\], 0x11223344
-\*\*\*\*  Warning: instruction length of 16 bytes exceeds the limit of 15
+[      ]*10[   ]+\?\?\?\? 6567F3F0[    ]+xrelease lock sub qword ptr gs:\[eax\*8\], 0x11223344
+\*\*\*\*  Error: instruction length of 16 bytes exceeds the limit of 15
 [      ]*10[   ]+48812CC5[     ]*
 [      ]*10[   ]+00000000[     ]*
 [      ]*10[   ]+44332211[     ]*
diff --git a/gas/testsuite/gas/i386/x86-64-apx-inval.l b/gas/testsuite/gas/i386/x86-64-apx-inval.l
new file mode 100644 (file)
index 0000000..6c1a346
--- /dev/null
@@ -0,0 +1,3 @@
+.*: Assembler messages:
+.*:3: Error: instruction length of 16 bytes exceeds the limit of 15
+.*:4: Error: instruction length of 16 bytes exceeds the limit of 15
diff --git a/gas/testsuite/gas/i386/x86-64-apx-inval.s b/gas/testsuite/gas/i386/x86-64-apx-inval.s
new file mode 100644 (file)
index 0000000..bb57817
--- /dev/null
@@ -0,0 +1,4 @@
+# Check illegal 64bit APX_F instructions
+       .text
+       addq $0xe0, %fs:0, %rdx
+       xorq $0xe0, foo(%eax,%edx), %rdx
index d42abccc6d910e4eb9f03c1dcdbcab50d0f74744..f2c039abe727628297e6298944f6c57e26bfca5c 100644 (file)
@@ -16,4 +16,8 @@ Disassembly of section .text:
  +[a-f0-9]+:   48 8b 05 00 00 00 00    mov    0x0\(%rip\),%rax        # 2c <_start\+0x2c>      28: R_X86_64_GOTTPOFF   foo-0x4
  +[a-f0-9]+:   d5 48 03 05 00 00 00 00         add    0x0\(%rip\),%r16        # 34 <_start\+0x34>      30: R_X86_64_CODE_4_GOTTPOFF    foo-0x4
  +[a-f0-9]+:   d5 48 8b 25 00 00 00 00         mov    0x0\(%rip\),%r20        # 3c <_start\+0x3c>      38: R_X86_64_CODE_4_GOTTPOFF    foo-0x4
+ +[a-f0-9]+:   62 74 fc 10 01 05 00 00 00 00   add    %r8,0x0\(%rip\),%r16        # 46 <_start\+0x46>  42: R_X86_64_CODE_6_GOTTPOFF    foo-0x4
+ +[a-f0-9]+:   62 f4 9c 18 03 05 00 00 00 00   add    0x0\(%rip\),%rax,%r12        # 50 <_start\+0x50> 4c: R_X86_64_CODE_6_GOTTPOFF    foo-0x4
+ +[a-f0-9]+:   62 74 fc 10 01 05 00 00 00 00   add    %r8,0x0\(%rip\),%r16        # 5a <_start\+0x5a>  56: R_X86_64_CODE_6_GOTTPOFF    foo-0x4
+ +[a-f0-9]+:   62 f4 9c 18 03 05 00 00 00 00   add    0x0\(%rip\),%rax,%r12        # 64 <_start\+0x64> 60: R_X86_64_CODE_6_GOTTPOFF    foo-0x4
 #pass
index 6f8f9d1480c517b4e5e774a7a9ab9b24548b6109..0335ec5debf4c62d9ff252f6a65026ddc5a9a330 100644 (file)
@@ -13,3 +13,13 @@ _start:
 
        addq    r16, QWORD PTR [rip + foo@GOTTPOFF]
        movq    r20, QWORD PTR [rip + foo@GOTTPOFF]
+
+       .att_syntax prefix
+
+       addq    %r8, foo@GOTTPOFF(%rip), %r16
+       addq    foo@GOTTPOFF(%rip), %rax, %r12
+
+       .intel_syntax noprefix
+
+       addq    r16, QWORD PTR [rip + foo@GOTTPOFF], r8
+       addq    r12, rax, QWORD PTR [rip + foo@GOTTPOFF]
index 6932ba97a4d12745a90281ec058776539f5b7672..b77e8c1002974e8583be55c0dda71a7b54b6b350 100644 (file)
@@ -371,6 +371,7 @@ run_dump_test "x86-64-avx512f-rcigrne-intel"
 run_dump_test "x86-64-avx512f-rcigrne"
 run_dump_test "x86-64-avx512f-rcigru-intel"
 run_dump_test "x86-64-avx512f-rcigru"
+run_list_test "x86-64-apx-inval"
 run_list_test "x86-64-apx-egpr-inval"
 run_dump_test "x86-64-apx-evex-promoted-bad"
 run_list_test "x86-64-apx-egpr-promote-inval" "-al"
diff --git a/gas/testsuite/gas/loongarch/tls_le_r_sym_type.d b/gas/testsuite/gas/loongarch/tls_le_r_sym_type.d
new file mode 100644 (file)
index 0000000..43bcd78
--- /dev/null
@@ -0,0 +1,3 @@
+#readelf: -s
+#...
+.*TLS[ \t]+GLOBAL[ \t]+DEFAULT[ \t]+UND[ \t]+x
diff --git a/gas/testsuite/gas/loongarch/tls_le_r_sym_type.s b/gas/testsuite/gas/loongarch/tls_le_r_sym_type.s
new file mode 100644 (file)
index 0000000..3ccedae
--- /dev/null
@@ -0,0 +1,6 @@
+f:
+  lu12i.w      $a0, %le_hi20_r(x)
+  add.d                $a0, $a0, $tp, %le_add_r(x)
+  li.w         $a1, 1
+  st.w         $a1, $a0, %le_lo12_r(x)
+  ret
diff --git a/gas/testsuite/gas/scfi/x86_64/ginsn-cofi-1.l b/gas/testsuite/gas/scfi/x86_64/ginsn-cofi-1.l
new file mode 100644 (file)
index 0000000..ab6b50d
--- /dev/null
@@ -0,0 +1,38 @@
+.*: Assembler messages:
+.*:20: Error: untraceable control flow for func 'foo'
+GAS LISTING .*
+
+
+   1                   # Testcase with a variety of "change of flow instructions"
+   2                   #
+   3                   # This test does not have much going on wrt synthesis of CFI;
+   4                   # it just aims to ensure x8_64 -> ginsn decoding behaves
+   5                   # gracefully for these "change of flow instructions"
+   6                           .text
+   7                           .globl  foo
+   8                           .type   foo, @function
+   8                   ginsn: SYM FUNC_BEGIN
+   9                   foo:
+   9                   ginsn: SYM foo
+  10 \?\?\?\? 4801D0                   addq    %rdx, %rax
+  10                   ginsn: ADD %r1, %r0, %r0
+  11 \?\?\?\? E200                     loop    foo
+  11                   ginsn: JCC 
+  12 \?\?\?\? 3EFFE0                   notrack jmp     \*%rax
+  12                   ginsn: JMP %r0, 
+  13 \?\?\?\? 41FFD0                   call    \*%r8
+  13                   ginsn: CALL
+  14 \?\?\?\? 67E305                   jecxz   .L179
+  14                   ginsn: JCC 
+  15 \?\?\?\? FF6730                   jmp     \*48\(%rdi\)
+  15                   ginsn: JMP %r5, 
+  16 \?\?\?\? 7000                     jo      .L179
+  16                   ginsn: JCC 
+  17                   .L179:
+  17                   ginsn: SYM .L179
+  18 \?\?\?\? C3                       ret
+  18                   ginsn: RET
+  19                   .LFE0:
+  19                   ginsn: SYM .LFE0
+  20                           .size   foo, .-foo
+  20                   ginsn: SYM FUNC_END
diff --git a/gas/testsuite/gas/scfi/x86_64/ginsn-cofi-1.s b/gas/testsuite/gas/scfi/x86_64/ginsn-cofi-1.s
new file mode 100644 (file)
index 0000000..0a63910
--- /dev/null
@@ -0,0 +1,20 @@
+# Testcase with a variety of "change of flow instructions"
+#
+# This test does not have much going on wrt synthesis of CFI;
+# it just aims to ensure x8_64 -> ginsn decoding behaves
+# gracefully for these "change of flow instructions"
+       .text
+       .globl  foo
+       .type   foo, @function
+foo:
+       addq    %rdx, %rax
+       loop    foo
+       notrack jmp     *%rax
+       call    *%r8
+       jecxz   .L179
+       jmp     *48(%rdi)
+       jo      .L179
+.L179:
+       ret
+.LFE0:
+       .size   foo, .-foo
index c575206886651ef99c112d27142d9aabee76cad4..bd0643dc87f671ef6d98a8ed979fa432767ad572 100644 (file)
@@ -7,6 +7,8 @@ _start:
        movq    foo@gottpoff(%rip), %rax
        addq    foo@gottpoff(%rip), %r16
        movq    foo@gottpoff(%rip), %r20
+       addq    %r30, foo@gottpoff(%rip), %r8
+       addq    foo@gottpoff(%rip), %rax, %r20
        .size   _start, .-_start
        .section        .tdata,"awT",@progbits
        .align 4
index 9d2e082f3e095d24c2ab4db2615d90401ec0f697..5308712ddbd70c8d7d83fa5b24eca82299ed527e 100755 (executable)
@@ -27,3 +27,5 @@ grep -q "add[ \t]\+\$0x[a-f0-9]\+,%r12" x86_64_ie_to_le.stdout
 grep -q "mov[ \t]\+\$0x[a-f0-9]\+,%rax" x86_64_ie_to_le.stdout
 grep -q "add[ \t]\+\$0x[a-f0-9]\+,%r16" x86_64_ie_to_le.stdout
 grep -q "mov[ \t]\+\$0x[a-f0-9]\+,%r20" x86_64_ie_to_le.stdout
+grep -q "add[ \t]\+\$0x[a-f0-9]\+,%r30,%r8" x86_64_ie_to_le.stdout
+grep -q "add[ \t]\+\$0x[a-f0-9]\+,%rax,%r20" x86_64_ie_to_le.stdout
index 58e191a055aa2cb726003b96c71dc2a41280cc19..f77430bfb3d7c43d3dc2ba2ad63a2fee1db30e4f 100644 (file)
@@ -2920,6 +2920,11 @@ Target_x86_64<size>::optimize_tls_reloc(bool is_final, int r_type,
       // Another Local-Dynamic reloc.
       return tls::TLSOPT_TO_LE;
 
+    case elfcpp::R_X86_64_CODE_6_GOTTPOFF:
+      if (r_offset <= 6 || *(reloc_view - 6) != 0x62)
+       return tls::TLSOPT_NONE;
+      goto handle_gottpoff;
+
     case elfcpp::R_X86_64_CODE_4_GOTTPOFF:
       if (r_offset <= 4 || *(reloc_view - 4) != 0xd5)
        return tls::TLSOPT_NONE;
@@ -2929,6 +2934,7 @@ Target_x86_64<size>::optimize_tls_reloc(bool is_final, int r_type,
       // from the GOT.  If we know that we are linking against the
       // local symbol, we can switch to Local-Exec, which links the
       // thread offset into the instruction.
+handle_gottpoff:
       if (is_final)
        return tls::TLSOPT_TO_LE;
       return tls::TLSOPT_NONE;
@@ -2997,6 +3003,7 @@ Target_x86_64<size>::Scan::get_reference_flags(unsigned int r_type)
     case elfcpp::R_X86_64_DTPOFF64:
     case elfcpp::R_X86_64_GOTTPOFF:         // Initial-exec
     case elfcpp::R_X86_64_CODE_4_GOTTPOFF:
+    case elfcpp::R_X86_64_CODE_6_GOTTPOFF:
     case elfcpp::R_X86_64_TPOFF32:          // Local-exec
       return Symbol::TLS_REF;
 
@@ -3362,6 +3369,7 @@ need_got:
       // These are initial tls relocs, which are expected when linking
     case elfcpp::R_X86_64_CODE_4_GOTPC32_TLSDESC:
     case elfcpp::R_X86_64_CODE_4_GOTTPOFF:
+    case elfcpp::R_X86_64_CODE_6_GOTTPOFF:
       {
        section_size_type stype;
        reloc_view = object->section_contents(data_shndx, &stype, true);
@@ -3464,6 +3472,7 @@ need_got:
 
          case elfcpp::R_X86_64_GOTTPOFF:    // Initial-exec
          case elfcpp::R_X86_64_CODE_4_GOTTPOFF:
+         case elfcpp::R_X86_64_CODE_6_GOTTPOFF:
            layout->set_has_static_tls();
            if (optimized_type == tls::TLSOPT_NONE)
              {
@@ -3902,6 +3911,7 @@ Target_x86_64<size>::Scan::global(Symbol_table* symtab,
       // These are initial tls relocs, which are expected for global()
     case elfcpp::R_X86_64_CODE_4_GOTPC32_TLSDESC:
     case elfcpp::R_X86_64_CODE_4_GOTTPOFF:
+    case elfcpp::R_X86_64_CODE_6_GOTTPOFF:
       {
        section_size_type stype;
        reloc_view = object->section_contents(data_shndx, &stype, true);
@@ -3920,7 +3930,8 @@ Target_x86_64<size>::Scan::global(Symbol_table* symtab,
        // when building an executable.
        const bool is_final = (gsym->final_value_is_known() ||
                               ((r_type == elfcpp::R_X86_64_GOTTPOFF ||
-                                r_type == elfcpp::R_X86_64_CODE_4_GOTTPOFF) &&
+                                r_type == elfcpp::R_X86_64_CODE_4_GOTTPOFF||
+                                r_type == elfcpp::R_X86_64_CODE_6_GOTTPOFF) &&
                                gsym->is_undefined() &&
                                parameters->options().output_is_executable()));
        size_t r_offset = reloc.get_r_offset();
@@ -4006,6 +4017,7 @@ Target_x86_64<size>::Scan::global(Symbol_table* symtab,
 
          case elfcpp::R_X86_64_GOTTPOFF:    // Initial-exec
          case elfcpp::R_X86_64_CODE_4_GOTTPOFF:
+         case elfcpp::R_X86_64_CODE_6_GOTTPOFF:
            layout->set_has_static_tls();
            if (optimized_type == tls::TLSOPT_NONE)
              {
@@ -4608,6 +4620,7 @@ Target_x86_64<size>::Relocate::relocate(
     case elfcpp::R_X86_64_DTPOFF64:
     case elfcpp::R_X86_64_GOTTPOFF:         // Initial-exec
     case elfcpp::R_X86_64_CODE_4_GOTTPOFF:
+    case elfcpp::R_X86_64_CODE_6_GOTTPOFF:
     case elfcpp::R_X86_64_TPOFF32:          // Local-exec
       this->relocate_tls(relinfo, target, relnum, rela, r_type, gsym, psymval,
                         view, address, view_size);
@@ -4894,6 +4907,7 @@ Target_x86_64<size>::Relocate::relocate_tls(
 
     case elfcpp::R_X86_64_GOTTPOFF:         // Initial-exec
     case elfcpp::R_X86_64_CODE_4_GOTTPOFF:
+    case elfcpp::R_X86_64_CODE_6_GOTTPOFF:
       if (gsym != NULL
          && gsym->is_undefined()
          && parameters->options().output_is_executable())
@@ -5308,11 +5322,19 @@ Target_x86_64<size>::Relocate::tls_ie_to_le(
 
   // movq foo@gottpoff(%rip),%reg  ==>  movq $YY,%reg
   // addq foo@gottpoff(%rip),%reg  ==>  addq $YY,%reg
+  // addq %reg1,foo@gottpoff(%rip),%reg2  ==>  addq $YY,%reg1,%reg2
+  // addq foo@gottpoff(%rip),%reg1,%reg2  ==>  addq $YY,%reg1,%reg2
 
-  tls::check_range(relinfo, relnum, rela.get_r_offset(), view_size, -3);
+  int off1;
+  if (r_type == elfcpp::R_X86_64_CODE_6_GOTTPOFF)
+    off1 = -5;
+  else
+    off1 = -3;
+
+  tls::check_range(relinfo, relnum, rela.get_r_offset(), view_size, off1);
   tls::check_range(relinfo, relnum, rela.get_r_offset(), view_size, 4);
 
-  unsigned char op1 = view[-3];
+  unsigned char op1 = view[off1];
   unsigned char op2 = view[-2];
   unsigned char op3 = view[-1];
   unsigned char reg = op3 >> 3;
@@ -5350,7 +5372,7 @@ Target_x86_64<size>::Relocate::tls_ie_to_le(
          view[-1] = 0x80 | reg | (reg << 3);
        }
     }
-  else
+  else if (r_type == elfcpp::R_X86_64_CODE_4_GOTTPOFF)
     {
       if (op2 == 0x8b)
        op2 = 0xc7;
@@ -5362,6 +5384,23 @@ Target_x86_64<size>::Relocate::tls_ie_to_le(
       view[-2] = op2;
       view[-1] = 0xc0 | reg;
     }
+  else
+    {
+      unsigned char updated_op1 = op1;
+
+      // Set the R bits since they is inverted.
+      updated_op1 |= 1 << 7 | 1 << 4;
+
+      // Update the B bits from the R bits.
+      if ((op1 & (1 << 7)) == 0)
+       updated_op1 &= ~(1 << 5);
+      if ((op1 & (1 << 4)) == 0)
+       updated_op1 |= 1 << 3;
+
+      view[-5] = updated_op1;
+      view[-2] = 0x81;
+      view[-1] = 0xc0 | reg;
+    }
 
   if (tls_segment != NULL)
     value -= tls_segment->memsz();
index f2eef579a5086c9ef2469c926091e23c4d2f9c9a..2d62b6fbb07c52351289dce300a23063347f1542 100755 (executable)
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for gprof 2.42.
+# Generated by GNU Autoconf 2.69 for gprof 2.42.0.
 #
 #
 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -587,8 +587,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='gprof'
 PACKAGE_TARNAME='gprof'
-PACKAGE_VERSION='2.42'
-PACKAGE_STRING='gprof 2.42'
+PACKAGE_VERSION='2.42.0'
+PACKAGE_STRING='gprof 2.42.0'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
@@ -1349,7 +1349,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures gprof 2.42 to adapt to many kinds of systems.
+\`configure' configures gprof 2.42.0 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1420,7 +1420,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of gprof 2.42:";;
+     short | recursive ) echo "Configuration of gprof 2.42.0:";;
    esac
   cat <<\_ACEOF
 
@@ -1539,7 +1539,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-gprof configure 2.42
+gprof configure 2.42.0
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1904,7 +1904,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by gprof $as_me 2.42, which was
+It was created by gprof $as_me 2.42.0, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2884,7 +2884,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='gprof'
- VERSION='2.42'
+ VERSION='2.42.0'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -14505,7 +14505,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by gprof $as_me 2.42, which was
+This file was extended by gprof $as_me 2.42.0, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -14571,7 +14571,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-gprof config.status 2.42
+gprof config.status 2.42.0
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
index 33a824620a611990a8843c9f61cbe9a65df51394..ea5036a8bbf3efe18cfc195b5892a1f4d35e4ad8 100644 (file)
@@ -92,6 +92,26 @@ START_RELOC_NUMBERS (elf_x86_64_reloc_type)
      /* 32 bit signed pc relative offset to TLS descriptor in the GOT if
        instruction starts at 4 bytes before the relocation offset.  */
      RELOC_NUMBER (R_X86_64_CODE_4_GOTPC32_TLSDESC, 45)
+     /* Load from 32 bit signed pc relative offset to GOT entry if the
+       instruction starts at 5 bytes before the relocation offset,
+       relaxable.  */
+     RELOC_NUMBER (R_X86_64_CODE_5_GOTPCRELX, 46)
+     /* 32 bit signed pc relative offset to TLS descriptor in the GOT if
+       instruction starts at 5 bytes before the relocation offset.  */
+     RELOC_NUMBER (R_X86_64_CODE_5_GOTPC32_TLSDESC, 47)
+    /* PC relative offset to IE GOT entry if the instruction starts at
+       5 bytes before the relocation offset.  */
+     RELOC_NUMBER (R_X86_64_CODE_5_GOTTPOFF, 48)
+     /* Load from 32 bit signed pc relative offset to GOT entry if the
+       instruction starts at 6 bytes before the relocation offset,
+       relaxable.  */
+     RELOC_NUMBER (R_X86_64_CODE_6_GOTPCRELX, 49)
+    /* PC relative offset to IE GOT entry if the instruction starts at
+       6 bytes before the relocation offset.  */
+     RELOC_NUMBER (R_X86_64_CODE_6_GOTTPOFF, 50)
+     /* 32 bit signed pc relative offset to TLS descriptor in the GOT if
+       instruction starts at 6 bytes before the relocation offset.  */
+     RELOC_NUMBER (R_X86_64_CODE_6_GOTPC32_TLSDESC, 51)
      RELOC_NUMBER (R_X86_64_GNU_VTINHERIT, 250)       /* GNU C++ hack  */
      RELOC_NUMBER (R_X86_64_GNU_VTENTRY, 251)         /* GNU C++ hack  */
 END_RELOC_NUMBERS (R_X86_64_max)
index ba1e5e2a215c70699b16246f38efc149ffabe4cb..6f8a05c3b6c52b369ee1b779f17b21390de290b1 100755 (executable)
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for ld 2.42.
+# Generated by GNU Autoconf 2.69 for ld 2.42.0.
 #
 #
 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -587,8 +587,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='ld'
 PACKAGE_TARNAME='ld'
-PACKAGE_VERSION='2.42'
-PACKAGE_STRING='ld 2.42'
+PACKAGE_VERSION='2.42.0'
+PACKAGE_STRING='ld 2.42.0'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
@@ -1436,7 +1436,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures ld 2.42 to adapt to many kinds of systems.
+\`configure' configures ld 2.42.0 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1507,7 +1507,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of ld 2.42:";;
+     short | recursive ) echo "Configuration of ld 2.42.0:";;
    esac
   cat <<\_ACEOF
 
@@ -1687,7 +1687,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-ld configure 2.42
+ld configure 2.42.0
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2402,7 +2402,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by ld $as_me 2.42, which was
+It was created by ld $as_me 2.42.0, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -3386,7 +3386,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='ld'
- VERSION='2.42'
+ VERSION='2.42.0'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -20071,7 +20071,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by ld $as_me 2.42, which was
+This file was extended by ld $as_me 2.42.0, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -20137,7 +20137,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-ld config.status 2.42
+ld config.status 2.42.0
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
index 3b18897f33ce458478e626b6875b6078ee0b5713..329d57e284917d8f30f162c5d9b91b77634dd9f6 100644 (file)
@@ -358,8 +358,8 @@ EOF
 if test -z "${HAVE_FLMAP}" && test -n "${RELOCATING}"; then
     cat <<EOF
 
-PROVIDE (__flmap_init_label = DEFINED(__flmap_noinit_start) ? __flmap_noinit_start : 0) ;
-PROVIDE (__flmap = DEFINED(__flmap) ? __flmap : 0) ;
+__flmap_init_label = DEFINED(__flmap_noinit_start) ? __flmap_noinit_start : 0 ;
+__flmap = DEFINED(__flmap) ? __flmap : 0 ;
 
 EOF
 fi
@@ -368,7 +368,7 @@ if test -n "${HAVE_FLMAP}"; then
     cat <<EOF
 
 ${RELOCATING+
-PROVIDE (__flmap_init_label = DEFINED(__flmap_init_start) ? __flmap_init_start : 0) ;
+__flmap_init_label = DEFINED(__flmap_init_start) ? __flmap_init_start : 0 ;
 /* User can specify position of .rodata in flash (LMA) by supplying
    __RODATA_FLASH_START__ or __flmap, where the former takes precedence. */
 __RODATA_FLASH_START__ = DEFINED(__RODATA_FLASH_START__)
index 4587cc751b40c15e746a1aaf6ff5ea5428bf8766..be89f38199dda62d4a2514d6c21af40b352428bf 100644 (file)
@@ -169,18 +169,42 @@ Disassembly of section .text:
  +[0-9a-f]+:   d5 48 03 05 ([0-9a-f]{2} ){3}[  ]+add    0x[0-9a-f]+\(%rip\),%r16 +# [0-9a-f]+ <sG2>
 #                              -> R_X86_64_TPOFF64     sG2
  +[0-9a-f]+:   00 *
+ +[0-9a-f]+:   62 f4 fc 10 01 ([0-9a-f]{2} ){2}[       ]+add    %rax,0x[0-9a-f]+\(%rip\),%r16 +# [0-9a-f]+ <sG2>
+#                              -> R_X86_64_TPOFF64     sG2
+ +[0-9a-f]+:   ([0-9a-f]{2} ){3} *
+ +[0-9a-f]+:   62 f4 fc 10 03 ([0-9a-f]{2} ){2}[       ]+add    0x[0-9a-f]+\(%rip\),%rax,%r16 +# [0-9a-f]+ <sG2>
+#                              -> R_X86_64_TPOFF64     sG2
+ +[0-9a-f]+:   ([0-9a-f]{2} ){3} *
 #  IE -> LE against global var defined in exec
  +[0-9a-f]+:   d5 18 81 c1 60 ff ff[   ]+add    \$0xf+60,%r17
 #                                                      sg1
  +[0-9a-f]+:   ff *
+ +[0-9a-f]+:   62 d4 f4 10 81 ([0-9a-f]{2} ){2}[       ]+add    \$0x[0-9a-f]+,%r8,%r17
+#                                                      sg1
+ +[0-9a-f]+:   ff ff ff *
+ +[0-9a-f]+:   62 d4 f4 10 81 ([0-9a-f]{2} ){2}[       ]+add    \$0x[0-9a-f]+,%r8,%r17
+#                                                      sg1
+ +[0-9a-f]+:   ff ff ff *
 #  IE -> LE against local var
  +[0-9a-f]+:   d5 18 81 c2 80 ff ff[   ]+add    \$0xf+80,%r18
 #                                                      sl1
  +[0-9a-f]+:   ff *
+ +[0-9a-f]+:   62 d4 fc 18 81 ([0-9a-f]{2} ){2}[       ]+add    \$0x[0-9a-f]+,%r8,%rax
+#                                                      sl1
+ +[0-9a-f]+:   ff ff ff *
+ +[0-9a-f]+:   62 d4 fc 18 81 ([0-9a-f]{2} ){2}[       ]+add    \$0x[0-9a-f]+,%r8,%rax
+#                                                      sl1
+ +[0-9a-f]+:   ff ff ff *
 #  IE -> LE against hidden var
  +[0-9a-f]+:   d5 18 81 c3 a0 ff ff[   ]+add    \$0xf+a0,%r19
 #                                                      sh1
  +[0-9a-f]+:   ff *
+ +[0-9a-f]+:   62 fc bc 18 81 ([0-9a-f]{2} ){2}[       ]+add    \$0x[0-9a-f]+,%r19,%r8
+#                                                      sh1
+ +[0-9a-f]+:   ff ff ff *
+ +[0-9a-f]+:   62 fc bc 18 81 ([0-9a-f]{2} ){2}[       ]+add    \$0x[0-9a-f]+,%r19,%r8
+#                                                      sh1
+ +[0-9a-f]+:   ff ff ff *
 #  Direct access through %fs
 #  IE against global var
  +[0-9a-f]+:   d5 48 8b 25 ([0-9a-f]{2} ){3}[  ]+mov    0x[0-9a-f]+\(%rip\),%r20 +# [0-9a-f]+ <sG5>
index daaea7a53716e0db7b5dffd3bc1f10767d6c420f..59325b04e19ec25c746419d30208683435acf35e 100644 (file)
@@ -15,12 +15,12 @@ Section Headers:
  +\[[ 0-9]+\] .dynsym +.*
  +\[[ 0-9]+\] .dynstr +.*
  +\[[ 0-9]+\] .rela.dyn +.*
- +\[[ 0-9]+\] .text +PROGBITS +0+401000 0+1000 0+25d 00 +AX +0 +0 +4096
- +\[[ 0-9]+\] .tdata +PROGBITS +0+60125d 0+125d 0+60 00 WAT +0 +0 +1
- +\[[ 0-9]+\] .tbss +NOBITS +0+6012bd 0+12bd 0+40 00 WAT +0 +0 +1
- +\[[ 0-9]+\] .dynamic +DYNAMIC +0+6012c0 0+12c0 0+100 10 +WA +4 +0 +8
- +\[[ 0-9]+\] .got +PROGBITS +0+6013c0 0+13c0 0+20 08 +WA +0 +0 +8
- +\[[ 0-9]+\] .got.plt +PROGBITS +0+6013e0 0+13e0 0+18 08 +WA +0 +0 +8
+ +\[[ 0-9]+\] .text +PROGBITS +0+401000 0+1000 0+2ad 00 +AX +0 +0 +4096
+ +\[[ 0-9]+\] .tdata +PROGBITS +0+6012ad 0+12ad 0+60 00 WAT +0 +0 +1
+ +\[[ 0-9]+\] .tbss +NOBITS +0+60130d 0+130d 0+40 00 WAT +0 +0 +1
+ +\[[ 0-9]+\] .dynamic +DYNAMIC +0+601310 0+1310 0+100 10 +WA +4 +0 +8
+ +\[[ 0-9]+\] .got +PROGBITS +0+601410 0+1410 0+20 08 +WA +0 +0 +8
+ +\[[ 0-9]+\] .got.plt +PROGBITS +0+601430 0+1430 0+18 08 +WA +0 +0 +8
  +\[[ 0-9]+\] .symtab +.*
  +\[[ 0-9]+\] .strtab +.*
  +\[[ 0-9]+\] .shstrtab +.*
@@ -28,7 +28,7 @@ Key to Flags:
 #...
 
 Elf file type is EXEC \(Executable file\)
-Entry point 0x401165
+Entry point 0x4011b5
 There are [0-9]+ program headers, starting at offset [0-9]+
 
 Program Headers:
@@ -36,10 +36,10 @@ Program Headers:
  +PHDR.*
  +INTERP.*
 .*Requesting program interpreter.*
- +LOAD +0x0+ 0x0+400000 0x0+400000 0x0+125d 0x0+125d R E 0x200000
- +LOAD +0x0+125d 0x0+60125d 0x0+60125d 0x0+19b 0x0+19b RW +0x200000
- +DYNAMIC +0x0+12c0 0x0+6012c0 0x0+6012c0 0x0+100 0x0+100 RW +0x8
- +TLS +0x0+125d 0x0+60125d 0x0+60125d 0x0+60 0x0+a0 R +0x1
+ +LOAD +0x0+ 0x0+400000 0x0+400000 0x0+12ad 0x0+12ad R E 0x200000
+ +LOAD +0x0+12ad 0x0+6012ad 0x0+6012ad 0x0+19b 0x0+19b RW +0x200000
+ +DYNAMIC +0x0+1310 0x0+601310 0x0+601310 0x0+100 0x0+100 RW +0x8
+ +TLS +0x0+12ad 0x0+6012ad 0x0+6012ad 0x0+60 0x0+a0 R +0x1
 
  Section to Segment mapping:
  +Segment Sections...
@@ -52,10 +52,10 @@ Program Headers:
 
 Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 4 entries:
  +Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend
-0+6013c0 +0+100000012 R_X86_64_TPOFF64 +0+ sG5 \+ 0
-0+6013c8 +0+200000012 R_X86_64_TPOFF64 +0+ sG2 \+ 0
-0+6013d0 +0+300000012 R_X86_64_TPOFF64 +0+ sG6 \+ 0
-0+6013d8 +0+400000012 R_X86_64_TPOFF64 +0+ sG1 \+ 0
+0+601410 +0+100000012 R_X86_64_TPOFF64 +0+ sG5 \+ 0
+0+601418 +0+200000012 R_X86_64_TPOFF64 +0+ sG2 \+ 0
+0+601420 +0+300000012 R_X86_64_TPOFF64 +0+ sG6 \+ 0
+0+601428 +0+400000012 R_X86_64_TPOFF64 +0+ sG1 \+ 0
 
 Symbol table '\.dynsym' contains [0-9]+ entries:
  +Num: +Value +Size +Type +Bind +Vis +Ndx +Name
@@ -88,8 +88,8 @@ Symbol table '\.symtab' contains [0-9]+ entries:
  +[0-9]+: 0+9c +0 +TLS +LOCAL +DEFAULT +8 bl8
 .* FILE +LOCAL +DEFAULT +ABS 
  +[0-9]+: 0+a0 +0 +TLS +LOCAL +DEFAULT +7 _TLS_MODULE_BASE_
- +[0-9]+: 0+6012c0 +0 +OBJECT +LOCAL +DEFAULT +9 _DYNAMIC
- +[0-9]+: 0+6013e0 +0 +OBJECT +LOCAL +DEFAULT +11 _GLOBAL_OFFSET_TABLE_
+ +[0-9]+: 0+601310 +0 +OBJECT +LOCAL +DEFAULT +9 _DYNAMIC
+ +[0-9]+: 0+601430 +0 +OBJECT +LOCAL +DEFAULT +11 _GLOBAL_OFFSET_TABLE_
  +[0-9]+: 0+1c +0 +TLS +GLOBAL +DEFAULT +7 sg8
  +[0-9]+: 0+7c +0 +TLS +GLOBAL +DEFAULT +8 bg8
  +[0-9]+: 0+74 +0 +TLS +GLOBAL +DEFAULT +8 bg6
@@ -104,7 +104,7 @@ Symbol table '\.symtab' contains [0-9]+ entries:
  +[0-9]+: 0+58 +0 +TLS +GLOBAL +HIDDEN +7 sh7
  +[0-9]+: 0+5c +0 +TLS +GLOBAL +HIDDEN +7 sh8
  +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +7 sg1
- +[0-9]+: 0+401165 +0 +FUNC +GLOBAL +DEFAULT +6 _start
+ +[0-9]+: 0+4011b5 +0 +FUNC +GLOBAL +DEFAULT +6 _start
  +[0-9]+: 0+4c +0 +TLS +GLOBAL +HIDDEN +7 sh4
  +[0-9]+: 0+78 +0 +TLS +GLOBAL +DEFAULT +8 bg7
  +[0-9]+: 0+50 +0 +TLS +GLOBAL +HIDDEN +7 sh5
index b80e5f192c0d3556a5e1e37c66fef3b061b11cbc..4747fc1bc307838b52b633539c421999a283b212 100644 (file)
@@ -129,15 +129,23 @@ fn2:
 
        /* IE against global var  */
        addq    sG2@gottpoff(%rip), %r16
+       addq    %rax, sG2@gottpoff(%rip), %r16
+       addq    sG2@gottpoff(%rip), %rax, %r16
 
        /* IE -> LE against global var defined in exec */
        addq    sg1@gottpoff(%rip), %r17
+       addq    %r8, sg1@gottpoff(%rip), %r17
+       addq    sg1@gottpoff(%rip), %r8, %r17
 
        /* IE -> LE against local var */
        addq    sl1@gottpoff(%rip), %r18
+       addq    %r8, sl1@gottpoff(%rip), %rax
+       addq    sl1@gottpoff(%rip), %r8, %rax
 
        /* IE -> LE against hidden var */
        addq    sh1@gottpoff(%rip), %r19
+       addq    %r19, sh1@gottpoff(%rip), %r8
+       addq    sh1@gottpoff(%rip), %r19, %r8
 
        /* Direct access through %fs  */
 
index a1a0422cea2b16a3da11dfdb3450cfc50769b161..e370f393a7a53194ec60c5a3334e6750f9e7ac25 100644 (file)
@@ -2263,7 +2263,7 @@ if { [check_compiler_available] } {
     run_cc_link_tests [list \
        [list \
            "Build mark-plt-1.so" \
-           "-shared -Wl,-z,mark-plt,-z,pack-relative-relocs" \
+           "-shared -Wl,--no-as-needed,-z,mark-plt,-z,pack-relative-relocs" \
            "-fPIC" \
            { mark-plt-1.s } \
            {{readelf {-W --version-info} mark-plt-1a.rd} \
index 239f4a98937f7652c4d09bc7da520be72074c819..1660c3266a38181f7471aa53645a172e55da55e8 100755 (executable)
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for opcodes 2.42.
+# Generated by GNU Autoconf 2.69 for opcodes 2.42.0.
 #
 #
 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -587,8 +587,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='opcodes'
 PACKAGE_TARNAME='opcodes'
-PACKAGE_VERSION='2.42'
-PACKAGE_STRING='opcodes 2.42'
+PACKAGE_VERSION='2.42.0'
+PACKAGE_STRING='opcodes 2.42.0'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
@@ -1371,7 +1371,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures opcodes 2.42 to adapt to many kinds of systems.
+\`configure' configures opcodes 2.42.0 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1442,7 +1442,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of opcodes 2.42:";;
+     short | recursive ) echo "Configuration of opcodes 2.42.0:";;
    esac
   cat <<\_ACEOF
 
@@ -1564,7 +1564,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-opcodes configure 2.42
+opcodes configure 2.42.0
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2158,7 +2158,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by opcodes $as_me 2.42, which was
+It was created by opcodes $as_me 2.42.0, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -3138,7 +3138,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='opcodes'
- VERSION='2.42'
+ VERSION='2.42.0'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -15128,7 +15128,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by opcodes $as_me 2.42, which was
+This file was extended by opcodes $as_me 2.42.0, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -15194,7 +15194,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-opcodes config.status 2.42
+opcodes config.status 2.42.0
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
index 6c9079327feb5a614eca8ce2dbd9b5f725de6412..759c437334be085cd659e30b1769955d5dd42969 100644 (file)
@@ -1792,8 +1792,8 @@ vroundp<sd>, 0x6608 | <sd:opc>, AVX, Modrm|Vex|Space0F3A|VexWIG|CheckOperandSize
 vrounds<sd>, 0x660a | <sd:opc>, AVX, Modrm|VexLIG|Space0F3A|VexVVVV|VexWIG|NoSuf, { Imm8, <sd:elem>|Unspecified|BaseIndex|RegXMM, RegXMM, RegXMM }
 // These are really clones of VRNDSCALE{P,S}{S,D}, with broadcast, masking, SAE,
 // 512-bit operand size, and register sources dropped.
-vroundp<sd>, 0x6608 | <sd:opc>, APX_F, Modrm|Space0F3A|<sd:vexw>|Disp8ShiftVL|CheckOperandSize|NoSuf, { Imm8, Xmmword|Ymmword|Unspecified|BaseIndex, RegXMM|RegYMM }
-vrounds<sd>, 0x660a | <sd:opc>, APX_F, Modrm|EVexLIG|Space0F3A|VexVVVV|<sd:vexw>|Disp8MemShift|NoSuf, { Imm8, <sd:elem>|Unspecified|BaseIndex, RegXMM, RegXMM }
+vroundp<sd>, 0x6608 | <sd:opc>, APX_F&AVX512VL, Modrm|Space0F3A|<sd:vexw>|Disp8ShiftVL|CheckOperandSize|NoSuf, { Imm8, Xmmword|Ymmword|Unspecified|BaseIndex, RegXMM|RegYMM }
+vrounds<sd>, 0x660a | <sd:opc>, APX_F&AVX512F, Modrm|EVexLIG|Space0F3A|VexVVVV|<sd:vexw>|Disp8MemShift|NoSuf, { Imm8, <sd:elem>|Unspecified|BaseIndex, RegXMM, RegXMM }
 vrsqrtps, 0x52, AVX, Modrm|Vex|Space0F|VexWIG|CheckOperandSize|NoSuf, { Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM }
 vrsqrtss, 0xf352, AVX, Modrm|Vex=3|Space0F|VexVVVV|VexWIG|NoSuf, { Dword|Unspecified|BaseIndex|RegXMM, RegXMM, RegXMM }
 vshufp<sd>, 0x<sd:ppfx>c6, AVX, Modrm|Vex|Space0F|VexVVVV|VexWIG|CheckOperandSize|NoSuf, { Imm8|Imm8S, Unspecified|BaseIndex|RegXMM|RegYMM, RegXMM|RegYMM, RegXMM|RegYMM }
index 72d5b9fbcf7c97fac66889ad3fb3118feddb6938..169320dde17c1c1642405f3326a77d5b9d1c6200 100644 (file)
@@ -25296,7 +25296,7 @@ static const insn_template i386_optab[] =
     { 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
       0, 0, 0, 0, 0, 1, 1, 0, 0, 5, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0,
       0 },
-    { { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0 } },
+    { { 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0 } },
     { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } },
     { { { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
          0, 0, 0, 0, 0, 0 } },
@@ -25320,7 +25320,7 @@ static const insn_template i386_optab[] =
     { 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
       0, 0, 0, 0, 0, 2, 1, 0, 0, 5, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0,
       0 },
-    { { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0 } },
+    { { 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0 } },
     { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } },
     { { { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
          0, 0, 0, 0, 0, 0 } },
@@ -25346,7 +25346,7 @@ static const insn_template i386_optab[] =
     { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
       0, 0, 0, 0, 1, 1, 1, 0, 0, 4, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0,
       0 },
-    { { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0 } },
+    { { 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0 } },
     { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } },
     { { { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
          0, 0, 0, 0, 0, 0 } },
@@ -25374,7 +25374,7 @@ static const insn_template i386_optab[] =
     { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
       0, 0, 0, 0, 1, 2, 1, 0, 0, 4, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0,
       0 },
-    { { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0 } },
+    { { 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0 } },
     { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } },
     { { { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
          0, 0, 0, 0, 0, 0 } },
index a71874fa621c9b727f671aa6929f7fcb5f95b370..573fd3c4103897ed42900e71a842fc89b15370ff 100644 (file)
@@ -208,6 +208,11 @@ struct ppc_mopt ppc_opts[] = {
                | PPC_OPCODE_POWER7 | PPC_OPCODE_POWER8 | PPC_OPCODE_POWER9
                | PPC_OPCODE_POWER10 | PPC_OPCODE_ALTIVEC | PPC_OPCODE_VSX),
     0 },
+  { "power11", (PPC_OPCODE_PPC | PPC_OPCODE_ISEL | PPC_OPCODE_64
+               | PPC_OPCODE_POWER4 | PPC_OPCODE_POWER5 | PPC_OPCODE_POWER6
+               | PPC_OPCODE_POWER7 | PPC_OPCODE_POWER8 | PPC_OPCODE_POWER9
+               | PPC_OPCODE_POWER10 | PPC_OPCODE_ALTIVEC | PPC_OPCODE_VSX),
+    0 },
   { "libresoc",(PPC_OPCODE_PPC | PPC_OPCODE_ISEL | PPC_OPCODE_64
                | PPC_OPCODE_POWER4 | PPC_OPCODE_POWER5 | PPC_OPCODE_POWER6
                | PPC_OPCODE_POWER7 | PPC_OPCODE_POWER8 | PPC_OPCODE_POWER9
@@ -267,6 +272,11 @@ struct ppc_mopt ppc_opts[] = {
                | PPC_OPCODE_POWER7 | PPC_OPCODE_POWER8 | PPC_OPCODE_POWER9
                | PPC_OPCODE_POWER10 | PPC_OPCODE_ALTIVEC | PPC_OPCODE_VSX),
     0 },
+  { "pwr11",   (PPC_OPCODE_PPC | PPC_OPCODE_ISEL | PPC_OPCODE_64
+               | PPC_OPCODE_POWER4 | PPC_OPCODE_POWER5 | PPC_OPCODE_POWER6
+               | PPC_OPCODE_POWER7 | PPC_OPCODE_POWER8 | PPC_OPCODE_POWER9
+               | PPC_OPCODE_POWER10 | PPC_OPCODE_ALTIVEC | PPC_OPCODE_VSX),
+    0 },
   { "pwrx",    PPC_OPCODE_POWER | PPC_OPCODE_POWER2,
     0 },
   { "raw",     PPC_OPCODE_PPC,
@@ -396,7 +406,7 @@ powerpc_init_dialect (struct disassemble_info *info)
       break;
     default:
       if (info->arch == bfd_arch_powerpc)
-       dialect = ppc_parse_cpu (dialect, &sticky, "power10") | PPC_OPCODE_ANY;
+       dialect = ppc_parse_cpu (dialect, &sticky, "power11") | PPC_OPCODE_ANY;
       else
        dialect = ppc_parse_cpu (dialect, &sticky, "pwr");
       break;