aboutsummaryrefslogtreecommitdiffstats
path: root/toolchain
diff options
context:
space:
mode:
Diffstat (limited to 'toolchain')
-rw-r--r--toolchain/binutils/Config.version4
-rw-r--r--toolchain/binutils/Makefile4
-rw-r--r--toolchain/binutils/patches/2.28/001-ELF-BFD-Limit-_bfd_elf_link_renumber_dynsyms-call-in.patch52
-rw-r--r--toolchain/binutils/patches/2.28/002-PR-ld-21334-Always-call-_bfd_elf_link_renumber_dynsy.patch184
-rw-r--r--toolchain/binutils/patches/2.28/300-001_ld_makefile_patch.patch22
-rw-r--r--toolchain/binutils/patches/2.28/300-012_check_ldrunpath_length.patch20
-rw-r--r--toolchain/binutils/patches/2.28/400-mips_no_dynamic_linking_sym.patch18
-rw-r--r--toolchain/binutils/patches/2.28/500-Change-default-emulation-for-mips64-linux.patch37
8 files changed, 0 insertions, 341 deletions
diff --git a/toolchain/binutils/Config.version b/toolchain/binutils/Config.version
index b5bb6a8e49..a81f20fea5 100644
--- a/toolchain/binutils/Config.version
+++ b/toolchain/binutils/Config.version
@@ -1,9 +1,6 @@
config BINUTILS_VERSION_2_27
bool
-config BINUTILS_VERSION_2_28
- bool
-
config BINUTILS_VERSION_2_29_ARC
default y if (!TOOLCHAINOPTS && arc)
bool
@@ -18,7 +15,6 @@ config BINUTILS_VERSION_2_30
config BINUTILS_VERSION
string
default "2.27" if BINUTILS_VERSION_2_27
- default "2.28" if BINUTILS_VERSION_2_28
default "2.29.1" if BINUTILS_VERSION_2_29_1
default "2.30" if BINUTILS_VERSION_2_30
default "arc-2017.09" if BINUTILS_VERSION_2_29_ARC
diff --git a/toolchain/binutils/Makefile b/toolchain/binutils/Makefile
index 2a1b1015c9..1df6f94ae9 100644
--- a/toolchain/binutils/Makefile
+++ b/toolchain/binutils/Makefile
@@ -17,10 +17,6 @@ ifeq ($(PKG_VERSION),2.27)
PKG_HASH:=369737ce51587f92466041a97ab7d2358c6d9e1b6490b3940eb09fb0a9a6ac88
endif
-ifeq ($(PKG_VERSION),2.28)
- PKG_HASH:=6297433ee120b11b4b0a1c8f3512d7d73501753142ab9e2daa13c5a3edd32a72
-endif
-
ifeq ($(PKG_VERSION),2.29.1)
PKG_HASH:=1509dff41369fb70aed23682351b663b56db894034773e6dbf7d5d6071fc55cc
endif
diff --git a/toolchain/binutils/patches/2.28/001-ELF-BFD-Limit-_bfd_elf_link_renumber_dynsyms-call-in.patch b/toolchain/binutils/patches/2.28/001-ELF-BFD-Limit-_bfd_elf_link_renumber_dynsyms-call-in.patch
deleted file mode 100644
index e2587b81e0..0000000000
--- a/toolchain/binutils/patches/2.28/001-ELF-BFD-Limit-_bfd_elf_link_renumber_dynsyms-call-in.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From 2424aef3a744bc6ca4099a655065c70a63f0fb49 Mon Sep 17 00:00:00 2001
-From: "Maciej W. Rozycki" <macro@imgtec.com>
-Date: Wed, 26 Apr 2017 22:18:13 +0100
-Subject: ELF/BFD: Limit `_bfd_elf_link_renumber_dynsyms' call in section GC
-
-Consistently call `_bfd_elf_link_renumber_dynsyms' only if linking a
-dynamic binary, complementing code in `bfd_elf_size_dynsym_hash_dynstr'
-and commit ccabcbe51e85 ("New attempt at fixing MIPS --gc-sections et
-al."), <https://sourceware.org/ml/binutils/2005-08/msg00258.html>.
-
- bfd/
- * elflink.c (elf_gc_sweep): Only call
- `_bfd_elf_link_renumber_dynsyms' if dynamic sections have been
- created.
-
-(backported from commit c46cec3a8cfe02fbe0f6c67ba53abc5369c5c659)
----
- bfd/ChangeLog | 6 ++++++
- bfd/elflink.c | 3 ++-
- 2 files changed, 8 insertions(+), 1 deletion(-)
-
-diff --git a/bfd/ChangeLog b/bfd/ChangeLog
-index 85c6a817e5..537ebb5e2c 100644
---- a/bfd/ChangeLog
-+++ b/bfd/ChangeLog
-@@ -1,3 +1,9 @@
-+2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
-+
-+ * elflink.c (elf_gc_sweep): Only call
-+ `_bfd_elf_link_renumber_dynsyms' if dynamic sections have been
-+ created.
-+
- 2017-03-02 Tristan Gingold <gingold@adacore.com>
-
- * version.m4: Bump version to 2.28
-diff --git a/bfd/elflink.c b/bfd/elflink.c
-index 69b66f2831..75d6543dcc 100644
---- a/bfd/elflink.c
-+++ b/bfd/elflink.c
-@@ -12986,7 +12986,8 @@ elf_gc_sweep (bfd *abfd, struct bfd_link_info *info)
- elf_link_hash_traverse (elf_hash_table (info), elf_gc_sweep_symbol,
- &sweep_info);
-
-- _bfd_elf_link_renumber_dynsyms (abfd, info, &section_sym_count);
-+ if (elf_hash_table (info)->dynamic_sections_created)
-+ _bfd_elf_link_renumber_dynsyms (abfd, info, &section_sym_count);
- return TRUE;
- }
-
---
-2.11.0
-
diff --git a/toolchain/binutils/patches/2.28/002-PR-ld-21334-Always-call-_bfd_elf_link_renumber_dynsy.patch b/toolchain/binutils/patches/2.28/002-PR-ld-21334-Always-call-_bfd_elf_link_renumber_dynsy.patch
deleted file mode 100644
index 7cfbaa6153..0000000000
--- a/toolchain/binutils/patches/2.28/002-PR-ld-21334-Always-call-_bfd_elf_link_renumber_dynsy.patch
+++ /dev/null
@@ -1,184 +0,0 @@
-From 51ffcfc2c67b4c4aa1620fb4c9834c38d150e1c5 Mon Sep 17 00:00:00 2001
-From: "Maciej W. Rozycki" <macro@imgtec.com>
-Date: Wed, 26 Apr 2017 22:23:44 +0100
-Subject: PR ld/21334: Always call `_bfd_elf_link_renumber_dynsyms' if required
-
-Complement commit e17b0c351f0b ("MIPS/BFD: Respect the ELF gABI dynamic
-symbol table sort requirement") and correct an inconsistency in dynamic
-symbol accounting data causing an assertion failure in the MIPS backend:
-
-ld: BFD (GNU Binutils) 2.28.51.20170330 assertion fail
-../../binutils-gdb/bfd/elfxx-mips.c:3860
-
-in the course of making a GOT entry in a static binary to satisfy a GOT
-relocation present in input, due to the local dynamic symbol count not
-having been established.
-
-To do so let backends request `_bfd_elf_link_renumber_dynsyms' to be
-always called, rather than where a dynamic binary is linked only, and
-then make this request in the MIPS backend.
-
- bfd/
- PR ld/21334
- * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
- member.
- * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
- (elf_backend_always_renumber_dynsyms): Define.
- (elfNN_bed): Initialize `always_renumber_dynsyms' member.
- * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
- * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Also call
- `_bfd_elf_link_renumber_dynsyms' if the backend has requested
- it.
- (elf_gc_sweep): Likewise.
-
-(backported from commit 23ec1e32b1ab714649a7c25e49b5d721fe3bd3db)
----
- bfd/ChangeLog | 14 ++++++++++++++
- bfd/elf-bfd.h | 4 ++++
- bfd/elflink.c | 34 +++++++++++++++++++++++-----------
- bfd/elfxx-mips.h | 1 +
- bfd/elfxx-target.h | 6 +++++-
- 5 files changed, 47 insertions(+), 12 deletions(-)
-
-diff --git a/bfd/ChangeLog b/bfd/ChangeLog
-index 537ebb5e2c..3f10bc55f2 100644
---- a/bfd/ChangeLog
-+++ b/bfd/ChangeLog
-@@ -1,5 +1,19 @@
- 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
-
-+ PR ld/21334
-+ * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
-+ member.
-+ * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
-+ (elf_backend_always_renumber_dynsyms): Define.
-+ (elfNN_bed): Initialize `always_renumber_dynsyms' member.
-+ * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
-+ * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Also call
-+ `_bfd_elf_link_renumber_dynsyms' if the backend has requested
-+ it.
-+ (elf_gc_sweep): Likewise.
-+
-+2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
-+
- * elflink.c (elf_gc_sweep): Only call
- `_bfd_elf_link_renumber_dynsyms' if dynamic sections have been
- created.
-diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h
-index 5de9ab6ca6..dc4bd87f89 100644
---- a/bfd/elf-bfd.h
-+++ b/bfd/elf-bfd.h
-@@ -1478,6 +1478,10 @@ struct elf_backend_data
- /* Address of protected data defined in the shared library may be
- external, i.e., due to copy relocation. */
- unsigned extern_protected_data : 1;
-+
-+ /* True if `_bfd_elf_link_renumber_dynsyms' must be called even for
-+ static binaries. */
-+ unsigned always_renumber_dynsyms : 1;
- };
-
- /* Information about reloc sections associated with a bfd_elf_section_data
-diff --git a/bfd/elflink.c b/bfd/elflink.c
-index 75d6543dcc..507f2b6259 100644
---- a/bfd/elflink.c
-+++ b/bfd/elflink.c
-@@ -6710,6 +6710,8 @@ bfd_boolean
- bfd_elf_size_dynsym_hash_dynstr (bfd *output_bfd, struct bfd_link_info *info)
- {
- const struct elf_backend_data *bed;
-+ unsigned long section_sym_count;
-+ bfd_size_type dynsymcount;
-
- if (!is_elf_hash_table (info->hash))
- return TRUE;
-@@ -6717,24 +6719,30 @@ bfd_elf_size_dynsym_hash_dynstr (bfd *output_bfd, struct bfd_link_info *info)
- bed = get_elf_backend_data (output_bfd);
- (*bed->elf_backend_init_index_section) (output_bfd, info);
-
-+ /* Assign dynsym indices. In a shared library we generate a section
-+ symbol for each output section, which come first. Next come all
-+ of the back-end allocated local dynamic syms, followed by the rest
-+ of the global symbols.
-+
-+ This is usually not needed for static binaries, however backends
-+ can request to always do it, e.g. the MIPS backend uses dynamic
-+ symbol counts to lay out GOT, which will be produced in the
-+ presence of GOT relocations even in static binaries (holding fixed
-+ data in that case, to satisfy those relocations). */
-+
-+ if (elf_hash_table (info)->dynamic_sections_created
-+ || bed->always_renumber_dynsyms)
-+ dynsymcount = _bfd_elf_link_renumber_dynsyms (output_bfd, info,
-+ &section_sym_count);
-+
- if (elf_hash_table (info)->dynamic_sections_created)
- {
- bfd *dynobj;
- asection *s;
-- bfd_size_type dynsymcount;
-- unsigned long section_sym_count;
- unsigned int dtagcount;
-
- dynobj = elf_hash_table (info)->dynobj;
-
-- /* Assign dynsym indicies. In a shared library we generate a
-- section symbol for each output section, which come first.
-- Next come all of the back-end allocated local dynamic syms,
-- followed by the rest of the global symbols. */
--
-- dynsymcount = _bfd_elf_link_renumber_dynsyms (output_bfd, info,
-- &section_sym_count);
--
- /* Work out the size of the symbol version section. */
- s = bfd_get_linker_section (dynobj, ".gnu.version");
- BFD_ASSERT (s != NULL);
-@@ -12986,7 +12994,11 @@ elf_gc_sweep (bfd *abfd, struct bfd_link_info *info)
- elf_link_hash_traverse (elf_hash_table (info), elf_gc_sweep_symbol,
- &sweep_info);
-
-- if (elf_hash_table (info)->dynamic_sections_created)
-+ /* We need to reassign dynsym indices now that symbols may have
-+ been removed. See the call in `bfd_elf_size_dynsym_hash_dynstr'
-+ for the details of the conditions used here. */
-+ if (elf_hash_table (info)->dynamic_sections_created
-+ || bed->always_renumber_dynsyms)
- _bfd_elf_link_renumber_dynsyms (abfd, info, &section_sym_count);
- return TRUE;
- }
-diff --git a/bfd/elfxx-mips.h b/bfd/elfxx-mips.h
-index fa5b5d2de9..274129b2e5 100644
---- a/bfd/elfxx-mips.h
-+++ b/bfd/elfxx-mips.h
-@@ -196,3 +196,4 @@ literal_reloc_p (int r_type)
- #define elf_backend_post_process_headers _bfd_mips_post_process_headers
- #define elf_backend_compact_eh_encoding _bfd_mips_elf_compact_eh_encoding
- #define elf_backend_cant_unwind_opcode _bfd_mips_elf_cant_unwind_opcode
-+#define elf_backend_always_renumber_dynsyms TRUE
-diff --git a/bfd/elfxx-target.h b/bfd/elfxx-target.h
-index d063fb7f1b..d07600c15d 100644
---- a/bfd/elfxx-target.h
-+++ b/bfd/elfxx-target.h
-@@ -126,6 +126,9 @@
- #ifndef elf_backend_extern_protected_data
- #define elf_backend_extern_protected_data 0
- #endif
-+#ifndef elf_backend_always_renumber_dynsyms
-+#define elf_backend_always_renumber_dynsyms FALSE
-+#endif
- #ifndef elf_backend_stack_align
- #define elf_backend_stack_align 16
- #endif
-@@ -866,7 +869,8 @@ static struct elf_backend_data elfNN_bed =
- elf_backend_no_page_alias,
- elf_backend_default_execstack,
- elf_backend_caches_rawsize,
-- elf_backend_extern_protected_data
-+ elf_backend_extern_protected_data,
-+ elf_backend_always_renumber_dynsyms
- };
-
- /* Forward declaration for use when initialising alternative_target field. */
---
-2.11.0
-
diff --git a/toolchain/binutils/patches/2.28/300-001_ld_makefile_patch.patch b/toolchain/binutils/patches/2.28/300-001_ld_makefile_patch.patch
deleted file mode 100644
index e4cec7f69e..0000000000
--- a/toolchain/binutils/patches/2.28/300-001_ld_makefile_patch.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- a/ld/Makefile.am
-+++ b/ld/Makefile.am
-@@ -57,7 +57,7 @@ endif
- # We put the scripts in the directory $(scriptdir)/ldscripts.
- # We can't put the scripts in $(datadir) because the SEARCH_DIR
- # directives need to be different for native and cross linkers.
--scriptdir = $(tooldir)/lib
-+scriptdir = $(libdir)
-
- EMUL = @EMUL@
- EMULATION_OFILES = @EMULATION_OFILES@
---- a/ld/Makefile.in
-+++ b/ld/Makefile.in
-@@ -451,7 +451,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.
--scriptdir = $(tooldir)/lib
-+scriptdir = $(libdir)
- BASEDIR = $(srcdir)/..
- BFDDIR = $(BASEDIR)/bfd
- INCDIR = $(BASEDIR)/include
diff --git a/toolchain/binutils/patches/2.28/300-012_check_ldrunpath_length.patch b/toolchain/binutils/patches/2.28/300-012_check_ldrunpath_length.patch
deleted file mode 100644
index 95d3f75b85..0000000000
--- a/toolchain/binutils/patches/2.28/300-012_check_ldrunpath_length.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- a/ld/emultempl/elf32.em
-+++ b/ld/emultempl/elf32.em
-@@ -1244,6 +1244,8 @@ fragment <<EOF
- && command_line.rpath == NULL)
- {
- lib_path = (const char *) getenv ("LD_RUN_PATH");
-+ if ((lib_path) && (strlen (lib_path) == 0))
-+ lib_path = NULL;
- if (gld${EMULATION_NAME}_search_needed (lib_path, &n,
- force))
- break;
-@@ -1525,6 +1527,8 @@ gld${EMULATION_NAME}_before_allocation (
- rpath = command_line.rpath;
- if (rpath == NULL)
- rpath = (const char *) getenv ("LD_RUN_PATH");
-+ if ((rpath) && (strlen (rpath) == 0))
-+ rpath = NULL;
-
- for (abfd = link_info.input_bfds; abfd; abfd = abfd->link.next)
- if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)
diff --git a/toolchain/binutils/patches/2.28/400-mips_no_dynamic_linking_sym.patch b/toolchain/binutils/patches/2.28/400-mips_no_dynamic_linking_sym.patch
deleted file mode 100644
index b7458e58aa..0000000000
--- a/toolchain/binutils/patches/2.28/400-mips_no_dynamic_linking_sym.patch
+++ /dev/null
@@ -1,18 +0,0 @@
---- a/bfd/elfxx-mips.c
-+++ b/bfd/elfxx-mips.c
-@@ -7713,6 +7713,7 @@ _bfd_mips_elf_create_dynamic_sections (b
-
- name = SGI_COMPAT (abfd) ? "_DYNAMIC_LINK" : "_DYNAMIC_LINKING";
- bh = NULL;
-+ if (0) {
- if (!(_bfd_generic_link_add_one_symbol
- (info, abfd, name, BSF_GLOBAL, bfd_abs_section_ptr, 0,
- NULL, FALSE, get_elf_backend_data (abfd)->collect, &bh)))
-@@ -7725,6 +7726,7 @@ _bfd_mips_elf_create_dynamic_sections (b
-
- if (! bfd_elf_link_record_dynamic_symbol (info, h))
- return FALSE;
-+ }
-
- if (! mips_elf_hash_table (info)->use_rld_obj_head)
- {
diff --git a/toolchain/binutils/patches/2.28/500-Change-default-emulation-for-mips64-linux.patch b/toolchain/binutils/patches/2.28/500-Change-default-emulation-for-mips64-linux.patch
deleted file mode 100644
index 7a8f0ae13a..0000000000
--- a/toolchain/binutils/patches/2.28/500-Change-default-emulation-for-mips64-linux.patch
+++ /dev/null
@@ -1,37 +0,0 @@
---- a/bfd/config.bfd
-+++ b/bfd/config.bfd
-@@ -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"
- ;;
- mips64*el-*-linux*)
-- targ_defvec=mips_elf32_ntrad_le_vec
-- targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec mips_elf64_trad_le_vec mips_elf64_trad_be_vec"
-+ targ_defvec=mips_elf64_trad_le_vec
-+ targ_selvecs="mips_elf32_ntrad_le_vec mips_elf32_ntrad_be_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec mips_elf64_trad_be_vec"
- ;;
- mips64*-*-linux*)
-- targ_defvec=mips_elf32_ntrad_be_vec
-- targ_selvecs="mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_be_vec mips_elf64_trad_le_vec"
-+ targ_defvec=mips_elf64_trad_be_vec
-+ targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_le_vec"
- ;;
- mips*el-*-linux*)
- targ_defvec=mips_elf32_trad_le_vec
---- a/ld/configure.tgt
-+++ b/ld/configure.tgt
-@@ -513,11 +513,11 @@ mips*el-*-vxworks*) targ_emul=elf32elmip
- mips*-*-vxworks*) targ_emul=elf32ebmipvxworks
- targ_extra_emuls="elf32elmipvxworks" ;;
- mips*-*-windiss) targ_emul=elf32mipswindiss ;;
--mips64*el-*-linux-*) targ_emul=elf32ltsmipn32
-- targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip"
-+mips64*el-*-linux-*) targ_emul=elf64ltsmip
-+ targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32ltsmip elf32btsmip elf64btsmip"
- targ_extra_libpath=$targ_extra_emuls ;;
--mips64*-*-linux-*) targ_emul=elf32btsmipn32
-- targ_extra_emuls="elf32ltsmipn32 elf32btsmip elf32ltsmip elf64btsmip elf64ltsmip"
-+mips64*-*-linux-*) targ_emul=elf64btsmip
-+ targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32btsmip elf32ltsmip elf64ltsmip"
- targ_extra_libpath=$targ_extra_emuls ;;
- mips*el-*-linux-*) targ_emul=elf32ltsmip
- targ_extra_emuls="elf32btsmip elf32ltsmipn32 elf64ltsmip elf32btsmipn32 elf64btsmip"