branch-updates
authorMatthias Klose <doko@debian.org>
Wed, 7 Aug 2024 05:16:35 +0000 (07:16 +0200)
committerMatthias Klose <doko@debian.org>
Wed, 7 Aug 2024 05:16:35 +0000 (07:16 +0200)
# DP: updates from the binutils-2.43 branch

# DP: updates from the binutils-2.43 branch

# git diff 57f3676f3e5266829a91880d61143ab9ecd617bd 6c8c08721c263d7fd639c5dad8e7778883bcaa53

Gbp-Pq: Name branch-updates.diff

22 files changed:
bfd/configure
bfd/development.sh
bfd/elfnn-loongarch.c
bfd/po/bfd.pot
bfd/version.h
bfd/version.m4
binutils/configure
gas/configure
gprof/configure
gprofng/configure
gprofng/doc/version.texi
gprofng/libcollector/configure
ld/configure
ld/plugin.c
ld/testsuite/ld-loongarch-elf/ld-loongarch-elf.exp
ld/testsuite/ld-loongarch-elf/relr-got-start.d [new file with mode: 0644]
ld/testsuite/ld-loongarch-elf/relr-got-start.s [new file with mode: 0644]
ld/testsuite/ld-plugin/lto.exp
ld/testsuite/ld-plugin/pr31956c.c [new file with mode: 0644]
ld/testsuite/ld-plugin/pr31956d.c [new file with mode: 0644]
ld/testsuite/ld-plugin/pr31956d.d [new file with mode: 0644]
opcodes/configure

