branch-updates
authorMatthias Klose <doko@debian.org>
Fri, 30 Sep 2022 11:34:10 +0000 (12:34 +0100)
committerMatthias Klose <doko@debian.org>
Fri, 30 Sep 2022 11:34:10 +0000 (12:34 +0100)
# DP: updates from the binutils-2.39 branch

# DP: updates from the binutils-2.39 branch

# git diff b51c2fec1da205ea3e7354cbb3e253018d64873c cce7f76838e96f8817d834344faafdbeb66c007d

Gbp-Pq: Name branch-updates.diff

34 files changed:
bfd/configure
bfd/development.sh
bfd/elf.c
bfd/elfnn-loongarch.c
bfd/po/bfd.pot
bfd/version.h
bfd/version.m4
binutils/configure
gas/app.c
gas/as.h
gas/config/tc-ppc.c
gas/configure
gas/dwarf2dbg.c
gas/input-scrub.c
gas/macro.c
gas/sb.c
gas/testsuite/config/default.exp
gas/testsuite/gas/macros/app5.d [new file with mode: 0644]
gas/testsuite/gas/macros/app5.s [new file with mode: 0644]
gas/testsuite/gas/macros/macros.exp
gold/powerpc.cc
gprof/configure
gprofng/configure
gprofng/libcollector/configure
ld/NEWS
ld/configure
ld/testsuite/ld-elf/pr29435.d [new file with mode: 0644]
ld/testsuite/ld-elf/pr29435.s [new file with mode: 0644]
ld/testsuite/ld-loongarch-elf/pcrel-const.d [new file with mode: 0644]
ld/testsuite/ld-loongarch-elf/pcrel-const.lds [new file with mode: 0644]
ld/testsuite/ld-loongarch-elf/pcrel-const.s [new file with mode: 0644]
ld/testsuite/ld-loongarch-elf/pr.exp [new file with mode: 0644]
opcodes/configure
opcodes/po/opcodes.pot

index 24531087d421e5f61a698566e7fe64cb96f5bb5a..4f591b750d873cfe9135230c526382780fa5e7a5 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.39.
+# Generated by GNU Autoconf 2.69 for bfd 2.39.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.39'
-PACKAGE_STRING='bfd 2.39'
+PACKAGE_VERSION='2.39.0'
+PACKAGE_STRING='bfd 2.39.0'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
@@ -1390,7 +1390,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.39 to adapt to many kinds of systems.
+\`configure' configures bfd 2.39.0 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1461,7 +1461,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of bfd 2.39:";;
+     short | recursive ) echo "Configuration of bfd 2.39.0:";;
    esac
   cat <<\_ACEOF
 
@@ -1589,7 +1589,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-bfd configure 2.39
+bfd configure 2.39.0
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2183,7 +2183,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.39, which was
+It was created by bfd $as_me 2.39.0, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -3165,7 +3165,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='bfd'
- VERSION='2.39'
+ VERSION='2.39.0'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -15646,7 +15646,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.39, which was
+This file was extended by bfd $as_me 2.39.0, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -15712,7 +15712,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.39
+bfd config.status 2.39.0
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
index cd64202661b32847d8a26b79a1a7b7bdfb8d3103..6d29dc261618e0c9e4fb84513daf7181947fc2d4 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 89484ceb2339b94626b5dfbf7ff23c2e30654a44..8bd572d712ee6ddd40d1453612ecc5862a45d5d9 100644 (file)
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -5438,8 +5438,6 @@ assign_file_positions_for_load_sections (bfd *abfd,
   Elf_Internal_Phdr *p;
   file_ptr off;  /* Octets.  */
   bfd_size_type maxpagesize;
-  bfd_size_type p_align;
-  bool p_align_p = false;
   unsigned int alloc, actual;
   unsigned int i, j;
   struct elf_segment_map **sorted_seg_map;
@@ -5524,7 +5522,6 @@ assign_file_positions_for_load_sections (bfd *abfd,
     qsort (sorted_seg_map, alloc, sizeof (*sorted_seg_map),
           elf_sort_segments);
 
-  p_align = bed->p_align;
   maxpagesize = 1;
   if ((abfd->flags & D_PAGED) != 0)
     {
@@ -5559,6 +5556,8 @@ assign_file_positions_for_load_sections (bfd *abfd,
       asection **secpp;
       bfd_vma off_adjust;  /* Octets.  */
       bool no_contents;
+      bfd_size_type p_align;
+      bool p_align_p;
 
       /* An ELF segment (described by Elf_Internal_Phdr) may contain a
         number of sections with contents contributing to both p_filesz
@@ -5569,6 +5568,8 @@ assign_file_positions_for_load_sections (bfd *abfd,
       p = phdrs + m->idx;
       p->p_type = m->p_type;
       p->p_flags = m->p_flags;
+      p_align = bed->p_align;
+      p_align_p = false;
 
       if (m->count == 0)
        p->p_vaddr = m->p_vaddr_offset * opb;
index 5b44901b9e098e86e4c5a0faa86c84ffa2c42612..fafdc7c7458bed6207cf27503df03f99f231e6ad 100644 (file)
@@ -2341,9 +2341,10 @@ loongarch_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
        case R_LARCH_SOP_PUSH_PLT_PCREL:
          unresolved_reloc = false;
 
-         if (resolved_to_const)
+         if (!is_undefweak && resolved_to_const)
            {
              relocation += rel->r_addend;
+             relocation -= pc;
              break;
            }
          else if (is_undefweak)
index d169ada0bb430ec52bdc0594148f3cba9e88a866..6040522df0dc380b7560596524879d2f7b90be02 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: 2022-07-08 10:56+0100\n"
+"POT-Creation-Date: 2022-08-05 13:59+0100\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"
@@ -642,108 +642,108 @@ msgstr ""
 msgid "DWARF error: info pointer extends beyond end of attributes"
 msgstr ""
 
-#: dwarf2.c:1643
+#: dwarf2.c:1647
 #, c-format
 msgid "DWARF error: invalid or unhandled FORM value: %#x"
 msgstr ""
 
-#: dwarf2.c:1959
+#: dwarf2.c:1963
 msgid "DWARF error: mangled line number section (bad file number)"
 msgstr ""
 
-#: dwarf2.c:2497
+#: dwarf2.c:2501
 msgid "DWARF error: zero format count"
 msgstr ""
 
-#: dwarf2.c:2507
+#: dwarf2.c:2511
 #, c-format
 msgid "DWARF error: data count (%<PRIx64>) larger than buffer size"
 msgstr ""
 
-#: dwarf2.c:2546
+#: dwarf2.c:2550
 #, c-format
 msgid "DWARF error: unknown format content type %<PRIu64>"
 msgstr ""
 
-#: dwarf2.c:2621
+#: dwarf2.c:2625
 #, c-format
 msgid "DWARF error: line info section is too small (%<PRId64>)"
 msgstr ""
 
-#: dwarf2.c:2648
+#: dwarf2.c:2652
 #, c-format
 msgid ""
 "DWARF error: line info data is bigger (%#<PRIx64>) than the space remaining "
 "in the section (%#lx)"
 msgstr ""
 
-#: dwarf2.c:2661
+#: dwarf2.c:2665
 #, c-format
 msgid "DWARF error: unhandled .debug_line version %d"
 msgstr ""
 
-#: dwarf2.c:2670
+#: dwarf2.c:2674
 msgid "DWARF error: ran out of room reading prologue"
 msgstr ""
 
-#: dwarf2.c:2686
+#: dwarf2.c:2690
 #, c-format
 msgid "DWARF error: line info unsupported segment selector size %u"
 msgstr ""
 
-#: dwarf2.c:2708
+#: dwarf2.c:2712
 msgid "DWARF error: invalid maximum operations per instruction"
 msgstr ""
 
-#: dwarf2.c:2720
+#: dwarf2.c:2724
 msgid "DWARF error: ran out of room reading opcodes"
 msgstr ""
 
-#: dwarf2.c:2888
+#: dwarf2.c:2892
 msgid "DWARF error: mangled line number section"
 msgstr ""
 
-#: dwarf2.c:3375
+#: dwarf2.c:3379
 msgid "DWARF error: abstract instance recursion detected"
 msgstr ""
 
-#: dwarf2.c:3409 dwarf2.c:3503
+#: dwarf2.c:3413 dwarf2.c:3507
 msgid "DWARF error: invalid abstract instance DIE ref"
 msgstr ""
 
-#: dwarf2.c:3425
+#: dwarf2.c:3429
 #, c-format
 msgid "DWARF error: unable to read alt ref %<PRIu64>"
 msgstr ""
 
-#: dwarf2.c:3481
+#: dwarf2.c:3485
 #, c-format
 msgid "DWARF error: unable to locate abstract instance DIE ref %<PRIu64>"
 msgstr ""
 
-#: dwarf2.c:3518 dwarf2.c:3832 dwarf2.c:4394
+#: dwarf2.c:3522 dwarf2.c:3836 dwarf2.c:4398
 #, c-format
 msgid "DWARF error: could not find abbrev number %u"
 msgstr ""
 
-#: dwarf2.c:4098
+#: dwarf2.c:4102
 #, c-format
 msgid "DWARF error: could not find variable specification at offset 0x%lx"
 msgstr ""
 
-#: dwarf2.c:4250 dwarf2.c:4494
+#: dwarf2.c:4254 dwarf2.c:4498
 msgid ""
 "DWARF error: DW_AT_comp_dir attribute encountered with a non-string form"
 msgstr ""
 
-#: dwarf2.c:4321
+#: dwarf2.c:4325
 #, c-format
 msgid ""
 "DWARF error: found dwarf version '%u', this reader only handles version 2, "
 "3, 4 and 5 information"
 msgstr ""
 
-#: dwarf2.c:4358
+#: dwarf2.c:4362
 #, c-format
 msgid ""
 "DWARF error: found address size '%u', this reader can not handle sizes "
@@ -959,9 +959,9 @@ msgstr ""
 msgid "%pB: %s' accessed both as normal and thread local symbol"
 msgstr ""
 
-#: elf-m10300.c:2093 elf32-arm.c:13389 elf32-i386.c:3452 elf32-m32r.c:2331
+#: elf-m10300.c:2093 elf32-arm.c:13389 elf32-i386.c:3458 elf32-m32r.c:2331
 #: elf32-m68k.c:3929 elf32-s390.c:3080 elf32-sh.c:3671 elf32-tilepro.c:3275
-#: elf32-xtensa.c:3034 elf64-s390.c:3042 elf64-x86-64.c:4109 elfxx-sparc.c:2917
+#: elf32-xtensa.c:3034 elf64-s390.c:3042 elf64-x86-64.c:4107 elfxx-sparc.c:2917
 #: elfxx-sparc.c:3814 elfxx-tilegx.c:3665 elfnn-aarch64.c:5515
 #: elfnn-aarch64.c:7118
 #, c-format
@@ -1053,11 +1053,11 @@ msgstr ""
 msgid "Removed property %W to merge %pB (not found) and %pB (0x%v)\n"
 msgstr ""
 
-#: elf-properties.c:668 elfxx-aarch64.c:758 elfxx-x86.c:3738
+#: elf-properties.c:668 elfxx-aarch64.c:758 elfxx-x86.c:3755
 msgid "%F%P: failed to create GNU property section\n"
 msgstr ""
 
-#: elf-properties.c:672 elfxx-aarch64.c:762 elfxx-x86.c:3743
+#: elf-properties.c:672 elfxx-aarch64.c:762 elfxx-x86.c:3760
 #, c-format
 msgid "%F%pA: failed to align section\n"
 msgstr ""
@@ -2118,7 +2118,7 @@ msgstr ""
 
 #: elf32-arm.c:15353 elf32-arm.c:15487 elf32-i386.c:1511 elf32-s390.c:923
 #: elf32-tic6x.c:2724 elf32-tilepro.c:1435 elf32-xtensa.c:1102 elf64-s390.c:845
-#: elf64-x86-64.c:1882 elfxx-sparc.c:1386 elfxx-tilegx.c:1662 elfxx-x86.c:971
+#: elf64-x86-64.c:1882 elfxx-sparc.c:1386 elfxx-tilegx.c:1662 elfxx-x86.c:970
 #: elfnn-aarch64.c:7622 elfnn-loongarch.c:618 elfnn-riscv.c:660
 #, c-format
 msgid "%pB: bad symbol index: %d"
@@ -2258,8 +2258,8 @@ msgstr ""
 msgid "%pB(%pA+%#<PRIx64>): unresolvable relocation against symbol `%s'"
 msgstr ""
 
