binutils: Upgrade to 2.28 release

(From OE-Core rev: e9f839d5fe70a222cc7b8942f401ac86a10e6604)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Khem Raj 2017-03-07 00:20:09 -08:00 committed by Richard Purdie
parent ee18a2b233
commit 4485ea5807
29 changed files with 726 additions and 1176 deletions

View File

@ -24,7 +24,7 @@ PREFERRED_PROVIDER_virtual/gettext ??= "gettext"
GCCVERSION ?= "6.3%"
SDKGCCVERSION ?= "${GCCVERSION}"
BINUVERSION ?= "2.27%"
BINUVERSION ?= "2.28%"
GDBVERSION ?= "7.12%"
GLIBCVERSION ?= "2.25"
UCLIBCVERSION ?= "1.0%"

View File

@ -1,47 +0,0 @@
LIC_FILES_CHKSUM="\
file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552\
file://COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674\
file://COPYING3;md5=d32239bcb673463ab874e80d47fae504\
file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6\
file://gas/COPYING;md5=d32239bcb673463ab874e80d47fae504\
file://include/COPYING;md5=59530bdf33659b29e73d4adb9f9f6552\
file://include/COPYING3;md5=d32239bcb673463ab874e80d47fae504\
file://libiberty/COPYING.LIB;md5=a916467b91076e631dd8edb7424769c7\
file://bfd/COPYING;md5=d32239bcb673463ab874e80d47fae504\
"
def binutils_branch_version(d):
pvsplit = d.getVar('PV').split('.')
return pvsplit[0] + "_" + pvsplit[1]
BINUPV = "${@binutils_branch_version(d)}"
UPSTREAM_CHECK_GITTAGREGEX = "binutils-(?P<pver>\d+_(\d_?)*)"
SRCREV = "5fe53ce37f9d9dd544ec8cc9e2863b68e1a61f4c"
SRC_URI = "\
git://sourceware.org/git/binutils-gdb.git;branch=binutils-${BINUPV}-branch;protocol=git \
file://0002-configure-widen-the-regexp-for-SH-architectures.patch \
file://0003-Point-scripts-location-to-libdir.patch \
file://0004-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch \
file://0005-Explicitly-link-with-libm-on-uclibc.patch \
file://0006-Use-libtool-2.4.patch \
file://0007-Add-the-armv5e-architecture-to-binutils.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-libtool-remove-rpath.patch \
file://0015-binutils-mips-gas-pic-relax-linkonce.diff \
file://0015-Refine-.cfi_sections-check-to-only-consider-compact-.patch \
file://0016-Fix-seg-fault-in-ARM-linker-when-trying-to-parse-a-b.patch \
file://0017-Fix-the-generation-of-alignment-frags-in-code-sectio.patch \
file://0001-ppc-apuinfo-for-spe-parsed-incorrectly.patch \
"
S = "${WORKDIR}/git"
do_configure_prepend () {
rm -rf ${S}/gdb ${S}/libdecnumber ${S}/readline ${S}/sim
}

View File

@ -0,0 +1,42 @@
LIC_FILES_CHKSUM="\
file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552\
file://COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674\
file://COPYING3;md5=d32239bcb673463ab874e80d47fae504\
file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6\
file://gas/COPYING;md5=d32239bcb673463ab874e80d47fae504\
file://include/COPYING;md5=59530bdf33659b29e73d4adb9f9f6552\
file://include/COPYING3;md5=d32239bcb673463ab874e80d47fae504\
file://libiberty/COPYING.LIB;md5=a916467b91076e631dd8edb7424769c7\
file://bfd/COPYING;md5=d32239bcb673463ab874e80d47fae504\
"
def binutils_branch_version(d):
pvsplit = d.getVar('PV').split('.')
return pvsplit[0] + "_" + pvsplit[1]
BINUPV = "${@binutils_branch_version(d)}"
UPSTREAM_CHECK_GITTAGREGEX = "binutils-(?P<pver>\d+_(\d_?)*)"
SRCREV = "354199c7692c1bed53a2a15f0e4d531457e95f17"
SRC_URI = "\
git://sourceware.org/git/binutils-gdb.git;branch=binutils-${BINUPV}-branch;protocol=git \
file://0003-gprof-add-uclibc-support-to-configure.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-Explicitly-link-with-libm-on-uclibc.patch \
file://0007-Use-libtool-2.4.patch \
file://0008-Add-the-armv5e-architecture-to-binutils.patch \
file://0009-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch \
file://0010-warn-for-uses-of-system-directories-when-cross-linki.patch \
file://0011-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch \
file://0012-Change-default-emulation-for-mips64-linux.patch \
file://0013-Add-support-for-Netlogic-XLP.patch \
file://0014-fix-the-incorrect-assembling-for-ppc-wait-mnemonic.patch \
file://0015-sync-with-OE-libtool-changes.patch \
"
S = "${WORKDIR}/git"
do_configure_prepend () {
rm -rf ${S}/gdb ${S}/libdecnumber ${S}/readline ${S}/sim
}

View File

@ -7,7 +7,7 @@ BPN = "binutils"
INHIBIT_DEFAULT_DEPS = "1"
INHIBIT_AUTOTOOLS_DEPS = "1"
SRC_URI += "file://no-tooldirpaths.patch"
SRC_URI += "file://0002-binutils-cross-Do-not-generate-linker-script-directo.patch"
# Specify lib-path else we use a load of search dirs which we don't use
# and mean the linker scripts have to be relocated.

View File

@ -6,7 +6,7 @@ PN = "binutils-crosssdk-${SDK_SYS}"
PROVIDES = "virtual/${TARGET_PREFIX}binutils-crosssdk"
SRC_URI += "file://0001-Generate-relocatable-SDKs.patch"
SRC_URI += "file://0001-binutils-crosssdk-Generate-relocatable-SDKs.patch"
do_configure_prepend () {
sed -i 's#/usr/local/lib /lib /usr/lib#${SDKPATHNATIVE}/lib ${SDKPATHNATIVE}/usr/lib /usr/local/lib /lib /usr/lib#' ${S}/ld/configure.tgt

View File

@ -1,7 +1,7 @@
From 2dae6b137ce609fd008f2063034a4403d95484c5 Mon Sep 17 00:00:00 2001
From 689d011688b5ff9481d4367bef3dea7a7b2867fb 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 01/13] Generate relocatable SDKs
Subject: [PATCH 01/15] binutils-crosssdk: Generate relocatable SDKs
This patch will modify the ELF linker scripts so that the crosssdk
linker will generate binaries with a 4096 bytes PT_INTERP section. When the binaries
@ -18,7 +18,7 @@ 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 eb262e7..1a3b8bc 100755
index b6940d376d..a42c4d7a4b 100755
--- a/ld/genscripts.sh
+++ b/ld/genscripts.sh
@@ -277,6 +277,7 @@ DATA_ALIGNMENT_u="${DATA_ALIGNMENT_u-${DATA_ALIGNMENT_r}}"
@ -43,12 +43,12 @@ index eb262e7..1a3b8bc 100755
LD_FLAG=
DATA_ALIGNMENT=${DATA_ALIGNMENT_}
diff --git a/ld/scripttempl/elf.sc b/ld/scripttempl/elf.sc
index f0c6439..223c55f 100644
index e65f9a3ccf..d99d2c1d2a 100644
--- a/ld/scripttempl/elf.sc
+++ b/ld/scripttempl/elf.sc
@@ -136,8 +136,8 @@ if test -n "${COMMONPAGESIZE}"; then
DATA_SEGMENT_END=". = DATA_SEGMENT_END (.);"
DATA_SEGMENT_RELRO_END=". = DATA_SEGMENT_RELRO_END (${SEPARATE_GOTPLT-0}, .);"
@@ -138,8 +138,8 @@ if test -z "$DATA_SEGMENT_ALIGN"; then
DATA_SEGMENT_RELRO_END=". = DATA_SEGMENT_RELRO_END (${SEPARATE_GOTPLT-0}, .);"
fi
fi
-if test -z "${INITIAL_READONLY_SECTIONS}${CREATE_SHLIB}"; then
- INITIAL_READONLY_SECTIONS=".interp ${RELOCATING-0} : { *(.interp) }"
@ -58,5 +58,5 @@ index f0c6439..223c55f 100644
if test -z "$PLT"; then
IPLT=".iplt ${RELOCATING-0} : { *(.iplt) }"
--
2.9.0
2.12.0

