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

binutils: Bump to 2.27

(From OE-Core rev: 3f1eb2556026572dca9476c561d89b86723395c7)

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
2016-08-06 17:41:23 -07:00
committed by Richard Purdie
parent 26c6b10da8
commit 30ab044dac
25 changed files with 713 additions and 1188 deletions
+1 -1
View File
@@ -24,7 +24,7 @@ PREFERRED_PROVIDER_virtual/gettext ??= "gettext"
GCCVERSION ?= "6.1%" GCCVERSION ?= "6.1%"
SDKGCCVERSION ?= "${GCCVERSION}" SDKGCCVERSION ?= "${GCCVERSION}"
BINUVERSION ?= "2.26%" BINUVERSION ?= "2.27%"
GDBVERSION ?= "7.11%" GDBVERSION ?= "7.11%"
GLIBCVERSION ?= "2.24" GLIBCVERSION ?= "2.24"
UCLIBCVERSION ?= "1.0%" UCLIBCVERSION ?= "1.0%"
@@ -18,7 +18,7 @@ BINUPV = "${@binutils_branch_version(d)}"
UPSTREAM_CHECK_GITTAGREGEX = "binutils-(?P<pver>\d+_(\d_?)*)" UPSTREAM_CHECK_GITTAGREGEX = "binutils-(?P<pver>\d+_(\d_?)*)"
SRCREV = "c29838e7f484e0b5714b02e7feb9a88d3a045dd2" SRCREV = "5fe53ce37f9d9dd544ec8cc9e2863b68e1a61f4c"
SRC_URI = "\ SRC_URI = "\
git://sourceware.org/git/binutils-gdb.git;branch=binutils-${BINUPV}-branch;protocol=git \ git://sourceware.org/git/binutils-gdb.git;branch=binutils-${BINUPV}-branch;protocol=git \
file://0002-configure-widen-the-regexp-for-SH-architectures.patch \ file://0002-configure-widen-the-regexp-for-SH-architectures.patch \
@@ -32,10 +32,7 @@ SRC_URI = "\
file://0010-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch \ file://0010-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch \
file://0011-Change-default-emulation-for-mips64-linux.patch \ file://0011-Change-default-emulation-for-mips64-linux.patch \
file://0012-Add-support-for-Netlogic-XLP.patch \ file://0012-Add-support-for-Netlogic-XLP.patch \
file://0013-Fix-GOT-address-computations-in-initial-PLT-entries-.patch \ file://0013-fix-the-incorrect-assembling-for-ppc-wait-mnemonic.patch \
file://0014-Correct-nios2-_gp-address-computation.patch \
file://0015-fix-the-incorrect-assembling-for-ppc-wait-mnemonic.patch \
file://aarch64-tls.patch \
" "
S = "${WORKDIR}/git" S = "${WORKDIR}/git"
@@ -57,7 +57,6 @@ USE_ALTERNATIVES_FOR = " \
strings \ strings \
strip \ strip \
" "
USE_ALTERNATIVES_FOR_remove_mips = "ld.gold dwp"
python do_package_prepend() { python do_package_prepend() {
make_alts = d.getVar("USE_ALTERNATIVES_FOR", True) or "" make_alts = d.getVar("USE_ALTERNATIVES_FOR", True) or ""
@@ -1,7 +1,7 @@
From 3c75355342a8562ccb65b8bbbe81a0495fec5c57 Mon Sep 17 00:00:00 2001 From 2dae6b137ce609fd008f2063034a4403d95484c5 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com> From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 2 Mar 2015 01:58:54 +0000 Date: Mon, 2 Mar 2015 01:58:54 +0000
Subject: [PATCH 01/14] Generate relocatable SDKs Subject: [PATCH 01/13] Generate relocatable SDKs
This patch will modify the ELF linker scripts so that the crosssdk 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 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(-) 2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/ld/genscripts.sh b/ld/genscripts.sh diff --git a/ld/genscripts.sh b/ld/genscripts.sh
index a84d233..d12c4e2 100755 index eb262e7..1a3b8bc 100755
--- a/ld/genscripts.sh --- a/ld/genscripts.sh
+++ b/ld/genscripts.sh +++ b/ld/genscripts.sh
@@ -277,6 +277,7 @@ DATA_ALIGNMENT_u="${DATA_ALIGNMENT_u-${DATA_ALIGNMENT_r}}" @@ -277,6 +277,7 @@ DATA_ALIGNMENT_u="${DATA_ALIGNMENT_u-${DATA_ALIGNMENT_r}}"
@@ -43,7 +43,7 @@ index a84d233..d12c4e2 100755
LD_FLAG= LD_FLAG=
DATA_ALIGNMENT=${DATA_ALIGNMENT_} DATA_ALIGNMENT=${DATA_ALIGNMENT_}
diff --git a/ld/scripttempl/elf.sc b/ld/scripttempl/elf.sc diff --git a/ld/scripttempl/elf.sc b/ld/scripttempl/elf.sc
index ec78c90..f9e7a31 100644 index f0c6439..223c55f 100644
--- a/ld/scripttempl/elf.sc --- a/ld/scripttempl/elf.sc
+++ b/ld/scripttempl/elf.sc +++ b/ld/scripttempl/elf.sc
@@ -136,8 +136,8 @@ if test -n "${COMMONPAGESIZE}"; then @@ -136,8 +136,8 @@ if test -n "${COMMONPAGESIZE}"; then
@@ -58,5 +58,5 @@ index ec78c90..f9e7a31 100644
if test -z "$PLT"; then if test -z "$PLT"; then
IPLT=".iplt ${RELOCATING-0} : { *(.iplt) }" IPLT=".iplt ${RELOCATING-0} : { *(.iplt) }"
-- --
2.7.1 2.9.0
@@ -1,7 +1,7 @@
From b1ae604880562ed065f614a745d3f8922838bc5a Mon Sep 17 00:00:00 2001 From e4cd40722f597dff39c7214fab1742dd5bcc67eb Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com> From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 2 Mar 2015 01:07:33 +0000 Date: Mon, 2 Mar 2015 01:07:33 +0000
Subject: [PATCH 02/14] configure: widen the regexp for SH architectures Subject: [PATCH 02/13] configure: widen the regexp for SH architectures
gprof needs to know about uclibc gprof needs to know about uclibc
@@ -14,10 +14,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
2 files changed, 7 insertions(+), 2 deletions(-) 2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/configure b/configure diff --git a/configure b/configure
index 34b66f7..85414ab 100755 index ad3dfb7..2a74a77 100755
--- a/configure --- a/configure
+++ b/configure +++ b/configure
@@ -3445,7 +3445,7 @@ case "${target}" in @@ -3444,7 +3444,7 @@ case "${target}" in
;; ;;
s390-*-* | s390x-*-*) s390-*-* | s390x-*-*)
;; ;;
@@ -26,7 +26,7 @@ index 34b66f7..85414ab 100755
;; ;;
sh64-*-* | sh5*-*-*) sh64-*-* | sh5*-*-*)
;; ;;
@@ -3939,7 +3939,7 @@ case "${target}" in @@ -3946,7 +3946,7 @@ case "${target}" in
or1k*-*-*) or1k*-*-*)
noconfigdirs="$noconfigdirs gdb" noconfigdirs="$noconfigdirs gdb"
;; ;;
@@ -36,10 +36,10 @@ index 34b66f7..85414ab 100755
sh*-*-elf) sh*-*-elf)
;; ;;
diff --git a/gprof/configure b/gprof/configure diff --git a/gprof/configure b/gprof/configure
index 693b927..d4db554 100755 index bf3ecaa..626e1c7 100755
--- a/gprof/configure --- a/gprof/configure
+++ b/gprof/configure +++ b/gprof/configure
@@ -5869,6 +5869,11 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu) @@ -5873,6 +5873,11 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu)
lt_cv_deplibs_check_method=pass_all lt_cv_deplibs_check_method=pass_all
;; ;;
@@ -52,5 +52,5 @@ index 693b927..d4db554 100755
if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 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)$' lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
-- --
2.7.1 2.9.0
@@ -1,7 +1,7 @@
From 01808e8ef8ee709c8218d962601c18a63a063a1f Mon Sep 17 00:00:00 2001 From 93c49f6197bd59b2abbf04b3296bf10029b80f48 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com> From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 2 Mar 2015 01:09:58 +0000 Date: Mon, 2 Mar 2015 01:09:58 +0000
Subject: [PATCH 03/14] Point scripts location to libdir Subject: [PATCH 03/13] Point scripts location to libdir
Upstream-Status: Inappropriate [debian patch] 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(-) 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/ld/Makefile.am b/ld/Makefile.am diff --git a/ld/Makefile.am b/ld/Makefile.am
index 0b3b049..3871c74 100644 index 0598923..b478ba7 100644
--- a/ld/Makefile.am --- a/ld/Makefile.am
+++ b/ld/Makefile.am +++ b/ld/Makefile.am
@@ -57,7 +57,7 @@ endif @@ -57,7 +57,7 @@ endif
@@ -25,10 +25,10 @@ index 0b3b049..3871c74 100644
EMUL = @EMUL@ EMUL = @EMUL@
EMULATION_OFILES = @EMULATION_OFILES@ EMULATION_OFILES = @EMULATION_OFILES@
diff --git a/ld/Makefile.in b/ld/Makefile.in diff --git a/ld/Makefile.in b/ld/Makefile.in
index ed98f87..530e4c9 100644 index 7c78198..5eb67e0 100644
--- a/ld/Makefile.in --- a/ld/Makefile.in
+++ b/ld/Makefile.in +++ b/ld/Makefile.in
@@ -413,7 +413,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS) @@ -451,7 +451,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS)
# We put the scripts in the directory $(scriptdir)/ldscripts. # We put the scripts in the directory $(scriptdir)/ldscripts.
# We can't put the scripts in $(datadir) because the SEARCH_DIR # We can't put the scripts in $(datadir) because the SEARCH_DIR
# directives need to be different for native and cross linkers. # directives need to be different for native and cross linkers.
@@ -38,5 +38,5 @@ index ed98f87..530e4c9 100644
BFDDIR = $(BASEDIR)/bfd BFDDIR = $(BASEDIR)/bfd
INCDIR = $(BASEDIR)/include INCDIR = $(BASEDIR)/include
-- --
2.7.1 2.9.0
@@ -1,7 +1,7 @@
From c008c7f97c1cf487749c6c375820a1f3b3c6c53d Mon Sep 17 00:00:00 2001 From 4ff83779de8621715c6c2a79cf7ed8d74ff2d7c5 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com> From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 2 Mar 2015 01:27:17 +0000 Date: Mon, 2 Mar 2015 01:27:17 +0000
Subject: [PATCH 04/14] Only generate an RPATH entry if LD_RUN_PATH is not Subject: [PATCH 04/13] Only generate an RPATH entry if LD_RUN_PATH is not
empty empty
for cases where -rpath isn't specified. debian (#151024) 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(+) 1 file changed, 4 insertions(+)
diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em
index 0405d4f..73c5447 100644 index 47fa549..f4c640e 100644
--- a/ld/emultempl/elf32.em --- a/ld/emultempl/elf32.em
+++ b/ld/emultempl/elf32.em +++ b/ld/emultempl/elf32.em
@@ -1242,6 +1242,8 @@ fragment <<EOF @@ -1244,6 +1244,8 @@ fragment <<EOF
&& command_line.rpath == NULL) && command_line.rpath == NULL)
{ {
lib_path = (const char *) getenv ("LD_RUN_PATH"); lib_path = (const char *) getenv ("LD_RUN_PATH");
@@ -27,7 +27,7 @@ index 0405d4f..73c5447 100644
if (gld${EMULATION_NAME}_search_needed (lib_path, &n, if (gld${EMULATION_NAME}_search_needed (lib_path, &n,
force)) force))
break; break;
@@ -1523,6 +1525,8 @@ gld${EMULATION_NAME}_before_allocation (void) @@ -1525,6 +1527,8 @@ gld${EMULATION_NAME}_before_allocation (void)
rpath = command_line.rpath; rpath = command_line.rpath;
if (rpath == NULL) if (rpath == NULL)
rpath = (const char *) getenv ("LD_RUN_PATH"); rpath = (const char *) getenv ("LD_RUN_PATH");
@@ -37,5 +37,5 @@ index 0405d4f..73c5447 100644
for (abfd = link_info.input_bfds; abfd; abfd = abfd->link.next) for (abfd = link_info.input_bfds; abfd; abfd = abfd->link.next)
if (bfd_get_flavour (abfd) == bfd_target_elf_flavour) if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)
-- --
2.7.1 2.9.0
@@ -1,7 +1,7 @@
From 6a41635e29c4a6c064b1f66e79a8fe2026f4361b Mon Sep 17 00:00:00 2001 From 18a7ae169e8d55ace683357d1de6b07e4fdf797a Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com> From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 2 Mar 2015 01:32:49 +0000 Date: Mon, 2 Mar 2015 01:32:49 +0000
Subject: [PATCH 05/14] Explicitly link with libm on uclibc Subject: [PATCH 05/13] Explicitly link with libm on uclibc
Description: Description:
@@ -31,7 +31,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 6 insertions(+) 1 file changed, 6 insertions(+)
diff --git a/gas/configure.tgt b/gas/configure.tgt diff --git a/gas/configure.tgt b/gas/configure.tgt
index 0b490d4..086e0d2 100644 index e2df659..1b9fd99 100644
--- a/gas/configure.tgt --- a/gas/configure.tgt
+++ b/gas/configure.tgt +++ b/gas/configure.tgt
@@ -487,6 +487,12 @@ case ${generic_target} in @@ -487,6 +487,12 @@ case ${generic_target} in
@@ -48,5 +48,5 @@ index 0b490d4..086e0d2 100644
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 | sparc | z80 | z8k)
bfd_gas=yes bfd_gas=yes
-- --
2.7.1 2.9.0
File diff suppressed because it is too large Load Diff
@@ -1,7 +1,7 @@
From 4ff9dbe13f38e4fea24fbcc9879cf7352c0561ff Mon Sep 17 00:00:00 2001 From 9475aee8a702aa531737ec12dfd928d52951bc84 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com> From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 2 Mar 2015 01:37:10 +0000 Date: Mon, 2 Mar 2015 01:37:10 +0000
Subject: [PATCH 07/14] Add the armv5e architecture to binutils Subject: [PATCH 07/13] Add the armv5e architecture to binutils
Binutils has a comment that indicates it is supposed to match gcc for 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. 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(+) 1 file changed, 1 insertion(+)
diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c
index 3bd4bc9..5d99921 100644 index 73d0531..4b9e32f 100644
--- a/gas/config/tc-arm.c --- a/gas/config/tc-arm.c
+++ b/gas/config/tc-arm.c +++ b/gas/config/tc-arm.c
@@ -24791,6 +24791,7 @@ static const struct arm_arch_option_table arm_archs[] = @@ -25421,6 +25421,7 @@ static const struct arm_arch_option_table arm_archs[] =
ARM_ARCH_OPT ("armv4t", ARM_ARCH_V4T, FPU_ARCH_FPA), ARM_ARCH_OPT ("armv4t", ARM_ARCH_V4T, FPU_ARCH_FPA),
ARM_ARCH_OPT ("armv4txm", ARM_ARCH_V4TxM, FPU_ARCH_FPA), ARM_ARCH_OPT ("armv4txm", ARM_ARCH_V4TxM, FPU_ARCH_FPA),
ARM_ARCH_OPT ("armv5", ARM_ARCH_V5, FPU_ARCH_VFP), ARM_ARCH_OPT ("armv5", ARM_ARCH_V5, FPU_ARCH_VFP),
@@ -31,5 +31,5 @@ index 3bd4bc9..5d99921 100644
ARM_ARCH_OPT ("armv5txm", ARM_ARCH_V5TxM, FPU_ARCH_VFP), ARM_ARCH_OPT ("armv5txm", ARM_ARCH_V5TxM, FPU_ARCH_VFP),
ARM_ARCH_OPT ("armv5te", ARM_ARCH_V5TE, FPU_ARCH_VFP), ARM_ARCH_OPT ("armv5te", ARM_ARCH_V5TE, FPU_ARCH_VFP),
-- --
2.7.1 2.9.0
@@ -1,7 +1,7 @@
From cb36d94dbd521752e6444418af500e139a26eabb Mon Sep 17 00:00:00 2001 From b2d277937d11f1ce1d581f48ff74a25822a052da Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com> From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 2 Mar 2015 01:39:01 +0000 Date: Mon, 2 Mar 2015 01:39:01 +0000
Subject: [PATCH 08/14] don't let the distro compiler point to the wrong Subject: [PATCH 08/13] don't let the distro compiler point to the wrong
installation location installation location
Thanks to RP for helping find the source code causing the issue. Thanks to RP for helping find the source code causing the issue.
@@ -17,7 +17,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 2 insertions(+), 1 deletion(-) 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libiberty/Makefile.in b/libiberty/Makefile.in diff --git a/libiberty/Makefile.in b/libiberty/Makefile.in
index 7d7e2f4..1aaaf0e 100644 index c7a4568..f766b72 100644
--- a/libiberty/Makefile.in --- a/libiberty/Makefile.in
+++ b/libiberty/Makefile.in +++ b/libiberty/Makefile.in
@@ -364,7 +364,8 @@ install-strip: install @@ -364,7 +364,8 @@ install-strip: install
@@ -31,5 +31,5 @@ index 7d7e2f4..1aaaf0e 100644
if test -n "${target_header_dir}"; then \ if test -n "${target_header_dir}"; then \
${mkinstalldirs} $(DESTDIR)$(libdir)/$(MULTIOSDIR); \ ${mkinstalldirs} $(DESTDIR)$(libdir)/$(MULTIOSDIR); \
-- --
2.7.1 2.9.0
@@ -1,7 +1,7 @@
From 4daa841ce16ba52b717bdff9eb1dfc4f19638814 Mon Sep 17 00:00:00 2001 From 7ab8e318659eb5d9adc758c78d084a95560b93fd Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com> From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 15 Jan 2016 06:31:09 +0000 Date: Fri, 15 Jan 2016 06:31:09 +0000
Subject: [PATCH 09/14] warn for uses of system directories when cross linking Subject: [PATCH 09/13] warn for uses of system directories when cross linking
2008-07-02 Joseph Myers <joseph@codesourcery.com> 2008-07-02 Joseph Myers <joseph@codesourcery.com>
@@ -63,10 +63,10 @@ Upstream-Status: Pending
9 files changed, 86 insertions(+) 9 files changed, 86 insertions(+)
diff --git a/ld/config.in b/ld/config.in diff --git a/ld/config.in b/ld/config.in
index 276fb77..35c58eb 100644 index 2c6d698..d3cb7e8 100644
--- a/ld/config.in --- a/ld/config.in
+++ b/ld/config.in +++ b/ld/config.in
@@ -14,6 +14,9 @@ @@ -17,6 +17,9 @@
language is requested. */ language is requested. */
#undef ENABLE_NLS #undef ENABLE_NLS
@@ -77,10 +77,10 @@ index 276fb77..35c58eb 100644
#undef EXTRA_SHLIB_EXTENSION #undef EXTRA_SHLIB_EXTENSION
diff --git a/ld/configure b/ld/configure diff --git a/ld/configure b/ld/configure
index eb4f0d7..e9054b4 100755 index 3df1149..0601c98 100755
--- a/ld/configure --- a/ld/configure
+++ b/ld/configure +++ b/ld/configure
@@ -790,6 +790,7 @@ with_lib_path @@ -792,6 +792,7 @@ with_lib_path
enable_targets enable_targets
enable_64_bit_bfd enable_64_bit_bfd
with_sysroot with_sysroot
@@ -88,7 +88,7 @@ index eb4f0d7..e9054b4 100755
enable_gold enable_gold
enable_got enable_got
enable_compressed_debug_sections enable_compressed_debug_sections
@@ -1446,6 +1447,8 @@ Optional Features: @@ -1449,6 +1450,8 @@ Optional Features:
--disable-largefile omit support for large files --disable-largefile omit support for large files
--enable-targets alternative target configurations --enable-targets alternative target configurations
--enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes) --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
@@ -97,7 +97,7 @@ index eb4f0d7..e9054b4 100755
--enable-gold[=ARG] build gold [ARG={default,yes,no}] --enable-gold[=ARG] build gold [ARG={default,yes,no}]
--enable-got=<type> GOT handling scheme (target, single, negative, --enable-got=<type> GOT handling scheme (target, single, negative,
multigot) multigot)
@@ -16306,6 +16309,19 @@ fi @@ -16313,6 +16316,19 @@ fi
@@ -118,7 +118,7 @@ index eb4f0d7..e9054b4 100755
if test "${enable_gold+set}" = set; then : if test "${enable_gold+set}" = set; then :
enableval=$enable_gold; case "${enableval}" in enableval=$enable_gold; case "${enableval}" in
diff --git a/ld/configure.ac b/ld/configure.ac diff --git a/ld/configure.ac b/ld/configure.ac
index e28f38e..7b474e7 100644 index d17281f..9fb3db9 100644
--- a/ld/configure.ac --- a/ld/configure.ac
+++ b/ld/configure.ac +++ b/ld/configure.ac
@@ -95,6 +95,16 @@ AC_SUBST(use_sysroot) @@ -95,6 +95,16 @@ AC_SUBST(use_sysroot)
@@ -139,10 +139,10 @@ index e28f38e..7b474e7 100644
dnl "install_as_default" is set to false if gold is the default linker. dnl "install_as_default" is set to false if gold is the default linker.
dnl "installed_linker" is the installed BFD linker name. dnl "installed_linker" is the installed BFD linker name.
diff --git a/ld/ld.h b/ld/ld.h diff --git a/ld/ld.h b/ld/ld.h
index d84ec4e..3476b26 100644 index 85a48ad..a8fdddf 100644
--- a/ld/ld.h --- a/ld/ld.h
+++ b/ld/ld.h +++ b/ld/ld.h
@@ -164,6 +164,14 @@ typedef struct { @@ -169,6 +169,14 @@ typedef struct
/* If set, display the target memory usage (per memory region). */ /* If set, display the target memory usage (per memory region). */
bfd_boolean print_memory_usage; bfd_boolean print_memory_usage;
@@ -158,10 +158,10 @@ index d84ec4e..3476b26 100644
enum endian_enum endian; enum endian_enum endian;
diff --git a/ld/ld.texinfo b/ld/ld.texinfo diff --git a/ld/ld.texinfo b/ld/ld.texinfo
index 2389661..d06112b 100644 index bc16764..838c75d 100644
--- a/ld/ld.texinfo --- a/ld/ld.texinfo
+++ b/ld/ld.texinfo +++ b/ld/ld.texinfo
@@ -2338,6 +2338,18 @@ string identifying the original linked file does not change. @@ -2357,6 +2357,18 @@ string identifying the original linked file does not change.
Passing @code{none} for @var{style} disables the setting from any Passing @code{none} for @var{style} disables the setting from any
@code{--build-id} options earlier on the command line. @code{--build-id} options earlier on the command line.
@@ -181,7 +181,7 @@ index 2389661..d06112b 100644
@c man end @c man end
diff --git a/ld/ldfile.c b/ld/ldfile.c diff --git a/ld/ldfile.c b/ld/ldfile.c
index 96f9ecc..af231c0 100644 index e397737..013727b 100644
--- a/ld/ldfile.c --- a/ld/ldfile.c
+++ b/ld/ldfile.c +++ b/ld/ldfile.c
@@ -114,6 +114,23 @@ ldfile_add_library_path (const char *name, bfd_boolean cmdline) @@ -114,6 +114,23 @@ ldfile_add_library_path (const char *name, bfd_boolean cmdline)
@@ -209,7 +209,7 @@ index 96f9ecc..af231c0 100644
/* Try to open a BFD for a lang_input_statement. */ /* Try to open a BFD for a lang_input_statement. */
diff --git a/ld/ldlex.h b/ld/ldlex.h diff --git a/ld/ldlex.h b/ld/ldlex.h
index 6f11e7b..0ca3110 100644 index cf943e4..12cfcaa 100644
--- a/ld/ldlex.h --- a/ld/ldlex.h
+++ b/ld/ldlex.h +++ b/ld/ldlex.h
@@ -144,6 +144,8 @@ enum option_values @@ -144,6 +144,8 @@ enum option_values
@@ -222,7 +222,7 @@ index 6f11e7b..0ca3110 100644
/* The initial parser states. */ /* The initial parser states. */
diff --git a/ld/ldmain.c b/ld/ldmain.c diff --git a/ld/ldmain.c b/ld/ldmain.c
index bb0b9cc..a23c56c 100644 index e7a8dff..3ccf2af 100644
--- a/ld/ldmain.c --- a/ld/ldmain.c
+++ b/ld/ldmain.c +++ b/ld/ldmain.c
@@ -257,6 +257,8 @@ main (int argc, char **argv) @@ -257,6 +257,8 @@ main (int argc, char **argv)
@@ -235,7 +235,7 @@ index bb0b9cc..a23c56c 100644
/* We initialize DEMANGLING based on the environment variable /* We initialize DEMANGLING based on the environment variable
COLLECT_NO_DEMANGLE. The gcc collect2 program will demangle the COLLECT_NO_DEMANGLE. The gcc collect2 program will demangle the
diff --git a/ld/lexsup.c b/ld/lexsup.c diff --git a/ld/lexsup.c b/ld/lexsup.c
index e2fb212..a2064f1 100644 index 6d28e91..5c9da57 100644
--- a/ld/lexsup.c --- a/ld/lexsup.c
+++ b/ld/lexsup.c +++ b/ld/lexsup.c
@@ -530,6 +530,14 @@ static const struct ld_option ld_options[] = @@ -530,6 +530,14 @@ static const struct ld_option ld_options[] =
@@ -269,5 +269,5 @@ index e2fb212..a2064f1 100644
} }
-- --
2.7.1 2.9.0
@@ -1,7 +1,7 @@
From bb9eb09411ddcef515f0f7ad7c29214b0766e960 Mon Sep 17 00:00:00 2001 From 27fc7a4927ab92925a5be84217959d9f1c808ccc Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com> From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 2 Mar 2015 01:42:38 +0000 Date: Mon, 2 Mar 2015 01:42:38 +0000
Subject: [PATCH 10/14] Fix rpath in libtool when sysroot is enabled Subject: [PATCH 10/13] Fix rpath in libtool when sysroot is enabled
Enabling sysroot support in libtool exposed a bug where the final Enabling sysroot support in libtool exposed a bug where the final
library had an RPATH encoded into it which still pointed to the library had an RPATH encoded into it which still pointed to the
@@ -48,5 +48,5 @@ index 70e856e..11ee684 100644
if test -z "$hardcode_libdirs"; then if test -z "$hardcode_libdirs"; then
hardcode_libdirs="$libdir" hardcode_libdirs="$libdir"
-- --
2.7.1 2.9.0
@@ -1,7 +1,7 @@
From af1b4ee69b4fd617b88127ed40c3ca7351a9532f Mon Sep 17 00:00:00 2001 From 6b018e8129298dbd5b714e459ef0b3aef5bbce13 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com> From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 2 Mar 2015 01:44:14 +0000 Date: Mon, 2 Mar 2015 01:44:14 +0000
Subject: [PATCH 11/14] Change default emulation for mips64*-*-linux Subject: [PATCH 11/13] Change default emulation for mips64*-*-linux
we change the default emulations to be N64 instead of N32 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(-) 2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/bfd/config.bfd b/bfd/config.bfd diff --git a/bfd/config.bfd b/bfd/config.bfd
index c5688cb..5c27b49 100644 index b998830..ab17e72 100644
--- a/bfd/config.bfd --- a/bfd/config.bfd
+++ b/bfd/config.bfd +++ b/bfd/config.bfd
@@ -1087,12 +1087,12 @@ case "${targ}" in @@ -1101,12 +1101,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" 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*) mips64*el-*-linux*)
@@ -35,10 +35,10 @@ index c5688cb..5c27b49 100644
mips*el-*-linux*) mips*el-*-linux*)
targ_defvec=mips_elf32_trad_le_vec targ_defvec=mips_elf32_trad_le_vec
diff --git a/ld/configure.tgt b/ld/configure.tgt diff --git a/ld/configure.tgt b/ld/configure.tgt
index 6b6bbf2..b45b1e5 100644 index a3db909..212327c 100644
--- a/ld/configure.tgt --- a/ld/configure.tgt
+++ b/ld/configure.tgt +++ b/ld/configure.tgt
@@ -509,11 +509,11 @@ mips*el-*-vxworks*) targ_emul=elf32elmipvxworks @@ -513,11 +513,11 @@ mips*el-*-vxworks*) targ_emul=elf32elmipvxworks
mips*-*-vxworks*) targ_emul=elf32ebmipvxworks mips*-*-vxworks*) targ_emul=elf32ebmipvxworks
targ_extra_emuls="elf32elmipvxworks" ;; targ_extra_emuls="elf32elmipvxworks" ;;
mips*-*-windiss) targ_emul=elf32mipswindiss ;; mips*-*-windiss) targ_emul=elf32mipswindiss ;;
@@ -55,5 +55,5 @@ index 6b6bbf2..b45b1e5 100644
mips*el-*-linux-*) targ_emul=elf32ltsmip mips*el-*-linux-*) targ_emul=elf32ltsmip
targ_extra_emuls="elf32btsmip elf32ltsmipn32 elf64ltsmip elf32btsmipn32 elf64btsmip" targ_extra_emuls="elf32btsmip elf32ltsmipn32 elf64ltsmip elf32btsmipn32 elf64btsmip"
-- --
2.7.1 2.9.0
@@ -1,7 +1,7 @@
From 9f967c555b3fda64af4549ae252a0fba00120529 Mon Sep 17 00:00:00 2001 From c2e138f4ccdf8af81c18c8511c901d3deee696b5 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com> From: Khem Raj <raj.khem@gmail.com>
Date: Sun, 14 Feb 2016 17:06:19 +0000 Date: Sun, 14 Feb 2016 17:06:19 +0000
Subject: [PATCH 12/14] Add support for Netlogic XLP Subject: [PATCH 12/13] Add support for Netlogic XLP
Patch From: Nebu Philips <nphilips@netlogicmicro.com> Patch From: Nebu Philips <nphilips@netlogicmicro.com>
@@ -35,10 +35,10 @@ Upstream-Status: Pending
15 files changed, 65 insertions(+), 25 deletions(-) 15 files changed, 65 insertions(+), 25 deletions(-)
diff --git a/bfd/aoutx.h b/bfd/aoutx.h diff --git a/bfd/aoutx.h b/bfd/aoutx.h
index f78b910..d0d8dd3 100644 index be0126a..4ca7e24 100644
--- a/bfd/aoutx.h --- a/bfd/aoutx.h
+++ b/bfd/aoutx.h +++ b/bfd/aoutx.h
@@ -802,6 +802,7 @@ NAME (aout, machine_type) (enum bfd_architecture arch, @@ -812,6 +812,7 @@ NAME (aout, machine_type) (enum bfd_architecture arch,
case bfd_mach_mipsisa64r6: case bfd_mach_mipsisa64r6:
case bfd_mach_mips_sb1: case bfd_mach_mips_sb1:
case bfd_mach_mips_xlr: case bfd_mach_mips_xlr:
@@ -47,10 +47,10 @@ index f78b910..d0d8dd3 100644
arch_flags = M_MIPS2; arch_flags = M_MIPS2;
break; break;
diff --git a/bfd/archures.c b/bfd/archures.c diff --git a/bfd/archures.c b/bfd/archures.c
index 51068b9..727741f 100644 index 96c9109..5a30d02 100644
--- a/bfd/archures.c --- a/bfd/archures.c
+++ b/bfd/archures.c +++ b/bfd/archures.c
@@ -181,6 +181,7 @@ DESCRIPTION @@ -197,6 +197,7 @@ DESCRIPTION
.#define bfd_mach_mips_octeon2 6502 .#define bfd_mach_mips_octeon2 6502
.#define bfd_mach_mips_octeon3 6503 .#define bfd_mach_mips_octeon3 6503
.#define bfd_mach_mips_xlr 887682 {* decimal 'XLR' *} .#define bfd_mach_mips_xlr 887682 {* decimal 'XLR' *}
@@ -59,10 +59,10 @@ index 51068b9..727741f 100644
.#define bfd_mach_mipsisa32r2 33 .#define bfd_mach_mipsisa32r2 33
.#define bfd_mach_mipsisa32r3 34 .#define bfd_mach_mipsisa32r3 34
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index 779ffbf..bf5a565 100644 index 30513c4..5e8ed4c 100644
--- a/bfd/bfd-in2.h --- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h +++ b/bfd/bfd-in2.h
@@ -1993,6 +1993,7 @@ enum bfd_architecture @@ -2008,6 +2008,7 @@ enum bfd_architecture
#define bfd_mach_mips_octeon2 6502 #define bfd_mach_mips_octeon2 6502
#define bfd_mach_mips_octeon3 6503 #define bfd_mach_mips_octeon3 6503
#define bfd_mach_mips_xlr 887682 /* decimal 'XLR' */ #define bfd_mach_mips_xlr 887682 /* decimal 'XLR' */
@@ -71,10 +71,10 @@ index 779ffbf..bf5a565 100644
#define bfd_mach_mipsisa32r2 33 #define bfd_mach_mipsisa32r2 33
#define bfd_mach_mipsisa32r3 34 #define bfd_mach_mipsisa32r3 34
diff --git a/bfd/config.bfd b/bfd/config.bfd diff --git a/bfd/config.bfd b/bfd/config.bfd
index 5c27b49..d553039 100644 index ab17e72..863be89 100644
--- a/bfd/config.bfd --- a/bfd/config.bfd
+++ b/bfd/config.bfd +++ b/bfd/config.bfd
@@ -1066,6 +1066,11 @@ case "${targ}" in @@ -1084,6 +1084,11 @@ case "${targ}" in
targ_defvec=mips_elf32_le_vec targ_defvec=mips_elf32_le_vec
targ_selvecs="mips_elf32_be_vec mips_elf64_be_vec mips_elf64_le_vec" targ_selvecs="mips_elf32_be_vec mips_elf64_be_vec mips_elf64_le_vec"
;; ;;
@@ -83,11 +83,11 @@ index 5c27b49..d553039 100644
+ targ_selvecs="mips_elf32_trad_le_vec mips_elf64_trad_be_vec mips_elf64_trad_le_vec" + targ_selvecs="mips_elf32_trad_le_vec mips_elf64_trad_be_vec mips_elf64_trad_le_vec"
+ want64=true + want64=true
+ ;; + ;;
mips*-*-elf* | mips*-*-rtems* | mips*-*-vxworks | mips*-*-windiss) mips*-*-elf* | mips*-*-rtems* | mips*-*-windiss | mips*-*-none)
targ_defvec=mips_elf32_be_vec targ_defvec=mips_elf32_be_vec
targ_selvecs="mips_elf32_le_vec mips_elf64_be_vec mips_elf64_le_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 diff --git a/bfd/cpu-mips.c b/bfd/cpu-mips.c
index 8a9475d..de7e5a3 100644 index d209fb6..b6a86ae 100644
--- a/bfd/cpu-mips.c --- a/bfd/cpu-mips.c
+++ b/bfd/cpu-mips.c +++ b/bfd/cpu-mips.c
@@ -104,7 +104,8 @@ enum @@ -104,7 +104,8 @@ enum
@@ -111,10 +111,10 @@ index 8a9475d..de7e5a3 100644
/* The default architecture is mips:3000, but with a machine number of /* The default architecture is mips:3000, but with a machine number of
diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c
index 1f2f4a3..700afd3 100644 index e47276b..71c30a0 100644
--- a/bfd/elfxx-mips.c --- a/bfd/elfxx-mips.c
+++ b/bfd/elfxx-mips.c +++ b/bfd/elfxx-mips.c
@@ -6605,6 +6605,9 @@ _bfd_elf_mips_mach (flagword flags) @@ -6646,6 +6646,9 @@ _bfd_elf_mips_mach (flagword flags)
case E_MIPS_MACH_XLR: case E_MIPS_MACH_XLR:
return bfd_mach_mips_xlr; return bfd_mach_mips_xlr;
@@ -124,7 +124,7 @@ index 1f2f4a3..700afd3 100644
default: default:
switch (flags & EF_MIPS_ARCH) switch (flags & EF_MIPS_ARCH)
{ {
@@ -11901,6 +11904,10 @@ mips_set_isa_flags (bfd *abfd) @@ -11949,6 +11952,10 @@ mips_set_isa_flags (bfd *abfd)
val = E_MIPS_ARCH_64R2 | E_MIPS_MACH_OCTEON2; val = E_MIPS_ARCH_64R2 | E_MIPS_MACH_OCTEON2;
break; break;
@@ -135,7 +135,7 @@ index 1f2f4a3..700afd3 100644
case bfd_mach_mipsisa32: case bfd_mach_mipsisa32:
val = E_MIPS_ARCH_32; val = E_MIPS_ARCH_32;
break; break;
@@ -13931,6 +13938,7 @@ static const struct mips_mach_extension mips_mach_extensions[] = @@ -13975,6 +13982,7 @@ static const struct mips_mach_extension mips_mach_extensions[] =
{ bfd_mach_mips_octeonp, bfd_mach_mips_octeon }, { bfd_mach_mips_octeonp, bfd_mach_mips_octeon },
{ bfd_mach_mips_octeon, bfd_mach_mipsisa64r2 }, { bfd_mach_mips_octeon, bfd_mach_mipsisa64r2 },
{ bfd_mach_mips_loongson_3a, bfd_mach_mipsisa64r2 }, { bfd_mach_mips_loongson_3a, bfd_mach_mipsisa64r2 },
@@ -144,10 +144,10 @@ index 1f2f4a3..700afd3 100644
/* MIPS64 extensions. */ /* MIPS64 extensions. */
{ bfd_mach_mipsisa64r2, bfd_mach_mipsisa64 }, { bfd_mach_mipsisa64r2, bfd_mach_mipsisa64 },
diff --git a/binutils/readelf.c b/binutils/readelf.c diff --git a/binutils/readelf.c b/binutils/readelf.c
index d5dd46f..66810cc 100644 index 274ddd1..d31558c 100644
--- a/binutils/readelf.c --- a/binutils/readelf.c
+++ b/binutils/readelf.c +++ b/binutils/readelf.c
@@ -3140,6 +3140,7 @@ get_machine_flags (unsigned e_flags, unsigned e_machine) @@ -3230,6 +3230,7 @@ get_machine_flags (unsigned e_flags, unsigned e_machine)
case E_MIPS_MACH_OCTEON2: strcat (buf, ", octeon2"); break; case E_MIPS_MACH_OCTEON2: strcat (buf, ", octeon2"); break;
case E_MIPS_MACH_OCTEON3: strcat (buf, ", octeon3"); break; case E_MIPS_MACH_OCTEON3: strcat (buf, ", octeon3"); break;
case E_MIPS_MACH_XLR: strcat (buf, ", xlr"); break; case E_MIPS_MACH_XLR: strcat (buf, ", xlr"); break;
@@ -156,7 +156,7 @@ index d5dd46f..66810cc 100644
/* We simply ignore the field in this case to avoid confusion: /* We simply ignore the field in this case to avoid confusion:
MIPS ELF does not specify EF_MIPS_MACH, it is a GNU 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 diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c
index a2d45a4..75902c0 100644 index eb8b26b..e59dce6 100644
--- a/gas/config/tc-mips.c --- a/gas/config/tc-mips.c
+++ b/gas/config/tc-mips.c +++ b/gas/config/tc-mips.c
@@ -552,6 +552,7 @@ static int mips_32bitmode = 0; @@ -552,6 +552,7 @@ static int mips_32bitmode = 0;
@@ -175,20 +175,20 @@ index a2d45a4..75902c0 100644
) )
/* Whether the processor uses hardware interlocks to protect reads /* Whether the processor uses hardware interlocks to protect reads
@@ -18702,7 +18704,7 @@ static const struct mips_cpu_info mips_cpu_info_table[] = @@ -18858,7 +18860,7 @@ static const struct mips_cpu_info mips_cpu_info_table[] =
/* Broadcom XLP. /* Broadcom XLP.
XLP is mostly like XLR, with the prominent exception that it is XLP is mostly like XLR, with the prominent exception that it is
MIPS64R2 rather than MIPS64. */ MIPS64R2 rather than MIPS64. */
- { "xlp", 0, 0, ISA_MIPS64R2, CPU_XLR }, - { "xlp", 0, 0, ISA_MIPS64R2, CPU_XLR },
+ { "xlp", 0, 0, ISA_MIPS64R2, CPU_XLP }, + { "xlp", 0, 0, ISA_MIPS64R2, CPU_XLP },
/* i6400. */ /* MIPS 64 Release 6 */
{ "i6400", 0, ASE_MSA, ISA_MIPS64R6, CPU_MIPS64R6}, { "i6400", 0, ASE_MSA, ISA_MIPS64R6, CPU_MIPS64R6},
diff --git a/gas/configure b/gas/configure diff --git a/gas/configure b/gas/configure
index 89f18b3..86b19ae 100755 index 45da030..aba89f7 100755
--- a/gas/configure --- a/gas/configure
+++ b/gas/configure +++ b/gas/configure
@@ -12851,6 +12851,9 @@ _ACEOF @@ -12914,6 +12914,9 @@ _ACEOF
mipsisa64r6 | mipsisa64r6el) mipsisa64r6 | mipsisa64r6el)
mips_cpu=mips64r6 mips_cpu=mips64r6
;; ;;
@@ -199,7 +199,7 @@ index 89f18b3..86b19ae 100755
mips_cpu=r3900 mips_cpu=r3900
;; ;;
diff --git a/gas/configure.tgt b/gas/configure.tgt diff --git a/gas/configure.tgt b/gas/configure.tgt
index 086e0d2..2b71270 100644 index 1b9fd99..a9f1977 100644
--- a/gas/configure.tgt --- a/gas/configure.tgt
+++ b/gas/configure.tgt +++ b/gas/configure.tgt
@@ -339,7 +339,7 @@ case ${generic_target} in @@ -339,7 +339,7 @@ case ${generic_target} in
@@ -212,10 +212,10 @@ index 086e0d2..2b71270 100644
mips-*-openbsd*) fmt=elf em=tmips ;; mips-*-openbsd*) fmt=elf em=tmips ;;
diff --git a/include/elf/mips.h b/include/elf/mips.h diff --git a/include/elf/mips.h b/include/elf/mips.h
index 57de3bc..9ba141d 100644 index 7e813de..d7d72c1 100644
--- a/include/elf/mips.h --- a/include/elf/mips.h
+++ b/include/elf/mips.h +++ b/include/elf/mips.h
@@ -285,6 +285,7 @@ END_RELOC_NUMBERS (R_MIPS_maxext) @@ -290,6 +290,7 @@ END_RELOC_NUMBERS (R_MIPS_maxext)
#define E_MIPS_MACH_SB1 0x008a0000 #define E_MIPS_MACH_SB1 0x008a0000
#define E_MIPS_MACH_OCTEON 0x008b0000 #define E_MIPS_MACH_OCTEON 0x008b0000
#define E_MIPS_MACH_XLR 0x008c0000 #define E_MIPS_MACH_XLR 0x008c0000
@@ -224,10 +224,10 @@ index 57de3bc..9ba141d 100644
#define E_MIPS_MACH_OCTEON3 0x008e0000 #define E_MIPS_MACH_OCTEON3 0x008e0000
#define E_MIPS_MACH_5400 0x00910000 #define E_MIPS_MACH_5400 0x00910000
diff --git a/include/opcode/mips.h b/include/opcode/mips.h diff --git a/include/opcode/mips.h b/include/opcode/mips.h
index 9318fcc..9be5645 100644 index b1d4ef6..f2c8e88 100644
--- a/include/opcode/mips.h --- a/include/opcode/mips.h
+++ b/include/opcode/mips.h +++ b/include/opcode/mips.h
@@ -1228,8 +1228,10 @@ static const unsigned int mips_isa_table[] = { @@ -1232,8 +1232,10 @@ static const unsigned int mips_isa_table[] = {
#define INSN_LOONGSON_2F 0x80000000 #define INSN_LOONGSON_2F 0x80000000
/* Loongson 3A. */ /* Loongson 3A. */
#define INSN_LOONGSON_3A 0x00000400 #define INSN_LOONGSON_3A 0x00000400
@@ -240,7 +240,7 @@ index 9318fcc..9be5645 100644
/* DSP ASE */ /* DSP ASE */
#define ASE_DSP 0x00000001 #define ASE_DSP 0x00000001
@@ -1326,6 +1328,7 @@ static const unsigned int mips_isa_table[] = { @@ -1331,6 +1333,7 @@ static const unsigned int mips_isa_table[] = {
#define CPU_OCTEON2 6502 #define CPU_OCTEON2 6502
#define CPU_OCTEON3 6503 #define CPU_OCTEON3 6503
#define CPU_XLR 887682 /* decimal 'XLR' */ #define CPU_XLR 887682 /* decimal 'XLR' */
@@ -248,7 +248,7 @@ index 9318fcc..9be5645 100644
/* Return true if the given CPU is included in INSN_* mask MASK. */ /* Return true if the given CPU is included in INSN_* mask MASK. */
@@ -1403,6 +1406,9 @@ cpu_is_member (int cpu, unsigned int mask) @@ -1408,6 +1411,9 @@ cpu_is_member (int cpu, unsigned int mask)
return ((mask & INSN_ISA_MASK) == INSN_ISA32R6) return ((mask & INSN_ISA_MASK) == INSN_ISA32R6)
|| ((mask & INSN_ISA_MASK) == INSN_ISA64R6); || ((mask & INSN_ISA_MASK) == INSN_ISA64R6);
@@ -259,10 +259,10 @@ index 9318fcc..9be5645 100644
return FALSE; return FALSE;
} }
diff --git a/ld/configure.tgt b/ld/configure.tgt diff --git a/ld/configure.tgt b/ld/configure.tgt
index b45b1e5..fb2f36a 100644 index 212327c..212e09c 100644
--- a/ld/configure.tgt --- a/ld/configure.tgt
+++ b/ld/configure.tgt +++ b/ld/configure.tgt
@@ -495,6 +495,8 @@ mips*el-sde-elf*) targ_emul=elf32ltsmip @@ -499,6 +499,8 @@ mips*el-sde-elf* | mips*el-mti-elf* | mips*el-img-elf*)
mips*-sde-elf* | mips*-mti-elf* | mips*-img-elf*) mips*-sde-elf* | mips*-mti-elf* | mips*-img-elf*)
targ_emul=elf32btsmip targ_emul=elf32btsmip
targ_extra_emuls="elf32ltsmip elf32btsmipn32 elf64btsmip elf32ltsmipn32 elf64ltsmip" ;; targ_extra_emuls="elf32ltsmip elf32btsmipn32 elf64btsmip elf32ltsmipn32 elf64ltsmip" ;;
@@ -272,7 +272,7 @@ index b45b1e5..fb2f36a 100644
targ_extra_emuls="elf32lr5900" 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 diff --git a/opcodes/mips-dis.c b/opcodes/mips-dis.c
index 8200920..40d9fe2 100644 index 3f874e7..9813d0e 100644
--- a/opcodes/mips-dis.c --- a/opcodes/mips-dis.c
+++ b/opcodes/mips-dis.c +++ b/opcodes/mips-dis.c
@@ -648,13 +648,11 @@ const struct mips_arch_choice mips_arch_choices[] = @@ -648,13 +648,11 @@ const struct mips_arch_choice mips_arch_choices[] =
@@ -295,7 +295,7 @@ index 8200920..40d9fe2 100644
/* This entry, mips16, is here only for ISA/processor selection; do /* This entry, mips16, is here only for ISA/processor selection; do
not print its name. */ not print its name. */
diff --git a/opcodes/mips-opc.c b/opcodes/mips-opc.c diff --git a/opcodes/mips-opc.c b/opcodes/mips-opc.c
index 402f887..3764836 100644 index a95eff1..99fb7bb 100644
--- a/opcodes/mips-opc.c --- a/opcodes/mips-opc.c
+++ b/opcodes/mips-opc.c +++ b/opcodes/mips-opc.c
@@ -320,7 +320,8 @@ decode_mips_operand (const char *p) @@ -320,7 +320,8 @@ decode_mips_operand (const char *p)
@@ -308,7 +308,7 @@ index 402f887..3764836 100644
#define IVIRT ASE_VIRT #define IVIRT ASE_VIRT
#define IVIRT64 ASE_VIRT64 #define IVIRT64 ASE_VIRT64
@@ -957,6 +958,7 @@ const struct mips_opcode mips_builtin_opcodes[] = @@ -958,6 +959,7 @@ const struct mips_opcode mips_builtin_opcodes[] =
{"clo", "U,s", 0x70000021, 0xfc0007ff, WR_1|RD_2, 0, I32|N55, 0, I37 }, {"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", "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 }, {"clz", "U,s", 0x70000020, 0xfc0007ff, WR_1|RD_2, 0, I32|N55, 0, I37 },
@@ -316,7 +316,7 @@ index 402f887..3764836 100644
/* ctc0 is at the bottom of the table. */ /* ctc0 is at the bottom of the table. */
{"ctc1", "t,G", 0x44c00000, 0xffe007ff, RD_1|WR_CC|CM, 0, I1, 0, 0 }, {"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 }, {"ctc1", "t,S", 0x44c00000, 0xffe007ff, RD_1|WR_CC|CM, 0, I1, 0, 0 },
@@ -989,12 +991,13 @@ const struct mips_opcode mips_builtin_opcodes[] = @@ -990,12 +992,13 @@ const struct mips_opcode mips_builtin_opcodes[] =
{"daddiu", "t,r,j", 0x64000000, 0xfc000000, WR_1|RD_2, 0, I3, 0, 0 }, {"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", "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 }, {"daddu", "t,r,I", 0, (int) M_DADDU_I, INSN_MACRO, 0, I3, 0, 0 },
@@ -331,7 +331,7 @@ index 402f887..3764836 100644
/* dctr and dctw are used on the r5000. */ /* dctr and dctw are used on the r5000. */
{"dctr", "o(b)", 0xbc050000, 0xfc1f0000, RD_2, 0, I3, 0, 0 }, {"dctr", "o(b)", 0xbc050000, 0xfc1f0000, RD_2, 0, I3, 0, 0 },
{"dctw", "o(b)", 0xbc090000, 0xfc1f0000, RD_2, 0, I3, 0, 0 }, {"dctw", "o(b)", 0xbc090000, 0xfc1f0000, RD_2, 0, I3, 0, 0 },
@@ -1066,6 +1069,7 @@ const struct mips_opcode mips_builtin_opcodes[] = @@ -1067,6 +1070,7 @@ const struct mips_opcode mips_builtin_opcodes[] =
{"dmfc0", "t,G,H", 0x40200000, 0xffe007f8, WR_1|RD_C0|LC, 0, I64, 0, 0 }, {"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", 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 }, {"dmfgc0", "t,G,H", 0x40600100, 0xffe007f8, WR_1|RD_C0|LC, 0, 0, IVIRT64, 0 },
@@ -339,7 +339,7 @@ index 402f887..3764836 100644
{"dmt", "", 0x41600bc1, 0xffffffff, TRAP, 0, 0, MT32, 0 }, {"dmt", "", 0x41600bc1, 0xffffffff, TRAP, 0, 0, MT32, 0 },
{"dmt", "t", 0x41600bc1, 0xffe0ffff, WR_1|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 }, {"dmtc0", "t,G", 0x40a00000, 0xffe007ff, RD_1|WR_C0|WR_CC|CM, 0, I3, 0, EE },
@@ -1081,6 +1085,8 @@ const struct mips_opcode mips_builtin_opcodes[] = @@ -1082,6 +1086,8 @@ const struct mips_opcode mips_builtin_opcodes[] =
/* dmfc3 is at the bottom of the table. */ /* dmfc3 is at the bottom of the table. */
/* dmtc3 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 }, {"dmuh", "d,s,t", 0x000000dc, 0xfc0007ff, WR_1|RD_2|RD_3, 0, I69, 0, 0 },
@@ -348,7 +348,7 @@ index 402f887..3764836 100644
{"dmul", "d,s,t", 0x0000009c, 0xfc0007ff, WR_1|RD_2|RD_3, 0, I69, 0, 0 }, {"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", 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 }, {"dmul", "d,v,t", 0, (int) M_DMUL, INSN_MACRO, 0, I3, 0, M32|I69 },
@@ -1234,9 +1240,9 @@ const struct mips_opcode mips_builtin_opcodes[] = @@ -1235,9 +1241,9 @@ const struct mips_opcode mips_builtin_opcodes[] =
{"ld", "s,-b(+R)", 0xec180000, 0xfc1c0000, WR_1, RD_pc, I69, 0, 0 }, {"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,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 }, {"ld", "t,o(b)", 0xdc000000, 0xfc000000, WR_1|RD_3|LM, 0, I3, 0, 0 },
@@ -361,7 +361,7 @@ index 402f887..3764836 100644
{"ldc1", "T,o(b)", 0xd4000000, 0xfc000000, WR_1|RD_3|CLD|FP_D, 0, I2, 0, SF }, {"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", "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 }, {"ldc1", "T,A(b)", 0, (int) M_LDC1_AB, INSN_MACRO, INSN2_M_FP_D, I2, 0, SF },
@@ -1401,7 +1407,7 @@ const struct mips_opcode mips_builtin_opcodes[] = @@ -1402,7 +1408,7 @@ const struct mips_opcode mips_builtin_opcodes[] =
{"mflo", "d,9", 0x00000012, 0xff9f07ff, WR_1|RD_LO, 0, 0, D32, 0 }, {"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 }, {"mflo1", "d", 0x70000012, 0xffff07ff, WR_1|RD_LO, 0, EE, 0, 0 },
{"mflhxu", "d", 0x00000052, 0xffff07ff, WR_1|MOD_HILO, 0, 0, SMT, 0 }, {"mflhxu", "d", 0x00000052, 0xffff07ff, WR_1|MOD_HILO, 0, 0, SMT, 0 },
@@ -370,7 +370,7 @@ index 402f887..3764836 100644
{"mfsa", "d", 0x00000028, 0xffff07ff, WR_1, 0, EE, 0, 0 }, {"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", "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 }, {"min.ob", "D,S,Q", 0x48000006, 0xfc20003f, WR_1|RD_2|RD_3|FP_D, 0, N54, 0, 0 },
@@ -1446,10 +1452,13 @@ const struct mips_opcode mips_builtin_opcodes[] = @@ -1447,10 +1453,13 @@ const struct mips_opcode mips_builtin_opcodes[] =
/* move is at the top of the table. */ /* 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 }, {"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 }, {"msgsnd", "t", 0, (int) M_MSGSND, INSN_MACRO, 0, XLR, 0, 0 },
@@ -386,7 +386,7 @@ index 402f887..3764836 100644
{"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,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", 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 }, {"msub.d", "D,S,T", 0x72200019, 0xffe0003f, WR_1|RD_2|RD_3|FP_D, 0, IL2F, 0, 0 },
@@ -1499,7 +1508,7 @@ const struct mips_opcode mips_builtin_opcodes[] = @@ -1500,7 +1509,7 @@ const struct mips_opcode mips_builtin_opcodes[] =
{"mtlo", "s,7", 0x00000013, 0xfc1fe7ff, RD_1|WR_LO, 0, 0, D32, 0 }, {"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 }, {"mtlo1", "s", 0x70000013, 0xfc1fffff, RD_1|WR_LO, 0, EE, 0, 0 },
{"mtlhx", "s", 0x00000053, 0xfc1fffff, RD_1|MOD_HILO, 0, 0, SMT, 0 }, {"mtlhx", "s", 0x00000053, 0xfc1fffff, RD_1|MOD_HILO, 0, 0, SMT, 0 },
@@ -395,7 +395,7 @@ index 402f887..3764836 100644
{"mtm0", "s", 0x70000008, 0xfc1fffff, RD_1, 0, IOCT, 0, 0 }, {"mtm0", "s", 0x70000008, 0xfc1fffff, RD_1, 0, IOCT, 0, 0 },
{"mtm0", "s,t", 0x70000008, 0xfc00ffff, RD_1|RD_2, 0, IOCT3, 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 }, {"mtm1", "s", 0x7000000c, 0xfc1fffff, RD_1, 0, IOCT, 0, 0 },
@@ -1936,9 +1945,9 @@ const struct mips_opcode mips_builtin_opcodes[] = @@ -1937,9 +1946,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}, {"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,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 }, {"sw", "t,A(b)", 0, (int) M_SW_AB, INSN_MACRO, 0, I1, 0, 0 },
@@ -409,5 +409,5 @@ index 402f887..3764836 100644
{"swc0", "E,A(b)", 0, (int) M_SWC0_AB, INSN_MACRO, 0, I1, 0, IOCT|IOCTP|IOCT2|I37 }, {"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 }, {"swc1", "T,o(b)", 0xe4000000, 0xfc000000, RD_1|RD_3|SM|FP_S, 0, I1, 0, 0 },
-- --
2.7.1 2.9.0
@@ -1,72 +0,0 @@
From 9619a608528383a44ccc1637ae939b5f3e97adc5 Mon Sep 17 00:00:00 2001
From: Sandra Loosemore <sandra@codesourcery.com>
Date: Wed, 9 Dec 2015 16:13:58 -0800
Subject: [PATCH 13/14] Fix GOT address computations in initial PLT entries for
nios2.
2015-12-09 Sandra Loosemore <sandra@codesourcery.com>
bfd/
* elf32-nios2.c (nios2_elf32_finish_dynamic_sections): Correct
%hiadj/%lo computations for _GLOBAL_OFFSET_TABLE_ in initial
PLT entries. Assert alignment requirements.
Signed-off-by: Marek Vasut <marex@denx.de>
Upstream-Status: Backport
---
bfd/elf32-nios2.c | 23 ++++++++++++++++-------
1 file changed, 16 insertions(+), 7 deletions(-)
diff --git a/bfd/elf32-nios2.c b/bfd/elf32-nios2.c
index 6b29d8b..1c54320 100644
--- a/bfd/elf32-nios2.c
+++ b/bfd/elf32-nios2.c
@@ -5383,12 +5383,17 @@ nios2_elf32_finish_dynamic_sections (bfd *output_bfd,
+ sgotplt->output_offset);
if (bfd_link_pic (info))
{
- bfd_vma corrected = got_address - (splt->output_section->vma
- + splt->output_offset + 4);
+ bfd_vma got_pcrel = got_address - (splt->output_section->vma
+ + splt->output_offset);
+ /* Both GOT and PLT must be aligned to a 16-byte boundary
+ for the two loads to share the %hiadj part. The 4-byte
+ offset for nextpc is accounted for in the %lo offsets
+ on the loads. */
+ BFD_ASSERT ((got_pcrel & 0xf) == 0);
nios2_elf32_install_data (splt, nios2_so_plt0_entry, 0, 6);
- nios2_elf32_install_imm16 (splt, 4, hiadj (corrected));
- nios2_elf32_install_imm16 (splt, 12, (corrected & 0xffff) + 4);
- nios2_elf32_install_imm16 (splt, 16, (corrected & 0xffff) + 8);
+ nios2_elf32_install_imm16 (splt, 4, hiadj (got_pcrel));
+ nios2_elf32_install_imm16 (splt, 12, got_pcrel & 0xffff);
+ nios2_elf32_install_imm16 (splt, 16, (got_pcrel + 4) & 0xffff);
}
else
{
@@ -5404,6 +5409,10 @@ nios2_elf32_finish_dynamic_sections (bfd *output_bfd,
6 | ((res_size - (res_offset + 4)) << 6),
splt->contents + res_offset);
+ /* The GOT must be aligned to a 16-byte boundary for the
+ two loads to share the same %hiadj part. */
+ BFD_ASSERT ((got_address & 0xf) == 0);
+
nios2_elf32_install_data (splt, nios2_plt0_entry, res_size, 7);
nios2_elf32_install_imm16 (splt, res_size, hiadj (res_start));
nios2_elf32_install_imm16 (splt, res_size + 4,
@@ -5411,9 +5420,9 @@ nios2_elf32_finish_dynamic_sections (bfd *output_bfd,
nios2_elf32_install_imm16 (splt, res_size + 12,
hiadj (got_address));
nios2_elf32_install_imm16 (splt, res_size + 16,
- (got_address & 0xffff) + 4);
+ (got_address + 4) & 0xffff);
nios2_elf32_install_imm16 (splt, res_size + 20,
- (got_address & 0xffff) + 8);
+ (got_address + 8) & 0xffff);
}
}
}
--
2.7.1
@@ -0,0 +1,36 @@
From 0c04c3b626998c8e7b595381b35456428581f52a 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
Signed-off-by: Zhenhua Luo <zhenhua.luo@nxp.com>
Upstream-Status: Pending
---
opcodes/ppc-opc.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/opcodes/ppc-opc.c b/opcodes/ppc-opc.c
index 8106ab7..ca4b0f3 100644
--- a/opcodes/ppc-opc.c
+++ b/opcodes/ppc-opc.c
@@ -4811,7 +4811,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}},
-{"wait", X(31,30), XWC_MASK, POWER9, 0, {WC}},
{"lwepx", X(31,31), X_MASK, E500MC|PPCA2, 0, {RT, RA0, RB}},
@@ -4865,7 +4864,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}},
-{"wait", X(31,62), XWC_MASK, E500MC|PPCA2, 0, {WC}},
+{"wait", X(31,62), XWC_MASK, E500MC|PPCA2|POWER9, 0, {WC}},
{"dcbstep", XRT(31,63,0), XRT_MASK, E500MC|PPCA2, 0, {RA0, RB}},
--
2.9.0
@@ -1,106 +0,0 @@
From 27f155fd0ab4ba954366643dbfdc3c7104933794 Mon Sep 17 00:00:00 2001
From: Sandra Loosemore <sandra@codesourcery.com>
Date: Sun, 27 Dec 2015 12:30:26 -0800
Subject: [PATCH 14/14] Correct nios2 _gp address computation.
2015-12-27 Sandra Loosemore <sandra@codesourcery.com>
bfd/
* elf32-nios2.c (nios2_elf_assign_gp): Correct computation of _gp
address.
(nios2_elf32_relocate_section): Tidy code for R_NIOS2_GPREL error
messages.
Signed-off-by: Marek Vasut <marex@denx.de>
Upstream-Status: Backport
---
bfd/elf32-nios2.c | 31 +++++++++++++++++++++----------
1 file changed, 21 insertions(+), 10 deletions(-)
diff --git a/bfd/elf32-nios2.c b/bfd/elf32-nios2.c
index 1c54320..babecf3 100644
--- a/bfd/elf32-nios2.c
+++ b/bfd/elf32-nios2.c
@@ -3086,7 +3086,15 @@ lookup:
case bfd_link_hash_defined:
case bfd_link_hash_defweak:
gp_found = TRUE;
- *pgp = lh->u.def.value;
+ {
+ asection *sym_sec = lh->u.def.section;
+ bfd_vma sym_value = lh->u.def.value;
+
+ if (sym_sec->output_section)
+ sym_value = (sym_value + sym_sec->output_offset
+ + sym_sec->output_section->vma);
+ *pgp = sym_value;
+ }
break;
case bfd_link_hash_indirect:
case bfd_link_hash_warning:
@@ -3719,7 +3727,6 @@ nios2_elf32_relocate_section (bfd *output_bfd,
struct elf32_nios2_link_hash_entry *eh;
bfd_vma relocation;
bfd_vma gp;
- bfd_vma reloc_address;
bfd_reloc_status_type r = bfd_reloc_ok;
const char *name = NULL;
int r_type;
@@ -3762,12 +3769,6 @@ nios2_elf32_relocate_section (bfd *output_bfd,
if (bfd_link_relocatable (info))
continue;
- if (sec && sec->output_section)
- reloc_address = (sec->output_section->vma + sec->output_offset
- + rel->r_offset);
- else
- reloc_address = 0;
-
if (howto)
{
switch (howto->type)
@@ -3816,6 +3817,15 @@ nios2_elf32_relocate_section (bfd *output_bfd,
/* Turns an absolute address into a gp-relative address. */
if (!nios2_elf_assign_gp (output_bfd, &gp, info))
{
+ bfd_vma reloc_address;
+
+ if (sec && sec->output_section)
+ reloc_address = (sec->output_section->vma
+ + sec->output_offset
+ + rel->r_offset);
+ else
+ reloc_address = 0;
+
format = _("global pointer relative relocation at address "
"0x%08x when _gp not defined\n");
sprintf (msgbuf, format, reloc_address);
@@ -3825,7 +3835,7 @@ nios2_elf32_relocate_section (bfd *output_bfd,
else
{
bfd_vma symbol_address = rel->r_addend + relocation;
- relocation = relocation + rel->r_addend - gp;
+ relocation = symbol_address - gp;
rel->r_addend = 0;
if (((signed) relocation < -32768
|| (signed) relocation > 32767)
@@ -3833,6 +3843,8 @@ nios2_elf32_relocate_section (bfd *output_bfd,
|| h->root.type == bfd_link_hash_defined
|| h->root.type == bfd_link_hash_defweak))
{
+ if (h)
+ name = h->root.root.string;
format = _("Unable to reach %s (at 0x%08x) from the "
"global pointer (at 0x%08x) because the "
"offset (%d) is out of the allowed range, "
@@ -3848,7 +3860,6 @@ nios2_elf32_relocate_section (bfd *output_bfd,
rel->r_offset, relocation,
rel->r_addend);
}
-
break;
case R_NIOS2_UJMP:
r = nios2_elf32_do_ujmp_relocate (input_bfd, howto,
--
2.7.1
@@ -1,36 +0,0 @@
From 78decbeb84fb60db4e549ad3e8eb34e030e96d39 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
Signed-off-by: Zhenhua Luo <zhenhua.luo@nxp.com>
Upstream-Status: Pending
---
opcodes/ppc-opc.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/opcodes/ppc-opc.c b/opcodes/ppc-opc.c
index e8c92f6..a9de474 100644
--- a/opcodes/ppc-opc.c
+++ b/opcodes/ppc-opc.c
@@ -4777,7 +4777,6 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{"ldepx", X(31,29), X_MASK, E500MC|PPCA2|PPCVLE, PPCNONE, {RT, RA0, RB}},
{"waitasec", X(31,30), XRTRARB_MASK,POWER8, POWER9, {0}},
-{"wait", X(31,30), XWC_MASK, POWER9, PPCNONE, {WC}},
{"lwepx", X(31,31), X_MASK, E500MC|PPCA2|PPCVLE, PPCNONE, {RT, RA0, RB}},
@@ -4831,7 +4830,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{"waitrsv", X(31,62)|(1<<21), 0xffffffff, E500MC|PPCA2, PPCNONE, {0}},
{"waitimpl", X(31,62)|(2<<21), 0xffffffff, E500MC|PPCA2, PPCNONE, {0}},
-{"wait", X(31,62), XWC_MASK, E500MC|PPCA2|PPCVLE, PPCNONE, {WC}},
+{"wait", X(31,62), XWC_MASK, E500MC|PPCA2|PPCVLE|POWER9, PPCNONE, {WC}},
{"dcbstep", XRT(31,63,0), XRT_MASK, E500MC|PPCA2|PPCVLE, PPCNONE, {RA0, RB}},
--
2.5.0
@@ -1,177 +0,0 @@
Building WebKit on an aarch64 host will fail:
gold/ld-new: internal error in relocate_tls, at ../../binutils/gold/aarch64.cc:7418
This was a binutils bug, so backport the fix.
https://sourceware.org/bugzilla/show_bug.cgi?id=19353
Upstream-Status: Backport
Signed-off-by: Ross Burton <ross.burton@intel.com>
From d21f123b0ead1806416cf0dafae12bec4cca8920 Mon Sep 17 00:00:00 2001
From: Cary Coutant <ccoutant@gmail.com>
Date: Mon, 11 Jan 2016 23:57:44 -0800
Subject: [PATCH] Fix internal error when applying TLSDESC relocations with no TLS segment.
gold/
PR gold/19353
* aarch64.cc (Target_aarch64::relocate_tls): Don't insist that
we have a TLS segment for GD-to-IE optimization.
* i386.cc (Target_i386::tls_gd_to_ie): Remove tls_segment parameter.
Adjust all calls.
(Target_i386::tls_desc_gd_to_ie): Likewise.
(Target_i386::relocate_tls): Don't insist that we have a TLS segment
for TLSDESC GD-to-IE optimizations.
* x86_64.cc (Target_x86_64::tls_gd_to_ie): Remove tls_segment parameter.
Adjust all calls.
(Target_x86_64::tls_desc_gd_to_ie): Likewise.
(Target_x86_64::relocate_tls): Don't insist that we have a TLS segment
for TLSDESC GD-to-IE optimizations.
---
gold/ChangeLog | 16 ++++++++++++++++
gold/aarch64.cc | 6 ------
gold/i386.cc | 14 ++------------
gold/x86_64.cc | 14 ++------------
4 files changed, 20 insertions(+), 30 deletions(-)
diff --git a/gold/aarch64.cc b/gold/aarch64.cc
index 20f2f4f..5ad061b 100644
--- a/gold/aarch64.cc
+++ b/gold/aarch64.cc
@@ -7422,12 +7422,6 @@ Target_aarch64<size, big_endian>::Relocate::relocate_tls(
}
if (tlsopt == tls::TLSOPT_TO_IE)
{
- if (tls_segment == NULL)
- {
- gold_assert(parameters->errors()->error_count() > 0
- || issue_undefined_symbol_error(gsym));
- return aarch64_reloc_funcs::STATUS_BAD_RELOC;
- }
return tls_desc_gd_to_ie(relinfo, target, rela, r_type,
view, psymval, got_entry_address,
address);
diff --git a/gold/i386.cc b/gold/i386.cc
index 82886d4..a7168a8 100644
--- a/gold/i386.cc
+++ b/gold/i386.cc
@@ -668,7 +668,6 @@ class Target_i386 : public Sized_target<32, false>
// Do a TLS General-Dynamic to Initial-Exec transition.
inline void
tls_gd_to_ie(const Relocate_info<32, false>*, size_t relnum,
- Output_segment* tls_segment,
const elfcpp::Rel<32, false>&, unsigned int r_type,
elfcpp::Elf_types<32>::Elf_Addr value,
unsigned char* view,
@@ -687,7 +686,6 @@ class Target_i386 : public Sized_target<32, false>
// transition.
inline void
tls_desc_gd_to_ie(const Relocate_info<32, false>*, size_t relnum,
- Output_segment* tls_segment,
const elfcpp::Rel<32, false>&, unsigned int r_type,
elfcpp::Elf_types<32>::Elf_Addr value,
unsigned char* view,
@@ -3054,7 +3052,7 @@ Target_i386::Relocate::relocate_tls(const Relocate_info<32, false>* relinfo,
}
if (optimized_type == tls::TLSOPT_TO_IE)
{
- this->tls_gd_to_ie(relinfo, relnum, tls_segment, rel, r_type,
+ this->tls_gd_to_ie(relinfo, relnum, rel, r_type,
got_offset, view, view_size);
break;
}
@@ -3116,13 +3114,7 @@ Target_i386::Relocate::relocate_tls(const Relocate_info<32, false>* relinfo,
}
if (optimized_type == tls::TLSOPT_TO_IE)
{
- if (tls_segment == NULL)
- {
- gold_assert(parameters->errors()->error_count() > 0
- || issue_undefined_symbol_error(gsym));
- return;
- }
- this->tls_desc_gd_to_ie(relinfo, relnum, tls_segment, rel, r_type,
+ this->tls_desc_gd_to_ie(relinfo, relnum, rel, r_type,
got_offset, view, view_size);
break;
}
@@ -3354,7 +3346,6 @@ Target_i386::Relocate::tls_gd_to_le(const Relocate_info<32, false>* relinfo,
inline void
Target_i386::Relocate::tls_gd_to_ie(const Relocate_info<32, false>* relinfo,
size_t relnum,
- Output_segment*,
const elfcpp::Rel<32, false>& rel,
unsigned int,
elfcpp::Elf_types<32>::Elf_Addr value,
@@ -3449,7 +3440,6 @@ inline void
Target_i386::Relocate::tls_desc_gd_to_ie(
const Relocate_info<32, false>* relinfo,
size_t relnum,
- Output_segment*,
const elfcpp::Rel<32, false>& rel,
unsigned int r_type,
elfcpp::Elf_types<32>::Elf_Addr value,
diff --git a/gold/x86_64.cc b/gold/x86_64.cc
index 3cfc064..4ad5afc 100644
--- a/gold/x86_64.cc
+++ b/gold/x86_64.cc
@@ -816,7 +816,6 @@ class Target_x86_64 : public Sized_target<size, false>
// Do a TLS General-Dynamic to Initial-Exec transition.
inline void
tls_gd_to_ie(const Relocate_info<size, false>*, size_t relnum,
- Output_segment* tls_segment,
const elfcpp::Rela<size, false>&, unsigned int r_type,
typename elfcpp::Elf_types<size>::Elf_Addr value,
unsigned char* view,
@@ -835,7 +834,6 @@ class Target_x86_64 : public Sized_target<size, false>
// Do a TLSDESC-style General-Dynamic to Initial-Exec transition.
inline void
tls_desc_gd_to_ie(const Relocate_info<size, false>*, size_t relnum,
- Output_segment* tls_segment,
const elfcpp::Rela<size, false>&, unsigned int r_type,
typename elfcpp::Elf_types<size>::Elf_Addr value,
unsigned char* view,
@@ -3733,7 +3731,7 @@ Target_x86_64<size>::Relocate::relocate_tls(
if (optimized_type == tls::TLSOPT_TO_IE)
{
value = target->got_plt_section()->address() + got_offset;
- this->tls_gd_to_ie(relinfo, relnum, tls_segment, rela, r_type,
+ this->tls_gd_to_ie(relinfo, relnum, rela, r_type,
value, view, address, view_size);
break;
}
@@ -3800,14 +3798,8 @@ Target_x86_64<size>::Relocate::relocate_tls(
}
if (optimized_type == tls::TLSOPT_TO_IE)
{
- if (tls_segment == NULL)
- {
- gold_assert(parameters->errors()->error_count() > 0
- || issue_undefined_symbol_error(gsym));
- return;
- }
value = target->got_plt_section()->address() + got_offset;
- this->tls_desc_gd_to_ie(relinfo, relnum, tls_segment,
+ this->tls_desc_gd_to_ie(relinfo, relnum,
rela, r_type, value, view, address,
view_size);
break;
@@ -3973,7 +3965,6 @@ inline void
Target_x86_64<size>::Relocate::tls_gd_to_ie(
const Relocate_info<size, false>* relinfo,
size_t relnum,
- Output_segment*,
const elfcpp::Rela<size, false>& rela,
unsigned int,
typename elfcpp::Elf_types<size>::Elf_Addr value,
@@ -4085,7 +4076,6 @@ inline void
Target_x86_64<size>::Relocate::tls_desc_gd_to_ie(
const Relocate_info<size, false>* relinfo,
size_t relnum,
- Output_segment*,
const elfcpp::Rela<size, false>& rela,
unsigned int r_type,
typename elfcpp::Elf_types<size>::Elf_Addr value,
--
1.7.1
@@ -45,3 +45,4 @@ do_install_ptest() {
} }
BBCLASSEXTEND = "native" BBCLASSEXTEND = "native"
TOOLCHAIN = "gcc"