diff options
Diffstat (limited to 'packages/binutils/2.24')
-rw-r--r-- | packages/binutils/2.24/0000-fix-enable-install-libiberty-flag.patch (renamed from packages/binutils/2.24/001-fix-enable-install-libiberty-flag.patch) | 13 | ||||
-rw-r--r-- | packages/binutils/2.24/0001-dont-segv-on-initial-instructions-overflow.patch (renamed from packages/binutils/2.24/002-dont-segv-on-initial-instructions-overflow.patch) | 14 | ||||
-rw-r--r-- | packages/binutils/2.24/0002-sh-conf.patch (renamed from packages/binutils/2.24/120-sh-conf.patch) | 19 | ||||
-rw-r--r-- | packages/binutils/2.24/0003-001_ld_makefile_patch.patch (renamed from packages/binutils/2.24/300-001_ld_makefile_patch.patch) | 19 | ||||
-rw-r--r-- | packages/binutils/2.24/0004-012_check_ldrunpath_length.patch (renamed from packages/binutils/2.24/300-012_check_ldrunpath_length.patch) | 13 | ||||
-rw-r--r-- | packages/binutils/2.24/0005-fix-gold-pthreads-typo.patch (renamed from packages/binutils/2.24/310-fix-gold-pthreads-typo.patch) | 8 | ||||
-rw-r--r-- | packages/binutils/2.24/0006-sysroot.patch (renamed from packages/binutils/2.24/500-sysroot.patch) | 6 | ||||
-rw-r--r-- | packages/binutils/2.24/0007-poison-system-directories.patch (renamed from packages/binutils/2.24/600-poison-system-directories.patch) | 30 | ||||
-rw-r--r-- | packages/binutils/2.24/0008-Fix-library-paths-on-PowerPC.patch (renamed from packages/binutils/2.24/700-Fix-library-paths-on-PowerPC.patch) | 9 | ||||
-rw-r--r-- | packages/binutils/2.24/0009-xtensa-trampolines.patch (renamed from packages/binutils/2.24/900-xtensa-trampolines.patch) | 73 | ||||
-rw-r--r-- | packages/binutils/2.24/0010-xtensa-gas-first-frag-alignment.patch (renamed from packages/binutils/2.24/901-xtensa-gas-first-frag-alignment.patch) | 9 | ||||
-rw-r--r-- | packages/binutils/2.24/0011-xtensa-gas-ld-diff-relocation-signed.patch (renamed from packages/binutils/2.24/902-xtensa-gas-ld-diff-relocation-signed.patch) | 21 | ||||
-rw-r--r-- | packages/binutils/2.24/0012-xtensa-fix-ld-segfault-when-linking-linux-modules.patch (renamed from packages/binutils/2.24/903-xtensa-fix-ld-segfault-when-linking-linux-modules.patch) | 9 | ||||
-rw-r--r-- | packages/binutils/2.24/0013-Fix-call8-call-target-out-of-range-xtensa-ld-relaxation.patch (renamed from packages/binutils/2.24/904-Fix-call8-call-target-out-of-range-xtensa-ld-relaxation.patch) | 9 | ||||
-rw-r--r-- | packages/binutils/2.24/0014-Fix-trampolines-search-code-for-conditional-branches.patch (renamed from packages/binutils/2.24/905-Fix-trampolines-search-code-for-conditional-branches.patch) | 17 | ||||
-rw-r--r-- | packages/binutils/2.24/0015-xtensa-optimize-check_section_ebb_pcrels_fit.patch (renamed from packages/binutils/2.24/906-xtensa-optimize-check_section_ebb_pcrels_fit.patch) | 29 | ||||
-rw-r--r-- | packages/binutils/2.24/0016-xtensa-optimize-removed_by_actions.patch (renamed from packages/binutils/2.24/907-xtensa-optimize-removed_by_actions.patch) | 33 | ||||
-rw-r--r-- | packages/binutils/2.24/0017-xtensa-optimize-find_removed_literal.patch (renamed from packages/binutils/2.24/908-xtensa-optimize-find_removed_literal.patch) | 15 | ||||
-rw-r--r-- | packages/binutils/2.24/0018-xtensa-replace-action-list-with-splay-tree.patch (renamed from packages/binutils/2.24/909-xtensa-replace-action-list-with-splay-tree.patch) | 133 | ||||
-rw-r--r-- | packages/binutils/2.24/0019-xtensa-optimize-trampolines-relaxation.patch (renamed from packages/binutils/2.24/910-xtensa-optimize-trampolines-relaxation.patch) | 27 | ||||
-rw-r--r-- | packages/binutils/2.24/0020-xtensa-fix-localized-symbol-refcounting-with-gc-sect.patch (renamed from packages/binutils/2.24/911-xtensa-fix-localized-symbol-refcounting-with-gc-sect.patch) | 9 | ||||
-rw-r--r-- | packages/binutils/2.24/0021-xtensa-fix-gas-segfault-with-text-section-literals.patch (renamed from packages/binutils/2.24/912-xtensa-fix-gas-segfault-with-text-section-literals.patch) | 9 | ||||
-rw-r--r-- | packages/binutils/2.24/0022-xtensa-add-auto-litpools-option.patch (renamed from packages/binutils/2.24/913-xtensa-add-auto-litpools-option.patch) | 64 | ||||
-rw-r--r-- | packages/binutils/2.24/0023-xtensa-fix-signedness-of-gas-relocations.patch (renamed from packages/binutils/2.24/914-xtensa-fix-signedness-of-gas-relocations.patch) | 9 | ||||
-rw-r--r-- | packages/binutils/2.24/0024-xtensa-fix-.init-.fini-literals-moving.patch (renamed from packages/binutils/2.24/915-xtensa-fix-.init-.fini-literals-moving.patch) | 11 |
25 files changed, 250 insertions, 358 deletions
diff --git a/packages/binutils/2.24/001-fix-enable-install-libiberty-flag.patch b/packages/binutils/2.24/0000-fix-enable-install-libiberty-flag.patch index e408401..9088d46 100644 --- a/packages/binutils/2.24/001-fix-enable-install-libiberty-flag.patch +++ b/packages/binutils/2.24/0000-fix-enable-install-libiberty-flag.patch @@ -15,13 +15,11 @@ git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206367 138bc75d-0d04-0410-961f-8 --- libiberty/configure | 1 - libiberty/configure.ac | 1 - - 3 files changed, 6 insertions(+), 2 deletions(-) + 2 files changed, 2 deletions(-) -diff --git a/libiberty/configure b/libiberty/configure -index 8ea54da..7bde9b3 100755 --- a/libiberty/configure +++ b/libiberty/configure -@@ -5507,7 +5507,6 @@ fi +@@ -5507,7 +5507,6 @@ setobjs= CHECK= @@ -29,11 +27,9 @@ index 8ea54da..7bde9b3 100755 if test -n "${with_target_subdir}"; then # We are being configured as a target library. AC_REPLACE_FUNCS -diff --git a/libiberty/configure.ac b/libiberty/configure.ac -index 4ad88a9..d6180bc 100644 --- a/libiberty/configure.ac +++ b/libiberty/configure.ac -@@ -405,7 +405,6 @@ fi +@@ -405,7 +405,6 @@ setobjs= CHECK= @@ -41,6 +37,3 @@ index 4ad88a9..d6180bc 100644 if test -n "${with_target_subdir}"; then # We are being configured as a target library. AC_REPLACE_FUNCS --- -1.7.1 - diff --git a/packages/binutils/2.24/002-dont-segv-on-initial-instructions-overflow.patch b/packages/binutils/2.24/0001-dont-segv-on-initial-instructions-overflow.patch index 7881646..02c56b3 100644 --- a/packages/binutils/2.24/002-dont-segv-on-initial-instructions-overflow.patch +++ b/packages/binutils/2.24/0001-dont-segv-on-initial-instructions-overflow.patch @@ -16,11 +16,13 @@ fit in the buffer. save as much of insns to initial_instructions[] as will fit. --- -diff --git a/bfd/elf-eh-frame.c b/bfd/elf-eh-frame.c -index 832a991..4b6e8ea 100644 +--- + bfd/elf-eh-frame.c | 16 ++++++++++------ + 1 file changed, 10 insertions(+), 6 deletions(-) + --- a/bfd/elf-eh-frame.c +++ b/bfd/elf-eh-frame.c -@@ -235,6 +235,7 @@ cie_eq (const void *e1, const void *e2) +@@ -235,6 +235,7 @@ && c1->lsda_encoding == c2->lsda_encoding && c1->fde_encoding == c2->fde_encoding && c1->initial_insn_length == c2->initial_insn_length @@ -28,7 +30,7 @@ index 832a991..4b6e8ea 100644 && memcmp (c1->initial_instructions, c2->initial_instructions, c1->initial_insn_length) == 0) -@@ -254,6 +255,7 @@ static hashval_t +@@ -254,6 +255,7 @@ cie_compute_hash (struct cie *c) { hashval_t h = 0; @@ -36,7 +38,7 @@ index 832a991..4b6e8ea 100644 h = iterative_hash_object (c->length, h); h = iterative_hash_object (c->version, h); h = iterative_hash (c->augmentation, strlen (c->augmentation) + 1, h); -@@ -267,7 +269,10 @@ cie_compute_hash (struct cie *c) +@@ -267,7 +269,10 @@ h = iterative_hash_object (c->lsda_encoding, h); h = iterative_hash_object (c->fde_encoding, h); h = iterative_hash_object (c->initial_insn_length, h); @@ -48,7 +50,7 @@ index 832a991..4b6e8ea 100644 c->hash = h; return h; } -@@ -762,11 +767,10 @@ _bfd_elf_parse_eh_frame (bfd *abfd, struct bfd_link_info *info, +@@ -762,11 +767,10 @@ cie->fde_encoding = DW_EH_PE_absptr; initial_insn_length = end - buf; diff --git a/packages/binutils/2.24/120-sh-conf.patch b/packages/binutils/2.24/0002-sh-conf.patch index d5913e8..40887dd 100644 --- a/packages/binutils/2.24/120-sh-conf.patch +++ b/packages/binutils/2.24/0002-sh-conf.patch @@ -5,10 +5,14 @@ fix that up too.. now we're able to actually build a real toolchain for sh2a_nofpu- and other more ineptly named toolchains (and yes, there are more inept targets than that one, really. Go look, I promise). -diff -durN binutils-2.22.orig/configure binutils-2.22/configure ---- binutils-2.22.orig/configure 2011-08-14 14:28:15.000000000 +0200 -+++ binutils-2.22/configure 2011-12-14 19:49:40.284777434 +0100 -@@ -3570,7 +3570,7 @@ +--- + configure | 2 +- + configure.ac | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +--- a/configure ++++ b/configure +@@ -3793,7 +3793,7 @@ mips*-*-*) noconfigdirs="$noconfigdirs gprof" ;; @@ -17,10 +21,9 @@ diff -durN binutils-2.22.orig/configure binutils-2.22/configure case "${target}" in sh*-*-elf) ;; -diff -durN binutils-2.22.orig/configure.ac binutils-2.22/configure.ac ---- binutils-2.22.orig/configure.ac 2011-11-21 12:58:27.000000000 +0100 -+++ binutils-2.22/configure.ac 2011-12-14 19:49:40.316777436 +0100 -@@ -1006,7 +1006,7 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -1129,7 +1129,7 @@ mips*-*-*) noconfigdirs="$noconfigdirs gprof" ;; diff --git a/packages/binutils/2.24/300-001_ld_makefile_patch.patch b/packages/binutils/2.24/0003-001_ld_makefile_patch.patch index 4b5888a..ab6a74f 100644 --- a/packages/binutils/2.24/300-001_ld_makefile_patch.patch +++ b/packages/binutils/2.24/0003-001_ld_makefile_patch.patch @@ -1,7 +1,11 @@ -diff -durN binutils-2.22.orig/ld/Makefile.am binutils-2.22/ld/Makefile.am ---- binutils-2.22.orig/ld/Makefile.am 2011-07-22 22:22:37.000000000 +0200 -+++ binutils-2.22/ld/Makefile.am 2011-12-14 19:50:25.760779164 +0100 -@@ -37,7 +37,7 @@ +--- + ld/Makefile.am | 2 +- + ld/Makefile.in | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +--- a/ld/Makefile.am ++++ b/ld/Makefile.am +@@ -54,7 +54,7 @@ # 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. @@ -10,10 +14,9 @@ diff -durN binutils-2.22.orig/ld/Makefile.am binutils-2.22/ld/Makefile.am EMUL = @EMUL@ EMULATION_OFILES = @EMULATION_OFILES@ -diff -durN binutils-2.22.orig/ld/Makefile.in binutils-2.22/ld/Makefile.in ---- binutils-2.22.orig/ld/Makefile.in 2011-07-22 22:22:37.000000000 +0200 -+++ binutils-2.22/ld/Makefile.in 2011-12-14 19:50:25.784779163 +0100 -@@ -366,7 +366,7 @@ +--- a/ld/Makefile.in ++++ b/ld/Makefile.in +@@ -386,7 +386,7 @@ # 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. diff --git a/packages/binutils/2.24/300-012_check_ldrunpath_length.patch b/packages/binutils/2.24/0004-012_check_ldrunpath_length.patch index b49cc04..ce28120 100644 --- a/packages/binutils/2.24/300-012_check_ldrunpath_length.patch +++ b/packages/binutils/2.24/0004-012_check_ldrunpath_length.patch @@ -1,7 +1,10 @@ -diff -durN binutils-2.22.orig/ld/emultempl/elf32.em binutils-2.22/ld/emultempl/elf32.em ---- binutils-2.22.orig/ld/emultempl/elf32.em 2011-11-21 10:29:39.000000000 +0100 -+++ binutils-2.22/ld/emultempl/elf32.em 2011-12-14 19:52:12.880783238 +0100 -@@ -1273,6 +1273,8 @@ +--- + ld/emultempl/elf32.em | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/ld/emultempl/elf32.em ++++ b/ld/emultempl/elf32.em +@@ -1267,6 +1267,8 @@ && command_line.rpath == NULL) { lib_path = (const char *) getenv ("LD_RUN_PATH"); @@ -10,7 +13,7 @@ diff -durN binutils-2.22.orig/ld/emultempl/elf32.em binutils-2.22/ld/emultempl/e if (gld${EMULATION_NAME}_search_needed (lib_path, &n, force)) break; -@@ -1500,6 +1502,8 @@ +@@ -1518,6 +1520,8 @@ rpath = command_line.rpath; if (rpath == NULL) rpath = (const char *) getenv ("LD_RUN_PATH"); diff --git a/packages/binutils/2.24/310-fix-gold-pthreads-typo.patch b/packages/binutils/2.24/0005-fix-gold-pthreads-typo.patch index f2e6ff2..40861f5 100644 --- a/packages/binutils/2.24/310-fix-gold-pthreads-typo.patch +++ b/packages/binutils/2.24/0005-fix-gold-pthreads-typo.patch @@ -1,5 +1,9 @@ ---- binutils-2.25.1/gold/gold-threads.cc.orig 2014-10-14 08:32:04.000000000 +0100 -+++ binutils-2.25.1/gold/gold-threads.cc 2015-10-20 22:38:18.640819300 +0100 +--- + gold/gold-threads.cc | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/gold/gold-threads.cc ++++ b/gold/gold-threads.cc @@ -102,9 +102,9 @@ if (err != 0) gold_fatal(_("pthead_mutextattr_init failed: %s"), strerror(err)); diff --git a/packages/binutils/2.24/500-sysroot.patch b/packages/binutils/2.24/0006-sysroot.patch index e49c795..13b5288 100644 --- a/packages/binutils/2.24/500-sysroot.patch +++ b/packages/binutils/2.24/0006-sysroot.patch @@ -5,9 +5,13 @@ Always try to prepend the sysroot prefix to absolute filenames first. http://bugs.gentoo.org/275666 http://sourceware.org/bugzilla/show_bug.cgi?id=10340 +--- + ld/ldfile.c | 11 +++++++++-- + 1 file changed, 9 insertions(+), 2 deletions(-) + --- a/ld/ldfile.c +++ b/ld/ldfile.c -@@ -308,18 +308,25 @@ +@@ -341,18 +341,25 @@ directory first. */ if (! entry->flags.maybe_archive) { diff --git a/packages/binutils/2.24/600-poison-system-directories.patch b/packages/binutils/2.24/0007-poison-system-directories.patch index 6a3bf6b..dcd8c5c 100644 --- a/packages/binutils/2.24/600-poison-system-directories.patch +++ b/packages/binutils/2.24/0007-poison-system-directories.patch @@ -57,8 +57,18 @@ Code Merged from Sourcery G++ binutils 2.19 - 4.4-277 Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Scott Garman <scott.a.garman@intel.com> -Index: b/ld/config.in -=================================================================== +--- + ld/config.in | 3 +++ + ld/configure | 14 ++++++++++++++ + ld/configure.in | 10 ++++++++++ + ld/ld.h | 8 ++++++++ + ld/ld.texinfo | 12 ++++++++++++ + ld/ldfile.c | 17 +++++++++++++++++ + ld/ldlex.h | 2 ++ + ld/ldmain.c | 2 ++ + ld/lexsup.c | 21 +++++++++++++++++++++ + 9 files changed, 89 insertions(+) + --- a/ld/config.in +++ b/ld/config.in @@ -11,6 +11,9 @@ @@ -71,8 +81,6 @@ Index: b/ld/config.in /* Additional extension a shared object might have. */ #undef EXTRA_SHLIB_EXTENSION -Index: b/ld/configure -=================================================================== --- a/ld/configure +++ b/ld/configure @@ -774,6 +774,7 @@ @@ -111,8 +119,6 @@ Index: b/ld/configure # Check whether --enable-got was given. if test "${enable_got+set}" = set; then : -Index: b/ld/configure.in -=================================================================== --- a/ld/configure.in +++ b/ld/configure.in @@ -87,6 +87,16 @@ @@ -132,8 +138,6 @@ Index: b/ld/configure.in dnl Use --enable-gold to decide if this linker should be the default. dnl "install_as_default" is set to false if gold is the default linker. dnl "installed_linker" is the installed BFD linker name. -Index: b/ld/ldfile.c -=================================================================== --- a/ld/ldfile.c +++ b/ld/ldfile.c @@ -116,6 +116,23 @@ @@ -160,8 +164,6 @@ Index: b/ld/ldfile.c } /* Try to open a BFD for a lang_input_statement. */ -Index: b/ld/ld.h -=================================================================== --- a/ld/ld.h +++ b/ld/ld.h @@ -180,6 +180,14 @@ @@ -179,8 +181,6 @@ Index: b/ld/ld.h /* Big or little endian as set on command line. */ enum endian_enum endian; -Index: b/ld/ldmain.c -=================================================================== --- a/ld/ldmain.c +++ b/ld/ldmain.c @@ -266,6 +266,8 @@ @@ -192,8 +192,6 @@ Index: b/ld/ldmain.c /* We initialize DEMANGLING based on the environment variable COLLECT_NO_DEMANGLE. The gcc collect2 program will demangle the -Index: b/ld/ld.texinfo -=================================================================== --- a/ld/ld.texinfo +++ b/ld/ld.texinfo @@ -2175,6 +2175,18 @@ @@ -215,8 +213,6 @@ Index: b/ld/ld.texinfo @end table @c man end -Index: b/ld/lexsup.c -=================================================================== --- a/ld/lexsup.c +++ b/ld/lexsup.c @@ -507,6 +507,14 @@ @@ -264,8 +260,6 @@ Index: b/ld/lexsup.c while (ingroup) { lang_leave_group (); -Index: b/ld/ldlex.h -=================================================================== --- a/ld/ldlex.h +++ b/ld/ldlex.h @@ -138,6 +138,8 @@ diff --git a/packages/binutils/2.24/700-Fix-library-paths-on-PowerPC.patch b/packages/binutils/2.24/0008-Fix-library-paths-on-PowerPC.patch index cea92f3..887e93a 100644 --- a/packages/binutils/2.24/700-Fix-library-paths-on-PowerPC.patch +++ b/packages/binutils/2.24/0008-Fix-library-paths-on-PowerPC.patch @@ -13,14 +13,12 @@ depend on whether it is built on LE or BE machine. Signed-off-by: Alexey Neyman <stilor@att.net> --- - ld/emulparams/elf32ppccommon.sh | 10 +++++----- + ld/emulparams/elf32ppccommon.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) -diff --git a/ld/emulparams/elf32ppccommon.sh b/ld/emulparams/elf32ppccommon.sh -index 1f54ef8..d00cf68 100644 --- a/ld/emulparams/elf32ppccommon.sh +++ b/ld/emulparams/elf32ppccommon.sh -@@ -44,11 +44,11 @@ fi +@@ -46,11 +46,11 @@ # Look for 64 bit target libraries in /lib64, /usr/lib64 etc., first. # Similarly, look for 32 bit libraries in /lib32, /usr/lib32 etc. @@ -37,6 +35,3 @@ index 1f54ef8..d00cf68 100644 *:*64lppc*) LIBPATH_SUFFIX=64le ;; *:*32lppc*) LIBPATH_SUFFIX=32le ;; *:*64*) LIBPATH_SUFFIX=64 ;; --- -2.9.3 - diff --git a/packages/binutils/2.24/900-xtensa-trampolines.patch b/packages/binutils/2.24/0009-xtensa-trampolines.patch index b5b934f..c5bfb01 100644 --- a/packages/binutils/2.24/900-xtensa-trampolines.patch +++ b/packages/binutils/2.24/0009-xtensa-trampolines.patch @@ -35,22 +35,20 @@ Subject: [PATCH] Add support to the Xtensa target for creating trampolines for Backported from: a82c7d9030b67a6a76a5403d0e1641f9e42141ac Changes to Changelog files are dropped. - gas/config/tc-xtensa.c | 558 +++++++++++++++++++++++++++++++++- - gas/config/tc-xtensa.h | 5 + - gas/frags.c | 15 + - gas/frags.h | 3 + - gas/testsuite/gas/xtensa/all.exp | 1 + - gas/testsuite/gas/xtensa/trampoline.d | 26 ++ - gas/testsuite/gas/xtensa/trampoline.s | 21 ++ - 11 files changed, 753 insertions(+), 2 deletions(-) + gas/config/tc-xtensa.c | 558 +++++++++++++++++++++++++++++++++- + gas/config/tc-xtensa.h | 5 + gas/frags.c | 15 + gas/frags.h | 3 + gas/testsuite/gas/xtensa/all.exp | 1 + gas/testsuite/gas/xtensa/trampoline.d | 26 + + gas/testsuite/gas/xtensa/trampoline.s | 21 + + 7 files changed, 627 insertions(+), 2 deletions(-) create mode 100644 gas/testsuite/gas/xtensa/trampoline.d create mode 100644 gas/testsuite/gas/xtensa/trampoline.s -diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c -index fe8ec0f..ea23c96 100644 --- a/gas/config/tc-xtensa.c +++ b/gas/config/tc-xtensa.c -@@ -468,6 +468,12 @@ static void xtensa_set_frag_assembly_state (fragS *); +@@ -469,6 +469,12 @@ static void finish_vinsn (vliw_insn *); static bfd_boolean emit_single_op (TInsn *); static int total_frag_text_expansion (fragS *); @@ -63,7 +61,7 @@ index fe8ec0f..ea23c96 100644 /* Alignment Functions. */ -@@ -520,6 +526,7 @@ static void tinsn_from_chars (TInsn *, char *, int); +@@ -521,6 +527,7 @@ static void tinsn_immed_from_frag (TInsn *, fragS *, int); static int get_num_stack_text_bytes (IStack *); static int get_num_stack_literal_bytes (IStack *); @@ -71,7 +69,7 @@ index fe8ec0f..ea23c96 100644 /* vliw_insn functions. */ -@@ -687,7 +694,10 @@ enum +@@ -688,7 +695,10 @@ option_prefer_l32r, option_prefer_const16, @@ -83,7 +81,7 @@ index fe8ec0f..ea23c96 100644 }; const char *md_shortopts = ""; -@@ -760,6 +770,9 @@ struct option md_longopts[] = +@@ -761,6 +771,9 @@ { "target-hardware", required_argument, NULL, option_target_hardware }, @@ -93,7 +91,7 @@ index fe8ec0f..ea23c96 100644 { NULL, no_argument, NULL, 0 } }; -@@ -940,6 +953,14 @@ md_parse_option (int c, char *arg) +@@ -941,6 +954,14 @@ directive_state[directive_transform] = FALSE; return 1; @@ -108,7 +106,7 @@ index fe8ec0f..ea23c96 100644 default: return 0; } -@@ -963,7 +984,9 @@ Xtensa options:\n\ +@@ -964,7 +985,9 @@ flix bundles\n\ --no-allow-flix neither allow hand-written nor generate\n\ flix bundles\n\ @@ -119,7 +117,7 @@ index fe8ec0f..ea23c96 100644 } -@@ -5568,6 +5591,8 @@ md_assemble (char *str) +@@ -5569,6 +5592,8 @@ /* We've just emitted a new instruction so clear the list of labels. */ xtensa_clear_insn_labels (); @@ -128,7 +126,7 @@ index fe8ec0f..ea23c96 100644 } -@@ -6372,6 +6397,8 @@ finish_vinsn (vliw_insn *vinsn) +@@ -6373,6 +6398,8 @@ xg_assemble_vliw_tokens (vinsn); xg_clear_vinsn (vinsn); @@ -137,7 +135,7 @@ index fe8ec0f..ea23c96 100644 } -@@ -7140,6 +7167,7 @@ xg_assemble_vliw_tokens (vliw_insn *vinsn) +@@ -7141,6 +7168,7 @@ RELAX_UNREACHABLE, frag_now->fr_symbol, frag_now->fr_offset, NULL); xtensa_set_frag_assembly_state (frag_now); @@ -145,7 +143,7 @@ index fe8ec0f..ea23c96 100644 } else if (is_branch && do_align_targets ()) { -@@ -7222,9 +7250,164 @@ xtensa_end (void) +@@ -7223,9 +7251,164 @@ xtensa_sanity_check (); xtensa_add_config_info (); @@ -310,7 +308,7 @@ index fe8ec0f..ea23c96 100644 static void xtensa_cleanup_align_frags (void) { -@@ -8708,6 +8891,149 @@ xtensa_relax_frag (fragS *fragP, long stretch, int *stretched_p) +@@ -8709,6 +8892,149 @@ new_stretch += relax_frag_for_align (fragP, stretch); break; @@ -460,7 +458,7 @@ index fe8ec0f..ea23c96 100644 default: as_bad (_("bad relaxation state")); } -@@ -9146,6 +9472,200 @@ bytes_to_stretch (fragS *this_frag, +@@ -9147,6 +9473,200 @@ } @@ -661,7 +659,7 @@ index fe8ec0f..ea23c96 100644 static long relax_frag_immed (segT segP, fragS *fragP, -@@ -9284,6 +9804,37 @@ relax_frag_immed (segT segP, +@@ -9285,6 +9805,37 @@ if (negatable_branch && istack.ninsn > 1) update_next_frag_state (fragP); @@ -699,7 +697,7 @@ index fe8ec0f..ea23c96 100644 return this_text_diff; } -@@ -9404,6 +9955,9 @@ md_convert_frag (bfd *abfd ATTRIBUTE_UNUSED, segT sec, fragS *fragp) +@@ -9405,6 +9956,9 @@ else as_bad (_("invalid relaxation fragment result")); break; @@ -709,11 +707,9 @@ index fe8ec0f..ea23c96 100644 } fragp->fr_var = 0; -diff --git a/gas/config/tc-xtensa.h b/gas/config/tc-xtensa.h -index 0bf1240..4672bc6 100644 --- a/gas/config/tc-xtensa.h +++ b/gas/config/tc-xtensa.h -@@ -180,6 +180,11 @@ enum xtensa_relax_statesE +@@ -181,6 +181,11 @@ prevent the linker from changing the size of any frag between the section start and the org frag. */ @@ -725,11 +721,9 @@ index 0bf1240..4672bc6 100644 RELAX_NONE }; -diff --git a/gas/frags.c b/gas/frags.c -index 5f68480..e14099d 100644 --- a/gas/frags.c +++ b/gas/frags.c -@@ -24,6 +24,20 @@ +@@ -26,6 +26,20 @@ extern fragS zero_address_frag; extern fragS predefined_address_frag; @@ -750,7 +744,7 @@ index 5f68480..e14099d 100644 /* Initialization for frag routines. */ -@@ -70,6 +84,7 @@ frag_alloc (struct obstack *ob) +@@ -72,6 +86,7 @@ ptr = (fragS *) obstack_alloc (ob, SIZEOF_STRUCT_FRAG); obstack_alignment_mask (ob) = oalign; memset (ptr, 0, SIZEOF_STRUCT_FRAG); @@ -758,11 +752,9 @@ index 5f68480..e14099d 100644 return ptr; } -diff --git a/gas/frags.h b/gas/frags.h -index 319898f..2f9e1b5 100644 --- a/gas/frags.h +++ b/gas/frags.h -@@ -155,4 +155,7 @@ char *frag_var (relax_stateT type, +@@ -157,4 +157,7 @@ bfd_boolean frag_offset_fixed_p (const fragS *, const fragS *, offsetT *); @@ -770,11 +762,9 @@ index 319898f..2f9e1b5 100644 +void clear_frag_count (void); + #endif /* FRAGS_H */ -diff --git a/gas/testsuite/gas/xtensa/all.exp b/gas/testsuite/gas/xtensa/all.exp -index 2b2c294..3683b78 100644 --- a/gas/testsuite/gas/xtensa/all.exp +++ b/gas/testsuite/gas/xtensa/all.exp -@@ -98,6 +98,7 @@ if [istarget xtensa*-*-*] then { +@@ -99,6 +99,7 @@ run_dump_test "pcrel" run_dump_test "weak-call" run_dump_test "jlong" @@ -782,9 +772,6 @@ index 2b2c294..3683b78 100644 } if [info exists errorInfo] then { -diff --git a/gas/testsuite/gas/xtensa/trampoline.d b/gas/testsuite/gas/xtensa/trampoline.d -new file mode 100644 -index 0000000..b4f65dc --- /dev/null +++ b/gas/testsuite/gas/xtensa/trampoline.d @@ -0,0 +1,26 @@ @@ -814,9 +801,6 @@ index 0000000..b4f65dc +.*33462:.*j.0x49407 +#... +.*49407:.*j.0x49407 -diff --git a/gas/testsuite/gas/xtensa/trampoline.s b/gas/testsuite/gas/xtensa/trampoline.s -new file mode 100644 -index 0000000..259a3bb --- /dev/null +++ b/gas/testsuite/gas/xtensa/trampoline.s @@ -0,0 +1,21 @@ @@ -841,6 +825,3 @@ index 0000000..259a3bb + .endr +3: + j 3b --- -1.8.1.4 - diff --git a/packages/binutils/2.24/901-xtensa-gas-first-frag-alignment.patch b/packages/binutils/2.24/0010-xtensa-gas-first-frag-alignment.patch index e1c2d85..88e6990 100644 --- a/packages/binutils/2.24/901-xtensa-gas-first-frag-alignment.patch +++ b/packages/binutils/2.24/0010-xtensa-gas-first-frag-alignment.patch @@ -31,14 +31,12 @@ gas/ Backported from: a35d5e823fdfe8a6e7e05ca8e3fb8bb5697335b1 Changes to Changelog files and tests are dropped. - gas/config/tc-xtensa.c | 1 - + gas/config/tc-xtensa.c | 1 - 1 file changed, 1 deletion(-) -diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c -index ea23c96..58ace38 100644 --- a/gas/config/tc-xtensa.c +++ b/gas/config/tc-xtensa.c -@@ -5609,7 +5609,6 @@ xtensa_handle_align (fragS *fragP) +@@ -5610,7 +5610,6 @@ && ! fragP->tc_frag_data.is_literal && (fragP->fr_type == rs_align || fragP->fr_type == rs_align_code) @@ -46,6 +44,3 @@ index ea23c96..58ace38 100644 && fragP->fr_offset > 0 && now_seg != bss_section) { --- -1.8.1.4 - diff --git a/packages/binutils/2.24/902-xtensa-gas-ld-diff-relocation-signed.patch b/packages/binutils/2.24/0011-xtensa-gas-ld-diff-relocation-signed.patch index ba24f4e..b4f903d 100644 --- a/packages/binutils/2.24/902-xtensa-gas-ld-diff-relocation-signed.patch +++ b/packages/binutils/2.24/0011-xtensa-gas-ld-diff-relocation-signed.patch @@ -22,15 +22,13 @@ gas/ Backported from: 1058c7532d0b012ac329219264ddad59049fb6e6 Changes to Changelog files and tests are dropped. - bfd/elf32-xtensa.c | 32 ++++++++++++----------- - gas/config/tc-xtensa.c | 3 +++ + bfd/elf32-xtensa.c | 32 +++++++++++++++++--------------- + gas/config/tc-xtensa.c | 3 +++ 2 files changed, 20 insertions(+), 15 deletions(-) -diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c -index edb04b4..8818d67 100644 --- a/bfd/elf32-xtensa.c +++ b/bfd/elf32-xtensa.c -@@ -222,11 +222,11 @@ static reloc_howto_type elf_howto_table[] = +@@ -223,11 +223,11 @@ FALSE, 0, 0, FALSE), /* Relocations for supporting difference of symbols. */ @@ -45,7 +43,7 @@ index edb04b4..8818d67 100644 bfd_elf_xtensa_reloc, "R_XTENSA_DIFF32", FALSE, 0, 0xffffffff, FALSE), /* General immediate operand relocations. */ -@@ -9013,7 +9013,8 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info) +@@ -9012,7 +9012,8 @@ || r_type == R_XTENSA_DIFF16 || r_type == R_XTENSA_DIFF32) { @@ -55,7 +53,7 @@ index edb04b4..8818d67 100644 if (bfd_get_section_limit (abfd, sec) < old_source_offset) { -@@ -9027,15 +9028,15 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info) +@@ -9026,15 +9027,15 @@ { case R_XTENSA_DIFF8: diff_value = @@ -74,7 +72,7 @@ index edb04b4..8818d67 100644 break; } -@@ -9047,24 +9048,25 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info) +@@ -9046,24 +9047,25 @@ switch (r_type) { case R_XTENSA_DIFF8: @@ -108,11 +106,9 @@ index edb04b4..8818d67 100644 { (*link_info->callbacks->reloc_dangerous) (link_info, _("overflow after relaxation"), -diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c -index 58ace38..7547c0a0 100644 --- a/gas/config/tc-xtensa.c +++ b/gas/config/tc-xtensa.c -@@ -5867,12 +5867,15 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg) +@@ -5868,12 +5868,15 @@ { case BFD_RELOC_8: fixP->fx_r_type = BFD_RELOC_XTENSA_DIFF8; @@ -128,6 +124,3 @@ index 58ace38..7547c0a0 100644 break; default: break; --- -1.8.1.4 - diff --git a/packages/binutils/2.24/903-xtensa-fix-ld-segfault-when-linking-linux-modules.patch b/packages/binutils/2.24/0012-xtensa-fix-ld-segfault-when-linking-linux-modules.patch index 6a0846e..57cd0bf 100644 --- a/packages/binutils/2.24/903-xtensa-fix-ld-segfault-when-linking-linux-modules.patch +++ b/packages/binutils/2.24/0012-xtensa-fix-ld-segfault-when-linking-linux-modules.patch @@ -26,14 +26,12 @@ ld/ Backported from: e7d17e71cdc10a2e81e454ce3b9637f1b2a587f2 Changes to ld/ChangeLog file are dropped. - ld/emultempl/xtensaelf.em | 2 +- + ld/emultempl/xtensaelf.em | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/ld/emultempl/xtensaelf.em b/ld/emultempl/xtensaelf.em -index 151eea4..948d18d 100644 --- a/ld/emultempl/xtensaelf.em +++ b/ld/emultempl/xtensaelf.em -@@ -1310,7 +1310,7 @@ is_inconsistent_linkonce_section (asection *sec) +@@ -1311,7 +1311,7 @@ for Tensilica's XCC compiler. */ name = sec_name + linkonce_len; if (CONST_STRNEQ (name, "prop.")) @@ -42,6 +40,3 @@ index 151eea4..948d18d 100644 else if (name[1] == '.' && (name[0] == 'p' || name[0] == 'e' || name[0] == 'h')) name += 2; --- -1.8.1.4 - diff --git a/packages/binutils/2.24/904-Fix-call8-call-target-out-of-range-xtensa-ld-relaxation.patch b/packages/binutils/2.24/0013-Fix-call8-call-target-out-of-range-xtensa-ld-relaxation.patch index e4c600e..c31d01c 100644 --- a/packages/binutils/2.24/904-Fix-call8-call-target-out-of-range-xtensa-ld-relaxation.patch +++ b/packages/binutils/2.24/0013-Fix-call8-call-target-out-of-range-xtensa-ld-relaxation.patch @@ -19,14 +19,12 @@ bfd/ Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> --- - bfd/elf32-xtensa.c | 41 +++++++++++++++++++++++++++++++++++++---- + bfd/elf32-xtensa.c | 41 +++++++++++++++++++++++++++++++++++++---- 1 file changed, 37 insertions(+), 4 deletions(-) -diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c -index 09862e3..e32496a 100644 --- a/bfd/elf32-xtensa.c +++ b/bfd/elf32-xtensa.c -@@ -7124,10 +7124,43 @@ is_resolvable_asm_expansion (bfd *abfd, +@@ -7123,10 +7123,43 @@ || is_reloc_sym_weak (abfd, irel))) return FALSE; @@ -74,6 +72,3 @@ index 09862e3..e32496a 100644 *is_reachable_p = pcrel_reloc_fits (direct_call_opcode, 0, self_address, dest_address); --- -1.8.1.4 - diff --git a/packages/binutils/2.24/905-Fix-trampolines-search-code-for-conditional-branches.patch b/packages/binutils/2.24/0014-Fix-trampolines-search-code-for-conditional-branches.patch index 8aeb064..a4e7b5c 100644 --- a/packages/binutils/2.24/905-Fix-trampolines-search-code-for-conditional-branches.patch +++ b/packages/binutils/2.24/0014-Fix-trampolines-search-code-for-conditional-branches.patch @@ -28,16 +28,14 @@ Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Backported from: d92b6eece424f0ad35d96fdd85bf207295e8c4c3 Changes to ChangeLogs are dropped. - gas/config/tc-xtensa.c | 8 ++++---- - gas/testsuite/gas/xtensa/trampoline.d | 9 +++++++++ - gas/testsuite/gas/xtensa/trampoline.s | 7 +++++++ + gas/config/tc-xtensa.c | 8 ++++---- + gas/testsuite/gas/xtensa/trampoline.d | 9 +++++++++ + gas/testsuite/gas/xtensa/trampoline.s | 7 +++++++ 3 files changed, 20 insertions(+), 4 deletions(-) -diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c -index d11b0c7..f23ccf8 100644 --- a/gas/config/tc-xtensa.c +++ b/gas/config/tc-xtensa.c -@@ -9514,11 +9514,11 @@ search_trampolines (TInsn *tinsn, fragS *fragP, bfd_boolean unreachable_only) +@@ -9515,11 +9515,11 @@ if (next_addr == 0 || addr - next_addr > J_RANGE) break; } @@ -53,8 +51,6 @@ index d11b0c7..f23ccf8 100644 } for ( ; tf; tf = tf->next) { -diff --git a/gas/testsuite/gas/xtensa/trampoline.d b/gas/testsuite/gas/xtensa/trampoline.d -index b4f65dc..5ae32a6 100644 --- a/gas/testsuite/gas/xtensa/trampoline.d +++ b/gas/testsuite/gas/xtensa/trampoline.d @@ -24,3 +24,12 @@ @@ -70,8 +66,6 @@ index b4f65dc..5ae32a6 100644 +#... +.*927f5:.*j.0x927f5 +#... -diff --git a/gas/testsuite/gas/xtensa/trampoline.s b/gas/testsuite/gas/xtensa/trampoline.s -index 259a3bb..4465786 100644 --- a/gas/testsuite/gas/xtensa/trampoline.s +++ b/gas/testsuite/gas/xtensa/trampoline.s @@ -19,3 +19,10 @@ @@ -85,6 +79,3 @@ index 259a3bb..4465786 100644 + .endr +4: + j 4b --- -1.8.1.4 - diff --git a/packages/binutils/2.24/906-xtensa-optimize-check_section_ebb_pcrels_fit.patch b/packages/binutils/2.24/0015-xtensa-optimize-check_section_ebb_pcrels_fit.patch index 8a21100..e4af610 100644 --- a/packages/binutils/2.24/906-xtensa-optimize-check_section_ebb_pcrels_fit.patch +++ b/packages/binutils/2.24/0015-xtensa-optimize-check_section_ebb_pcrels_fit.patch @@ -76,14 +76,12 @@ bfd/ Backported from: b2b326d246f839ee218192ac88da2384d929a072 Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> --- - bfd/elf32-xtensa.c | 321 +++++++++++++++++++++++++++++++++++++++++++++++++---- + bfd/elf32-xtensa.c | 321 +++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 298 insertions(+), 23 deletions(-) -diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c -index 0b6f584..872370b 100644 --- a/bfd/elf32-xtensa.c +++ b/bfd/elf32-xtensa.c -@@ -6619,8 +6619,10 @@ static bfd_boolean compute_text_actions +@@ -6614,8 +6614,10 @@ (bfd *, asection *, struct bfd_link_info *); static bfd_boolean compute_ebb_proposed_actions (ebb_constraint *); static bfd_boolean compute_ebb_actions (ebb_constraint *); @@ -95,7 +93,7 @@ index 0b6f584..872370b 100644 const xtensa_opcode *); static bfd_boolean check_section_ebb_reduces (const ebb_constraint *); static void text_action_add_proposed -@@ -7219,6 +7221,221 @@ build_reloc_opcodes (bfd *abfd, +@@ -7214,6 +7216,221 @@ return reloc_opcodes; } @@ -317,7 +315,7 @@ index 0b6f584..872370b 100644 /* The compute_text_actions function will build a list of potential transformation actions for code in the extended basic block of each -@@ -7245,6 +7462,7 @@ compute_text_actions (bfd *abfd, +@@ -7240,6 +7457,7 @@ property_table_entry *prop_table = 0; int ptblsize = 0; bfd_size_type sec_size; @@ -325,7 +323,7 @@ index 0b6f584..872370b 100644 relax_info = get_xtensa_relax_info (sec); BFD_ASSERT (relax_info); -@@ -7277,6 +7495,12 @@ compute_text_actions (bfd *abfd, +@@ -7272,6 +7490,12 @@ goto error_return; } @@ -338,7 +336,7 @@ index 0b6f584..872370b 100644 for (i = 0; i < sec->reloc_count; i++) { Elf_Internal_Rela *irel = &internal_relocs[i]; -@@ -7340,17 +7564,13 @@ compute_text_actions (bfd *abfd, +@@ -7335,17 +7559,13 @@ ebb->start_reloc_idx = i; ebb->end_reloc_idx = i; @@ -359,7 +357,7 @@ index 0b6f584..872370b 100644 || !check_section_ebb_reduces (&ebb_table)) { /* If anything goes wrong or we get unlucky and something does -@@ -7372,6 +7592,8 @@ compute_text_actions (bfd *abfd, +@@ -7367,6 +7587,8 @@ free_ebb_constraint (&ebb_table); } @@ -368,7 +366,7 @@ index 0b6f584..872370b 100644 #if DEBUG if (relax_info->action_list.head) print_action_list (stderr, &relax_info->action_list); -@@ -7974,14 +8196,17 @@ check_section_ebb_pcrels_fit (bfd *abfd, +@@ -7969,14 +8191,17 @@ asection *sec, bfd_byte *contents, Elf_Internal_Rela *internal_relocs, @@ -386,7 +384,7 @@ index 0b6f584..872370b 100644 relax_info = get_xtensa_relax_info (sec); -@@ -7992,7 +8217,40 @@ check_section_ebb_pcrels_fit (bfd *abfd, +@@ -7987,7 +8212,40 @@ can still be used. */ } @@ -428,7 +426,7 @@ index 0b6f584..872370b 100644 { r_reloc r_rel; bfd_vma orig_self_offset, orig_target_offset; -@@ -8001,7 +8259,15 @@ check_section_ebb_pcrels_fit (bfd *abfd, +@@ -7996,7 +8254,15 @@ reloc_howto_type *howto; int self_removed_bytes, target_removed_bytes; @@ -445,7 +443,7 @@ index 0b6f584..872370b 100644 r_type = ELF32_R_TYPE (irel->r_info); howto = &elf_howto_table[r_type]; -@@ -8067,21 +8333,30 @@ check_section_ebb_pcrels_fit (bfd *abfd, +@@ -8062,21 +8328,30 @@ xtensa_opcode opcode; int opnum; @@ -488,7 +486,7 @@ index 0b6f584..872370b 100644 } if (!pcrel_reloc_fits (opcode, opnum, self_offset, target_offset)) -@@ -8778,7 +9053,7 @@ move_shared_literal (asection *sec, +@@ -8773,7 +9048,7 @@ /* Check all of the PC-relative relocations to make sure they still fit. */ relocs_fit = check_section_ebb_pcrels_fit (target_sec->owner, target_sec, target_sec_cache->contents, @@ -497,6 +495,3 @@ index 0b6f584..872370b 100644 &ebb_table, NULL); if (!relocs_fit) --- -1.8.1.4 - diff --git a/packages/binutils/2.24/907-xtensa-optimize-removed_by_actions.patch b/packages/binutils/2.24/0016-xtensa-optimize-removed_by_actions.patch index 9df8065..2ce6a19 100644 --- a/packages/binutils/2.24/907-xtensa-optimize-removed_by_actions.patch +++ b/packages/binutils/2.24/0016-xtensa-optimize-removed_by_actions.patch @@ -50,14 +50,12 @@ bfd/ Backported from: 071aa5c98a31c966f5fbfc573fcee61350fd1936 Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> --- - bfd/elf32-xtensa.c | 181 +++++++++++++++++++++++++++++++++++++++++++++-------- + bfd/elf32-xtensa.c | 181 +++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 156 insertions(+), 25 deletions(-) -diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c -index 872370b..21b2871 100644 --- a/bfd/elf32-xtensa.c +++ b/bfd/elf32-xtensa.c -@@ -5420,11 +5420,28 @@ struct text_action_struct +@@ -5415,11 +5415,28 @@ text_action *next; }; @@ -86,7 +84,7 @@ index 872370b..21b2871 100644 }; -@@ -5636,6 +5653,101 @@ action_list_count (text_action_list *action_list) +@@ -5631,6 +5648,101 @@ return count; } @@ -188,7 +186,7 @@ index 872370b..21b2871 100644 /* The find_insn_action routine will only find non-fill actions. */ -@@ -5909,6 +6021,9 @@ init_xtensa_relax_info (asection *sec) +@@ -5904,6 +6016,9 @@ relax_info->action_list.head = NULL; @@ -198,7 +196,7 @@ index 872370b..21b2871 100644 relax_info->fix_list = NULL; relax_info->fix_array = NULL; relax_info->fix_array_count = 0; -@@ -9218,7 +9333,7 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info) +@@ -9213,7 +9328,7 @@ if (elf_hash_table (link_info)->dynamic_sections_created) shrink_dynamic_reloc_sections (link_info, abfd, sec, irel); irel->r_info = ELF32_R_INFO (0, R_XTENSA_NONE); @@ -207,7 +205,7 @@ index 872370b..21b2871 100644 (&relax_info->action_list, irel->r_offset); continue; } -@@ -9255,7 +9370,7 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info) +@@ -9250,7 +9365,7 @@ } } @@ -216,7 +214,7 @@ index 872370b..21b2871 100644 (&relax_info->action_list, irel->r_offset); irel->r_offset = source_offset; } -@@ -9352,7 +9467,7 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info) +@@ -9347,7 +9462,7 @@ break; } @@ -225,7 +223,7 @@ index 872370b..21b2871 100644 (&target_relax_info->action_list, r_rel.target_offset + diff_value); diff_value = new_end_offset - new_reloc.target_offset; -@@ -9750,7 +9865,6 @@ translate_reloc (const r_reloc *orig_rel, r_reloc *new_rel, asection *sec) +@@ -9745,7 +9860,6 @@ xtensa_relax_info *relax_info; removed_literal *removed; bfd_vma target_offset, base_offset; @@ -233,7 +231,7 @@ index 872370b..21b2871 100644 *new_rel = *orig_rel; -@@ -9803,19 +9917,26 @@ translate_reloc (const r_reloc *orig_rel, r_reloc *new_rel, asection *sec) +@@ -9798,19 +9912,26 @@ offset. */ base_offset = r_reloc_get_target_offset (new_rel) - new_rel->rela.r_addend; @@ -265,7 +263,7 @@ index 872370b..21b2871 100644 new_rel->target_offset = target_offset - tgt_removed; new_rel->rela.r_addend += addend_removed; } -@@ -10138,9 +10259,10 @@ relax_property_section (bfd *abfd, +@@ -10133,9 +10254,10 @@ bfd_vma old_offset = val.r_rel.target_offset; bfd_vma new_offset; long old_size, new_size; @@ -279,7 +277,7 @@ index 872370b..21b2871 100644 /* Assert that we are not out of bounds. */ old_size = bfd_get_32 (abfd, size_p); -@@ -10164,9 +10286,10 @@ relax_property_section (bfd *abfd, +@@ -10159,9 +10281,10 @@ /* Recompute the new_offset, but this time don't include any fill inserted by relaxation. */ @@ -293,7 +291,7 @@ index 872370b..21b2871 100644 /* If it is not unreachable and we have not yet seen an unreachable at this address, place it -@@ -10182,8 +10305,12 @@ relax_property_section (bfd *abfd, +@@ -10177,8 +10300,12 @@ } } else @@ -308,7 +306,7 @@ index 872370b..21b2871 100644 if (new_size != old_size) { -@@ -10441,14 +10568,16 @@ relax_section_symbols (bfd *abfd, asection *sec) +@@ -10436,14 +10563,16 @@ if (isym->st_shndx == sec_shndx) { @@ -329,7 +327,7 @@ index 872370b..21b2871 100644 } } -@@ -10466,15 +10595,17 @@ relax_section_symbols (bfd *abfd, asection *sec) +@@ -10461,15 +10590,17 @@ || sym_hash->root.type == bfd_link_hash_defweak) && sym_hash->root.u.def.section == sec) { @@ -351,6 +349,3 @@ index 872370b..21b2871 100644 } } --- -1.8.1.4 - diff --git a/packages/binutils/2.24/908-xtensa-optimize-find_removed_literal.patch b/packages/binutils/2.24/0017-xtensa-optimize-find_removed_literal.patch index 96d526f..3b64fd8 100644 --- a/packages/binutils/2.24/908-xtensa-optimize-find_removed_literal.patch +++ b/packages/binutils/2.24/0017-xtensa-optimize-find_removed_literal.patch @@ -38,14 +38,12 @@ bfd/ Backported from: 3439c466273378021821473d3fc84990e089ae34 Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> --- - bfd/elf32-xtensa.c | 64 +++++++++++++++++++++++++++++++++++++++++++++++++----- + bfd/elf32-xtensa.c | 64 ++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 58 insertions(+), 6 deletions(-) -diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c -index 21b2871..51733ad 100644 --- a/bfd/elf32-xtensa.c +++ b/bfd/elf32-xtensa.c -@@ -5832,6 +5832,7 @@ print_action_list (FILE *fp, text_action_list *action_list) +@@ -5827,6 +5827,7 @@ by the "from" offset field. */ typedef struct removed_literal_struct removed_literal; @@ -53,7 +51,7 @@ index 21b2871..51733ad 100644 typedef struct removed_literal_list_struct removed_literal_list; struct removed_literal_struct -@@ -5841,10 +5842,19 @@ struct removed_literal_struct +@@ -5836,10 +5837,19 @@ removed_literal *next; }; @@ -73,7 +71,7 @@ index 21b2871..51733ad 100644 }; -@@ -5893,6 +5903,39 @@ add_removed_literal (removed_literal_list *removed_list, +@@ -5888,6 +5898,39 @@ } } @@ -113,7 +111,7 @@ index 21b2871..51733ad 100644 /* Check if the list of removed literals contains an entry for the given address. Return the entry if found. */ -@@ -5900,12 +5943,21 @@ add_removed_literal (removed_literal_list *removed_list, +@@ -5895,12 +5938,21 @@ static removed_literal * find_removed_literal (removed_literal_list *removed_list, bfd_vma addr) { @@ -141,6 +139,3 @@ index 21b2871..51733ad 100644 } --- -1.8.1.4 - diff --git a/packages/binutils/2.24/909-xtensa-replace-action-list-with-splay-tree.patch b/packages/binutils/2.24/0018-xtensa-replace-action-list-with-splay-tree.patch index 3090cc2..dd7ff8f 100644 --- a/packages/binutils/2.24/909-xtensa-replace-action-list-with-splay-tree.patch +++ b/packages/binutils/2.24/0018-xtensa-replace-action-list-with-splay-tree.patch @@ -73,14 +73,12 @@ bfd/ Backported from: 4c2af04fe8b4452bf51d2debf1bb467fafcd0f08 Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> --- - bfd/elf32-xtensa.c | 488 +++++++++++++++++++++++++++++++---------------------- + bfd/elf32-xtensa.c | 488 ++++++++++++++++++++++++++++++----------------------- 1 file changed, 282 insertions(+), 206 deletions(-) -diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c -index 51733ad..53af1c6 100644 --- a/bfd/elf32-xtensa.c +++ b/bfd/elf32-xtensa.c -@@ -28,6 +28,7 @@ +@@ -29,6 +29,7 @@ #include "libbfd.h" #include "elf-bfd.h" #include "elf/xtensa.h" @@ -88,7 +86,7 @@ index 51733ad..53af1c6 100644 #include "xtensa-isa.h" #include "xtensa-config.h" -@@ -5416,8 +5417,6 @@ struct text_action_struct +@@ -5411,8 +5412,6 @@ bfd_vma virtual_offset; /* Zero except for adding literals. */ int removed_bytes; literal_value value; /* Only valid when adding literals. */ @@ -97,7 +95,7 @@ index 51733ad..53af1c6 100644 }; struct removal_by_action_entry_struct -@@ -5440,7 +5439,8 @@ typedef struct removal_by_action_map_struct removal_by_action_map; +@@ -5435,7 +5434,8 @@ /* List of all of the actions taken on a text section. */ struct text_action_list_struct { @@ -107,7 +105,7 @@ index 51733ad..53af1c6 100644 removal_by_action_map map; }; -@@ -5448,20 +5448,18 @@ struct text_action_list_struct +@@ -5443,20 +5443,18 @@ static text_action * find_fill_action (text_action_list *l, asection *sec, bfd_vma offset) { @@ -135,7 +133,7 @@ index 51733ad..53af1c6 100644 return NULL; } -@@ -5509,6 +5507,49 @@ adjust_fill_action (text_action *ta, int fill_diff) +@@ -5504,6 +5502,49 @@ } @@ -185,7 +183,7 @@ index 51733ad..53af1c6 100644 /* Add a modification action to the text. For the case of adding or removing space, modify any current fill and assume that "unreachable_space" bytes can be freely contracted. Note that a -@@ -5521,8 +5562,8 @@ text_action_add (text_action_list *l, +@@ -5516,8 +5557,8 @@ bfd_vma offset, int removed) { @@ -195,7 +193,7 @@ index 51733ad..53af1c6 100644 /* It is not necessary to fill at the end of a section. */ if (action == ta_fill && sec->size == offset) -@@ -5532,34 +5573,30 @@ text_action_add (text_action_list *l, +@@ -5527,34 +5568,30 @@ if (action == ta_fill && removed == 0) return; @@ -243,7 +241,7 @@ index 51733ad..53af1c6 100644 } -@@ -5570,7 +5607,6 @@ text_action_add_literal (text_action_list *l, +@@ -5565,7 +5602,6 @@ const literal_value *value, int removed) { @@ -251,7 +249,7 @@ index 51733ad..53af1c6 100644 text_action *ta; asection *sec = r_reloc_get_section (loc); bfd_vma offset = loc->target_offset; -@@ -5578,14 +5614,6 @@ text_action_add_literal (text_action_list *l, +@@ -5573,14 +5609,6 @@ BFD_ASSERT (action == ta_add_literal); @@ -266,7 +264,7 @@ index 51733ad..53af1c6 100644 /* Create a new record and fill it up. */ ta = (text_action *) bfd_zmalloc (sizeof (text_action)); ta->action = action; -@@ -5594,8 +5622,10 @@ text_action_add_literal (text_action_list *l, +@@ -5589,8 +5617,10 @@ ta->virtual_offset = virtual_offset; ta->value = *value; ta->removed_bytes = removed; @@ -279,7 +277,7 @@ index 51733ad..53af1c6 100644 } -@@ -5606,7 +5636,8 @@ text_action_add_literal (text_action_list *l, +@@ -5601,7 +5631,8 @@ so that each search may begin where the previous one left off. */ static int @@ -289,7 +287,7 @@ index 51733ad..53af1c6 100644 bfd_vma offset, bfd_boolean before_fill) { -@@ -5614,6 +5645,13 @@ removed_by_actions (text_action **p_start_action, +@@ -5609,6 +5640,13 @@ int removed = 0; r = *p_start_action; @@ -303,7 +301,7 @@ index 51733ad..53af1c6 100644 while (r) { if (r->offset > offset) -@@ -5625,7 +5663,7 @@ removed_by_actions (text_action **p_start_action, +@@ -5620,7 +5658,7 @@ removed += r->removed_bytes; @@ -312,7 +310,7 @@ index 51733ad..53af1c6 100644 } *p_start_action = r; -@@ -5636,68 +5674,74 @@ removed_by_actions (text_action **p_start_action, +@@ -5631,68 +5669,74 @@ static bfd_vma offset_with_removed_text (text_action_list *action_list, bfd_vma offset) { @@ -429,7 +427,7 @@ index 51733ad..53af1c6 100644 } static int -@@ -5754,28 +5798,26 @@ offset_with_removed_text_map (text_action_list *action_list, bfd_vma offset) +@@ -5749,28 +5793,26 @@ static text_action * find_insn_action (text_action_list *action_list, bfd_vma offset) { @@ -477,50 +475,20 @@ index 51733ad..53af1c6 100644 } return NULL; } -@@ -5784,40 +5826,50 @@ find_insn_action (text_action_list *action_list, bfd_vma offset) +@@ -5779,40 +5821,50 @@ #if DEBUG static void -print_action_list (FILE *fp, text_action_list *action_list) +print_action (FILE *fp, text_action *r) -+{ -+ const char *t = "unknown"; -+ switch (r->action) -+ { -+ case ta_remove_insn: -+ t = "remove_insn"; break; -+ case ta_remove_longcall: -+ t = "remove_longcall"; break; -+ case ta_convert_longcall: -+ t = "convert_longcall"; break; -+ case ta_narrow_insn: -+ t = "narrow_insn"; break; -+ case ta_widen_insn: -+ t = "widen_insn"; break; -+ case ta_fill: -+ t = "fill"; break; -+ case ta_none: -+ t = "none"; break; -+ case ta_remove_literal: -+ t = "remove_literal"; break; -+ case ta_add_literal: -+ t = "add_literal"; break; -+ } -+ -+ fprintf (fp, "%s: %s[0x%lx] \"%s\" %d\n", -+ r->sec->owner->filename, -+ r->sec->name, (unsigned long) r->offset, t, r->removed_bytes); -+} -+ -+static int -+print_action_list_fn (splay_tree_node node, void *p) { - text_action *r; -+ text_action *r = (text_action *)node->value; - +- - fprintf (fp, "Text Action\n"); - for (r = action_list->head; r != NULL; r = r->next) -- { ++ const char *t = "unknown"; ++ switch (r->action) + { - const char *t = "unknown"; - switch (r->action) - { @@ -543,14 +511,44 @@ index 51733ad..53af1c6 100644 - case ta_add_literal: - t = "add_literal"; break; - } -+ print_action (p, r); -+ return 0; ++ case ta_remove_insn: ++ t = "remove_insn"; break; ++ case ta_remove_longcall: ++ t = "remove_longcall"; break; ++ case ta_convert_longcall: ++ t = "convert_longcall"; break; ++ case ta_narrow_insn: ++ t = "narrow_insn"; break; ++ case ta_widen_insn: ++ t = "widen_insn"; break; ++ case ta_fill: ++ t = "fill"; break; ++ case ta_none: ++ t = "none"; break; ++ case ta_remove_literal: ++ t = "remove_literal"; break; ++ case ta_add_literal: ++ t = "add_literal"; break; ++ } ++ ++ fprintf (fp, "%s: %s[0x%lx] \"%s\" %d\n", ++ r->sec->owner->filename, ++ r->sec->name, (unsigned long) r->offset, t, r->removed_bytes); +} - fprintf (fp, "%s: %s[0x%lx] \"%s\" %d\n", - r->sec->owner->filename, - r->sec->name, (unsigned long) r->offset, t, r->removed_bytes); - } ++static int ++print_action_list_fn (splay_tree_node node, void *p) ++{ ++ text_action *r = (text_action *)node->value; ++ ++ print_action (p, r); ++ return 0; ++} ++ +static void +print_action_list (FILE *fp, text_action_list *action_list) +{ @@ -559,7 +557,7 @@ index 51733ad..53af1c6 100644 } #endif /* DEBUG */ -@@ -6071,8 +6123,8 @@ init_xtensa_relax_info (asection *sec) +@@ -6066,8 +6118,8 @@ relax_info->removed_list.head = NULL; relax_info->removed_list.tail = NULL; @@ -570,7 +568,7 @@ index 51733ad..53af1c6 100644 relax_info->action_list.map.n_entries = 0; relax_info->action_list.map.entry = NULL; -@@ -7762,7 +7814,7 @@ compute_text_actions (bfd *abfd, +@@ -7757,7 +7809,7 @@ free_reloc_range_list (&relevant_relocs); #if DEBUG @@ -579,7 +577,7 @@ index 51733ad..53af1c6 100644 print_action_list (stderr, &relax_info->action_list); #endif -@@ -8263,6 +8315,54 @@ xlate_offset_with_removed_text (const xlate_map_t *map, +@@ -8258,6 +8310,54 @@ return e->new_address - e->orig_address + offset; } @@ -634,7 +632,7 @@ index 51733ad..53af1c6 100644 /* Build a binary searchable offset translation map from a section's action list. */ -@@ -8270,75 +8370,40 @@ xlate_offset_with_removed_text (const xlate_map_t *map, +@@ -8265,75 +8365,40 @@ static xlate_map_t * build_xlate_map (asection *sec, xtensa_relax_info *relax_info) { @@ -729,7 +727,7 @@ index 51733ad..53af1c6 100644 } -@@ -9302,6 +9367,16 @@ move_shared_literal (asection *sec, +@@ -9297,6 +9362,16 @@ /* Second relaxation pass. */ @@ -746,7 +744,7 @@ index 51733ad..53af1c6 100644 /* Modify all of the relocations to point to the right spot, and if this is a relaxable section, delete the unwanted literals and fix the section size. */ -@@ -9334,7 +9409,7 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info) +@@ -9329,7 +9404,7 @@ internal_relocs = retrieve_internal_relocs (abfd, sec, link_info->keep_memory); @@ -755,7 +753,7 @@ index 51733ad..53af1c6 100644 return TRUE; contents = retrieve_contents (abfd, sec, link_info->keep_memory); -@@ -9412,6 +9487,12 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info) +@@ -9407,6 +9482,12 @@ } /* Update the action so that the code that moves the contents will do the right thing. */ @@ -768,7 +766,7 @@ index 51733ad..53af1c6 100644 if (action->action == ta_remove_longcall) action->action = ta_remove_insn; else -@@ -9584,13 +9665,12 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info) +@@ -9579,13 +9660,12 @@ if ((relax_info->is_relaxable_literal_section || relax_info->is_relaxable_asm_section) @@ -783,7 +781,7 @@ index 51733ad..53af1c6 100644 bfd_size_type final_size, copy_size, orig_insn_size; bfd_byte *scratch = NULL; bfd_byte *dup_contents = NULL; -@@ -9601,15 +9681,12 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info) +@@ -9596,15 +9676,12 @@ bfd_vma orig_dot_vo = 0; /* Virtual offset from orig_dot. */ bfd_vma dup_dot = 0; @@ -802,7 +800,7 @@ index 51733ad..53af1c6 100644 scratch = (bfd_byte *) bfd_zmalloc (final_size); dup_contents = (bfd_byte *) bfd_zmalloc (final_size); -@@ -9618,8 +9695,8 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info) +@@ -9613,8 +9690,8 @@ print_action_list (stderr, &relax_info->action_list); #endif @@ -813,7 +811,7 @@ index 51733ad..53af1c6 100644 { virtual_action = FALSE; if (action->offset > orig_dot) -@@ -9748,7 +9825,6 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info) +@@ -9743,7 +9820,6 @@ break; } @@ -821,6 +819,3 @@ index 51733ad..53af1c6 100644 BFD_ASSERT (dup_dot <= final_size); BFD_ASSERT (orig_dot <= orig_size); } --- -1.8.1.4 - diff --git a/packages/binutils/2.24/910-xtensa-optimize-trampolines-relaxation.patch b/packages/binutils/2.24/0019-xtensa-optimize-trampolines-relaxation.patch index 043ff4d..4967b61 100644 --- a/packages/binutils/2.24/910-xtensa-optimize-trampolines-relaxation.patch +++ b/packages/binutils/2.24/0019-xtensa-optimize-trampolines-relaxation.patch @@ -64,14 +64,12 @@ Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Backported from: b76f99d702c3501ac320396ea06bc7f9237173c3 Changes to ChangeLog are dropped. - gas/config/tc-xtensa.c | 220 +++++++++++++++++++++++++++++++++++++++++++------ - 1 file changed, 194 insertions(+), 26 deletions(-) + gas/config/tc-xtensa.c | 220 ++++++++++++++++++++++++++++++++++++++++++------- + 1 file changed, 193 insertions(+), 27 deletions(-) -diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c -index 3e85b69..31c0b6b 100644 --- a/gas/config/tc-xtensa.c +++ b/gas/config/tc-xtensa.c -@@ -8785,6 +8785,154 @@ static long relax_frag_for_align (fragS *, long); +@@ -8786,6 +8786,154 @@ static long relax_frag_immed (segT, fragS *, long, int, xtensa_format, int, int *, bfd_boolean); @@ -226,7 +224,7 @@ index 3e85b69..31c0b6b 100644 /* Return the number of bytes added to this fragment, given that the input has been stretched already by "stretch". */ -@@ -8896,35 +9044,42 @@ xtensa_relax_frag (fragS *fragP, long stretch, int *stretched_p) +@@ -8897,35 +9045,42 @@ case RELAX_TRAMPOLINE: if (fragP->tc_frag_data.relax_seen) { @@ -280,21 +278,21 @@ index 3e85b69..31c0b6b 100644 + trampaddr = fragP->fr_address + fragP->fr_fix; + + if (addr + J_RANGE < trampaddr) ++ continue; ++ if (addr > trampaddr + J_RANGE) ++ break; ++ if (abs (delta) < J_RANGE) continue; - target = S_GET_VALUE (s); - addr = fixP->fx_frag->fr_address; - delta = target - addr + stretch; -+ if (addr > trampaddr + J_RANGE) -+ break; -+ if (abs (delta) < J_RANGE) -+ continue; + + slot = fixP->tc_fix_data.slot; + if (delta > J_RANGE || delta < -1 * J_RANGE) { /* Found an out-of-range jump; scan the list of trampolines for the best match. */ struct trampoline_seg *ts = find_trampoline_seg (now_seg); -@@ -8978,14 +9133,13 @@ xtensa_relax_frag (fragS *fragP, long stretch, int *stretched_p) +@@ -8979,14 +9134,13 @@ } if (tf->fragP == fragP) { @@ -310,7 +308,7 @@ index 3e85b69..31c0b6b 100644 new_stretch += init_trampoline_frag (tf); offset = fragP->fr_fix; /* Where to assemble the j insn. */ -@@ -9009,10 +9163,20 @@ xtensa_relax_frag (fragS *fragP, long stretch, int *stretched_p) +@@ -9010,10 +9164,20 @@ newfixP->tc_fix_data.X_add_symbol = lsym; newfixP->tc_fix_data.X_add_number = offset; newfixP->tc_fix_data.slot = slot; @@ -331,7 +329,7 @@ index 3e85b69..31c0b6b 100644 /* Adjust the jump around this trampoline (if present). */ if (tf->fixP != NULL) { -@@ -9027,6 +9191,8 @@ xtensa_relax_frag (fragS *fragP, long stretch, int *stretched_p) +@@ -9028,6 +9192,8 @@ fragP->fr_subtype = 0; /* Remove from the trampoline_list. */ prev->next = tf->next; @@ -340,6 +338,3 @@ index 3e85b69..31c0b6b 100644 break; } } --- -1.8.1.4 - diff --git a/packages/binutils/2.24/911-xtensa-fix-localized-symbol-refcounting-with-gc-sect.patch b/packages/binutils/2.24/0020-xtensa-fix-localized-symbol-refcounting-with-gc-sect.patch index 9ad6b3b..63fc41d 100644 --- a/packages/binutils/2.24/911-xtensa-fix-localized-symbol-refcounting-with-gc-sect.patch +++ b/packages/binutils/2.24/0020-xtensa-fix-localized-symbol-refcounting-with-gc-sect.patch @@ -29,14 +29,12 @@ Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Backported from: e6c9a083ec5ae7a45bd71682b26aae1939849388 Changes to ChangeLog are dropped. - bfd/elf32-xtensa.c | 6 +++++- + bfd/elf32-xtensa.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) -diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c -index 53af1c6..2523670 100644 --- a/bfd/elf32-xtensa.c +++ b/bfd/elf32-xtensa.c -@@ -1360,10 +1360,14 @@ elf_xtensa_gc_sweep_hook (bfd *abfd, +@@ -1357,10 +1357,14 @@ { if (is_plt) { @@ -52,6 +50,3 @@ index 53af1c6..2523670 100644 { if (h->got.refcount > 0) h->got.refcount--; --- -1.8.1.4 - diff --git a/packages/binutils/2.24/912-xtensa-fix-gas-segfault-with-text-section-literals.patch b/packages/binutils/2.24/0021-xtensa-fix-gas-segfault-with-text-section-literals.patch index 4a3de2c..b184987 100644 --- a/packages/binutils/2.24/912-xtensa-fix-gas-segfault-with-text-section-literals.patch +++ b/packages/binutils/2.24/0021-xtensa-fix-gas-segfault-with-text-section-literals.patch @@ -21,14 +21,12 @@ Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Backported from: 4de0562a4c69fef4952aa7e19d7bda359f02e8b4 Changes to ChangeLog are dropped. - gas/config/tc-xtensa.c | 10 +++++++++- + gas/config/tc-xtensa.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) -diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c -index 31c0b6b..18307c1 100644 --- a/gas/config/tc-xtensa.c +++ b/gas/config/tc-xtensa.c -@@ -10808,13 +10808,21 @@ xtensa_move_literals (void) +@@ -10809,13 +10809,21 @@ frchain_to = NULL; frag_splice = &(frchain_from->frch_root); @@ -51,6 +49,3 @@ index 31c0b6b..18307c1 100644 gas_assert (search_frag->tc_frag_data.literal_frag->fr_subtype == RELAX_LITERAL_POOL_BEGIN); xtensa_switch_section_emit_state (&state, segment->seg, 0); --- -1.8.1.4 - diff --git a/packages/binutils/2.24/913-xtensa-add-auto-litpools-option.patch b/packages/binutils/2.24/0022-xtensa-add-auto-litpools-option.patch index f0199e1..269e9f2 100644 --- a/packages/binutils/2.24/913-xtensa-add-auto-litpools-option.patch +++ b/packages/binutils/2.24/0022-xtensa-add-auto-litpools-option.patch @@ -55,20 +55,18 @@ Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Backported from: b46824bd49648c575372e6d9bc6a6defeabd6ed5 Changes to ChangeLogs and documentation are dropped. - gas/config/tc-xtensa.c | 432 ++++++++++++++++++++++++++++++- - gas/config/tc-xtensa.h | 1 + - gas/testsuite/gas/xtensa/all.exp | 1 + - gas/testsuite/gas/xtensa/auto-litpools.d | 12 + - gas/testsuite/gas/xtensa/auto-litpools.s | 13 + + gas/config/tc-xtensa.c | 432 ++++++++++++++++++++++++++++++- + gas/config/tc-xtensa.h | 1 + gas/testsuite/gas/xtensa/all.exp | 1 + gas/testsuite/gas/xtensa/auto-litpools.d | 12 + gas/testsuite/gas/xtensa/auto-litpools.s | 13 5 files changed, 454 insertions(+), 5 deletions(-) create mode 100644 gas/testsuite/gas/xtensa/auto-litpools.d create mode 100644 gas/testsuite/gas/xtensa/auto-litpools.s -diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c -index 7311a05..b8b1e7d 100644 --- a/gas/config/tc-xtensa.c +++ b/gas/config/tc-xtensa.c -@@ -440,6 +440,29 @@ bfd_boolean directive_state[] = +@@ -441,6 +441,29 @@ #endif }; @@ -98,7 +96,7 @@ index 7311a05..b8b1e7d 100644 /* Directive functions. */ -@@ -474,6 +497,9 @@ static void xtensa_create_trampoline_frag (bfd_boolean); +@@ -475,6 +498,9 @@ static void xtensa_maybe_create_trampoline_frag (void); struct trampoline_frag; static int init_trampoline_frag (struct trampoline_frag *); @@ -108,7 +106,7 @@ index 7311a05..b8b1e7d 100644 /* Alignment Functions. */ -@@ -698,6 +724,10 @@ enum +@@ -699,6 +725,10 @@ option_trampolines, option_no_trampolines, @@ -119,7 +117,7 @@ index 7311a05..b8b1e7d 100644 }; const char *md_shortopts = ""; -@@ -773,6 +803,10 @@ struct option md_longopts[] = +@@ -774,6 +804,10 @@ { "trampolines", no_argument, NULL, option_trampolines }, { "no-trampolines", no_argument, NULL, option_no_trampolines }, @@ -130,7 +128,7 @@ index 7311a05..b8b1e7d 100644 { NULL, no_argument, NULL, 0 } }; -@@ -961,6 +995,34 @@ md_parse_option (int c, char *arg) +@@ -962,6 +996,34 @@ use_trampolines = FALSE; return 1; @@ -165,7 +163,7 @@ index 7311a05..b8b1e7d 100644 default: return 0; } -@@ -986,7 +1048,12 @@ Xtensa options:\n\ +@@ -987,7 +1049,12 @@ flix bundles\n\ --rename-section old=new Rename section 'old' to 'new'\n\ --[no-]trampolines [Do not] generate trampolines (jumps to jumps)\n\ @@ -179,7 +177,7 @@ index 7311a05..b8b1e7d 100644 } -@@ -4728,6 +4795,8 @@ xtensa_mark_literal_pool_location (void) +@@ -4729,6 +4796,8 @@ pool_location = frag_now; frag_now->tc_frag_data.lit_frchain = frchain_now; frag_now->tc_frag_data.literal_frag = frag_now; @@ -188,7 +186,7 @@ index 7311a05..b8b1e7d 100644 frag_variant (rs_machine_dependent, 0, 0, RELAX_LITERAL_POOL_BEGIN, NULL, 0, NULL); xtensa_set_frag_assembly_state (frag_now); -@@ -4832,6 +4901,31 @@ get_expanded_loop_offset (xtensa_opcode opcode) +@@ -4833,6 +4902,31 @@ static fragS * get_literal_pool_location (segT seg) { @@ -220,7 +218,7 @@ index 7311a05..b8b1e7d 100644 return seg_info (seg)->tc_segment_info_data.literal_pool_loc; } -@@ -7098,6 +7192,11 @@ xg_assemble_vliw_tokens (vliw_insn *vinsn) +@@ -7099,6 +7193,11 @@ frag_now->tc_frag_data.slot_symbols[slot] = tinsn->symbol; frag_now->tc_frag_data.slot_offsets[slot] = tinsn->offset; frag_now->tc_frag_data.literal_frags[slot] = tinsn->literal_frag; @@ -232,7 +230,7 @@ index 7311a05..b8b1e7d 100644 if (tinsn->literal_space != 0) xg_assemble_literal_space (tinsn->literal_space, slot); frag_now->tc_frag_data.free_reg[slot] = tinsn->extra_arg; -@@ -7170,6 +7269,8 @@ xg_assemble_vliw_tokens (vliw_insn *vinsn) +@@ -7171,6 +7270,8 @@ frag_now->fr_symbol, frag_now->fr_offset, NULL); xtensa_set_frag_assembly_state (frag_now); xtensa_maybe_create_trampoline_frag (); @@ -241,7 +239,7 @@ index 7311a05..b8b1e7d 100644 } else if (is_branch && do_align_targets ()) { -@@ -7314,11 +7415,18 @@ xtensa_check_frag_count (void) +@@ -7315,11 +7416,18 @@ clear_frag_count (); unreachable_count = 0; } @@ -260,7 +258,7 @@ index 7311a05..b8b1e7d 100644 #define TRAMPOLINE_FRAG_SIZE 3000 static void -@@ -7410,6 +7518,135 @@ dump_trampolines (void) +@@ -7411,6 +7519,135 @@ } } @@ -396,7 +394,7 @@ index 7311a05..b8b1e7d 100644 static void xtensa_cleanup_align_frags (void) { -@@ -9029,7 +9266,41 @@ xtensa_relax_frag (fragS *fragP, long stretch, int *stretched_p) +@@ -9030,7 +9267,41 @@ break; case RELAX_LITERAL_POOL_BEGIN: @@ -438,7 +436,7 @@ index 7311a05..b8b1e7d 100644 case RELAX_MAYBE_UNREACHABLE: case RELAX_MAYBE_DESIRE_ALIGN: /* No relaxation required. */ -@@ -10789,12 +11060,115 @@ xtensa_move_literals (void) +@@ -10790,12 +11061,115 @@ segT dest_seg; fixS *fix, *next_fix, **fix_splice; sym_list *lit; @@ -554,7 +552,7 @@ index 7311a05..b8b1e7d 100644 for (segment = literal_head->next; segment; segment = segment->next) { /* Keep the literals for .init and .fini in separate sections. */ -@@ -10839,9 +11213,6 @@ xtensa_move_literals (void) +@@ -10840,9 +11214,6 @@ while (search_frag != frag_now) { next_frag = search_frag->fr_next; @@ -564,7 +562,7 @@ index 7311a05..b8b1e7d 100644 if (search_frag->tc_frag_data.literal_frag) { literal_pool = search_frag->tc_frag_data.literal_frag; -@@ -10849,8 +11220,56 @@ xtensa_move_literals (void) +@@ -10850,8 +11221,56 @@ frchain_to = literal_pool->tc_frag_data.lit_frchain; gas_assert (frchain_to); } @@ -621,7 +619,7 @@ index 7311a05..b8b1e7d 100644 *frag_splice = next_frag; search_frag->fr_next = insert_after->fr_next; -@@ -11014,7 +11433,10 @@ xtensa_switch_to_non_abs_literal_fragment (emit_state *result) +@@ -11015,7 +11434,10 @@ && !recursive && !is_init && ! is_fini) { @@ -633,11 +631,9 @@ index 7311a05..b8b1e7d 100644 /* When we mark a literal pool location, we want to put a frag in the literal pool that points to it. But to do that, we want to -diff --git a/gas/config/tc-xtensa.h b/gas/config/tc-xtensa.h -index b2e43fa..290d902 100644 --- a/gas/config/tc-xtensa.h +++ b/gas/config/tc-xtensa.h -@@ -124,6 +124,7 @@ enum xtensa_relax_statesE +@@ -125,6 +125,7 @@ RELAX_LITERAL_POOL_BEGIN, RELAX_LITERAL_POOL_END, @@ -645,20 +641,16 @@ index b2e43fa..290d902 100644 /* Technically these are not relaxations at all but mark a location to store literals later. Note that fr_var stores the frchain for BEGIN frags and fr_var stores now_seg for END frags. */ -diff --git a/gas/testsuite/gas/xtensa/all.exp b/gas/testsuite/gas/xtensa/all.exp -index d197ec8..db39629 100644 --- a/gas/testsuite/gas/xtensa/all.exp +++ b/gas/testsuite/gas/xtensa/all.exp -@@ -100,5 +100,6 @@ if [istarget xtensa*-*-*] then { +@@ -100,6 +100,7 @@ + run_dump_test "weak-call" run_dump_test "jlong" run_dump_test "trampoline" + run_dump_test "auto-litpools" } if [info exists errorInfo] then { -diff --git a/gas/testsuite/gas/xtensa/auto-litpools.d b/gas/testsuite/gas/xtensa/auto-litpools.d -new file mode 100644 -index 0000000..4d1a690 --- /dev/null +++ b/gas/testsuite/gas/xtensa/auto-litpools.d @@ -0,0 +1,12 @@ @@ -674,9 +666,6 @@ index 0000000..4d1a690 +#... +.*40750:.*l32r.a2, 3e43c .* +#... -diff --git a/gas/testsuite/gas/xtensa/auto-litpools.s b/gas/testsuite/gas/xtensa/auto-litpools.s -new file mode 100644 -index 0000000..9a5b26b --- /dev/null +++ b/gas/testsuite/gas/xtensa/auto-litpools.s @@ -0,0 +1,13 @@ @@ -693,6 +682,3 @@ index 0000000..9a5b26b + .endr + l32r a2, .L1 + ret --- -1.8.1.4 - diff --git a/packages/binutils/2.24/914-xtensa-fix-signedness-of-gas-relocations.patch b/packages/binutils/2.24/0023-xtensa-fix-signedness-of-gas-relocations.patch index 2955e11..1d89655 100644 --- a/packages/binutils/2.24/914-xtensa-fix-signedness-of-gas-relocations.patch +++ b/packages/binutils/2.24/0023-xtensa-fix-signedness-of-gas-relocations.patch @@ -16,14 +16,12 @@ gas/ Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> --- - gas/config/tc-xtensa.c | 6 +++--- + gas/config/tc-xtensa.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c -index a119871..36a06cc 100644 --- a/gas/config/tc-xtensa.c +++ b/gas/config/tc-xtensa.c -@@ -5961,15 +5961,15 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg) +@@ -5962,15 +5962,15 @@ { case BFD_RELOC_8: fixP->fx_r_type = BFD_RELOC_XTENSA_DIFF8; @@ -42,6 +40,3 @@ index a119871..36a06cc 100644 break; default: break; --- -2.1.4 - diff --git a/packages/binutils/2.24/915-xtensa-fix-.init-.fini-literals-moving.patch b/packages/binutils/2.24/0024-xtensa-fix-.init-.fini-literals-moving.patch index 656373f..cd8a72c 100644 --- a/packages/binutils/2.24/915-xtensa-fix-.init-.fini-literals-moving.patch +++ b/packages/binutils/2.24/0024-xtensa-fix-.init-.fini-literals-moving.patch @@ -32,14 +32,12 @@ Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> --- Backported from: 4111950f363221c4641dc2f33bea61cc94f34906 - gas/config/tc-xtensa.c | 12 ++++++++++-- + gas/config/tc-xtensa.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) -diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c -index 36a06cc..5773634 100644 --- a/gas/config/tc-xtensa.c +++ b/gas/config/tc-xtensa.c -@@ -11061,6 +11061,10 @@ xtensa_move_literals (void) +@@ -11062,6 +11062,10 @@ fixS *fix, *next_fix, **fix_splice; sym_list *lit; struct litpool_seg *lps; @@ -50,7 +48,7 @@ index 36a06cc..5773634 100644 mark_literal_frags (literal_head->next); -@@ -11171,9 +11175,13 @@ xtensa_move_literals (void) +@@ -11172,9 +11176,13 @@ for (segment = literal_head->next; segment; segment = segment->next) { @@ -66,6 +64,3 @@ index 36a06cc..5773634 100644 continue; frchain_from = seg_info (segment->seg)->frchainP; --- -2.1.4 - |