diff options
Diffstat (limited to 'packages/binutils/2.25.1')
-rw-r--r-- | packages/binutils/2.25.1/0000-sh-conf.patch (renamed from packages/binutils/2.25.1/120-sh-conf.patch) | 13 | ||||
-rw-r--r-- | packages/binutils/2.25.1/0001-001_ld_makefile_patch.patch (renamed from packages/binutils/2.25.1/300-001_ld_makefile_patch.patch) | 13 | ||||
-rw-r--r-- | packages/binutils/2.25.1/0002-012_check_ldrunpath_length.patch (renamed from packages/binutils/2.25.1/300-012_check_ldrunpath_length.patch) | 10 | ||||
-rw-r--r-- | packages/binutils/2.25.1/0003-fix-gold-pthreads-typo.patch (renamed from packages/binutils/2.25.1/310-fix-gold-pthreads-typo.patch) | 8 | ||||
-rw-r--r-- | packages/binutils/2.25.1/0004-MinGW-w64-winpthreads-doesnt-have-pthread_mutexattr_settype.patch (renamed from packages/binutils/2.25.1/320-MinGW-w64-winpthreads-doesnt-have-pthread_mutexattr_settype.patch) | 8 | ||||
-rw-r--r-- | packages/binutils/2.25.1/0005-Dont-link-to-libfl-as-its-unnecessary.patch (renamed from packages/binutils/2.25.1/330-Dont-link-to-libfl-as-its-unnecessary.patch) | 39 | ||||
-rw-r--r-- | packages/binutils/2.25.1/0006-Darwin-gold-binary-cc-include-string-not-cstring.patch (renamed from packages/binutils/2.25.1/340-Darwin-gold-binary-cc-include-string-not-cstring.patch) | 8 | ||||
-rw-r--r-- | packages/binutils/2.25.1/0007-Darwin-Two-fixes-from-Android-NDK-PTHREAD_ONCE_INIT-wcsncasecmp.patch (renamed from packages/binutils/2.25.1/350-Darwin-Two-fixes-from-Android-NDK-PTHREAD_ONCE_INIT-wcsncasecmp.patch) | 23 | ||||
-rw-r--r-- | packages/binutils/2.25.1/0008-arm-rotate_left-fix.patch (renamed from packages/binutils/2.25.1/400-arm-rotate_left-fix.patch) | 11 | ||||
-rw-r--r-- | packages/binutils/2.25.1/0009-sysroot.patch (renamed from packages/binutils/2.25.1/500-sysroot.patch) | 6 | ||||
-rw-r--r-- | packages/binutils/2.25.1/0010-poison-system-directories.patch (renamed from packages/binutils/2.25.1/600-poison-system-directories.patch) | 57 | ||||
-rw-r--r-- | packages/binutils/2.25.1/0011-Fix-library-paths-on-PowerPC.patch (renamed from packages/binutils/2.25.1/700-Fix-library-paths-on-PowerPC.patch) | 9 | ||||
-rw-r--r-- | packages/binutils/2.25.1/0012-Fix-trampolines-search-code-for-conditional-branches.patch (renamed from packages/binutils/2.25.1/905-Fix-trampolines-search-code-for-conditional-branches.patch) | 17 | ||||
-rw-r--r-- | packages/binutils/2.25.1/0013-xtensa-optimize-check_section_ebb_pcrels_fit.patch (renamed from packages/binutils/2.25.1/906-xtensa-optimize-check_section_ebb_pcrels_fit.patch) | 29 | ||||
-rw-r--r-- | packages/binutils/2.25.1/0014-xtensa-optimize-removed_by_actions.patch (renamed from packages/binutils/2.25.1/907-xtensa-optimize-removed_by_actions.patch) | 33 | ||||
-rw-r--r-- | packages/binutils/2.25.1/0015-xtensa-optimize-find_removed_literal.patch (renamed from packages/binutils/2.25.1/908-xtensa-optimize-find_removed_literal.patch) | 15 | ||||
-rw-r--r-- | packages/binutils/2.25.1/0016-xtensa-replace-action-list-with-splay-tree.patch (renamed from packages/binutils/2.25.1/909-xtensa-replace-action-list-with-splay-tree.patch) | 131 | ||||
-rw-r--r-- | packages/binutils/2.25.1/0017-xtensa-optimize-trampolines-relaxation.patch (renamed from packages/binutils/2.25.1/910-xtensa-optimize-trampolines-relaxation.patch) | 27 | ||||
-rw-r--r-- | packages/binutils/2.25.1/0018-xtensa-fix-localized-symbol-refcounting-with-gc-sect.patch (renamed from packages/binutils/2.25.1/911-xtensa-fix-localized-symbol-refcounting-with-gc-sect.patch) | 9 | ||||
-rw-r--r-- | packages/binutils/2.25.1/0019-xtensa-fix-gas-segfault-with-text-section-literals.patch (renamed from packages/binutils/2.25.1/912-xtensa-fix-gas-segfault-with-text-section-literals.patch) | 9 | ||||
-rw-r--r-- | packages/binutils/2.25.1/0020-xtensa-add-auto-litpools-option.patch (renamed from packages/binutils/2.25.1/913-xtensa-add-auto-litpools-option.patch) | 63 | ||||
-rw-r--r-- | packages/binutils/2.25.1/0021-xtensa-fix-signedness-of-gas-relocations.patch (renamed from packages/binutils/2.25.1/914-xtensa-fix-signedness-of-gas-relocations.patch) | 25 | ||||
-rw-r--r-- | packages/binutils/2.25.1/0022-xtensa-fix-.init-.fini-literals-moving.patch (renamed from packages/binutils/2.25.1/915-xtensa-fix-.init-.fini-literals-moving.patch) | 27 |
23 files changed, 257 insertions, 333 deletions
diff --git a/packages/binutils/2.25.1/120-sh-conf.patch b/packages/binutils/2.25.1/0000-sh-conf.patch index c12a023..88024bf 100644 --- a/packages/binutils/2.25.1/120-sh-conf.patch +++ b/packages/binutils/2.25.1/0000-sh-conf.patch @@ -5,11 +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 --git a/configure b/configure -index 87677bc..2d916f1 100755 +--- + configure | 2 +- + configure.ac | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + --- a/configure +++ b/configure -@@ -3812,7 +3812,7 @@ case "${target}" in +@@ -3812,7 +3812,7 @@ or1k*-*-*) noconfigdirs="$noconfigdirs gdb" ;; @@ -18,11 +21,9 @@ index 87677bc..2d916f1 100755 case "${target}" in sh*-*-elf) ;; -diff --git a/configure.ac b/configure.ac -index 8fe0eca..b10a99f 100644 --- a/configure.ac +++ b/configure.ac -@@ -1140,7 +1140,7 @@ case "${target}" in +@@ -1140,7 +1140,7 @@ or1k*-*-*) noconfigdirs="$noconfigdirs gdb" ;; diff --git a/packages/binutils/2.25.1/300-001_ld_makefile_patch.patch b/packages/binutils/2.25.1/0001-001_ld_makefile_patch.patch index 2a1320c..c47d7d1 100644 --- a/packages/binutils/2.25.1/300-001_ld_makefile_patch.patch +++ b/packages/binutils/2.25.1/0001-001_ld_makefile_patch.patch @@ -1,8 +1,11 @@ -diff --git a/ld/Makefile.am b/ld/Makefile.am -index 9575f1f..84df0bf 100644 +--- + 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 @@ endif +@@ -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. @@ -11,11 +14,9 @@ index 9575f1f..84df0bf 100644 EMUL = @EMUL@ EMULATION_OFILES = @EMULATION_OFILES@ -diff --git a/ld/Makefile.in b/ld/Makefile.in -index 9f56ca1..272860f 100644 --- a/ld/Makefile.in +++ b/ld/Makefile.in -@@ -388,7 +388,7 @@ AM_CFLAGS = $(WARN_CFLAGS) +@@ -388,7 +388,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.25.1/300-012_check_ldrunpath_length.patch b/packages/binutils/2.25.1/0002-012_check_ldrunpath_length.patch index f1f31af..712eb19 100644 --- a/packages/binutils/2.25.1/300-012_check_ldrunpath_length.patch +++ b/packages/binutils/2.25.1/0002-012_check_ldrunpath_length.patch @@ -1,8 +1,10 @@ -diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em -index 137446f..bb8391a 100644 +--- + ld/emultempl/elf32.em | 4 ++++ + 1 file changed, 4 insertions(+) + --- a/ld/emultempl/elf32.em +++ b/ld/emultempl/elf32.em -@@ -1195,6 +1195,8 @@ fragment <<EOF +@@ -1198,6 +1198,8 @@ && command_line.rpath == NULL) { lib_path = (const char *) getenv ("LD_RUN_PATH"); @@ -11,7 +13,7 @@ index 137446f..bb8391a 100644 if (gld${EMULATION_NAME}_search_needed (lib_path, &n, force)) break; -@@ -1458,6 +1460,8 @@ gld${EMULATION_NAME}_before_allocation (void) +@@ -1461,6 +1463,8 @@ rpath = command_line.rpath; if (rpath == NULL) rpath = (const char *) getenv ("LD_RUN_PATH"); diff --git a/packages/binutils/2.25.1/310-fix-gold-pthreads-typo.patch b/packages/binutils/2.25.1/0003-fix-gold-pthreads-typo.patch index f2e6ff2..40861f5 100644 --- a/packages/binutils/2.25.1/310-fix-gold-pthreads-typo.patch +++ b/packages/binutils/2.25.1/0003-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.25.1/320-MinGW-w64-winpthreads-doesnt-have-pthread_mutexattr_settype.patch b/packages/binutils/2.25.1/0004-MinGW-w64-winpthreads-doesnt-have-pthread_mutexattr_settype.patch index f9a8af6..c086798 100644 --- a/packages/binutils/2.25.1/320-MinGW-w64-winpthreads-doesnt-have-pthread_mutexattr_settype.patch +++ b/packages/binutils/2.25.1/0004-MinGW-w64-winpthreads-doesnt-have-pthread_mutexattr_settype.patch @@ -1,5 +1,9 @@ ---- binutils-2.25.1/gold/gold-threads.cc.orig 2015-10-20 22:39:36.371169400 +0100 -+++ binutils-2.25.1/gold/gold-threads.cc 2015-10-20 22:39:38.182772700 +0100 +--- + gold/gold-threads.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/gold/gold-threads.cc ++++ b/gold/gold-threads.cc @@ -101,7 +101,7 @@ int err = pthread_mutexattr_init(&attr); if (err != 0) diff --git a/packages/binutils/2.25.1/330-Dont-link-to-libfl-as-its-unnecessary.patch b/packages/binutils/2.25.1/0005-Dont-link-to-libfl-as-its-unnecessary.patch index af4032a..bf7906d 100644 --- a/packages/binutils/2.25.1/330-Dont-link-to-libfl-as-its-unnecessary.patch +++ b/packages/binutils/2.25.1/0005-Dont-link-to-libfl-as-its-unnecessary.patch @@ -1,6 +1,14 @@ -diff -urN binutils-2.25.1.orig/binutils/configure binutils-2.25.1/binutils/configure ---- binutils-2.25.1.orig/binutils/configure 2015-10-25 13:18:46.249052806 +0000 -+++ binutils-2.25.1/binutils/configure 2015-10-25 13:39:21.339034801 +0000 +--- + binutils/configure | 3 +++ + binutils/configure.ac | 3 +++ + gas/configure | 3 +++ + gas/configure.ac | 3 +++ + ld/configure | 3 +++ + ld/configure.ac | 3 +++ + 6 files changed, 18 insertions(+) + +--- a/binutils/configure ++++ b/binutils/configure @@ -12067,6 +12067,7 @@ done test -n "$YACC" || YACC="yacc" @@ -18,9 +26,8 @@ diff -urN binutils-2.25.1.orig/binutils/configure binutils-2.25.1/binutils/confi ALL_LINGUAS="bg da es fi fr id it ja ro ru rw sk sv tr uk vi zh_CN zh_TW hr" # If we haven't got the data from the intl directory, -diff -urN binutils-2.25.1.orig/binutils/configure.ac binutils-2.25.1/binutils/configure.ac ---- binutils-2.25.1.orig/binutils/configure.ac 2015-10-25 13:18:46.249052806 +0000 -+++ binutils-2.25.1/binutils/configure.ac 2015-10-25 13:38:52.969035216 +0000 +--- a/binutils/configure.ac ++++ b/binutils/configure.ac @@ -87,7 +87,10 @@ fi @@ -32,9 +39,8 @@ diff -urN binutils-2.25.1.orig/binutils/configure.ac binutils-2.25.1/binutils/co ALL_LINGUAS="bg da es fi fr id it ja ro ru rw sk sv tr uk vi zh_CN zh_TW hr" ZW_GNU_GETTEXT_SISTER_DIR -diff -urN binutils-2.25.1.orig/gas/configure binutils-2.25.1/gas/configure ---- binutils-2.25.1.orig/gas/configure 2015-10-25 13:18:46.389052803 +0000 -+++ binutils-2.25.1/gas/configure 2015-10-25 15:16:55.988949456 +0000 +--- a/gas/configure ++++ b/gas/configure @@ -12795,6 +12795,7 @@ done test -n "$YACC" || YACC="yacc" @@ -52,9 +58,8 @@ diff -urN binutils-2.25.1.orig/gas/configure binutils-2.25.1/gas/configure ALL_LINGUAS="fr tr es rw id ru fi ja" # If we haven't got the data from the intl directory, -diff -urN binutils-2.25.1.orig/gas/configure.ac binutils-2.25.1/gas/configure.ac ---- binutils-2.25.1.orig/gas/configure.ac 2015-10-25 15:15:06.000000000 +0000 -+++ binutils-2.25.1/gas/configure.ac 2015-10-25 14:45:32.000000000 +0000 +--- a/gas/configure.ac ++++ b/gas/configure.ac @@ -717,7 +717,10 @@ AC_DEFINE_UNQUOTED(TARGET_OS, "${target_os}", [Target OS.]) @@ -66,9 +71,8 @@ diff -urN binutils-2.25.1.orig/gas/configure.ac binutils-2.25.1/gas/configure.ac ALL_LINGUAS="fr tr es rw id ru fi ja" ZW_GNU_GETTEXT_SISTER_DIR -diff -urN binutils-2.25.1.orig/ld/configure binutils-2.25.1/ld/configure ---- binutils-2.25.1.orig/ld/configure 2015-10-25 13:18:47.399052788 +0000 -+++ binutils-2.25.1/ld/configure 2015-10-25 15:17:06.472282637 +0000 +--- a/ld/configure ++++ b/ld/configure @@ -16071,6 +16071,7 @@ done test -n "$YACC" || YACC="yacc" @@ -86,9 +90,8 @@ diff -urN binutils-2.25.1.orig/ld/configure binutils-2.25.1/ld/configure { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 -diff -urN binutils-2.25.1.orig/ld/configure.ac binutils-2.25.1/ld/configure.ac ---- binutils-2.25.1.orig/ld/configure.ac 2015-10-25 13:18:47.415719456 +0000 -+++ binutils-2.25.1/ld/configure.ac 2015-10-25 15:14:43.000000000 +0000 +--- a/ld/configure.ac ++++ b/ld/configure.ac @@ -173,7 +173,10 @@ AC_EXEEXT diff --git a/packages/binutils/2.25.1/340-Darwin-gold-binary-cc-include-string-not-cstring.patch b/packages/binutils/2.25.1/0006-Darwin-gold-binary-cc-include-string-not-cstring.patch index 33441cc..73cfde8 100644 --- a/packages/binutils/2.25.1/340-Darwin-gold-binary-cc-include-string-not-cstring.patch +++ b/packages/binutils/2.25.1/0006-Darwin-gold-binary-cc-include-string-not-cstring.patch @@ -1,5 +1,9 @@ ---- binutils-2.25.orig/gold/binary.cc 2015-06-09 10:48:32.000000000 +0100 -+++ binutils-2.25/gold/binary.cc 2015-06-09 10:49:23.000000000 +0100 +--- + gold/binary.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/gold/binary.cc ++++ b/gold/binary.cc @@ -23,7 +23,7 @@ #include "gold.h" diff --git a/packages/binutils/2.25.1/350-Darwin-Two-fixes-from-Android-NDK-PTHREAD_ONCE_INIT-wcsncasecmp.patch b/packages/binutils/2.25.1/0007-Darwin-Two-fixes-from-Android-NDK-PTHREAD_ONCE_INIT-wcsncasecmp.patch index 6168b31..d40f95d 100644 --- a/packages/binutils/2.25.1/350-Darwin-Two-fixes-from-Android-NDK-PTHREAD_ONCE_INIT-wcsncasecmp.patch +++ b/packages/binutils/2.25.1/0007-Darwin-Two-fixes-from-Android-NDK-PTHREAD_ONCE_INIT-wcsncasecmp.patch @@ -9,15 +9,13 @@ Subject: [PATCH] Fix darwin build Change-Id: I69204a72f853f5263dffedc448379d75ed4eca2e --- - binutils-2.25/bfd/peXXigen.c | 22 ++++++++++++++++++++++ - binutils-2.25/gold/gold-threads.cc | 15 ++++++++++++--- + bfd/peXXigen.c | 22 ++++++++++++++++++++++ + gold/gold-threads.cc | 15 ++++++++++++--- 2 files changed, 34 insertions(+), 3 deletions(-) -diff --git binutils-2.25.orig/bfd/peXXigen.c binutils-2.25/bfd/peXXigen.c -index 13e39e4..7a98306 100644 ---- binutils-2.25.orig/bfd/peXXigen.c -+++ binutils-2.25/bfd/peXXigen.c -@@ -3522,6 +3522,28 @@ u16_mbtouc (wchar_t * puc, const unsigned short * s, unsigned int n) +--- a/bfd/peXXigen.c ++++ b/bfd/peXXigen.c +@@ -3570,6 +3570,28 @@ } #endif /* HAVE_WCHAR_H and not Cygwin/Mingw */ @@ -46,11 +44,9 @@ index 13e39e4..7a98306 100644 /* Perform a comparison of two entries. */ static signed int rsrc_cmp (bfd_boolean is_name, rsrc_entry * a, rsrc_entry * b) -diff --git binutils-2.25.orig/gold/gold-threads.cc binutils-2.25/gold/gold-threads.cc -index ff5a8ac..45140e0 100644 ---- binutils-2.25.orig/gold/gold-threads.cc -+++ binutils-2.25/gold/gold-threads.cc -@@ -284,9 +284,18 @@ Condvar::~Condvar() +--- a/gold/gold-threads.cc ++++ b/gold/gold-threads.cc +@@ -284,9 +284,18 @@ class Once_initialize { public: @@ -72,6 +68,3 @@ index ff5a8ac..45140e0 100644 // Return a pointer to the pthread_once_t variable. pthread_once_t* --- -2.1.3 - diff --git a/packages/binutils/2.25.1/400-arm-rotate_left-fix.patch b/packages/binutils/2.25.1/0008-arm-rotate_left-fix.patch index 4149597..0a40611 100644 --- a/packages/binutils/2.25.1/400-arm-rotate_left-fix.patch +++ b/packages/binutils/2.25.1/0008-arm-rotate_left-fix.patch @@ -5,14 +5,12 @@ Subject: [PATCH] * config/tc-arm.c (rotate_left): Avoid undefined behaviour when N = 0. --- - gas/config/tc-arm.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletion(-) + gas/config/tc-arm.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c -index 5077f87..9100fb2 100644 --- a/gas/config/tc-arm.c +++ b/gas/config/tc-arm.c -@@ -7251,7 +7251,7 @@ parse_operands (char *str, const unsigned int *pattern, bfd_boolean thumb) +@@ -7261,7 +7261,7 @@ /* Functions for operand encoding. ARM, then Thumb. */ @@ -21,6 +19,3 @@ index 5077f87..9100fb2 100644 /* If VAL can be encoded in the immediate field of an ARM instruction, return the encoded form. Otherwise, return FAIL. */ --- -1.9.4 - diff --git a/packages/binutils/2.25.1/500-sysroot.patch b/packages/binutils/2.25.1/0009-sysroot.patch index e49c795..9377e4e 100644 --- a/packages/binutils/2.25.1/500-sysroot.patch +++ b/packages/binutils/2.25.1/0009-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 @@ +@@ -339,18 +339,25 @@ directory first. */ if (! entry->flags.maybe_archive) { diff --git a/packages/binutils/2.25.1/600-poison-system-directories.patch b/packages/binutils/2.25.1/0010-poison-system-directories.patch index ec3622b..e3affcd 100644 --- a/packages/binutils/2.25.1/600-poison-system-directories.patch +++ b/packages/binutils/2.25.1/0010-poison-system-directories.patch @@ -59,9 +59,20 @@ 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> -diff -Nura a/ld/config.in b/ld/config.in ---- a/ld/config.in 2014-10-14 04:32:04.000000000 -0300 -+++ b/ld/config.in 2014-12-24 08:07:28.997918918 -0300 +--- + ld/config.in | 3 +++ + ld/configure | 14 ++++++++++++++ + ld/configure.ac | 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 @@ language is requested. */ #undef ENABLE_NLS @@ -72,9 +83,8 @@ diff -Nura a/ld/config.in b/ld/config.in /* Additional extension a shared object might have. */ #undef EXTRA_SHLIB_EXTENSION -diff -Nura a/ld/configure b/ld/configure ---- a/ld/configure 2014-12-23 11:22:07.000000000 -0300 -+++ b/ld/configure 2014-12-24 08:07:29.002919088 -0300 +--- a/ld/configure ++++ b/ld/configure @@ -783,6 +783,7 @@ enable_targets enable_64_bit_bfd @@ -111,9 +121,8 @@ diff -Nura a/ld/configure b/ld/configure # Check whether --enable-got was given. if test "${enable_got+set}" = set; then : -diff -Nura a/ld/configure.ac b/ld/configure.ac ---- a/ld/configure.ac 2014-10-14 04:32:04.000000000 -0300 -+++ b/ld/configure.ac 2014-12-24 08:07:29.002919088 -0300 +--- a/ld/configure.ac ++++ b/ld/configure.ac @@ -94,6 +94,16 @@ AC_SUBST(TARGET_SYSTEM_ROOT) AC_SUBST(TARGET_SYSTEM_ROOT_DEFINE) @@ -131,9 +140,8 @@ diff -Nura a/ld/configure.ac b/ld/configure.ac 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. -diff -Nura a/ld/ldfile.c b/ld/ldfile.c ---- a/ld/ldfile.c 2014-10-14 04:32:04.000000000 -0300 -+++ b/ld/ldfile.c 2014-12-24 08:07:29.002919088 -0300 +--- a/ld/ldfile.c ++++ b/ld/ldfile.c @@ -114,6 +114,23 @@ new_dirs->name = concat (ld_sysroot, name + 1, (const char *) NULL); else @@ -158,9 +166,8 @@ diff -Nura a/ld/ldfile.c b/ld/ldfile.c } /* Try to open a BFD for a lang_input_statement. */ -diff -Nura a/ld/ld.h b/ld/ld.h ---- a/ld/ld.h 2014-10-14 04:32:04.000000000 -0300 -+++ b/ld/ld.h 2014-12-24 08:07:29.003919122 -0300 +--- a/ld/ld.h ++++ b/ld/ld.h @@ -161,6 +161,14 @@ /* If TRUE we'll just print the default output on stdout. */ bfd_boolean print_output_format; @@ -176,9 +183,8 @@ diff -Nura a/ld/ld.h b/ld/ld.h /* Big or little endian as set on command line. */ enum endian_enum endian; -diff -Nura a/ld/ldlex.h b/ld/ldlex.h ---- a/ld/ldlex.h 2014-11-04 06:54:41.000000000 -0300 -+++ b/ld/ldlex.h 2014-12-24 08:09:47.477644294 -0300 +--- a/ld/ldlex.h ++++ b/ld/ldlex.h @@ -140,6 +140,8 @@ OPTION_IGNORE_UNRESOLVED_SYMBOL, OPTION_PUSH_STATE, @@ -188,9 +194,8 @@ diff -Nura a/ld/ldlex.h b/ld/ldlex.h }; /* The initial parser states. */ -diff -Nura a/ld/ldmain.c b/ld/ldmain.c ---- a/ld/ldmain.c 2014-10-14 04:32:04.000000000 -0300 -+++ b/ld/ldmain.c 2014-12-24 08:07:29.003919122 -0300 +--- a/ld/ldmain.c ++++ b/ld/ldmain.c @@ -266,6 +266,8 @@ command_line.warn_mismatch = TRUE; command_line.warn_search_mismatch = TRUE; @@ -200,9 +205,8 @@ diff -Nura a/ld/ldmain.c b/ld/ldmain.c /* We initialize DEMANGLING based on the environment variable COLLECT_NO_DEMANGLE. The gcc collect2 program will demangle the -diff -Nura a/ld/ld.texinfo b/ld/ld.texinfo ---- a/ld/ld.texinfo 2014-12-23 05:47:10.000000000 -0300 -+++ b/ld/ld.texinfo 2014-12-24 08:07:29.005919191 -0300 +--- a/ld/ld.texinfo ++++ b/ld/ld.texinfo @@ -2212,6 +2212,18 @@ Passing @code{none} for @var{style} disables the setting from any @@ -222,9 +226,8 @@ diff -Nura a/ld/ld.texinfo b/ld/ld.texinfo @end table @c man end -diff -Nura a/ld/lexsup.c b/ld/lexsup.c ---- a/ld/lexsup.c 2014-11-04 06:54:41.000000000 -0300 -+++ b/ld/lexsup.c 2014-12-24 08:48:50.136583414 -0300 +--- a/ld/lexsup.c ++++ b/ld/lexsup.c @@ -513,6 +513,14 @@ { {"pop-state", no_argument, NULL, OPTION_POP_STATE}, '\0', NULL, N_("Pop state of flags governing input file handling"), diff --git a/packages/binutils/2.25.1/700-Fix-library-paths-on-PowerPC.patch b/packages/binutils/2.25.1/0011-Fix-library-paths-on-PowerPC.patch index cea92f3..4bcc748 100644 --- a/packages/binutils/2.25.1/700-Fix-library-paths-on-PowerPC.patch +++ b/packages/binutils/2.25.1/0011-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 +@@ -44,11 +44,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.25.1/905-Fix-trampolines-search-code-for-conditional-branches.patch b/packages/binutils/2.25.1/0012-Fix-trampolines-search-code-for-conditional-branches.patch index 8aeb064..ec96a36 100644 --- a/packages/binutils/2.25.1/905-Fix-trampolines-search-code-for-conditional-branches.patch +++ b/packages/binutils/2.25.1/0012-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) +@@ -9514,11 +9514,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.25.1/906-xtensa-optimize-check_section_ebb_pcrels_fit.patch b/packages/binutils/2.25.1/0013-xtensa-optimize-check_section_ebb_pcrels_fit.patch index 8a21100..19435b5 100644 --- a/packages/binutils/2.25.1/906-xtensa-optimize-check_section_ebb_pcrels_fit.patch +++ b/packages/binutils/2.25.1/0013-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 +@@ -6619,8 +6619,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, +@@ -7219,6 +7221,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, +@@ -7245,6 +7462,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, +@@ -7277,6 +7495,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, +@@ -7340,17 +7564,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, +@@ -7372,6 +7592,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, +@@ -7974,14 +8196,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, +@@ -7992,7 +8217,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, +@@ -8001,7 +8259,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, +@@ -8067,21 +8333,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, +@@ -8778,7 +9053,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.25.1/907-xtensa-optimize-removed_by_actions.patch b/packages/binutils/2.25.1/0014-xtensa-optimize-removed_by_actions.patch index 9df8065..0a0f4c5 100644 --- a/packages/binutils/2.25.1/907-xtensa-optimize-removed_by_actions.patch +++ b/packages/binutils/2.25.1/0014-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 +@@ -5420,11 +5420,28 @@ text_action *next; }; @@ -86,7 +84,7 @@ index 872370b..21b2871 100644 }; -@@ -5636,6 +5653,101 @@ action_list_count (text_action_list *action_list) +@@ -5636,6 +5653,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) +@@ -5909,6 +6021,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) +@@ -9218,7 +9333,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) +@@ -9255,7 +9370,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) +@@ -9352,7 +9467,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) +@@ -9750,7 +9865,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) +@@ -9803,19 +9917,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, +@@ -10138,9 +10259,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, +@@ -10164,9 +10286,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, +@@ -10182,8 +10305,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) +@@ -10441,14 +10568,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) +@@ -10466,15 +10595,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.25.1/908-xtensa-optimize-find_removed_literal.patch b/packages/binutils/2.25.1/0015-xtensa-optimize-find_removed_literal.patch index 96d526f..e734658 100644 --- a/packages/binutils/2.25.1/908-xtensa-optimize-find_removed_literal.patch +++ b/packages/binutils/2.25.1/0015-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) +@@ -5832,6 +5832,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 +@@ -5841,10 +5842,19 @@ removed_literal *next; }; @@ -73,7 +71,7 @@ index 21b2871..51733ad 100644 }; -@@ -5893,6 +5903,39 @@ add_removed_literal (removed_literal_list *removed_list, +@@ -5893,6 +5903,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, +@@ -5900,12 +5943,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.25.1/909-xtensa-replace-action-list-with-splay-tree.patch b/packages/binutils/2.25.1/0016-xtensa-replace-action-list-with-splay-tree.patch index 3090cc2..669c8b0 100644 --- a/packages/binutils/2.25.1/909-xtensa-replace-action-list-with-splay-tree.patch +++ b/packages/binutils/2.25.1/0016-xtensa-replace-action-list-with-splay-tree.patch @@ -73,11 +73,9 @@ 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 @@ @@ -88,7 +86,7 @@ index 51733ad..53af1c6 100644 #include "xtensa-isa.h" #include "xtensa-config.h" -@@ -5416,8 +5417,6 @@ struct text_action_struct +@@ -5416,8 +5417,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; +@@ -5440,7 +5439,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 +@@ -5448,20 +5448,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) +@@ -5509,6 +5507,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, +@@ -5521,8 +5562,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, +@@ -5532,34 +5573,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, +@@ -5570,7 +5607,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, +@@ -5578,14 +5614,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, +@@ -5594,8 +5622,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, +@@ -5606,7 +5636,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, +@@ -5614,6 +5645,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, +@@ -5625,7 +5663,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, +@@ -5636,68 +5674,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) +@@ -5754,28 +5798,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) +@@ -5784,40 +5826,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) +@@ -6071,8 +6123,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, +@@ -7762,7 +7814,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, +@@ -8263,6 +8315,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, +@@ -8270,75 +8370,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, +@@ -9302,6 +9367,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) +@@ -9334,7 +9409,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) +@@ -9412,6 +9487,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) +@@ -9584,13 +9665,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) +@@ -9601,15 +9681,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) +@@ -9618,8 +9695,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) +@@ -9748,7 +9825,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.25.1/910-xtensa-optimize-trampolines-relaxation.patch b/packages/binutils/2.25.1/0017-xtensa-optimize-trampolines-relaxation.patch index 043ff4d..3c11e3d 100644 --- a/packages/binutils/2.25.1/910-xtensa-optimize-trampolines-relaxation.patch +++ b/packages/binutils/2.25.1/0017-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); +@@ -8785,6 +8785,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) +@@ -8896,35 +9044,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) +@@ -8978,14 +9133,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) +@@ -9009,10 +9163,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) +@@ -9027,6 +9191,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.25.1/911-xtensa-fix-localized-symbol-refcounting-with-gc-sect.patch b/packages/binutils/2.25.1/0018-xtensa-fix-localized-symbol-refcounting-with-gc-sect.patch index 9ad6b3b..3e8490a 100644 --- a/packages/binutils/2.25.1/911-xtensa-fix-localized-symbol-refcounting-with-gc-sect.patch +++ b/packages/binutils/2.25.1/0018-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, +@@ -1360,10 +1360,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.25.1/912-xtensa-fix-gas-segfault-with-text-section-literals.patch b/packages/binutils/2.25.1/0019-xtensa-fix-gas-segfault-with-text-section-literals.patch index 4a3de2c..b1874cb 100644 --- a/packages/binutils/2.25.1/912-xtensa-fix-gas-segfault-with-text-section-literals.patch +++ b/packages/binutils/2.25.1/0019-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) +@@ -10808,13 +10808,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.25.1/913-xtensa-add-auto-litpools-option.patch b/packages/binutils/2.25.1/0020-xtensa-add-auto-litpools-option.patch index 3ed9af1..9ed61ea 100644 --- a/packages/binutils/2.25.1/913-xtensa-add-auto-litpools-option.patch +++ b/packages/binutils/2.25.1/0020-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[] = +@@ -440,6 +440,29 @@ #endif }; @@ -98,7 +96,7 @@ index 7311a05..b8b1e7d 100644 /* Directive functions. */ -@@ -474,6 +497,9 @@ static void xtensa_create_trampoline_frag (bfd_boolean); +@@ -474,6 +497,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 +@@ -698,6 +724,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[] = +@@ -773,6 +803,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) +@@ -961,6 +995,34 @@ use_trampolines = FALSE; return 1; @@ -165,7 +163,7 @@ index 7311a05..b8b1e7d 100644 default: return 0; } -@@ -986,7 +1048,12 @@ Xtensa options:\n\ +@@ -986,7 +1048,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) +@@ -4728,6 +4795,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) +@@ -4832,6 +4901,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) +@@ -7098,6 +7192,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) +@@ -7170,6 +7269,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) +@@ -7314,11 +7415,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) +@@ -7410,6 +7518,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) +@@ -9029,7 +9266,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) +@@ -10789,12 +11060,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) +@@ -10839,9 +11213,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) +@@ -10849,8 +11220,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) +@@ -11014,7 +11433,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 +@@ -124,6 +124,7 @@ RELAX_LITERAL_POOL_BEGIN, RELAX_LITERAL_POOL_END, @@ -645,11 +641,9 @@ 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,6 +100,7 @@ if [istarget xtensa*-*-*] then { +@@ -100,6 +100,7 @@ run_dump_test "jlong" run_dump_test "trampoline" run_dump_test "first_frag_align" @@ -657,9 +651,6 @@ index d197ec8..db39629 100644 } 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 @@ @@ -675,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 @@ @@ -694,6 +682,3 @@ index 0000000..9a5b26b + .endr + l32r a2, .L1 + ret --- -1.8.1.4 - diff --git a/packages/binutils/2.25.1/914-xtensa-fix-signedness-of-gas-relocations.patch b/packages/binutils/2.25.1/0021-xtensa-fix-signedness-of-gas-relocations.patch index 66d4e60..77b4af3 100644 --- a/packages/binutils/2.25.1/914-xtensa-fix-signedness-of-gas-relocations.patch +++ b/packages/binutils/2.25.1/0021-xtensa-fix-signedness-of-gas-relocations.patch @@ -21,19 +21,17 @@ gas/ Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> --- - gas/config/tc-xtensa.c | 6 +++--- - gas/testsuite/gas/xtensa/all.exp | 1 + - gas/testsuite/gas/xtensa/loc.d | 10 ++++++++++ - gas/testsuite/gas/xtensa/loc.s | 7 +++++++ + gas/config/tc-xtensa.c | 6 +++--- + gas/testsuite/gas/xtensa/all.exp | 1 + + gas/testsuite/gas/xtensa/loc.d | 10 ++++++++++ + gas/testsuite/gas/xtensa/loc.s | 7 +++++++ 4 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 gas/testsuite/gas/xtensa/loc.d create mode 100644 gas/testsuite/gas/xtensa/loc.s -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) +@@ -5961,15 +5961,15 @@ { case BFD_RELOC_8: fixP->fx_r_type = BFD_RELOC_XTENSA_DIFF8; @@ -52,11 +50,9 @@ index a119871..36a06cc 100644 break; default: break; -diff --git a/gas/testsuite/gas/xtensa/all.exp b/gas/testsuite/gas/xtensa/all.exp -index 31b725b..7ff7bd7 100644 --- a/gas/testsuite/gas/xtensa/all.exp +++ b/gas/testsuite/gas/xtensa/all.exp -@@ -101,6 +101,7 @@ if [istarget xtensa*-*-*] then { +@@ -101,6 +101,7 @@ run_dump_test "trampoline" run_dump_test "first_frag_align" run_dump_test "auto-litpools" @@ -64,9 +60,6 @@ index 31b725b..7ff7bd7 100644 } if [info exists errorInfo] then { -diff --git a/gas/testsuite/gas/xtensa/loc.d b/gas/testsuite/gas/xtensa/loc.d -new file mode 100644 -index 0000000..71983cc --- /dev/null +++ b/gas/testsuite/gas/xtensa/loc.d @@ -0,0 +1,10 @@ @@ -80,9 +73,6 @@ index 0000000..71983cc +#... +.*R_XTENSA_DIFF16.*\.text\+0x00009c42 +#... -diff --git a/gas/testsuite/gas/xtensa/loc.s b/gas/testsuite/gas/xtensa/loc.s -new file mode 100644 -index 0000000..029e14e --- /dev/null +++ b/gas/testsuite/gas/xtensa/loc.s @@ -0,0 +1,7 @@ @@ -93,6 +83,3 @@ index 0000000..029e14e + .space 40000 + .loc 1 5 + nop --- -2.1.4 - diff --git a/packages/binutils/2.25.1/915-xtensa-fix-.init-.fini-literals-moving.patch b/packages/binutils/2.25.1/0022-xtensa-fix-.init-.fini-literals-moving.patch index ead3e42..0b2b3fa 100644 --- a/packages/binutils/2.25.1/915-xtensa-fix-.init-.fini-literals-moving.patch +++ b/packages/binutils/2.25.1/0022-xtensa-fix-.init-.fini-literals-moving.patch @@ -38,19 +38,17 @@ Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> --- Backported from: 4111950f363221c4641dc2f33bea61cc94f34906 - gas/config/tc-xtensa.c | 12 ++++++++++-- - gas/testsuite/gas/xtensa/all.exp | 1 + - gas/testsuite/gas/xtensa/init-fini-literals.d | 24 ++++++++++++++++++++++++ - gas/testsuite/gas/xtensa/init-fini-literals.s | 19 +++++++++++++++++++ + gas/config/tc-xtensa.c | 12 ++++++++++-- + gas/testsuite/gas/xtensa/all.exp | 1 + + gas/testsuite/gas/xtensa/init-fini-literals.d | 24 ++++++++++++++++++++++++ + gas/testsuite/gas/xtensa/init-fini-literals.s | 19 +++++++++++++++++++ 4 files changed, 54 insertions(+), 2 deletions(-) create mode 100644 gas/testsuite/gas/xtensa/init-fini-literals.d create mode 100644 gas/testsuite/gas/xtensa/init-fini-literals.s -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) +@@ -11061,6 +11061,10 @@ fixS *fix, *next_fix, **fix_splice; sym_list *lit; struct litpool_seg *lps; @@ -61,7 +59,7 @@ index 36a06cc..5773634 100644 mark_literal_frags (literal_head->next); -@@ -11171,9 +11175,13 @@ xtensa_move_literals (void) +@@ -11171,9 +11175,13 @@ for (segment = literal_head->next; segment; segment = segment->next) { @@ -77,11 +75,9 @@ index 36a06cc..5773634 100644 continue; frchain_from = seg_info (segment->seg)->frchainP; -diff --git a/gas/testsuite/gas/xtensa/all.exp b/gas/testsuite/gas/xtensa/all.exp -index 7ff7bd7..6b67320 100644 --- a/gas/testsuite/gas/xtensa/all.exp +++ b/gas/testsuite/gas/xtensa/all.exp -@@ -102,6 +102,7 @@ if [istarget xtensa*-*-*] then { +@@ -102,6 +102,7 @@ run_dump_test "first_frag_align" run_dump_test "auto-litpools" run_dump_test "loc" @@ -89,9 +85,6 @@ index 7ff7bd7..6b67320 100644 } if [info exists errorInfo] then { -diff --git a/gas/testsuite/gas/xtensa/init-fini-literals.d b/gas/testsuite/gas/xtensa/init-fini-literals.d -new file mode 100644 -index 0000000..19ed121 --- /dev/null +++ b/gas/testsuite/gas/xtensa/init-fini-literals.d @@ -0,0 +1,24 @@ @@ -119,9 +112,6 @@ index 0000000..19ed121 +.* R_XTENSA_SLOT0_OP \.fini\.literal +.* R_XTENSA_SLOT0_OP \.fini\.literal\+0x00000004 +#... -diff --git a/gas/testsuite/gas/xtensa/init-fini-literals.s b/gas/testsuite/gas/xtensa/init-fini-literals.s -new file mode 100644 -index 0000000..7c9ec17 --- /dev/null +++ b/gas/testsuite/gas/xtensa/init-fini-literals.s @@ -0,0 +1,19 @@ @@ -144,6 +134,3 @@ index 0000000..7c9ec17 + + l32r a2, .LC2 + l32r a2, .LC3 --- -2.1.4 - |