-#: elf32-bfin.c:1621 elf32-i386.c:3492 elf32-m68k.c:4006 elf32-s390.c:3138
-#: elf64-s390.c:3100 elf64-x86-64.c:4164
+#: elf32-bfin.c:1621 elf32-i386.c:3498 elf32-m68k.c:4006 elf32-s390.c:3138
+#: elf64-s390.c:3100 elf64-x86-64.c:4162
 #, c-format
 msgid "%pB(%pA+%#<PRIx64>): reloc against `%s': error %d"
 msgstr ""
@@ -2724,62 +2724,62 @@ msgstr ""
 msgid "%pB: unsupported non-PIC call to IFUNC `%s'"
 msgstr ""
 
-#: elf32-i386.c:1820 elf64-x86-64.c:2263
+#: elf32-i386.c:1821 elf64-x86-64.c:2264
 #, c-format
 msgid ""
 "%pB: non-canonical reference to canonical protected function `%s' in %pB"
 msgstr ""
 
-#: elf32-i386.c:2383 elf64-x86-64.c:2726 elfnn-riscv.c:2300
+#: elf32-i386.c:2384 elf64-x86-64.c:2727 elfnn-riscv.c:2300
 #, c-format
 msgid "%pB: relocation %s against STT_GNU_IFUNC symbol `%s' isn't supported"
 msgstr ""
 
-#: elf32-i386.c:2416 elf32-i386.c:3703 elf32-i386.c:3851 elf64-x86-64.c:2783
-#: elf64-x86-64.c:4337 elf64-x86-64.c:4500 elfnn-riscv.c:2173
+#: elf32-i386.c:2417 elf32-i386.c:3709 elf32-i386.c:3857 elf64-x86-64.c:2784
+#: elf64-x86-64.c:4335 elf64-x86-64.c:4498 elfnn-riscv.c:2173
 #: elfnn-riscv.c:2972 elfnn-riscv.c:3046
 #, c-format
 msgid "Local IFUNC function `%s' in %pB\n"
 msgstr ""
 
-#: elf32-i386.c:2589
+#: elf32-i386.c:2595
 #, c-format
 msgid ""
 "%pB: direct GOT relocation %s against `%s' without base register can not be "
 "used when making a shared object"
 msgstr ""
 
-#: elf32-i386.c:2624 elf64-x86-64.c:2999
+#: elf32-i386.c:2630 elf64-x86-64.c:3000
 msgid "hidden symbol"
 msgstr ""
 
-#: elf32-i386.c:2627 elf64-x86-64.c:3002
+#: elf32-i386.c:2633 elf64-x86-64.c:3003
 msgid "internal symbol"
 msgstr ""
 
-#: elf32-i386.c:2630 elf64-x86-64.c:3005
+#: elf32-i386.c:2636 elf64-x86-64.c:3006
 msgid "protected symbol"
 msgstr ""
 
-#: elf32-i386.c:2633 elf64-x86-64.c:3008
+#: elf32-i386.c:2639 elf64-x86-64.c:3009
 msgid "symbol"
 msgstr ""
 
-#: elf32-i386.c:2639
+#: elf32-i386.c:2645
 #, c-format
 msgid ""
 "%pB: relocation R_386_GOTOFF against undefined %s `%s' can not be used when "
 "making a shared object"
 msgstr ""
 
-#: elf32-i386.c:2652
+#: elf32-i386.c:2658
 #, c-format
 msgid ""
 "%pB: relocation R_386_GOTOFF against protected %s `%s' can not be used when "
 "making a shared object"
 msgstr ""
 
-#: elf32-i386.c:4054 elf64-x86-64.c:4711
+#: elf32-i386.c:4060 elf64-x86-64.c:4709
 msgid "%F%P: discarded output section: `%pA'\n"
 msgstr ""
 