index c66a79ee3435117ad45001043537c0c24b1771d7..9fe9cf6919fd4ff0c4656ddcf9bf166a26cbe4c8 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.43.
+# Generated by GNU Autoconf 2.69 for bfd 2.43.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.43'
-PACKAGE_STRING='bfd 2.43'
+PACKAGE_VERSION='2.43.0'
+PACKAGE_STRING='bfd 2.43.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.43 to adapt to many kinds of systems.
+\`configure' configures bfd 2.43.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.43:";;
+     short | recursive ) echo "Configuration of bfd 2.43.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.43
+bfd configure 2.43.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.43, which was
+It was created by bfd $as_me 2.43.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.43'
+ VERSION='2.43.0'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -18093,7 +18093,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.43, which was
+This file was extended by bfd $as_me 2.43.0, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -18159,7 +18159,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.43
+bfd config.status 2.43.0
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
index ad74927b5cb1a919472e1f60728d8ac174e84a67..8503914896c44bb87a1350e57b500196eb49c9b2 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 db6d419a052e6400f8a0c1f02d64822372c862ba..731af6a79a672c9dec2b968da21893056cb57af0 100644 (file)
@@ -121,6 +121,12 @@ struct loongarch_elf_link_hash_table
 
   /* Layout recomputation count.  */
   bfd_size_type relr_layout_iter;
+
+  /* In BFD DT_RELR is implemented as a "relaxation."  If in a relax trip
+     size_relative_relocs is updating the layout, relax_section may see
+     a partially updated state (some sections have vma updated but the
+     others do not), and it's unsafe to do the normal relaxation.  */
+  bool layout_mutating_for_relr;
 };
 
 struct loongarch_elf_section_data
@@ -2212,6 +2218,8 @@ loongarch_elf_size_relative_relocs (struct bfd_link_info *info,
          *need_layout = false;
        }
     }
+
+  htab->layout_mutating_for_relr = *need_layout;
   return true;
 }
 
@@ -4133,7 +4141,8 @@ loongarch_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
                                                            bfd_link_pic (info),
                                                            h)
                          && bfd_link_pic (info)
-                         && LARCH_REF_LOCAL (info, h))
+                         && LARCH_REF_LOCAL (info, h)
+                         && !info->enable_dt_relr)                       
                        {
                          Elf_Internal_Rela rela;
                          rela.r_offset = sec_addr (got) + got_off;
@@ -5259,6 +5268,12 @@ loongarch_elf_relax_section (bfd *abfd, asection *sec,
   *again = false;
   bfd_vma max_alignment = 0;
 
+  /* It may happen that some sections have updated vma but the others do
+     not.  Go to the next relax trip (size_relative_relocs should have
+     been demending another relax trip anyway).  */
+  if (htab->layout_mutating_for_relr)
+    return true;
+
   if (bfd_link_relocatable (info)
       || sec->sec_flg0
       || (sec->flags & SEC_RELOC) == 0
index 1a5ce2e13459c0a74339e64038438e4d8682fbe9..e75e000fa60f10fafe2effc7ac08a432caf9cca7 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-08-04 14:00+0100\n"
+"POT-Creation-Date: 2024-08-04 17:41+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"
index f3a78b1a9fdf376087f9693601ef076a8b95f178..febfab5f01b103270c7ccd0d51e4aa83df72c983 100644 (file)
@@ -16,7 +16,7 @@
 
    In releases, the date is not included in either version strings or
    sonames.  */
-#define BFD_VERSION_DATE 20240804
+#define BFD_VERSION_DATE 20240807
 #define BFD_VERSION @bfd_version@
 #define BFD_VERSION_STRING  @bfd_version_package@ @bfd_version_string@
 #define REPORT_BUGS_TO @report_bugs_to@
index e3d211993692d4a44c8dcf4c524206df2a205179..c5b3172c532ab70eb7fa67b4e7f168b87363b3ec 100644 (file)
@@ -1 +1 @@
-m4_define([BFD_VERSION], [2.43])
+m4_define([BFD_VERSION], [2.43.0])
index 934b9a7352e6a32650e95a849d729036c84fe790..e97f4cba053d69adc2a9bef7e92a832ff10e73a7 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.43.
+# Generated by GNU Autoconf 2.69 for binutils 2.43.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.43'
-PACKAGE_STRING='binutils 2.43'
+PACKAGE_VERSION='2.43.0'
+PACKAGE_STRING='binutils 2.43.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.43 to adapt to many kinds of systems.
+\`configure' configures binutils 2.43.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.43:";;
+     short | recursive ) echo "Configuration of binutils 2.43.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.43
+binutils configure 2.43.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.43, which was
+It was created by binutils $as_me 2.43.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.43'
+ VERSION='2.43.0'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -17170,7 +17170,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.43, which was
+This file was extended by binutils $as_me 2.43.0, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -17236,7 +17236,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.43
+binutils config.status 2.43.0
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
index b2c5126f7887056b06f23f451d4f1f75216cad0b..a4d64ce52899121387bc89dbb7c03ebfc5be47bc 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.43.
+# Generated by GNU Autoconf 2.69 for gas 2.43.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.43'
-PACKAGE_STRING='gas 2.43'
+PACKAGE_VERSION='2.43.0'
+PACKAGE_STRING='gas 2.43.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.43 to adapt to many kinds of systems.
+\`configure' configures gas 2.43.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.43:";;
+     short | recursive ) echo "Configuration of gas 2.43.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.43
+gas configure 2.43.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.43, which was
+It was created by gas $as_me 2.43.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.43'
+ VERSION='2.43.0'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -16855,7 +16855,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.43, which was
+This file was extended by gas $as_me 2.43.0, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -16921,7 +16921,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.43
+gas config.status 2.43.0
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
index 6c0bf5ef05049ec11f458d392d7fe6162d596ece..e3c86d3f1ed9534fe644c63a1d94dddc92c1f7f6 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.43.
+# Generated by GNU Autoconf 2.69 for gprof 2.43.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.43'
-PACKAGE_STRING='gprof 2.43'
+PACKAGE_VERSION='2.43.0'
+PACKAGE_STRING='gprof 2.43.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.43 to adapt to many kinds of systems.
+\`configure' configures gprof 2.43.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.43:";;
+     short | recursive ) echo "Configuration of gprof 2.43.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.43
+gprof configure 2.43.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.43, which was
+It was created by gprof $as_me 2.43.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.43'
+ VERSION='2.43.0'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -14503,7 +14503,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.43, which was
+This file was extended by gprof $as_me 2.43.0, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -14569,7 +14569,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.43
+gprof config.status 2.43.0
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
index dd83bdc3922ecd1a5f323d1d64e40dbec5297202..cf3e9c3d0db674c8b6f9c31675cc3d7e71e9f590 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.43.
+# Generated by GNU Autoconf 2.69 for gprofng 2.43.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.43'
-PACKAGE_STRING='gprofng 2.43'
+PACKAGE_VERSION='2.43.0'
+PACKAGE_STRING='gprofng 2.43.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.43 to adapt to many kinds of systems.
+\`configure' configures gprofng 2.43.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.43:";;
+     short | recursive ) echo "Configuration of gprofng 2.43.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.43
+gprofng configure 2.43.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.43, which was
+It was created by gprofng $as_me 2.43.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.43'
+ VERSION='2.43.0'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -17562,7 +17562,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.43, which was
+This file was extended by gprofng $as_me 2.43.0, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -17628,7 +17628,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.43
+gprofng config.status 2.43.0
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
index 4647fbdfd0fc430e43b013411c5d5cfc765c59a9..93c9654061802a474780e75ea0a20ec6b9934ac3 100644 (file)
@@ -1,4 +1,4 @@
 @set UPDATED 20 July 2024
 @set UPDATED-MONTH July 2024
-@set EDITION 2.43
-@set VERSION 2.43
+@set EDITION 2.43.0
+@set VERSION 2.43.0
index e12f9c850b6b4ca732c3ba58048dcccd835c4f7a..4c55f6723323944f74cdd8ca44476d03260ed260 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.43.
+# Generated by GNU Autoconf 2.69 for gprofng 2.43.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.43'
-PACKAGE_STRING='gprofng 2.43'
+PACKAGE_VERSION='2.43.0'
+PACKAGE_STRING='gprofng 2.43.0'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
@@ -1324,7 +1324,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.43 to adapt to many kinds of systems.
+\`configure' configures gprofng 2.43.0 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1395,7 +1395,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of gprofng 2.43:";;
+     short | recursive ) echo "Configuration of gprofng 2.43.0:";;
    esac
   cat <<\_ACEOF
 
@@ -1504,7 +1504,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-gprofng configure 2.43
+gprofng configure 2.43.0
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1990,7 +1990,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.43, which was
+It was created by gprofng $as_me 2.43.0, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2967,7 +2967,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='gprofng'
- VERSION='2.43'
+ VERSION='2.43.0'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -16136,7 +16136,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.43, which was
+This file was extended by gprofng $as_me 2.43.0, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -16202,7 +16202,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.43
+gprofng config.status 2.43.0
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
index 44d79c2445d0a805e9d3ef71b4a476c640e9f5f2..1d89e3b067760b616b12fde5720a91242e1bae23 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.43.
+# Generated by GNU Autoconf 2.69 for ld 2.43.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.43'
-PACKAGE_STRING='ld 2.43'
+PACKAGE_VERSION='2.43.0'
+PACKAGE_STRING='ld 2.43.0'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
@@ -1437,7 +1437,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.43 to adapt to many kinds of systems.
+\`configure' configures ld 2.43.0 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1508,7 +1508,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of ld 2.43:";;
+     short | recursive ) echo "Configuration of ld 2.43.0:";;
    esac
   cat <<\_ACEOF
 
@@ -1689,7 +1689,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-ld configure 2.43
+ld configure 2.43.0
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2404,7 +2404,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.43, which was
+It was created by ld $as_me 2.43.0, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -3388,7 +3388,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='ld'
- VERSION='2.43'
+ VERSION='2.43.0'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -20096,7 +20096,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.43, which was
+This file was extended by ld $as_me 2.43.0, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -20162,7 +20162,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.43
+ld config.status 2.43.0
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
index 03ee9880d104512781aeba5ca8433c25a437ede3..51c4765cc5b5ca5ea8679bf2af3e2d19678b37b5 100644 (file)
@@ -778,8 +778,18 @@ get_symbols (const void *handle, int nsyms, struct ld_plugin_symbol *syms,
        {
          blhe = h;
          /* Check if a symbol is a wrapper symbol.  */
-         if (blhe && blhe->wrapper_symbol)
-           wrap_status = wrapper;
+         if (blhe)
+           {
+             if (blhe->wrapper_symbol)
+               wrap_status = wrapper;
+             else if (link_info.wrap_hash != NULL)
+               {
+                 struct bfd_link_hash_entry *unwrap
+                   = unwrap_hash_lookup (&link_info, (bfd *) abfd, blhe);
+                 if (unwrap != NULL && unwrap != h)
+                   wrap_status = wrapper;
+               }
+           }
        }
       else
        {
index fb34eeb80cbb812b728a83dbe7d747f5861a3312..09c4c9fd5b2cb22b5b4729df5b863624f6a0dec3 100644 (file)
@@ -149,6 +149,7 @@ if [istarget "loongarch64-*-*"] {
     run_dump_test "relr-data-pie"
     run_dump_test "relr-discard-pie"
     run_dump_test "relr-got-pie"
+    run_dump_test "relr-got-start"
     run_dump_test "relr-text-pie"
     run_dump_test "abssym_pie"
   }
diff --git a/ld/testsuite/ld-loongarch-elf/relr-got-start.d b/ld/testsuite/ld-loongarch-elf/relr-got-start.d
new file mode 100644 (file)
index 0000000..0b1a5b9
--- /dev/null
@@ -0,0 +1,7 @@
+#source: relr-got-start.s
+#ld: -pie -z pack-relative-relocs -T relr-relocs.ld
+#readelf: -rW
+
+Relocation section '\.relr\.dyn' at offset 0x[a-z0-f]+ contains 1 entry which relocates 1 location:
+Index: Entry            Address           Symbolic Address
+0000:  0000000000020008 0000000000020008  _GLOBAL_OFFSET_TABLE_ \+ 0x8
diff --git a/ld/testsuite/ld-loongarch-elf/relr-got-start.s b/ld/testsuite/ld-loongarch-elf/relr-got-start.s
new file mode 100644 (file)
index 0000000..c89fb42
--- /dev/null
@@ -0,0 +1,5 @@
+.globl _start
+_start:
+        pcalau12i       $r5,%got_pc_hi20(_start)
+        ld.d    $r5,$r5,%got_pc_lo12(_start)
+        ret
index 9476caf7ab47183ba5baca1ecb71227c898f754c..604dc8c284d172fbd385c0348e947a6b9d2abb44 100644 (file)
@@ -546,6 +546,22 @@ set lto_link_elf_tests [list \
    {} \
    "pr31956b" \
   ] \
+  [list \
+   "PR ld/31956 (malloc)" \
+   "-Wl,--wrap=malloc" \
+   "-O2 -flto" \
+   {pr31956c.c} \
+   {} \
+   "pr31956c" \
+  ] \
+  [list \
+   "PR ld/31956 (unused)" \
+   "-Wl,--wrap=parse_line" \
+   "-O2 -flto" \
+   {pr31956d.c} \
+   {{"nm" {} "pr31956d.d"}} \
+   "pr31956d" \
+  ] \
   [list \
    "Build pr30281.so" \
    "-shared -Wl,--version-script,pr30281.t \
diff --git a/ld/testsuite/ld-plugin/pr31956c.c b/ld/testsuite/ld-plugin/pr31956c.c
new file mode 100644 (file)
index 0000000..4a46b2b
--- /dev/null
@@ -0,0 +1,19 @@
+#include <stdlib.h>
+
+extern void *__real_malloc (size_t);
+
+void *
+__wrap_malloc (size_t n)
+{
+  if (n == 0)
+    return NULL;
+  else
+    return __real_malloc (n);
+};
+
+int
+main (void)
+{
+  void *ptr = malloc (30);
+  return ptr == NULL ? 1 : 0;
+}
diff --git a/ld/testsuite/ld-plugin/pr31956d.c b/ld/testsuite/ld-plugin/pr31956d.c
new file mode 100644 (file)
index 0000000..cb7f2d5
--- /dev/null
@@ -0,0 +1,7 @@
+void __wrap_parse_line(void) {};
+
+int
+main (void)
+{
+  return 0;
+}
diff --git a/ld/testsuite/ld-plugin/pr31956d.d b/ld/testsuite/ld-plugin/pr31956d.d
new file mode 100644 (file)
index 0000000..b579cdc
--- /dev/null
@@ -0,0 +1,4 @@
+#failif
+#...
+[0-9a-f]+ T .*parse_line
+#...
index 1a6289af1cd67a4a5662eb2399af75b01673e178..313cbd436ed1a51071f6844cbc7895dd5347409f 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.43.
+# Generated by GNU Autoconf 2.69 for opcodes 2.43.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.43'
-PACKAGE_STRING='opcodes 2.43'
+PACKAGE_VERSION='2.43.0'
+PACKAGE_STRING='opcodes 2.43.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.43 to adapt to many kinds of systems.
+\`configure' configures opcodes 2.43.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.43:";;
+     short | recursive ) echo "Configuration of opcodes 2.43.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.43
+opcodes configure 2.43.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.43, which was
+It was created by opcodes $as_me 2.43.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.43'
+ VERSION='2.43.0'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -15126,7 +15126,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.43, which was
+This file was extended by opcodes $as_me 2.43.0, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -15192,7 +15192,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.43
+opcodes config.status 2.43.0
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"