View File

@ -1,37 +0,0 @@
From 8941017bc0226b60ce306d5271df15820ce66a53 Mon Sep 17 00:00:00 2001
From: Alan Modra <amodra@gmail.com>
Date: Tue, 30 Aug 2016 20:57:32 +0930
Subject: [PATCH] ppc apuinfo for spe parsed incorrectly
Organization: O.S. Systems Software LTDA.
apuinfo saying SPE resulted in mach = bfd_mach_ppc_vle due to a
missing break.
PR 20531
* elf32-ppc.c (_bfd_elf_ppc_set_arch): Add missing "break".
Backport from :
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff;h=8941017b
Upstream-Status: Backport
Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
---
bfd/elf32-ppc.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c
index 95ce1dc..e42ef1c 100644
--- a/bfd/elf32-ppc.c
+++ b/bfd/elf32-ppc.c
@@ -2246,6 +2246,7 @@ _bfd_elf_ppc_set_arch (bfd *abfd)
case PPC_APUINFO_BRLOCK:
if (mach != bfd_mach_ppc_vle)
mach = bfd_mach_ppc_e500;
+ break;
case PPC_APUINFO_VLE:
mach = bfd_mach_ppc_vle;
--
2.1.4

View File

@ -1,20 +1,31 @@
From 7c7de107b4b0a507d2aeca3e3a86d01cb4b51360 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 02/15] binutils-cross: Do not generate linker script
directories
We don't place target libraries within ${exec_prefix}, we'd always place these
within the target sysroot within the standard library directories. Worse, the
append_to_lib_path code prefixes these paths with the sysroot which makes even
less sense.
These directories therefore don't make sense in our case and mean we have to
relocate all the linker scripts if they're present. Dropping them
These directories therefore don't make sense in our case and mean we have to
relocate all the linker scripts if they're present. Dropping them
gives a reasonable performance improvement/simplification.
Upstream-Status: Inappropriate
RP 2017/01/30
Index: git/ld/genscripts.sh
===================================================================
--- git.orig/ld/genscripts.sh
+++ git/ld/genscripts.sh
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
ld/genscripts.sh | 23 -----------------------
1 file changed, 23 deletions(-)
diff --git a/ld/genscripts.sh b/ld/genscripts.sh
index a42c4d7a4b..d727b4d07e 100755
--- a/ld/genscripts.sh
+++ b/ld/genscripts.sh
@@ -189,29 +189,6 @@ append_to_lib_path()
fi
}
@ -45,3 +56,6 @@ Index: git/ld/genscripts.sh
if [ "x${LIB_PATH}" = "x" ] && [ "x${USE_LIBPATH}" = xyes ] ; then
libs=${NATIVE_LIB_DIRS}
if [ "x${NATIVE}" = "xyes" ] ; then
--
2.12.0

View File

@ -1,56 +0,0 @@
From e4cd40722f597dff39c7214fab1742dd5bcc67eb 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 02/13] 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 | 4 ++--
gprof/configure | 5 +++++
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/configure b/configure
index ad3dfb7..2a74a77 100755
--- a/configure
+++ b/configure
@@ -3444,7 +3444,7 @@ case "${target}" in
;;
s390-*-* | s390x-*-*)
;;
- sh-*-* | sh[34]*-*-*)
+ sh*-*-* | sh[34]*-*-*)
;;
sh64-*-* | sh5*-*-*)
;;
@@ -3946,7 +3946,7 @@ case "${target}" in
or1k*-*-*)
noconfigdirs="$noconfigdirs gdb"
;;
- sh-*-* | sh64-*-*)
+ sh*-*-* | sh64-*-*)
case "${target}" in
sh*-*-elf)
;;
diff --git a/gprof/configure b/gprof/configure
index bf3ecaa..626e1c7 100755
--- a/gprof/configure
+++ b/gprof/configure
@@ -5873,6 +5873,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)$'
--
2.9.0

View File

@ -0,0 +1,31 @@
From 7893d2b24d0303bda3a0049846489619ffd1387b 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 03/15] gprof: add uclibc support to configure
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
gprof/configure | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/gprof/configure b/gprof/configure
index 9e6b8f3525..38a4c0b0e5 100755
--- a/gprof/configure
+++ b/gprof/configure
@@ -5874,6 +5874,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)$'
--
2.12.0

View File

@ -1,7 +1,7 @@
From 93c49f6197bd59b2abbf04b3296bf10029b80f48 Mon Sep 17 00:00:00 2001
From e34650c50574a8a39d694567ed607a63006b6f99 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 03/13] Point scripts location to libdir
Subject: [PATCH 04/15] Point scripts location to libdir
Upstream-Status: Inappropriate [debian patch]
@ -12,7 +12,7 @@ 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 0598923..b478ba7 100644
index 15beaa7021..bbf9c671d8 100644
--- a/ld/Makefile.am
+++ b/ld/Makefile.am
@@ -57,7 +57,7 @@ endif
@ -25,10 +25,10 @@ index 0598923..b478ba7 100644
EMUL = @EMUL@
EMULATION_OFILES = @EMULATION_OFILES@
diff --git a/ld/Makefile.in b/ld/Makefile.in
index 7c78198..5eb67e0 100644
index 042b690ed6..37e7b25e9a 100644
--- a/ld/Makefile.in
+++ b/ld/Makefile.in
@@ -451,7 +451,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS)
@@ -452,7 +452,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.
@ -38,5 +38,5 @@ index 7c78198..5eb67e0 100644
BFDDIR = $(BASEDIR)/bfd
INCDIR = $(BASEDIR)/include
--
2.9.0
2.12.0

View File

@ -1,7 +1,7 @@
From 4ff83779de8621715c6c2a79cf7ed8d74ff2d7c5 Mon Sep 17 00:00:00 2001
From 42292f5533bca904f230a8e03ceee1f84ef0c4ec 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 04/13] Only generate an RPATH entry if LD_RUN_PATH is not
Subject: [PATCH 05/15] Only generate an RPATH entry if LD_RUN_PATH is not
empty
for cases where -rpath isn't specified. debian (#151024)
@ -15,10 +15,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 4 insertions(+)
diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em
index 47fa549..f4c640e 100644
index 84adaef6df..ab8c74257e 100644
--- a/ld/emultempl/elf32.em
+++ b/ld/emultempl/elf32.em
@@ -1244,6 +1244,8 @@ fragment <<EOF
@@ -1411,6 +1411,8 @@ fragment <<EOF
&& command_line.rpath == NULL)
{
lib_path = (const char *) getenv ("LD_RUN_PATH");
@ -27,7 +27,7 @@ index 47fa549..f4c640e 100644
if (gld${EMULATION_NAME}_search_needed (lib_path, &n,
force))
break;
@@ -1525,6 +1527,8 @@ gld${EMULATION_NAME}_before_allocation (void)
@@ -1692,6 +1694,8 @@ gld${EMULATION_NAME}_before_allocation (void)
rpath = command_line.rpath;
if (rpath == NULL)
rpath = (const char *) getenv ("LD_RUN_PATH");
@ -37,5 +37,5 @@ index 47fa549..f4c640e 100644
for (abfd = link_info.input_bfds; abfd; abfd = abfd->link.next)
if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)
--
2.9.0
2.12.0

