mirror of
https://git.yoctoproject.org/poky
synced 2026-04-30 21:32:13 +02:00
binutils: Upgrade to 2.34 release
Details of changelog [1] Removing bfd/ld patch to enable PE targets, instead use specific emulations via --enable-targets for x86_64 Re-arrange/forward-port patches and upgrade libctf configure to libtool 2.4 patch rpaths are no longer emitted into elfedit/readelf therefore no need of chrpath anymore Instead of pre-generating configure scripts and house them in libtool patch, generate them during configure. This also ensures that we do not patch configure directly but rather the sources which generate it Package newly added libctf library [1] https://lists.gnu.org/archive/html/info-gnu/2020-02/msg00000.html (From OE-Core rev: 82f7d5cfc2ab02f39b69c0f8697d660936422d4a) Signed-off-by: Khem Raj <raj.khem@gmail.com> Cc: Christopher Clark <christopher.clark6@baesystems.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -18,7 +18,7 @@ PREFERRED_PROVIDER_virtual/gettext ??= "gettext"
|
||||
|
||||
GCCVERSION ?= "9.%"
|
||||
SDKGCCVERSION ?= "${GCCVERSION}"
|
||||
BINUVERSION ?= "2.33%"
|
||||
BINUVERSION ?= "2.34%"
|
||||
GDBVERSION ?= "9.%"
|
||||
GLIBCVERSION ?= "2.31"
|
||||
LINUXLIBCVERSION ?= "5.4%"
|
||||
|
||||
@@ -14,35 +14,32 @@ def binutils_branch_version(d):
|
||||
pvsplit = d.getVar('PV').split('.')
|
||||
return pvsplit[0] + "_" + pvsplit[1]
|
||||
|
||||
# When upgrading to 2.33, please make sure there is no trailing .0, so
|
||||
# When upgrading to 2.35, please make sure there is no trailing .0, so
|
||||
# that upstream version check can work correctly.
|
||||
PV = "2.33.1"
|
||||
CVE_VERSION = "2.33"
|
||||
PV = "2.34"
|
||||
CVE_VERSION = "2.34"
|
||||
BINUPV = "${@binutils_branch_version(d)}"
|
||||
#BRANCH = "binutils-${BINUPV}-branch"
|
||||
BRANCH ?= "binutils-2_33-branch"
|
||||
BRANCH ?= "binutils-2_34-branch"
|
||||
|
||||
UPSTREAM_CHECK_GITTAGREGEX = "binutils-(?P<pver>\d+_(\d_?)*)"
|
||||
|
||||
SRCREV ?= "c656f9a430636a6a7fc7a08c0e08f0098a729a02"
|
||||
SRCREV ?= "d4b50999b3b287b5f984ade2f8734aa8c9359440"
|
||||
BINUTILS_GIT_URI ?= "git://sourceware.org/git/binutils-gdb.git;branch=${BRANCH};protocol=git"
|
||||
SRC_URI = "\
|
||||
${BINUTILS_GIT_URI} \
|
||||
file://0003-configure-widen-the-regexp-for-SH-architectures.patch \
|
||||
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-Use-libtool-2.4.patch \
|
||||
file://0007-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch \
|
||||
file://0008-warn-for-uses-of-system-directories-when-cross-linki.patch \
|
||||
file://0009-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch \
|
||||
file://0010-Change-default-emulation-for-mips64-linux.patch \
|
||||
file://0011-Add-support-for-Netlogic-XLP.patch \
|
||||
file://0012-fix-the-incorrect-assembling-for-ppc-wait-mnemonic.patch \
|
||||
file://0013-Detect-64-bit-MIPS-targets.patch \
|
||||
file://0014-sync-with-OE-libtool-changes.patch \
|
||||
file://0015-binutils-enable-x86_64-pep-for-producing-EFI-binarie.patch \
|
||||
file://CVE-2019-17450.patch \
|
||||
file://CVE-2019-17451.patch \
|
||||
file://0004-configure-widen-the-regexp-for-SH-architectures.patch \
|
||||
file://0005-Point-scripts-location-to-libdir.patch \
|
||||
file://0006-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch \
|
||||
file://0007-Use-libtool-2.4.patch \
|
||||
file://0008-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch \
|
||||
file://0009-warn-for-uses-of-system-directories-when-cross-linki.patch \
|
||||
file://0010-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch \
|
||||
file://0011-Change-default-emulation-for-mips64-linux.patch \
|
||||
file://0012-Add-support-for-Netlogic-XLP.patch \
|
||||
file://0013-fix-the-incorrect-assembling-for-ppc-wait-mnemonic.patch \
|
||||
file://0014-Detect-64-bit-MIPS-targets.patch \
|
||||
file://0015-sync-with-OE-libtool-changes.patch \
|
||||
"
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
@@ -13,17 +13,12 @@ LICENSE = "GPLv3"
|
||||
|
||||
DEPENDS = "flex-native bison-native zlib-native gnu-config-native autoconf-native"
|
||||
|
||||
#
|
||||
# we need chrpath > 0.14 and some distros like centos 7 still have older chrpath
|
||||
#
|
||||
DEPENDS_append_class-target = " chrpath-replacement-native"
|
||||
EXTRANATIVEPATH_append_class-target = " chrpath-native"
|
||||
|
||||
inherit autotools gettext multilib_header texinfo
|
||||
|
||||
FILES_${PN} = " \
|
||||
${bindir}/${TARGET_PREFIX}* \
|
||||
${libdir}/lib*-*.so \
|
||||
${libdir}/lib*.so.* \
|
||||
${libdir}/lib*-${PV}*.so \
|
||||
${prefix}/${TARGET_SYS}/bin/* \
|
||||
${bindir}/embedspu"
|
||||
|
||||
@@ -33,6 +28,8 @@ FILES_${PN}-dev = " \
|
||||
${includedir} \
|
||||
${libdir}/*.la \
|
||||
${libdir}/libbfd.so \
|
||||
${libdir}/libctf.so \
|
||||
${libdir}/libctf-nobfd.so \
|
||||
${libdir}/libopcodes.so"
|
||||
|
||||
# Rather than duplicating multiple entries for these, make one
|
||||
@@ -80,6 +77,8 @@ EXTRA_OECONF = "--program-prefix=${TARGET_PREFIX} \
|
||||
${LDGOLD} \
|
||||
${@bb.utils.contains('DISTRO_FEATURES', 'multiarch', '--enable-64-bit-bfd', '', d)}"
|
||||
|
||||
EXTRA_OECONF_append_x86-64 = " --enable-targets=x86_64-pe,x86_64-pep "
|
||||
|
||||
LDGOLD_class-native = ""
|
||||
LDGOLD_class-crosssdk = ""
|
||||
LDGOLD ?= "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', '--enable-gold=default --enable-threads', '--enable-gold --enable-ld=default --enable-threads', d)}"
|
||||
@@ -112,7 +111,14 @@ export CC_FOR_BUILD = "LD_LIBRARY_PATH= ${BUILD_CC}"
|
||||
MULTIARCH := "${@bb.utils.contains("DISTRO_FEATURES", "multiarch", "yes", "no", d)}"
|
||||
do_configure[vardeps] += "MULTIARCH"
|
||||
do_configure () {
|
||||
(cd ${S}; gnu-configize) || die "Failed to run gnu-configize"
|
||||
(for d in . bfd binutils gas gold gprof ld libctf opcodes; do
|
||||
cd ${S}/$d
|
||||
autoconf
|
||||
rm -rf autom4te.cache
|
||||
done
|
||||
cd ${S}
|
||||
gnu-configize)
|
||||
|
||||
oe_runconf
|
||||
#
|
||||
# must prime config.cache to ensure the build of libiberty
|
||||
@@ -123,10 +129,6 @@ do_configure () {
|
||||
done
|
||||
}
|
||||
|
||||
do_compile_append_class-target() {
|
||||
chrpath -d ${B}/binutils/elfedit
|
||||
chrpath -d ${B}/binutils/readelf
|
||||
}
|
||||
do_install () {
|
||||
autotools_do_install
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
From c9aed4cb3c02715b2ba1fc70949043849f202f46 Mon Sep 17 00:00:00 2001
|
||||
From b05f0be13aadf0b26a0b39dfe7daf2c47a300338 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Sun, 8 Dec 2019 00:31:35 -0800
|
||||
Date: Mon, 2 Mar 2015 01:58:54 +0000
|
||||
Subject: [PATCH] binutils-crosssdk: Generate relocatable SDKs
|
||||
|
||||
This patch will modify the ELF linker scripts so that the crosssdk
|
||||
@@ -18,23 +18,23 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
2 files changed, 5 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/ld/genscripts.sh b/ld/genscripts.sh
|
||||
index cb2b081e9e..db2e9fd569 100755
|
||||
index 03392d265c..435689ea14 100755
|
||||
--- a/ld/genscripts.sh
|
||||
+++ b/ld/genscripts.sh
|
||||
@@ -325,6 +325,7 @@ DATA_ALIGNMENT_u="${DATA_ALIGNMENT_u-${DATA_ALIGNMENT_r}}"
|
||||
@@ -304,6 +304,7 @@ DATA_ALIGNMENT_u="${DATA_ALIGNMENT_u-${DATA_ALIGNMENT_r}}"
|
||||
LD_FLAG=r
|
||||
DATA_ALIGNMENT=${DATA_ALIGNMENT_r}
|
||||
DEFAULT_DATA_ALIGNMENT="ALIGN(${SEGMENT_SIZE})"
|
||||
+PARTIAL_LINKING=" "
|
||||
( echo "/* Script for ld -r: link without relocation */"
|
||||
( echo "/* Script for -r */"
|
||||
source_sh ${CUSTOMIZER_SCRIPT}
|
||||
source_sh ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
|
||||
@@ -333,10 +334,12 @@ DEFAULT_DATA_ALIGNMENT="ALIGN(${SEGMENT_SIZE})"
|
||||
@@ -312,10 +313,12 @@ DEFAULT_DATA_ALIGNMENT="ALIGN(${SEGMENT_SIZE})"
|
||||
LD_FLAG=u
|
||||
DATA_ALIGNMENT=${DATA_ALIGNMENT_u}
|
||||
CONSTRUCTING=" "
|
||||
+PARTIAL_LINKING=" "
|
||||
( echo "/* Script for ld -Ur: link w/out relocation, do create constructors */"
|
||||
( echo "/* Script for -Ur */"
|
||||
source_sh ${CUSTOMIZER_SCRIPT}
|
||||
source_sh ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
|
||||
) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xu
|
||||
@@ -43,7 +43,7 @@ index cb2b081e9e..db2e9fd569 100755
|
||||
DATA_ALIGNMENT=${DATA_ALIGNMENT_}
|
||||
RELOCATING=" "
|
||||
diff --git a/ld/scripttempl/elf.sc b/ld/scripttempl/elf.sc
|
||||
index f9f0f7d402..9e469dca86 100644
|
||||
index 0b8b32a440..ee6b71075d 100644
|
||||
--- a/ld/scripttempl/elf.sc
|
||||
+++ b/ld/scripttempl/elf.sc
|
||||
@@ -140,8 +140,8 @@ if test -z "$DATA_SEGMENT_ALIGN"; then
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 9fe5a2dd03fdf2986c89dd58ae48c0095f1c0411 Mon Sep 17 00:00:00 2001
|
||||
From 6d79f81336e7cbe727b5a51134f5d314a455379d 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
|
||||
@@ -22,7 +22,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
1 file changed, 25 deletions(-)
|
||||
|
||||
diff --git a/ld/genscripts.sh b/ld/genscripts.sh
|
||||
index c90f38a63c..97ad1a24d6 100755
|
||||
index 435689ea14..cff8a1467f 100755
|
||||
--- a/ld/genscripts.sh
|
||||
+++ b/ld/genscripts.sh
|
||||
@@ -235,31 +235,6 @@ append_to_lib_path()
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
We need binutils to look at our ld.so.conf file within the SDK to ensure
|
||||
From d057b215f114f6158b4010ab44a19cae9dcc8386 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
|
||||
installation
|
||||
|
||||
We need binutils to look at our ld.so.conf file within the SDK to ensure
|
||||
we search the SDK's libdirs as well as those from the host system.
|
||||
|
||||
We therefore pass in the directory to the code using a define, then add
|
||||
@@ -6,18 +12,27 @@ it to a section we relocate in a similar way to the way we relocate the
|
||||
gcc internal paths. This ensures that ld works correctly in our buildtools
|
||||
tarball.
|
||||
|
||||
Standard sysroot relocation doesn't work since we're not in a sysroot,
|
||||
Standard sysroot relocation doesn't work since we're not in a sysroot,
|
||||
we want to use both the host system and SDK libs.
|
||||
|
||||
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
||||
2020/1/17
|
||||
Upstream-Status: Inappropriate [OE specific tweak]
|
||||
|
||||
Index: git/ld/Makefile.am
|
||||
===================================================================
|
||||
--- git.orig/ld/Makefile.am
|
||||
+++ git/ld/Makefile.am
|
||||
@@ -36,7 +36,8 @@ am__skipyacc =
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
ld/Makefile.am | 3 ++-
|
||||
ld/Makefile.in | 3 ++-
|
||||
ld/ldelf.c | 2 +-
|
||||
ld/ldmain.c | 1 +
|
||||
ld/ldmain.h | 1 +
|
||||
5 files changed, 7 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/ld/Makefile.am b/ld/Makefile.am
|
||||
index 4a9b8404b7..1c132d3ce4 100644
|
||||
--- a/ld/Makefile.am
|
||||
+++ b/ld/Makefile.am
|
||||
@@ -42,7 +42,8 @@ ZLIBINC = @zlibinc@
|
||||
|
||||
ELF_CLFAGS=-DELF_LIST_OPTIONS=@elf_list_options@ \
|
||||
-DELF_SHLIB_LIST_OPTIONS=@elf_shlib_list_options@ \
|
||||
@@ -27,12 +42,12 @@ Index: git/ld/Makefile.am
|
||||
WARN_CFLAGS = @WARN_CFLAGS@
|
||||
NO_WERROR = @NO_WERROR@
|
||||
AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS)
|
||||
Index: git/ld/Makefile.in
|
||||
===================================================================
|
||||
--- git.orig/ld/Makefile.in
|
||||
+++ git/ld/Makefile.in
|
||||
@@ -546,7 +546,8 @@ am__skiplex =
|
||||
am__skipyacc =
|
||||
diff --git a/ld/Makefile.in b/ld/Makefile.in
|
||||
index 46d9b14077..e453bc1b33 100644
|
||||
--- a/ld/Makefile.in
|
||||
+++ b/ld/Makefile.in
|
||||
@@ -555,7 +555,8 @@ ZLIB = @zlibdir@ -lz
|
||||
ZLIBINC = @zlibinc@
|
||||
ELF_CLFAGS = -DELF_LIST_OPTIONS=@elf_list_options@ \
|
||||
-DELF_SHLIB_LIST_OPTIONS=@elf_shlib_list_options@ \
|
||||
- -DELF_PLT_UNWIND_LIST_OPTIONS=@elf_plt_unwind_list_options@
|
||||
@@ -41,24 +56,24 @@ Index: git/ld/Makefile.in
|
||||
|
||||
AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS)
|
||||
@ENABLE_PLUGINS_FALSE@PLUGIN_C =
|
||||
Index: git/ld/emultempl/elf32.em
|
||||
===================================================================
|
||||
--- git.orig/ld/emultempl/elf32.em
|
||||
+++ git/ld/emultempl/elf32.em
|
||||
@@ -1024,7 +1024,7 @@ gld${EMULATION_NAME}_check_ld_so_conf (c
|
||||
diff --git a/ld/ldelf.c b/ld/ldelf.c
|
||||
index 2e27cf48a8..a095d6aac5 100644
|
||||
--- a/ld/ldelf.c
|
||||
+++ b/ld/ldelf.c
|
||||
@@ -907,7 +907,7 @@ ldelf_check_ld_so_conf (const struct bfd_link_needed_list *l, int force,
|
||||
|
||||
info.path = NULL;
|
||||
info.len = info.alloc = 0;
|
||||
- tmppath = concat (ld_sysroot, "${prefix}/etc/ld.so.conf",
|
||||
+ tmppath = concat (ld_sysconfdir, "/ld.so.conf",
|
||||
- tmppath = concat (ld_sysroot, prefix, "/etc/ld.so.conf",
|
||||
+ tmppath = concat (ld_sysconfdir, "/etc/ld.so.conf",
|
||||
(const char *) NULL);
|
||||
if (!gld${EMULATION_NAME}_parse_ld_so_conf (&info, tmppath))
|
||||
if (!ldelf_parse_ld_so_conf (&info, tmppath))
|
||||
{
|
||||
Index: git/ld/ldmain.c
|
||||
===================================================================
|
||||
--- git.orig/ld/ldmain.c
|
||||
+++ git/ld/ldmain.c
|
||||
@@ -68,6 +68,7 @@ char *program_name;
|
||||
diff --git a/ld/ldmain.c b/ld/ldmain.c
|
||||
index c4af10f4e9..da1ad17763 100644
|
||||
--- a/ld/ldmain.c
|
||||
+++ b/ld/ldmain.c
|
||||
@@ -69,6 +69,7 @@ char *program_name;
|
||||
|
||||
/* The prefix for system library directories. */
|
||||
const char *ld_sysroot;
|
||||
@@ -66,10 +81,10 @@ Index: git/ld/ldmain.c
|
||||
|
||||
/* The canonical representation of ld_sysroot. */
|
||||
char *ld_canon_sysroot;
|
||||
Index: git/ld/ldmain.h
|
||||
===================================================================
|
||||
--- git.orig/ld/ldmain.h
|
||||
+++ git/ld/ldmain.h
|
||||
diff --git a/ld/ldmain.h b/ld/ldmain.h
|
||||
index 0f05821d1e..54c36a94ce 100644
|
||||
--- a/ld/ldmain.h
|
||||
+++ b/ld/ldmain.h
|
||||
@@ -23,6 +23,7 @@
|
||||
|
||||
extern char *program_name;
|
||||
@@ -1,44 +0,0 @@
|
||||
From aecded290b2ec0b469c70fc6b062bd5ee6ba5e3a Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Mon, 2 Mar 2015 01:07:33 +0000
|
||||
Subject: [PATCH] configure: widen the regexp for SH architectures
|
||||
|
||||
gprof needs to know about uclibc
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
configure | 2 +-
|
||||
gprof/configure | 5 +++++
|
||||
2 files changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index 6a9719f609..001523eebf 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -3865,7 +3865,7 @@ case "${target}" in
|
||||
nvptx*-*-*)
|
||||
noconfigdirs="$noconfigdirs target-libssp target-libstdc++-v3 target-libobjc"
|
||||
;;
|
||||
- sh-*-*)
|
||||
+ sh*-*-* | sh64-*-*)
|
||||
case "${target}" in
|
||||
sh*-*-elf)
|
||||
;;
|
||||
diff --git a/gprof/configure b/gprof/configure
|
||||
index cbb3aced46..b5eabceb77 100755
|
||||
--- a/gprof/configure
|
||||
+++ b/gprof/configure
|
||||
@@ -6162,6 +6162,11 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
+linux-uclibc*)
|
||||
+ lt_cv_deplibs_check_method=pass_all
|
||||
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
|
||||
+ ;;
|
||||
+
|
||||
netbsd*)
|
||||
if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
|
||||
lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
|
||||
@@ -0,0 +1,41 @@
|
||||
From f7ad8a44c10f01e03680f093fd7af71c9f5e8606 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Mon, 2 Mar 2015 01:07:33 +0000
|
||||
Subject: [PATCH] configure: widen the regexp for SH architectures
|
||||
|
||||
gprof needs to know about uclibc
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
configure | 2 +-
|
||||
configure.ac | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index 91dc42f6c7..7c1b747e7c 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -3915,7 +3915,7 @@ case "${target}" in
|
||||
nvptx*-*-*)
|
||||
noconfigdirs="$noconfigdirs target-libssp target-libstdc++-v3 target-libobjc"
|
||||
;;
|
||||
- sh-*-*)
|
||||
+ sh*-*-* | sh64-*-*)
|
||||
case "${target}" in
|
||||
sh*-*-elf)
|
||||
;;
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 4bd869a63a..7187b34dfc 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -1159,7 +1159,7 @@ case "${target}" in
|
||||
nvptx*-*-*)
|
||||
noconfigdirs="$noconfigdirs target-libssp target-libstdc++-v3 target-libobjc"
|
||||
;;
|
||||
- sh-*-*)
|
||||
+ sh*-*-* | sh64-*-*)
|
||||
case "${target}" in
|
||||
sh*-*-elf)
|
||||
;;
|
||||
@@ -1,4 +1,4 @@
|
||||
From a9332107872ada73e72e92872ea2998a4e1495e0 Mon Sep 17 00:00:00 2001
|
||||
From 08b088b7dd3d9707ed66948a7271ffb438eeddf5 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 ddc7a78368..6fa7bf2583 100644
|
||||
index 1c132d3ce4..8d82cf2e16 100644
|
||||
--- a/ld/Makefile.am
|
||||
+++ b/ld/Makefile.am
|
||||
@@ -63,7 +63,7 @@ endif
|
||||
@@ -64,7 +64,7 @@ endif
|
||||
# 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 ddc7a78368..6fa7bf2583 100644
|
||||
EMUL = @EMUL@
|
||||
EMULATION_OFILES = @EMULATION_OFILES@
|
||||
diff --git a/ld/Makefile.in b/ld/Makefile.in
|
||||
index fdf06128b2..5c108b9e05 100644
|
||||
index e453bc1b33..2dcd72f809 100644
|
||||
--- a/ld/Makefile.in
|
||||
+++ b/ld/Makefile.in
|
||||
@@ -572,7 +572,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS)
|
||||
@@ -573,7 +573,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS)
|
||||
# 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 65fb7a33aba30dec8690e0a237efaa3b9649154c Mon Sep 17 00:00:00 2001
|
||||
From 13791636abf518f0db209dc51c29445d80421f2e Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Mon, 2 Mar 2015 01:27:17 +0000
|
||||
Subject: [PATCH] Only generate an RPATH entry if LD_RUN_PATH is not empty
|
||||
@@ -10,21 +10,23 @@ Upstream-Status: Pending
|
||||
Signed-off-by: Chris Chimelis <chris@debian.org>
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
ld/emultempl/elf32.em | 4 ++++
|
||||
ld/ldelf.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
--- a/ld/emultempl/elf32.em
|
||||
+++ b/ld/emultempl/elf32.em
|
||||
@@ -1470,6 +1470,8 @@ fragment <<EOF
|
||||
&& command_line.rpath == NULL)
|
||||
{
|
||||
path = (const char *) getenv ("LD_RUN_PATH");
|
||||
+ if ((path) && (strlen (path) == 0))
|
||||
+ path = NULL;
|
||||
if (path
|
||||
&& gld${EMULATION_NAME}_search_needed (path, &n, force))
|
||||
break;
|
||||
@@ -1745,6 +1747,8 @@ gld${EMULATION_NAME}_before_allocation (
|
||||
diff --git a/ld/ldelf.c b/ld/ldelf.c
|
||||
index a095d6aac5..a2455a8793 100644
|
||||
--- a/ld/ldelf.c
|
||||
+++ b/ld/ldelf.c
|
||||
@@ -1229,6 +1229,8 @@ ldelf_after_open (int use_libpath, int native, int is_linux, int is_freebsd,
|
||||
&& command_line.rpath == NULL)
|
||||
{
|
||||
path = (const char *) getenv ("LD_RUN_PATH");
|
||||
+ if ((path) && (strlen (path) == 0))
|
||||
+ path = NULL;
|
||||
if (path
|
||||
&& ldelf_search_needed (path, &n, force,
|
||||
is_linux, elfsize))
|
||||
@@ -1573,6 +1575,8 @@ ldelf_before_allocation (char *audit, char *depaudit,
|
||||
rpath = command_line.rpath;
|
||||
if (rpath == NULL)
|
||||
rpath = (const char *) getenv ("LD_RUN_PATH");
|
||||
File diff suppressed because it is too large
Load Diff
7115
meta/recipes-devtools/binutils/binutils/0007-Use-libtool-2.4.patch
Normal file
7115
meta/recipes-devtools/binutils/binutils/0007-Use-libtool-2.4.patch
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
||||
From cd6151c8423a0550fd5758ce17664e34560a103c Mon Sep 17 00:00:00 2001
|
||||
From e36a4e05f900bbe6a8d744a93f3a407bc55c96f7 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
|
||||
@@ -17,10 +17,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/libiberty/Makefile.in b/libiberty/Makefile.in
|
||||
index 0be45b4ae8..4817616bb2 100644
|
||||
index fe738d0db4..27d818f253 100644
|
||||
--- a/libiberty/Makefile.in
|
||||
+++ b/libiberty/Makefile.in
|
||||
@@ -364,7 +364,8 @@ install-strip: install
|
||||
@@ -365,7 +365,8 @@ install-strip: install
|
||||
# multilib-specific flags, it's overridden by FLAGS_TO_PASS from the
|
||||
# default multilib, so we have to take CFLAGS into account as well,
|
||||
# since it will be passed the multilib flags.
|
||||
@@ -1,4 +1,4 @@
|
||||
From 8ee1a4986ea35bd1e8ab867c5639d5fdbd944d9f Mon Sep 17 00:00:00 2001
|
||||
From 7b24f81e04c9d00d96de7dbd250beade6d2c6e44 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
|
||||
@@ -59,9 +59,11 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
ld/ldfile.c | 17 +++++++++++++++++
|
||||
ld/ldlex.h | 2 ++
|
||||
ld/ldmain.c | 2 ++
|
||||
ld/lexsup.c | 16 ++++++++++++++++
|
||||
9 files changed, 86 insertions(+)
|
||||
ld/lexsup.c | 15 +++++++++++++++
|
||||
9 files changed, 85 insertions(+)
|
||||
|
||||
diff --git a/ld/config.in b/ld/config.in
|
||||
index d93c9b0830..5da2742bea 100644
|
||||
--- a/ld/config.in
|
||||
+++ b/ld/config.in
|
||||
@@ -31,6 +31,9 @@
|
||||
@@ -74,9 +76,11 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
/* Additional extension a shared object might have. */
|
||||
#undef EXTRA_SHLIB_EXTENSION
|
||||
|
||||
diff --git a/ld/configure b/ld/configure
|
||||
index 811134a503..f8c17c19ae 100755
|
||||
--- a/ld/configure
|
||||
+++ b/ld/configure
|
||||
@@ -827,6 +827,7 @@ with_lib_path
|
||||
@@ -826,6 +826,7 @@ with_lib_path
|
||||
enable_targets
|
||||
enable_64_bit_bfd
|
||||
with_sysroot
|
||||
@@ -93,7 +97,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
--enable-gold[=ARG] build gold [ARG={default,yes,no}]
|
||||
--enable-got=<type> GOT handling scheme (target, single, negative,
|
||||
multigot)
|
||||
@@ -16619,6 +16622,19 @@ fi
|
||||
@@ -15788,6 +15791,19 @@ fi
|
||||
|
||||
|
||||
|
||||
@@ -113,6 +117,8 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
# Check whether --enable-gold was given.
|
||||
if test "${enable_gold+set}" = set; then :
|
||||
enableval=$enable_gold; case "${enableval}" in
|
||||
diff --git a/ld/configure.ac b/ld/configure.ac
|
||||
index b5e849d84a..22e022ec03 100644
|
||||
--- a/ld/configure.ac
|
||||
+++ b/ld/configure.ac
|
||||
@@ -94,6 +94,16 @@ AC_SUBST(use_sysroot)
|
||||
@@ -132,9 +138,11 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
dnl Use --enable-gold to decide if this linker should be the default.
|
||||
dnl "install_as_default" is set to false if gold is the default linker.
|
||||
dnl "installed_linker" is the installed BFD linker name.
|
||||
diff --git a/ld/ld.h b/ld/ld.h
|
||||
index 71fd781267..5c7843100b 100644
|
||||
--- a/ld/ld.h
|
||||
+++ b/ld/ld.h
|
||||
@@ -180,6 +180,14 @@ typedef struct
|
||||
@@ -166,6 +166,14 @@ typedef struct
|
||||
in the linker script. */
|
||||
bfd_boolean force_group_allocation;
|
||||
|
||||
@@ -149,9 +157,11 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
/* Big or little endian as set on command line. */
|
||||
enum endian_enum endian;
|
||||
|
||||
diff --git a/ld/ld.texi b/ld/ld.texi
|
||||
index eb7bcb9933..3c73d445a0 100644
|
||||
--- a/ld/ld.texi
|
||||
+++ b/ld/ld.texi
|
||||
@@ -2557,6 +2557,18 @@ string identifying the original linked f
|
||||
@@ -2551,6 +2551,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.
|
||||
@@ -170,9 +180,11 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
@end table
|
||||
|
||||
@c man end
|
||||
diff --git a/ld/ldfile.c b/ld/ldfile.c
|
||||
index 411f7ddf97..17db16c2cc 100644
|
||||
--- a/ld/ldfile.c
|
||||
+++ b/ld/ldfile.c
|
||||
@@ -116,6 +116,23 @@ ldfile_add_library_path (const char *nam
|
||||
@@ -117,6 +117,23 @@ ldfile_add_library_path (const char *name, bfd_boolean cmdline)
|
||||
new_dirs->name = concat (ld_sysroot, name + strlen ("$SYSROOT"), (const char *) NULL);
|
||||
else
|
||||
new_dirs->name = xstrdup (name);
|
||||
@@ -196,6 +208,8 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
}
|
||||
|
||||
/* Try to open a BFD for a lang_input_statement. */
|
||||
diff --git a/ld/ldlex.h b/ld/ldlex.h
|
||||
index 5287f19a7f..55096e4fc9 100644
|
||||
--- a/ld/ldlex.h
|
||||
+++ b/ld/ldlex.h
|
||||
@@ -150,6 +150,8 @@ enum option_values
|
||||
@@ -207,9 +221,11 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
};
|
||||
|
||||
/* The initial parser states. */
|
||||
diff --git a/ld/ldmain.c b/ld/ldmain.c
|
||||
index da1ad17763..12d0b07d8a 100644
|
||||
--- a/ld/ldmain.c
|
||||
+++ b/ld/ldmain.c
|
||||
@@ -270,6 +270,8 @@ main (int argc, char **argv)
|
||||
@@ -274,6 +274,8 @@ main (int argc, char **argv)
|
||||
command_line.warn_mismatch = TRUE;
|
||||
command_line.warn_search_mismatch = TRUE;
|
||||
command_line.check_section_addresses = -1;
|
||||
@@ -218,9 +234,11 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
|
||||
/* We initialize DEMANGLING based on the environment variable
|
||||
COLLECT_NO_DEMANGLE. The gcc collect2 program will demangle the
|
||||
diff --git a/ld/lexsup.c b/ld/lexsup.c
|
||||
index 3d15cc491d..0e8b4f2b7a 100644
|
||||
--- a/ld/lexsup.c
|
||||
+++ b/ld/lexsup.c
|
||||
@@ -549,6 +549,14 @@ static const struct ld_option ld_options
|
||||
@@ -550,6 +550,14 @@ static const struct ld_option ld_options[] =
|
||||
{ {"no-print-map-discarded", no_argument, NULL, OPTION_NO_PRINT_MAP_DISCARDED},
|
||||
'\0', NULL, N_("Do not show discarded sections in map file output"),
|
||||
TWO_DASHES },
|
||||
@@ -235,7 +253,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
};
|
||||
|
||||
#define OPTION_COUNT ARRAY_SIZE (ld_options)
|
||||
@@ -1590,6 +1598,13 @@ parse_args (unsigned argc, char **argv)
|
||||
@@ -1603,6 +1611,13 @@ parse_args (unsigned argc, char **argv)
|
||||
|
||||
case OPTION_PRINT_MAP_DISCARDED:
|
||||
config.print_map_discarded = TRUE;
|
||||
@@ -1,4 +1,4 @@
|
||||
From 903a43f07b7229adadff0f01d560646eb4b0e200 Mon Sep 17 00:00:00 2001
|
||||
From 70f3f2d9e912ea777fa113e02cdbc3465a66e40d 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 84349ede307f61d624e5d97397074f5177a5bdc9 Mon Sep 17 00:00:00 2001
|
||||
From 2182791a453f34bee6968b3e72848608cf7d7abe Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Mon, 2 Mar 2015 01:44:14 +0000
|
||||
Subject: [PATCH] Change default emulation for mips64*-*-linux
|
||||
@@ -13,9 +13,11 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
ld/configure.tgt | 8 ++++----
|
||||
2 files changed, 8 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/bfd/config.bfd b/bfd/config.bfd
|
||||
index b96931f52e..847f9f0ba9 100644
|
||||
--- a/bfd/config.bfd
|
||||
+++ b/bfd/config.bfd
|
||||
@@ -915,12 +915,12 @@ case "${targ}" in
|
||||
@@ -911,12 +911,12 @@ case "${targ}" in
|
||||
targ_selvecs="mips_elf32_le_vec mips_elf64_be_vec mips_elf64_le_vec mips_ecoff_be_vec mips_ecoff_le_vec"
|
||||
;;
|
||||
mips64*el-*-linux*)
|
||||
@@ -32,21 +34,24 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
;;
|
||||
mips*el-*-linux*)
|
||||
targ_defvec=mips_elf32_trad_le_vec
|
||||
diff --git a/ld/configure.tgt b/ld/configure.tgt
|
||||
index 23194e357f..f4f0eaf9b2 100644
|
||||
--- a/ld/configure.tgt
|
||||
+++ b/ld/configure.tgt
|
||||
@@ -468,11 +468,11 @@ mips*el-*-vxworks*) targ_emul=elf32elmip
|
||||
mips*-*-vxworks*) targ_emul=elf32ebmipvxworks
|
||||
targ_extra_emuls="elf32elmipvxworks" ;;
|
||||
mips*-*-windiss) targ_emul=elf32mipswindiss ;;
|
||||
@@ -541,12 +541,12 @@ mips*-*-vxworks*) targ_emul=elf32ebmipvxworks
|
||||
;;
|
||||
mips*-*-windiss) targ_emul=elf32mipswindiss
|
||||
;;
|
||||
-mips64*el-*-linux-*) targ_emul=elf32ltsmipn32
|
||||
- targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip"
|
||||
+mips64*el-*-linux-*) targ_emul=elf64ltsmip
|
||||
+ targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32ltsmip elf32btsmip elf64btsmip"
|
||||
targ_extra_libpath=$targ_extra_emuls ;;
|
||||
targ_extra_libpath=$targ_extra_emuls
|
||||
;;
|
||||
-mips64*-*-linux-*) targ_emul=elf32btsmipn32
|
||||
- targ_extra_emuls="elf32ltsmipn32 elf32btsmip elf32ltsmip elf64btsmip elf64ltsmip"
|
||||
+mips64*-*-linux-*) targ_emul=elf64btsmip
|
||||
+ targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32btsmip elf32ltsmip elf64ltsmip"
|
||||
targ_extra_libpath=$targ_extra_emuls ;;
|
||||
targ_extra_libpath=$targ_extra_emuls
|
||||
;;
|
||||
mips*el-*-linux-*) targ_emul=elf32ltsmip
|
||||
targ_extra_emuls="elf32btsmip elf32ltsmipn32 elf64ltsmip elf32btsmipn32 elf64btsmip"
|
||||
@@ -1,4 +1,4 @@
|
||||
From 97e0fdbf8e85a7e690ac09d01a2ae93ba00cfb5d Mon Sep 17 00:00:00 2001
|
||||
From a0237ec2d1e58bd35c236df39dd5a06504c6d2ed Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Sun, 14 Feb 2016 17:06:19 +0000
|
||||
Subject: [PATCH] Add support for Netlogic XLP
|
||||
@@ -26,16 +26,19 @@ Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
|
||||
binutils/readelf.c | 1 +
|
||||
gas/config/tc-mips.c | 4 +++-
|
||||
gas/configure | 3 +++
|
||||
gas/configure.ac | 3 +++
|
||||
include/elf/mips.h | 1 +
|
||||
include/opcode/mips.h | 6 ++++++
|
||||
ld/configure.tgt | 3 +++
|
||||
opcodes/mips-dis.c | 12 +++++-------
|
||||
opcodes/mips-opc.c | 31 ++++++++++++++++++++-----------
|
||||
14 files changed, 62 insertions(+), 21 deletions(-)
|
||||
15 files changed, 65 insertions(+), 21 deletions(-)
|
||||
|
||||
diff --git a/bfd/aoutx.h b/bfd/aoutx.h
|
||||
index fa3a9746b6..5078024fd5 100644
|
||||
--- a/bfd/aoutx.h
|
||||
+++ b/bfd/aoutx.h
|
||||
@@ -799,6 +799,7 @@ NAME (aout, machine_type) (enum bfd_arch
|
||||
@@ -799,6 +799,7 @@ NAME (aout, machine_type) (enum bfd_architecture arch,
|
||||
case bfd_mach_mipsisa64r6:
|
||||
case bfd_mach_mips_sb1:
|
||||
case bfd_mach_mips_xlr:
|
||||
@@ -43,6 +46,8 @@ Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
|
||||
/* FIXME: These should be MIPS3, MIPS4, MIPS16, MIPS32, etc. */
|
||||
arch_flags = M_MIPS2;
|
||||
break;
|
||||
diff --git a/bfd/archures.c b/bfd/archures.c
|
||||
index 232103817c..b2b3b8c124 100644
|
||||
--- a/bfd/archures.c
|
||||
+++ b/bfd/archures.c
|
||||
@@ -185,6 +185,7 @@ DESCRIPTION
|
||||
@@ -53,9 +58,11 @@ Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
|
||||
.#define bfd_mach_mipsisa32 32
|
||||
.#define bfd_mach_mipsisa32r2 33
|
||||
.#define bfd_mach_mipsisa32r3 34
|
||||
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
|
||||
index 7c13bc8c91..2e453c50c1 100644
|
||||
--- a/bfd/bfd-in2.h
|
||||
+++ b/bfd/bfd-in2.h
|
||||
@@ -2125,6 +2125,7 @@ enum bfd_architecture
|
||||
@@ -1568,6 +1568,7 @@ enum bfd_architecture
|
||||
#define bfd_mach_mips_octeon3 6503
|
||||
#define bfd_mach_mips_xlr 887682 /* decimal 'XLR'. */
|
||||
#define bfd_mach_mips_interaptiv_mr2 736550 /* decimal 'IA2'. */
|
||||
@@ -63,9 +70,11 @@ Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
|
||||
#define bfd_mach_mipsisa32 32
|
||||
#define bfd_mach_mipsisa32r2 33
|
||||
#define bfd_mach_mipsisa32r3 34
|
||||
diff --git a/bfd/config.bfd b/bfd/config.bfd
|
||||
index 847f9f0ba9..a12707f827 100644
|
||||
--- a/bfd/config.bfd
|
||||
+++ b/bfd/config.bfd
|
||||
@@ -898,6 +898,11 @@ case "${targ}" in
|
||||
@@ -894,6 +894,11 @@ case "${targ}" in
|
||||
targ_defvec=mips_elf32_le_vec
|
||||
targ_selvecs="mips_elf32_be_vec mips_elf64_be_vec mips_elf64_le_vec"
|
||||
;;
|
||||
@@ -77,9 +86,11 @@ Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
|
||||
mips*-*-elf* | mips*-*-rtems* | mips*-*-windiss | mips*-*-none)
|
||||
targ_defvec=mips_elf32_be_vec
|
||||
targ_selvecs="mips_elf32_le_vec mips_elf64_be_vec mips_elf64_le_vec"
|
||||
diff --git a/bfd/cpu-mips.c b/bfd/cpu-mips.c
|
||||
index 802acb45f1..fd9ec4c0ad 100644
|
||||
--- a/bfd/cpu-mips.c
|
||||
+++ b/bfd/cpu-mips.c
|
||||
@@ -107,7 +107,8 @@ enum
|
||||
@@ -108,7 +108,8 @@ enum
|
||||
I_mipsocteon3,
|
||||
I_xlr,
|
||||
I_interaptiv_mr2,
|
||||
@@ -89,16 +100,18 @@ Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
|
||||
};
|
||||
|
||||
#define NN(index) (&arch_info_struct[(index) + 1])
|
||||
@@ -162,7 +163,8 @@ static const bfd_arch_info_type arch_inf
|
||||
N (64, 64, bfd_mach_mips_xlr, "mips:xlr", FALSE, NN(I_xlr)),
|
||||
@@ -163,7 +164,8 @@ static const bfd_arch_info_type arch_info_struct[] =
|
||||
N (64, 64, bfd_mach_mips_xlr, "mips:xlr", FALSE, NN(I_xlr)),
|
||||
N (32, 32, bfd_mach_mips_interaptiv_mr2, "mips:interaptiv-mr2", FALSE,
|
||||
NN(I_interaptiv_mr2)),
|
||||
- N (64, 64, bfd_mach_mips_micromips,"mips:micromips",FALSE,0)
|
||||
- N (64, 64, bfd_mach_mips_micromips, "mips:micromips", FALSE, NULL)
|
||||
+ N (64, 64, bfd_mach_mips_micromips, "mips:micromips", FALSE, NN(I_micromips)),
|
||||
+ N (64, 64, bfd_mach_mips_xlp, "mips:xlp", FALSE, NULL)
|
||||
};
|
||||
|
||||
/* The default architecture is mips:3000, but with a machine number of
|
||||
diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c
|
||||
index d7e3aed3b6..7baeee9ee3 100644
|
||||
--- a/bfd/elfxx-mips.c
|
||||
+++ b/bfd/elfxx-mips.c
|
||||
@@ -6999,6 +6999,9 @@ _bfd_elf_mips_mach (flagword flags)
|
||||
@@ -111,7 +124,7 @@ Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
|
||||
default:
|
||||
switch (flags & EF_MIPS_ARCH)
|
||||
{
|
||||
@@ -12360,6 +12363,10 @@ mips_set_isa_flags (bfd *abfd)
|
||||
@@ -12355,6 +12358,10 @@ mips_set_isa_flags (bfd *abfd)
|
||||
val = E_MIPS_ARCH_64R2 | E_MIPS_MACH_OCTEON2;
|
||||
break;
|
||||
|
||||
@@ -122,7 +135,7 @@ Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
|
||||
case bfd_mach_mipsisa32:
|
||||
val = E_MIPS_ARCH_32;
|
||||
break;
|
||||
@@ -14394,6 +14401,7 @@ static const struct mips_mach_extension
|
||||
@@ -14379,6 +14386,7 @@ static const struct mips_mach_extension mips_mach_extensions[] =
|
||||
{ bfd_mach_mips_gs264e, bfd_mach_mips_gs464e },
|
||||
{ bfd_mach_mips_gs464e, bfd_mach_mips_gs464 },
|
||||
{ bfd_mach_mips_gs464, bfd_mach_mipsisa64r2 },
|
||||
@@ -130,9 +143,11 @@ Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
|
||||
|
||||
/* MIPS64 extensions. */
|
||||
{ bfd_mach_mipsisa64r2, bfd_mach_mipsisa64 },
|
||||
diff --git a/binutils/readelf.c b/binutils/readelf.c
|
||||
index 6b5bebe743..d15a7828db 100644
|
||||
--- a/binutils/readelf.c
|
||||
+++ b/binutils/readelf.c
|
||||
@@ -3446,6 +3446,7 @@ get_machine_flags (Filedata * filedata,
|
||||
@@ -3440,6 +3440,7 @@ get_machine_flags (Filedata * filedata, unsigned e_flags, unsigned e_machine)
|
||||
case E_MIPS_MACH_OCTEON3: strcat (buf, ", octeon3"); break;
|
||||
case E_MIPS_MACH_XLR: strcat (buf, ", xlr"); break;
|
||||
case E_MIPS_MACH_IAMR2: strcat (buf, ", interaptiv-mr2"); break;
|
||||
@@ -140,6 +155,8 @@ Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
|
||||
case 0:
|
||||
/* We simply ignore the field in this case to avoid confusion:
|
||||
MIPS ELF does not specify EF_MIPS_MACH, it is a GNU
|
||||
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c
|
||||
index fc6898834e..2c7151ccdb 100644
|
||||
--- a/gas/config/tc-mips.c
|
||||
+++ b/gas/config/tc-mips.c
|
||||
@@ -568,6 +568,7 @@ static int mips_32bitmode = 0;
|
||||
@@ -158,7 +175,7 @@ Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
|
||||
)
|
||||
|
||||
/* Whether the processor uses hardware interlocks to protect reads
|
||||
@@ -20138,7 +20140,7 @@ static const struct mips_cpu_info mips_c
|
||||
@@ -20135,7 +20137,7 @@ static const struct mips_cpu_info mips_cpu_info_table[] =
|
||||
/* Broadcom XLP.
|
||||
XLP is mostly like XLR, with the prominent exception that it is
|
||||
MIPS64R2 rather than MIPS64. */
|
||||
@@ -167,18 +184,36 @@ Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
|
||||
|
||||
/* MIPS 64 Release 6. */
|
||||
{ "i6400", 0, ASE_VIRT | ASE_MSA, ISA_MIPS64R6, CPU_MIPS64R6},
|
||||
diff --git a/gas/configure b/gas/configure
|
||||
index 60c1a055ae..59d6d11215 100755
|
||||
--- a/gas/configure
|
||||
+++ b/gas/configure
|
||||
@@ -13377,6 +13377,9 @@ _ACEOF
|
||||
@@ -12722,6 +12722,9 @@ _ACEOF
|
||||
mipsisa64r6 | mipsisa64r6el)
|
||||
mips_cpu=mips64r6
|
||||
;;
|
||||
+ mipsisa64r2nlm | mipsisa64r2nlmel)
|
||||
+ mips_cpu=xlp
|
||||
+ ;;
|
||||
+ mips_cpu=xlp
|
||||
+ ;;
|
||||
mipstx39 | mipstx39el)
|
||||
mips_cpu=r3900
|
||||
;;
|
||||
diff --git a/gas/configure.ac b/gas/configure.ac
|
||||
index 6f32e55a1a..11c2e0d273 100644
|
||||
--- a/gas/configure.ac
|
||||
+++ b/gas/configure.ac
|
||||
@@ -325,6 +325,9 @@ changequote([,])dnl
|
||||
mipsisa64r6 | mipsisa64r6el)
|
||||
mips_cpu=mips64r6
|
||||
;;
|
||||
+ mipsisa64r2nlm | mipsisa64r2nlmel)
|
||||
+ mips_cpu=xlp
|
||||
+ ;;
|
||||
mipstx39 | mipstx39el)
|
||||
mips_cpu=r3900
|
||||
;;
|
||||
diff --git a/include/elf/mips.h b/include/elf/mips.h
|
||||
index d116b036b6..dceeb3f156 100644
|
||||
--- a/include/elf/mips.h
|
||||
+++ b/include/elf/mips.h
|
||||
@@ -290,6 +290,7 @@ END_RELOC_NUMBERS (R_MIPS_maxext)
|
||||
@@ -189,9 +224,11 @@ Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
|
||||
#define E_MIPS_MACH_OCTEON2 0x008d0000
|
||||
#define E_MIPS_MACH_OCTEON3 0x008e0000
|
||||
#define E_MIPS_MACH_5400 0x00910000
|
||||
diff --git a/include/opcode/mips.h b/include/opcode/mips.h
|
||||
index fd031f3758..a96a44df84 100644
|
||||
--- a/include/opcode/mips.h
|
||||
+++ b/include/opcode/mips.h
|
||||
@@ -1260,6 +1260,8 @@ static const unsigned int mips_isa_table
|
||||
@@ -1260,6 +1260,8 @@ static const unsigned int mips_isa_table[] = {
|
||||
#define INSN_XLR 0x00000020
|
||||
/* Imagination interAptiv MR2. */
|
||||
#define INSN_INTERAPTIV_MR2 0x04000000
|
||||
@@ -200,7 +237,7 @@ Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
|
||||
|
||||
/* DSP ASE */
|
||||
#define ASE_DSP 0x00000001
|
||||
@@ -1384,6 +1386,7 @@ static const unsigned int mips_isa_table
|
||||
@@ -1384,6 +1386,7 @@ static const unsigned int mips_isa_table[] = {
|
||||
#define CPU_OCTEON3 6503
|
||||
#define CPU_XLR 887682 /* decimal 'XLR' */
|
||||
#define CPU_INTERAPTIV_MR2 736550 /* decimal 'IA2' */
|
||||
@@ -208,7 +245,7 @@ Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
|
||||
|
||||
/* Return true if the given CPU is included in INSN_* mask MASK. */
|
||||
|
||||
@@ -1461,6 +1464,9 @@ cpu_is_member (int cpu, unsigned int mas
|
||||
@@ -1461,6 +1464,9 @@ cpu_is_member (int cpu, unsigned int mask)
|
||||
return ((mask & INSN_ISA_MASK) == INSN_ISA32R6)
|
||||
|| ((mask & INSN_ISA_MASK) == INSN_ISA64R6);
|
||||
|
||||
@@ -218,20 +255,25 @@ Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
|
||||
default:
|
||||
return FALSE;
|
||||
}
|
||||
diff --git a/ld/configure.tgt b/ld/configure.tgt
|
||||
index f4f0eaf9b2..0da3eca19c 100644
|
||||
--- a/ld/configure.tgt
|
||||
+++ b/ld/configure.tgt
|
||||
@@ -454,6 +454,8 @@ mips*el-sde-elf* | mips*el-mti-elf* | mi
|
||||
mips*-sde-elf* | mips*-mti-elf* | mips*-img-elf*)
|
||||
@@ -520,6 +520,9 @@ mips*-sde-elf* | mips*-mti-elf* | mips*-img-elf*)
|
||||
targ_emul=elf32btsmip
|
||||
targ_extra_emuls="elf32ltsmip elf32btsmipn32 elf64btsmip elf32ltsmipn32 elf64ltsmip" ;;
|
||||
targ_extra_emuls="elf32ltsmip elf32btsmipn32 elf64btsmip elf32ltsmipn32 elf64ltsmip"
|
||||
;;
|
||||
+mipsisa64*-*-elf*) targ_emul=elf32btsmip
|
||||
+ targ_extra_emuls="elf32ltsmip elf64btsmip elf64ltsmip" ;;
|
||||
+ targ_extra_emuls="elf32ltsmip elf64btsmip elf64ltsmip"
|
||||
+ ;;
|
||||
mips64*el-ps2-elf*) targ_emul=elf32lr5900n32
|
||||
targ_extra_emuls="elf32lr5900"
|
||||
targ_extra_libpath=$targ_extra_emuls ;;
|
||||
targ_extra_libpath=$targ_extra_emuls
|
||||
diff --git a/opcodes/mips-dis.c b/opcodes/mips-dis.c
|
||||
index 755bbe294b..ce22ef683a 100644
|
||||
--- a/opcodes/mips-dis.c
|
||||
+++ b/opcodes/mips-dis.c
|
||||
@@ -673,13 +673,11 @@ const struct mips_arch_choice mips_arch_
|
||||
@@ -674,13 +674,11 @@ const struct mips_arch_choice mips_arch_choices[] =
|
||||
mips_cp0sel_names_xlr, ARRAY_SIZE (mips_cp0sel_names_xlr),
|
||||
mips_cp1_names_mips3264, mips_hwr_names_numeric },
|
||||
|
||||
@@ -250,6 +292,8 @@ Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
|
||||
|
||||
/* This entry, mips16, is here only for ISA/processor selection; do
|
||||
not print its name. */
|
||||
diff --git a/opcodes/mips-opc.c b/opcodes/mips-opc.c
|
||||
index 5270aeefa8..d17dc78cd7 100644
|
||||
--- a/opcodes/mips-opc.c
|
||||
+++ b/opcodes/mips-opc.c
|
||||
@@ -328,6 +328,7 @@ decode_mips_operand (const char *p)
|
||||
@@ -260,7 +304,7 @@ Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
|
||||
#define IVIRT ASE_VIRT
|
||||
#define IVIRT64 ASE_VIRT64
|
||||
|
||||
@@ -990,6 +991,7 @@ const struct mips_opcode mips_builtin_op
|
||||
@@ -990,6 +991,7 @@ const struct mips_opcode mips_builtin_opcodes[] =
|
||||
{"clo", "U,s", 0x70000021, 0xfc0007ff, WR_1|RD_2, 0, I32|N55, 0, I37 },
|
||||
{"clz", "d,s", 0x00000050, 0xfc1f07ff, WR_1|RD_2, 0, I37, 0, 0 },
|
||||
{"clz", "U,s", 0x70000020, 0xfc0007ff, WR_1|RD_2, 0, I32|N55, 0, I37 },
|
||||
@@ -268,7 +312,7 @@ Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
|
||||
/* ctc0 is at the bottom of the table. */
|
||||
{"ctc1", "t,G", 0x44c00000, 0xffe007ff, RD_1|WR_CC|CM, 0, I1, 0, 0 },
|
||||
{"ctc1", "t,S", 0x44c00000, 0xffe007ff, RD_1|WR_CC|CM, 0, I1, 0, 0 },
|
||||
@@ -1022,12 +1024,13 @@ const struct mips_opcode mips_builtin_op
|
||||
@@ -1022,12 +1024,13 @@ const struct mips_opcode mips_builtin_opcodes[] =
|
||||
{"daddiu", "t,r,j", 0x64000000, 0xfc000000, WR_1|RD_2, 0, I3, 0, 0 },
|
||||
{"daddu", "d,v,t", 0x0000002d, 0xfc0007ff, WR_1|RD_2|RD_3, 0, I3, 0, 0 },
|
||||
{"daddu", "t,r,I", 0, (int) M_DADDU_I, INSN_MACRO, 0, I3, 0, 0 },
|
||||
@@ -283,7 +327,7 @@ Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
|
||||
/* dctr and dctw are used on the r5000. */
|
||||
{"dctr", "o(b)", 0xbc050000, 0xfc1f0000, RD_2, 0, I3, 0, 0 },
|
||||
{"dctw", "o(b)", 0xbc090000, 0xfc1f0000, RD_2, 0, I3, 0, 0 },
|
||||
@@ -1099,6 +1102,7 @@ const struct mips_opcode mips_builtin_op
|
||||
@@ -1099,6 +1102,7 @@ const struct mips_opcode mips_builtin_opcodes[] =
|
||||
{"dmfc0", "t,G,H", 0x40200000, 0xffe007f8, WR_1|RD_C0|LC, 0, I64, 0, 0 },
|
||||
{"dmfgc0", "t,G", 0x40600100, 0xffe007ff, WR_1|RD_C0|LC, 0, 0, IVIRT64, 0 },
|
||||
{"dmfgc0", "t,G,H", 0x40600100, 0xffe007f8, WR_1|RD_C0|LC, 0, 0, IVIRT64, 0 },
|
||||
@@ -291,7 +335,7 @@ Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
|
||||
{"dmt", "", 0x41600bc1, 0xffffffff, TRAP, 0, 0, MT32, 0 },
|
||||
{"dmt", "t", 0x41600bc1, 0xffe0ffff, WR_1|TRAP, 0, 0, MT32, 0 },
|
||||
{"dmtc0", "t,G", 0x40a00000, 0xffe007ff, RD_1|WR_C0|WR_CC|CM, 0, I3, 0, EE },
|
||||
@@ -1114,6 +1118,8 @@ const struct mips_opcode mips_builtin_op
|
||||
@@ -1114,6 +1118,8 @@ const struct mips_opcode mips_builtin_opcodes[] =
|
||||
/* dmfc3 is at the bottom of the table. */
|
||||
/* dmtc3 is at the bottom of the table. */
|
||||
{"dmuh", "d,s,t", 0x000000dc, 0xfc0007ff, WR_1|RD_2|RD_3, 0, I69, 0, 0 },
|
||||
@@ -300,7 +344,7 @@ Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
|
||||
{"dmul", "d,s,t", 0x0000009c, 0xfc0007ff, WR_1|RD_2|RD_3, 0, I69, 0, 0 },
|
||||
{"dmul", "d,v,t", 0x70000003, 0xfc0007ff, WR_1|RD_2|RD_3|WR_HILO, 0, IOCT, 0, 0 },
|
||||
{"dmul", "d,v,t", 0, (int) M_DMUL, INSN_MACRO, 0, I3, 0, M32|I69 },
|
||||
@@ -1267,9 +1273,9 @@ const struct mips_opcode mips_builtin_op
|
||||
@@ -1267,9 +1273,9 @@ const struct mips_opcode mips_builtin_opcodes[] =
|
||||
{"ld", "s,-b(+R)", 0xec180000, 0xfc1c0000, WR_1, RD_pc, I69, 0, 0 },
|
||||
{"ld", "t,A(b)", 0, (int) M_LD_AB, INSN_MACRO, 0, I1, 0, 0 },
|
||||
{"ld", "t,o(b)", 0xdc000000, 0xfc000000, WR_1|RD_3|LM, 0, I3, 0, 0 },
|
||||
@@ -313,7 +357,7 @@ Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
|
||||
{"ldc1", "T,o(b)", 0xd4000000, 0xfc000000, WR_1|RD_3|CLD|FP_D, 0, I2, 0, SF },
|
||||
{"ldc1", "E,o(b)", 0xd4000000, 0xfc000000, WR_1|RD_3|CLD|FP_D, 0, I2, 0, SF },
|
||||
{"ldc1", "T,A(b)", 0, (int) M_LDC1_AB, INSN_MACRO, INSN2_M_FP_D, I2, 0, SF },
|
||||
@@ -1438,7 +1444,7 @@ const struct mips_opcode mips_builtin_op
|
||||
@@ -1438,7 +1444,7 @@ const struct mips_opcode mips_builtin_opcodes[] =
|
||||
{"mflo", "d,9", 0x00000012, 0xff9f07ff, WR_1|RD_LO, 0, 0, D32, 0 },
|
||||
{"mflo1", "d", 0x70000012, 0xffff07ff, WR_1|RD_LO, 0, EE, 0, 0 },
|
||||
{"mflhxu", "d", 0x00000052, 0xffff07ff, WR_1|MOD_HILO, 0, 0, SMT, 0 },
|
||||
@@ -322,7 +366,7 @@ Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
|
||||
{"mfsa", "d", 0x00000028, 0xffff07ff, WR_1, 0, EE, 0, 0 },
|
||||
{"min.ob", "X,Y,Q", 0x78000006, 0xfc20003f, WR_1|RD_2|RD_3|FP_D, 0, SB1, MX, 0 },
|
||||
{"min.ob", "D,S,Q", 0x48000006, 0xfc20003f, WR_1|RD_2|RD_3|FP_D, 0, N54, 0, 0 },
|
||||
@@ -1483,10 +1489,13 @@ const struct mips_opcode mips_builtin_op
|
||||
@@ -1483,10 +1489,13 @@ const struct mips_opcode mips_builtin_opcodes[] =
|
||||
/* move is at the top of the table. */
|
||||
{"msgn.qh", "X,Y,Q", 0x78200000, 0xfc20003f, WR_1|RD_2|RD_3|FP_D, 0, 0, MX, 0 },
|
||||
{"msgsnd", "t", 0, (int) M_MSGSND, INSN_MACRO, 0, XLR, 0, 0 },
|
||||
@@ -338,7 +382,7 @@ Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
|
||||
{"msub.d", "D,R,S,T", 0x4c000029, 0xfc00003f, WR_1|RD_2|RD_3|RD_4|FP_D, 0, I4_33, 0, I37 },
|
||||
{"msub.d", "D,S,T", 0x46200019, 0xffe0003f, WR_1|RD_2|RD_3|FP_D, 0, IL2E, 0, 0 },
|
||||
{"msub.d", "D,S,T", 0x72200019, 0xffe0003f, WR_1|RD_2|RD_3|FP_D, 0, IL2F, 0, 0 },
|
||||
@@ -1536,7 +1545,7 @@ const struct mips_opcode mips_builtin_op
|
||||
@@ -1536,7 +1545,7 @@ const struct mips_opcode mips_builtin_opcodes[] =
|
||||
{"mtlo", "s,7", 0x00000013, 0xfc1fe7ff, RD_1|WR_LO, 0, 0, D32, 0 },
|
||||
{"mtlo1", "s", 0x70000013, 0xfc1fffff, RD_1|WR_LO, 0, EE, 0, 0 },
|
||||
{"mtlhx", "s", 0x00000053, 0xfc1fffff, RD_1|MOD_HILO, 0, 0, SMT, 0 },
|
||||
@@ -347,7 +391,7 @@ Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
|
||||
{"mtm0", "s", 0x70000008, 0xfc1fffff, RD_1, 0, IOCT, 0, 0 },
|
||||
{"mtm0", "s,t", 0x70000008, 0xfc00ffff, RD_1|RD_2, 0, IOCT3, 0, 0 },
|
||||
{"mtm1", "s", 0x7000000c, 0xfc1fffff, RD_1, 0, IOCT, 0, 0 },
|
||||
@@ -1978,9 +1987,9 @@ const struct mips_opcode mips_builtin_op
|
||||
@@ -1978,9 +1987,9 @@ const struct mips_opcode mips_builtin_opcodes[] =
|
||||
{"suxc1", "S,t(b)", 0x4c00000d, 0xfc0007ff, RD_1|RD_2|RD_3|SM|FP_D, 0, I5_33|N55, 0, I37},
|
||||
{"sw", "t,o(b)", 0xac000000, 0xfc000000, RD_1|RD_3|SM, 0, I1, 0, 0 },
|
||||
{"sw", "t,A(b)", 0, (int) M_SW_AB, INSN_MACRO, 0, I1, 0, 0 },
|
||||
@@ -1,4 +1,4 @@
|
||||
From f34aac4314b821396fe745013dc8ec8683ea2598 Mon Sep 17 00:00:00 2001
|
||||
From ef4ad1cb9ff1b5a871ffa792a71b3ad6d14eb3dc 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
|
||||
@@ -11,7 +11,7 @@ Upstream-Status: Pending
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
diff --git a/opcodes/ppc-opc.c b/opcodes/ppc-opc.c
|
||||
index b56fe3e21a..696fe83a7b 100644
|
||||
index 7ef91d819b..145953d3c4 100644
|
||||
--- a/opcodes/ppc-opc.c
|
||||
+++ b/opcodes/ppc-opc.c
|
||||
@@ -5709,7 +5709,6 @@ const struct powerpc_opcode powerpc_opcodes[] = {
|
||||
@@ -1,4 +1,4 @@
|
||||
From ebb74c39acb171fd24c2698646134ce88dd96a15 Mon Sep 17 00:00:00 2001
|
||||
From 2f7f2389764ef1d699f6ad32057314024b7e84e7 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Fri, 31 Mar 2017 11:42:03 -0700
|
||||
Subject: [PATCH] Detect 64-bit MIPS targets
|
||||
@@ -14,7 +14,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
1 file changed, 14 insertions(+)
|
||||
|
||||
diff --git a/gold/configure.tgt b/gold/configure.tgt
|
||||
index 3e066edaa8..caf130ceda 100644
|
||||
index aa7ec552ae..470515062e 100644
|
||||
--- a/gold/configure.tgt
|
||||
+++ b/gold/configure.tgt
|
||||
@@ -153,6 +153,13 @@ aarch64*-*)
|
||||
@@ -1,46 +0,0 @@
|
||||
From a326a8feb445a5713ff3d17c55f43d5681e26585 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Thu, 29 Nov 2018 17:46:40 -0800
|
||||
Subject: [PATCH] binutils : enable x86_64-pep for producing EFI binaries on
|
||||
x86-64
|
||||
|
||||
Add x86_64-pep emulation support to the set enabled for x86_64 targets
|
||||
to enable the linker to produce Portable Executables for EFI binaries.
|
||||
|
||||
Enables building the x86-64 EFI variant of the Xen hypervisor for
|
||||
the OpenXT Project.
|
||||
|
||||
Upstream-Status: Inappropriate [OE configuration specific]
|
||||
|
||||
Signed-off-by: Christopher Clark <christopher.clark6@baesystems.com>
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
bfd/config.bfd | 2 +-
|
||||
ld/configure.tgt | 5 +++--
|
||||
2 files changed, 4 insertions(+), 3 deletions(-)
|
||||
|
||||
--- a/bfd/config.bfd
|
||||
+++ b/bfd/config.bfd
|
||||
@@ -694,7 +694,7 @@ case "${targ}" in
|
||||
;;
|
||||
x86_64-*-linux-*)
|
||||
targ_defvec=x86_64_elf64_vec
|
||||
- targ_selvecs="i386_elf32_vec iamcu_elf32_vec x86_64_elf32_vec i386_pei_vec x86_64_pei_vec l1om_elf64_vec k1om_elf64_vec"
|
||||
+ targ_selvecs="i386_elf32_vec iamcu_elf32_vec x86_64_elf32_vec i386_pei_vec x86_64_pei_vec l1om_elf64_vec k1om_elf64_vec x86_64_pe_vec x86_64_pe_be_vec i386_pe_vec"
|
||||
want64=true
|
||||
;;
|
||||
x86_64-*-nacl*)
|
||||
--- a/ld/configure.tgt
|
||||
+++ b/ld/configure.tgt
|
||||
@@ -258,8 +258,9 @@ x86_64-*-linux-gnux32) targ_emul=elf32_x
|
||||
tdir_elf_iamcu=`echo ${targ_alias} | sed -e 's/x86_64/i386/' -e 's/-linux-gnux32/-linux-gnu/'`
|
||||
tdir_elf_i386=`echo ${targ_alias} | sed -e 's/x86_64/i386/' -e 's/-linux-gnux32/-linux-gnu/'` ;;
|
||||
x86_64-*-linux-*) targ_emul=elf_x86_64
|
||||
- targ_extra_emuls="elf32_x86_64 elf_i386 elf_iamcu elf_l1om elf_k1om"
|
||||
- targ_extra_libpath="elf_i386 elf32_x86_64 elf_l1om elf_k1om"
|
||||
+ targ_extra_emuls="elf32_x86_64 elf_i386 elf_iamcu elf_l1om elf_k1om i386pe i386pep"
|
||||
+ targ_extra_libpath="elf_i386 elf32_x86_64 elf_l1om elf_k1om i386pep"
|
||||
+ targ_extra_ofiles="deffilep.o pep-dll.o pe-dll.o"
|
||||
tdir_elf_i386=`echo ${targ_alias} | sed -e 's/x86_64/i386/'` ;;
|
||||
i[3-7]86-*-redox*) targ_emul=elf_i386
|
||||
targ_extra_emuls=elf_x86_64 ;;
|
||||
@@ -1,4 +1,4 @@
|
||||
From 6bc49e9a581eb46265935ea2756a99faa7d0562e Mon Sep 17 00:00:00 2001
|
||||
From 392d474a72d37b669f53ab9f0fa913b958af93f6 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,94 +0,0 @@
|
||||
From 09dd135df9ebc7a4b640537e23e26a03a288a789 Mon Sep 17 00:00:00 2001
|
||||
From: Alan Modra <amodra@gmail.com>
|
||||
Date: Wed, 9 Oct 2019 00:07:29 +1030
|
||||
Subject: [PATCH] PR25078, stack overflow in function find_abstract_instance
|
||||
|
||||
Selectively backporting fix for bfd/dwarf2.c, but not the ChangeLog
|
||||
file. There are newer versions of binutils, but none of them contain the
|
||||
commit fixing CVE-2019-17450, so backport it to master and zeus.
|
||||
|
||||
Upstream-Status: Backport [https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=063c511bd79]
|
||||
CVE: CVE-2019-17450
|
||||
Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com>
|
||||
|
||||
PR 25078
|
||||
* dwarf2.c (find_abstract_instance): Delete orig_info_ptr, add
|
||||
recur_count. Error on recur_count reaching 100 rather than
|
||||
info_ptr matching orig_info_ptr. Adjust calls.
|
||||
|
||||
---
|
||||
bfd/dwarf2.c | 35 +++++++++++++++++------------------
|
||||
1 file changed, 17 insertions(+), 18 deletions(-)
|
||||
|
||||
--- a/bfd/dwarf2.c
|
||||
+++ b/bfd/dwarf2.c
|
||||
@@ -2812,13 +2812,13 @@ static bfd_boolean comp_unit_maybe_decod
|
||||
struct dwarf2_debug *);
|
||||
|
||||
static bfd_boolean
|
||||
-find_abstract_instance (struct comp_unit * unit,
|
||||
- bfd_byte * orig_info_ptr,
|
||||
- struct attribute * attr_ptr,
|
||||
- const char ** pname,
|
||||
- bfd_boolean * is_linkage,
|
||||
- char ** filename_ptr,
|
||||
- int * linenumber_ptr)
|
||||
+find_abstract_instance (struct comp_unit *unit,
|
||||
+ struct attribute *attr_ptr,
|
||||
+ unsigned int recur_count,
|
||||
+ const char **pname,
|
||||
+ bfd_boolean *is_linkage,
|
||||
+ char **filename_ptr,
|
||||
+ int *linenumber_ptr)
|
||||
{
|
||||
bfd *abfd = unit->abfd;
|
||||
bfd_byte *info_ptr;
|
||||
@@ -2829,6 +2829,14 @@ find_abstract_instance (struct comp_unit
|
||||
struct attribute attr;
|
||||
const char *name = NULL;
|
||||
|
||||
+ if (recur_count == 100)
|
||||
+ {
|
||||
+ _bfd_error_handler
|
||||
+ (_("DWARF error: abstract instance recursion detected"));
|
||||
+ bfd_set_error (bfd_error_bad_value);
|
||||
+ return FALSE;
|
||||
+ }
|
||||
+
|
||||
/* DW_FORM_ref_addr can reference an entry in a different CU. It
|
||||
is an offset from the .debug_info section, not the current CU. */
|
||||
if (attr_ptr->form == DW_FORM_ref_addr)
|
||||
@@ -2962,15 +2970,6 @@ find_abstract_instance (struct comp_unit
|
||||
info_ptr, info_ptr_end);
|
||||
if (info_ptr == NULL)
|
||||
break;
|
||||
- /* It doesn't ever make sense for DW_AT_specification to
|
||||
- refer to the same DIE. Stop simple recursion. */
|
||||
- if (info_ptr == orig_info_ptr)
|
||||
- {
|
||||
- _bfd_error_handler
|
||||
- (_("DWARF error: abstract instance recursion detected"));
|
||||
- bfd_set_error (bfd_error_bad_value);
|
||||
- return FALSE;
|
||||
- }
|
||||
switch (attr.name)
|
||||
{
|
||||
case DW_AT_name:
|
||||
@@ -2984,7 +2983,7 @@ find_abstract_instance (struct comp_unit
|
||||
}
|
||||
break;
|
||||
case DW_AT_specification:
|
||||
- if (!find_abstract_instance (unit, info_ptr, &attr,
|
||||
+ if (!find_abstract_instance (unit, &attr, recur_count + 1,
|
||||
&name, is_linkage,
|
||||
filename_ptr, linenumber_ptr))
|
||||
return FALSE;
|
||||
@@ -3200,7 +3199,7 @@ scan_unit_for_symbols (struct comp_unit
|
||||
|
||||
case DW_AT_abstract_origin:
|
||||
case DW_AT_specification:
|
||||
- if (!find_abstract_instance (unit, info_ptr, &attr,
|
||||
+ if (!find_abstract_instance (unit, &attr, 0,
|
||||
&func->name,
|
||||
&func->is_linkage,
|
||||
&func->file,
|
||||
@@ -1,46 +0,0 @@
|
||||
From 0192438051a7e781585647d5581a2a6f62fda362 Mon Sep 17 00:00:00 2001
|
||||
From: Alan Modra <amodra@gmail.com>
|
||||
Date: Wed, 9 Oct 2019 10:47:13 +1030
|
||||
Subject: [PATCH] PR25070, SEGV in function _bfd_dwarf2_find_nearest_line
|
||||
|
||||
Selectively backporting fix for bfd/dwarf2.c, but not the ChangeLog
|
||||
file. There are newer versions of binutils, but none of them contain the
|
||||
commit fixing CVE-2019-17451, so backport it to master and zeus.
|
||||
|
||||
Upstream-Status: Backport
|
||||
[https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=336bfbeb1848]
|
||||
CVE: CVE-2019-17451
|
||||
Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com>
|
||||
|
||||
|
||||
Evil testcase with two debug info sections, with sizes of 2aaaabac4ec1
|
||||
and ffffd5555453b140 result in a total size of 1. Reading the first
|
||||
section of course overflows the buffer and tramples on other memory.
|
||||
|
||||
PR 25070
|
||||
* dwarf2.c (_bfd_dwarf2_slurp_debug_info): Catch overflow of
|
||||
total_size calculation.
|
||||
---
|
||||
bfd/dwarf2.c | 11 ++++++++++-
|
||||
1 file changed, 10 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/bfd/dwarf2.c
|
||||
+++ b/bfd/dwarf2.c
|
||||
@@ -4439,7 +4439,16 @@ _bfd_dwarf2_slurp_debug_info (bfd *abfd,
|
||||
for (total_size = 0;
|
||||
msec;
|
||||
msec = find_debug_info (debug_bfd, debug_sections, msec))
|
||||
- total_size += msec->size;
|
||||
+ {
|
||||
+ /* Catch PR25070 testcase overflowing size calculation here. */
|
||||
+ if (total_size + msec->size < total_size
|
||||
+ || total_size + msec->size < msec->size)
|
||||
+ {
|
||||
+ bfd_set_error (bfd_error_no_memory);
|
||||
+ return FALSE;
|
||||
+ }
|
||||
+ total_size += msec->size;
|
||||
+ }
|
||||
|
||||
stash->info_ptr_memory = (bfd_byte *) bfd_malloc (total_size);
|
||||
if (stash->info_ptr_memory == NULL)
|
||||
@@ -49,9 +49,9 @@ do_install_class-native () {
|
||||
|
||||
# Split out libbfd-*.so so including perf doesn't include extra stuff
|
||||
PACKAGE_BEFORE_PN += "libbfd"
|
||||
FILES_libbfd = "${libdir}/libbfd-*.so"
|
||||
FILES_libbfd = "${libdir}/libbfd-*.so.* ${libdir}/libbfd-*.so"
|
||||
|
||||
SRC_URI_append_class-nativesdk = " file://nativesdk-relocation.patch "
|
||||
SRC_URI_append_class-nativesdk = " file://0003-binutils-nativesdk-Search-for-alternative-ld.so.conf.patch "
|
||||
|
||||
USE_ALTERNATIVES_FOR_class-nativesdk = ""
|
||||
FILES_${PN}_append_class-nativesdk = " ${bindir}"
|
||||
Reference in New Issue
Block a user