From: Matthias Klose Date: Wed, 7 Aug 2024 05:16:35 +0000 (+0200) Subject: branch-updates X-Git-Tag: archive/raspbian/2.43.1-5+rpi1^2^2^2~23 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=20fade5b55b106bce92f82386c94a2dec2e20ac6;p=binutils.git branch-updates # 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 --- diff --git a/bfd/configure b/bfd/configure index c66a79ee3..9fe9cf691 100755 --- a/bfd/configure +++ b/bfd/configure @@ -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\\" diff --git a/bfd/development.sh b/bfd/development.sh index ad74927b5..850391489 100644 --- a/bfd/development.sh +++ b/bfd/development.sh @@ -16,7 +16,7 @@ # along with this program. If not, see . # Controls whether to enable development-mode features by default. -development=false +development=true # Indicate whether this is a release branch. experimental=false diff --git a/bfd/elfnn-loongarch.c b/bfd/elfnn-loongarch.c index db6d419a0..731af6a79 100644 --- a/bfd/elfnn-loongarch.c +++ b/bfd/elfnn-loongarch.c @@ -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 diff --git a/bfd/po/bfd.pot b/bfd/po/bfd.pot index 1a5ce2e13..e75e000fa 100644 --- a/bfd/po/bfd.pot +++ b/bfd/po/bfd.pot @@ -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 \n" "Language-Team: LANGUAGE \n" diff --git a/bfd/version.h b/bfd/version.h index f3a78b1a9..febfab5f0 100644 --- a/bfd/version.h +++ b/bfd/version.h @@ -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@ diff --git a/bfd/version.m4 b/bfd/version.m4 index e3d211993..c5b3172c5 100644 --- a/bfd/version.m4 +++ b/bfd/version.m4 @@ -1 +1 @@ -m4_define([BFD_VERSION], [2.43]) +m4_define([BFD_VERSION], [2.43.0]) diff --git a/binutils/configure b/binutils/configure index 934b9a735..e97f4cba0 100755 --- a/binutils/configure +++ b/binutils/configure @@ -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\\" diff --git a/gas/configure b/gas/configure index b2c5126f7..a4d64ce52 100755 --- a/gas/configure +++ b/gas/configure @@ -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\\" diff --git a/gprof/configure b/gprof/configure index 6c0bf5ef0..e3c86d3f1 100755 --- a/gprof/configure +++ b/gprof/configure @@ -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\\" diff --git a/gprofng/configure b/gprofng/configure index dd83bdc39..cf3e9c3d0 100755 --- a/gprofng/configure +++ b/gprofng/configure @@ -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\\" diff --git a/gprofng/doc/version.texi b/gprofng/doc/version.texi index 4647fbdfd..93c965406 100644 --- a/gprofng/doc/version.texi +++ b/gprofng/doc/version.texi @@ -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 diff --git a/gprofng/libcollector/configure b/gprofng/libcollector/configure index e12f9c850..4c55f6723 100755 --- a/gprofng/libcollector/configure +++ b/gprofng/libcollector/configure @@ -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\\" diff --git a/ld/configure b/ld/configure index 44d79c244..1d89e3b06 100755 --- a/ld/configure +++ b/ld/configure @@ -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\\" diff --git a/ld/plugin.c b/ld/plugin.c index 03ee9880d..51c4765cc 100644 --- a/ld/plugin.c +++ b/ld/plugin.c @@ -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 { diff --git a/ld/testsuite/ld-loongarch-elf/ld-loongarch-elf.exp b/ld/testsuite/ld-loongarch-elf/ld-loongarch-elf.exp index fb34eeb80..09c4c9fd5 100644 --- a/ld/testsuite/ld-loongarch-elf/ld-loongarch-elf.exp +++ b/ld/testsuite/ld-loongarch-elf/ld-loongarch-elf.exp @@ -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 index 000000000..0b1a5b981 --- /dev/null +++ b/ld/testsuite/ld-loongarch-elf/relr-got-start.d @@ -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 index 000000000..c89fb4252 --- /dev/null +++ b/ld/testsuite/ld-loongarch-elf/relr-got-start.s @@ -0,0 +1,5 @@ +.globl _start +_start: + pcalau12i $r5,%got_pc_hi20(_start) + ld.d $r5,$r5,%got_pc_lo12(_start) + ret diff --git a/ld/testsuite/ld-plugin/lto.exp b/ld/testsuite/ld-plugin/lto.exp index 9476caf7a..604dc8c28 100644 --- a/ld/testsuite/ld-plugin/lto.exp +++ b/ld/testsuite/ld-plugin/lto.exp @@ -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 index 000000000..4a46b2b49 --- /dev/null +++ b/ld/testsuite/ld-plugin/pr31956c.c @@ -0,0 +1,19 @@ +#include + +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 index 000000000..cb7f2d506 --- /dev/null +++ b/ld/testsuite/ld-plugin/pr31956d.c @@ -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 index 000000000..b579cdc73 --- /dev/null +++ b/ld/testsuite/ld-plugin/pr31956d.d @@ -0,0 +1,4 @@ +#failif +#... +[0-9a-f]+ T .*parse_line +#... diff --git a/opcodes/configure b/opcodes/configure index 1a6289af1..313cbd436 100755 --- a/opcodes/configure +++ b/opcodes/configure @@ -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\\"