View File

@ -1,7 +1,7 @@
From 18a7ae169e8d55ace683357d1de6b07e4fdf797a Mon Sep 17 00:00:00 2001
From 6a46bf151d7e53df8b5e7645a2d241967688368a Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 2 Mar 2015 01:32:49 +0000
Subject: [PATCH 05/13] Explicitly link with libm on uclibc
Subject: [PATCH 06/15] Explicitly link with libm on uclibc
Description:
@ -31,10 +31,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 6 insertions(+)
diff --git a/gas/configure.tgt b/gas/configure.tgt
index e2df659..1b9fd99 100644
index 711d537e95..7cd2dc176a 100644
--- a/gas/configure.tgt
+++ b/gas/configure.tgt
@@ -487,6 +487,12 @@ case ${generic_target} in
@@ -494,6 +494,12 @@ case ${generic_target} in
*-*-netware) fmt=elf em=netware ;;
esac
@ -45,8 +45,8 @@ index e2df659..1b9fd99 100644
+esac
+
case ${cpu_type} in
aarch64 | alpha | arm | i386 | ia64 | microblaze | mips | ns32k | or1k | or1knd | pdp11 | ppc | sparc | z80 | z8k)
aarch64 | alpha | arm | i386 | ia64 | microblaze | mips | ns32k | or1k | or1knd | pdp11 | ppc | riscv | sparc | z80 | z8k)
bfd_gas=yes
--
2.9.0
2.12.0

View File

@ -1,7 +1,7 @@
From 9475aee8a702aa531737ec12dfd928d52951bc84 Mon Sep 17 00:00:00 2001
From 9c313e8a15a7e7c5c0f2906e3218ed211563ac2a Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 2 Mar 2015 01:37:10 +0000
Subject: [PATCH 07/13] Add the armv5e architecture to binutils
Subject: [PATCH 08/15] Add the armv5e architecture to binutils
Binutils has a comment that indicates it is supposed to match gcc for
all of the support "-march=" settings, but it was lacking the armv5e setting.
@ -19,10 +19,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 1 insertion(+)
diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c
index 73d0531..4b9e32f 100644
index 60bda51070..eb6d0afd6e 100644
--- a/gas/config/tc-arm.c
+++ b/gas/config/tc-arm.c
@@ -25421,6 +25421,7 @@ static const struct arm_arch_option_table arm_archs[] =
@@ -25633,6 +25633,7 @@ static const struct arm_arch_option_table arm_archs[] =
ARM_ARCH_OPT ("armv4t", ARM_ARCH_V4T, FPU_ARCH_FPA),
ARM_ARCH_OPT ("armv4txm", ARM_ARCH_V4TxM, FPU_ARCH_FPA),
ARM_ARCH_OPT ("armv5", ARM_ARCH_V5, FPU_ARCH_VFP),
@ -31,5 +31,5 @@ index 73d0531..4b9e32f 100644
ARM_ARCH_OPT ("armv5txm", ARM_ARCH_V5TxM, FPU_ARCH_VFP),
ARM_ARCH_OPT ("armv5te", ARM_ARCH_V5TE, FPU_ARCH_VFP),
--
2.9.0
2.12.0

View File

@ -1,7 +1,7 @@
From b2d277937d11f1ce1d581f48ff74a25822a052da Mon Sep 17 00:00:00 2001
From 2be9b44a4a308e3ea42a027c4c3211170f10c9c0 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 08/13] don't let the distro compiler point to the wrong
Subject: [PATCH 09/15] don't let the distro compiler point to the wrong
installation location
Thanks to RP for helping find the source code causing the issue.
@ -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 c7a4568..f766b72 100644
index 0ff9e45e45..42c32642b2 100644
--- a/libiberty/Makefile.in
+++ b/libiberty/Makefile.in
@@ -364,7 +364,8 @@ install-strip: install
@@ -366,7 +366,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.
@ -31,5 +31,5 @@ index c7a4568..f766b72 100644
if test -n "${target_header_dir}"; then \
${mkinstalldirs} $(DESTDIR)$(libdir)/$(MULTIOSDIR); \
--
2.9.0
2.12.0

View File

