mirror of
https://git.yoctoproject.org/poky
synced 2026-04-22 15:32:14 +02:00
binutils: Upgrade to 2.36 release
Drop backported patches which are already present in 2.36 release (From OE-Core rev: 897afa95ba340f1124decac5753e1d1e1283b515) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -18,7 +18,7 @@ PREFERRED_PROVIDER_virtual/gettext ??= "gettext"
|
||||
|
||||
GCCVERSION ?= "10.%"
|
||||
SDKGCCVERSION ?= "${GCCVERSION}"
|
||||
BINUVERSION ?= "2.35%"
|
||||
BINUVERSION ?= "2.36%"
|
||||
GDBVERSION ?= "10.%"
|
||||
GLIBCVERSION ?= "2.32"
|
||||
LINUXLIBCVERSION ?= "5.10%"
|
||||
|
||||
@@ -14,17 +14,17 @@ def binutils_branch_version(d):
|
||||
pvsplit = d.getVar('PV').split('.')
|
||||
return pvsplit[0] + "_" + pvsplit[1]
|
||||
|
||||
# When upgrading to 2.35, please make sure there is no trailing .0, so
|
||||
# When upgrading to 2.37, please make sure there is no trailing .0, so
|
||||
# that upstream version check can work correctly.
|
||||
PV = "2.35.1"
|
||||
CVE_VERSION = "2.35.1"
|
||||
PV = "2.36"
|
||||
CVE_VERSION = "2.36"
|
||||
BINUPV = "${@binutils_branch_version(d)}"
|
||||
#BRANCH = "binutils-${BINUPV}-branch"
|
||||
BRANCH ?= "binutils-2_35-branch"
|
||||
BRANCH ?= "binutils-2_36-branch"
|
||||
|
||||
UPSTREAM_CHECK_GITTAGREGEX = "binutils-(?P<pver>\d+_(\d_?)*)"
|
||||
|
||||
SRCREV ?= "7e46a74aa3713c563940960e361e08defda019c2"
|
||||
SRCREV ?= "fe0e833171513c1d89668bc5f454192d2db39bce"
|
||||
BINUTILS_GIT_URI ?= "git://sourceware.org/git/binutils-gdb.git;branch=${BRANCH};protocol=git"
|
||||
SRC_URI = "\
|
||||
${BINUTILS_GIT_URI} \
|
||||
@@ -41,8 +41,5 @@ SRC_URI = "\
|
||||
file://0014-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch \
|
||||
file://0015-sync-with-OE-libtool-changes.patch \
|
||||
file://0016-Check-for-clang-before-checking-gcc-version.patch \
|
||||
file://0017-gas-improve-reproducibility-for-stabs-debugging-data.patch \
|
||||
file://0001-aarch64-Return-an-error-on-conditional-branch-to-an-.patch \
|
||||
file://CVE-2020-35448.patch \
|
||||
"
|
||||
S = "${WORKDIR}/git"
|
||||
@@ -1,135 +0,0 @@
|
||||
From c7cd291722779c9d4703ed0010388fe394c644c8 Mon Sep 17 00:00:00 2001
|
||||
From: Siddhesh Poyarekar <siddesh.poyarekar@arm.com>
|
||||
Date: Tue, 1 Sep 2020 14:25:52 +0530
|
||||
Subject: [PATCH] aarch64: Return an error on conditional branch to an undefined symbol
|
||||
|
||||
The fix in 7e05773767820b441b23a16628b55c98cb1aef46 introduced a PLT
|
||||
for conditional jumps when the target symbol is undefined. This is
|
||||
incorrect because conditional branch relocations are not allowed to
|
||||
clobber IP0/IP1 and hence, should not result in a dynamic relocation.
|
||||
|
||||
Revert that change and in its place, issue an error when the target
|
||||
symbol is undefined.
|
||||
|
||||
bfd/
|
||||
|
||||
2020-09-10 Siddhesh Poyarekar <siddesh.poyarekar@arm.com>
|
||||
|
||||
* elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Revert
|
||||
changes in 7e05773767820b441b23a16628b55c98cb1aef46. Set
|
||||
error for undefined symbol in BFD_RELOC_AARCH64_BRANCH19 and
|
||||
BFD_RELOC_AARCH64_TSTBR14 relocations.
|
||||
|
||||
ld/
|
||||
|
||||
2020-09-10 Siddhesh Poyarekar <siddesh.poyarekar@arm.com>
|
||||
|
||||
* testsuite/ld-aarch64/emit-relocs-560.d: Expect error instead
|
||||
of valid output.
|
||||
---
|
||||
Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=c7cd291722779c9d4703ed0010388fe394c644c8]
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
|
||||
bfd/ChangeLog | 7 +++++
|
||||
bfd/elfnn-aarch64.c | 37 ++++++++++++-----------
|
||||
ld/ChangeLog | 5 +++
|
||||
ld/testsuite/ld-aarch64/emit-relocs-560.d | 7 +----
|
||||
4 files changed, 32 insertions(+), 24 deletions(-)
|
||||
|
||||
diff --git a/bfd/elfnn-aarch64.c b/bfd/elfnn-aarch64.c
|
||||
index 5b4c189b593..a9924e7ec56 100644
|
||||
--- a/bfd/elfnn-aarch64.c
|
||||
+++ b/bfd/elfnn-aarch64.c
|
||||
@@ -5447,7 +5447,6 @@ elfNN_aarch64_final_link_relocate (reloc_howto_type *howto,
|
||||
bfd_vma orig_value = value;
|
||||
bfd_boolean resolved_to_zero;
|
||||
bfd_boolean abs_symbol_p;
|
||||
- bfd_boolean via_plt_p;
|
||||
|
||||
globals = elf_aarch64_hash_table (info);
|
||||
|
||||
@@ -5469,8 +5468,6 @@ elfNN_aarch64_final_link_relocate (reloc_howto_type *howto,
|
||||
: bfd_is_und_section (sym_sec));
|
||||
abs_symbol_p = h != NULL && bfd_is_abs_symbol (&h->root);
|
||||
|
||||
- via_plt_p = (globals->root.splt != NULL && h != NULL
|
||||
- && h->plt.offset != (bfd_vma) - 1);
|
||||
|
||||
/* Since STT_GNU_IFUNC symbol must go through PLT, we handle
|
||||
it here if it is defined in a non-shared object. */
|
||||
@@ -5806,23 +5803,12 @@ elfNN_aarch64_final_link_relocate (reloc_howto_type *howto,
|
||||
value += signed_addend;
|
||||
break;
|
||||
|
||||
- case BFD_RELOC_AARCH64_BRANCH19:
|
||||
- case BFD_RELOC_AARCH64_TSTBR14:
|
||||
- /* A conditional branch to an undefined weak symbol is converted to a
|
||||
- branch to itself. */
|
||||
- if (weak_undef_p && !via_plt_p)
|
||||
- {
|
||||
- value = _bfd_aarch64_elf_resolve_relocation (input_bfd, bfd_r_type,
|
||||
- place, value,
|
||||
- signed_addend,
|
||||
- weak_undef_p);
|
||||
- break;
|
||||
- }
|
||||
- /* Fall through. */
|
||||
case BFD_RELOC_AARCH64_CALL26:
|
||||
case BFD_RELOC_AARCH64_JUMP26:
|
||||
{
|
||||
asection *splt = globals->root.splt;
|
||||
+ bfd_boolean via_plt_p =
|
||||
+ splt != NULL && h != NULL && h->plt.offset != (bfd_vma) - 1;
|
||||
|
||||
/* A call to an undefined weak symbol is converted to a jump to
|
||||
the next instruction unless a PLT entry will be created.
|
||||
@@ -5903,6 +5889,23 @@ elfNN_aarch64_final_link_relocate (reloc_howto_type *howto,
|
||||
bfd_set_error (bfd_error_bad_value);
|
||||
return bfd_reloc_notsupported;
|
||||
}
|
||||
+ value = _bfd_aarch64_elf_resolve_relocation (input_bfd, bfd_r_type,
|
||||
+ place, value,
|
||||
+ signed_addend,
|
||||
+ weak_undef_p);
|
||||
+ break;
|
||||
+
|
||||
+ case BFD_RELOC_AARCH64_BRANCH19:
|
||||
+ case BFD_RELOC_AARCH64_TSTBR14:
|
||||
+ if (h && h->root.type == bfd_link_hash_undefined)
|
||||
+ {
|
||||
+ _bfd_error_handler
|
||||
+ /* xgettext:c-format */
|
||||
+ (_("%pB: conditional branch to undefined symbol `%s' "
|
||||
+ "not allowed"), input_bfd, h->root.root.string);
|
||||
+ bfd_set_error (bfd_error_bad_value);
|
||||
+ return bfd_reloc_notsupported;
|
||||
+ }
|
||||
/* Fall through. */
|
||||
|
||||
case BFD_RELOC_AARCH64_16:
|
||||
@@ -7968,8 +7971,6 @@ elfNN_aarch64_check_relocs (bfd *abfd, struct bfd_link_info *info,
|
||||
break;
|
||||
}
|
||||
|
||||
- case BFD_RELOC_AARCH64_BRANCH19:
|
||||
- case BFD_RELOC_AARCH64_TSTBR14:
|
||||
case BFD_RELOC_AARCH64_CALL26:
|
||||
case BFD_RELOC_AARCH64_JUMP26:
|
||||
/* If this is a local symbol then we resolve it
|
||||
diff --git a/ld/testsuite/ld-aarch64/emit-relocs-560.d b/ld/testsuite/ld-aarch64/emit-relocs-560.d
|
||||
index 153532457b4..8751b743bd4 100644
|
||||
--- a/ld/testsuite/ld-aarch64/emit-relocs-560.d
|
||||
+++ b/ld/testsuite/ld-aarch64/emit-relocs-560.d
|
||||
@@ -1,8 +1,3 @@
|
||||
#source: emit-relocs-560.s
|
||||
#ld: -shared
|
||||
-#readelf: -r
|
||||
-
|
||||
-Relocation section '.rela.plt' at offset 0x[0-9a-f]+ contains 2 entries:
|
||||
- Offset Info Type Sym. Value Sym. Name \+ Addend
|
||||
-[0-9a-f]+ 000100000402 R_AARCH64_JUMP_SL 0000000000000000 baz \+ 0
|
||||
-[0-9a-f]+ 000200000402 R_AARCH64_JUMP_SL 0000000000000000 bar \+ 0
|
||||
+#error: .*: conditional branch to undefined symbol `bar' not allowed
|
||||
--
|
||||
2.29.2
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From a0b23b160d6cfa7be4437c6e623633d76395f2ad Mon Sep 17 00:00:00 2001
|
||||
From 3b278a56a0e98d50ec62735598ee5f4b1834e8b3 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/16] binutils-crosssdk: Generate relocatable SDKs
|
||||
Subject: [PATCH] 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
|
||||
@@ -21,10 +21,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
3 files changed, 6 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/gold/layout.cc b/gold/layout.cc
|
||||
index 13e533aaf21..b0afff16e2e 100644
|
||||
index a27cb071c75..32b52890b39 100644
|
||||
--- a/gold/layout.cc
|
||||
+++ b/gold/layout.cc
|
||||
@@ -5019,7 +5019,7 @@ Layout::create_interp(const Target* target)
|
||||
@@ -5032,7 +5032,7 @@ Layout::create_interp(const Target* target)
|
||||
gold_assert(interp != NULL);
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ index 13e533aaf21..b0afff16e2e 100644
|
||||
Output_section_data* odata = new Output_data_const(interp, len, 1);
|
||||
|
||||
diff --git a/ld/genscripts.sh b/ld/genscripts.sh
|
||||
index 03392d265c7..435689ea144 100755
|
||||
index 088417ef2d5..46a2db7005c 100755
|
||||
--- a/ld/genscripts.sh
|
||||
+++ b/ld/genscripts.sh
|
||||
@@ -304,6 +304,7 @@ DATA_ALIGNMENT_u="${DATA_ALIGNMENT_u-${DATA_ALIGNMENT_r}}"
|
||||
@@ -59,10 +59,10 @@ index 03392d265c7..435689ea144 100755
|
||||
DATA_ALIGNMENT=${DATA_ALIGNMENT_}
|
||||
RELOCATING=" "
|
||||
diff --git a/ld/scripttempl/elf.sc b/ld/scripttempl/elf.sc
|
||||
index eb74743e5c3..c9a8a47615f 100644
|
||||
index 29a8f0781d5..75e46f4adaf 100644
|
||||
--- a/ld/scripttempl/elf.sc
|
||||
+++ b/ld/scripttempl/elf.sc
|
||||
@@ -143,8 +143,8 @@ if test -z "$DATA_SEGMENT_ALIGN"; then
|
||||
@@ -147,8 +147,8 @@ if test -z "$DATA_SEGMENT_ALIGN"; then
|
||||
DATA_SEGMENT_RELRO_END=". = DATA_SEGMENT_RELRO_END (${SEPARATE_GOTPLT-0}, .);"
|
||||
fi
|
||||
fi
|
||||
@@ -73,6 +73,3 @@ index eb74743e5c3..c9a8a47615f 100644
|
||||
fi
|
||||
if test -z "$PLT"; then
|
||||
IPLT=".iplt ${RELOCATING-0} : { *(.iplt) }"
|
||||
--
|
||||
2.28.0
|
||||
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
From 0d14f8f333a9b519202246ce779f3e380491826c Mon Sep 17 00:00:00 2001
|
||||
From cf4c8a97b7dc1fe36a7d5dabed417fe18b15ad6b 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/17] binutils-cross: Do not generate linker script
|
||||
directories
|
||||
Subject: [PATCH] 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
|
||||
@@ -23,7 +22,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
1 file changed, 25 deletions(-)
|
||||
|
||||
diff --git a/ld/genscripts.sh b/ld/genscripts.sh
|
||||
index 435689ea144..cff8a1467f9 100755
|
||||
index 46a2db7005c..4bb7c33f560 100755
|
||||
--- a/ld/genscripts.sh
|
||||
+++ b/ld/genscripts.sh
|
||||
@@ -235,31 +235,6 @@ append_to_lib_path()
|
||||
@@ -58,6 +57,3 @@ index 435689ea144..cff8a1467f9 100755
|
||||
if [ "x${LIB_PATH}" = "x" ] && [ "x${USE_LIBPATH}" = xyes ] ; then
|
||||
libs=${NATIVE_LIB_DIRS}
|
||||
if [ "x${NATIVE}" = "xyes" ] ; then
|
||||
--
|
||||
2.28.0
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
From 3bbec749ec9fe681ade6812c48c541a752fcffd5 Mon Sep 17 00:00:00 2001
|
||||
From 9701cab0fdf6a0c011978ae140c4c12a962956f6 Mon Sep 17 00:00:00 2001
|
||||
From: Richard Purdie <richard.purdie@linuxfoundation.org>
|
||||
Date: Wed, 19 Feb 2020 09:51:16 -0800
|
||||
Subject: [PATCH 03/17] binutils-nativesdk: Search for alternative ld.so.conf
|
||||
in SDK installation
|
||||
Subject: [PATCH] binutils-nativesdk: Search for alternative ld.so.conf in SDK
|
||||
installation
|
||||
|
||||
We need binutils to look at our ld.so.conf file within the SDK to ensure
|
||||
we search the SDK's libdirs as well as those from the host system.
|
||||
@@ -29,7 +29,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
5 files changed, 7 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/ld/Makefile.am b/ld/Makefile.am
|
||||
index 02c4fc16395..a5762227f0a 100644
|
||||
index 2c9a487335c..3b01357b651 100644
|
||||
--- a/ld/Makefile.am
|
||||
+++ b/ld/Makefile.am
|
||||
@@ -42,7 +42,8 @@ ZLIBINC = @zlibinc@
|
||||
@@ -43,10 +43,10 @@ index 02c4fc16395..a5762227f0a 100644
|
||||
NO_WERROR = @NO_WERROR@
|
||||
AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS)
|
||||
diff --git a/ld/Makefile.in b/ld/Makefile.in
|
||||
index 2fe12e14f63..8f0c83ac8d2 100644
|
||||
index b41941c89e2..a6382bf2a45 100644
|
||||
--- a/ld/Makefile.in
|
||||
+++ b/ld/Makefile.in
|
||||
@@ -548,7 +548,8 @@ ZLIB = @zlibdir@ -lz
|
||||
@@ -554,7 +554,8 @@ ZLIB = @zlibdir@ -lz
|
||||
ZLIBINC = @zlibinc@
|
||||
ELF_CLFAGS = -DELF_LIST_OPTIONS=@elf_list_options@ \
|
||||
-DELF_SHLIB_LIST_OPTIONS=@elf_shlib_list_options@ \
|
||||
@@ -57,7 +57,7 @@ index 2fe12e14f63..8f0c83ac8d2 100644
|
||||
AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS)
|
||||
|
||||
diff --git a/ld/ldelf.c b/ld/ldelf.c
|
||||
index bada3ade2d7..b4784009d7a 100644
|
||||
index f7407ab55a7..b25781cc0c4 100644
|
||||
--- a/ld/ldelf.c
|
||||
+++ b/ld/ldelf.c
|
||||
@@ -911,7 +911,7 @@ ldelf_check_ld_so_conf (const struct bfd_link_needed_list *l, int force,
|
||||
@@ -70,7 +70,7 @@ index bada3ade2d7..b4784009d7a 100644
|
||||
if (!ldelf_parse_ld_so_conf (&info, tmppath))
|
||||
{
|
||||
diff --git a/ld/ldmain.c b/ld/ldmain.c
|
||||
index 08be9030cb5..f5c5a336320 100644
|
||||
index 863df0293ea..080b1c4c6c2 100644
|
||||
--- a/ld/ldmain.c
|
||||
+++ b/ld/ldmain.c
|
||||
@@ -70,6 +70,7 @@ char *program_name;
|
||||
@@ -82,7 +82,7 @@ index 08be9030cb5..f5c5a336320 100644
|
||||
/* The canonical representation of ld_sysroot. */
|
||||
char *ld_canon_sysroot;
|
||||
diff --git a/ld/ldmain.h b/ld/ldmain.h
|
||||
index ac7db5720d5..1cbe1771912 100644
|
||||
index 38e63922d31..0966914938c 100644
|
||||
--- a/ld/ldmain.h
|
||||
+++ b/ld/ldmain.h
|
||||
@@ -23,6 +23,7 @@
|
||||
@@ -93,6 +93,3 @@ index ac7db5720d5..1cbe1771912 100644
|
||||
extern char *ld_canon_sysroot;
|
||||
extern int ld_canon_sysroot_len;
|
||||
extern FILE *saved_script_handle;
|
||||
--
|
||||
2.28.0
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 361c2c313196c095d12d17cecf0a069107dd629b Mon Sep 17 00:00:00 2001
|
||||
From 7e7512c82402363688cca6f1febea2c01cb03409 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 04/17] configure: widen the regexp for SH architectures
|
||||
Subject: [PATCH] configure: widen the regexp for SH architectures
|
||||
|
||||
gprof needs to know about uclibc
|
||||
|
||||
@@ -14,10 +14,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index 54d0339ab9e..6782f8b6ab8 100755
|
||||
index 68779feb42b..7b369071141 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -3937,7 +3937,7 @@ case "${target}" in
|
||||
@@ -3887,7 +3887,7 @@ case "${target}" in
|
||||
nvptx*-*-*)
|
||||
noconfigdirs="$noconfigdirs target-libssp target-libstdc++-v3 target-libobjc"
|
||||
;;
|
||||
@@ -27,10 +27,10 @@ index 54d0339ab9e..6782f8b6ab8 100755
|
||||
sh*-*-elf)
|
||||
;;
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index a910c4fd6ba..55beb1dea46 100644
|
||||
index d16a2757689..92f01fb3ed7 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -1178,7 +1178,7 @@ case "${target}" in
|
||||
@@ -1177,7 +1177,7 @@ case "${target}" in
|
||||
nvptx*-*-*)
|
||||
noconfigdirs="$noconfigdirs target-libssp target-libstdc++-v3 target-libobjc"
|
||||
;;
|
||||
@@ -39,6 +39,3 @@ index a910c4fd6ba..55beb1dea46 100644
|
||||
case "${target}" in
|
||||
sh*-*-elf)
|
||||
;;
|
||||
--
|
||||
2.28.0
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 39b478b7e52fb1b892a392f3c3750b9023cfabc8 Mon Sep 17 00:00:00 2001
|
||||
From 6a67d277941228d997b527990960413f8444fb81 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 05/17] Point scripts location to libdir
|
||||
Subject: [PATCH] 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 a5762227f0a..e1c665898f3 100644
|
||||
index 3b01357b651..b7a1f7491b0 100644
|
||||
--- a/ld/Makefile.am
|
||||
+++ b/ld/Makefile.am
|
||||
@@ -51,7 +51,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS)
|
||||
@@ -25,10 +25,10 @@ index a5762227f0a..e1c665898f3 100644
|
||||
EMUL = @EMUL@
|
||||
EMULATION_OFILES = @EMULATION_OFILES@
|
||||
diff --git a/ld/Makefile.in b/ld/Makefile.in
|
||||
index 8f0c83ac8d2..acc24ec4130 100644
|
||||
index a6382bf2a45..5ee3a4971be 100644
|
||||
--- a/ld/Makefile.in
|
||||
+++ b/ld/Makefile.in
|
||||
@@ -556,7 +556,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS)
|
||||
@@ -562,7 +562,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.
|
||||
@@ -37,6 +37,3 @@ index 8f0c83ac8d2..acc24ec4130 100644
|
||||
BASEDIR = $(srcdir)/..
|
||||
BFDDIR = $(BASEDIR)/bfd
|
||||
INCDIR = $(BASEDIR)/include
|
||||
--
|
||||
2.28.0
|
||||
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
From 59640ddf11104a604ccf7c078a48359d711c2f9c Mon Sep 17 00:00:00 2001
|
||||
From 8ad249270414a23a3e65c74fd67a8e4adaebec78 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 06/17] Only generate an RPATH entry if LD_RUN_PATH is not
|
||||
empty
|
||||
Subject: [PATCH] Only generate an RPATH entry if LD_RUN_PATH is not empty
|
||||
|
||||
for cases where -rpath isn't specified. debian (#151024)
|
||||
|
||||
@@ -15,10 +14,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/ld/ldelf.c b/ld/ldelf.c
|
||||
index b4784009d7a..541772f4604 100644
|
||||
index b25781cc0c4..77d7fb8ff03 100644
|
||||
--- a/ld/ldelf.c
|
||||
+++ b/ld/ldelf.c
|
||||
@@ -1247,6 +1247,8 @@ ldelf_after_open (int use_libpath, int native, int is_linux, int is_freebsd,
|
||||
@@ -1248,6 +1248,8 @@ ldelf_after_open (int use_libpath, int native, int is_linux, int is_freebsd,
|
||||
&& command_line.rpath == NULL)
|
||||
{
|
||||
path = (const char *) getenv ("LD_RUN_PATH");
|
||||
@@ -27,7 +26,7 @@ index b4784009d7a..541772f4604 100644
|
||||
if (path
|
||||
&& ldelf_search_needed (path, &n, force,
|
||||
is_linux, elfsize))
|
||||
@@ -1605,6 +1607,8 @@ ldelf_before_allocation (char *audit, char *depaudit,
|
||||
@@ -1608,6 +1610,8 @@ ldelf_before_allocation (char *audit, char *depaudit,
|
||||
rpath = command_line.rpath;
|
||||
if (rpath == NULL)
|
||||
rpath = (const char *) getenv ("LD_RUN_PATH");
|
||||
@@ -36,6 +35,3 @@ index b4784009d7a..541772f4604 100644
|
||||
|
||||
for (abfd = link_info.input_bfds; abfd; abfd = abfd->link.next)
|
||||
if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)
|
||||
--
|
||||
2.28.0
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
From 2b81508b9af76db292cd756432b03035cb8157e0 Mon Sep 17 00:00:00 2001
|
||||
From 091870218f192a5698c4420adf938e7178553c07 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 07/17] don't let the distro compiler point to the wrong
|
||||
installation location
|
||||
Subject: [PATCH] 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,7 +17,7 @@ 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 895f701bcd0..97a53f15bb6 100644
|
||||
index 788590957e1..1bca4aafeb7 100644
|
||||
--- a/libiberty/Makefile.in
|
||||
+++ b/libiberty/Makefile.in
|
||||
@@ -367,7 +367,8 @@ install-strip: install
|
||||
@@ -30,6 +30,3 @@ index 895f701bcd0..97a53f15bb6 100644
|
||||
install_to_libdir: all
|
||||
if test -n "${target_header_dir}"; then \
|
||||
${mkinstalldirs} $(DESTDIR)$(libdir)/$(MULTIOSDIR); \
|
||||
--
|
||||
2.28.0
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 413075afbdb16e7cc05511682ca9e3c880acb5a7 Mon Sep 17 00:00:00 2001
|
||||
From a1d0ca24d3bbdf4cb37537cd84d04a17bf0f813b 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 08/17] warn for uses of system directories when cross linking
|
||||
Subject: [PATCH] warn for uses of system directories when cross linking
|
||||
|
||||
2008-07-02 Joseph Myers <joseph@codesourcery.com>
|
||||
|
||||
@@ -57,13 +57,13 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
ld/ld.h | 8 ++++++++
|
||||
ld/ld.texi | 12 ++++++++++++
|
||||
ld/ldfile.c | 17 +++++++++++++++++
|
||||
ld/ldlex.h | 5 +++++
|
||||
ld/ldlex.h | 2 ++
|
||||
ld/ldmain.c | 2 ++
|
||||
ld/lexsup.c | 27 +++++++++++++++++++++++++++
|
||||
9 files changed, 100 insertions(+)
|
||||
ld/lexsup.c | 15 +++++++++++++++
|
||||
9 files changed, 85 insertions(+)
|
||||
|
||||
diff --git a/ld/config.in b/ld/config.in
|
||||
index f1712107367..308e0173c16 100644
|
||||
index 7b60d778587..37b8e9b6f6c 100644
|
||||
--- a/ld/config.in
|
||||
+++ b/ld/config.in
|
||||
@@ -40,6 +40,9 @@
|
||||
@@ -77,10 +77,10 @@ index f1712107367..308e0173c16 100644
|
||||
#undef EXTRA_SHLIB_EXTENSION
|
||||
|
||||
diff --git a/ld/configure b/ld/configure
|
||||
index f08ce9969ea..1c872c0db5f 100755
|
||||
index d399d08d0c4..8355c433c76 100755
|
||||
--- a/ld/configure
|
||||
+++ b/ld/configure
|
||||
@@ -826,6 +826,7 @@ with_lib_path
|
||||
@@ -828,6 +828,7 @@ with_lib_path
|
||||
enable_targets
|
||||
enable_64_bit_bfd
|
||||
with_sysroot
|
||||
@@ -88,7 +88,7 @@ index f08ce9969ea..1c872c0db5f 100755
|
||||
enable_gold
|
||||
enable_got
|
||||
enable_compressed_debug_sections
|
||||
@@ -1493,6 +1494,8 @@ Optional Features:
|
||||
@@ -1496,6 +1497,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 f08ce9969ea..1c872c0db5f 100755
|
||||
--enable-gold[=ARG] build gold [ARG={default,yes,no}]
|
||||
--enable-got=<type> GOT handling scheme (target, single, negative,
|
||||
multigot)
|
||||
@@ -15793,6 +15796,19 @@ fi
|
||||
@@ -15820,6 +15823,19 @@ fi
|
||||
|
||||
|
||||
|
||||
@@ -118,7 +118,7 @@ index f08ce9969ea..1c872c0db5f 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 5a4938afdb0..dbbbde74b04 100644
|
||||
index c9c69ab9245..59dab0a6ac4 100644
|
||||
--- a/ld/configure.ac
|
||||
+++ b/ld/configure.ac
|
||||
@@ -94,6 +94,16 @@ AC_SUBST(use_sysroot)
|
||||
@@ -139,7 +139,7 @@ index 5a4938afdb0..dbbbde74b04 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 1790dc81a66..73f832eb169 100644
|
||||
index 93f5af92c7d..ff7f71a7b66 100644
|
||||
--- a/ld/ld.h
|
||||
+++ b/ld/ld.h
|
||||
@@ -166,6 +166,14 @@ typedef struct
|
||||
@@ -158,10 +158,10 @@ index 1790dc81a66..73f832eb169 100644
|
||||
enum endian_enum endian;
|
||||
|
||||
diff --git a/ld/ld.texi b/ld/ld.texi
|
||||
index 2a93e9456ac..3eeb70607fd 100644
|
||||
index 7a602b9c6ab..cccbfbab3bb 100644
|
||||
--- a/ld/ld.texi
|
||||
+++ b/ld/ld.texi
|
||||
@@ -2655,6 +2655,18 @@ string identifying the original linked file does not change.
|
||||
@@ -2810,6 +2810,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 2a93e9456ac..3eeb70607fd 100644
|
||||
|
||||
@c man end
|
||||
diff --git a/ld/ldfile.c b/ld/ldfile.c
|
||||
index e39170b5d94..fadc248a140 100644
|
||||
index 81cb86d51e2..cd5c2752679 100644
|
||||
--- a/ld/ldfile.c
|
||||
+++ b/ld/ldfile.c
|
||||
@@ -117,6 +117,23 @@ ldfile_add_library_path (const char *name, bfd_boolean cmdline)
|
||||
@@ -209,26 +209,23 @@ index e39170b5d94..fadc248a140 100644
|
||||
|
||||
/* Try to open a BFD for a lang_input_statement. */
|
||||
diff --git a/ld/ldlex.h b/ld/ldlex.h
|
||||
index 5ea083ebeb3..941dc5f3dc8 100644
|
||||
index b0101028321..77f5accb5d9 100644
|
||||
--- a/ld/ldlex.h
|
||||
+++ b/ld/ldlex.h
|
||||
@@ -155,6 +155,11 @@ enum option_values
|
||||
OPTION_NON_CONTIGUOUS_REGIONS,
|
||||
OPTION_NON_CONTIGUOUS_REGIONS_WARNINGS,
|
||||
OPTION_DEPENDENCY_FILE,
|
||||
+ OPTION_CTF_VARIABLES,
|
||||
+ OPTION_NO_CTF_VARIABLES,
|
||||
+ OPTION_CTF_SHARE_TYPES,
|
||||
@@ -161,6 +161,8 @@ enum option_values
|
||||
OPTION_CTF_VARIABLES,
|
||||
OPTION_NO_CTF_VARIABLES,
|
||||
OPTION_CTF_SHARE_TYPES,
|
||||
+ OPTION_NO_POISON_SYSTEM_DIRECTORIES,
|
||||
+ OPTION_ERROR_POISON_SYSTEM_DIRECTORIES,
|
||||
};
|
||||
|
||||
/* The initial parser states. */
|
||||
diff --git a/ld/ldmain.c b/ld/ldmain.c
|
||||
index f5c5a336320..516ba0360e2 100644
|
||||
index 080b1c4c6c2..78d8a2df278 100644
|
||||
--- a/ld/ldmain.c
|
||||
+++ b/ld/ldmain.c
|
||||
@@ -322,6 +322,8 @@ main (int argc, char **argv)
|
||||
@@ -324,6 +324,8 @@ main (int argc, char **argv)
|
||||
command_line.warn_mismatch = TRUE;
|
||||
command_line.warn_search_mismatch = TRUE;
|
||||
command_line.check_section_addresses = -1;
|
||||
@@ -238,25 +235,13 @@ index f5c5a336320..516ba0360e2 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 58c6c078325..879e7bb7658 100644
|
||||
index f005a58a045..c83292a9427 100644
|
||||
--- a/ld/lexsup.c
|
||||
+++ b/ld/lexsup.c
|
||||
@@ -572,6 +572,26 @@ static const struct ld_option ld_options[] =
|
||||
{ {"no-print-map-discarded", no_argument, NULL, OPTION_NO_PRINT_MAP_DISCARDED},
|
||||
'\0', NULL, N_("Do not show discarded sections in map file output"),
|
||||
@@ -591,6 +591,14 @@ static const struct ld_option ld_options[] =
|
||||
" <method> is: share-unconflicted (default),\n"
|
||||
" share-duplicated"),
|
||||
TWO_DASHES },
|
||||
+ { {"ctf-variables", no_argument, NULL, OPTION_CTF_VARIABLES},
|
||||
+ '\0', NULL, N_("Emit names and types of static variables in CTF"),
|
||||
+ TWO_DASHES },
|
||||
+ { {"no-ctf-variables", no_argument, NULL, OPTION_NO_CTF_VARIABLES},
|
||||
+ '\0', NULL, N_("Do not emit names and types of static variables in CTF"),
|
||||
+ TWO_DASHES },
|
||||
+ { {"ctf-share-types=<method>", required_argument, NULL,
|
||||
+ OPTION_CTF_SHARE_TYPES},
|
||||
+ '\0', NULL, N_("How to share CTF types between translation units.\n"
|
||||
+ " <method> is: share-unconflicted (default),\n"
|
||||
+ " share-duplicated"),
|
||||
+ TWO_DASHES },
|
||||
+ { {"no-poison-system-directories", no_argument, NULL,
|
||||
+ OPTION_NO_POISON_SYSTEM_DIRECTORIES},
|
||||
+ '\0', NULL, N_("Do not warn for -L options using system directories"),
|
||||
@@ -268,7 +253,7 @@ index 58c6c078325..879e7bb7658 100644
|
||||
};
|
||||
|
||||
#define OPTION_COUNT ARRAY_SIZE (ld_options)
|
||||
@@ -1632,6 +1652,13 @@ parse_args (unsigned argc, char **argv)
|
||||
@@ -1674,6 +1682,13 @@ parse_args (unsigned argc, char **argv)
|
||||
|
||||
case OPTION_PRINT_MAP_DISCARDED:
|
||||
config.print_map_discarded = TRUE;
|
||||
@@ -282,6 +267,3 @@ index 58c6c078325..879e7bb7658 100644
|
||||
break;
|
||||
|
||||
case OPTION_DEPENDENCY_FILE:
|
||||
--
|
||||
2.28.0
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 13a67e9040c01abd284fe506471e0eab668ee3dc Mon Sep 17 00:00:00 2001
|
||||
From 5bd94030de598d3a13091dafaed3b956e0ab708f 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 09/17] Change default emulation for mips64*-*-linux
|
||||
Subject: [PATCH] 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 14523caf0c5..e5233cd1f7e 100644
|
||||
index e7b55b0dd78..2caf492e172 100644
|
||||
--- a/bfd/config.bfd
|
||||
+++ b/bfd/config.bfd
|
||||
@@ -894,12 +894,12 @@ case "${targ}" in
|
||||
@@ -896,12 +896,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,7 +35,7 @@ index 14523caf0c5..e5233cd1f7e 100644
|
||||
mips*el-*-linux*)
|
||||
targ_defvec=mips_elf32_trad_le_vec
|
||||
diff --git a/ld/configure.tgt b/ld/configure.tgt
|
||||
index 87c7d9a4cad..9b4bf2ca964 100644
|
||||
index 0c780b24d57..47431770a17 100644
|
||||
--- a/ld/configure.tgt
|
||||
+++ b/ld/configure.tgt
|
||||
@@ -531,12 +531,12 @@ mips*-*-vxworks*) targ_emul=elf32ebmipvxworks
|
||||
@@ -55,6 +55,3 @@ index 87c7d9a4cad..9b4bf2ca964 100644
|
||||
targ_extra_libpath=$targ_extra_emuls
|
||||
;;
|
||||
mips*el-*-linux-*) targ_emul=elf32ltsmip
|
||||
--
|
||||
2.28.0
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 69ab45c16f80f18fa78121f6e774750b9e9a200b Mon Sep 17 00:00:00 2001
|
||||
From c64a5ca02a55b748311032e2c7d9c4f87bd74c63 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 10/17] Add support for Netlogic XLP
|
||||
Subject: [PATCH] Add support for Netlogic XLP
|
||||
|
||||
Patch From: Nebu Philips <nphilips@netlogicmicro.com>
|
||||
|
||||
@@ -35,7 +35,7 @@ Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
|
||||
15 files changed, 65 insertions(+), 21 deletions(-)
|
||||
|
||||
diff --git a/bfd/aoutx.h b/bfd/aoutx.h
|
||||
index d352a1a3e44..2e2c3c1af86 100644
|
||||
index 8025b8c5241..cdcb7876896 100644
|
||||
--- a/bfd/aoutx.h
|
||||
+++ b/bfd/aoutx.h
|
||||
@@ -810,6 +810,7 @@ NAME (aout, machine_type) (enum bfd_architecture arch,
|
||||
@@ -47,7 +47,7 @@ index d352a1a3e44..2e2c3c1af86 100644
|
||||
arch_flags = M_MIPS2;
|
||||
break;
|
||||
diff --git a/bfd/archures.c b/bfd/archures.c
|
||||
index 551ec8732f0..2665b378623 100644
|
||||
index 8c1d32ca930..b4b2927ebc0 100644
|
||||
--- a/bfd/archures.c
|
||||
+++ b/bfd/archures.c
|
||||
@@ -185,6 +185,7 @@ DESCRIPTION
|
||||
@@ -59,10 +59,10 @@ index 551ec8732f0..2665b378623 100644
|
||||
.#define bfd_mach_mipsisa32r2 33
|
||||
.#define bfd_mach_mipsisa32r3 34
|
||||
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
|
||||
index 35ef4d755bb..48db00af80b 100644
|
||||
index 7eff85b7eaa..6c9eb12865e 100644
|
||||
--- a/bfd/bfd-in2.h
|
||||
+++ b/bfd/bfd-in2.h
|
||||
@@ -1585,6 +1585,7 @@ enum bfd_architecture
|
||||
@@ -1590,6 +1590,7 @@ enum bfd_architecture
|
||||
#define bfd_mach_mips_octeon3 6503
|
||||
#define bfd_mach_mips_xlr 887682 /* decimal 'XLR'. */
|
||||
#define bfd_mach_mips_interaptiv_mr2 736550 /* decimal 'IA2'. */
|
||||
@@ -71,10 +71,10 @@ index 35ef4d755bb..48db00af80b 100644
|
||||
#define bfd_mach_mipsisa32r2 33
|
||||
#define bfd_mach_mipsisa32r3 34
|
||||
diff --git a/bfd/config.bfd b/bfd/config.bfd
|
||||
index e5233cd1f7e..2e4ae6bbdff 100644
|
||||
index 2caf492e172..e75417da4d8 100644
|
||||
--- a/bfd/config.bfd
|
||||
+++ b/bfd/config.bfd
|
||||
@@ -877,6 +877,11 @@ case "${targ}" in
|
||||
@@ -879,6 +879,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 +87,7 @@ index e5233cd1f7e..2e4ae6bbdff 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 802acb45f1e..fd9ec4c0ad4 100644
|
||||
index 5a944ceee81..c57d12ba3dd 100644
|
||||
--- a/bfd/cpu-mips.c
|
||||
+++ b/bfd/cpu-mips.c
|
||||
@@ -108,7 +108,8 @@ enum
|
||||
@@ -111,10 +111,10 @@ index 802acb45f1e..fd9ec4c0ad4 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 160febec94c..4c9499cc2cf 100644
|
||||
index 3cbb3cf9495..0c6cd47b40c 100644
|
||||
--- a/bfd/elfxx-mips.c
|
||||
+++ b/bfd/elfxx-mips.c
|
||||
@@ -6982,6 +6982,9 @@ _bfd_elf_mips_mach (flagword flags)
|
||||
@@ -6980,6 +6980,9 @@ _bfd_elf_mips_mach (flagword flags)
|
||||
case E_MIPS_MACH_IAMR2:
|
||||
return bfd_mach_mips_interaptiv_mr2;
|
||||
|
||||
@@ -124,7 +124,7 @@ index 160febec94c..4c9499cc2cf 100644
|
||||
default:
|
||||
switch (flags & EF_MIPS_ARCH)
|
||||
{
|
||||
@@ -12356,6 +12359,10 @@ mips_set_isa_flags (bfd *abfd)
|
||||
@@ -12335,6 +12338,10 @@ mips_set_isa_flags (bfd *abfd)
|
||||
val = E_MIPS_ARCH_64R2 | E_MIPS_MACH_OCTEON2;
|
||||
break;
|
||||
|
||||
@@ -135,7 +135,7 @@ index 160febec94c..4c9499cc2cf 100644
|
||||
case bfd_mach_mipsisa32:
|
||||
val = E_MIPS_ARCH_32;
|
||||
break;
|
||||
@@ -14373,6 +14380,7 @@ static const struct mips_mach_extension mips_mach_extensions[] =
|
||||
@@ -14352,6 +14359,7 @@ static const struct mips_mach_extension mips_mach_extensions[] =
|
||||
{ bfd_mach_mips_gs264e, bfd_mach_mips_gs464e },
|
||||
{ bfd_mach_mips_gs464e, bfd_mach_mips_gs464 },
|
||||
{ bfd_mach_mips_gs464, bfd_mach_mipsisa64r2 },
|
||||
@@ -144,10 +144,10 @@ index 160febec94c..4c9499cc2cf 100644
|
||||
/* MIPS64 extensions. */
|
||||
{ bfd_mach_mipsisa64r2, bfd_mach_mipsisa64 },
|
||||
diff --git a/binutils/readelf.c b/binutils/readelf.c
|
||||
index 6057515a89b..ea119b0b254 100644
|
||||
index ad16b4571c9..4bf2b732502 100644
|
||||
--- a/binutils/readelf.c
|
||||
+++ b/binutils/readelf.c
|
||||
@@ -3483,6 +3483,7 @@ get_machine_flags (Filedata * filedata, unsigned e_flags, unsigned e_machine)
|
||||
@@ -3502,6 +3502,7 @@ get_machine_flags (Filedata * filedata, unsigned e_flags, unsigned e_machine)
|
||||
case E_MIPS_MACH_OCTEON3: strcat (buf, ", octeon3"); break;
|
||||
case E_MIPS_MACH_XLR: strcat (buf, ", xlr"); break;
|
||||
case E_MIPS_MACH_IAMR2: strcat (buf, ", interaptiv-mr2"); break;
|
||||
@@ -156,7 +156,7 @@ index 6057515a89b..ea119b0b254 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 31acb77d78a..0ead168d51e 100644
|
||||
index 538b69710f5..b021b64f14b 100644
|
||||
--- a/gas/config/tc-mips.c
|
||||
+++ b/gas/config/tc-mips.c
|
||||
@@ -568,6 +568,7 @@ static int mips_32bitmode = 0;
|
||||
@@ -175,7 +175,7 @@ index 31acb77d78a..0ead168d51e 100644
|
||||
)
|
||||
|
||||
/* Whether the processor uses hardware interlocks to protect reads
|
||||
@@ -20174,7 +20176,7 @@ static const struct mips_cpu_info mips_cpu_info_table[] =
|
||||
@@ -20156,7 +20158,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 +185,10 @@ index 31acb77d78a..0ead168d51e 100644
|
||||
/* MIPS 64 Release 6. */
|
||||
{ "i6400", 0, ASE_VIRT | ASE_MSA, ISA_MIPS64R6, CPU_MIPS64R6},
|
||||
diff --git a/gas/configure b/gas/configure
|
||||
index 5bccfd9d1b7..d4b13e6fc8b 100755
|
||||
index d03432c6dc6..d5ae54925e9 100755
|
||||
--- a/gas/configure
|
||||
+++ b/gas/configure
|
||||
@@ -12722,6 +12722,9 @@ _ACEOF
|
||||
@@ -12761,6 +12761,9 @@ _ACEOF
|
||||
mipsisa64r6 | mipsisa64r6el)
|
||||
mips_cpu=mips64r6
|
||||
;;
|
||||
@@ -199,10 +199,10 @@ index 5bccfd9d1b7..d4b13e6fc8b 100755
|
||||
mips_cpu=r3900
|
||||
;;
|
||||
diff --git a/gas/configure.ac b/gas/configure.ac
|
||||
index b65108fecb2..ce1f2dad9bc 100644
|
||||
index 82706561886..f1c27bf2878 100644
|
||||
--- a/gas/configure.ac
|
||||
+++ b/gas/configure.ac
|
||||
@@ -325,6 +325,9 @@ changequote([,])dnl
|
||||
@@ -332,6 +332,9 @@ changequote([,])dnl
|
||||
mipsisa64r6 | mipsisa64r6el)
|
||||
mips_cpu=mips64r6
|
||||
;;
|
||||
@@ -213,7 +213,7 @@ index b65108fecb2..ce1f2dad9bc 100644
|
||||
mips_cpu=r3900
|
||||
;;
|
||||
diff --git a/include/elf/mips.h b/include/elf/mips.h
|
||||
index cc08ebd4318..bb518575ce1 100644
|
||||
index 4bd86307120..2d7df22abf2 100644
|
||||
--- a/include/elf/mips.h
|
||||
+++ b/include/elf/mips.h
|
||||
@@ -290,6 +290,7 @@ END_RELOC_NUMBERS (R_MIPS_maxext)
|
||||
@@ -225,7 +225,7 @@ index cc08ebd4318..bb518575ce1 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 fd031f37588..a96a44df840 100644
|
||||
index d1b4a2574ac..879c68fcfd4 100644
|
||||
--- a/include/opcode/mips.h
|
||||
+++ b/include/opcode/mips.h
|
||||
@@ -1260,6 +1260,8 @@ static const unsigned int mips_isa_table[] = {
|
||||
@@ -256,7 +256,7 @@ index fd031f37588..a96a44df840 100644
|
||||
return FALSE;
|
||||
}
|
||||
diff --git a/ld/configure.tgt b/ld/configure.tgt
|
||||
index 9b4bf2ca964..f6d7171dff7 100644
|
||||
index 47431770a17..f714744eab3 100644
|
||||
--- a/ld/configure.tgt
|
||||
+++ b/ld/configure.tgt
|
||||
@@ -510,6 +510,9 @@ mips*-sde-elf* | mips*-mti-elf* | mips*-img-elf*)
|
||||
@@ -270,7 +270,7 @@ index 9b4bf2ca964..f6d7171dff7 100644
|
||||
targ_extra_emuls="elf32lr5900"
|
||||
targ_extra_libpath=$targ_extra_emuls
|
||||
diff --git a/opcodes/mips-dis.c b/opcodes/mips-dis.c
|
||||
index 755bbe294bd..ce22ef683a6 100644
|
||||
index 317ced51204..6869f890656 100644
|
||||
--- a/opcodes/mips-dis.c
|
||||
+++ b/opcodes/mips-dis.c
|
||||
@@ -674,13 +674,11 @@ const struct mips_arch_choice mips_arch_choices[] =
|
||||
@@ -293,7 +293,7 @@ index 755bbe294bd..ce22ef683a6 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 5270aeefa80..d17dc78cd71 100644
|
||||
index b45eb40bf69..2f4eb5c0354 100644
|
||||
--- a/opcodes/mips-opc.c
|
||||
+++ b/opcodes/mips-opc.c
|
||||
@@ -328,6 +328,7 @@ decode_mips_operand (const char *p)
|
||||
@@ -404,6 +404,3 @@ index 5270aeefa80..d17dc78cd71 100644
|
||||
{"swc0", "E,o(b)", 0xe0000000, 0xfc000000, RD_3|RD_C0|SM, 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 },
|
||||
--
|
||||
2.28.0
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 7836f8aa56ef0f18c8658dc7e4952a9d097ba7e8 Mon Sep 17 00:00:00 2001
|
||||
From 7f4938d062146e40b4e6d427a5eca6cc6acaaeee 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 11/17] fix the incorrect assembling for ppc wait mnemonic
|
||||
Subject: [PATCH] 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(+), 3 deletions(-)
|
||||
|
||||
diff --git a/opcodes/ppc-opc.c b/opcodes/ppc-opc.c
|
||||
index 5e20d617664..4c9656ecf08 100644
|
||||
index bbbadffad8f..72092355e12 100644
|
||||
--- a/opcodes/ppc-opc.c
|
||||
+++ b/opcodes/ppc-opc.c
|
||||
@@ -6265,8 +6265,6 @@ const struct powerpc_opcode powerpc_opcodes[] = {
|
||||
@@ -6302,8 +6302,6 @@ const struct powerpc_opcode powerpc_opcodes[] = {
|
||||
{"waitasec", X(31,30), XRTRARB_MASK, POWER8, POWER9, {0}},
|
||||
{"waitrsv", XWCPL(31,30,1,0),0xffffffff, POWER10, 0, {0}},
|
||||
{"pause_short", XWCPL(31,30,2,0),0xffffffff, POWER10, 0, {0}},
|
||||
@@ -23,7 +23,7 @@ index 5e20d617664..4c9656ecf08 100644
|
||||
|
||||
{"lwepx", X(31,31), X_MASK, E500MC|PPCA2, 0, {RT, RA0, RB}},
|
||||
|
||||
@@ -6326,7 +6324,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
|
||||
@@ -6363,7 +6361,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,6 +32,3 @@ index 5e20d617664..4c9656ecf08 100644
|
||||
|
||||
{"dcbstep", XRT(31,63,0), XRT_MASK, E500MC|PPCA2, 0, {RA0, RB}},
|
||||
|
||||
--
|
||||
2.28.0
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From dbff6bdf2123f5495b8be930304d9aa5e88006a7 Mon Sep 17 00:00:00 2001
|
||||
From bb229568e505f2276ca58b72fef6781034fa839f Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Fri, 31 Mar 2017 11:42:03 -0700
|
||||
Subject: [PATCH 12/17] Detect 64-bit MIPS targets
|
||||
Subject: [PATCH] Detect 64-bit MIPS targets
|
||||
|
||||
Add mips64 target triplets and default to N64
|
||||
|
||||
@@ -14,7 +14,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
1 file changed, 14 insertions(+)
|
||||
|
||||
diff --git a/gold/configure.tgt b/gold/configure.tgt
|
||||
index aa7ec552aec..470515062e4 100644
|
||||
index cac0866e628..24fbf641456 100644
|
||||
--- a/gold/configure.tgt
|
||||
+++ b/gold/configure.tgt
|
||||
@@ -153,6 +153,13 @@ aarch64*-*)
|
||||
@@ -45,6 +45,3 @@ index aa7ec552aec..470515062e4 100644
|
||||
mips*-*-*)
|
||||
targ_obj=mips
|
||||
targ_machine=EM_MIPS
|
||||
--
|
||||
2.28.0
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,7 @@
|
||||
From f791a5d84475c02356f16679b7f4ee9c9c3408aa Mon Sep 17 00:00:00 2001
|
||||
From 0e026a8758a5416b548de21d5245477cf8e33ed2 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 14/17] Fix rpath in libtool when sysroot is enabled
|
||||
Subject: [PATCH] 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
|
||||
@@ -47,6 +47,3 @@ index 70e856e0659..11ee684cccf 100644
|
||||
if test -n "$hardcode_libdir_separator"; then
|
||||
if test -z "$hardcode_libdirs"; then
|
||||
hardcode_libdirs="$libdir"
|
||||
--
|
||||
2.28.0
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From e087f96e219d47c4d2244c3f32397e56d41bfdec Mon Sep 17 00:00:00 2001
|
||||
From 9d41698ca97b2c5c20ac83147de1f02d385fa66f 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/17] sync with OE libtool changes
|
||||
Subject: [PATCH] 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
|
||||
@@ -84,6 +84,3 @@ index 11ee684cccf..3b19ac15328 100644
|
||||
fi
|
||||
elif test -n "$runpath_var"; then
|
||||
case "$finalize_perm_rpath " in
|
||||
--
|
||||
2.28.0
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From ae5a7d622dc9addb2ca9fc85889c45964c025a9c Mon Sep 17 00:00:00 2001
|
||||
From 805e3ce0c20bee5049ff167ab6f620a230c6db51 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Wed, 15 Apr 2020 14:17:20 -0700
|
||||
Subject: [PATCH 16/17] Check for clang before checking gcc version
|
||||
Subject: [PATCH] Check for clang before checking gcc version
|
||||
|
||||
Clang advertises itself to be gcc 4.2.1, so when compiling this test
|
||||
here fails since gcc < 4.4.5 did not support -static-libstdc++ but thats
|
||||
@@ -18,10 +18,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index 6782f8b6ab8..72f5766b363 100755
|
||||
index 7b369071141..7da69e27ce9 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -5143,7 +5143,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
|
||||
@@ -5093,7 +5093,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
@@ -31,10 +31,10 @@ index 6782f8b6ab8..72f5766b363 100755
|
||||
#endif
|
||||
int main() {}
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 55beb1dea46..3f9e613e2d9 100644
|
||||
index 92f01fb3ed7..e99d67ab86b 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -1312,7 +1312,7 @@ if test "$GCC" = yes; then
|
||||
@@ -1311,7 +1311,7 @@ if test "$GCC" = yes; then
|
||||
AC_MSG_CHECKING([whether g++ accepts -static-libstdc++ -static-libgcc])
|
||||
AC_LANG_PUSH(C++)
|
||||
AC_LINK_IFELSE([AC_LANG_SOURCE([
|
||||
@@ -43,6 +43,3 @@ index 55beb1dea46..3f9e613e2d9 100644
|
||||
#error -static-libstdc++ not implemented
|
||||
#endif
|
||||
int main() {}])],
|
||||
--
|
||||
2.28.0
|
||||
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
From aa6586e80fc6fcd739aa959a71e4cf064cdef072 Mon Sep 17 00:00:00 2001
|
||||
From: Denys Zagorui <dzagorui@cisco.com>
|
||||
Date: Mon, 9 Nov 2020 15:39:10 +0000
|
||||
Subject: [PATCH] gas: improve reproducibility for stabs debugging data format
|
||||
|
||||
* config/obj-elf (obj_elf_init_stab_section): Improve
|
||||
reproducibility for stabs debugging data format
|
||||
|
||||
Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=0541201782c006c09d029d18a45c6e743cfea906]
|
||||
---
|
||||
gas/config/obj-elf.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gas/config/obj-elf.c b/gas/config/obj-elf.c
|
||||
index de22b5a1da..2025df8542 100644
|
||||
--- a/gas/config/obj-elf.c
|
||||
+++ b/gas/config/obj-elf.c
|
||||
@@ -2374,12 +2374,13 @@ obj_elf_init_stab_section (segT seg)
|
||||
p = frag_more (12);
|
||||
/* Zero it out. */
|
||||
memset (p, 0, 12);
|
||||
- file = as_where (NULL);
|
||||
+ file = remap_debug_filename (as_where (NULL));
|
||||
stabstr_name = concat (segment_name (seg), "str", (char *) NULL);
|
||||
stroff = get_stab_string_offset (file, stabstr_name, TRUE);
|
||||
know (stroff == 1 || (stroff == 0 && file[0] == '\0'));
|
||||
md_number_to_chars (p, stroff, 4);
|
||||
seg_info (seg)->stabu.p = p;
|
||||
+ xfree ((char *) file);
|
||||
}
|
||||
|
||||
#endif
|
||||
--
|
||||
2.20.1
|
||||
|
||||
@@ -1,85 +0,0 @@
|
||||
From 6caa41daeb7aa17c400b7300fb78d207cf064d70 Mon Sep 17 00:00:00 2001
|
||||
From: Alan Modra <amodra@gmail.com>
|
||||
Date: Fri, 4 Sep 2020 19:19:18 +0930
|
||||
Subject: [PATCH] PR26574, heap buffer overflow in
|
||||
_bfd_elf_slurp_secondary_reloc_section
|
||||
|
||||
A horribly fuzzed object with section headers inside the ELF header.
|
||||
Disallow that, and crazy reloc sizes.
|
||||
|
||||
PR 26574
|
||||
* elfcode.h (elf_object_p): Sanity check section header offset.
|
||||
* elf.c (_bfd_elf_slurp_secondary_reloc_section): Sanity check
|
||||
sh_entsize.
|
||||
|
||||
Upstream-Status: Backport
|
||||
CVE: CVE-2020-35448
|
||||
|
||||
Reference to upstream patch:
|
||||
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;
|
||||
h=8642dafaef21aa6747cec01df1977e9c52eb4679
|
||||
|
||||
Signed-off-by: Yi Fan Yu <yifan.yu@windriver.com>
|
||||
---
|
||||
bfd/elf.c | 4 +++-
|
||||
bfd/elfcode.h | 8 ++++----
|
||||
2 files changed, 7 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/bfd/elf.c b/bfd/elf.c
|
||||
index fe375e7346..9f29166399 100644
|
||||
--- a/bfd/elf.c
|
||||
+++ b/bfd/elf.c
|
||||
@@ -12527,7 +12527,9 @@ _bfd_elf_slurp_secondary_reloc_section (bfd * abfd,
|
||||
Elf_Internal_Shdr * hdr = & elf_section_data (relsec)->this_hdr;
|
||||
|
||||
if (hdr->sh_type == SHT_SECONDARY_RELOC
|
||||
- && hdr->sh_info == (unsigned) elf_section_data (sec)->this_idx)
|
||||
+ && hdr->sh_info == (unsigned) elf_section_data (sec)->this_idx
|
||||
+ && (hdr->sh_entsize == ebd->s->sizeof_rel
|
||||
+ || hdr->sh_entsize == ebd->s->sizeof_rela))
|
||||
{
|
||||
bfd_byte * native_relocs;
|
||||
bfd_byte * native_reloc;
|
||||
diff --git a/bfd/elfcode.h b/bfd/elfcode.h
|
||||
index f4a7829f27..54ef890637 100644
|
||||
--- a/bfd/elfcode.h
|
||||
+++ b/bfd/elfcode.h
|
||||
@@ -568,7 +568,7 @@ elf_object_p (bfd *abfd)
|
||||
|
||||
/* If this is a relocatable file and there is no section header
|
||||
table, then we're hosed. */
|
||||
- if (i_ehdrp->e_shoff == 0 && i_ehdrp->e_type == ET_REL)
|
||||
+ if (i_ehdrp->e_shoff < sizeof (x_ehdr) && i_ehdrp->e_type == ET_REL)
|
||||
goto got_wrong_format_error;
|
||||
|
||||
/* As a simple sanity check, verify that what BFD thinks is the
|
||||
@@ -578,7 +578,7 @@ elf_object_p (bfd *abfd)
|
||||
goto got_wrong_format_error;
|
||||
|
||||
/* Further sanity check. */
|
||||
- if (i_ehdrp->e_shoff == 0 && i_ehdrp->e_shnum != 0)
|
||||
+ if (i_ehdrp->e_shoff < sizeof (x_ehdr) && i_ehdrp->e_shnum != 0)
|
||||
goto got_wrong_format_error;
|
||||
|
||||
ebd = get_elf_backend_data (abfd);
|
||||
@@ -615,7 +615,7 @@ elf_object_p (bfd *abfd)
|
||||
&& ebd->elf_osabi != ELFOSABI_NONE)
|
||||
goto got_wrong_format_error;
|
||||
|
||||
- if (i_ehdrp->e_shoff != 0)
|
||||
+ if (i_ehdrp->e_shoff >= sizeof (x_ehdr))
|
||||
{
|
||||
file_ptr where = (file_ptr) i_ehdrp->e_shoff;
|
||||
|
||||
@@ -807,7 +807,7 @@ elf_object_p (bfd *abfd)
|
||||
}
|
||||
}
|
||||
|
||||
- if (i_ehdrp->e_shstrndx != 0 && i_ehdrp->e_shoff != 0)
|
||||
+ if (i_ehdrp->e_shstrndx != 0 && i_ehdrp->e_shoff >= sizeof (x_ehdr))
|
||||
{
|
||||
unsigned int num_sec;
|
||||
|
||||
--
|
||||
2.29.2
|
||||
|
||||
Reference in New Issue
Block a user