diff options
author | Khem Raj <raj.khem@gmail.com> | 2012-09-13 14:59:10 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-09-14 09:50:30 +0100 |
commit | 97bb9c5b6776a8cf04125d9293e22d85d78ccc3b (patch) | |
tree | a66608be38c66f67694ad1f0027425c8e7d5612d /meta/recipes-devtools/binutils/binutils/0055-Remove-ABI_64_P-check-on-R_X86_64_PCXX.patch | |
parent | 268177e4e64525a3655094b5a835aee62acea622 (diff) | |
download | poky-97bb9c5b6776a8cf04125d9293e22d85d78ccc3b.tar.gz |
binutils-2.22: Backport PR fixes from 2.22 branch
These are fixes mainly cherrypicks for mips/ppc/x86
mainly fixing PRs in ld and gold
(From OE-Core rev: f098cfc24bae8e0685bcae53ea4fdc3326ddc6c4)
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/binutils/0055-Remove-ABI_64_P-check-on-R_X86_64_PCXX.patch')
-rw-r--r-- | meta/recipes-devtools/binutils/binutils/0055-Remove-ABI_64_P-check-on-R_X86_64_PCXX.patch | 176 |
1 files changed, 176 insertions, 0 deletions
diff --git a/meta/recipes-devtools/binutils/binutils/0055-Remove-ABI_64_P-check-on-R_X86_64_PCXX.patch b/meta/recipes-devtools/binutils/binutils/0055-Remove-ABI_64_P-check-on-R_X86_64_PCXX.patch new file mode 100644 index 0000000000..697d70eac5 --- /dev/null +++ b/meta/recipes-devtools/binutils/binutils/0055-Remove-ABI_64_P-check-on-R_X86_64_PCXX.patch | |||
@@ -0,0 +1,176 @@ | |||
1 | Upstream-Status: Backport | ||
2 | |||
3 | From fee27086a7592c1812253e9c1c26f412dd87f3a2 Mon Sep 17 00:00:00 2001 | ||
4 | From: "H.J. Lu" <hjl.tools@gmail.com> | ||
5 | Date: Tue, 10 Jan 2012 20:34:56 +0000 | ||
6 | Subject: [PATCH 055/262] Remove ABI_64_P check on R_X86_64_PCXX | ||
7 | |||
8 | bfd/ | ||
9 | |||
10 | 2012-01-10 H.J. Lu <hongjiu.lu@intel.com> | ||
11 | |||
12 | PR ld/13581 | ||
13 | * elf64-x86-64.c (elf_x86_64_relocate_section): Remove ABI_64_P | ||
14 | check on R_X86_64_PCXX. | ||
15 | |||
16 | ld/testsuite/ | ||
17 | |||
18 | 2012-01-10 H.J. Lu <hongjiu.lu@intel.com> | ||
19 | |||
20 | PR ld/13581 | ||
21 | * ld-x86-64/ilp32-4.s: New. | ||
22 | * ld-x86-64/ilp32-10.d: Likewise. | ||
23 | * ld-x86-64/ilp32-10.s: Likewise. | ||
24 | |||
25 | * ld-x86-64/ilp32-4.d: Adjusted. | ||
26 | * ld-x86-64/ilp32-5.d: Likewise. | ||
27 | * ld-x86-64/ilp32-5.s: Likewise. | ||
28 | |||
29 | * ld-x86-64/x86-64.exp: Run ilp32-10. | ||
30 | --- | ||
31 | bfd/ChangeLog | 7 +++++++ | ||
32 | bfd/elf64-x86-64.c | 1 - | ||
33 | ld/testsuite/ChangeLog | 14 ++++++++++++++ | ||
34 | ld/testsuite/ld-x86-64/ilp32-10.d | 3 +++ | ||
35 | ld/testsuite/ld-x86-64/ilp32-10.s | 3 +++ | ||
36 | ld/testsuite/ld-x86-64/ilp32-4.d | 32 +++++++++++++------------------- | ||
37 | ld/testsuite/ld-x86-64/ilp32-4.s | 3 +++ | ||
38 | ld/testsuite/ld-x86-64/ilp32-5.d | 2 +- | ||
39 | ld/testsuite/ld-x86-64/ilp32-5.s | 2 +- | ||
40 | ld/testsuite/ld-x86-64/x86-64.exp | 1 + | ||
41 | 10 files changed, 46 insertions(+), 22 deletions(-) | ||
42 | create mode 100644 ld/testsuite/ld-x86-64/ilp32-10.d | ||
43 | create mode 100644 ld/testsuite/ld-x86-64/ilp32-10.s | ||
44 | create mode 100644 ld/testsuite/ld-x86-64/ilp32-4.s | ||
45 | |||
46 | diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c | ||
47 | index 3a2444b..bdb3ae6 100644 | ||
48 | --- a/bfd/elf64-x86-64.c | ||
49 | +++ b/bfd/elf64-x86-64.c | ||
50 | @@ -3460,7 +3460,6 @@ elf_x86_64_relocate_section (bfd *output_bfd, | ||
51 | case R_X86_64_PC16: | ||
52 | case R_X86_64_PC32: | ||
53 | if (info->shared | ||
54 | - && ABI_64_P (output_bfd) | ||
55 | && (input_section->flags & SEC_ALLOC) != 0 | ||
56 | && (input_section->flags & SEC_READONLY) != 0 | ||
57 | && h != NULL) | ||
58 | diff --git a/ld/testsuite/ld-x86-64/ilp32-10.d b/ld/testsuite/ld-x86-64/ilp32-10.d | ||
59 | new file mode 100644 | ||
60 | index 0000000..43d9fbd | ||
61 | --- /dev/null | ||
62 | +++ b/ld/testsuite/ld-x86-64/ilp32-10.d | ||
63 | @@ -0,0 +1,3 @@ | ||
64 | +#as: --x32 | ||
65 | +#ld: -shared -melf32_x86_64 | ||
66 | +#error: .*relocation R_X86_64_PC32 against undefined symbol `bar' can not be used when making a shared object; recompile with -fPIC | ||
67 | diff --git a/ld/testsuite/ld-x86-64/ilp32-10.s b/ld/testsuite/ld-x86-64/ilp32-10.s | ||
68 | new file mode 100644 | ||
69 | index 0000000..70e4a90 | ||
70 | --- /dev/null | ||
71 | +++ b/ld/testsuite/ld-x86-64/ilp32-10.s | ||
72 | @@ -0,0 +1,3 @@ | ||
73 | + .globl foo | ||
74 | +foo: | ||
75 | + mov bar(%rip), %rax | ||
76 | diff --git a/ld/testsuite/ld-x86-64/ilp32-4.d b/ld/testsuite/ld-x86-64/ilp32-4.d | ||
77 | index 84dc7b2..92d8a67 100644 | ||
78 | --- a/ld/testsuite/ld-x86-64/ilp32-4.d | ||
79 | +++ b/ld/testsuite/ld-x86-64/ilp32-4.d | ||
80 | @@ -1,36 +1,30 @@ | ||
81 | -#source: start.s | ||
82 | #as: --x32 | ||
83 | #ld: -m elf32_x86_64 -shared --no-ld-generated-unwind-info | ||
84 | #readelf: -d -S --wide | ||
85 | |||
86 | -There are 10 section headers, starting at offset 0x22c: | ||
87 | +There are 9 section headers, starting at offset 0x1d8: | ||
88 | |||
89 | Section Headers: | ||
90 | \[Nr\] Name Type Addr Off Size ES Flg Lk Inf Al | ||
91 | \[ 0\] NULL 00000000 000000 000000 00 0 0 0 | ||
92 | - \[ 1\] .hash HASH 00000094 000094 000030 04 A 2 0 4 | ||
93 | - \[ 2\] .dynsym DYNSYM 000000c4 0000c4 000070 10 A 3 2 4 | ||
94 | - \[ 3\] .dynstr STRTAB 00000134 000134 00001d 00 A 0 0 1 | ||
95 | - \[ 4\] .rela.dyn RELA 00000154 000154 00000c 0c A 2 0 4 | ||
96 | - \[ 5\] .text PROGBITS 00000160 000160 000005 00 AX 0 0 4 | ||
97 | - \[ 6\] .dynamic DYNAMIC 00200168 000168 000078 08 WA 3 0 4 | ||
98 | - \[ 7\] .shstrtab STRTAB 00000000 0001e0 00004a 00 0 0 1 | ||
99 | - \[ 8\] .symtab SYMTAB 00000000 0003bc 0000e0 10 9 9 4 | ||
100 | - \[ 9\] .strtab STRTAB 00000000 00049c 000043 00 0 0 1 | ||
101 | + \[ 1\] .hash HASH 00000094 000094 00002c 04 A 2 0 4 | ||
102 | + \[ 2\] .dynsym DYNSYM 000000c0 0000c0 000060 10 A 3 2 4 | ||
103 | + \[ 3\] .dynstr STRTAB 00000120 000120 000019 00 A 0 0 1 | ||
104 | + \[ 4\] .text PROGBITS 0000013c 00013c 000001 00 AX 0 0 4 | ||
105 | + \[ 5\] .dynamic DYNAMIC 00200140 000140 000058 08 WA 3 0 4 | ||
106 | + \[ 6\] .shstrtab STRTAB 00000000 000198 000040 00 0 0 1 | ||
107 | + \[ 7\] .symtab SYMTAB 00000000 000340 0000c0 10 8 8 4 | ||
108 | + \[ 8\] .strtab STRTAB 00000000 000400 00003f 00 0 0 1 | ||
109 | Key to Flags: | ||
110 | W \(write\), A \(alloc\), X \(execute\), M \(merge\), S \(strings\), l \(large\) | ||
111 | I \(info\), L \(link order\), G \(group\), T \(TLS\), E \(exclude\), x \(unknown\) | ||
112 | O \(extra OS processing required\) o \(OS specific\), p \(processor specific\) | ||
113 | |||
114 | -Dynamic section at offset 0x168 contains 10 entries: | ||
115 | +Dynamic section at offset 0x140 contains 6 entries: | ||
116 | Tag Type Name/Value | ||
117 | 0x00000004 \(HASH\) 0x94 | ||
118 | - 0x00000005 \(STRTAB\) 0x134 | ||
119 | - 0x00000006 \(SYMTAB\) 0xc4 | ||
120 | - 0x0000000a \(STRSZ\) 29 \(bytes\) | ||
121 | + 0x00000005 \(STRTAB\) 0x120 | ||
122 | + 0x00000006 \(SYMTAB\) 0xc0 | ||
123 | + 0x0000000a \(STRSZ\) 25 \(bytes\) | ||
124 | 0x0000000b \(SYMENT\) 16 \(bytes\) | ||
125 | - 0x00000007 \(RELA\) 0x154 | ||
126 | - 0x00000008 \(RELASZ\) 12 \(bytes\) | ||
127 | - 0x00000009 \(RELAENT\) 12 \(bytes\) | ||
128 | - 0x00000016 \(TEXTREL\) 0x0 | ||
129 | 0x00000000 \(NULL\) 0x0 | ||
130 | diff --git a/ld/testsuite/ld-x86-64/ilp32-4.s b/ld/testsuite/ld-x86-64/ilp32-4.s | ||
131 | new file mode 100644 | ||
132 | index 0000000..5f270c7 | ||
133 | --- /dev/null | ||
134 | +++ b/ld/testsuite/ld-x86-64/ilp32-4.s | ||
135 | @@ -0,0 +1,3 @@ | ||
136 | + .globl _start | ||
137 | +_start: | ||
138 | + ret | ||
139 | diff --git a/ld/testsuite/ld-x86-64/ilp32-5.d b/ld/testsuite/ld-x86-64/ilp32-5.d | ||
140 | index e4673e5..4870c2b 100644 | ||
141 | --- a/ld/testsuite/ld-x86-64/ilp32-5.d | ||
142 | +++ b/ld/testsuite/ld-x86-64/ilp32-5.d | ||
143 | @@ -4,5 +4,5 @@ | ||
144 | |||
145 | #... | ||
146 | [0-9a-f]+ +[0-9a-f]+ +R_X86_64_RELATIVE +[0-9a-f]+ | ||
147 | -[0-9a-f]+ +[0-9a-f]+ +R_X86_64_PC32 +[0-9a-f]+ +foo - 4 | ||
148 | +[0-9a-f]+ +[0-9a-f]+ +R_X86_64_GLOB_DAT +[0-9a-f]+ +foo \+ 0 | ||
149 | [0-9a-f]+ +[0-9a-f]+ +R_X86_64_32 +[0-9a-f]+ +foo \+ 0 | ||
150 | diff --git a/ld/testsuite/ld-x86-64/ilp32-5.s b/ld/testsuite/ld-x86-64/ilp32-5.s | ||
151 | index 0d97807..ef0c60e 100644 | ||
152 | --- a/ld/testsuite/ld-x86-64/ilp32-5.s | ||
153 | +++ b/ld/testsuite/ld-x86-64/ilp32-5.s | ||
154 | @@ -1,6 +1,6 @@ | ||
155 | .globl bar | ||
156 | bar: | ||
157 | - mov foo(%rip), %rax | ||
158 | + mov foo@GOTPCREL(%rip), %rax | ||
159 | |||
160 | .data | ||
161 | xxx: | ||
162 | diff --git a/ld/testsuite/ld-x86-64/x86-64.exp b/ld/testsuite/ld-x86-64/x86-64.exp | ||
163 | index 77b081b..44d3e07 100644 | ||
164 | --- a/ld/testsuite/ld-x86-64/x86-64.exp | ||
165 | +++ b/ld/testsuite/ld-x86-64/x86-64.exp | ||
166 | @@ -207,6 +207,7 @@ run_dump_test "ilp32-6" | ||
167 | run_dump_test "ilp32-7" | ||
168 | run_dump_test "ilp32-8" | ||
169 | run_dump_test "ilp32-9" | ||
170 | +run_dump_test "ilp32-10" | ||
171 | run_dump_test "ia32-1" | ||
172 | run_dump_test "ia32-2" | ||
173 | run_dump_test "ia32-3" | ||
174 | -- | ||
175 | 1.7.9.5 | ||
176 | |||