@ -1,7 +1,7 @@
From 7ab8e318659eb5d9adc758c78d084a95560b93fd Mon Sep 17 00:00:00 2001
From b1ab17abe4128684f19775448545176fb2a5e27e 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 09/13] warn for uses of system directories when cross linking
Subject: [PATCH 10/15] warn for uses of system directories when cross linking
2008-07-02 Joseph Myers <joseph@codesourcery.com>
@ -63,7 +63,7 @@ Upstream-Status: Pending
9 files changed, 86 insertions(+)
diff --git a/ld/config.in b/ld/config.in
index 2c6d698..d3cb7e8 100644
index 2c6d698b6c..d3cb7e882d 100644
--- a/ld/config.in
+++ b/ld/config.in
@@ -17,6 +17,9 @@
@ -77,10 +77,10 @@ index 2c6d698..d3cb7e8 100644
#undef EXTRA_SHLIB_EXTENSION
diff --git a/ld/configure b/ld/configure
index 3df1149..0601c98 100755
index 4277b74bad..63109644b6 100755
--- a/ld/configure
+++ b/ld/configure
@@ -792,6 +792,7 @@ with_lib_path
@@ -793,6 +793,7 @@ with_lib_path
enable_targets
enable_64_bit_bfd
with_sysroot
@ -88,7 +88,7 @@ index 3df1149..0601c98 100755
enable_gold
enable_got
enable_compressed_debug_sections
@@ -1449,6 +1450,8 @@ Optional Features:
@@ -1450,6 +1451,8 @@ Optional Features:
--disable-largefile omit support for large files
--enable-targets alternative target configurations
--enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
@ -97,7 +97,7 @@ index 3df1149..0601c98 100755
--enable-gold[=ARG] build gold [ARG={default,yes,no}]
--enable-got=<type> GOT handling scheme (target, single, negative,
multigot)
@@ -16313,6 +16316,19 @@ fi
@@ -16314,6 +16317,19 @@ fi
@ -118,7 +118,7 @@ index 3df1149..0601c98 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 d17281f..9fb3db9 100644
index 36a9f5083a..47f1d33fa5 100644
--- a/ld/configure.ac
+++ b/ld/configure.ac
@@ -95,6 +95,16 @@ AC_SUBST(use_sysroot)
@ -139,10 +139,10 @@ index d17281f..9fb3db9 100644
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 85a48ad..a8fdddf 100644
index 104bb8e237..74c914bdd5 100644
--- a/ld/ld.h
+++ b/ld/ld.h
@@ -169,6 +169,14 @@ typedef struct
@@ -172,6 +172,14 @@ typedef struct
/* If set, display the target memory usage (per memory region). */
bfd_boolean print_memory_usage;
@ -158,10 +158,10 @@ index 85a48ad..a8fdddf 100644
enum endian_enum endian;
diff --git a/ld/ld.texinfo b/ld/ld.texinfo
index bc16764..838c75d 100644
index d393acdd94..ba995b1e3a 100644
--- a/ld/ld.texinfo
+++ b/ld/ld.texinfo
@@ -2357,6 +2357,18 @@ string identifying the original linked file does not change.
@@ -2403,6 +2403,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.
@ -181,7 +181,7 @@ index bc16764..838c75d 100644
@c man end
diff --git a/ld/ldfile.c b/ld/ldfile.c
index e397737..013727b 100644
index 0943bb2dfa..95874c75de 100644
--- a/ld/ldfile.c
+++ b/ld/ldfile.c
@@ -114,6 +114,23 @@ ldfile_add_library_path (const char *name, bfd_boolean cmdline)
@ -209,10 +209,10 @@ index e397737..013727b 100644
/* Try to open a BFD for a lang_input_statement. */
diff --git a/ld/ldlex.h b/ld/ldlex.h
index cf943e4..12cfcaa 100644
index 3ecac2bc86..34117f43a5 100644
--- a/ld/ldlex.h
+++ b/ld/ldlex.h
@@ -144,6 +144,8 @@ enum option_values
@@ -146,6 +146,8 @@ enum option_values
OPTION_PRINT_MEMORY_USAGE,
OPTION_REQUIRE_DEFINED_SYMBOL,
OPTION_ORPHAN_HANDLING,
@ -222,10 +222,10 @@ index cf943e4..12cfcaa 100644
/* The initial parser states. */
diff --git a/ld/ldmain.c b/ld/ldmain.c
index e7a8dff..3ccf2af 100644
index 1e48b1a2db..21f27bacf1 100644
--- a/ld/ldmain.c
+++ b/ld/ldmain.c
@@ -257,6 +257,8 @@ main (int argc, char **argv)
@@ -270,6 +270,8 @@ main (int argc, char **argv)
command_line.warn_mismatch = TRUE;
command_line.warn_search_mismatch = TRUE;
command_line.check_section_addresses = -1;
@ -235,10 +235,10 @@ index e7a8dff..3ccf2af 100644
/* 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 6d28e91..5c9da57 100644
index 0b7d4976ac..dedc07a143 100644
--- a/ld/lexsup.c
+++ b/ld/lexsup.c
@@ -530,6 +530,14 @@ static const struct ld_option ld_options[] =
@@ -535,6 +535,14 @@ static const struct ld_option ld_options[] =
{ {"orphan-handling", required_argument, NULL, OPTION_ORPHAN_HANDLING},
'\0', N_("=MODE"), N_("Control how orphan sections are handled."),
TWO_DASHES },
@ -253,7 +253,7 @@ index 6d28e91..5c9da57 100644
};
#define OPTION_COUNT ARRAY_SIZE (ld_options)
@@ -1550,6 +1558,14 @@ parse_args (unsigned argc, char **argv)
@@ -1562,6 +1570,14 @@ parse_args (unsigned argc, char **argv)
einfo (_("%P%F: invalid argument to option"
" \"--orphan-handling\"\n"));
break;
@ -269,5 +269,5 @@ index 6d28e91..5c9da57 100644
}
--
2.9.0
2.12.0

View File

@ -1,7 +1,7 @@
From 27fc7a4927ab92925a5be84217959d9f1c808ccc Mon Sep 17 00:00:00 2001
From 4fe13a36997253a5c91bcb086aeb392ab2095f67 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 10/13] Fix rpath in libtool when sysroot is enabled
Subject: [PATCH 11/15] Fix rpath in libtool when sysroot is enabled
Enabling sysroot support in libtool exposed a bug where the final
library had an RPATH encoded into it which still pointed to the
@ -19,7 +19,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/ltmain.sh b/ltmain.sh
index 70e856e..11ee684 100644
index 70e856e065..11ee684ccc 100644
--- a/ltmain.sh
+++ b/ltmain.sh
@@ -8035,9 +8035,11 @@ EOF
@ -48,5 +48,5 @@ index 70e856e..11ee684 100644
if test -z "$hardcode_libdirs"; then
hardcode_libdirs="$libdir"
--
2.9.0
2.12.0

View File

@ -1,7 +1,7 @@
From 6b018e8129298dbd5b714e459ef0b3aef5bbce13 Mon Sep 17 00:00:00 2001
From f43f832e0009caea6a3d5bcaa8f0a64d943072ea 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 11/13] Change default emulation for mips64*-*-linux
Subject: [PATCH 12/15] Change default emulation for mips64*-*-linux
we change the default emulations to be N64 instead of N32
@ -14,10 +14,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/bfd/config.bfd b/bfd/config.bfd
index b998830..ab17e72 100644
index 1b28016b91..63596c2ebc 100644
--- a/bfd/config.bfd
+++ b/bfd/config.bfd
@@ -1101,12 +1101,12 @@ case "${targ}" in
@@ -1183,12 +1183,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*)
@ -35,10 +35,10 @@ index b998830..ab17e72 100644
mips*el-*-linux*)
targ_defvec=mips_elf32_trad_le_vec
diff --git a/ld/configure.tgt b/ld/configure.tgt
index a3db909..212327c 100644
index b85c6bb35a..4e77383a19 100644
--- a/ld/configure.tgt
+++ b/ld/configure.tgt
@@ -513,11 +513,11 @@ mips*el-*-vxworks*) targ_emul=elf32elmipvxworks
@@ -518,11 +518,11 @@ mips*el-*-vxworks*) targ_emul=elf32elmipvxworks
mips*-*-vxworks*) targ_emul=elf32ebmipvxworks
targ_extra_emuls="elf32elmipvxworks" ;;
mips*-*-windiss) targ_emul=elf32mipswindiss ;;
@ -55,5 +55,5 @@ index a3db909..212327c 100644
mips*el-*-linux-*) targ_emul=elf32ltsmip
targ_extra_emuls="elf32btsmip elf32ltsmipn32 elf64ltsmip elf32btsmipn32 elf64btsmip"
--
2.9.0
2.12.0

View File

@ -1,7 +1,7 @@
From c2e138f4ccdf8af81c18c8511c901d3deee696b5 Mon Sep 17 00:00:00 2001
From fc6fa6a6e6e9e6e5ad7080785af31b4ea68f60c4 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 12/13] Add support for Netlogic XLP
Subject: [PATCH 13/15] Add support for Netlogic XLP
Patch From: Nebu Philips <nphilips@netlogicmicro.com>
@ -26,16 +26,15 @@ Upstream-Status: Pending
binutils/readelf.c | 1 +
gas/config/tc-mips.c | 4 +++-
gas/configure | 3 +++
gas/configure.tgt | 2 +-
include/elf/mips.h | 1 +
include/opcode/mips.h | 10 ++++++++--
ld/configure.tgt | 2 ++
opcodes/mips-dis.c | 12 +++++-------
opcodes/mips-opc.c | 33 +++++++++++++++++++++------------
15 files changed, 65 insertions(+), 25 deletions(-)
14 files changed, 64 insertions(+), 24 deletions(-)
diff --git a/bfd/aoutx.h b/bfd/aoutx.h
index be0126a..4ca7e24 100644
index d30e8b8fbc..913b499744 100644
--- a/bfd/aoutx.h
+++ b/bfd/aoutx.h
@@ -812,6 +812,7 @@ NAME (aout, machine_type) (enum bfd_architecture arch,
@ -47,7 +46,7 @@ index be0126a..4ca7e24 100644
arch_flags = M_MIPS2;
break;
diff --git a/bfd/archures.c b/bfd/archures.c
index 96c9109..5a30d02 100644
index 6f35a5b2a7..d12cdf609a 100644
--- a/bfd/archures.c
+++ b/bfd/archures.c
@@ -197,6 +197,7 @@ DESCRIPTION
@ -59,10 +58,10 @@ index 96c9109..5a30d02 100644
.#define bfd_mach_mipsisa32r2 33
.#define bfd_mach_mipsisa32r3 34
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index 30513c4..5e8ed4c 100644
index 6288c3bb4a..e9f9859a7b 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -2008,6 +2008,7 @@ enum bfd_architecture
@@ -2041,6 +2041,7 @@ enum bfd_architecture
#define bfd_mach_mips_octeon2 6502
#define bfd_mach_mips_octeon3 6503
#define bfd_mach_mips_xlr 887682 /* decimal 'XLR' */
@ -71,10 +70,10 @@ index 30513c4..5e8ed4c 100644
#define bfd_mach_mipsisa32r2 33
#define bfd_mach_mipsisa32r3 34
diff --git a/bfd/config.bfd b/bfd/config.bfd
index ab17e72..863be89 100644
index 63596c2ebc..6e923fb0ed 100644
--- a/bfd/config.bfd
+++ b/bfd/config.bfd
@@ -1084,6 +1084,11 @@ case "${targ}" in
@@ -1166,6 +1166,11 @@ case "${targ}" in
targ_defvec=mips_elf32_le_vec
targ_selvecs="mips_elf32_be_vec mips_elf64_be_vec mips_elf64_le_vec"
;;
@ -87,7 +86,7 @@ index ab17e72..863be89 100644
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 d209fb6..b6a86ae 100644
index b9ecdd6e55..df1bffc25b 100644
--- a/bfd/cpu-mips.c
+++ b/bfd/cpu-mips.c
@@ -104,7 +104,8 @@ enum
@ -111,10 +110,10 @@ index d209fb6..b6a86ae 100644
/* 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 e47276b..71c30a0 100644
index 723853f821..7b464211c3 100644
--- a/bfd/elfxx-mips.c
+++ b/bfd/elfxx-mips.c
@@ -6646,6 +6646,9 @@ _bfd_elf_mips_mach (flagword flags)
@@ -6787,6 +6787,9 @@ _bfd_elf_mips_mach (flagword flags)
case E_MIPS_MACH_XLR:
return bfd_mach_mips_xlr;
@ -124,7 +123,7 @@ index e47276b..71c30a0 100644
default:
switch (flags & EF_MIPS_ARCH)
{
@@ -11949,6 +11952,10 @@ mips_set_isa_flags (bfd *abfd)
@@ -12106,6 +12109,10 @@ mips_set_isa_flags (bfd *abfd)
val = E_MIPS_ARCH_64R2 | E_MIPS_MACH_OCTEON2;
break;
@ -135,7 +134,7 @@ index e47276b..71c30a0 100644
case bfd_mach_mipsisa32:
val = E_MIPS_ARCH_32;
break;
@@ -13975,6 +13982,7 @@ static const struct mips_mach_extension mips_mach_extensions[] =
@@ -14135,6 +14142,7 @@ static const struct mips_mach_extension mips_mach_extensions[] =
{ bfd_mach_mips_octeonp, bfd_mach_mips_octeon },
{ bfd_mach_mips_octeon, bfd_mach_mipsisa64r2 },
{ bfd_mach_mips_loongson_3a, bfd_mach_mipsisa64r2 },
@ -144,10 +143,10 @@ index e47276b..71c30a0 100644
/* MIPS64 extensions. */
{ bfd_mach_mipsisa64r2, bfd_mach_mipsisa64 },
diff --git a/binutils/readelf.c b/binutils/readelf.c
index 274ddd1..d31558c 100644
index 8dca490226..b5f577f5a1 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -3230,6 +3230,7 @@ get_machine_flags (unsigned e_flags, unsigned e_machine)
@@ -3261,6 +3261,7 @@ get_machine_flags (unsigned e_flags, unsigned e_machine)
case E_MIPS_MACH_OCTEON2: strcat (buf, ", octeon2"); break;
case E_MIPS_MACH_OCTEON3: strcat (buf, ", octeon3"); break;
case E_MIPS_MACH_XLR: strcat (buf, ", xlr"); break;
@ -156,7 +155,7 @@ index 274ddd1..d31558c 100644
/* 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 eb8b26b..e59dce6 100644
index e24e84df54..baf84e419d 100644
--- a/gas/config/tc-mips.c
+++ b/gas/config/tc-mips.c
@@ -552,6 +552,7 @@ static int mips_32bitmode = 0;
@ -175,7 +174,7 @@ index eb8b26b..e59dce6 100644
)
/* Whether the processor uses hardware interlocks to protect reads
@@ -18858,7 +18860,7 @@ static const struct mips_cpu_info mips_cpu_info_table[] =
@@ -19409,7 +19411,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. */
@ -185,10 +184,10 @@ index eb8b26b..e59dce6 100644
/* MIPS 64 Release 6 */
{ "i6400", 0, ASE_MSA, ISA_MIPS64R6, CPU_MIPS64R6},
diff --git a/gas/configure b/gas/configure
index 45da030..aba89f7 100755
index a36f1ae161..99f0a94e20 100755
--- a/gas/configure
+++ b/gas/configure
@@ -12914,6 +12914,9 @@ _ACEOF
@@ -12989,6 +12989,9 @@ _ACEOF
mipsisa64r6 | mipsisa64r6el)
mips_cpu=mips64r6
;;
@ -198,21 +197,8 @@ index 45da030..aba89f7 100755
mipstx39 | mipstx39el)
mips_cpu=r3900
;;
diff --git a/gas/configure.tgt b/gas/configure.tgt
index 1b9fd99..a9f1977 100644
--- a/gas/configure.tgt
+++ b/gas/configure.tgt
@@ -339,7 +339,7 @@ case ${generic_target} in
mips-*-sysv4*MP* | mips-*-gnu*) fmt=elf em=tmips ;;
mips*-sde-elf* | mips*-mti-elf* | mips*-img-elf*)
fmt=elf em=tmips ;;
- mips-*-elf* | mips-*-rtems*) fmt=elf ;;
+ mips-*-elf* | mips-*-rtems*) fmt=elf em=tmips ;;
mips-*-netbsd*) fmt=elf em=tmips ;;
mips-*-openbsd*) fmt=elf em=tmips ;;
diff --git a/include/elf/mips.h b/include/elf/mips.h
index 7e813de..d7d72c1 100644
index 3e27b05122..81ea78a817 100644
--- a/include/elf/mips.h
+++ b/include/elf/mips.h
@@ -290,6 +290,7 @@ END_RELOC_NUMBERS (R_MIPS_maxext)
@ -224,10 +210,10 @@ index 7e813de..d7d72c1 100644
#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 b1d4ef6..f2c8e88 100644
index 0d043d9520..450e9c2d67 100644
--- a/include/opcode/mips.h
+++ b/include/opcode/mips.h
@@ -1232,8 +1232,10 @@ static const unsigned int mips_isa_table[] = {
@@ -1244,8 +1244,10 @@ static const unsigned int mips_isa_table[] = {
#define INSN_LOONGSON_2F 0x80000000
/* Loongson 3A. */
#define INSN_LOONGSON_3A 0x00000400
@ -240,7 +226,7 @@ index b1d4ef6..f2c8e88 100644
/* DSP ASE */
#define ASE_DSP 0x00000001
@@ -1331,6 +1333,7 @@ static const unsigned int mips_isa_table[] = {
@@ -1344,6 +1346,7 @@ static const unsigned int mips_isa_table[] = {
#define CPU_OCTEON2 6502
#define CPU_OCTEON3 6503
#define CPU_XLR 887682 /* decimal 'XLR' */
@ -248,7 +234,7 @@ index b1d4ef6..f2c8e88 100644
/* Return true if the given CPU is included in INSN_* mask MASK. */
@@ -1408,6 +1411,9 @@ cpu_is_member (int cpu, unsigned int mask)
@@ -1421,6 +1424,9 @@ cpu_is_member (int cpu, unsigned int mask)
return ((mask & INSN_ISA_MASK) == INSN_ISA32R6)
|| ((mask & INSN_ISA_MASK) == INSN_ISA64R6);
@ -259,10 +245,10 @@ index b1d4ef6..f2c8e88 100644
return FALSE;
}
diff --git a/ld/configure.tgt b/ld/configure.tgt
index 212327c..212e09c 100644
index 4e77383a19..8a81f7ac39 100644
--- a/ld/configure.tgt
+++ b/ld/configure.tgt
@@ -499,6 +499,8 @@ mips*el-sde-elf* | mips*el-mti-elf* | mips*el-img-elf*)
@@ -504,6 +504,8 @@ mips*el-sde-elf* | mips*el-mti-elf* | mips*el-img-elf*)
mips*-sde-elf* | mips*-mti-elf* | mips*-img-elf*)
targ_emul=elf32btsmip
targ_extra_emuls="elf32ltsmip elf32btsmipn32 elf64btsmip elf32ltsmipn32 elf64ltsmip" ;;
@ -272,7 +258,7 @@ index 212327c..212e09c 100644
targ_extra_emuls="elf32lr5900"
targ_extra_libpath=$targ_extra_emuls ;;
diff --git a/opcodes/mips-dis.c b/opcodes/mips-dis.c
index 3f874e7..9813d0e 100644
index bb9912e462..70ecc51717 100644
--- a/opcodes/mips-dis.c
+++ b/opcodes/mips-dis.c
@@ -648,13 +648,11 @@ const struct mips_arch_choice mips_arch_choices[] =
@ -295,7 +281,7 @@ index 3f874e7..9813d0e 100644
/* 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 a95eff1..99fb7bb 100644
index 5cb8e7365f..f2074856a2 100644
--- a/opcodes/mips-opc.c
+++ b/opcodes/mips-opc.c
@@ -320,7 +320,8 @@ decode_mips_operand (const char *p)
@ -409,5 +395,5 @@ index a95eff1..99fb7bb 100644
{"swc0", "E,A(b)", 0, (int) M_SWC0_AB, INSN_MACRO, 0, I1, 0, IOCT|IOCTP|IOCT2|I37 },
{"swc1", "T,o(b)", 0xe4000000, 0xfc000000, RD_1|RD_3|SM|FP_S, 0, I1, 0, 0 },
--
2.9.0
2.12.0

View File

@ -1,7 +1,7 @@
From 0c04c3b626998c8e7b595381b35456428581f52a Mon Sep 17 00:00:00 2001
From a9177150f808d7e6285e1011c85d0ce89037b553 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 13/13] fix the incorrect assembling for ppc wait mnemonic
Subject: [PATCH 14/15] fix the incorrect assembling for ppc wait mnemonic
Signed-off-by: Zhenhua Luo <zhenhua.luo@nxp.com>
@ -11,10 +11,10 @@ Upstream-Status: Pending
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/opcodes/ppc-opc.c b/opcodes/ppc-opc.c
index 8106ab7..ca4b0f3 100644
index 30fd789182..f2708e2276 100644
--- a/opcodes/ppc-opc.c
+++ b/opcodes/ppc-opc.c
@@ -4811,7 +4811,6 @@ const struct powerpc_opcode powerpc_opcodes[] = {
@@ -4876,7 +4876,6 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{"ldepx", X(31,29), X_MASK, E500MC|PPCA2, 0, {RT, RA0, RB}},
{"waitasec", X(31,30), XRTRARB_MASK, POWER8, POWER9, {0}},
@ -22,7 +22,7 @@ index 8106ab7..ca4b0f3 100644
{"lwepx", X(31,31), X_MASK, E500MC|PPCA2, 0, {RT, RA0, RB}},
@@ -4865,7 +4864,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
@@ -4930,7 +4929,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{"waitrsv", X(31,62)|(1<<21), 0xffffffff, E500MC|PPCA2, 0, {0}},
{"waitimpl", X(31,62)|(2<<21), 0xffffffff, E500MC|PPCA2, 0, {0}},
@ -32,5 +32,5 @@ index 8106ab7..ca4b0f3 100644
{"dcbstep", XRT(31,63,0), XRT_MASK, E500MC|PPCA2, 0, {RA0, RB}},
--
2.9.0
2.12.0

View File

@ -1,97 +0,0 @@
From 3d3424e9a8d6ad56160b98bf6e223c0346164468 Mon Sep 17 00:00:00 2001
From: Matthew Fortune <matthew.fortune@imgtec.com>
Date: Thu, 29 Sep 2016 11:13:46 +0100
Subject: [PATCH] Refine .cfi_sections check to only consider compact eh_frame
The .cfi_sections directive can be safely used multiple times
with different sections named at any time unless the compact form
of exception handling is requested after CFI information has
been emitted. Only the compact form of CFI information changes
the way in which CFI is generated and therefore cannot be
retrospectively requested after generating CFI information.
gas/
PR gas/20648
* dw2gencfi.c (dot_cfi_sections): Refine the check for
inconsistent .cfi_sections to only consider compact vs non
compact forms.
* testsuite/gas/cfi/cfi-common-9.d: New file.
* testsuite/gas/cfi/cfi-common-9.s: New file.
* testsuite/gas/cfi/cfi.exp: Run new test.
---
Upstream-Status: Backport
Signed-off-by: Khem Raj <raj.khem@gmail.com
gas/ChangeLog | 10 ++++++++++
gas/dw2gencfi.c | 5 ++++-
gas/testsuite/gas/cfi/cfi-common-9.d | 23 +++++++++++++++++++++++
gas/testsuite/gas/cfi/cfi-common-9.s | 4 ++++
gas/testsuite/gas/cfi/cfi.exp | 1 +
5 files changed, 42 insertions(+), 1 deletion(-)
create mode 100644 gas/testsuite/gas/cfi/cfi-common-9.d
create mode 100644 gas/testsuite/gas/cfi/cfi-common-9.s
Index: git/gas/dw2gencfi.c
===================================================================
--- git.orig/gas/dw2gencfi.c
+++ git/gas/dw2gencfi.c
@@ -1244,7 +1244,10 @@ dot_cfi_sections (int ignored ATTRIBUTE_
}
demand_empty_rest_of_line ();
- if (cfi_sections_set && cfi_sections != sections)
+ if (cfi_sections_set
+ && (sections & (CFI_EMIT_eh_frame | CFI_EMIT_eh_frame_compact))
+ && (cfi_sections & (CFI_EMIT_eh_frame | CFI_EMIT_eh_frame_compact))
+ != (sections & (CFI_EMIT_eh_frame | CFI_EMIT_eh_frame_compact)))
as_bad (_("inconsistent uses of .cfi_sections"));
cfi_sections = sections;
}
Index: git/gas/testsuite/gas/cfi/cfi-common-9.d
===================================================================
--- /dev/null
+++ git/gas/testsuite/gas/cfi/cfi-common-9.d
@@ -0,0 +1,23 @@
+#objdump: -Wf
+#name: CFI common 9
+#...
+Contents of the .eh_frame section:
+
+00000000 0+0010 0+0000 CIE
+ Version: 1
+ Augmentation: "zR"
+ Code alignment factor: .*
+ Data alignment factor: .*
+ Return address column: .*
+ Augmentation data: [01]b
+
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+
+00000014 0+00(10|18|1c|20) 0+0018 FDE cie=0+0000 pc=.*
+
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+#...
Index: git/gas/testsuite/gas/cfi/cfi-common-9.s
===================================================================
--- /dev/null
+++ git/gas/testsuite/gas/cfi/cfi-common-9.s
@@ -0,0 +1,4 @@
+ .cfi_sections .eh_frame
+ .cfi_startproc simple
+ .cfi_sections .debug_frame
+ .cfi_endproc
Index: git/gas/testsuite/gas/cfi/cfi.exp
===================================================================
--- git.orig/gas/testsuite/gas/cfi/cfi.exp
+++ git/gas/testsuite/gas/cfi/cfi.exp
@@ -135,4 +135,5 @@ if { ![istarget "hppa64*-*"] } then {
run_dump_test "cfi-common-6"
}
run_dump_test "cfi-common-7"
+ run_dump_test "cfi-common-9"
}

View File

@ -1,65 +0,0 @@
Patch taken from Binutils Bugzilla:
https://sourceware.org/bugzilla/show_bug.cgi?id=20649
Upstream-Status: Pending
Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Index: binutils/gas/config/tc-mips.c
===================================================================
--- binutils.orig/gas/config/tc-mips.c 2016-09-29 05:12:31.000000000 +0100
+++ binutils/gas/config/tc-mips.c 2016-09-29 20:05:13.257411084 +0100
@@ -1353,7 +1353,7 @@ static void s_mips_stab (int);
static void s_mips_weakext (int);
static void s_mips_file (int);
static void s_mips_loc (int);
-static bfd_boolean pic_need_relax (symbolS *, asection *);
+static bfd_boolean pic_need_relax (symbolS *);
static int relaxed_branch_length (fragS *, asection *, int);
static int relaxed_micromips_16bit_branch_length (fragS *, asection *, int);
static int relaxed_micromips_32bit_branch_length (fragS *, asection *, int);
@@ -4258,6 +4258,8 @@ mips_move_text_labels (void)
mips_move_labels (seg_info (now_seg)->label_list, TRUE);
}
+/* Duplicate the test for LINK_ONCE sections as in `adjust_reloc_syms'. */
+
static bfd_boolean
s_is_linkonce (symbolS *sym, segT from_seg)
{
@@ -14823,7 +14825,7 @@ mips_frob_file (void)
constants; we'll report an error for those later. */
if (got16_reloc_p (l->fixp->fx_r_type)
&& !(l->fixp->fx_addsy
- && pic_need_relax (l->fixp->fx_addsy, l->seg)))
+ && pic_need_relax (l->fixp->fx_addsy)))
continue;
/* Check quickly whether the next fixup happens to be a matching %lo. */
@@ -17043,7 +17045,7 @@ nopic_need_relax (symbolS *sym, int befo
/* Return true if the given symbol should be considered local for SVR4 PIC. */
static bfd_boolean
-pic_need_relax (symbolS *sym, asection *segtype)
+pic_need_relax (symbolS *sym)
{
asection *symsec;
@@ -17068,7 +17070,6 @@ pic_need_relax (symbolS *sym, asection *
return (!bfd_is_und_section (symsec)
&& !bfd_is_abs_section (symsec)
&& !bfd_is_com_section (symsec)
- && !s_is_linkonce (sym, segtype)
/* A global or weak symbol is treated as external. */
&& (!S_IS_WEAK (sym) && !S_IS_EXTERNAL (sym)));
}
@@ -17507,7 +17508,7 @@ md_estimate_size_before_relax (fragS *fr
if (mips_pic == NO_PIC)
change = nopic_need_relax (fragp->fr_symbol, 0);
else if (mips_pic == SVR4_PIC)
- change = pic_need_relax (fragp->fr_symbol, segtype);
+ change = pic_need_relax (fragp->fr_symbol);
else if (mips_pic == VXWORKS_PIC)
/* For vxworks, GOT16 relocations never have a corresponding LO16. */
change = 0;

View File

@ -1,3 +1,8 @@
From 58cdb28ed71cb57b4a0ea1b412a708fdb0f84c27 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 15/15] sync with OE libtool changes
Apply these patches from our libtool patches as not only are redundant RPATHs a
waste of space but they can cause incorrect linking when native packages are
restored from sstate.
@ -13,13 +18,18 @@ fool its detection code into thinking it should be included as an
RPATH in the generated binary. Normalize before comparision.
Upstream-Status: Inappropriate
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
ltmain.sh | 34 ++++++++++++++++++++++++++++------
1 file changed, 28 insertions(+), 6 deletions(-)
diff --git a/ltmain.sh b/ltmain.sh
index 683317c..860a16a 100644
index 11ee684ccc..3b19ac1532 100644
--- a/ltmain.sh
+++ b/ltmain.sh
@@ -8053,8 +8053,14 @@ EOF
@@ -8053,8 +8053,16 @@ EOF
esac
fi
else
@ -27,8 +37,10 @@ index 683317c..860a16a 100644
- func_append dep_rpath " $flag"
+ # We only want to hardcode in an rpath if it isn't in the
+ # default dlsearch path.
+ func_normal_abspath "$libdir"
+ libdir_norm=$func_normal_abspath_result
+ case " $sys_lib_dlsearch_path " in
+ *" $libdir "*) ;;
+ *" $libdir_norm "*) ;;
+ *) eval flag=\"$hardcode_libdir_flag_spec\"
+ func_append dep_rpath " $flag"
+ ;;
@ -36,7 +48,7 @@ index 683317c..860a16a 100644
fi
elif test -n "$runpath_var"; then
case "$perm_rpath " in
@@ -8790,8 +8796,14 @@ EOF
@@ -8790,8 +8798,16 @@ EOF
esac
fi
else
@ -44,8 +56,10 @@ index 683317c..860a16a 100644
- func_append rpath " $flag"
+ # We only want to hardcode in an rpath if it isn't in the
+ # default dlsearch path.
+ func_normal_abspath "$libdir"
+ libdir_norm=$func_normal_abspath_result
+ case " $sys_lib_dlsearch_path " in
+ *" $libdir "*) ;;
+ *" $libdir_norm "*) ;;
+ *) eval flag=\"$hardcode_libdir_flag_spec\"
+ rpath+=" $flag"
+ ;;
@ -53,7 +67,7 @@ index 683317c..860a16a 100644
fi
elif test -n "$runpath_var"; then
case "$perm_rpath " in
@@ -8841,8 +8853,14 @@ EOF
@@ -8841,8 +8857,14 @@ EOF
esac
fi
else
@ -70,31 +84,6 @@ index 683317c..860a16a 100644
fi
elif test -n "$runpath_var"; then
case "$finalize_perm_rpath " in
diff --git a/ltmain.sh b/ltmain.sh
index 683317c..860a16a 100644
--- a/ltmain.sh
+++ b/ltmain.sh
@@ -8055,8 +8055,10 @@ EOF
else
# We only want to hardcode in an rpath if it isn't in the
# default dlsearch path.
+ func_normal_abspath "$libdir"
+ libdir_norm=$func_normal_abspath_result
case " $sys_lib_dlsearch_path " in
- *" $libdir "*) ;;
+ *" $libdir_norm "*) ;;
*) eval flag=\"$hardcode_libdir_flag_spec\"
func_append dep_rpath " $flag"
;;
@@ -8798,8 +8800,10 @@ EOF
else
# We only want to hardcode in an rpath if it isn't in the
# default dlsearch path.
+ func_normal_abspath "$libdir"
+ libdir_norm=$func_normal_abspath_result
case " $sys_lib_dlsearch_path " in
- *" $libdir "*) ;;
+ *" $libdir_norm "*) ;;
*) eval flag=\"$hardcode_libdir_flag_spec\"
rpath+=" $flag"
;;
--
2.12.0