@@ -3992,7 +3992,7 @@ msgstr ""
 msgid "warning: %pB and %pB differ in whether code is compiled for DSBT"
 msgstr ""
 
-#: elf32-tilepro.c:3627 elfxx-tilegx.c:4017 elfxx-x86.c:2431
+#: elf32-tilepro.c:3627 elfxx-tilegx.c:4017 elfxx-x86.c:2430
 #: elfnn-aarch64.c:9741 elfnn-loongarch.c:3148 elfnn-riscv.c:3269
 #, c-format
 msgid "discarded output section: `%pA'"
@@ -4923,21 +4923,21 @@ msgstr ""
 msgid "%pB: '%s' accessed both as normal and thread local symbol"
 msgstr ""
 
-#: elf64-x86-64.c:2752 elfnn-aarch64.c:5556 elfnn-riscv.c:2140
+#: elf64-x86-64.c:2753 elfnn-aarch64.c:5556 elfnn-riscv.c:2140
 #, c-format
 msgid ""
 "%pB: relocation %s against STT_GNU_IFUNC symbol `%s' has non-zero addend: "
 "%<PRId64>"
 msgstr ""
 
-#: elf64-x86-64.c:3014
+#: elf64-x86-64.c:3015
 #, c-format
 msgid ""
 "%pB: relocation R_X86_64_GOTOFF64 against undefined %s `%s' can not be used "
 "when making a shared object"
 msgstr ""
 
-#: elf64-x86-64.c:3028
+#: elf64-x86-64.c:3029
 #, c-format
 msgid ""
 "%pB: relocation R_X86_64_GOTOFF64 against protected %s `%s' can not be used "
@@ -4955,23 +4955,23 @@ msgstr ""
 msgid "%F%P: corrupt input: %pB\n"
 msgstr ""
 
-#: elf64-x86-64.c:4150
+#: elf64-x86-64.c:4148
 #, c-format
 msgid ""
 " failed to convert GOTPCREL relocation against '%s'; relink with --no-relax\n"
 msgstr ""
 
-#: elf64-x86-64.c:4311
+#: elf64-x86-64.c:4309
 #, c-format
 msgid "%F%pB: PC-relative offset overflow in PLT entry for `%s'\n"
 msgstr ""
 
-#: elf64-x86-64.c:4379
+#: elf64-x86-64.c:4377
 #, c-format
 msgid "%F%pB: branch displacement overflow in PLT entry for `%s'\n"
 msgstr ""
 
-#: elf64-x86-64.c:4432
+#: elf64-x86-64.c:4430
 #, c-format
 msgid "%F%pB: PC-relative offset overflow in GOT PLT entry for `%s'\n"
 msgstr ""
@@ -5900,132 +5900,132 @@ msgstr ""
 msgid "%pB: cannot link together %s and %s objects"
 msgstr ""
 
-#: elfxx-x86.c:537
+#: elfxx-x86.c:536 elfxx-x86.c:3053
 #, c-format
 msgid ""
 "%F%P: %pB: copy relocation against non-copyable protected symbol `%s' in "
 "%pB\n"
 msgstr ""
 
-#: elfxx-x86.c:1044
+#: elfxx-x86.c:1043
 #, c-format
 msgid "%F%P: %pB: failed to allocate relative reloc record\n"
 msgstr ""
 
-#: elfxx-x86.c:1386
+#: elfxx-x86.c:1385
 #, c-format
 msgid "%F%P: %pB: failed to allocate 64-bit DT_RELR bitmap\n"
 msgstr ""
 
-#: elfxx-x86.c:1422
+#: elfxx-x86.c:1421
 #, c-format
 msgid "%F%P: %pB: failed to allocate 32-bit DT_RELR bitmap\n"
 msgstr ""
 
-#: elfxx-x86.c:1727
+#: elfxx-x86.c:1726
 #, c-format
 msgid ""
 "%F%P: %pB: size of compact relative reloc section is changed: new (%lu) != "
 "old (%lu)\n"
 msgstr ""
 
-#: elfxx-x86.c:1749
+#: elfxx-x86.c:1748
 #, c-format
 msgid "%F%P: %pB: failed to allocate compact relative reloc section\n"
 msgstr ""
 
-#: elfxx-x86.c:2009
+#: elfxx-x86.c:2008
 #, c-format
 msgid ""
 "%F%P: %pB: relocation %s against absolute symbol `%s' in section `%pA' is "
 "disallowed\n"
 msgstr ""
 
-#: elfxx-x86.c:2091
+#: elfxx-x86.c:2090
 msgid "%P: %pB: warning: relocation in read-only section `%pA'\n"
 msgstr ""
 
-#: elfxx-x86.c:2807
+#: elfxx-x86.c:2806
 msgid ""
 "%pB: %s (offset: 0x%v, info: 0x%v, addend: 0x%v) against '%s' for section "
 "'%pA' in %pB\n"
 msgstr ""
 
-#: elfxx-x86.c:2813
+#: elfxx-x86.c:2812
 msgid ""
 "%pB: %s (offset: 0x%v, info: 0x%v) against '%s' for section '%pA' in %pB\n"
 msgstr ""
 
-#: elfxx-x86.c:3410
+#: elfxx-x86.c:3427
 #, c-format
 msgid "error: %pB: <corrupt x86 property (0x%x) size: 0x%x>"
 msgstr ""
 
-#: elfxx-x86.c:3757
+#: elfxx-x86.c:3774
 msgid "%P: %pB: warning: missing %s\n"
 msgstr ""
 
-#: elfxx-x86.c:3758
+#: elfxx-x86.c:3775
 msgid "%X%P: %pB: error: missing %s\n"
 msgstr ""
 
-#: elfxx-x86.c:3821
+#: elfxx-x86.c:3838
 msgid "IBT and SHSTK properties"
 msgstr ""
 
-#: elfxx-x86.c:3823
+#: elfxx-x86.c:3840
 msgid "IBT property"
 msgstr ""
 
-#: elfxx-x86.c:3825
+#: elfxx-x86.c:3842
 msgid "SHSTK property"
 msgstr ""
 
-#: elfxx-x86.c:3830
+#: elfxx-x86.c:3847
 msgid "LAM_U48 property"
 msgstr ""
 
-#: elfxx-x86.c:3835
+#: elfxx-x86.c:3852
 msgid "LAM_U57 property"
 msgstr ""
 
-#: elfxx-x86.c:3979
+#: elfxx-x86.c:3996
 msgid "%F%P: failed to create VxWorks dynamic sections\n"
 msgstr ""
 
-#: elfxx-x86.c:3988
+#: elfxx-x86.c:4005
 msgid "%F%P: failed to create GOT sections\n"
 msgstr ""
 
-#: elfxx-x86.c:4006
+#: elfxx-x86.c:4023
 msgid "%F%P: failed to create ifunc sections\n"
 msgstr ""
 
-#: elfxx-x86.c:4043
+#: elfxx-x86.c:4060
 msgid "%F%P: failed to create GOT PLT section\n"
 msgstr ""
 
-#: elfxx-x86.c:4062
+#: elfxx-x86.c:4079
 msgid "%F%P: failed to create IBT-enabled PLT section\n"
 msgstr ""
 
-#: elfxx-x86.c:4076
+#: elfxx-x86.c:4093
 msgid "%F%P: failed to create BND PLT section\n"
 msgstr ""
 
-#: elfxx-x86.c:4096
+#: elfxx-x86.c:4113
 msgid "%F%P: failed to create PLT .eh_frame section\n"
 msgstr ""
 
-#: elfxx-x86.c:4109
+#: elfxx-x86.c:4126
 msgid "%F%P: failed to create GOT PLT .eh_frame section\n"
 msgstr ""
 
-#: elfxx-x86.c:4123
+#: elfxx-x86.c:4140
 msgid "%F%P: failed to create the second PLT .eh_frame section\n"
 msgstr ""
 
-#: elfxx-x86.c:4165
+#: elfxx-x86.c:4182
 msgid "%X%P: attempted static link of dynamic object `%pB'\n"
 msgstr ""
 
