summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/binutils
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2013-04-25 20:38:23 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-05-08 15:41:13 +0100
commitedcae40bf61109a63d43f59147b3de6c51750e14 (patch)
tree87e3444d2bdf0733e6ea6453a0bb5330030c70bf /meta/recipes-devtools/binutils
parent4bf8253af7f5d28e81dd0c5d150712b36b14e741 (diff)
downloadpoky-edcae40bf61109a63d43f59147b3de6c51750e14.tar.gz
binutils: Upgrade 2.23.1 -> 2.23.2
(From OE-Core rev: 202f46b139ab20079e97cdeb147d59e23bcdfe01) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/binutils')
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.23.1/backport/0001-bfd.patch58
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.23.1/backport/0003-Assemble-all-sources-files-in-each-test.patch187
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.23.1/backport/0005-bfd.patch103
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.23.1/backport/0010-bfd-ChangeLog.patch95
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.23.1/backport/0012-Fix-TLS-LD-to-LE-optimization-for-x32.patch57
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.23.1/backport/0013-gas-ChangeLog.patch43
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.23.1/backport/0014-Fix-opcode-for-64-bit-jecxz.patch112
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.23.1/backport/0017-ld-elf-comm-data.exp-Add-XFAIL-for-arm-targets-refer.patch40
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.23.1/backport/0018-bfd.patch78
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.23.1/backport/0024-bfd.patch49
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.23.1/backport/0026-ld-testsuite.patch65
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.23.2.inc (renamed from meta/recipes-devtools/binutils/binutils-2.23.1.inc)15
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.23.2/backport/0001-config-tc-ppc.c-md_assemble-Do-not-generate-APUinfo-.patch (renamed from meta/recipes-devtools/binutils/binutils-2.23.1/backport/0001-config-tc-ppc.c-md_assemble-Do-not-generate-APUinfo-.patch)0
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.23.2/backport/0001-doc-binutils.texi-elfedit-Fix-use-of-itemx-in-table.patch (renamed from meta/recipes-devtools/binutils/binutils-2.23.1/backport/0001-doc-binutils.texi-elfedit-Fix-use-of-itemx-in-table.patch)0
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.23.2/backport/0001-ld.texinfo-Replace-with-when-it-is-part-of-the-text.patch (renamed from meta/recipes-devtools/binutils/binutils-2.23.1/backport/0001-ld.texinfo-Replace-with-when-it-is-part-of-the-text.patch)0
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.23.2/backport/binutils-fix-ineffectual-zero-of-cache.patch (renamed from meta/recipes-devtools/binutils/binutils-2.23.1/backport/binutils-fix-ineffectual-zero-of-cache.patch)0
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.23.2/backport/binutils-replace-strncat-with-strcat.patch (renamed from meta/recipes-devtools/binutils/binutils-2.23.1/backport/binutils-replace-strncat-with-strcat.patch)0
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.23.2/binutils-armv5e.patch (renamed from meta/recipes-devtools/binutils/binutils-2.23.1/binutils-armv5e.patch)0
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.23.2/binutils-fix-over-array-bounds-issue.patch (renamed from meta/recipes-devtools/binutils/binutils-2.23.1/binutils-fix-over-array-bounds-issue.patch)0
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.23.2/binutils-poison.patch (renamed from meta/recipes-devtools/binutils/binutils-2.23.1/binutils-poison.patch)0
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.23.2/binutils-uclibc-100-uclibc-conf.patch (renamed from meta/recipes-devtools/binutils/binutils-2.23.1/binutils-uclibc-100-uclibc-conf.patch)0
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.23.2/binutils-uclibc-300-001_ld_makefile_patch.patch (renamed from meta/recipes-devtools/binutils/binutils-2.23.1/binutils-uclibc-300-001_ld_makefile_patch.patch)0
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.23.2/binutils-uclibc-300-006_better_file_error.patch (renamed from meta/recipes-devtools/binutils/binutils-2.23.1/binutils-uclibc-300-006_better_file_error.patch)0
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.23.2/binutils-uclibc-300-012_check_ldrunpath_length.patch (renamed from meta/recipes-devtools/binutils/binutils-2.23.1/binutils-uclibc-300-012_check_ldrunpath_length.patch)0
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.23.2/binutils-uclibc-gas-needs-libm.patch (renamed from meta/recipes-devtools/binutils/binutils-2.23.1/binutils-uclibc-gas-needs-libm.patch)0
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.23.2/binutils-x86_64_i386_biarch.patch (renamed from meta/recipes-devtools/binutils/binutils-2.23.1/binutils-x86_64_i386_biarch.patch)0
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.23.2/libiberty_path_fix.patch (renamed from meta/recipes-devtools/binutils/binutils-2.23.1/libiberty_path_fix.patch)0
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.23.2/libtool-2.4-update.patch (renamed from meta/recipes-devtools/binutils/binutils-2.23.1/libtool-2.4-update.patch)0
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.23.2/libtool-rpath-fix.patch (renamed from meta/recipes-devtools/binutils/binutils-2.23.1/libtool-rpath-fix.patch)0
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.23.2/mips64-default-ld-emulation.patch (renamed from meta/recipes-devtools/binutils/binutils-2.23.1/mips64-default-ld-emulation.patch)0
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.23.2/relocatable_sdk.patch (renamed from meta/recipes-devtools/binutils/binutils-2.23.1/relocatable_sdk.patch)0
-rw-r--r--meta/recipes-devtools/binutils/binutils-cross-canadian_2.23.2.bb (renamed from meta/recipes-devtools/binutils/binutils-cross-canadian_2.23.1.bb)0
-rw-r--r--meta/recipes-devtools/binutils/binutils-cross_2.23.2.bb (renamed from meta/recipes-devtools/binutils/binutils-cross_2.23.1.bb)0
-rw-r--r--meta/recipes-devtools/binutils/binutils-crosssdk_2.23.2.bb (renamed from meta/recipes-devtools/binutils/binutils-crosssdk_2.23.1.bb)0
-rw-r--r--meta/recipes-devtools/binutils/binutils_2.23.2.bb (renamed from meta/recipes-devtools/binutils/binutils_2.23.1.bb)0
35 files changed, 2 insertions, 900 deletions
diff --git a/meta/recipes-devtools/binutils/binutils-2.23.1/backport/0001-bfd.patch b/meta/recipes-devtools/binutils/binutils-2.23.1/backport/0001-bfd.patch
deleted file mode 100644
index c04f8d45b3..0000000000
--- a/meta/recipes-devtools/binutils/binutils-2.23.1/backport/0001-bfd.patch
+++ /dev/null
@@ -1,58 +0,0 @@
1From 7dbb7d8db8003ff73d80956bd3271f9588437aa7 Mon Sep 17 00:00:00 2001
2From: Tristan Gingold <gingold@adacore.com>
3Date: Tue, 13 Nov 2012 15:22:45 +0000
4Subject: [PATCH 01/27] bfd/ 2012-11-13 Tristan Gingold
5 <gingold@adacore.com>
6
7 * Makefile.am (RELEASE): Unset.
8 * Makefile.in: Regenerate.
9---
10 bfd/ChangeLog | 5 +++++
11 bfd/Makefile.am | 2 +-
12 bfd/Makefile.in | 2 +-
13 3 files changed, 7 insertions(+), 2 deletions(-)
14
15diff --git a/bfd/ChangeLog b/bfd/ChangeLog
16index bed5dca..7aa83bf 100644
17--- a/bfd/ChangeLog
18+++ b/bfd/ChangeLog
19@@ -1,5 +1,10 @@
20 2012-11-13 Tristan Gingold <gingold@adacore.com>
21
22+ * Makefile.am (RELEASE): Unset.
23+ * Makefile.in: Regenerate.
24+
25+2012-11-13 Tristan Gingold <gingold@adacore.com>
26+
27 * configure.in: Bump version to 2.23.1
28 * Makefile.am (RELEASE): Set.
29 * configure, Makefile.in: Regenerate.
30diff --git a/bfd/Makefile.am b/bfd/Makefile.am
31index 9ab2aa9..49f9662 100644
32--- a/bfd/Makefile.am
33+++ b/bfd/Makefile.am
34@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = 1.11 no-dist foreign
35 ACLOCAL_AMFLAGS = -I . -I .. -I ../config
36
37 # Uncomment the following line when doing a release.
38-RELEASE=y
39+# RELEASE=y
40
41 INCDIR = $(srcdir)/../include
42 CSEARCH = -I. -I$(srcdir) -I$(INCDIR)
43diff --git a/bfd/Makefile.in b/bfd/Makefile.in
44index 9990275..5718fab 100644
45--- a/bfd/Makefile.in
46+++ b/bfd/Makefile.in
47@@ -320,7 +320,7 @@ AUTOMAKE_OPTIONS = 1.11 no-dist foreign
48 ACLOCAL_AMFLAGS = -I . -I .. -I ../config
49
50 # Uncomment the following line when doing a release.
51-RELEASE = y
52+# RELEASE=y
53 INCDIR = $(srcdir)/../include
54 CSEARCH = -I. -I$(srcdir) -I$(INCDIR)
55 SUBDIRS = doc po
56--
571.7.9.5
58
diff --git a/meta/recipes-devtools/binutils/binutils-2.23.1/backport/0003-Assemble-all-sources-files-in-each-test.patch b/meta/recipes-devtools/binutils/binutils-2.23.1/backport/0003-Assemble-all-sources-files-in-each-test.patch
deleted file mode 100644
index be0888590a..0000000000
--- a/meta/recipes-devtools/binutils/binutils-2.23.1/backport/0003-Assemble-all-sources-files-in-each-test.patch
+++ /dev/null
@@ -1,187 +0,0 @@
1From 80b672d804357f2a1be04ac4e5a4d4c7d0d3b348 Mon Sep 17 00:00:00 2001
2From: "H.J. Lu" <hjl.tools@gmail.com>
3Date: Wed, 14 Nov 2012 15:54:04 +0000
4Subject: [PATCH 03/27] Assemble all sources files in each test
5
6 * ld-elf/shared.exp (build_cxx_tests): Move out the commented out
7 test.
8
9 * lib/ld-lib.exp (run_ld_link_exec_tests): Assemble all sources
10 files in each test.
11---
12 ld/testsuite/ChangeLog | 8 ++++
13 ld/testsuite/ld-elf/shared.exp | 8 ++--
14 ld/testsuite/lib/ld-lib.exp | 97 ++++++++++++++++++++--------------------
15 3 files changed, 60 insertions(+), 53 deletions(-)
16
17diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
18index ffcfa7e..e02432f 100644
19--- a/ld/testsuite/ChangeLog
20+++ b/ld/testsuite/ChangeLog
21@@ -1,3 +1,11 @@
22+2012-11-14 H.J. Lu <hongjiu.lu@intel.com>
23+
24+ * ld-elf/shared.exp (build_cxx_tests): Move out the commented out
25+ test.
26+
27+ * lib/ld-lib.exp (run_ld_link_exec_tests): Assemble all sources
28+ files in each test.
29+
30 2012-10-16 Sofiane Naci <sofiane.naci@arm.com>
31
32 * ld-aarch64/tlsle-symbol-offset.s: New file.
33diff --git a/ld/testsuite/ld-elf/shared.exp b/ld/testsuite/ld-elf/shared.exp
34index c00f3e5..c9f2056 100644
35--- a/ld/testsuite/ld-elf/shared.exp
36+++ b/ld/testsuite/ld-elf/shared.exp
37@@ -336,14 +336,14 @@ set build_cxx_tests {
38 {del.cc new.cc} {} "libnew1b.so" "c++"}
39 }
40
41-set run_cxx_tests {
42- {"Run with libdl3a.so"
43- "-Wl,--no-as-needed tmpdir/libdl3a.so" ""
44- {dl3main.cc} "dl3a" "dl3a.out" "" "c++"}
45 # "-shared -Bsymbolic" only works with gcc 4.5.0 and newer.
46 # {"Run with libdl3b.so"
47 # "tmpdir/libdl3b.so" ""
48 # {dl3main.cc} "dl3b" "dl3b.out" "" "c++"}
49+set run_cxx_tests {
50+ {"Run with libdl3a.so"
51+ "-Wl,--no-as-needed tmpdir/libdl3a.so" ""
52+ {dl3main.cc} "dl3a" "dl3a.out" "" "c++"}
53 {"Run with libdl3c.so"
54 "-Wl,--no-as-needed tmpdir/libdl3c.so" ""
55 {dl3main.cc} "dl3c" "dl3a.out" "" "c++"}
56diff --git a/ld/testsuite/lib/ld-lib.exp b/ld/testsuite/lib/ld-lib.exp
57index bb4cb0d..49837dd 100644
58--- a/ld/testsuite/lib/ld-lib.exp
59+++ b/ld/testsuite/lib/ld-lib.exp
60@@ -1244,7 +1244,6 @@ proc run_ld_link_exec_tests { targets_to_xfail ldtests } {
61 # verbose -log "ld_options is $ld_options"
62 # verbose -log "as_options is $as_options"
63 # verbose -log "src_files is $src_files"
64-# verbose -log "actions is $actions"
65 # verbose -log "binfile is $binfile"
66
67 # Assemble each file in the test.
68@@ -1261,68 +1260,68 @@ proc run_ld_link_exec_tests { targets_to_xfail ldtests } {
69 } else {
70 ld_compile "$CC -c $CFLAGS $cflags" $srcdir/$subdir/$src_file $objfile
71 }
72+ }
73
74- # We have to use $CC to build PIE and shared library.
75- if { [ string match "c" $lang ] } {
76- set link_proc ld_simple_link
77- set link_cmd $CC
78- } elseif { [ string match "c++" $lang ] } {
79- set link_proc ld_simple_link
80- set link_cmd $CXX
81- } elseif { [ string match "-shared" $ld_options ] \
82- || [ string match "-pie" $ld_options ] } {
83- set link_proc ld_simple_link
84- set link_cmd $CC
85- } else {
86- set link_proc ld_link
87- set link_cmd $ld
88- }
89+ # We have to use $CC to build PIE and shared library.
90+ if { [ string match "c" $lang ] } {
91+ set link_proc ld_simple_link
92+ set link_cmd $CC
93+ } elseif { [ string match "c++" $lang ] } {
94+ set link_proc ld_simple_link
95+ set link_cmd $CXX
96+ } elseif { [ string match "-shared" $ld_options ] \
97+ || [ string match "-pie" $ld_options ] } {
98+ set link_proc ld_simple_link
99+ set link_cmd $CC
100+ } else {
101+ set link_proc ld_link
102+ set link_cmd $ld
103+ }
104
105- if ![$link_proc $link_cmd $binfile "-L$srcdir/$subdir $ld_options $objfiles"] {
106- set failed 1
107- } else {
108+ if ![$link_proc $link_cmd $binfile "-L$srcdir/$subdir $ld_options $objfiles"] {
109+ set failed 1
110+ } else {
111+ set failed 0
112+ }
113+
114+ # Check if exec_output is expected.
115+ if { $warning != "" } then {
116+ verbose -log "returned with: <$exec_output>, expected: <$warning>"
117+ if { [regexp $warning $exec_output] } then {
118 set failed 0
119+ } else {
120+ set failed 1
121 }
122+ }
123
124- # Check if exec_output is expected.
125- if { $warning != "" } then {
126- verbose -log "returned with: <$exec_output>, expected: <$warning>"
127- if { [regexp $warning $exec_output] } then {
128- set failed 0
129- } else {
130- set failed 1
131- }
132- }
133+ if { $failed == 0 } {
134+ send_log "Running: $binfile > $binfile.out\n"
135+ verbose "Running: $binfile > $binfile.out"
136+ catch "exec $binfile > $binfile.out" exec_output
137
138- if { $failed == 0 } {
139- send_log "Running: $binfile > $binfile.out\n"
140- verbose "Running: $binfile > $binfile.out"
141- catch "exec $binfile > $binfile.out" exec_output
142+ if ![string match "" $exec_output] then {
143+ send_log "$exec_output\n"
144+ verbose "$exec_output" 1
145+ set failed 1
146+ } else {
147+ send_log "diff $binfile.out $srcdir/$subdir/$expfile\n"
148+ verbose "diff $binfile.out $srcdir/$subdir/$expfile"
149+ catch "exec diff $binfile.out $srcdir/$subdir/$expfile" exec_output
150+ set exec_output [prune_warnings $exec_output]
151
152 if ![string match "" $exec_output] then {
153 send_log "$exec_output\n"
154 verbose "$exec_output" 1
155 set failed 1
156- } else {
157- send_log "diff $binfile.out $srcdir/$subdir/$expfile\n"
158- verbose "diff $binfile.out $srcdir/$subdir/$expfile"
159- catch "exec diff $binfile.out $srcdir/$subdir/$expfile" exec_output
160- set exec_output [prune_warnings $exec_output]
161-
162- if ![string match "" $exec_output] then {
163- send_log "$exec_output\n"
164- verbose "$exec_output" 1
165- set failed 1
166- }
167 }
168 }
169+ }
170
171- if { $failed != 0 } {
172- fail $testname
173- } else {
174- set errcnt 0
175- pass $testname
176- }
177+ if { $failed != 0 } {
178+ fail $testname
179+ } else {
180+ set errcnt 0
181+ pass $testname
182 }
183 }
184 }
185--
1861.7.9.5
187
diff --git a/meta/recipes-devtools/binutils/binutils-2.23.1/backport/0005-bfd.patch b/meta/recipes-devtools/binutils/binutils-2.23.1/backport/0005-bfd.patch
deleted file mode 100644
index 4f970044e3..0000000000
--- a/meta/recipes-devtools/binutils/binutils-2.23.1/backport/0005-bfd.patch
+++ /dev/null
@@ -1,103 +0,0 @@
1From e4b6d90dbcbf56c959eca8dcdf846fbe21c822e3 Mon Sep 17 00:00:00 2001
2From: Roland McGrath <roland@gnu.org>
3Date: Thu, 15 Nov 2012 00:33:27 +0000
4Subject: [PATCH 05/27] bfd/ * elf32-arm.c (elf32_arm_nacl_plt0_entry): Use
5 bic rather than bfc instruction for data
6 sandboxing.
7
8gold/
9 * arm.cc (Output_data_plt_arm_nacl::first_plt_entry): Use bic rather
10 than bfc instruction for data sandboxing.
11---
12 bfd/ChangeLog | 5 +++++
13 bfd/elf32-arm.c | 18 +++++++++---------
14 gold/ChangeLog | 5 +++++
15 gold/arm.cc | 4 ++--
16 4 files changed, 21 insertions(+), 11 deletions(-)
17
18diff --git a/bfd/ChangeLog b/bfd/ChangeLog
19index 7aa83bf..981e05a 100644
20--- a/bfd/ChangeLog
21+++ b/bfd/ChangeLog
22@@ -1,3 +1,8 @@
23+2012-11-14 Roland McGrath <mcgrathr@google.com>
24+
25+ * elf32-arm.c (elf32_arm_nacl_plt0_entry): Use bic rather than bfc
26+ instruction for data sandboxing.
27+
28 2012-11-13 Tristan Gingold <gingold@adacore.com>
29
30 * Makefile.am (RELEASE): Unset.
31diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c
32index a287fbb..3c541ca 100644
33--- a/bfd/elf32-arm.c
34+++ b/bfd/elf32-arm.c
35@@ -2209,21 +2209,21 @@ static const bfd_vma elf32_arm_nacl_plt0_entry [] =
36 0xe08cc00f, /* add ip, ip, pc */
37 0xe52dc008, /* str ip, [sp, #-8]! */
38 /* Second bundle: */
39- 0xe7dfcf1f, /* bfc ip, #30, #2 */
40- 0xe59cc000, /* ldr ip, [ip] */
41+ 0xe3ccc103, /* bic ip, ip, #0xc0000000 */
42+ 0xe59cc000, /* ldr ip, [ip] */
43 0xe3ccc13f, /* bic ip, ip, #0xc000000f */
44- 0xe12fff1c, /* bx ip */
45+ 0xe12fff1c, /* bx ip */
46 /* Third bundle: */
47- 0xe320f000, /* nop */
48- 0xe320f000, /* nop */
49- 0xe320f000, /* nop */
50+ 0xe320f000, /* nop */
51+ 0xe320f000, /* nop */
52+ 0xe320f000, /* nop */
53 /* .Lplt_tail: */
54 0xe50dc004, /* str ip, [sp, #-4] */
55 /* Fourth bundle: */
56- 0xe7dfcf1f, /* bfc ip, #30, #2 */
57- 0xe59cc000, /* ldr ip, [ip] */
58+ 0xe3ccc103, /* bic ip, ip, #0xc0000000 */
59+ 0xe59cc000, /* ldr ip, [ip] */
60 0xe3ccc13f, /* bic ip, ip, #0xc000000f */
61- 0xe12fff1c, /* bx ip */
62+ 0xe12fff1c, /* bx ip */
63 };
64 #define ARM_NACL_PLT_TAIL_OFFSET (11 * 4)
65
66diff --git a/gold/ChangeLog b/gold/ChangeLog
67index 0d3074a..9a1a9d3 100644
68--- a/gold/ChangeLog
69+++ b/gold/ChangeLog
70@@ -1,3 +1,8 @@
71+2012-11-14 Roland McGrath <mcgrathr@google.com>
72+
73+ * arm.cc (Output_data_plt_arm_nacl::first_plt_entry): Use bic rather
74+ than bfc instruction for data sandboxing.
75+
76 2012-11-07 Roland McGrath <mcgrathr@google.com>
77
78 * i386.cc (Target_i386::relocate_for_relocatable): Remove extraneous
79diff --git a/gold/arm.cc b/gold/arm.cc
80index d434c9d..238cf32 100644
81--- a/gold/arm.cc
82+++ b/gold/arm.cc
83@@ -12196,7 +12196,7 @@ const uint32_t Output_data_plt_arm_nacl<big_endian>::first_plt_entry[16] =
84 0xe08cc00f, // add ip, ip, pc
85 0xe52dc008, // str ip, [sp, #-8]!
86 // Second bundle:
87- 0xe7dfcf1f, // bfc ip, #30, #2
88+ 0xe3ccc103, // bic ip, ip, #0xc0000000
89 0xe59cc000, // ldr ip, [ip]
90 0xe3ccc13f, // bic ip, ip, #0xc000000f
91 0xe12fff1c, // bx ip
92@@ -12207,7 +12207,7 @@ const uint32_t Output_data_plt_arm_nacl<big_endian>::first_plt_entry[16] =
93 // .Lplt_tail:
94 0xe50dc004, // str ip, [sp, #-4]
95 // Fourth bundle:
96- 0xe7dfcf1f, // bfc ip, #30, #2
97+ 0xe3ccc103, // bic ip, ip, #0xc0000000
98 0xe59cc000, // ldr ip, [ip]
99 0xe3ccc13f, // bic ip, ip, #0xc000000f
100 0xe12fff1c, // bx ip
101--
1021.7.9.5
103
diff --git a/meta/recipes-devtools/binutils/binutils-2.23.1/backport/0010-bfd-ChangeLog.patch b/meta/recipes-devtools/binutils/binutils-2.23.1/backport/0010-bfd-ChangeLog.patch
deleted file mode 100644
index 8ade69d3fc..0000000000
--- a/meta/recipes-devtools/binutils/binutils-2.23.1/backport/0010-bfd-ChangeLog.patch
+++ /dev/null
@@ -1,95 +0,0 @@
1From c49a2d2d8ff625b17699c44a703f217de5b4fa2f Mon Sep 17 00:00:00 2001
2From: Yufeng Zhang <yufeng.zhang@arm.com>
3Date: Mon, 19 Nov 2012 18:46:01 +0000
4Subject: [PATCH 10/27] bfd/ChangeLog
5
62012-11-19 Joey Ye <joey.ye@arm.com>
7
8 * elf32-arm.c (elf32_arm_final_link_relocate,
9 case R_ARM_THM_ALU_PREL_11_0, case R_ARM_THM_PC12): Align address of
10 the place being relocated.
11 (elf32_arm_final_link_relocate, case R_ARM_THM_PC8): Align address
12 of the place being relocated and truncate addend.
13 (Pa): New macro.
14---
15 bfd/ChangeLog | 9 +++++++++
16 bfd/elf32-arm.c | 23 +++++++++++++----------
17 2 files changed, 22 insertions(+), 10 deletions(-)
18
19diff --git a/bfd/ChangeLog b/bfd/ChangeLog
20index 981e05a..59c36a7 100644
21--- a/bfd/ChangeLog
22+++ b/bfd/ChangeLog
23@@ -1,3 +1,12 @@
24+2012-11-19 Joey Ye <joey.ye@arm.com>
25+
26+ * elf32-arm.c (elf32_arm_final_link_relocate,
27+ case R_ARM_THM_ALU_PREL_11_0, case R_ARM_THM_PC12): Align address of
28+ the place being relocated.
29+ (elf32_arm_final_link_relocate, case R_ARM_THM_PC8): Align address
30+ of the place being relocated and truncate addend.
31+ (Pa): New macro.
32+
33 2012-11-14 Roland McGrath <mcgrathr@google.com>
34
35 * elf32-arm.c (elf32_arm_nacl_plt0_entry): Use bic rather than bfc
36diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c
37index 3c541ca..01ca11b 100644
38--- a/bfd/elf32-arm.c
39+++ b/bfd/elf32-arm.c
40@@ -63,6 +63,9 @@
41 #define ARM_ELF_ABI_VERSION 0
42 #define ARM_ELF_OS_ABI_VERSION ELFOSABI_ARM
43
44+/* The Adjusted Place, as defined by AAELF. */
45+#define Pa(X) ((X) & 0xfffffffc)
46+
47 static bfd_boolean elf32_arm_write_section (bfd *output_bfd,
48 struct bfd_link_info *link_info,
49 asection *sec,
50@@ -8619,9 +8622,9 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto,
51 }
52
53 relocation = value + signed_addend;
54- relocation -= (input_section->output_section->vma
55- + input_section->output_offset
56- + rel->r_offset);
57+ relocation -= Pa (input_section->output_section->vma
58+ + input_section->output_offset
59+ + rel->r_offset);
60
61 value = abs (relocation);
62
63@@ -8651,12 +8654,12 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto,
64 insn = bfd_get_16 (input_bfd, hit_data);
65
66 if (globals->use_rel)
67- addend = (insn & 0x00ff) << 2;
68+ addend = ((((insn & 0x00ff) << 2) + 4) & 0x3ff) -4;
69
70 relocation = value + addend;
71- relocation -= (input_section->output_section->vma
72- + input_section->output_offset
73- + rel->r_offset);
74+ relocation -= Pa (input_section->output_section->vma
75+ + input_section->output_offset
76+ + rel->r_offset);
77
78 value = abs (relocation);
79
80@@ -8691,9 +8694,9 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto,
81 }
82
83 relocation = value + signed_addend;
84- relocation -= (input_section->output_section->vma
85- + input_section->output_offset
86- + rel->r_offset);
87+ relocation -= Pa (input_section->output_section->vma
88+ + input_section->output_offset
89+ + rel->r_offset);
90
91 value = abs (relocation);
92
93--
941.7.9.5
95
diff --git a/meta/recipes-devtools/binutils/binutils-2.23.1/backport/0012-Fix-TLS-LD-to-LE-optimization-for-x32.patch b/meta/recipes-devtools/binutils/binutils-2.23.1/backport/0012-Fix-TLS-LD-to-LE-optimization-for-x32.patch
deleted file mode 100644
index b4bc10f9c5..0000000000
--- a/meta/recipes-devtools/binutils/binutils-2.23.1/backport/0012-Fix-TLS-LD-to-LE-optimization-for-x32.patch
+++ /dev/null
@@ -1,57 +0,0 @@
1From 0c6a475b99dc06a49549d81059f290b23b86c62d Mon Sep 17 00:00:00 2001
2From: "H.J. Lu" <hjl.tools@gmail.com>
3Date: Tue, 20 Nov 2012 05:57:53 +0000
4Subject: [PATCH 12/27] Fix TLS LD to LE optimization for x32
5
6 PR gold/14858
7 * x86_64.cc (Relocate::tls_ld_to_le): Support x32.
8---
9 gold/ChangeLog | 5 +++++
10 gold/x86_64.cc | 9 ++++++++-
11 2 files changed, 13 insertions(+), 1 deletion(-)
12
13diff --git a/gold/ChangeLog b/gold/ChangeLog
14index 9a1a9d3..b31d11f 100644
15--- a/gold/ChangeLog
16+++ b/gold/ChangeLog
17@@ -1,3 +1,8 @@
18+2012-11-19 H.J. Lu <hongjiu.lu@intel.com>
19+
20+ PR gold/14858
21+ * x86_64.cc (Relocate::tls_ld_to_le): Support x32.
22+
23 2012-11-14 Roland McGrath <mcgrathr@google.com>
24
25 * arm.cc (Output_data_plt_arm_nacl::first_plt_entry): Use bic rather
26diff --git a/gold/x86_64.cc b/gold/x86_64.cc
27index b5b616f..8ddf4f2 100644
28--- a/gold/x86_64.cc
29+++ b/gold/x86_64.cc
30@@ -3959,8 +3959,12 @@ Target_x86_64<size>::Relocate::tls_ld_to_le(
31 section_size_type view_size)
32 {
33 // leaq foo@tlsld(%rip),%rdi; call __tls_get_addr@plt;
34+ // For SIZE == 64:
35 // ... leq foo@dtpoff(%rax),%reg
36 // ==> .word 0x6666; .byte 0x66; movq %fs:0,%rax ... leaq x@tpoff(%rax),%rdx
37+ // For SIZE == 32:
38+ // ... leq foo@dtpoff(%rax),%reg
39+ // ==> nopl 0x0(%rax); movl %fs:0,%eax ... leaq x@tpoff(%rax),%rdx
40
41 tls::check_range(relinfo, relnum, rela.get_r_offset(), view_size, -3);
42 tls::check_range(relinfo, relnum, rela.get_r_offset(), view_size, 9);
43@@ -3970,7 +3974,10 @@ Target_x86_64<size>::Relocate::tls_ld_to_le(
44
45 tls::check_tls(relinfo, relnum, rela.get_r_offset(), view[4] == 0xe8);
46
47- memcpy(view - 3, "\x66\x66\x66\x64\x48\x8b\x04\x25\0\0\0\0", 12);
48+ if (size == 64)
49+ memcpy(view - 3, "\x66\x66\x66\x64\x48\x8b\x04\x25\0\0\0\0", 12);
50+ else
51+ memcpy(view - 3, "\x0f\x1f\x40\x00\x64\x8b\x04\x25\0\0\0\0", 12);
52
53 // The next reloc should be a PLT32 reloc against __tls_get_addr.
54 // We can skip it.
55--
561.7.9.5
57
diff --git a/meta/recipes-devtools/binutils/binutils-2.23.1/backport/0013-gas-ChangeLog.patch b/meta/recipes-devtools/binutils/binutils-2.23.1/backport/0013-gas-ChangeLog.patch
deleted file mode 100644
index f4314201e9..0000000000
--- a/meta/recipes-devtools/binutils/binutils-2.23.1/backport/0013-gas-ChangeLog.patch
+++ /dev/null
@@ -1,43 +0,0 @@
1From d4d8d22c6d0a859f617cf7d0a2e31056893c1d98 Mon Sep 17 00:00:00 2001
2From: Yufeng Zhang <yufeng.zhang@arm.com>
3Date: Tue, 20 Nov 2012 10:41:54 +0000
4Subject: [PATCH 13/27] gas/ChangeLog
5
62012-11-20 Yufeng Zhang <yufeng.zhang@arm.com>
7
8 * config/tc-aarch64.c (first_error_fmt): Add ATTRIBUTE_UNUSED to the
9 local variable "ret".
10---
11 gas/ChangeLog | 5 +++++
12 gas/config/tc-aarch64.c | 2 +-
13 2 files changed, 6 insertions(+), 1 deletion(-)
14
15diff --git a/gas/ChangeLog b/gas/ChangeLog
16index 219c27e..bb9ef1c 100644
17--- a/gas/ChangeLog
18+++ b/gas/ChangeLog
19@@ -1,3 +1,8 @@
20+2012-11-20 Yufeng Zhang <yufeng.zhang@arm.com>
21+
22+ * config/tc-aarch64.c (first_error_fmt): Add ATTRIBUTE_UNUSED to the
23+ local variable "ret".
24+
25 2012-11-07 James Murray <jsm@jsm-net.demon.co.uk>
26
27 * config/tc-m68hc11.c: Fix R_M68HC12_16B relocation for movb/w
28diff --git a/gas/config/tc-aarch64.c b/gas/config/tc-aarch64.c
29index 843923b..a83a62e 100644
30--- a/gas/config/tc-aarch64.c
31+++ b/gas/config/tc-aarch64.c
32@@ -643,7 +643,7 @@ first_error_fmt (const char *format, ...)
33
34 if (! error_p ())
35 {
36- int ret;
37+ int ret ATTRIBUTE_UNUSED;
38 va_start (args, format);
39 ret = vsnprintf (buffer, size, format, args);
40 know (ret <= size - 1 && ret >= 0);
41--
421.7.9.5
43
diff --git a/meta/recipes-devtools/binutils/binutils-2.23.1/backport/0014-Fix-opcode-for-64-bit-jecxz.patch b/meta/recipes-devtools/binutils/binutils-2.23.1/backport/0014-Fix-opcode-for-64-bit-jecxz.patch
deleted file mode 100644
index b230e330c5..0000000000
--- a/meta/recipes-devtools/binutils/binutils-2.23.1/backport/0014-Fix-opcode-for-64-bit-jecxz.patch
+++ /dev/null
@@ -1,112 +0,0 @@
1From adef1e82d241e22139c5edbba1efe9734cfdcace Mon Sep 17 00:00:00 2001
2From: "H.J. Lu" <hjl.tools@gmail.com>
3Date: Tue, 20 Nov 2012 14:30:48 +0000
4Subject: [PATCH 14/27] Fix opcode for 64-bit jecxz
5
6gas/testsuite/
7
8 PR gas/14859
9 * gas/i386/x86-64-opcode.s: Add jecxz.
10 * gas/i386/x86-64-opcode.d: Updated.
11
12opcodes/
13
14 PR gas/14859
15 * i386-opc.tbl: Fix opcode for 64-bit jecxz.
16 * i386-tbl.h: Regenerated.
17---
18 gas/ChangeLog | 6 ++++++
19 gas/testsuite/gas/i386/x86-64-opcode.d | 1 +
20 gas/testsuite/gas/i386/x86-64-opcode.s | 2 ++
21 opcodes/ChangeLog | 9 ++++++++-
22 opcodes/i386-opc.tbl | 2 +-
23 opcodes/i386-tbl.h | 2 +-
24 6 files changed, 19 insertions(+), 3 deletions(-)
25
26diff --git a/gas/ChangeLog b/gas/ChangeLog
27index bb9ef1c..8a950ec 100644
28--- a/gas/ChangeLog
29+++ b/gas/ChangeLog
30@@ -1,3 +1,9 @@
31+2012-11-20 H.J. Lu <hongjiu.lu@intel.com>
32+
33+ PR gas/14859
34+ * gas/i386/x86-64-opcode.s: Add jecxz.
35+ * gas/i386/x86-64-opcode.d: Updated.
36+
37 2012-11-20 Yufeng Zhang <yufeng.zhang@arm.com>
38
39 * config/tc-aarch64.c (first_error_fmt): Add ATTRIBUTE_UNUSED to the
40diff --git a/gas/testsuite/gas/i386/x86-64-opcode.d b/gas/testsuite/gas/i386/x86-64-opcode.d
41index 7c6dd03..4b3003a 100644
42--- a/gas/testsuite/gas/i386/x86-64-opcode.d
43+++ b/gas/testsuite/gas/i386/x86-64-opcode.d
44@@ -296,4 +296,5 @@ Disassembly of section .text:
45 [ ]*[a-f0-9]+: 0f 07 sysret
46 [ ]*[a-f0-9]+: 0f 01 f8 swapgs
47 [ ]*[a-f0-9]+: 66 68 22 22 pushw \$0x2222
48+[ ]*[a-f0-9]+: 67 e3 ff jecxz 0x49d
49 #pass
50diff --git a/gas/testsuite/gas/i386/x86-64-opcode.s b/gas/testsuite/gas/i386/x86-64-opcode.s
51index cb9bbc1..96f624d 100644
52--- a/gas/testsuite/gas/i386/x86-64-opcode.s
53+++ b/gas/testsuite/gas/i386/x86-64-opcode.s
54@@ -424,3 +424,5 @@
55 swapgs # -- -- -- -- 0F 01 f8
56
57 pushw $0x2222
58+
59+ jecxz .+2
60diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
61index ca0f49b..98450f9 100644
62--- a/opcodes/ChangeLog
63+++ b/opcodes/ChangeLog
64@@ -1,3 +1,10 @@
65+2012-11-20 Kirill Yukhin <kirill.yukhin@intel.com>
66+ H.J. Lu <hongjiu.lu@intel.com>
67+
68+ PR gas/14859
69+ * i386-opc.tbl: Fix opcode for 64-bit jecxz.
70+ * i386-tbl.h: Regenerated.
71+
72 2012-10-09 Nagajyothi Eggone <nagajyothi.eggone@amd.com>
73
74 * i386-gen.c (cpu_flag_init): Add CPU_BDVER3_FLAGS.
75@@ -9,7 +16,7 @@
76
77 2012-09-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
78
79- * arm-dis.c: Changed ldra and strl-form mnemonics
80+ * arm-dis.c: Changed ldra and strl-form mnemonics
81 to lda and stl-form.
82
83 2012-09-18 Chao-ying Fu <fu@mips.com>
84diff --git a/opcodes/i386-opc.tbl b/opcodes/i386-opc.tbl
85index 8b08edc..482bd7b 100644
86--- a/opcodes/i386-opc.tbl
87+++ b/opcodes/i386-opc.tbl
88@@ -390,7 +390,7 @@ jg, 1, 0x7f, None, 1, 0, Jump|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf,
89 // jcxz vs. jecxz is chosen on the basis of the address size prefix.
90 jcxz, 1, 0xe3, None, 1, CpuNo64, JumpByte|Size16|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { Disp8|Disp16|Disp32 }
91 jecxz, 1, 0xe3, None, 1, CpuNo64, JumpByte|Size32|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { Disp8|Disp16|Disp32 }
92-jecxz, 1, 0x67e3, None, 2, Cpu64, JumpByte|Size32|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { Disp8|Disp32|Disp32S }
93+jecxz, 1, 0xe3, None, 1, Cpu64, JumpByte|Size32|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { Disp8|Disp32|Disp32S }
94 jrcxz, 1, 0xe3, None, 1, Cpu64, JumpByte|Size64|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf|NoRex64, { Disp8|Disp32|Disp32S }
95
96 // The loop instructions also use the address size prefix to select
97diff --git a/opcodes/i386-tbl.h b/opcodes/i386-tbl.h
98index 001a966..a3a3e64 100644
99--- a/opcodes/i386-tbl.h
100+++ b/opcodes/i386-tbl.h
101@@ -3417,7 +3417,7 @@ const insn_template i386_optab[] =
102 { { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
103 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
104 0, 0, 0, 0, 0, 0 } } } },
105- { "jecxz", 1, 0x67e3, None, 2,
106+ { "jecxz", 1, 0xe3, None, 1,
107 { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
108 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
109 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
110--
1111.7.9.5
112
diff --git a/meta/recipes-devtools/binutils/binutils-2.23.1/backport/0017-ld-elf-comm-data.exp-Add-XFAIL-for-arm-targets-refer.patch b/meta/recipes-devtools/binutils/binutils-2.23.1/backport/0017-ld-elf-comm-data.exp-Add-XFAIL-for-arm-targets-refer.patch
deleted file mode 100644
index 909d27a17b..0000000000
--- a/meta/recipes-devtools/binutils/binutils-2.23.1/backport/0017-ld-elf-comm-data.exp-Add-XFAIL-for-arm-targets-refer.patch
+++ /dev/null
@@ -1,40 +0,0 @@
1From b15bb9c9dc6875a2fe08feba6f31cce6a9468cf7 Mon Sep 17 00:00:00 2001
2From: Roland McGrath <roland@gnu.org>
3Date: Wed, 21 Nov 2012 19:32:32 +0000
4Subject: [PATCH 17/27] * ld-elf/comm-data.exp: Add XFAIL for arm*-*-*
5 targets, referring to PR ld/13802.
6
7---
8 ld/testsuite/ChangeLog | 5 +++++
9 ld/testsuite/ld-elf/comm-data.exp | 2 ++
10 2 files changed, 7 insertions(+)
11
12diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
13index e02432f..aada077 100644
14--- a/ld/testsuite/ChangeLog
15+++ b/ld/testsuite/ChangeLog
16@@ -1,3 +1,8 @@
17+2012-11-21 Roland McGrath <mcgrathr@google.com>
18+
19+ * ld-elf/comm-data.exp: Add XFAIL for arm*-*-* targets, referring
20+ to PR ld/13802.
21+
22 2012-11-14 H.J. Lu <hongjiu.lu@intel.com>
23
24 * ld-elf/shared.exp (build_cxx_tests): Move out the commented out
25diff --git a/ld/testsuite/ld-elf/comm-data.exp b/ld/testsuite/ld-elf/comm-data.exp
26index 1c75f55..71b856d 100644
27--- a/ld/testsuite/ld-elf/comm-data.exp
28+++ b/ld/testsuite/ld-elf/comm-data.exp
29@@ -59,6 +59,8 @@ if [is_elf64 "tmpdir/libcomm-data.so"] {
30 append AFLAGS " --defsym ELF64=1"
31 }
32
33+setup_xfail "arm*-*-*" "ld/13802"
34+
35 # Verify that a common symbol has been converted to an undefined
36 # reference to the global symbol of the same name defined above
37 # and that the debug reference has been dropped.
38--
391.7.9.5
40
diff --git a/meta/recipes-devtools/binutils/binutils-2.23.1/backport/0018-bfd.patch b/meta/recipes-devtools/binutils/binutils-2.23.1/backport/0018-bfd.patch
deleted file mode 100644
index a29f424abf..0000000000
--- a/meta/recipes-devtools/binutils/binutils-2.23.1/backport/0018-bfd.patch
+++ /dev/null
@@ -1,78 +0,0 @@
1From 6a7ec91db1a2a7d60d225ee613c9ebaf1e222acd Mon Sep 17 00:00:00 2001
2From: Roland McGrath <roland@gnu.org>
3Date: Wed, 21 Nov 2012 20:14:41 +0000
4Subject: [PATCH 18/27] bfd/ * elf-nacl.c
5 (segment_nonexecutable_and_has_contents): Renamed to
6 ... (segment_eligible_for_headers): ... this.
7 Take new arguments MAXPAGESIZE and
8 SIZEOF_HEADERS. Return false if the first section's
9 start address doesn't leave space for the headers.
10 (nacl_modify_segment_map): Update caller.
11
12---
13 bfd/ChangeLog | 8 ++++++++
14 bfd/elf-nacl.c | 14 ++++++++++++--
15 2 files changed, 20 insertions(+), 2 deletions(-)
16
17diff --git a/bfd/ChangeLog b/bfd/ChangeLog
18index 59c36a7..cf65838 100644
19--- a/bfd/ChangeLog
20+++ b/bfd/ChangeLog
21@@ -1,3 +1,11 @@
22+2012-11-21 Roland McGrath <mcgrathr@google.com>
23+
24+ * elf-nacl.c (segment_nonexecutable_and_has_contents): Renamed to ...
25+ (segment_eligible_for_headers): ... this. Take new arguments
26+ MAXPAGESIZE and SIZEOF_HEADERS. Return false if the first section's
27+ start address doesn't leave space for the headers.
28+ (nacl_modify_segment_map): Update caller.
29+
30 2012-11-19 Joey Ye <joey.ye@arm.com>
31
32 * elf32-arm.c (elf32_arm_final_link_relocate,
33diff --git a/bfd/elf-nacl.c b/bfd/elf-nacl.c
34index 842e367..04659e7 100644
35--- a/bfd/elf-nacl.c
36+++ b/bfd/elf-nacl.c
37@@ -42,11 +42,18 @@ segment_executable (struct elf_segment_map *seg)
38 return FALSE;
39 }
40
41+/* Determine if this segment is eligible to receive the file and program
42+ headers. It must be non-executable and have contents. Its first
43+ section must start far enough past the page boundary to allow space
44+ for the headers. */
45 static bfd_boolean
46-segment_nonexecutable_and_has_contents (struct elf_segment_map *seg)
47+segment_eligible_for_headers (struct elf_segment_map *seg,
48+ bfd_vma maxpagesize, bfd_vma sizeof_headers)
49 {
50 bfd_boolean any_contents = FALSE;
51 unsigned int i;
52+ if (seg->count == 0 || seg->sections[0]->lma % maxpagesize < sizeof_headers)
53+ return FALSE;
54 for (i = 0; i < seg->count; ++i)
55 {
56 if (seg->sections[i]->flags & SEC_CODE)
57@@ -68,6 +75,8 @@ nacl_modify_segment_map (bfd *abfd, struct bfd_link_info *info)
58 struct elf_segment_map **first_load = NULL;
59 struct elf_segment_map **last_load = NULL;
60 bfd_boolean moved_headers = FALSE;
61+ int sizeof_headers = bfd_sizeof_headers (abfd, info);
62+ bfd_vma maxpagesize = get_elf_backend_data (abfd)->maxpagesize;
63
64 if (info != NULL && info->user_phdrs)
65 /* The linker script used PHDRS explicitly, so don't change what the
66@@ -93,7 +102,8 @@ nacl_modify_segment_map (bfd *abfd, struct bfd_link_info *info)
67 /* Now that we've noted the first PT_LOAD, we're looking for
68 the first non-executable PT_LOAD with a nonempty p_filesz. */
69 else if (!moved_headers
70- && segment_nonexecutable_and_has_contents (seg))
71+ && segment_eligible_for_headers (seg, maxpagesize,
72+ sizeof_headers))
73 {
74 /* This is the one we were looking for!
75
76--
771.7.9.5
78
diff --git a/meta/recipes-devtools/binutils/binutils-2.23.1/backport/0024-bfd.patch b/meta/recipes-devtools/binutils/binutils-2.23.1/backport/0024-bfd.patch
deleted file mode 100644
index f50c2ec075..0000000000
--- a/meta/recipes-devtools/binutils/binutils-2.23.1/backport/0024-bfd.patch
+++ /dev/null
@@ -1,49 +0,0 @@
1From f9fd8f72b070bfdc49c957f3968e6fcec34b57fc Mon Sep 17 00:00:00 2001
2From: Roland McGrath <roland@gnu.org>
3Date: Mon, 26 Nov 2012 17:50:04 +0000
4Subject: [PATCH 24/27] bfd/ * elf-nacl.c (nacl_modify_segment_map): Don't
5 crash when INFO is null.
6
7---
8 bfd/ChangeLog | 4 ++++
9 bfd/elf-nacl.c | 5 ++---
10 2 files changed, 6 insertions(+), 3 deletions(-)
11
12diff --git a/bfd/ChangeLog b/bfd/ChangeLog
13index cf65838..5500b36 100644
14--- a/bfd/ChangeLog
15+++ b/bfd/ChangeLog
16@@ -1,3 +1,7 @@
17+2012-11-26 Roland McGrath <mcgrathr@google.com>
18+
19+ * elf-nacl.c (nacl_modify_segment_map): Don't crash when INFO is null.
20+
21 2012-11-21 Roland McGrath <mcgrathr@google.com>
22
23 * elf-nacl.c (segment_nonexecutable_and_has_contents): Renamed to ...
24diff --git a/bfd/elf-nacl.c b/bfd/elf-nacl.c
25index 04659e7..ce401fa 100644
26--- a/bfd/elf-nacl.c
27+++ b/bfd/elf-nacl.c
28@@ -75,7 +75,7 @@ nacl_modify_segment_map (bfd *abfd, struct bfd_link_info *info)
29 struct elf_segment_map **first_load = NULL;
30 struct elf_segment_map **last_load = NULL;
31 bfd_boolean moved_headers = FALSE;
32- int sizeof_headers = bfd_sizeof_headers (abfd, info);
33+ int sizeof_headers = info == NULL ? 0 : bfd_sizeof_headers (abfd, info);
34 bfd_vma maxpagesize = get_elf_backend_data (abfd)->maxpagesize;
35
36 if (info != NULL && info->user_phdrs)
37@@ -149,8 +149,7 @@ nacl_modify_segment_map (bfd *abfd, struct bfd_link_info *info)
38 proper order for the ELF rule that they must appear in ascending address
39 order. So find the two segments we swapped before, and swap them back. */
40 bfd_boolean
41-nacl_modify_program_headers (bfd *abfd,
42- struct bfd_link_info *info ATTRIBUTE_UNUSED)
43+nacl_modify_program_headers (bfd *abfd, struct bfd_link_info *info)
44 {
45 struct elf_segment_map **m = &elf_tdata (abfd)->segment_map;
46 Elf_Internal_Phdr *phdr = elf_tdata (abfd)->phdr;
47--
481.7.9.5
49
diff --git a/meta/recipes-devtools/binutils/binutils-2.23.1/backport/0026-ld-testsuite.patch b/meta/recipes-devtools/binutils/binutils-2.23.1/backport/0026-ld-testsuite.patch
deleted file mode 100644
index b1e9e65383..0000000000
--- a/meta/recipes-devtools/binutils/binutils-2.23.1/backport/0026-ld-testsuite.patch
+++ /dev/null
@@ -1,65 +0,0 @@
1From fdf71da8350a7c2b4050e09c5a08e7d42b7a4a4a Mon Sep 17 00:00:00 2001
2From: Roland McGrath <roland@gnu.org>
3Date: Tue, 27 Nov 2012 17:23:31 +0000
4Subject: [PATCH 26/27] ld/testsuite/ * ld-elf/flags1.d: Add *-*-nacl* to
5 xfail list. * ld-elf/orphan-region.d: Likewise.
6
7---
8 ld/testsuite/ChangeLog | 5 +++++
9 ld/testsuite/ld-elf/flags1.d | 7 ++++---
10 ld/testsuite/ld-elf/orphan-region.d | 5 +++--
11 3 files changed, 12 insertions(+), 5 deletions(-)
12
13diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
14index aada077..c0558ac 100644
15--- a/ld/testsuite/ChangeLog
16+++ b/ld/testsuite/ChangeLog
17@@ -1,3 +1,8 @@
18+2012-11-27 Roland McGrath <mcgrathr@google.com>
19+
20+ * ld-elf/flags1.d: Add *-*-nacl* to xfail list.
21+ * ld-elf/orphan-region.d: Likewise.
22+
23 2012-11-21 Roland McGrath <mcgrathr@google.com>
24
25 * ld-elf/comm-data.exp: Add XFAIL for arm*-*-* targets, referring
26diff --git a/ld/testsuite/ld-elf/flags1.d b/ld/testsuite/ld-elf/flags1.d
27index e6bb001..ab8facc 100644
28--- a/ld/testsuite/ld-elf/flags1.d
29+++ b/ld/testsuite/ld-elf/flags1.d
30@@ -1,11 +1,12 @@
31 #name: --set-section-flags test 1 (sections)
32 #ld: -Tflags1.ld
33-#objcopy_linked_file: --set-section-flags .post_text_reserve=contents,alloc,load,readonly,code
34+#objcopy_linked_file: --set-section-flags .post_text_reserve=contents,alloc,load,readonly,code
35 #readelf: -l --wide
36 #xfail: "avr-*-*" "dlx-*-*" "h8300-*-*" "i960-*-*" "ip2k-*-*" "m32r-*-*"
37-#xfail: "moxie-*-*" "mt-*-*" "msp430-*-*"
38+#xfail: "moxie-*-*" "mt-*-*" "msp430-*-*" "*-*-nacl*"
39 #xfail: "*-*-hpux*" "hppa*64*-*-*"
40-# Fails on the AVR, DLX, H8300, I960, IP2K, M32R, MOXIE, MT, and MSP430
41+# Fails on the AVR, DLX, H8300, I960, IP2K, M32R, MOXIE, MT, and MSP430,
42+# and all NaCl targets,
43 # because the two sections are not merged into one segment.
44 # (There is no good reason why they have to be).
45 # Fails on HPUX systems because the .type pseudo-op behaves differently.
46diff --git a/ld/testsuite/ld-elf/orphan-region.d b/ld/testsuite/ld-elf/orphan-region.d
47index 9d6c90c..d63b1df 100644
48--- a/ld/testsuite/ld-elf/orphan-region.d
49+++ b/ld/testsuite/ld-elf/orphan-region.d
50@@ -3,9 +3,10 @@
51 #readelf: -S -l --wide
52 #xfail: arc-*-* d30v-*-* dlx-*-* fr30-*-* frv-*-elf i860-*-* i960-*-*
53 #xfail: iq*-*-* mn10200-*-* moxie-*-* msp*-*-* mt-*-* or32-*-* pj*-*-*
54-#xfail: spu-*-* hppa*64*-*-* frv-*-*
55+#xfail: spu-*-* hppa*64*-*-* frv-*-* *-*-nacl*
56 # if not using elf32.em, you don't get fancy orphan handling
57-# spu twiddles LOAD range, hppa64 adds PHDR, frv-linux adds GNU_STACK
58+# spu twiddles LOAD range, hppa64 adds PHDR, frv-linux adds GNU_STACK,
59+# nacl splits to two segments
60
61 #...
62 \[[ 0-9]+\] \.text[ \t]+PROGBITS[ \t]+0*40000000[ \t]+.*
63--
641.7.9.5
65
diff --git a/meta/recipes-devtools/binutils/binutils-2.23.1.inc b/meta/recipes-devtools/binutils/binutils-2.23.2.inc
index 667ad0bccd..0b012798db 100644
--- a/meta/recipes-devtools/binutils/binutils-2.23.1.inc
+++ b/meta/recipes-devtools/binutils/binutils-2.23.2.inc
@@ -32,23 +32,12 @@ SRC_URI = "\
32 " 32 "
33 33
34BACKPORT = "\ 34BACKPORT = "\
35 file://backport/0001-bfd.patch \
36 file://backport/0003-Assemble-all-sources-files-in-each-test.patch \
37 file://backport/0005-bfd.patch \
38 file://backport/0010-bfd-ChangeLog.patch \
39 file://backport/0012-Fix-TLS-LD-to-LE-optimization-for-x32.patch \
40 file://backport/0013-gas-ChangeLog.patch \
41 file://backport/0014-Fix-opcode-for-64-bit-jecxz.patch \
42 file://backport/0017-ld-elf-comm-data.exp-Add-XFAIL-for-arm-targets-refer.patch \
43 file://backport/0018-bfd.patch \
44 file://backport/0024-bfd.patch \
45 file://backport/0026-ld-testsuite.patch \
46 file://backport/0001-doc-binutils.texi-elfedit-Fix-use-of-itemx-in-table.patch \ 35 file://backport/0001-doc-binutils.texi-elfedit-Fix-use-of-itemx-in-table.patch \
47 file://backport/0001-ld.texinfo-Replace-with-when-it-is-part-of-the-text.patch \ 36 file://backport/0001-ld.texinfo-Replace-with-when-it-is-part-of-the-text.patch \
48 file://backport/binutils-fix-ineffectual-zero-of-cache.patch \ 37 file://backport/binutils-fix-ineffectual-zero-of-cache.patch \
49 file://backport/binutils-replace-strncat-with-strcat.patch \ 38 file://backport/binutils-replace-strncat-with-strcat.patch \
50 file://backport/0001-config-tc-ppc.c-md_assemble-Do-not-generate-APUinfo-.patch \ 39 file://backport/0001-config-tc-ppc.c-md_assemble-Do-not-generate-APUinfo-.patch \
51" 40"
52SRC_URI[md5sum] = "33adb18c3048d057ac58d07a3f1adb38" 41SRC_URI[md5sum] = "4f8fa651e35ef262edc01d60fb45702e"
53SRC_URI[sha256sum] = "2ab2e5b03e086d12c6295f831adad46b3e1410a3a234933a2e8fac66cb2e7a19" 42SRC_URI[sha256sum] = "fe914e56fed7a9ec2eb45274b1f2e14b0d8b4f41906a5194eac6883cfe5c1097"
54 43
diff --git a/meta/recipes-devtools/binutils/binutils-2.23.1/backport/0001-config-tc-ppc.c-md_assemble-Do-not-generate-APUinfo-.patch b/meta/recipes-devtools/binutils/binutils-2.23.2/backport/0001-config-tc-ppc.c-md_assemble-Do-not-generate-APUinfo-.patch
index 55bbc6a6e7..55bbc6a6e7 100644
--- a/meta/recipes-devtools/binutils/binutils-2.23.1/backport/0001-config-tc-ppc.c-md_assemble-Do-not-generate-APUinfo-.patch
+++ b/meta/recipes-devtools/binutils/binutils-2.23.2/backport/0001-config-tc-ppc.c-md_assemble-Do-not-generate-APUinfo-.patch
diff --git a/meta/recipes-devtools/binutils/binutils-2.23.1/backport/0001-doc-binutils.texi-elfedit-Fix-use-of-itemx-in-table.patch b/meta/recipes-devtools/binutils/binutils-2.23.2/backport/0001-doc-binutils.texi-elfedit-Fix-use-of-itemx-in-table.patch
index 97a40a2a42..97a40a2a42 100644
--- a/meta/recipes-devtools/binutils/binutils-2.23.1/backport/0001-doc-binutils.texi-elfedit-Fix-use-of-itemx-in-table.patch
+++ b/meta/recipes-devtools/binutils/binutils-2.23.2/backport/0001-doc-binutils.texi-elfedit-Fix-use-of-itemx-in-table.patch
diff --git a/meta/recipes-devtools/binutils/binutils-2.23.1/backport/0001-ld.texinfo-Replace-with-when-it-is-part-of-the-text.patch b/meta/recipes-devtools/binutils/binutils-2.23.2/backport/0001-ld.texinfo-Replace-with-when-it-is-part-of-the-text.patch
index 83d27d35bb..83d27d35bb 100644
--- a/meta/recipes-devtools/binutils/binutils-2.23.1/backport/0001-ld.texinfo-Replace-with-when-it-is-part-of-the-text.patch
+++ b/meta/recipes-devtools/binutils/binutils-2.23.2/backport/0001-ld.texinfo-Replace-with-when-it-is-part-of-the-text.patch
diff --git a/meta/recipes-devtools/binutils/binutils-2.23.1/backport/binutils-fix-ineffectual-zero-of-cache.patch b/meta/recipes-devtools/binutils/binutils-2.23.2/backport/binutils-fix-ineffectual-zero-of-cache.patch
index a4aebf3be0..a4aebf3be0 100644
--- a/meta/recipes-devtools/binutils/binutils-2.23.1/backport/binutils-fix-ineffectual-zero-of-cache.patch
+++ b/meta/recipes-devtools/binutils/binutils-2.23.2/backport/binutils-fix-ineffectual-zero-of-cache.patch
diff --git a/meta/recipes-devtools/binutils/binutils-2.23.1/backport/binutils-replace-strncat-with-strcat.patch b/meta/recipes-devtools/binutils/binutils-2.23.2/backport/binutils-replace-strncat-with-strcat.patch
index bc8f92b8ae..bc8f92b8ae 100644
--- a/meta/recipes-devtools/binutils/binutils-2.23.1/backport/binutils-replace-strncat-with-strcat.patch
+++ b/meta/recipes-devtools/binutils/binutils-2.23.2/backport/binutils-replace-strncat-with-strcat.patch
diff --git a/meta/recipes-devtools/binutils/binutils-2.23.1/binutils-armv5e.patch b/meta/recipes-devtools/binutils/binutils-2.23.2/binutils-armv5e.patch
index 97ad6dffba..97ad6dffba 100644
--- a/meta/recipes-devtools/binutils/binutils-2.23.1/binutils-armv5e.patch
+++ b/meta/recipes-devtools/binutils/binutils-2.23.2/binutils-armv5e.patch
diff --git a/meta/recipes-devtools/binutils/binutils-2.23.1/binutils-fix-over-array-bounds-issue.patch b/meta/recipes-devtools/binutils/binutils-2.23.2/binutils-fix-over-array-bounds-issue.patch
index aacbfef7d6..aacbfef7d6 100644
--- a/meta/recipes-devtools/binutils/binutils-2.23.1/binutils-fix-over-array-bounds-issue.patch
+++ b/meta/recipes-devtools/binutils/binutils-2.23.2/binutils-fix-over-array-bounds-issue.patch
diff --git a/meta/recipes-devtools/binutils/binutils-2.23.1/binutils-poison.patch b/meta/recipes-devtools/binutils/binutils-2.23.2/binutils-poison.patch
index 39cae5155d..39cae5155d 100644
--- a/meta/recipes-devtools/binutils/binutils-2.23.1/binutils-poison.patch
+++ b/meta/recipes-devtools/binutils/binutils-2.23.2/binutils-poison.patch
diff --git a/meta/recipes-devtools/binutils/binutils-2.23.1/binutils-uclibc-100-uclibc-conf.patch b/meta/recipes-devtools/binutils/binutils-2.23.2/binutils-uclibc-100-uclibc-conf.patch
index b5a25c2389..b5a25c2389 100644
--- a/meta/recipes-devtools/binutils/binutils-2.23.1/binutils-uclibc-100-uclibc-conf.patch
+++ b/meta/recipes-devtools/binutils/binutils-2.23.2/binutils-uclibc-100-uclibc-conf.patch
diff --git a/meta/recipes-devtools/binutils/binutils-2.23.1/binutils-uclibc-300-001_ld_makefile_patch.patch b/meta/recipes-devtools/binutils/binutils-2.23.2/binutils-uclibc-300-001_ld_makefile_patch.patch
index c6e1efcea0..c6e1efcea0 100644
--- a/meta/recipes-devtools/binutils/binutils-2.23.1/binutils-uclibc-300-001_ld_makefile_patch.patch
+++ b/meta/recipes-devtools/binutils/binutils-2.23.2/binutils-uclibc-300-001_ld_makefile_patch.patch
diff --git a/meta/recipes-devtools/binutils/binutils-2.23.1/binutils-uclibc-300-006_better_file_error.patch b/meta/recipes-devtools/binutils/binutils-2.23.2/binutils-uclibc-300-006_better_file_error.patch
index 47bd8ff109..47bd8ff109 100644
--- a/meta/recipes-devtools/binutils/binutils-2.23.1/binutils-uclibc-300-006_better_file_error.patch
+++ b/meta/recipes-devtools/binutils/binutils-2.23.2/binutils-uclibc-300-006_better_file_error.patch
diff --git a/meta/recipes-devtools/binutils/binutils-2.23.1/binutils-uclibc-300-012_check_ldrunpath_length.patch b/meta/recipes-devtools/binutils/binutils-2.23.2/binutils-uclibc-300-012_check_ldrunpath_length.patch
index d31f80cd3d..d31f80cd3d 100644
--- a/meta/recipes-devtools/binutils/binutils-2.23.1/binutils-uclibc-300-012_check_ldrunpath_length.patch
+++ b/meta/recipes-devtools/binutils/binutils-2.23.2/binutils-uclibc-300-012_check_ldrunpath_length.patch
diff --git a/meta/recipes-devtools/binutils/binutils-2.23.1/binutils-uclibc-gas-needs-libm.patch b/meta/recipes-devtools/binutils/binutils-2.23.2/binutils-uclibc-gas-needs-libm.patch
index 3869faff0e..3869faff0e 100644
--- a/meta/recipes-devtools/binutils/binutils-2.23.1/binutils-uclibc-gas-needs-libm.patch
+++ b/meta/recipes-devtools/binutils/binutils-2.23.2/binutils-uclibc-gas-needs-libm.patch
diff --git a/meta/recipes-devtools/binutils/binutils-2.23.1/binutils-x86_64_i386_biarch.patch b/meta/recipes-devtools/binutils/binutils-2.23.2/binutils-x86_64_i386_biarch.patch
index c09578a787..c09578a787 100644
--- a/meta/recipes-devtools/binutils/binutils-2.23.1/binutils-x86_64_i386_biarch.patch
+++ b/meta/recipes-devtools/binutils/binutils-2.23.2/binutils-x86_64_i386_biarch.patch
diff --git a/meta/recipes-devtools/binutils/binutils-2.23.1/libiberty_path_fix.patch b/meta/recipes-devtools/binutils/binutils-2.23.2/libiberty_path_fix.patch
index 6e732fbd0a..6e732fbd0a 100644
--- a/meta/recipes-devtools/binutils/binutils-2.23.1/libiberty_path_fix.patch
+++ b/meta/recipes-devtools/binutils/binutils-2.23.2/libiberty_path_fix.patch
diff --git a/meta/recipes-devtools/binutils/binutils-2.23.1/libtool-2.4-update.patch b/meta/recipes-devtools/binutils/binutils-2.23.2/libtool-2.4-update.patch
index 31cf0a0c0a..31cf0a0c0a 100644
--- a/meta/recipes-devtools/binutils/binutils-2.23.1/libtool-2.4-update.patch
+++ b/meta/recipes-devtools/binutils/binutils-2.23.2/libtool-2.4-update.patch
diff --git a/meta/recipes-devtools/binutils/binutils-2.23.1/libtool-rpath-fix.patch b/meta/recipes-devtools/binutils/binutils-2.23.2/libtool-rpath-fix.patch
index 4fcffa471e..4fcffa471e 100644
--- a/meta/recipes-devtools/binutils/binutils-2.23.1/libtool-rpath-fix.patch
+++ b/meta/recipes-devtools/binutils/binutils-2.23.2/libtool-rpath-fix.patch
diff --git a/meta/recipes-devtools/binutils/binutils-2.23.1/mips64-default-ld-emulation.patch b/meta/recipes-devtools/binutils/binutils-2.23.2/mips64-default-ld-emulation.patch
index ab01859fa6..ab01859fa6 100644
--- a/meta/recipes-devtools/binutils/binutils-2.23.1/mips64-default-ld-emulation.patch
+++ b/meta/recipes-devtools/binutils/binutils-2.23.2/mips64-default-ld-emulation.patch
diff --git a/meta/recipes-devtools/binutils/binutils-2.23.1/relocatable_sdk.patch b/meta/recipes-devtools/binutils/binutils-2.23.2/relocatable_sdk.patch
index 7408c31aad..7408c31aad 100644
--- a/meta/recipes-devtools/binutils/binutils-2.23.1/relocatable_sdk.patch
+++ b/meta/recipes-devtools/binutils/binutils-2.23.2/relocatable_sdk.patch
diff --git a/meta/recipes-devtools/binutils/binutils-cross-canadian_2.23.1.bb b/meta/recipes-devtools/binutils/binutils-cross-canadian_2.23.2.bb
index 5dbaa03017..5dbaa03017 100644
--- a/meta/recipes-devtools/binutils/binutils-cross-canadian_2.23.1.bb
+++ b/meta/recipes-devtools/binutils/binutils-cross-canadian_2.23.2.bb
diff --git a/meta/recipes-devtools/binutils/binutils-cross_2.23.1.bb b/meta/recipes-devtools/binutils/binutils-cross_2.23.2.bb
index fbd1f7d25a..fbd1f7d25a 100644
--- a/meta/recipes-devtools/binutils/binutils-cross_2.23.1.bb
+++ b/meta/recipes-devtools/binutils/binutils-cross_2.23.2.bb
diff --git a/meta/recipes-devtools/binutils/binutils-crosssdk_2.23.1.bb b/meta/recipes-devtools/binutils/binutils-crosssdk_2.23.2.bb
index 8af407f6e0..8af407f6e0 100644
--- a/meta/recipes-devtools/binutils/binutils-crosssdk_2.23.1.bb
+++ b/meta/recipes-devtools/binutils/binutils-crosssdk_2.23.2.bb
diff --git a/meta/recipes-devtools/binutils/binutils_2.23.1.bb b/meta/recipes-devtools/binutils/binutils_2.23.2.bb
index 1523e87273..1523e87273 100644
--- a/meta/recipes-devtools/binutils/binutils_2.23.1.bb
+++ b/meta/recipes-devtools/binutils/binutils_2.23.2.bb