View File

@ -1,31 +0,0 @@
From 72b09de92cc597c53b1d762882b67a17fe56846c Mon Sep 17 00:00:00 2001
From: Nick Clifton <nickc@redhat.com>
Date: Tue, 23 Aug 2016 09:45:11 +0100
Subject: [PATCH 16/16] Fix seg-fault in ARM linker when trying to parse a
binary file.
* elf32-arm.c (elf32_arm_count_additional_relocs): Return zero if
there is no arm data associated with the section.
---
Upstream-Status: Backport
Signed-off-by: Khem Raj <raj.khem@gmail.com>
bfd/elf32-arm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c
index 700bec3..3fab609 100644
--- a/bfd/elf32-arm.c
+++ b/bfd/elf32-arm.c
@@ -18207,7 +18207,7 @@ elf32_arm_count_additional_relocs (asection *sec)
{
struct _arm_elf_section_data *arm_data;
arm_data = get_arm_elf_section_data (sec);
- return arm_data->additional_reloc_count;
+ return arm_data == NULL ? 0 : arm_data->additional_reloc_count;
}
/* Called to set the sh_flags, sh_link and sh_info fields of OSECTION which
--
2.10.1

View File

@ -1,139 +0,0 @@
From 4a4286465b5d6c28968bc2b29ae08daca7f219a3 Mon Sep 17 00:00:00 2001
From: Nick Clifton <nickc@redhat.com>
Date: Fri, 18 Nov 2016 11:42:48 -0800
Subject: [PATCH] Fix the generation of alignment frags in code sections for AArch64.
PR gas/20364
* config/tc-aarch64.c (s_ltorg): Change the mapping state after
aligning the frag.
(aarch64_init): Treat rs_align frags in code sections as
containing code, not data.
* testsuite/gas/aarch64/pr20364.s: New test.
* testsuite/gas/aarch64/pr20364.d: New test driver.
Backporting the patch from binutils mainline
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=7ea12e5c3ad54da440c08f32da09534e63e515ca
Upstream-Status: Backport
Signed-off-by: Manjukumar Matha <manjukumar.harthikote-matha@xilinx.com>
---
gas/ChangeLog | 10 ++++++++++
gas/config/tc-aarch64.c | 10 +++++++---
gas/testsuite/gas/aarch64/pr20364.d | 13 +++++++++++++
gas/testsuite/gas/aarch64/pr20364.s | 28 ++++++++++++++++++++++++++++
4 files changed, 58 insertions(+), 3 deletions(-)
create mode 100644 gas/testsuite/gas/aarch64/pr20364.d
create mode 100644 gas/testsuite/gas/aarch64/pr20364.s
diff --git a/gas/ChangeLog b/gas/ChangeLog
index a39895a..fad06dc 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,13 @@
+2016-08-05 Nick Clifton <nickc@redhat.com>
+
+ PR gas/20364
+ * config/tc-aarch64.c (s_ltorg): Change the mapping state after
+ aligning the frag.
+ (aarch64_init): Treat rs_align frags in code sections as
+ containing code, not data.
+ * testsuite/gas/aarch64/pr20364.s: New test.
+ * testsuite/gas/aarch64/pr20364.d: New test driver.
+
2016-08-03 Tristan Gingold <gingold@adacore.com>
* configure: Regenerate.
diff --git a/gas/config/tc-aarch64.c b/gas/config/tc-aarch64.c
index ddc40f2..74933cb 100644
--- a/gas/config/tc-aarch64.c
+++ b/gas/config/tc-aarch64.c
@@ -1736,13 +1736,13 @@ s_ltorg (int ignored ATTRIBUTE_UNUSED)
if (pool == NULL || pool->symbol == NULL || pool->next_free_entry == 0)
continue;
- mapping_state (MAP_DATA);
-
/* Align pool as you have word accesses.
Only make a frag if we have to. */
if (!need_pass_2)
frag_align (align, 0, 0);
+ mapping_state (MAP_DATA);
+
record_alignment (now_seg, align);
sprintf (sym_name, "$$lit_\002%x", pool->id);
@@ -6373,11 +6373,15 @@ aarch64_init_frag (fragS * fragP, int max_chars)
switch (fragP->fr_type)
{
- case rs_align:
case rs_align_test:
case rs_fill:
mapping_state_2 (MAP_DATA, max_chars);
break;
+ case rs_align:
+ /* PR 20364: We can get alignment frags in code sections,
+ so do not just assume that we should use the MAP_DATA state. */
+ mapping_state_2 (subseg_text_p (now_seg) ? MAP_INSN : MAP_DATA, max_chars);
+ break;
case rs_align_code:
mapping_state_2 (MAP_INSN, max_chars);
break;
diff --git a/gas/testsuite/gas/aarch64/pr20364.d b/gas/testsuite/gas/aarch64/pr20364.d
new file mode 100644
index 0000000..babcff1
--- /dev/null
+++ b/gas/testsuite/gas/aarch64/pr20364.d
@@ -0,0 +1,13 @@
+# Check that ".align <size>, <fill>" does not set the mapping state to DATA, causing unnecessary frag generation.
+#name: PR20364
+#objdump: -d
+
+.*: file format .*
+
+Disassembly of section \.vectors:
+
+0+000 <.*>:
+ 0: d2800000 mov x0, #0x0 // #0
+ 4: 94000000 bl 0 <plat_report_exception>
+ 8: 17fffffe b 0 <bl1_exceptions>
+
diff --git a/gas/testsuite/gas/aarch64/pr20364.s b/gas/testsuite/gas/aarch64/pr20364.s
new file mode 100644
index 0000000..594ad7c
--- /dev/null
+++ b/gas/testsuite/gas/aarch64/pr20364.s
@@ -0,0 +1,28 @@
+ .macro vector_base label
+ .section .vectors, "ax"
+ .align 11, 0
+ \label:
+ .endm
+
+ .macro vector_entry label
+ .section .vectors, "ax"
+ .align 7, 0
+ \label:
+ .endm
+
+ .macro check_vector_size since
+ .if (. - \since) > (32 * 4)
+ .error "Vector exceeds 32 instructions"
+ .endif
+ .endm
+
+ .globl bl1_exceptions
+
+vector_base bl1_exceptions
+
+vector_entry SynchronousExceptionSP0
+ mov x0, #0x0
+ bl plat_report_exception
+ b SynchronousExceptionSP0
+ check_vector_size SynchronousExceptionSP0
+
--
2.7.4