index cfc9eaba9ec7c16455d13fabe912da49159b5e67..1c6b8efc2b38bfa0fee7ee9d280e0c69ddc85a0b 100644 (file)
@@ -16,7 +16,7 @@
 
    In releases, the date is not included in either version strings or
    sonames.  */
-#define BFD_VERSION_DATE 20220805
+#define BFD_VERSION_DATE 20220929
 #define BFD_VERSION @bfd_version@
 #define BFD_VERSION_STRING  @bfd_version_package@ @bfd_version_string@
 #define REPORT_BUGS_TO @report_bugs_to@
index 0b64e763be157e6480844e0814efe7295d416ab6..ff04d4aebe9567678d51485941089fcec4384cbb 100644 (file)
@@ -1 +1 @@
-m4_define([BFD_VERSION], [2.39])
+m4_define([BFD_VERSION], [2.39.0])
index 0270c7b9c125ea779f4f2d36696d0b0cfcb48a80..149815542f919042b134fa6a00014b080a4ad556 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.39.
+# Generated by GNU Autoconf 2.69 for binutils 2.39.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.39'
-PACKAGE_STRING='binutils 2.39'
+PACKAGE_VERSION='2.39.0'
+PACKAGE_STRING='binutils 2.39.0'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
@@ -1395,7 +1395,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.39 to adapt to many kinds of systems.
+\`configure' configures binutils 2.39.0 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1466,7 +1466,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of binutils 2.39:";;
+     short | recursive ) echo "Configuration of binutils 2.39.0:";;
    esac
   cat <<\_ACEOF
 
@@ -1618,7 +1618,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-binutils configure 2.39
+binutils configure 2.39.0
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2269,7 +2269,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.39, which was
+It was created by binutils $as_me 2.39.0, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -3251,7 +3251,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='binutils'
- VERSION='2.39'
+ VERSION='2.39.0'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -15419,7 +15419,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.39, which was
+This file was extended by binutils $as_me 2.39.0, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -15485,7 +15485,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.39
+binutils config.status 2.39.0
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
index a3ad146625caf8fb5c0a609f7f4bf95c3b91902b..096829fd54146b6ed3cb891f67f5442e84ac676e 100644 (file)
--- a/gas/app.c
+++ b/gas/app.c
@@ -1537,3 +1537,16 @@ do_scrub_chars (size_t (*get) (char *, size_t), char *tostart, size_t tolen)
     last_char = to[-1];
   return to - tostart;
 }
+
+/* Return amount of pending input.  */
+
+size_t
+do_scrub_pending (void)
+{
+  size_t len = 0;
+  if (saved_input)
+    len += saved_input_len;
+  if (state == -1)
+    len += strlen (out_string);
+  return len;
+}
index 4fac7d21a3203134a5becda4f91a2c8eb67bdf9e..58b93bbc9bed918597c1e213462b17599007d84e 100644 (file)
--- a/gas/as.h
+++ b/gas/as.h
@@ -460,6 +460,7 @@ void   input_scrub_insert_file (char *);
 char * input_scrub_new_file (const char *);
 char * input_scrub_next_buffer (char **bufp);
 size_t do_scrub_chars (size_t (*get) (char *, size_t), char *, size_t);
+size_t do_scrub_pending (void);
 bool   scan_for_multibyte_characters (const unsigned char *, const unsigned char *, bool);
 int    gen_to_words (LITTLENUM_TYPE *, int, long);
 int    had_err (void);
index 25550528c05a8f7829ca5a194b610c3e2b3b0006..ce27be221e55a613e4bac755a574ea4c835ad801 100644 (file)
@@ -6666,8 +6666,6 @@ ppc_force_relocation (fixS *fix)
 int
 ppc_force_relocation (fixS *fix)
 {
-  /* Branch prediction relocations must force a relocation, as must
-     the vtable description relocs.  */
   switch (fix->fx_r_type)
     {
     case BFD_RELOC_PPC_B16_BRTAKEN:
@@ -6676,6 +6674,60 @@ ppc_force_relocation (fixS *fix)
     case BFD_RELOC_PPC_BA16_BRNTAKEN:
     case BFD_RELOC_24_PLT_PCREL:
     case BFD_RELOC_PPC64_TOC:
+    case BFD_RELOC_16_GOTOFF:
+    case BFD_RELOC_LO16_GOTOFF:
+    case BFD_RELOC_HI16_GOTOFF:
+    case BFD_RELOC_HI16_S_GOTOFF:
+    case BFD_RELOC_LO16_PLTOFF:
+    case BFD_RELOC_HI16_PLTOFF:
+    case BFD_RELOC_HI16_S_PLTOFF:
+    case BFD_RELOC_GPREL16:
+    case BFD_RELOC_16_BASEREL:
+    case BFD_RELOC_LO16_BASEREL:
+    case BFD_RELOC_HI16_BASEREL:
+    case BFD_RELOC_HI16_S_BASEREL:
+    case BFD_RELOC_PPC_TOC16:
+    case BFD_RELOC_PPC64_TOC16_LO:
+    case BFD_RELOC_PPC64_TOC16_HI:
+    case BFD_RELOC_PPC64_TOC16_HA:
+    case BFD_RELOC_PPC64_PLTGOT16:
+    case BFD_RELOC_PPC64_PLTGOT16_LO:
+    case BFD_RELOC_PPC64_PLTGOT16_HI:
+    case BFD_RELOC_PPC64_PLTGOT16_HA:
+    case BFD_RELOC_PPC64_GOT16_DS:
+    case BFD_RELOC_PPC64_GOT16_LO_DS:
+    case BFD_RELOC_PPC64_PLT16_LO_DS:
+    case BFD_RELOC_PPC64_SECTOFF_DS:
+    case BFD_RELOC_PPC64_SECTOFF_LO_DS:
+    case BFD_RELOC_PPC64_TOC16_DS:
+    case BFD_RELOC_PPC64_TOC16_LO_DS:
+    case BFD_RELOC_PPC64_PLTGOT16_DS:
+    case BFD_RELOC_PPC64_PLTGOT16_LO_DS:
+    case BFD_RELOC_PPC_EMB_NADDR16:
+    case BFD_RELOC_PPC_EMB_NADDR16_LO:
+    case BFD_RELOC_PPC_EMB_NADDR16_HI:
+    case BFD_RELOC_PPC_EMB_NADDR16_HA:
+    case BFD_RELOC_PPC_EMB_SDAI16:
+    case BFD_RELOC_PPC_EMB_SDA2I16:
+    case BFD_RELOC_PPC_EMB_SDA2REL:
+    case BFD_RELOC_PPC_EMB_SDA21:
+    case BFD_RELOC_PPC_EMB_MRKREF:
+    case BFD_RELOC_PPC_EMB_RELSEC16:
+    case BFD_RELOC_PPC_EMB_RELST_LO:
+    case BFD_RELOC_PPC_EMB_RELST_HI:
+    case BFD_RELOC_PPC_EMB_RELST_HA:
+    case BFD_RELOC_PPC_EMB_BIT_FLD:
+    case BFD_RELOC_PPC_EMB_RELSDA:
+    case BFD_RELOC_PPC_VLE_SDA21:
+    case BFD_RELOC_PPC_VLE_SDA21_LO:
+    case BFD_RELOC_PPC_VLE_SDAREL_LO16A:
+    case BFD_RELOC_PPC_VLE_SDAREL_LO16D:
+    case BFD_RELOC_PPC_VLE_SDAREL_HI16A:
+    case BFD_RELOC_PPC_VLE_SDAREL_HI16D:
+    case BFD_RELOC_PPC_VLE_SDAREL_HA16A:
+    case BFD_RELOC_PPC_VLE_SDAREL_HA16D:
+    case BFD_RELOC_PPC64_PLT_PCREL34:
+    case BFD_RELOC_PPC64_GOT_PCREL34:
       return 1;
     case BFD_RELOC_PPC_B26:
     case BFD_RELOC_PPC_BA26:
index 1c614b469d616631cfd721236f2ce202b8ccc848..12c16faefd939499466cd2ffa42e20a08c18781b 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.39.
+# Generated by GNU Autoconf 2.69 for gas 2.39.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.39'
-PACKAGE_STRING='gas 2.39'
+PACKAGE_VERSION='2.39.0'
+PACKAGE_STRING='gas 2.39.0'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
@@ -1369,7 +1369,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.39 to adapt to many kinds of systems.
+\`configure' configures gas 2.39.0 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1440,7 +1440,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of gas 2.39:";;
+     short | recursive ) echo "Configuration of gas 2.39.0:";;
    esac
   cat <<\_ACEOF
 
@@ -1576,7 +1576,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-gas configure 2.39
+gas configure 2.39.0
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1987,7 +1987,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.39, which was
+It was created by gas $as_me 2.39.0, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2966,7 +2966,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='gas'
- VERSION='2.39'
+ VERSION='2.39.0'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -14611,7 +14611,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.39, which was
+This file was extended by gas $as_me 2.39.0, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -14677,7 +14677,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.39
+gas config.status 2.39.0
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
index 868ec79ee2cff6262a5ea2857633558936f846af..f346bd6a412e0ac549efee6ee6721c279b0cd581 100644 (file)
@@ -2882,6 +2882,7 @@ out_debug_info (segT info_seg, segT abbrev_seg, segT line_seg, segT str_seg,
        {
          const char *name;
          size_t len;
+         expressionS size = { .X_op = O_constant };
 
          /* Skip warning constructs (see above).  */
          if (symbol_get_bfdsym (symp)->flags & BSF_WARNING)
@@ -2895,6 +2896,18 @@ out_debug_info (segT info_seg, segT abbrev_seg, segT line_seg, segT str_seg,
          if (!S_IS_DEFINED (symp) || !S_IS_FUNCTION (symp))
            continue;
 
+#if defined (OBJ_ELF) /* || defined (OBJ_MAYBE_ELF) */
+         size.X_add_number = S_GET_SIZE (symp);
+         if (size.X_add_number == 0 && IS_ELF
+             && symbol_get_obj (symp)->size != NULL)
+           {
+             size.X_op = O_add;
+             size.X_op_symbol = make_expr_symbol (symbol_get_obj (symp)->size);
+           }
+#endif
+         if (size.X_op == O_constant && size.X_add_number == 0)
+           continue;
+
          subseg_set (str_seg, 0);
          name_sym = symbol_temp_new_now_octets ();
          name = S_GET_NAME (symp);
@@ -2920,29 +2933,17 @@ out_debug_info (segT info_seg, segT abbrev_seg, segT line_seg, segT str_seg,
          emit_expr (&exp, sizeof_address);
 
          /* DW_AT_high_pc */
-         exp.X_op = O_constant;
-#if defined (OBJ_ELF) /* || defined (OBJ_MAYBE_ELF) */
-         exp.X_add_number = S_GET_SIZE (symp);
-         if (exp.X_add_number == 0 && IS_ELF
-             && symbol_get_obj (symp)->size != NULL)
-           {
-             exp.X_op = O_add;
-             exp.X_op_symbol = make_expr_symbol (symbol_get_obj (symp)->size);
-           }
-#else
-         exp.X_add_number = 0;
-#endif
          if (DWARF2_VERSION < 4)
            {
-             if (exp.X_op == O_constant)
-               exp.X_op = O_symbol;
-             exp.X_add_symbol = symp;
-             emit_expr (&exp, sizeof_address);
+             if (size.X_op == O_constant)
+               size.X_op = O_symbol;
+             size.X_add_symbol = symp;
+             emit_expr (&size, sizeof_address);
            }
-         else if (exp.X_op == O_constant)
-           out_uleb128 (exp.X_add_number);
+         else if (size.X_op == O_constant)
+           out_uleb128 (size.X_add_number);
          else
-           emit_leb128_expr (symbol_get_value_expression (exp.X_op_symbol), 0);
+           emit_leb128_expr (symbol_get_value_expression (size.X_op_symbol), 0);
        }
 
       /* End of children.  */
index ec0b007c77a1a8f0f7931d7e79c61882844b7971..44e4bdca521c4f1fc117ab9c0e4f7d3edce9da79 100644 (file)
@@ -278,9 +278,11 @@ input_scrub_include_sb (sb *from, char *position, enum expansion expansion)
 
   next_saved_file = input_scrub_push (position);
 
-  /* Allocate sufficient space: from->len + optional newline.  */
+  /* Allocate sufficient space: from->len plus optional newline
+     plus two ".linefile " directives, plus a little more for other
+     expansion.  */
   newline = from->len >= 1 && from->ptr[0] != '\n';
-  sb_build (&from_sb, from->len + newline);
+  sb_build (&from_sb, from->len + newline + 2 * sizeof (".linefile") + 30);
   if (expansion == expanding_repeat && from_sb_expansion >= expanding_macro)
     expansion = expanding_nested;
   from_sb_expansion = expansion;
index 3aba78f6bfeedff2afc78169ab802e0ed7e7db71..c9db444049bb365c7b446e0ed78afe1dfe572b44 100644 (file)
@@ -1056,6 +1056,8 @@ macro_expand_body (sb *in, sb *out, formal_entry *formals,
       loclist = f;
     }
 
+  if (!err && (out->len == 0 || out->ptr[out->len - 1] != '\n'))
+    sb_add_char (out, '\n');
   return err;
 }
 
index c44016a0338fe0447a46a4fd77e94eda377f134f..e83a5f524f80e35a40a8f9000613d47327658857 100644 (file)
--- a/gas/sb.c
+++ b/gas/sb.c
@@ -119,11 +119,12 @@ sb_scrub_and_add_sb (sb *ptr, sb *s)
      So we loop until the input S is consumed.  */
   while (1)
     {
-      size_t copy = s->len - (scrub_position - s->ptr);
+      size_t copy = s->len - (scrub_position - s->ptr) + do_scrub_pending ();
       if (copy == 0)
        break;
       sb_check (ptr, copy);
-      ptr->len += do_scrub_chars (scrub_from_sb, ptr->ptr + ptr->len, copy);
+      ptr->len += do_scrub_chars (scrub_from_sb, ptr->ptr + ptr->len,
+                                 ptr->max - ptr->len);
     }
 
   sb_to_scrub = 0;
index 5a3dda915f77b2808c17d79df65dcbc0da9a4d94..507257a539f400c8d01fcdf3805aa375b98b15b4 100644 (file)
@@ -52,6 +52,14 @@ if ![info exists NMFLAGS] then {
     set NMFLAGS {}
 }
 
+if ![info exists SIZE] then {
+    set SIZE [findfile $base_dir/../../binutils/size]
+}
+
+if ![info exists SIZEFLAGS] then {
+    set SIZEFLAGS ""
+}
+
 if ![info exists OBJCOPY] then {
     set OBJCOPY [findfile $base_dir/../../binutils/objcopy]
 }
diff --git a/gas/testsuite/gas/macros/app5.d b/gas/testsuite/gas/macros/app5.d
new file mode 100644 (file)
index 0000000..0a1483c
--- /dev/null
@@ -0,0 +1,6 @@
+#name: APP with linefile
+#xfail: tic30-*-*
+#size: -G
+# pr29466 just check that the test assembles
+
+#pass
diff --git a/gas/testsuite/gas/macros/app5.s b/gas/testsuite/gas/macros/app5.s
new file mode 100644 (file)
index 0000000..a960ae2
--- /dev/null
@@ -0,0 +1,5 @@
+#NO_APP
+#APP
+# 5 "foo.c" 1
+# 0 "" 2
+#NO_APP
index 915c45d74f6607c414c30143beb45a45428d05c4..7a45af4a30869ea128a0bda9aa52a01d3ad74707 100644 (file)
@@ -70,6 +70,7 @@ run_dump_test app2
 run_dump_test app3
 remote_download host "$srcdir/$subdir/app4b.s"
 run_dump_test app4
+run_dump_test app5
 
 run_list_test badarg ""
 
index 86e2b99be4efd797a8af71822173caa84fe716d6..b950869d0b6d1b15dbc1a29465443d955d0967bd 100644 (file)
@@ -4338,7 +4338,8 @@ template<int size, bool big_endian>
 void
 Output_data_plt_powerpc<size, big_endian>::do_write(Output_file* of)
 {
-  if (!this->sym_ents_.empty())
+  if (!this->sym_ents_.empty()
+      && !parameters->options().output_is_position_independent())
     {
       const section_size_type offset = this->offset();
       const section_size_type oview_size
@@ -7675,22 +7676,18 @@ Target_powerpc<size, big_endian>::Scan::get_reference_flags(
 
   switch (r_type)
     {
+    case elfcpp::R_PPC64_TOC:
+      if (size != 64)
+       break;
+      // Fall through.
     case elfcpp::R_POWERPC_NONE:
     case elfcpp::R_POWERPC_GNU_VTINHERIT:
     case elfcpp::R_POWERPC_GNU_VTENTRY:
-    case elfcpp::R_PPC64_TOC:
       // No symbol reference.
       break;
 
     case elfcpp::R_PPC64_ADDR64:
     case elfcpp::R_PPC64_UADDR64:
-    case elfcpp::R_POWERPC_ADDR32:
-    case elfcpp::R_POWERPC_UADDR32:
-    case elfcpp::R_POWERPC_ADDR16:
-    case elfcpp::R_POWERPC_UADDR16:
-    case elfcpp::R_POWERPC_ADDR16_LO:
-    case elfcpp::R_POWERPC_ADDR16_HI:
-    case elfcpp::R_POWERPC_ADDR16_HA:
     case elfcpp::R_PPC64_ADDR16_HIGHER34:
     case elfcpp::R_PPC64_ADDR16_HIGHERA34:
     case elfcpp::R_PPC64_ADDR16_HIGHEST34:
@@ -7700,6 +7697,16 @@ Target_powerpc<size, big_endian>::Scan::get_reference_flags(
     case elfcpp::R_PPC64_D34_HI30:
     case elfcpp::R_PPC64_D34_HA30:
     case elfcpp::R_PPC64_D28:
+      if (size != 64)
+       break;
+      // Fall through.
+    case elfcpp::R_POWERPC_ADDR32:
+    case elfcpp::R_POWERPC_UADDR32:
+    case elfcpp::R_POWERPC_ADDR16:
+    case elfcpp::R_POWERPC_UADDR16:
+    case elfcpp::R_POWERPC_ADDR16_LO:
+    case elfcpp::R_POWERPC_ADDR16_HI:
+    case elfcpp::R_POWERPC_ADDR16_HA:
       ref = Symbol::ABSOLUTE_REF;
       break;
 
@@ -7710,13 +7717,14 @@ Target_powerpc<size, big_endian>::Scan::get_reference_flags(
       ref = Symbol::FUNCTION_CALL | Symbol::ABSOLUTE_REF;
       break;
 
-    case elfcpp::R_PPC64_REL64:
-    case elfcpp::R_POWERPC_REL32:
     case elfcpp::R_PPC_LOCAL24PC:
-    case elfcpp::R_POWERPC_REL16:
-    case elfcpp::R_POWERPC_REL16_LO:
-    case elfcpp::R_POWERPC_REL16_HI:
-    case elfcpp::R_POWERPC_REL16_HA:
+      if (size != 32)
+       break;
+      // Fall through.
+      ref = Symbol::RELATIVE_REF;
+      break;
+
+    case elfcpp::R_PPC64_REL64:
     case elfcpp::R_PPC64_REL16_HIGH:
     case elfcpp::R_PPC64_REL16_HIGHA:
     case elfcpp::R_PPC64_REL16_HIGHER:
@@ -7729,36 +7737,45 @@ Target_powerpc<size, big_endian>::Scan::get_reference_flags(
     case elfcpp::R_PPC64_REL16_HIGHEST34:
     case elfcpp::R_PPC64_REL16_HIGHESTA34:
     case elfcpp::R_PPC64_PCREL28:
+      if (size != 64)
+       break;
+      // Fall through.
+    case elfcpp::R_POWERPC_REL32:
+    case elfcpp::R_POWERPC_REL16:
+    case elfcpp::R_POWERPC_REL16_LO:
+    case elfcpp::R_POWERPC_REL16_HI:
+    case elfcpp::R_POWERPC_REL16_HA:
       ref = Symbol::RELATIVE_REF;
       break;
 
+    case elfcpp::R_PPC_PLTREL24:
+      if (size != 32)
+       break;
+      ref = Symbol::FUNCTION_CALL | Symbol::RELATIVE_REF;
+      break;
+
     case elfcpp::R_PPC64_REL24_NOTOC:
-      if (size == 32)
+    case elfcpp::R_PPC64_REL24_P9NOTOC:
+    case elfcpp::R_PPC64_PLT16_LO_DS:
+    case elfcpp::R_PPC64_PLTSEQ_NOTOC:
+    case elfcpp::R_PPC64_PLTCALL_NOTOC:
+    case elfcpp::R_PPC64_PLT_PCREL34:
+    case elfcpp::R_PPC64_PLT_PCREL34_NOTOC:
+      if (size != 64)
        break;
       // Fall through.
-    case elfcpp::R_PPC64_REL24_P9NOTOC:
     case elfcpp::R_POWERPC_REL24:
-    case elfcpp::R_PPC_PLTREL24:
     case elfcpp::R_POWERPC_REL14:
     case elfcpp::R_POWERPC_REL14_BRTAKEN:
     case elfcpp::R_POWERPC_REL14_BRNTAKEN:
     case elfcpp::R_POWERPC_PLT16_LO:
     case elfcpp::R_POWERPC_PLT16_HI:
     case elfcpp::R_POWERPC_PLT16_HA:
-    case elfcpp::R_PPC64_PLT16_LO_DS:
     case elfcpp::R_POWERPC_PLTSEQ:
-    case elfcpp::R_PPC64_PLTSEQ_NOTOC:
     case elfcpp::R_POWERPC_PLTCALL:
-    case elfcpp::R_PPC64_PLTCALL_NOTOC:
-    case elfcpp::R_PPC64_PLT_PCREL34:
-    case elfcpp::R_PPC64_PLT_PCREL34_NOTOC:
       ref = Symbol::FUNCTION_CALL | Symbol::RELATIVE_REF;
       break;
 
-    case elfcpp::R_POWERPC_GOT16:
-    case elfcpp::R_POWERPC_GOT16_LO:
-    case elfcpp::R_POWERPC_GOT16_HI:
-    case elfcpp::R_POWERPC_GOT16_HA:
     case elfcpp::R_PPC64_GOT16_DS:
     case elfcpp::R_PPC64_GOT16_LO_DS:
     case elfcpp::R_PPC64_GOT_PCREL34:
@@ -7768,11 +7785,16 @@ Target_powerpc<size, big_endian>::Scan::get_reference_flags(
     case elfcpp::R_PPC64_TOC16_HA:
     case elfcpp::R_PPC64_TOC16_DS:
     case elfcpp::R_PPC64_TOC16_LO_DS:
+      if (size != 64)
+       break;
+      // Fall through.
+    case elfcpp::R_POWERPC_GOT16:
+    case elfcpp::R_POWERPC_GOT16_LO:
+    case elfcpp::R_POWERPC_GOT16_HI:
+    case elfcpp::R_POWERPC_GOT16_HA:
       ref = Symbol::RELATIVE_REF;
       break;
 
-    case elfcpp::R_POWERPC_GOT_TPREL16:
-    case elfcpp::R_POWERPC_TLS:
     case elfcpp::R_PPC64_TLSGD:
     case elfcpp::R_PPC64_TLSLD:
     case elfcpp::R_PPC64_TPREL34:
@@ -7781,6 +7803,11 @@ Target_powerpc<size, big_endian>::Scan::get_reference_flags(
     case elfcpp::R_PPC64_GOT_TLSLD_PCREL34:
     case elfcpp::R_PPC64_GOT_TPREL_PCREL34:
     case elfcpp::R_PPC64_GOT_DTPREL_PCREL34:
+      if (size != 64)
+       break;
+      // Fall through.
+    case elfcpp::R_POWERPC_GOT_TPREL16:
+    case elfcpp::R_POWERPC_TLS:
       ref = Symbol::TLS_REF;
       break;
 
@@ -10671,10 +10698,8 @@ Target_powerpc<size, big_endian>::Relocate::relocate(
   bool has_stub_value = false;
   bool localentry0 = false;
   unsigned int r_sym = elfcpp::elf_r_sym<size>(rela.get_r_info());
-  bool use_plt_offset
-    = (gsym != NULL
-       ? gsym->use_plt_offset(Scan::get_reference_flags(r_type, target))
-       : object->local_has_plt_offset(r_sym));
+  bool pltcall_to_direct = false;
+
   if (is_plt16_reloc<size>(r_type)
       || r_type == elfcpp::R_PPC64_PLT_PCREL34
       || r_type == elfcpp::R_PPC64_PLT_PCREL34_NOTOC
@@ -10688,21 +10713,18 @@ Target_powerpc<size, big_endian>::Relocate::relocate(
       // that the decision depends on the PLTCALL reloc, and we don't
       // know the address of that instruction when processing others
       // in the sequence.  So the decision needs to be made in
-      // do_relax().  For now, don't optimise inline plt calls.
-      if (gsym)
-       use_plt_offset = gsym->has_plt_offset();
-    }
-  if (use_plt_offset
-      && !is_got_reloc(r_type)
-      && !is_plt16_reloc<size>(r_type)
-      && r_type != elfcpp::R_PPC64_PLT_PCREL34
-      && r_type != elfcpp::R_PPC64_PLT_PCREL34_NOTOC
-      && r_type != elfcpp::R_POWERPC_PLTSEQ
-      && r_type != elfcpp::R_POWERPC_PLTCALL
-      && r_type != elfcpp::R_PPC64_PLTSEQ_NOTOC
-      && r_type != elfcpp::R_PPC64_PLTCALL_NOTOC
-      && (!psymval->is_ifunc_symbol()
-         || Scan::reloc_needs_plt_for_ifunc(target, object, r_type, false)))
+      // do_relax().
+      pltcall_to_direct = !(gsym != NULL
+                           ? gsym->has_plt_offset()
+                           : object->local_has_plt_offset(r_sym));
+    }
+  else if ((gsym != NULL
+           ? gsym->use_plt_offset(Scan::get_reference_flags(r_type, target))
+           : psymval->is_ifunc_symbol() && object->local_has_plt_offset(r_sym))
+          && !is_got_reloc(r_type)
+          && (!psymval->is_ifunc_symbol()
+              || Scan::reloc_needs_plt_for_ifunc(target, object, r_type,
+                                                 false)))
     {
       if (size == 64
          && gsym != NULL
@@ -10796,9 +10818,9 @@ Target_powerpc<size, big_endian>::Relocate::relocate(
       gold_assert(has_stub_value || !(os->flags() & elfcpp::SHF_ALLOC));
     }
 
-  if (use_plt_offset && (is_plt16_reloc<size>(r_type)
-                        || r_type == elfcpp::R_PPC64_PLT_PCREL34
-                        || r_type == elfcpp::R_PPC64_PLT_PCREL34_NOTOC))
+  if (!pltcall_to_direct && (is_plt16_reloc<size>(r_type)
+                            || r_type == elfcpp::R_PPC64_PLT_PCREL34
+                            || r_type == elfcpp::R_PPC64_PLT_PCREL34_NOTOC))
     {
       const Output_data_plt_powerpc<size, big_endian>* plt;
       if (gsym)
@@ -10826,7 +10848,7 @@ Target_powerpc<size, big_endian>::Relocate::relocate(
            value -= target->toc_pointer();
        }
     }
-  else if (!use_plt_offset
+  else if (pltcall_to_direct
           && (is_plt16_reloc<size>(r_type)
               || r_type == elfcpp::R_POWERPC_PLTSEQ
               || r_type == elfcpp::R_PPC64_PLTSEQ_NOTOC))
@@ -10835,7 +10857,7 @@ Target_powerpc<size, big_endian>::Relocate::relocate(
       elfcpp::Swap<32, big_endian>::writeval(iview, nop);
       r_type = elfcpp::R_POWERPC_NONE;
     }
-  else if (!use_plt_offset
+  else if (pltcall_to_direct
           && (r_type == elfcpp::R_PPC64_PLT_PCREL34
               || r_type == elfcpp::R_PPC64_PLT_PCREL34_NOTOC))
     {
@@ -11316,8 +11338,8 @@ Target_powerpc<size, big_endian>::Relocate::relocate(
     }
   else if (!has_stub_value)
     {
-      if (!use_plt_offset && (r_type == elfcpp::R_POWERPC_PLTCALL
-                             || r_type == elfcpp::R_PPC64_PLTCALL_NOTOC))
+      if (pltcall_to_direct && (r_type == elfcpp::R_POWERPC_PLTCALL
+                               || r_type == elfcpp::R_PPC64_PLTCALL_NOTOC))
        {
          // PLTCALL without plt entry => convert to direct call
          Insn* iview = reinterpret_cast<Insn*>(view);
index 29025236a694f9beda55d8d4d88a8d6f885cbe8b..5a59f1c1d0ebb8e0f40b05fb86482800c5714109 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.39.
+# Generated by GNU Autoconf 2.69 for gprof 2.39.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.39'
-PACKAGE_STRING='gprof 2.39'
+PACKAGE_VERSION='2.39.0'
+PACKAGE_STRING='gprof 2.39.0'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
@@ -1338,7 +1338,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.39 to adapt to many kinds of systems.
+\`configure' configures gprof 2.39.0 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1409,7 +1409,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of gprof 2.39:";;
+     short | recursive ) echo "Configuration of gprof 2.39.0:";;
    esac
   cat <<\_ACEOF
 
@@ -1520,7 +1520,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-gprof configure 2.39
+gprof configure 2.39.0
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1885,7 +1885,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.39, which was
+It was created by gprof $as_me 2.39.0, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2864,7 +2864,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='gprof'
- VERSION='2.39'
+ VERSION='2.39.0'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -12554,7 +12554,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.39, which was
+This file was extended by gprof $as_me 2.39.0, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -12620,7 +12620,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.39
+gprof config.status 2.39.0
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
index f69f294733e9265575df263c99473c66cd9ff6ff..ac14d126ac0ad1c45617de7928df532c9758ca56 100755 (executable)
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for gprofng 2.39.
+# Generated by GNU Autoconf 2.69 for gprofng 2.39.0.
 #
 #
 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -587,8 +587,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='gprofng'
 PACKAGE_TARNAME='gprofng'
-PACKAGE_VERSION='2.39'
-PACKAGE_STRING='gprofng 2.39'
+PACKAGE_VERSION='2.39.0'
+PACKAGE_STRING='gprofng 2.39.0'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
@@ -1362,7 +1362,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 gprofng 2.39 to adapt to many kinds of systems.
+\`configure' configures gprofng 2.39.0 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1433,7 +1433,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of gprofng 2.39:";;
+     short | recursive ) echo "Configuration of gprofng 2.39.0:";;
    esac
   cat <<\_ACEOF
 
@@ -1547,7 +1547,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-gprofng configure 2.39
+gprofng configure 2.39.0
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2079,7 +2079,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 gprofng $as_me 2.39, which was
+It was created by gprofng $as_me 2.39.0, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -3052,7 +3052,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='gprofng'
- VERSION='2.39'
+ VERSION='2.39.0'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -17440,7 +17440,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 gprofng $as_me 2.39, which was
+This file was extended by gprofng $as_me 2.39.0, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -17506,7 +17506,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="\\
-gprofng config.status 2.39
+gprofng config.status 2.39.0
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
index 69ec84bdcbbf6bf17dfdfc2ba95c4e5add53c70f..ec38721ced21801a6ab1abb57a55ed11d3461d3a 100755 (executable)
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for gprofng 2.39.
+# Generated by GNU Autoconf 2.69 for gprofng 2.39.0.
 #
 #
 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -587,8 +587,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='gprofng'
 PACKAGE_TARNAME='gprofng'
-PACKAGE_VERSION='2.39'
-PACKAGE_STRING='gprofng 2.39'
+PACKAGE_VERSION='2.39.0'
+PACKAGE_STRING='gprofng 2.39.0'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
@@ -1325,7 +1325,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 gprofng 2.39 to adapt to many kinds of systems.
+\`configure' configures gprofng 2.39.0 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1396,7 +1396,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of gprofng 2.39:";;
+     short | recursive ) echo "Configuration of gprofng 2.39.0:";;
    esac
   cat <<\_ACEOF
 
@@ -1505,7 +1505,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-gprofng configure 2.39
+gprofng configure 2.39.0
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1991,7 +1991,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 gprofng $as_me 2.39, which was
+It was created by gprofng $as_me 2.39.0, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2968,7 +2968,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='gprofng'
- VERSION='2.39'
+ VERSION='2.39.0'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -16098,7 +16098,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 gprofng $as_me 2.39, which was
+This file was extended by gprofng $as_me 2.39.0, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -16164,7 +16164,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="\\
-gprofng config.status 2.39
+gprofng config.status 2.39.0
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff --git a/ld/NEWS b/ld/NEWS
index 40f7059b8975698a96ab2c1a4b820db4ecfc83a1..355752e6b24b77dc503716f57ffc2f13154048ab 100644 (file)
--- a/ld/NEWS
+++ b/ld/NEWS
@@ -27,10 +27,10 @@ Changes in 2.39:
   --enable-warn-rwx-segments=no
      will make --no-warn-rwx-segments enabled by default.
      
-  --enable-defaul-execstack=no
+  --enable-default-execstack=no
      will stop the creation of an executable stack simply because an input file
      is missing a .note.GNU-stack section, even on architectures where this
-     ehaviour is the default.
+     behaviour is the default.
 
 * TYPE=<type> is now supported in an output section description to set the
   section type value.
index 7ab4e9f308e531928c4fe6bccbb6417c25d90e3a..e58fb7f3a352e85c745d1be8bb909a3821ec2182 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.39.
+# Generated by GNU Autoconf 2.69 for ld 2.39.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.39'
-PACKAGE_STRING='ld 2.39'
+PACKAGE_VERSION='2.39.0'
+PACKAGE_STRING='ld 2.39.0'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
@@ -1416,7 +1416,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.39 to adapt to many kinds of systems.
+\`configure' configures ld 2.39.0 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1487,7 +1487,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of ld 2.39:";;
+     short | recursive ) echo "Configuration of ld 2.39.0:";;
    esac
   cat <<\_ACEOF
 
@@ -1647,7 +1647,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-ld configure 2.39
+ld configure 2.39.0
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2362,7 +2362,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.39, which was
+It was created by ld $as_me 2.39.0, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -3345,7 +3345,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='ld'
- VERSION='2.39'
+ VERSION='2.39.0'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -17933,7 +17933,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.39, which was
+This file was extended by ld $as_me 2.39.0, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -17999,7 +17999,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.39
+ld config.status 2.39.0
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff --git a/ld/testsuite/ld-elf/pr29435.d b/ld/testsuite/ld-elf/pr29435.d
new file mode 100644 (file)
index 0000000..4ca4fd0
--- /dev/null
@@ -0,0 +1,11 @@
+#ld: -shared -z separate-code -z relro
+#xfail: ![check_shared_lib_support]
+#xfail: ![check_relro_support]
+#readelf: -Wl
+
+#failif
+#...
+ +LOAD +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ .* 0x8000
+#...
+ +LOAD +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ .* 0x8000
+#...
diff --git a/ld/testsuite/ld-elf/pr29435.s b/ld/testsuite/ld-elf/pr29435.s
new file mode 100644 (file)
index 0000000..d2d8f26
--- /dev/null
@@ -0,0 +1,6 @@
+        .text
+       .balign 0x8000
+       .globl  foo
+       .type   foo, %function
+foo:
+       .byte 0
diff --git a/ld/testsuite/ld-loongarch-elf/pcrel-const.d b/ld/testsuite/ld-loongarch-elf/pcrel-const.d
new file mode 100644 (file)
index 0000000..ae4705a
--- /dev/null
@@ -0,0 +1,14 @@
+#as: -mla-global-with-pcrel
+#objdump: -Drsz
+
+.*:[    ]+file format .*
+
+
+Disassembly of section .text:
+
+.* <foo>:
+#...
+[      ]+8:[   ]+02c04084[     ]+addi.d[       ]+\$a0,[        ]+\$a0,[        ]+16\(0x10\)
+#...
+0+14 <__sec_end>:
+#pass
diff --git a/ld/testsuite/ld-loongarch-elf/pcrel-const.lds b/ld/testsuite/ld-loongarch-elf/pcrel-const.lds
new file mode 100644 (file)
index 0000000..34b9861
--- /dev/null
@@ -0,0 +1,14 @@
+ENTRY(foo);
+SECTIONS
+{
+       .text : {
+               *(.text*)
+       }
+
+       .data : {
+               __sec_start = .;
+               *(.gzdata)
+               __sec_end = .;
+       }
+}
+PROVIDE(__sec_size = __sec_end);
diff --git a/ld/testsuite/ld-loongarch-elf/pcrel-const.s b/ld/testsuite/ld-loongarch-elf/pcrel-const.s
new file mode 100644 (file)
index 0000000..8b4a9d7
--- /dev/null
@@ -0,0 +1,12 @@
+       .text
+       .align  2
+       .globl  foo
+       .type   foo, @function
+foo:
+       nop
+       la.global       $r4,__sec_size
+       ldptr.w $r4,$r4,0
+       jr      $r1
+       .size   foo, .-foo
+       .data
+       .word 1
diff --git a/ld/testsuite/ld-loongarch-elf/pr.exp b/ld/testsuite/ld-loongarch-elf/pr.exp
new file mode 100644 (file)
index 0000000..c0cc2fc
--- /dev/null
@@ -0,0 +1,39 @@
+# Expect script for LoongArch ELF linker tests
+#   Copyright (C) 2022 Free Software Foundation, Inc.
+#
+# This file is part of the GNU Binutils.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
+# MA 02110-1301, USA.
+#
+
+if ![istarget loongarch64-*-*] {
+  return
+}
+
+set link_tests [list \
+  [list \
+    "pcrel const" \
+    "-T pcrel-const.lds" "" \
+    "-mla-global-with-pcrel" \
+    { pcrel-const.s } \
+    [list \
+      [list objdump -D pcrel-const.d] \
+    ] \
+    "pcrel-const" \
+  ] \
+]
+
+run_ld_link_tests $link_tests
index 2a88987096baf31a1260a69bc80c6460f8fe9d9e..db023b48c280f42971f41e660774c53b7a4ba6bf 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.39.
+# Generated by GNU Autoconf 2.69 for opcodes 2.39.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.39'
-PACKAGE_STRING='opcodes 2.39'
+PACKAGE_VERSION='2.39.0'
+PACKAGE_STRING='opcodes 2.39.0'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
@@ -1360,7 +1360,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.39 to adapt to many kinds of systems.
+\`configure' configures opcodes 2.39.0 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1431,7 +1431,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of opcodes 2.39:";;
+     short | recursive ) echo "Configuration of opcodes 2.39.0:";;
    esac
   cat <<\_ACEOF
 
@@ -1545,7 +1545,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-opcodes configure 2.39
+opcodes configure 2.39.0
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2139,7 +2139,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.39, which was
+It was created by opcodes $as_me 2.39.0, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -3118,7 +3118,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='opcodes'
- VERSION='2.39'
+ VERSION='2.39.0'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -13173,7 +13173,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.39, which was
+This file was extended by opcodes $as_me 2.39.0, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -13239,7 +13239,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.39
+opcodes config.status 2.39.0
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
index c45eb18cceb028f4bc31aacafe8d633b35fb48be..71fb730fb04694021fe30512e50419345a489a16 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: 2022-07-08 10:57+0100\n"
+"POT-Creation-Date: 2022-08-05 14:00+0100\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"
@@ -927,12 +927,12 @@ msgstr ""
 msgid "Address 0x%s is out of bounds.\n"
 msgstr ""
 
-#: disassemble.c:862
+#: disassemble.c:863
 #, c-format
 msgid "assertion fail %s:%d"
 msgstr ""
 
-#: disassemble.c:863
+#: disassemble.c:864
 msgid "Please report this bug"
 msgstr ""
 
@@ -2232,7 +2232,7 @@ msgstr ""
 msgid "unknown S/390 disassembler option: %s"
 msgstr ""
 
-#: s390-dis.c:416
+#: s390-dis.c:471
 #, c-format
 msgid ""
 "\n"