1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-08 05:09:24 +00:00

binutils: Upgrade to 2.39 release

Details of changes [1]

[1] https://sourceware.org/pipermail/binutils/2022-August/122246.html

(From OE-Core rev: a2458d4011e77868d6384b377a7a4cc1096c4ac3)

(From OE-Core rev: 4fa90ce4f13eb8a854836462b1865fd08f5a68b2)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Khem Raj
2022-08-17 00:04:34 -07:00
committed by Richard Purdie
parent c8570ddf2e
commit 75720e6af1
21 changed files with 9464 additions and 3150 deletions
+1 -1
View File
@@ -18,7 +18,7 @@ PREFERRED_PROVIDER_virtual/gettext ??= "gettext"
GCCVERSION ?= "12.%"
SDKGCCVERSION ?= "${GCCVERSION}"
BINUVERSION ?= "2.38%"
BINUVERSION ?= "2.39%"
GDBVERSION ?= "12.%"
GLIBCVERSION ?= "2.36"
LINUXLIBCVERSION ?= "5.19%"
@@ -12,26 +12,24 @@ LIC_FILES_CHKSUM="\
# When upgrading to 2.39, please make sure there is no trailing .0, so
# that upstream version check can work correctly.
PV = "2.38"
CVE_VERSION = "2.38"
SRCBRANCH ?= "binutils-2_38-branch"
PV = "2.39"
CVE_VERSION = "2.39"
SRCBRANCH ?= "binutils-2_39-branch"
UPSTREAM_CHECK_GITTAGREGEX = "binutils-(?P<pver>\d+_(\d_?)*)"
SRCREV ?= "eed56ee299b9ef8754bb4e53f2e9cf2a7c28c04d"
SRCREV ?= "a58f83e8b85fa3c1564de530d68a14fc620c0027"
BINUTILS_GIT_URI ?= "git://sourceware.org/git/binutils-gdb.git;branch=${SRCBRANCH};protocol=git"
SRC_URI = "\
${BINUTILS_GIT_URI} \
file://0004-Point-scripts-location-to-libdir.patch \
file://0005-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch \
file://0006-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch \
file://0007-warn-for-uses-of-system-directories-when-cross-linki.patch \
file://0008-fix-the-incorrect-assembling-for-ppc-wait-mnemonic.patch \
file://0009-Use-libtool-2.4.patch \
file://0010-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch \
file://0011-sync-with-OE-libtool-changes.patch \
file://0012-Check-for-clang-before-checking-gcc-version.patch \
file://0013-Avoid-as-info-race-condition.patch \
file://0014-CVE-2019-1010204.patch \
file://0005-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch \
file://0006-warn-for-uses-of-system-directories-when-cross-linki.patch \
file://0007-fix-the-incorrect-assembling-for-ppc-wait-mnemonic.patch \
file://0008-Use-libtool-2.4.patch \
file://0009-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch \
file://0010-sync-with-OE-libtool-changes.patch \
file://0011-Check-for-clang-before-checking-gcc-version.patch \
file://0012-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch \
"
S = "${WORKDIR}/git"
@@ -1,4 +1,4 @@
From 07bb7fbdacaf9cd6a1a252ffbc98f4e05e305d50 Mon Sep 17 00:00:00 2001
From a0ac147aec127c66c9e38292faa50bb56d3c2a19 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 2 Mar 2015 01:58:54 +0000
Subject: [PATCH] binutils-crosssdk: Generate relocatable SDKs
@@ -1,4 +1,4 @@
From f820ab7ea7e94d4df548be3388163ff2efb2ea96 Mon Sep 17 00:00:00 2001
From fd7065bfd20364679e3c3f329b19059bbc51ab02 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 6 Mar 2017 23:37:05 -0800
Subject: [PATCH] binutils-cross: Do not generate linker script directories
@@ -1,4 +1,4 @@
From b2ccd25828b40310caeb094c0413e3a30a4dc0a5 Mon Sep 17 00:00:00 2001
From 67735b3647f98ce0f010ff8b4f9b5c5da576cb17 Mon Sep 17 00:00:00 2001
From: Richard Purdie <richard.purdie@linuxfoundation.org>
Date: Wed, 19 Feb 2020 09:51:16 -0800
Subject: [PATCH] binutils-nativesdk: Search for alternative ld.so.conf in SDK
@@ -29,7 +29,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
5 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/ld/Makefile.am b/ld/Makefile.am
index b55a873d927..61db131fb0d 100644
index d31021c13e2..29782385ca4 100644
--- a/ld/Makefile.am
+++ b/ld/Makefile.am
@@ -42,7 +42,8 @@ ZLIBINC = @zlibinc@
@@ -41,12 +41,12 @@ index b55a873d927..61db131fb0d 100644
+ -DSYSCONFDIR="\"$(sysconfdir)\""
WARN_CFLAGS = @WARN_CFLAGS@
NO_WERROR = @NO_WERROR@
AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS)
AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS) $(JANSSON_CFLAGS)
diff --git a/ld/Makefile.in b/ld/Makefile.in
index 61e93eeaf1e..860eb21a785 100644
index ee0c98f65b0..04ee68a2c67 100644
--- a/ld/Makefile.in
+++ b/ld/Makefile.in
@@ -556,7 +556,8 @@ ZLIB = @zlibdir@ -lz
@@ -562,7 +562,8 @@ ZLIB = @zlibdir@ -lz
ZLIBINC = @zlibinc@
ELF_CLFAGS = -DELF_LIST_OPTIONS=@elf_list_options@ \
-DELF_SHLIB_LIST_OPTIONS=@elf_shlib_list_options@ \
@@ -54,13 +54,13 @@ index 61e93eeaf1e..860eb21a785 100644
+ -DELF_PLT_UNWIND_LIST_OPTIONS=@elf_plt_unwind_list_options@ \
+ -DSYSCONFDIR="\"$(sysconfdir)\""
AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS)
AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS) $(JANSSON_CFLAGS)
diff --git a/ld/ldelf.c b/ld/ldelf.c
index 121c25d948f..34cbc60e5e9 100644
index bfa0d54753a..0d61a3209ec 100644
--- a/ld/ldelf.c
+++ b/ld/ldelf.c
@@ -930,7 +930,7 @@ ldelf_check_ld_so_conf (const struct bfd_link_needed_list *l, int force,
@@ -936,7 +936,7 @@ ldelf_check_ld_so_conf (const struct bfd_link_needed_list *l, int force,
info.path = NULL;
info.len = info.alloc = 0;
@@ -1,4 +1,4 @@
From 7a7b777cdfded080aab1021fa6bcdb20345f5cfd Mon Sep 17 00:00:00 2001
From 2158e5bd4c6ea4db89e33d46ef25428e37bfc3a6 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 2 Mar 2015 01:09:58 +0000
Subject: [PATCH] Point scripts location to libdir
@@ -12,10 +12,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/ld/Makefile.am b/ld/Makefile.am
index 61db131fb0d..5b5ee64d121 100644
index 29782385ca4..062e6b6814b 100644
--- a/ld/Makefile.am
+++ b/ld/Makefile.am
@@ -51,7 +51,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS)
@@ -51,7 +51,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS) $(JANSSON_CFLAGS)
# We put the scripts in the directory $(scriptdir)/ldscripts.
# We can't put the scripts in $(datadir) because the SEARCH_DIR
# directives need to be different for native and cross linkers.
@@ -25,10 +25,10 @@ index 61db131fb0d..5b5ee64d121 100644
EMUL = @EMUL@
EMULATION_OFILES = @EMULATION_OFILES@
diff --git a/ld/Makefile.in b/ld/Makefile.in
index 860eb21a785..d719747919c 100644
index 04ee68a2c67..782d4017a60 100644
--- a/ld/Makefile.in
+++ b/ld/Makefile.in
@@ -564,7 +564,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS)
@@ -570,7 +570,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS) $(JANSSON_CFLAGS)
# We put the scripts in the directory $(scriptdir)/ldscripts.
# We can't put the scripts in $(datadir) because the SEARCH_DIR
# directives need to be different for native and cross linkers.
@@ -1,4 +1,4 @@
From fc9e8b99969bb32a4b009eab763bade6c554ef73 Mon Sep 17 00:00:00 2001
From e74d765a1a95253c9247228bd7ccbcabecdd8f7e Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 2 Mar 2015 01:39:01 +0000
Subject: [PATCH] don't let the distro compiler point to the wrong installation
@@ -1,4 +1,4 @@
From 9fb1bafb20371d82b674778d2a8b5c9444fed417 Mon Sep 17 00:00:00 2001
From 2c43b1357db6b09d1645704afd3f45be6de0cf4d Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 15 Jan 2016 06:31:09 +0000
Subject: [PATCH] warn for uses of system directories when cross linking
@@ -63,10 +63,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
9 files changed, 88 insertions(+), 2 deletions(-)
diff --git a/ld/config.in b/ld/config.in
index 26d55a00d47..ffad464783c 100644
index d4c1fc420b5..1aece0b2c29 100644
--- a/ld/config.in
+++ b/ld/config.in
@@ -43,6 +43,9 @@
@@ -55,6 +55,9 @@
language is requested. */
#undef ENABLE_NLS
@@ -77,10 +77,10 @@ index 26d55a00d47..ffad464783c 100644
#undef EXTRA_SHLIB_EXTENSION
diff --git a/ld/configure b/ld/configure
index 26150d62898..1f9ec8ec580 100755
index e58fb7f3a35..d0a467ac101 100755
--- a/ld/configure
+++ b/ld/configure
@@ -831,6 +831,7 @@ with_lib_path
@@ -836,6 +836,7 @@ with_lib_path
enable_targets
enable_64_bit_bfd
with_sysroot
@@ -88,7 +88,7 @@ index 26150d62898..1f9ec8ec580 100755
enable_gold
enable_got
enable_compressed_debug_sections
@@ -1500,6 +1501,8 @@ Optional Features:
@@ -1514,6 +1515,8 @@ Optional Features:
--enable-checking enable run-time checks
--enable-targets alternative target configurations
--enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
@@ -97,7 +97,7 @@ index 26150d62898..1f9ec8ec580 100755
--enable-gold[=ARG] build gold [ARG={default,yes,no}]
--enable-got=<type> GOT handling scheme (target, single, negative,
multigot)
@@ -15312,6 +15315,19 @@ fi
@@ -15349,6 +15352,19 @@ fi
@@ -118,7 +118,7 @@ index 26150d62898..1f9ec8ec580 100755
if test "${enable_gold+set}" = set; then :
enableval=$enable_gold; case "${enableval}" in
diff --git a/ld/configure.ac b/ld/configure.ac
index 7f4cff079b7..57d1abff870 100644
index 4331d6b1302..e2976bc2926 100644
--- a/ld/configure.ac
+++ b/ld/configure.ac
@@ -102,6 +102,16 @@ AC_SUBST(use_sysroot)
@@ -158,13 +158,13 @@ index f3086bf30de..db5064243c7 100644
enum endian_enum endian;
diff --git a/ld/ld.texi b/ld/ld.texi
index fc75e9b3625..dca697d626e 100644
index eabbec8faa9..c4680e4947e 100644
--- a/ld/ld.texi
+++ b/ld/ld.texi
@@ -2892,6 +2892,18 @@ string identifying the original linked file does not change.
Passing @code{none} for @var{style} disables the setting from any
@code{--build-id} options earlier on the command line.
@@ -2947,6 +2947,18 @@ creation of the metadata note, if one had been enabled by an earlier
occurrence of the --package-metdata option.
If the linker has been built with libjansson, then the JSON string
will be validated.
+
+@kindex --no-poison-system-directories
+@item --no-poison-system-directories
@@ -209,13 +209,13 @@ index 731ae5f7aed..dd8f03fd960 100644
/* Try to open a BFD for a lang_input_statement. */
diff --git a/ld/ldlex.h b/ld/ldlex.h
index bc58fea73cc..a1595589197 100644
index 57ade1f754b..64007ff8684 100644
--- a/ld/ldlex.h
+++ b/ld/ldlex.h
@@ -164,6 +164,8 @@ enum option_values
OPTION_CTF_VARIABLES,
OPTION_NO_CTF_VARIABLES,
OPTION_CTF_SHARE_TYPES,
@@ -168,6 +168,8 @@ enum option_values
OPTION_NO_WARN_EXECSTACK,
OPTION_WARN_RWX_SEGMENTS,
OPTION_NO_WARN_RWX_SEGMENTS,
+ OPTION_NO_POISON_SYSTEM_DIRECTORIES,
+ OPTION_ERROR_POISON_SYSTEM_DIRECTORIES,
};
@@ -253,10 +253,10 @@ index 1ae90a77749..f40750fd816 100644
{
if (error_count < MAX_ERRORS_IN_A_ROW)
diff --git a/ld/lexsup.c b/ld/lexsup.c
index 5acc47ed5a0..d03c6136ccf 100644
index 9225f71b3ce..92fb66f1fa2 100644
--- a/ld/lexsup.c
+++ b/ld/lexsup.c
@@ -600,6 +600,14 @@ static const struct ld_option ld_options[] =
@@ -608,6 +608,14 @@ static const struct ld_option ld_options[] =
" <method> is: share-unconflicted (default),\n"
" share-duplicated"),
TWO_DASHES },
@@ -271,7 +271,7 @@ index 5acc47ed5a0..d03c6136ccf 100644
};
#define OPTION_COUNT ARRAY_SIZE (ld_options)
@@ -1702,6 +1710,14 @@ parse_args (unsigned argc, char **argv)
@@ -1722,6 +1730,14 @@ parse_args (unsigned argc, char **argv)
config.print_map_discarded = true;
break;
@@ -1,4 +1,4 @@
From 00ae1ee97ad3ad0624798b28c6bab94a19b3ef39 Mon Sep 17 00:00:00 2001
From 883b6c0930410f8553b3bce0dd98131bc1694fa6 Mon Sep 17 00:00:00 2001
From: Zhenhua Luo <zhenhua.luo@nxp.com>
Date: Sat, 11 Jun 2016 22:08:29 -0500
Subject: [PATCH] fix the incorrect assembling for ppc wait mnemonic
@@ -14,10 +14,10 @@ Signed-off-by: Zhenhua Luo <zhenhua.luo@nxp.com>
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/opcodes/ppc-opc.c b/opcodes/ppc-opc.c
index a424dd924de..406d5b60917 100644
index 7637d3e349e..8e074e13208 100644
--- a/opcodes/ppc-opc.c
+++ b/opcodes/ppc-opc.c
@@ -6378,8 +6378,6 @@ const struct powerpc_opcode powerpc_opcodes[] = {
@@ -6947,8 +6947,6 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{"waitasec", X(31,30), XRTRARB_MASK, POWER8, POWER9, {0}},
{"waitrsv", XWCPL(31,30,1,0),0xffffffff, POWER10, EXT, {0}},
{"pause_short", XWCPL(31,30,2,0),0xffffffff, POWER10, EXT, {0}},
@@ -26,7 +26,7 @@ index a424dd924de..406d5b60917 100644
{"lwepx", X(31,31), X_MASK, E500MC|PPCA2, 0, {RT, RA0, RB}},
@@ -6433,7 +6431,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
@@ -7002,7 +7000,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{"waitrsv", X(31,62)|(1<<21), 0xffffffff, E500MC|PPCA2, EXT, {0}},
{"waitimpl", X(31,62)|(2<<21), 0xffffffff, E500MC|PPCA2, EXT, {0}},
@@ -1,4 +1,4 @@
From 1c4581a059afe2799bb825b388ae92f8fa6f19a3 Mon Sep 17 00:00:00 2001
From 98410efc334e31ccfbdc0080fb293b0e06885454 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 2 Mar 2015 01:42:38 +0000
Subject: [PATCH] Fix rpath in libtool when sysroot is enabled
@@ -1,4 +1,4 @@
From d71c715554a054c534954b0aa357ca699ed68430 Mon Sep 17 00:00:00 2001
From 84fc4ceafcbfad4c6ddc9d65f6a425bd62dd062e Mon Sep 17 00:00:00 2001
From: Ross Burton <ross.burton@intel.com>
Date: Mon, 6 Mar 2017 23:33:27 -0800
Subject: [PATCH] sync with OE libtool changes
@@ -1,4 +1,4 @@
From 787d7cd71d7886d3193c0fd747101c54ad7c3cd8 Mon Sep 17 00:00:00 2001
From 628c10087e6e11a7bc748437c5b695835b704aaf Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 15 Apr 2020 14:17:20 -0700
Subject: [PATCH] Check for clang before checking gcc version
@@ -18,10 +18,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/configure b/configure
index 6a1da1665d8..916656dc233 100755
index be433ef6d5d..7494fbd2f06 100755
--- a/configure
+++ b/configure
@@ -5287,7 +5287,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
@@ -5294,7 +5294,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -31,10 +31,10 @@ index 6a1da1665d8..916656dc233 100755
#endif
int main() {}
diff --git a/configure.ac b/configure.ac
index 2b10e9a1b02..677a0196c2b 100644
index 1651cbf3b02..2e2ecc47542 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1309,7 +1309,7 @@ if test "$GCC" = yes; then
@@ -1323,7 +1323,7 @@ if test "$GCC" = yes; then
AC_MSG_CHECKING([whether g++ accepts -static-libstdc++ -static-libgcc])
AC_LANG_PUSH(C++)
AC_LINK_IFELSE([AC_LANG_SOURCE([
@@ -1,6 +1,6 @@
From edddb1f294d667eac94649ba0665fe464990ed18 Mon Sep 17 00:00:00 2001
From 63157cb403b6aa13147840c036a8555c4ea9c166 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 2 Mar 2015 01:27:17 +0000
Date: Thu, 10 Mar 2022 21:21:33 -0800
Subject: [PATCH] Only generate an RPATH entry if LD_RUN_PATH is not empty
for cases where -rpath isn't specified. debian (#151024)
@@ -10,23 +10,24 @@ Upstream-Status: Pending
Signed-off-by: Chris Chimelis <chris@debian.org>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
ld/ldelf.c | 4 ++++
1 file changed, 4 insertions(+)
ld/ldelf.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/ld/ldelf.c b/ld/ldelf.c
index 34cbc60e5e9..b1965a9e96f 100644
index 0d61a3209ec..cd0da2013e2 100644
--- a/ld/ldelf.c
+++ b/ld/ldelf.c
@@ -1277,6 +1277,8 @@ ldelf_after_open (int use_libpath, int native, int is_linux, int is_freebsd,
@@ -1127,6 +1127,9 @@ ldelf_handle_dt_needed (struct elf_link_hash_table *htab,
&& command_line.rpath == NULL)
{
path = (const char *) getenv ("LD_RUN_PATH");
+ if ((path) && (strlen (path) == 0))
+ path = NULL;
+ path = NULL;
+
if (path
&& ldelf_search_needed (path, &n, force,
is_linux, elfsize))
@@ -1636,6 +1638,8 @@ ldelf_before_allocation (char *audit, char *depaudit,
@@ -1801,6 +1804,8 @@ ldelf_before_allocation (char *audit, char *depaudit,
rpath = command_line.rpath;
if (rpath == NULL)
rpath = (const char *) getenv ("LD_RUN_PATH");
@@ -1,75 +0,0 @@
From 9a84a44d5df4618dd616137fa755bd71b7eacc5f Mon Sep 17 00:00:00 2001
From: Mike Frysinger <vapier@gentoo.org>
Date: Sun, 23 Jan 2022 12:44:24 -0500
Subject: [PATCH] gas: drop old cygnus install hack
This was needed when gas was using the automake cygnus option, but
this was removed years ago by Simon in d0ac1c44885daf68f631befa37e
("Bump to autoconf 2.69 and automake 1.15.1"). So delete it here.
The info pages are already & still installed by default w/out it.
Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=9a84a44d5df4618dd616137fa755bd71b7eacc5f]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
gas/Makefile.in | 14 +++++---------
gas/doc/local.mk | 4 ----
2 files changed, 5 insertions(+), 13 deletions(-)
diff --git a/gas/Makefile.in b/gas/Makefile.in
index 8f0a56fd8d6..67dac53f68c 100644
--- a/gas/Makefile.in
+++ b/gas/Makefile.in
@@ -1854,7 +1854,7 @@ info: info-recursive
info-am: $(INFO_DEPS) info-local
-install-data-am: install-data-local install-info-am install-man
+install-data-am: install-info-am install-man
install-dvi: install-dvi-recursive
@@ -2008,10 +2008,10 @@ uninstall-man: uninstall-man1
distclean-DEJAGNU distclean-compile distclean-generic \
distclean-hdr distclean-libtool distclean-tags dvi dvi-am html \
html-am html-local info info-am info-local install install-am \
- install-data install-data-am install-data-local install-dvi \
- install-dvi-am install-exec install-exec-am install-exec-local \
- install-html install-html-am install-info install-info-am \
- install-man install-man1 install-pdf install-pdf-am install-ps \
+ install-data install-data-am install-dvi install-dvi-am \
+ install-exec install-exec-am install-exec-local install-html \
+ install-html-am install-info install-info-am install-man \
+ install-man1 install-pdf install-pdf-am install-ps \
install-ps-am install-strip installcheck installcheck-am \
installdirs installdirs-am maintainer-clean \
maintainer-clean-aminfo maintainer-clean-generic mostlyclean \
@@ -2211,10 +2211,6 @@ doc/asconfig.texi: doc/$(CONFIG).texi doc/$(am__dirstamp)
$(AM_V_GEN)cp $(srcdir)/doc/$(CONFIG).texi doc/asconfig.texi
$(AM_V_at)chmod u+w doc/asconfig.texi
-# We want install to imply install-info as per GNU standards, despite the
-# cygnus option.
-install-data-local: install-info
-
# Maintenance
# We need it for the taz target in ../Makefile.in.
diff --git a/gas/doc/local.mk b/gas/doc/local.mk
index c2de441257c..ac205cf08a2 100644
--- a/gas/doc/local.mk
+++ b/gas/doc/local.mk
@@ -101,10 +101,6 @@ CPU_DOCS = \
%D%/c-z80.texi \
%D%/c-z8k.texi
-# We want install to imply install-info as per GNU standards, despite the
-# cygnus option.
-install-data-local: install-info
-
# This one isn't ready for prime time yet. Not even a little bit.
noinst_TEXINFOS = %D%/internals.texi
--
2.27.0
@@ -1,49 +0,0 @@
From 2a4fc266dbf77ed7ab83da16468e9ba627b8bc2d Mon Sep 17 00:00:00 2001
From: Nick Clifton <nickc@redhat.com>
Date: Mon, 27 Jun 2022 13:07:40 +0100
Subject: [PATCH] Have gold's File_read::do_read() function check the start
parameter
PR 23765
* fileread.cc (File_read::do_read): Check start parameter before
computing number of bytes to read.
Upstream-Status: Backport [https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=2a4fc266dbf77ed7ab83da16468e9ba627b8bc2d]
Signed-off-by: Pgowda <pgowda.cve@gmail.com>
---
gold/ChangeLog | 6 ++++++
gold/fileread.cc | 6 ++++++
2 files changed, 12 insertions(+)
diff --git a/gold/ChangeLog b/gold/ChangeLog
index 5103dab7b67..8557dc6db7f 100644
--- a/gold/ChangeLog
+++ b/gold/ChangeLog
@@ -1,3 +1,9 @@
+2022-06-27 Nick Clifton <nickc@redhat.com>
+
+ PR 23765
+ * fileread.cc (File_read::do_read): Check start parameter before
+ computing number of bytes to read.
+
2022-02-17 Nick Clifton <nickc@redhat.com>
* po/sr.po: Updated Serbian translation.
diff --git a/gold/fileread.cc b/gold/fileread.cc
index 2b653f78c2e..af2df215468 100644
--- a/gold/fileread.cc
+++ b/gold/fileread.cc
@@ -385,6 +385,12 @@ File_read::do_read(off_t start, section_
ssize_t bytes;
if (this->whole_file_view_ != NULL)
{
+ // See PR 23765 for an example of a testcase that triggers this error.
+ if (((ssize_t) start) < 0)
+ gold_fatal(_("%s: read failed, starting offset (%#llx) less than zero"),
+ this->filename().c_str(),
+ static_cast<long long>(start));
+
bytes = this->size_ - start;
if (static_cast<section_size_type>(bytes) >= size)
{