1 |
vapier 14/02/01 05:48:03 |
2 |
|
3 |
Added: 12_all_sh-targets.patch |
4 |
30_all_binutils-2.22.52.0.2-flexible-tests.patch |
5 |
62_all_binutils-2.23.52.0.1-hardened-crtbegin.patch |
6 |
63_all_binutils-2.24.51.0.1-pt-pax-flags-20131130.patch |
7 |
66_all_binutils-2.22.52.0.1-warn-textrel.patch |
8 |
75_all_binutils-default-test-flags.patch |
9 |
76_all_use-new-ld-dtags.patch |
10 |
77_all_generate-gnu-hash.patch |
11 |
78_all_use-relro.patch 91_all_libiberty-pic.patch |
12 |
README.history |
13 |
Log: |
14 |
initial 2.24.51.0.3 patchset based on last 2.24.51.0.2 patchset |
15 |
|
16 |
Revision Changes Path |
17 |
1.1 src/patchsets/binutils/2.24.51.0.3/12_all_sh-targets.patch |
18 |
|
19 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/binutils/2.24.51.0.3/12_all_sh-targets.patch?rev=1.1&view=markup |
20 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/binutils/2.24.51.0.3/12_all_sh-targets.patch?rev=1.1&content-type=text/plain |
21 |
|
22 |
Index: 12_all_sh-targets.patch |
23 |
=================================================================== |
24 |
r10231 | lethal | 2005-05-02 09:58:00 -0400 (Mon, 02 May 2005) | 13 lines |
25 |
|
26 |
Likewise, binutils has no idea about any of these new targets either, so we |
27 |
fix that up too.. now we're able to actually build a real toolchain for |
28 |
sh2a_nofpu- and other more ineptly named toolchains (and yes, there are more |
29 |
inept targets than that one, really. Go look, I promise). |
30 |
|
31 |
--- a/configure |
32 |
+++ b/configure |
33 |
@@ -1495,7 +1495,7 @@ |
34 |
mips*-*-*) |
35 |
noconfigdirs="$noconfigdirs gprof" |
36 |
;; |
37 |
- sh-*-* | sh64-*-*) |
38 |
+ sh*-*-* | sh64-*-*) |
39 |
case "${target}" in |
40 |
sh*-*-elf) |
41 |
;; |
42 |
--- a/configure.ac |
43 |
+++ b/configure.ac |
44 |
@@ -712,7 +712,7 @@ |
45 |
mips*-*-*) |
46 |
noconfigdirs="$noconfigdirs gprof" |
47 |
;; |
48 |
- sh-*-* | sh64-*-*) |
49 |
+ sh*-*-* | sh64-*-*) |
50 |
case "${target}" in |
51 |
sh*-*-elf) |
52 |
;; |
53 |
|
54 |
|
55 |
|
56 |
1.1 src/patchsets/binutils/2.24.51.0.3/30_all_binutils-2.22.52.0.2-flexible-tests.patch |
57 |
|
58 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/binutils/2.24.51.0.3/30_all_binutils-2.22.52.0.2-flexible-tests.patch?rev=1.1&view=markup |
59 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/binutils/2.24.51.0.3/30_all_binutils-2.22.52.0.2-flexible-tests.patch?rev=1.1&content-type=text/plain |
60 |
|
61 |
Index: 30_all_binutils-2.22.52.0.2-flexible-tests.patch |
62 |
=================================================================== |
63 |
making some of the address matches more flexible fixes tests when using |
64 |
pax/relro/hash patches |
65 |
|
66 |
--- binutils/ld/testsuite/ld-ifunc/ifunc-2-local-x86-64.d |
67 |
+++ binutils/ld/testsuite/ld-ifunc/ifunc-2-local-x86-64.d |
68 |
@@ -4,6 +4,6 @@ |
69 |
#target: x86_64-*-* |
70 |
|
71 |
#... |
72 |
-[ \t0-9a-f]+:[ \t0-9a-f]+call[ \t0-9a-fq]+<\*ABS\*\+0x220@plt> |
73 |
-[ \t0-9a-f]+:[ \t0-9a-f]+lea[ \t]+.*\(%rip\),%rax.*[ \t0-9a-fq]+<\*ABS\*\+0x220@plt> |
74 |
+[ \t0-9a-f]+:[ \t0-9a-f]+call[ \t0-9a-fq]+<\*ABS\*\+0x[a-f0-9]+@plt> |
75 |
+[ \t0-9a-f]+:[ \t0-9a-f]+lea[ \t]+.*\(%rip\),%rax.*[ \t0-9a-fq]+<\*ABS\*\+0x[a-f0-9]+@plt> |
76 |
#pass |
77 |
--- binutils/ld/testsuite/ld-ifunc/ifunc-2-x86-64.d |
78 |
+++ binutils/ld/testsuite/ld-ifunc/ifunc-2-x86-64.d |
79 |
@@ -4,6 +4,6 @@ |
80 |
#target: x86_64-*-* |
81 |
|
82 |
#... |
83 |
-[ \t0-9a-f]+:[ \t0-9a-f]+call[ \t0-9a-fq]+<\*ABS\*\+0x220@plt> |
84 |
-[ \t0-9a-f]+:[ \t0-9a-f]+lea[ \t]+.*\(%rip\),%rax.*[ \t0-9a-fq]+<\*ABS\*\+0x220@plt> |
85 |
+[ \t0-9a-f]+:[ \t0-9a-f]+call[ \t0-9a-fq]+<\*ABS\*\+0x[a-f0-9]+@plt> |
86 |
+[ \t0-9a-f]+:[ \t0-9a-f]+lea[ \t]+.*\(%rip\),%rax.*[ \t0-9a-fq]+<\*ABS\*\+0x[a-f0-9]+@plt> |
87 |
#pass |
88 |
|
89 |
|
90 |
|
91 |
1.1 src/patchsets/binutils/2.24.51.0.3/62_all_binutils-2.23.52.0.1-hardened-crtbegin.patch |
92 |
|
93 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/binutils/2.24.51.0.3/62_all_binutils-2.23.52.0.1-hardened-crtbegin.patch?rev=1.1&view=markup |
94 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/binutils/2.24.51.0.3/62_all_binutils-2.23.52.0.1-hardened-crtbegin.patch?rev=1.1&content-type=text/plain |
95 |
|
96 |
Index: 62_all_binutils-2.23.52.0.1-hardened-crtbegin.patch |
97 |
=================================================================== |
98 |
https://bugs.gentoo.org/391899 |
99 |
https://bugs.gentoo.org/393321 |
100 |
|
101 |
Make sure the default ELF linker script does the right thing with our customer |
102 |
PIE+PIC gcc objects (until we get a chance to rename them). |
103 |
|
104 |
2011-12-05 Magnus Granberg <zorry@g.o>, Alphat-PC <AlphatPC@×××××.com> |
105 |
|
106 |
* scripttempl/elf.sc: Add support for crtbeginTS.o |
107 |
|
108 |
--- a/ld/scripttempl/elf.sc |
109 |
+++ b/ld/scripttempl/elf.sc |
110 |
@@ -225,8 +225,8 @@ |
111 |
if test "${ENABLE_INITFINI_ARRAY}" = "yes"; then |
112 |
SORT_INIT_ARRAY="KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*)))" |
113 |
SORT_FINI_ARRAY="KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*)))" |
114 |
- CTORS_IN_INIT_ARRAY="EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o $OTHER_EXCLUDE_FILES) .ctors" |
115 |
- DTORS_IN_FINI_ARRAY="EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o $OTHER_EXCLUDE_FILES) .dtors" |
116 |
+ CTORS_IN_INIT_ARRAY="EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtbeginTS.o *crtend.o *crtend?.o $OTHER_EXCLUDE_FILES) .ctors" |
117 |
+ DTORS_IN_FINI_ARRAY="EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtbeginTS.o *crtend.o *crtend?.o $OTHER_EXCLUDE_FILES) .dtors" |
118 |
else |
119 |
SORT_INIT_ARRAY="KEEP (*(SORT(.init_array.*)))" |
120 |
SORT_FINI_ARRAY="KEEP (*(SORT(.fini_array.*)))" |
121 |
@@ -264,6 +264,7 @@ |
122 |
|
123 |
KEEP (*crtbegin.o(.ctors)) |
124 |
KEEP (*crtbegin?.o(.ctors)) |
125 |
+ KEEP (*crtbeginTS.o(.ctors)) |
126 |
|
127 |
/* We don't want to include the .ctor section from |
128 |
the crtend.o file until after the sorted ctors. |
129 |
@@ -280,6 +281,7 @@ |
130 |
${CONSTRUCTING+${DTOR_START}} |
131 |
KEEP (*crtbegin.o(.dtors)) |
132 |
KEEP (*crtbegin?.o(.dtors)) |
133 |
+ KEEP (*crtbeginTS.o(.dtors)) |
134 |
KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o $OTHER_EXCLUDE_FILES) .dtors)) |
135 |
KEEP (*(SORT(.dtors.*))) |
136 |
KEEP (*(.dtors)) |
137 |
|
138 |
|
139 |
|
140 |
1.1 src/patchsets/binutils/2.24.51.0.3/63_all_binutils-2.24.51.0.1-pt-pax-flags-20131130.patch |
141 |
|
142 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/binutils/2.24.51.0.3/63_all_binutils-2.24.51.0.1-pt-pax-flags-20131130.patch?rev=1.1&view=markup |
143 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/binutils/2.24.51.0.3/63_all_binutils-2.24.51.0.1-pt-pax-flags-20131130.patch?rev=1.1&content-type=text/plain |
144 |
|
145 |
Index: 63_all_binutils-2.24.51.0.1-pt-pax-flags-20131130.patch |
146 |
=================================================================== |
147 |
--- binutils-2.24.51.0.1/bfd/elf-bfd.h |
148 |
+++ binutils-2.24.51.0.1/bfd/elf-bfd.h |
149 |
@@ -1577,6 +1577,9 @@ struct elf_obj_tdata |
150 |
/* Segment flags for the PT_GNU_STACK segment. */ |
151 |
unsigned int stack_flags; |
152 |
|
153 |
+ /* Segment flags for the PT_PAX_FLAGS segment. */ |
154 |
+ unsigned int pax_flags; |
155 |
+ |
156 |
/* This is set to TRUE if the object was created by the backend |
157 |
linker. */ |
158 |
bfd_boolean linker; |
159 |
@@ -1707,6 +1707,7 @@ |
160 |
#define elf_eh_frame_hdr(bfd) (elf_tdata(bfd) -> o->eh_frame_hdr) |
161 |
#define elf_linker(bfd) (elf_tdata(bfd) -> o->linker) |
162 |
#define elf_stack_flags(bfd) (elf_tdata(bfd) -> o->stack_flags) |
163 |
+#define elf_pax_flags(bfd) (elf_tdata(bfd) -> o->pax_flags) |
164 |
#define elf_shstrtab(bfd) (elf_tdata(bfd) -> o->strtab_ptr) |
165 |
#define elf_onesymtab(bfd) (elf_tdata(bfd) -> symtab_section) |
166 |
#define elf_symtab_shndx(bfd) (elf_tdata(bfd) -> symtab_shndx_section) |
167 |
--- binutils-2.24.51.0.1/bfd/elf.c |
168 |
+++ binutils-2.24.51.0.1/bfd/elf.c |
169 |
@@ -1158,6 +1158,7 @@ get_segment_type (unsigned int p_type) |
170 |
case PT_GNU_EH_FRAME: pt = "EH_FRAME"; break; |
171 |
case PT_GNU_STACK: pt = "STACK"; break; |
172 |
case PT_GNU_RELRO: pt = "RELRO"; break; |
173 |
+ case PT_PAX_FLAGS: pt = "PAX_FLAGS"; break; |
174 |
default: pt = NULL; break; |
175 |
} |
176 |
return pt; |
177 |
@@ -2477,6 +2478,9 @@ bfd_section_from_phdr (bfd *abfd, Elf_Internal_Phdr *hdr, int hdr_index) |
178 |
case PT_GNU_RELRO: |
179 |
return _bfd_elf_make_section_from_phdr (abfd, hdr, hdr_index, "relro"); |
180 |
|
181 |
+ case PT_PAX_FLAGS: |
182 |
+ return _bfd_elf_make_section_from_phdr (abfd, hdr, hdr_index, "pax_flags"); |
183 |
+ |
184 |
default: |
185 |
/* Check for any processor-specific program segment types. */ |
186 |
bed = get_elf_backend_data (abfd); |
187 |
@@ -3551,6 +3555,11 @@ get_program_header_size (bfd *abfd, struct bfd_link_info *info) |
188 |
++segs; |
189 |
} |
190 |
|
191 |
+ { |
192 |
+ /* We need a PT_PAX_FLAGS segment. */ |
193 |
+ ++segs; |
194 |
+ } |
195 |
+ |
196 |
for (s = abfd->sections; s != NULL; s = s->next) |
197 |
{ |
198 |
if ((s->flags & SEC_LOAD) != 0 |
199 |
@@ -4153,6 +4162,20 @@ _bfd_elf_map_sections_to_segments (bfd *abfd, struct bfd_link_info *info) |
200 |
} |
201 |
} |
202 |
|
203 |
+ { |
204 |
+ amt = sizeof (struct elf_segment_map); |
205 |
+ m = bfd_zalloc (abfd, amt); |
206 |
+ if (m == NULL) |
207 |
+ goto error_return; |
208 |
+ m->next = NULL; |
209 |
+ m->p_type = PT_PAX_FLAGS; |
210 |
+ m->p_flags = elf_pax_flags (abfd); |
211 |
+ m->p_flags_valid = 1; |
212 |
+ |
213 |
+ *pm = m; |
214 |
+ pm = &m->next; |
215 |
+ } |
216 |
+ |
217 |
free (sections); |
218 |
elf_tdata (abfd)->segment_map = mfirst; |
219 |
} |
220 |
@@ -5417,7 +5440,8 @@ rewrite_elf_program_header (bfd *ibfd, bfd *obfd) |
221 |
6. PT_TLS segment includes only SHF_TLS sections. |
222 |
7. SHF_TLS sections are only in PT_TLS or PT_LOAD segments. |
223 |
8. PT_DYNAMIC should not contain empty sections at the beginning |
224 |
- (with the possible exception of .dynamic). */ |
225 |
+ (with the possible exception of .dynamic). |
226 |
+ 9. PT_PAX_FLAGS segments do not include any sections. */ |
227 |
#define IS_SECTION_IN_INPUT_SEGMENT(section, segment, bed) \ |
228 |
((((segment->p_paddr \ |
229 |
? IS_CONTAINED_BY_LMA (section, segment, segment->p_paddr) \ |
230 |
@@ -5425,6 +5449,7 @@ rewrite_elf_program_header (bfd *ibfd, bfd *obfd) |
231 |
&& (section->flags & SEC_ALLOC) != 0) \ |
232 |
|| IS_NOTE (segment, section)) \ |
233 |
&& segment->p_type != PT_GNU_STACK \ |
234 |
+ && segment->p_type != PT_PAX_FLAGS \ |
235 |
&& (segment->p_type != PT_TLS \ |
236 |
|| (section->flags & SEC_THREAD_LOCAL)) \ |
237 |
&& (segment->p_type == PT_LOAD \ |
238 |
--- binutils-2.24.51.0.1/bfd/elflink.c |
239 |
+++ binutils-2.24.51.0.1/bfd/elflink.c |
240 |
@@ -5545,17 +5545,30 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd, |
241 |
&& ! (*bed->elf_backend_always_size_sections) (output_bfd, info)) |
242 |
return FALSE; |
243 |
|
244 |
+ elf_pax_flags (output_bfd) = PF_NORANDEXEC; |
245 |
+ if (info->execheap) |
246 |
+ elf_pax_flags (output_bfd) |= PF_NOMPROTECT; |
247 |
+ else if (info->noexecheap) |
248 |
+ elf_pax_flags (output_bfd) |= PF_MPROTECT; |
249 |
+ |
250 |
/* Determine any GNU_STACK segment requirements, after the backend |
251 |
has had a chance to set a default segment size. */ |
252 |
if (info->execstack) |
253 |
- elf_stack_flags (output_bfd) = PF_R | PF_W | PF_X; |
254 |
+ { |
255 |
+ elf_stack_flags (output_bfd) = PF_R | PF_W | PF_X; |
256 |
+ elf_pax_flags (output_bfd) |= PF_EMUTRAMP; |
257 |
+ } |
258 |
else if (info->noexecstack) |
259 |
- elf_stack_flags (output_bfd) = PF_R | PF_W; |
260 |
+ { |
261 |
+ elf_stack_flags (output_bfd) = PF_R | PF_W; |
262 |
+ elf_pax_flags (output_bfd) |= PF_NOEMUTRAMP; |
263 |
+ } |
264 |
else |
265 |
{ |
266 |
bfd *inputobj; |
267 |
asection *notesec = NULL; |
268 |
int exec = 0; |
269 |
|
270 |
+ elf_pax_flags (output_bfd) |= PF_NOEMUTRAMP; |
271 |
for (inputobj = info->input_bfds; |
272 |
inputobj; |
273 |
inputobj = inputobj->link_next) |
274 |
@@ -5567,7 +5581,11 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd, |
275 |
if (s) |
276 |
{ |
277 |
if (s->flags & SEC_CODE) |
278 |
- exec = PF_X; |
279 |
+ { |
280 |
+ elf_pax_flags (output_bfd) &= ~PF_NOEMUTRAMP; |
281 |
+ elf_pax_flags (output_bfd) |= PF_EMUTRAMP; |
282 |
+ exec = PF_X; |
283 |
+ } |
284 |
notesec = s; |
285 |
} |
286 |
else if (bed->default_execstack) |
287 |
--- binutils-2.24.51.0.1/binutils/readelf.c |
288 |
+++ binutils-2.24.51.0.1/binutils/readelf.c |
289 |
@@ -2740,6 +2740,7 @@ get_segment_type (unsigned long p_type) |
290 |
return "GNU_EH_FRAME"; |
291 |
case PT_GNU_STACK: return "GNU_STACK"; |
292 |
case PT_GNU_RELRO: return "GNU_RELRO"; |
293 |
+ case PT_PAX_FLAGS: return "PAX_FLAGS"; |
294 |
|
295 |
default: |
296 |
if ((p_type >= PT_LOPROC) && (p_type <= PT_HIPROC)) |
297 |
--- binutils-2.24.51.0.1/include/bfdlink.h |
298 |
+++ binutils-2.24.51.0.1/include/bfdlink.h |
299 |
@@ -322,6 +322,14 @@ struct bfd_link_info |
300 |
/* TRUE if PT_GNU_RELRO segment should be created. */ |
301 |
unsigned int relro: 1; |
302 |
|
303 |
+ /* TRUE if PT_PAX_FLAGS segment should be created with PF_NOMPROTECT |
304 |
+ flags. */ |
305 |
+ unsigned int execheap: 1; |
306 |
+ |
307 |
+ /* TRUE if PT_PAX_FLAGS segment should be created with PF_MPROTECT |
308 |
+ flags. */ |
309 |
+ unsigned int noexecheap: 1; |
310 |
+ |
311 |
/* TRUE if .eh_frame_hdr section and PT_GNU_EH_FRAME ELF segment |
312 |
should be created. */ |
313 |
unsigned int eh_frame_hdr: 1; |
314 |
--- binutils-2.24.51.0.1/include/elf/common.h |
315 |
+++ binutils-2.24.51.0.1/include/elf/common.h |
316 |
@@ -429,6 +429,7 @@ |
317 |
#define PT_SUNW_EH_FRAME PT_GNU_EH_FRAME /* Solaris uses the same value */ |
318 |
#define PT_GNU_STACK (PT_LOOS + 0x474e551) /* Stack flags */ |
319 |
#define PT_GNU_RELRO (PT_LOOS + 0x474e552) /* Read-only after relocation */ |
320 |
+#define PT_PAX_FLAGS (PT_LOOS + 0x5041580) /* PaX flags */ |
321 |
#define PT_GNU_SHR (PT_LOOS + 0x474e554) /* Sharable segment */ |
322 |
|
323 |
/* Program segment permissions, in program header p_flags field. */ |
324 |
@@ -439,6 +440,21 @@ |
325 |
#define PF_MASKOS 0x0FF00000 /* New value, Oct 4, 1999 Draft */ |
326 |
#define PF_MASKPROC 0xF0000000 /* Processor-specific reserved bits */ |
327 |
|
328 |
+/* Flags to control PaX behavior. */ |
329 |
+ |
330 |
+#define PF_PAGEEXEC (1 << 4) /* Enable PAGEEXEC */ |
331 |
+#define PF_NOPAGEEXEC (1 << 5) /* Disable PAGEEXEC */ |
332 |
+#define PF_SEGMEXEC (1 << 6) /* Enable SEGMEXEC */ |
333 |
+#define PF_NOSEGMEXEC (1 << 7) /* Disable SEGMEXEC */ |
334 |
+#define PF_MPROTECT (1 << 8) /* Enable MPROTECT */ |
335 |
+#define PF_NOMPROTECT (1 << 9) /* Disable MPROTECT */ |
336 |
+#define PF_RANDEXEC (1 << 10) /* Enable RANDEXEC */ |
337 |
+#define PF_NORANDEXEC (1 << 11) /* Disable RANDEXEC */ |
338 |
+#define PF_EMUTRAMP (1 << 12) /* Enable EMUTRAMP */ |
339 |
+#define PF_NOEMUTRAMP (1 << 13) /* Disable EMUTRAMP */ |
340 |
+#define PF_RANDMMAP (1 << 14) /* Enable RANDMMAP */ |
341 |
+#define PF_NORANDMMAP (1 << 15) /* Disable RANDMMAP */ |
342 |
+ |
343 |
/* Values for section header, sh_type field. */ |
344 |
|
345 |
#define SHT_NULL 0 /* Section header table entry unused */ |
346 |
--- binutils-2.24.51.0.1/ld/emultempl/elf32.em |
347 |
+++ binutils-2.24.51.0.1/ld/emultempl/elf32.em |
348 |
@@ -2285,6 +2285,16 @@ fragment <<EOF |
349 |
link_info.noexecstack = TRUE; |
350 |
link_info.execstack = FALSE; |
351 |
} |
352 |
+ else if (strcmp (optarg, "execheap") == 0) |
353 |
+ { |
354 |
+ link_info.execheap = TRUE; |
355 |
+ link_info.noexecheap = FALSE; |
356 |
+ } |
357 |
+ else if (strcmp (optarg, "noexecheap") == 0) |
358 |
+ { |
359 |
+ link_info.noexecheap = TRUE; |
360 |
+ link_info.execheap = FALSE; |
361 |
+ } |
362 |
EOF |
363 |
if test x"$GENERATE_SHLIB_SCRIPT" = xyes; then |
364 |
fragment <<EOF |
365 |
@@ -2368,6 +2378,8 @@ fragment <<EOF |
366 |
-z defs Report unresolved symbols in object files.\n")); |
367 |
fprintf (file, _("\ |
368 |
-z execstack Mark executable as requiring executable stack\n")); |
369 |
+ fprintf (file, _("\ |
370 |
+ -z execheap Mark executable as requiring executable heap\n")); |
371 |
EOF |
372 |
|
373 |
if test x"$GENERATE_SHLIB_SCRIPT" = xyes; then |
374 |
@@ -2391,6 +2403,8 @@ fragment <<EOF |
375 |
fragment <<EOF |
376 |
fprintf (file, _("\ |
377 |
-z noexecstack Mark executable as not requiring executable stack\n")); |
378 |
+ fprintf (file, _("\ |
379 |
+ -z noexecheap Mark executable as not requiring executable heap\n")); |
380 |
EOF |
381 |
if test x"$GENERATE_SHLIB_SCRIPT" = xyes; then |
382 |
fragment <<EOF |
383 |
--- binutils-2.24.51.0.1/ld/ldgram.y |
384 |
+++ binutils-2.24.51.0.1/ld/ldgram.y |
385 |
@@ -1119,6 +1119,8 @@ phdr_type: |
386 |
$$ = exp_intop (0x6474e550); |
387 |
else if (strcmp (s, "PT_GNU_STACK") == 0) |
388 |
$$ = exp_intop (0x6474e551); |
389 |
+ else if (strcmp (s, "PT_PAX_FLAGS") == 0) |
390 |
+ $$ = exp_intop (0x65041580); |
391 |
else |
392 |
{ |
393 |
einfo (_("\ |
394 |
--- binutils-2.24.51.0.1/ld/testsuite/ld-alpha/tlsbin.rd |
395 |
+++ binutils-2.24.51.0.1/ld/testsuite/ld-alpha/tlsbin.rd |
396 |
@@ -35,13 +35,14 @@ There are [0-9]+ program headers, starting at offset [0-9]+ |
397 |
|
398 |
Program Headers: |
399 |
Type +Offset +VirtAddr +PhysAddr +FileSiz +MemSiz +Flg Align |
400 |
- PHDR +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x0+150 R E 0x8 |
401 |
+ PHDR +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x0+188 R E 0x8 |
402 |
INTERP +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ R +0x1 |
403 |
.*Requesting program interpreter.* |
404 |
LOAD +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ R E 0x10000 |
405 |
LOAD +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ RWE 0x10000 |
406 |
DYNAMIC +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ RW +0x8 |
407 |
TLS +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ R +0x4 |
408 |
+ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48] |
409 |
#... |
410 |
|
411 |
Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 3 entries: |
412 |
--- binutils-2.24.51.0.1/ld/testsuite/ld-alpha/tlsbinr.rd |
413 |
+++ binutils-2.24.51.0.1/ld/testsuite/ld-alpha/tlsbinr.rd |
414 |
@@ -42,6 +42,7 @@ Program Headers: |
415 |
+LOAD +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ RWE 0x10000 |
416 |
+DYNAMIC +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ RW +0x8 |
417 |
+TLS +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ R +0x4 |
418 |
+ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48] |
419 |
#... |
420 |
|
421 |
Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 2 entries: |
422 |
--- binutils-2.24.51.0.1/ld/testsuite/ld-alpha/tlspic.rd |
423 |
+++ binutils-2.24.51.0.1/ld/testsuite/ld-alpha/tlspic.rd |
424 |
@@ -38,6 +38,7 @@ Program Headers: |
425 |
+LOAD +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ RWE 0x10000 |
426 |
+DYNAMIC +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ RW +0x8 |
427 |
+TLS +0x0+10e0 0x0+110e0 0x0+110e0 0x0+60 0x0+80 R +0x4 |
428 |
+ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48] |
429 |
#... |
430 |
|
431 |
Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 7 entries: |
432 |
--- binutils-2.24.51.0.1/ld/testsuite/ld-elf/eh1.d |
433 |
+++ binutils-2.24.51.0.1/ld/testsuite/ld-elf/eh1.d |
434 |
@@ -22,11 +22,11 @@ Contents of the .eh_frame section: |
435 |
DW_CFA_nop |
436 |
DW_CFA_nop |
437 |
|
438 |
-0+0018 0+001c 0+001c FDE cie=0+0000 pc=0+400078..0+400078 |
439 |
- DW_CFA_advance_loc: 0 to 0+400078 |
440 |
+0+0018 0+001c 0+001c FDE cie=0+0000 pc=([0-9a-f]+)..\1 |
441 |
+ DW_CFA_advance_loc: 0 to [0-9a-f]+ |
442 |
DW_CFA_def_cfa_offset: 16 |
443 |
DW_CFA_offset: r6 \(rbp\) at cfa-16 |
444 |
- DW_CFA_advance_loc: 0 to 0+400078 |
445 |
+ DW_CFA_advance_loc: 0 to [0-9a-f]+ |
446 |
DW_CFA_def_cfa_register: r6 \(rbp\) |
447 |
|
448 |
0+0038 ZERO terminator |
449 |
--- binutils-2.24.51.0.1/ld/testsuite/ld-elf/eh2.d |
450 |
+++ binutils-2.24.51.0.1/ld/testsuite/ld-elf/eh2.d |
451 |
@@ -22,11 +22,11 @@ Contents of the .eh_frame section: |
452 |
DW_CFA_nop |
453 |
DW_CFA_nop |
454 |
|
455 |
-0+0018 0+001c 0+001c FDE cie=0+0000 pc=0+400078..0+400078 |
456 |
- DW_CFA_advance_loc: 0 to 0+400078 |
457 |
+0+0018 0+001c 0+001c FDE cie=0+0000 pc=([0-9a-f]+)..\1 |
458 |
+ DW_CFA_advance_loc: 0 to [0-9a-f]+ |
459 |
DW_CFA_def_cfa_offset: 16 |
460 |
DW_CFA_offset: r6 \(rbp\) at cfa-16 |
461 |
- DW_CFA_advance_loc: 0 to 0+400078 |
462 |
+ DW_CFA_advance_loc: 0 to [0-9a-f]+ |
463 |
DW_CFA_def_cfa_register: r6 \(rbp\) |
464 |
|
465 |
0+0038 ZERO terminator |
466 |
--- binutils-2.24.51.0.1/ld/testsuite/ld-elf/eh3.d |
467 |
+++ binutils-2.24.51.0.1/ld/testsuite/ld-elf/eh3.d |
468 |
@@ -22,11 +22,11 @@ Contents of the .eh_frame section: |
469 |
DW_CFA_nop |
470 |
DW_CFA_nop |
471 |
|
472 |
-0+0018 0+001c 0+001c FDE cie=0+0000 pc=0+400078..0+400078 |
473 |
- DW_CFA_advance_loc: 0 to 0+400078 |
474 |
+0+0018 0+001c 0+001c FDE cie=0+0000 pc=([0-9a-f]+)..\1 |
475 |
+ DW_CFA_advance_loc: 0 to [0-9a-f]+ |
476 |
DW_CFA_def_cfa_offset: 16 |
477 |
DW_CFA_offset: r6 \(rbp\) at cfa-16 |
478 |
- DW_CFA_advance_loc: 0 to 0+400078 |
479 |
+ DW_CFA_advance_loc: 0 to [0-9a-f]+ |
480 |
DW_CFA_def_cfa_register: r6 \(rbp\) |
481 |
|
482 |
0+0038 ZERO terminator |
483 |
--- binutils-2.24.51.0.1/ld/testsuite/ld-elf/orphan-region.d |
484 |
+++ binutils-2.24.51.0.1/ld/testsuite/ld-elf/orphan-region.d |
485 |
@@ -15,7 +15,9 @@ |
486 |
Program Headers: |
487 |
Type.* |
488 |
LOAD[ \t]+0x[0-9a-f]+ 0x0*40000000 0x0*40000000 0x[0-9a-f]+ 0x[0-9a-f]+ RWE 0x[0-9a-f]+ |
489 |
+ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48] |
490 |
|
491 |
Section to Segment mapping: |
492 |
Segment Sections... |
493 |
00 .text .rodata .moredata * |
494 |
+ 01 + |
495 |
--- binutils-2.24.51.0.1/ld/testsuite/ld-i386/tlsbin.rd |
496 |
+++ binutils-2.24.51.0.1/ld/testsuite/ld-i386/tlsbin.rd |
497 |
@@ -44,6 +44,7 @@ Program Headers: |
498 |
+LOAD.* |
499 |
+DYNAMIC.* |
500 |
+TLS +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x0+60 0x0+a0 R +0x1000 |
501 |
+ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48] |
502 |
|
503 |
Section to Segment mapping: |
504 |
+Segment Sections... |
505 |
@@ -53,6 +54,7 @@ Program Headers: |
506 |
+03 +.tdata .dynamic .got .got.plt * |
507 |
+04 +.dynamic * |
508 |
+05 +.tdata .tbss * |
509 |
+ +06 + |
510 |
|
511 |
Relocation section '.rel.dyn' at offset 0x[0-9a-f]+ contains 9 entries: |
512 |
Offset +Info +Type +Sym.Value +Sym. Name |
513 |
--- binutils-2.24.51.0.1/ld/testsuite/ld-i386/tlsbindesc.rd |
514 |
+++ binutils-2.24.51.0.1/ld/testsuite/ld-i386/tlsbindesc.rd |
515 |
@@ -42,6 +42,7 @@ Program Headers: |
516 |
+LOAD.* |
517 |
+DYNAMIC.* |
518 |
+TLS +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x0+60 0x0+a0 R +0x1000 |
519 |
+ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48] |
520 |
|
521 |
Section to Segment mapping: |
522 |
+Segment Sections... |
523 |
@@ -51,6 +52,7 @@ Program Headers: |
524 |
+03 +.tdata .dynamic .got .got.plt * |
525 |
+04 +.dynamic * |
526 |
+05 +.tdata .tbss * |
527 |
+ +06 + |
528 |
|
529 |
Relocation section '.rel.dyn' at offset 0x[0-9a-f]+ contains 9 entries: |
530 |
Offset +Info +Type +Sym.Value +Sym. Name |
531 |
--- binutils-2.24.51.0.1/ld/testsuite/ld-i386/tlsdesc.rd |
532 |
+++ binutils-2.24.51.0.1/ld/testsuite/ld-i386/tlsdesc.rd |
533 |
@@ -39,6 +39,7 @@ Program Headers: |
534 |
+LOAD.* |
535 |
+DYNAMIC.* |
536 |
+TLS +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x0+60 0x0+80 R +0x1 |
537 |
+ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48] |
538 |
|
539 |
Section to Segment mapping: |
540 |
+Segment Sections... |
541 |
@@ -46,6 +47,7 @@ Program Headers: |
542 |
+01 +.tdata .dynamic .got .got.plt * |
543 |
+02 +.dynamic * |
544 |
+03 +.tdata .tbss * |
545 |
+ +04 + |
546 |
|
547 |
Relocation section '.rel.dyn' at offset 0x[0-9a-f]+ contains 20 entries: |
548 |
Offset +Info +Type +Sym.Value +Sym. Name |
549 |
--- binutils-2.24.51.0.1/ld/testsuite/ld-i386/tlsgdesc.rd |
550 |
+++ binutils-2.24.51.0.1/ld/testsuite/ld-i386/tlsgdesc.rd |
551 |
@@ -36,12 +36,14 @@ Program Headers: |
552 |
+LOAD.* |
553 |
+LOAD.* |
554 |
+DYNAMIC.* |
555 |
+ +PAX_FLAGS.* |
556 |
|
557 |
Section to Segment mapping: |
558 |
+Segment Sections... |
559 |
+00 +.hash .dynsym .dynstr .rel.dyn .rel.plt .plt .text * |
560 |
+01 +.dynamic .got .got.plt * |
561 |
+02 +.dynamic * |
562 |
+ +03 + |
563 |
|
564 |
Relocation section '.rel.dyn' at offset 0x[0-9a-f]+ contains 8 entries: |
565 |
Offset +Info +Type +Sym.Value +Sym. Name |
566 |
--- binutils-2.24.51.0.1/ld/testsuite/ld-i386/tlsnopic.rd |
567 |
+++ binutils-2.24.51.0.1/ld/testsuite/ld-i386/tlsnopic.rd |
568 |
@@ -37,6 +37,7 @@ Program Headers: |
569 |
+LOAD.* |
570 |
+DYNAMIC.* |
571 |
+TLS +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x0+ 0x0+24 R +0x1 |
572 |
+ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48] |
573 |
|
574 |
Section to Segment mapping: |
575 |
+Segment Sections... |
576 |
@@ -44,6 +45,7 @@ Program Headers: |
577 |
+01 +.dynamic .got .got.plt * |
578 |
+02 +.dynamic * |
579 |
+03 +.tbss * |
580 |
+ +04 + |
581 |
|
582 |
Relocation section '.rel.dyn' at offset 0x[0-9a-f]+ contains 20 entries: |
583 |
Offset +Info +Type +Sym.Value +Sym. Name |
584 |
--- binutils-2.24.51.0.1/ld/testsuite/ld-i386/tlspic.rd |
585 |
+++ binutils-2.24.51.0.1/ld/testsuite/ld-i386/tlspic.rd |
586 |
@@ -40,6 +40,7 @@ Program Headers: |
587 |
+LOAD.* |
588 |
+DYNAMIC.* |
589 |
+TLS +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x0+60 0x0+80 R +0x1 |
590 |
+ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48] |
591 |
|
592 |
Section to Segment mapping: |
593 |
+Segment Sections... |
594 |
@@ -47,6 +48,7 @@ Program Headers: |
595 |
+01 +.tdata .dynamic .got .got.plt * |
596 |
+02 +.dynamic * |
597 |
+03 +.tdata .tbss * |
598 |
+ +04 + |
599 |
|
600 |
Relocation section '.rel.dyn' at offset 0x[0-9a-f]+ contains 26 entries: |
601 |
Offset +Info +Type +Sym.Value +Sym. Name |
602 |
--- binutils-2.24.51.0.1/ld/testsuite/ld-ia64/merge1.d |
603 |
+++ binutils-2.24.51.0.1/ld/testsuite/ld-ia64/merge1.d |
604 |
@@ -4,7 +4,7 @@ |
605 |
#objdump: -d |
606 |
|
607 |
#... |
608 |
-0+1e0 <.text>: |
609 |
+[a-f0-9]+ <.text>: |
610 |
[ ]*[a-f0-9]+: 0b 60 80 02 00 24 \[MMI\] addl r12=32,r1;; |
611 |
[ ]*[a-f0-9]+: c0 c0 04 00 48 00 addl r12=24,r1 |
612 |
[ ]*[a-f0-9]+: 00 00 04 00 nop.i 0x0;; |
613 |
--- binutils-2.24.51.0.1/ld/testsuite/ld-ia64/merge2.d |
614 |
+++ binutils-2.24.51.0.1/ld/testsuite/ld-ia64/merge2.d |
615 |
@@ -4,7 +4,7 @@ |
616 |
#objdump: -d |
617 |
|
618 |
#... |
619 |
-0+1e0 <.text>: |
620 |
+[a-f0-9]+ <.text>: |
621 |
[ ]*[a-f0-9]+: 0b 60 80 02 00 24 \[MMI\] addl r12=32,r1;; |
622 |
[ ]*[a-f0-9]+: c0 c0 04 00 48 00 addl r12=24,r1 |
623 |
[ ]*[a-f0-9]+: 00 00 04 00 nop.i 0x0;; |
624 |
--- binutils-2.24.51.0.1/ld/testsuite/ld-ia64/merge3.d |
625 |
+++ binutils-2.24.51.0.1/ld/testsuite/ld-ia64/merge3.d |
626 |
@@ -4,7 +4,7 @@ |
627 |
#objdump: -d |
628 |
|
629 |
#... |
630 |
-0+210 <.text>: |
631 |
+[a-f0-9]+ <.text>: |
632 |
[ ]*[a-f0-9]+: 0b 60 80 02 00 24 \[MMI\] addl r12=32,r1;; |
633 |
[ ]*[a-f0-9]+: c0 40 05 00 48 00 addl r12=40,r1 |
634 |
[ ]*[a-f0-9]+: 00 00 04 00 nop.i 0x0;; |
635 |
--- binutils-2.24.51.0.1/ld/testsuite/ld-ia64/merge4.d |
636 |
+++ binutils-2.24.51.0.1/ld/testsuite/ld-ia64/merge4.d |
637 |
@@ -4,7 +4,7 @@ |
638 |
#objdump: -d |
639 |
|
640 |
#... |
641 |
-0+240 <.text>: |
642 |
+[a-f0-9]+ <.text>: |
643 |
[ ]*[a-f0-9]+: 0b 60 80 02 00 24 \[MMI\] addl r12=32,r1;; |
644 |
[ ]*[a-f0-9]+: c0 40 05 00 48 00 addl r12=40,r1 |
645 |
[ ]*[a-f0-9]+: 00 00 04 00 nop.i 0x0;; |
646 |
--- binutils-2.24.51.0.1/ld/testsuite/ld-ia64/merge5.d |
647 |
+++ binutils-2.24.51.0.1/ld/testsuite/ld-ia64/merge5.d |
648 |
@@ -4,7 +4,7 @@ |
649 |
#objdump: -d |
650 |
|
651 |
#... |
652 |
-0+270 <.text>: |
653 |
+[a-f0-9]+ <.text>: |
654 |
[ ]*[a-f0-9]+: 0b 60 80 02 00 24 \[MMI\] addl r12=32,r1;; |
655 |
[ ]*[a-f0-9]+: c0 40 05 00 48 00 addl r12=40,r1 |
656 |
[ ]*[a-f0-9]+: 00 00 04 00 nop.i 0x0;; |
657 |
--- binutils-2.24.51.0.1/ld/testsuite/ld-ia64/tlsbin.rd |
658 |
+++ binutils-2.24.51.0.1/ld/testsuite/ld-ia64/tlsbin.rd |
659 |
@@ -36,13 +36,14 @@ There are [0-9]+ program headers, starting at offset [0-9]+ |
660 |
|
661 |
Program Headers: |
662 |
+Type +Offset +VirtAddr +PhysAddr +FileSiz +MemSiz +Flg Align |
663 |
- +PHDR +0x0+40 0x40+40 0x40+40 0x0+188 0x0+188 R E 0x8 |
664 |
- +INTERP +0x0+1c8 0x40+1c8 0x40+1c8 0x[0-9a-f]+ 0x[0-9a-f]+ R +0x1 |
665 |
+ +PHDR +0x0+40 0x40+40 0x40+40 (0x[0-9a-f]+) \1 R E 0x8 |
666 |
+ +INTERP +0x0+([0-9a-f]+) (0x40+\1) \2 0x[0-9a-f]+ 0x[0-9a-f]+ R +0x1 |
667 |
.*Requesting program interpreter.* |
668 |
+LOAD +0x0+ 0x40+ 0x40+ 0x0+1[0-9a-f]+ 0x0+1[0-9a-f]+ R E 0x10000 |
669 |
+LOAD +0x0+1[0-9a-f]+ 0x60+1[0-9a-f]+ 0x60+1[0-9a-f]+ 0x0+0[0-9a-f]+ 0x0+0[0-9a-f]+ RW +0x10000 |
670 |
+DYNAMIC +0x0+1[0-9a-f]+ 0x60+1[0-9a-f]+ 0x60+1[0-9a-f]+ 0x0+150 0x0+150 RW +0x8 |
671 |
+TLS +0x0+1[0-9a-f]+ 0x60+1[0-9a-f]+ 0x60+1[0-9a-f]+ 0x0+60 0x0+a0 R +0x4 |
672 |
+ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48] |
673 |
+IA_64_UNWIND .* R +0x8 |
674 |
#... |
675 |
|
676 |
--- binutils-2.24.51.0.1/ld/testsuite/ld-ia64/tlspic.rd |
677 |
+++ binutils-2.24.51.0.1/ld/testsuite/ld-ia64/tlspic.rd |
678 |
@@ -40,6 +40,7 @@ Program Headers: |
679 |
+LOAD +0x0+1[0-9a-f]+ 0x0+11[0-9a-f]+ 0x0+11[0-9a-f]+ 0x0+0[0-9a-f]+ 0x0+0[0-9a-f]+ RW +0x10000 |
680 |
+DYNAMIC +0x0+1[0-9a-f]+ 0x0+11[0-9a-f]+ 0x0+11[0-9a-f]+ 0x0+140 0x0+140 RW +0x8 |
681 |
+TLS +0x0+1[0-9a-f]+ 0x0+11[0-9a-f]+ 0x0+11[0-9a-f]+ 0x0+60 0x0+80 R +0x4 |
682 |
+ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48] |
683 |
+IA_64_UNWIND +0x0+1[0-9a-f]+ 0x0+1[0-9a-f]+ 0x0+1[0-9a-f]+ 0x0+18 0x0+18 R +0x8 |
684 |
#... |
685 |
|
686 |
--- binutils-2.24.51.0.1/ld/testsuite/ld-mips-elf/multi-got-no-shared.d |
687 |
+++ binutils-2.24.51.0.1/ld/testsuite/ld-mips-elf/multi-got-no-shared.d |
688 |
@@ -8,9 +8,9 @@ |
689 |
.*: +file format.* |
690 |
|
691 |
Disassembly of section \.text: |
692 |
-004000b0 <[^>]*> 3c1c0043 lui gp,0x43 |
693 |
-004000b4 <[^>]*> 279c9ff0 addiu gp,gp,-24592 |
694 |
-004000b8 <[^>]*> afbc0008 sw gp,8\(sp\) |
695 |
+004000d0 <[^>]*> 3c1c0043 lui gp,0x43 |
696 |
+004000d4 <[^>]*> 279c9ff0 addiu gp,gp,-24592 |
697 |
+004000d8 <[^>]*> afbc0008 sw gp,8\(sp\) |
698 |
#... |
699 |
00408d60 <[^>]*> 3c1c0043 lui gp,0x43 |
700 |
00408d64 <[^>]*> 279c2c98 addiu gp,gp,11416 |
701 |
--- binutils-2.24.51.0.1/ld/testsuite/ld-mips-elf/pic-and-nonpic-3a.sd |
702 |
+++ binutils-2.24.51.0.1/ld/testsuite/ld-mips-elf/pic-and-nonpic-3a.sd |
703 |
@@ -1,7 +1,7 @@ |
704 |
|
705 |
Elf file type is DYN \(Shared object file\) |
706 |
Entry point .* |
707 |
-There are 5 program headers, starting at offset .* |
708 |
+There are [0-9] program headers, starting at offset .* |
709 |
|
710 |
Program Headers: |
711 |
* Type * Offset * VirtAddr * PhysAddr * FileSiz * MemSiz * Flg * Align |
712 |
@@ -9,6 +9,7 @@ Program Headers: |
713 |
* LOAD * [^ ]+ * 0x0+00000 * 0x0+00000 [^ ]+ * [^ ]+ * R E * 0x.* |
714 |
* LOAD * [^ ]+ * 0x0+10000 * 0x0+10000 [^ ]+ * [^ ]+ * RW * 0x.* |
715 |
* DYNAMIC * [^ ]+ * 0x0+00400 * 0x0+00400 .* |
716 |
+ * PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48] |
717 |
* NULL * .* |
718 |
|
719 |
*Section to Segment mapping: |
720 |
@@ -18,3 +19,4 @@ Program Headers: |
721 |
*0*2 * \.data \.got * |
722 |
*0*3 * \.dynamic * |
723 |
*0*4 * |
724 |
+ *0*5 * |
725 |
--- binutils-2.24.51.0.1/ld/testsuite/ld-mips-elf/pic-and-nonpic-3b.sd |
726 |
+++ binutils-2.24.51.0.1/ld/testsuite/ld-mips-elf/pic-and-nonpic-3b.sd |
727 |
@@ -1,7 +1,7 @@ |
728 |
|
729 |
Elf file type is EXEC \(Executable file\) |
730 |
Entry point 0x44000 |
731 |
-There are 8 program headers, starting at offset .* |
732 |
+There are [0-9] program headers, starting at offset .* |
733 |
|
734 |
Program Headers: |
735 |
* Type * Offset * VirtAddr * PhysAddr * FileSiz * MemSiz * Flg * Align |
736 |
@@ -13,6 +13,7 @@ Program Headers: |
737 |
* LOAD * [^ ]+ * 0x0+80000 * 0x0+80000 [^ ]+ * [^ ]+ * RW * 0x.* |
738 |
* LOAD * [^ ]+ * 0x0+a0000 * 0x0+a0000 [^ ]+ * [^ ]+ * RW * 0x.* |
739 |
* DYNAMIC * [^ ]+ * 0x0+42000 * 0x0+42000 .* |
740 |
+ * PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48] |
741 |
* NULL * .* |
742 |
|
743 |
*Section to Segment mapping: |
744 |
@@ -25,3 +26,4 @@ Program Headers: |
745 |
*0*5 *\.got \.data * |
746 |
*0*6 *\.dynamic * |
747 |
*0*7 * |
748 |
+ *0*8 * |
749 |
--- binutils-2.24.51.0.1/ld/testsuite/ld-mips-elf/pic-and-nonpic-4b.sd |
750 |
+++ binutils-2.24.51.0.1/ld/testsuite/ld-mips-elf/pic-and-nonpic-4b.sd |
751 |
@@ -1,7 +1,7 @@ |
752 |
|
753 |
Elf file type is EXEC \(Executable file\) |
754 |
Entry point 0x44000 |
755 |
-There are 8 program headers, starting at offset .* |
756 |
+There are [0-9] program headers, starting at offset .* |
757 |
|
758 |
Program Headers: |
759 |
* Type * Offset * VirtAddr * PhysAddr * FileSiz * MemSiz * Flg * Align |
760 |
@@ -13,6 +13,7 @@ Program Headers: |
761 |
* LOAD * [^ ]+ * 0x0+80000 * 0x0+80000 [^ ]+ * [^ ]+ * RW * 0x.* |
762 |
* LOAD * [^ ]+ * 0x0+a0000 * 0x0+a0000 [^ ]+ * [^ ]+ * RW * 0x.* |
763 |
* DYNAMIC * [^ ]+ * 0x0+42000 * 0x0+42000 .* |
764 |
+ * PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48] |
765 |
* NULL * .* |
766 |
|
767 |
*Section to Segment mapping: |
768 |
@@ -25,3 +26,4 @@ Program Headers: |
769 |
*0*5 * \.got \.data \.bss * |
770 |
*0*6 * \.dynamic * |
771 |
*0*7 * |
772 |
+ *0*8 * |
773 |
--- binutils-2.24.51.0.1/ld/testsuite/ld-mips-elf/pic-and-nonpic-5b.sd |
774 |
+++ binutils-2.24.51.0.1/ld/testsuite/ld-mips-elf/pic-and-nonpic-5b.sd |
775 |
@@ -1,7 +1,7 @@ |
776 |
|
777 |
Elf file type is EXEC \(Executable file\) |
778 |
Entry point 0x44000 |
779 |
-There are 8 program headers, starting at offset .* |
780 |
+There are [0-9] program headers, starting at offset .* |
781 |
|
782 |
Program Headers: |
783 |
* Type * Offset * VirtAddr * PhysAddr * FileSiz * MemSiz * Flg * Align |
784 |
@@ -13,6 +13,7 @@ Program Headers: |
785 |
* LOAD * [^ ]+ * 0x0+80000 * 0x0+80000 [^ ]+ * [^ ]+ * RW * 0x.* |
786 |
* LOAD * [^ ]+ * 0x0+a0000 * 0x0+a0000 [^ ]+ * [^ ]+ * RW * 0x.* |
787 |
* DYNAMIC * [^ ]+ * 0x0+42000 * 0x0+42000 .* |
788 |
+ * PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48] |
789 |
* NULL * .* |
790 |
|
791 |
*Section to Segment mapping: |
792 |
@@ -25,3 +26,4 @@ Program Headers: |
793 |
*0*5 * \.got \.data \.bss * |
794 |
*0*6 * \.dynamic * |
795 |
*0*7 * |
796 |
+ *0*8 * |
797 |
--- binutils-2.24.51.0.1/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-n32.sd |
798 |
+++ binutils-2.24.51.0.1/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-n32.sd |
799 |
@@ -1,7 +1,7 @@ |
800 |
|
801 |
Elf file type is EXEC \(Executable file\) |
802 |
Entry point 0x44000 |
803 |
-There are 8 program headers, starting at offset .* |
804 |
+There are [0-9] program headers, starting at offset .* |
805 |
|
806 |
Program Headers: |
807 |
* Type * Offset * VirtAddr * PhysAddr * FileSiz * MemSiz * Flg * Align |
808 |
@@ -13,6 +13,7 @@ Program Headers: |
809 |
* LOAD * [^ ]+ * 0x0+80000 * 0x0+80000 [^ ]+ * [^ ]+ * RW * 0x.* |
810 |
* LOAD * [^ ]+ * 0x0+a0000 * 0x0+a0000 [^ ]+ * [^ ]+ * RW * 0x.* |
811 |
* DYNAMIC * [^ ]+ * 0x0+42000 * 0x0+42000 .* |
812 |
+ * PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48] |
813 |
* NULL * .* |
814 |
|
815 |
*Section to Segment mapping: |
816 |
@@ -25,3 +26,4 @@ Program Headers: |
817 |
*0*5 * \.got \.data \.bss * |
818 |
*0*6 * \.dynamic * |
819 |
*0*7 * |
820 |
+ *0*8 * |
821 |
--- binutils-2.24.51.0.1/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-n64.sd |
822 |
+++ binutils-2.24.51.0.1/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-n64.sd |
823 |
@@ -1,7 +1,7 @@ |
824 |
|
825 |
Elf file type is EXEC \(Executable file\) |
826 |
Entry point 0x44000 |
827 |
-There are 7 program headers, starting at offset .* |
828 |
+There are [0-9] program headers, starting at offset .* |
829 |
|
830 |
Program Headers: |
831 |
* Type * Offset * VirtAddr * PhysAddr * FileSiz * MemSiz * Flg * Align |
832 |
@@ -12,6 +12,7 @@ Program Headers: |
833 |
* LOAD * [^ ]+ * 0x0+80000 * 0x0+80000 [^ ]+ * [^ ]+ * RW * 0x.* |
834 |
* LOAD * [^ ]+ * 0x0+a0000 * 0x0+a0000 [^ ]+ * [^ ]+ * RW * 0x.* |
835 |
* DYNAMIC * [^ ]+ * 0x0+42000 * 0x0+42000 .* |
836 |
+ * PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48] |
837 |
* NULL * .* |
838 |
|
839 |
*Section to Segment mapping: |
840 |
@@ -23,3 +24,4 @@ Program Headers: |
841 |
*0*4 * \.got \.data \.bss * |
842 |
*0*5 * \.dynamic * |
843 |
*0*6 * |
844 |
+ *0*7 * |
845 |
--- binutils-2.24.51.0.1/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-o32.sd |
846 |
+++ binutils-2.24.51.0.1/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-o32.sd |
847 |
@@ -1,7 +1,7 @@ |
848 |
|
849 |
Elf file type is EXEC \(Executable file\) |
850 |
Entry point 0x44000 |
851 |
-There are 8 program headers, starting at offset .* |
852 |
+There are [0-9] program headers, starting at offset .* |
853 |
|
854 |
Program Headers: |
855 |
* Type * Offset * VirtAddr * PhysAddr * FileSiz * MemSiz * Flg * Align |
856 |
@@ -13,6 +13,7 @@ Program Headers: |
857 |
* LOAD * [^ ]+ * 0x0+80000 * 0x0+80000 [^ ]+ * [^ ]+ * RW * 0x.* |
858 |
* LOAD * [^ ]+ * 0x0+a0000 * 0x0+a0000 [^ ]+ * [^ ]+ * RW * 0x.* |
859 |
* DYNAMIC * [^ ]+ * 0x0+42000 * 0x0+42000 .* |
860 |
+ * PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48] |
861 |
* NULL * .* |
862 |
|
863 |
*Section to Segment mapping: |
864 |
@@ -25,3 +26,4 @@ Program Headers: |
865 |
*0*5 * \.got \.data \.bss * |
866 |
*0*6 * \.dynamic * |
867 |
*0*7 * |
868 |
+ *0*8 * |
869 |
--- binutils-2.24.51.0.1/ld/testsuite/ld-powerpc/tlsexe32.r |
870 |
+++ binutils-2.24.51.0.1/ld/testsuite/ld-powerpc/tlsexe32.r |
871 |
@@ -33,13 +33,14 @@ There are [0-9]+ program headers, starting at offset [0-9]+ |
872 |
|
873 |
Program Headers: |
874 |
+Type +Offset +VirtAddr +PhysAddr +FileSiz MemSiz +Flg Align |
875 |
- +PHDR +0x000034 0x01800034 0x01800034 0x000c0 0x000c0 R E 0x4 |
876 |
- +INTERP +0x0000f4 0x018000f4 0x018000f4 0x00011 0x00011 R +0x1 |
877 |
+ +PHDR +0x000034 0x01800034 0x01800034 (0x000[0-9a-f]{2}) \1 R E 0x4 |
878 |
+ +INTERP +0x000([0-9a-f]{3}) 0x01800\1 0x01800\1 0x00011 0x00011 R +0x1 |
879 |
+\[Requesting program interpreter: .*\] |
880 |
+LOAD .* R E 0x10000 |
881 |
+LOAD .* RWE 0x10000 |
882 |
+DYNAMIC .* RW +0x4 |
883 |
+TLS .* 0x0001c 0x00038 R +0x4 |
884 |
+ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48] |
885 |
|
886 |
Section to Segment mapping: |
887 |
+Segment Sections\.\.\. |
888 |
@@ -49,6 +50,7 @@ Program Headers: |
889 |
+03 +\.tdata \.dynamic \.got \.plt |
890 |
+04 +\.dynamic |
891 |
+05 +\.tdata \.tbss |
892 |
+ +06 + |
893 |
|
894 |
Relocation section '\.rela\.dyn' at offset .* contains 2 entries: |
895 |
Offset +Info +Type +Sym\. Value +Symbol's Name \+ Addend |
896 |
--- binutils-2.24.51.0.1/ld/testsuite/ld-powerpc/tlsso32.r |
897 |
+++ binutils-2.24.51.0.1/ld/testsuite/ld-powerpc/tlsso32.r |
898 |
@@ -35,6 +35,7 @@ Program Headers: |
899 |
+LOAD .* RWE 0x10000 |
900 |
+DYNAMIC .* RW +0x4 |
901 |
+TLS .* 0x0+1c 0x0+38 R +0x4 |
902 |
+ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48] |
903 |
|
904 |
Section to Segment mapping: |
905 |
+Segment Sections\.\.\. |
906 |
@@ -42,6 +43,7 @@ Program Headers: |
907 |
+01 +\.tdata \.dynamic \.got \.plt |
908 |
+02 +\.dynamic |
909 |
+03 +\.tdata \.tbss |
910 |
+ +04 + |
911 |
|
912 |
Relocation section '\.rela\.dyn' at offset 0x[0-9a-f]+ contains 18 entries: |
913 |
Offset +Info +Type +Sym\. Value +Symbol's Name \+ Addend |
914 |
@@ -52,9 +54,9 @@ Relocation section '\.rela\.dyn' at offset 0x[0-9a-f]+ contains 18 entries: |
915 |
[0-9a-f ]+R_PPC_TPREL16 +0+30 +le0 \+ 0 |
916 |
[0-9a-f ]+R_PPC_TPREL16_HA +0+34 +le1 \+ 0 |
917 |
[0-9a-f ]+R_PPC_TPREL16_LO +0+34 +le1 \+ 0 |
918 |
-[0-9a-f ]+R_PPC_TPREL16 +0+103d0 +\.tdata \+ 103e4 |
919 |
-[0-9a-f ]+R_PPC_TPREL16_HA +0+103d0 +\.tdata \+ 103e8 |
920 |
-[0-9a-f ]+R_PPC_TPREL16_LO +0+103d0 +\.tdata \+ 103e8 |
921 |
+[0-9a-f ]+R_PPC_TPREL16 +0+103[df]0 +\.tdata \+ 10[0-9a-f]{3} |
922 |
+[0-9a-f ]+R_PPC_TPREL16_HA +0+103[df]0 +\.tdata \+ 10[0-9a-f]{3} |
923 |
+[0-9a-f ]+R_PPC_TPREL16_LO +0+103[df]0 +\.tdata \+ 10[0-9a-f]{3} |
924 |
[0-9a-f ]+R_PPC_DTPMOD32 +0 |
925 |
[0-9a-f ]+R_PPC_DTPREL32 +0 |
926 |
[0-9a-f ]+R_PPC_DTPMOD32 +0 |
927 |
--- binutils-2.24.51.0.1/ld/testsuite/ld-s390/tlsbin.rd |
928 |
+++ binutils-2.24.51.0.1/ld/testsuite/ld-s390/tlsbin.rd |
929 |
@@ -36,6 +36,7 @@ There are [0-9]+ program headers, starting at offset [0-9]+ |
930 |
+LOAD .* RW +0x1000 |
931 |
+DYNAMIC .* RW +0x4 |
932 |
+TLS .* 0x0+60 0x0+a0 R +0x20 |
933 |
+ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48] |
934 |
|
935 |
Section to Segment mapping: |
936 |
+Segment Sections... |
937 |
@@ -52,6 +53,7 @@ Program Headers: |
938 |
+03 +.tdata .dynamic .got * |
939 |
+04 +.dynamic * |
940 |
+05 +.tdata .tbss * |
941 |
+ +06 + |
942 |
|
943 |
Relocation section '.rela.dyn' at offset .* contains 4 entries: |
944 |
Offset +Info +Type +Sym.Value +Sym. Name \+ Addend |
945 |
--- binutils-2.24.51.0.1/ld/testsuite/ld-s390/tlsbin_64.rd |
946 |
+++ binutils-2.24.51.0.1/ld/testsuite/ld-s390/tlsbin_64.rd |
947 |
@@ -36,6 +36,7 @@ There are [0-9]+ program headers, starting at offset [0-9]+ |
948 |
+LOAD .* RW +0x1000 |
949 |
+DYNAMIC .* RW +0x8 |
950 |
+TLS .* 0x0+60 0x0+a0 R +0x20 |
951 |
+ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48] |
952 |
|
953 |
Section to Segment mapping: |
954 |
+Segment Sections... |
955 |
@@ -52,6 +53,7 @@ Program Headers: |
956 |
+03 +.tdata .dynamic .got * |
957 |
+04 +.dynamic * |
958 |
+05 +.tdata .tbss * |
959 |
+ +06 + |
960 |
|
961 |
Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 4 entries: |
962 |
+Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend |
963 |
--- binutils-2.24.51.0.1/ld/testsuite/ld-s390/tlspic.rd |
964 |
+++ binutils-2.24.51.0.1/ld/testsuite/ld-s390/tlspic.rd |
965 |
@@ -39,6 +39,7 @@ Program Headers: |
966 |
+LOAD .* RW +0x1000 |
967 |
+DYNAMIC .* RW +0x4 |
968 |
+TLS .* 0x0+60 0x0+80 R +0x20 |
969 |
+ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48] |
970 |
|
971 |
Section to Segment mapping: |
972 |
+Segment Sections... |
973 |
@@ -46,6 +47,7 @@ Program Headers: |
974 |
+01 +.tdata .dynamic .got |
975 |
+02 +.dynamic |
976 |
+03 +.tdata .tbss |
977 |
+ +04 + |
978 |
|
979 |
Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 14 entries: |
980 |
Offset +Info +Type +Sym.Value +Sym. Name \+ Addend |
981 |
--- binutils-2.24.51.0.1/ld/testsuite/ld-s390/tlspic_64.rd |
982 |
+++ binutils-2.24.51.0.1/ld/testsuite/ld-s390/tlspic_64.rd |
983 |
@@ -39,6 +39,7 @@ Program Headers: |
984 |
+LOAD .* RW +0x1000 |
985 |
+DYNAMIC .* RW +0x8 |
986 |
+TLS .* 0x0+60 0x0+80 R +0x20 |
987 |
+ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48] |
988 |
|
989 |
Section to Segment mapping: |
990 |
+Segment Sections... |
991 |
@@ -46,6 +47,7 @@ Program Headers: |
992 |
+01 +.tdata .dynamic .got * |
993 |
+02 +.dynamic * |
994 |
+03 +.tdata .tbss * |
995 |
+ +04 + |
996 |
|
997 |
Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 14 entries: |
998 |
+Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend |
999 |
--- binutils-2.24.51.0.1/ld/testsuite/ld-sh/tlsbin-2.d |
1000 |
+++ binutils-2.24.51.0.1/ld/testsuite/ld-sh/tlsbin-2.d |
1001 |
@@ -44,6 +44,7 @@ Program Headers: |
1002 |
+LOAD.* |
1003 |
+DYNAMIC.* |
1004 |
+TLS +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x0+18 0x0+28 R +0x4 |
1005 |
+ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48] |
1006 |
|
1007 |
Section to Segment mapping: |
1008 |
+Segment Sections\.\.\. |
1009 |
@@ -53,6 +54,7 @@ Program Headers: |
1010 |
+03 +\.tdata \.dynamic \.got * |
1011 |
+04 +\.dynamic * |
1012 |
+05 +\.tdata \.tbss * |
1013 |
+ +06 + |
1014 |
|
1015 |
Relocation section '\.rela\.dyn' at offset 0x[0-9a-f]+ contains 4 entries: |
1016 |
Offset +Info +Type +Sym\.Value +Sym\. Name \+ Addend |
1017 |
--- binutils-2.24.51.0.1/ld/testsuite/ld-sh/tlspic-2.d |
1018 |
+++ binutils-2.24.51.0.1/ld/testsuite/ld-sh/tlspic-2.d |
1019 |
@@ -32,7 +32,7 @@ Key to Flags: |
1020 |
|
1021 |
Elf file type is DYN \(Shared object file\) |
1022 |
Entry point 0x[0-9a-f]+ |
1023 |
-There are 4 program headers, starting at offset [0-9]+ |
1024 |
+There are [0-9] program headers, starting at offset [0-9]+ |
1025 |
|
1026 |
Program Headers: |
1027 |
+Type +Offset +VirtAddr +PhysAddr +FileSiz +MemSiz +Flg Align |
1028 |
@@ -40,6 +40,7 @@ Program Headers: |
1029 |
+LOAD.* |
1030 |
+DYNAMIC.* |
1031 |
+TLS .* 0x0+18 0x0+20 R +0x4 |
1032 |
+ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48] |
1033 |
|
1034 |
Section to Segment mapping: |
1035 |
+Segment Sections\.\.\. |
1036 |
@@ -47,6 +48,7 @@ Program Headers: |
1037 |
+01 +\.tdata \.dynamic \.got * |
1038 |
+02 +\.dynamic * |
1039 |
+03 +\.tdata \.tbss * |
1040 |
+ +04 + |
1041 |
|
1042 |
Relocation section '\.rela\.dyn' at offset 0x[0-9a-f]+ contains 10 entries: |
1043 |
Offset +Info +Type +Sym\.Value +Sym\. Name \+ Addend |
1044 |
--- binutils-2.24.51.0.1/ld/testsuite/ld-sparc/gotop32.rd |
1045 |
+++ binutils-2.24.51.0.1/ld/testsuite/ld-sparc/gotop32.rd |
1046 |
@@ -31,6 +31,7 @@ Program Headers: |
1047 |
+LOAD +0x0+ 0x0+ 0x0+ 0x0+2000 0x0+2000 R E 0x10000 |
1048 |
+LOAD +0x0+2000 0x0+12000 0x0+12000 0x0+2000 0x0+2000 RW +0x10000 |
1049 |
+DYNAMIC +0x0+2000 0x0+12000 0x0+12000 0x0+70 0x0+70 RW +0x4 |
1050 |
+ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48] |
1051 |
#... |
1052 |
|
1053 |
Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 1 entries: |
1054 |
--- binutils-2.24.51.0.1/ld/testsuite/ld-sparc/gotop64.rd |
1055 |
+++ binutils-2.24.51.0.1/ld/testsuite/ld-sparc/gotop64.rd |
1056 |
@@ -31,6 +31,7 @@ Program Headers: |
1057 |
+LOAD +0x0+ 0x0+ 0x0+ 0x0+2000 0x0+2000 R E 0x100000 |
1058 |
+LOAD +0x0+2000 0x0+102000 0x0+102000 0x0+2000 0x0+2000 RW +0x100000 |
1059 |
+DYNAMIC +0x0+2000 0x0+102000 0x0+102000 0x0+e0 0x0+e0 RW +0x8 |
1060 |
+ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48] |
1061 |
#... |
1062 |
|
1063 |
Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 1 entries: |
1064 |
--- binutils-2.24.51.0.1/ld/testsuite/ld-sparc/tlssunbin32.rd |
1065 |
+++ binutils-2.24.51.0.1/ld/testsuite/ld-sparc/tlssunbin32.rd |
1066 |
@@ -30,13 +30,14 @@ There are [0-9]+ program headers, starting at offset [0-9]+ |
1067 |
|
1068 |
Program Headers: |
1069 |
+Type +Offset +VirtAddr +PhysAddr +FileSiz MemSiz +Flg Align |
1070 |
- +PHDR +0x0+34 0x0+10034 0x0+10034 0x0+c0 0x0+c0 R E 0x4 |
1071 |
- +INTERP +0x0+f4 0x0+100f4 0x0+100f4 0x0+11 0x0+11 R +0x1 |
1072 |
+ +PHDR +0x0+34 0x0+10034 0x0+10034 (0x[0-9a-f]+) \1 R E 0x4 |
1073 |
+ +INTERP +(0x[0-9a-f]+ ){3}0x0+11 0x0+11 R +0x1 |
1074 |
.*Requesting program interpreter.* |
1075 |
+LOAD .* R E 0x10000 |
1076 |
+LOAD .* RW +0x10000 |
1077 |
+DYNAMIC .* RW +0x4 |
1078 |
+TLS .* 0x0+1060 0x0+10a0 R +0x4 |
1079 |
+ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48] |
1080 |
#... |
1081 |
|
1082 |
Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 4 entries: |
1083 |
--- binutils-2.24.51.0.1/ld/testsuite/ld-sparc/tlssunbin64.rd |
1084 |
+++ binutils-2.24.51.0.1/ld/testsuite/ld-sparc/tlssunbin64.rd |
1085 |
@@ -30,13 +30,14 @@ There are [0-9]+ program headers, starting at offset [0-9]+ |
1086 |
|
1087 |
Program Headers: |
1088 |
+Type +Offset +VirtAddr +PhysAddr +FileSiz +MemSiz +Flg Align |
1089 |
- +PHDR +0x0+40 0x0+100040 0x0+100040 0x0+150 0x0+150 R E 0x8 |
1090 |
- +INTERP +0x0+190 0x0+100190 0x0+100190 0x0+19 0x0+19 R +0x1 |
1091 |
+ +PHDR +0x0+40 0x0+100040 0x0+100040 (0x[0-9a-f]+) \1 R E 0x8 |
1092 |
+ +INTERP +0x0+([0-9a-f]+) (0x0+10+\1) \2 0x0+19 0x0+19 R +0x1 |
1093 |
.*Requesting program interpreter.* |
1094 |
+LOAD .* R E 0x100000 |
1095 |
+LOAD .* RW +0x100000 |
1096 |
+DYNAMIC .* RW +0x8 |
1097 |
+TLS .* 0x0+60 0x0+a0 R +0x4 |
1098 |
+ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48] |
1099 |
#... |
1100 |
|
1101 |
Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 4 entries: |
1102 |
--- binutils-2.24.51.0.1/ld/testsuite/ld-sparc/tlssunnopic32.rd |
1103 |
+++ binutils-2.24.51.0.1/ld/testsuite/ld-sparc/tlssunnopic32.rd |
1104 |
@@ -32,6 +32,7 @@ Program Headers: |
1105 |
+LOAD .* RW +0x10000 |
1106 |
+DYNAMIC .* RW +0x4 |
1107 |
+TLS .* 0x0+ 0x0+24 R +0x4 |
1108 |
+ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48] |
1109 |
#... |
1110 |
|
1111 |
Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 12 entries: |
1112 |
--- binutils-2.24.51.0.1/ld/testsuite/ld-sparc/tlssunnopic64.rd |
1113 |
+++ binutils-2.24.51.0.1/ld/testsuite/ld-sparc/tlssunnopic64.rd |
1114 |
@@ -32,6 +32,7 @@ Program Headers: |
1115 |
+LOAD .* RW +0x100000 |
1116 |
+DYNAMIC .* RW +0x8 |
1117 |
+TLS .* 0x0+ 0x0+24 R +0x4 |
1118 |
+ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48] |
1119 |
#... |
1120 |
|
1121 |
Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 14 entries: |
1122 |
--- binutils-2.24.51.0.1/ld/testsuite/ld-sparc/tlssunpic32.rd |
1123 |
+++ binutils-2.24.51.0.1/ld/testsuite/ld-sparc/tlssunpic32.rd |
1124 |
@@ -36,6 +36,7 @@ Program Headers: |
1125 |
+LOAD +0x0+2000 0x0+12000 0x0+12000 0x0+184 0x0+184 RWE 0x10000 |
1126 |
+DYNAMIC +0x0+2060 0x0+12060 0x0+12060 0x0+98 0x0+98 RW +0x4 |
1127 |
+TLS +0x0+2000 0x0+12000 0x0+12000 0x0+60 0x0+80 R +0x4 |
1128 |
+ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48] |
1129 |
#... |
1130 |
|
1131 |
Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 14 entries: |
1132 |
--- binutils-2.24.51.0.1/ld/testsuite/ld-sparc/tlssunpic64.rd |
1133 |
+++ binutils-2.24.51.0.1/ld/testsuite/ld-sparc/tlssunpic64.rd |
1134 |
@@ -36,6 +36,7 @@ Program Headers: |
1135 |
+LOAD +0x0+2000 0x0+102000 0x0+102000 0x0+3a0 0x0+3a0 RWE 0x100000 |
1136 |
+DYNAMIC +0x0+2060 0x0+102060 0x0+102060 0x0+130 0x0+130 RW +0x8 |
1137 |
+TLS +0x0+2000 0x0+102000 0x0+102000 0x0+60 0x0+80 R +0x4 |
1138 |
+ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48] |
1139 |
#... |
1140 |
|
1141 |
Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 14 entries: |
1142 |
--- binutils-2.24.51.0.1/ld/testsuite/ld-x86-64/tlsgdesc.rd |
1143 |
+++ binutils-2.24.51.0.1/ld/testsuite/ld-x86-64/tlsgdesc.rd |
1144 |
@@ -36,12 +36,14 @@ Program Headers: |
1145 |
+LOAD.* |
1146 |
+LOAD.* |
1147 |
+DYNAMIC.* |
1148 |
+ +PAX_FLAGS.* |
1149 |
|
1150 |
Section to Segment mapping: |
1151 |
+Segment Sections... |
1152 |
+00 +.hash .dynsym .dynstr .rela.dyn .rela.plt .plt .text * |
1153 |
+01 +.dynamic .got .got.plt * |
1154 |
+02 +.dynamic * |
1155 |
+ +03 + |
1156 |
|
1157 |
Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 8 entries: |
1158 |
+Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend |
1159 |
--- binutils-2.24.51.0.1/ld/testsuite/ld-x86-64/tlspic.rd |
1160 |
+++ binutils-2.24.51.0.1/ld/testsuite/ld-x86-64/tlspic.rd |
1161 |
@@ -40,6 +40,7 @@ Program Headers: |
1162 |
+LOAD +0x0+131a 0x0+20131a 0x0+20131a 0x0+246 0x0+246 RW +0x200000 |
1163 |
+DYNAMIC +0x0+1380 0x0+201380 0x0+201380 0x0+130 0x0+130 RW +0x8 |
1164 |
+TLS +0x0+131a 0x0+20131a 0x0+20131a 0x0+60 0x0+80 R +0x1 |
1165 |
+ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48] |
1166 |
|
1167 |
Section to Segment mapping: |
1168 |
+Segment Sections... |
1169 |
@@ -47,6 +48,7 @@ Program Headers: |
1170 |
+01 +.tdata .dynamic .got .got.plt * |
1171 |
+02 +.dynamic * |
1172 |
+03 +.tdata .tbss * |
1173 |
+ +04 + |
1174 |
|
1175 |
Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 14 entries: |
1176 |
+Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend |
1177 |
|
1178 |
|
1179 |
|
1180 |
1.1 src/patchsets/binutils/2.24.51.0.3/66_all_binutils-2.22.52.0.1-warn-textrel.patch |
1181 |
|
1182 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/binutils/2.24.51.0.3/66_all_binutils-2.22.52.0.1-warn-textrel.patch?rev=1.1&view=markup |
1183 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/binutils/2.24.51.0.3/66_all_binutils-2.22.52.0.1-warn-textrel.patch?rev=1.1&content-type=text/plain |
1184 |
|
1185 |
Index: 66_all_binutils-2.22.52.0.1-warn-textrel.patch |
1186 |
=================================================================== |
1187 |
textrels are bad for forcing copy-on-write (this affects everyone), |
1188 |
and for security/runtime code generation, this affects security ppl. |
1189 |
But in either case, it doesn't matter who needs textrels, it's |
1190 |
the very fact that they're needed at all. |
1191 |
|
1192 |
2006-06-10 Ned Ludd <solar@g.o>, Mike Frysinger <vapier@g.o> |
1193 |
|
1194 |
* bfd/elflink.c (bfd_elf_final_link): Check all objects for TEXTRELs. |
1195 |
* ld/ldmain.c (main): Change textrel warning default to true. |
1196 |
* ld/testsuite/lib/ld-lib.exp (default_ld_simple_link): Scrub TEXTREL |
1197 |
warnings from ld output. |
1198 |
|
1199 |
--- a/bfd/elflink.c |
1200 |
+++ b/bfd/elflink.c |
1201 |
@@ -8652,7 +8652,7 @@ bfd_elf_final_link (bfd *abfd, struct bf |
1202 |
goto error_return; |
1203 |
|
1204 |
/* Check for DT_TEXTREL (late, in case the backend removes it). */ |
1205 |
- if (((info->warn_shared_textrel && info->shared) |
1206 |
+ if ((info->warn_shared_textrel |
1207 |
|| info->error_textrel) |
1208 |
&& (o = bfd_get_section_by_name (dynobj, ".dynamic")) != NULL) |
1209 |
{ |
1210 |
@@ -8702,7 +8702,7 @@ bfd_elf_final_link (bfd *abfd, struct bf |
1211 |
(_("%P%X: read-only segment has dynamic relocations.\n")); |
1212 |
else |
1213 |
info->callbacks->einfo |
1214 |
- (_("%P: warning: creating a DT_TEXTREL in a shared object.\n")); |
1215 |
+ (_("%P: warning: creating a DT_TEXTREL in object.\n")); |
1216 |
break; |
1217 |
} |
1218 |
} |
1219 |
--- a/ld/ldmain.c |
1220 |
+++ b/ld/ldmain.c |
1221 |
@@ -282,2 +282,3 @@ main (int argc, char **argv) |
1222 |
link_info.spare_dynamic_tags = 5; |
1223 |
+ link_info.warn_shared_textrel = TRUE; |
1224 |
link_info.sharable_sections = FALSE; |
1225 |
--- a/ld/testsuite/lib/ld-lib.exp |
1226 |
+++ b/ld/testsuite/lib/ld-lib.exp |
1227 |
@@ -181,6 +181,10 @@ proc default_ld_simple_link { ld target |
1228 |
# symbol, since the default linker script might use ENTRY. |
1229 |
regsub -all "(^|\n)(\[^\n\]*: warning: cannot find entry symbol\[^\n\]*\n?)" $exec_output "\\1" exec_output |
1230 |
|
1231 |
+ # Gentoo tweak: |
1232 |
+ # We want to ignore TEXTREL warnings since we force enable them by default |
1233 |
+ regsub -all "^lt-ld-new: warning: creating a DT_TEXTREL in object\." $exec_output "\\1" exec_output |
1234 |
+ |
1235 |
if [string match "" $exec_output] then { |
1236 |
return 1 |
1237 |
} else { |
1238 |
|
1239 |
|
1240 |
|
1241 |
1.1 src/patchsets/binutils/2.24.51.0.3/75_all_binutils-default-test-flags.patch |
1242 |
|
1243 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/binutils/2.24.51.0.3/75_all_binutils-default-test-flags.patch?rev=1.1&view=markup |
1244 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/binutils/2.24.51.0.3/75_all_binutils-default-test-flags.patch?rev=1.1&content-type=text/plain |
1245 |
|
1246 |
Index: 75_all_binutils-default-test-flags.patch |
1247 |
=================================================================== |
1248 |
many tests rely on order of symbols and the gnu hash style/relro options |
1249 |
change that. so to avoid having to constantly thrash in the test files, |
1250 |
use the normal options that everyone tests against. |
1251 |
|
1252 |
--- binutils/ld/testsuite/lib/ld-lib.exp |
1253 |
+++ binutils/ld/testsuite/lib/ld-lib.exp |
1254 |
@@ -84,7 +84,7 @@ |
1255 |
global HOSTING_EMU |
1256 |
|
1257 |
remote_file host delete $target |
1258 |
- return [run_host_cmd_yesno "$ld" "$HOSTING_EMU -o $target -r $objects"] |
1259 |
+ return [run_host_cmd_yesno "$ld" "$HOSTING_EMU --hash-style=sysv -z norelro -o $target -r $objects"] |
1260 |
} |
1261 |
|
1262 |
# Check to see if ld is being invoked with a non-endian output format |
1263 |
@@ -158,7 +158,7 @@ |
1264 |
|
1265 |
remote_file host delete $target |
1266 |
|
1267 |
- return [run_host_cmd_yesno "$ld" "$HOSTING_EMU $flags -o $target $objs $libs"] |
1268 |
+ return [run_host_cmd_yesno "$ld" "$HOSTING_EMU --hash-style=sysv -z norelro $flags -o $target $objs $libs"] |
1269 |
} |
1270 |
|
1271 |
# Link a program using ld, without including any libraries. |
1272 |
@@ -189,7 +189,9 @@ |
1273 |
} |
1274 |
set ldexe [string replace $ldexe 0 [string last "/" $ldexe] ""] |
1275 |
if {[string match "*gcc*" $ldexe] || [string match "*++*" $ldexe]} then { |
1276 |
- set ldflags "$gcc_ld_flag $ldflags" |
1277 |
+ set ldflags "$gcc_ld_flag -Wl,--hash-style=sysv -Wl,-z,norelro $ldflags" |
1278 |
+ } else { |
1279 |
+ set ldflags "--hash-style=sysv -z norelro $ldflags" |
1280 |
} |
1281 |
|
1282 |
remote_file host delete $target |
1283 |
|
1284 |
|
1285 |
|
1286 |
1.1 src/patchsets/binutils/2.24.51.0.3/76_all_use-new-ld-dtags.patch |
1287 |
|
1288 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/binutils/2.24.51.0.3/76_all_use-new-ld-dtags.patch?rev=1.1&view=markup |
1289 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/binutils/2.24.51.0.3/76_all_use-new-ld-dtags.patch?rev=1.1&content-type=text/plain |
1290 |
|
1291 |
Index: 76_all_use-new-ld-dtags.patch |
1292 |
=================================================================== |
1293 |
this is from upstream |
1294 |
|
1295 |
From 9e3072ad67f8b6d092e9e4dbfc6f8c9141aabe0c Mon Sep 17 00:00:00 2001 |
1296 |
From: Mike Frysinger <vapier@g.o> |
1297 |
Date: Mon, 21 Jan 2013 08:21:45 +0000 |
1298 |
Subject: [PATCH] ld: enable new dtags by default for linux/gnu targets |
1299 |
|
1300 |
The "new" dtags options have been around for 14+ years now, so for Linux |
1301 |
and GNU targets, enable them by default. |
1302 |
|
1303 |
2012-01-21 Mike Frysinger <vapier@g.o> |
1304 |
|
1305 |
* emultempl/elf32.em (gld${EMULATION_NAME}_before_parse): Set |
1306 |
link_info.new_dtags to TRUE for linux/gnu targets. |
1307 |
* NEWS: Mention new dtags default. |
1308 |
|
1309 |
From 8d0bade12dbc53bfe61a63add17e7780618f1ac1 Mon Sep 17 00:00:00 2001 |
1310 |
From: Roland McGrath <roland@×××.org> |
1311 |
Date: Tue, 22 Jan 2013 22:07:34 +0000 |
1312 |
Subject: [PATCH] ld/ * emultempl/elf32.em |
1313 |
(gld${EMULATION_NAME}_before_parse): Set new_dtags to TRUE for |
1314 |
*-*-nacl* targets. |
1315 |
|
1316 |
2013-01-22 Roland McGrath <mcgrathr@××××××.com> |
1317 |
|
1318 |
* emultempl/elf32.em (gld${EMULATION_NAME}_before_parse): Set |
1319 |
new_dtags to TRUE for *-*-nacl* targets. |
1320 |
|
1321 |
diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em |
1322 |
index 53d4e24..60611f9 100644 |
1323 |
--- a/ld/emultempl/elf32.em |
1324 |
+++ b/ld/emultempl/elf32.em |
1325 |
@@ -105,6 +105,16 @@ gld${EMULATION_NAME}_before_parse (void) |
1326 |
config.has_shared = `if test -n "$GENERATE_SHLIB_SCRIPT" ; then echo TRUE ; else echo FALSE ; fi`; |
1327 |
config.separate_code = `if test "x${SEPARATE_CODE}" = xyes ; then echo TRUE ; else echo FALSE ; fi`; |
1328 |
link_info.sharable_sections = `if test "$SHARABLE_SECTIONS" = "yes" ; then echo TRUE ; else echo FALSE ; fi`; |
1329 |
+EOF |
1330 |
+ |
1331 |
+case ${target} in |
1332 |
+ *-*-linux-* | *-*-k*bsd*-* | *-*-gnu* | *-*-nacl*) |
1333 |
+ fragment <<EOF |
1334 |
+ link_info.new_dtags = TRUE; |
1335 |
+EOF |
1336 |
+ ;; |
1337 |
+esac |
1338 |
+fragment <<EOF |
1339 |
} |
1340 |
|
1341 |
EOF |
1342 |
|
1343 |
|
1344 |
|
1345 |
1.1 src/patchsets/binutils/2.24.51.0.3/77_all_generate-gnu-hash.patch |
1346 |
|
1347 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/binutils/2.24.51.0.3/77_all_generate-gnu-hash.patch?rev=1.1&view=markup |
1348 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/binutils/2.24.51.0.3/77_all_generate-gnu-hash.patch?rev=1.1&content-type=text/plain |
1349 |
|
1350 |
Index: 77_all_generate-gnu-hash.patch |
1351 |
=================================================================== |
1352 |
--- a/ld/emultempl/elf32.em |
1353 |
+++ b/ld/emultempl/elf32.em |
1354 |
@@ -103,6 +103,19 @@ |
1355 |
gld${EMULATION_NAME}_before_parse (void) |
1356 |
{ |
1357 |
ldfile_set_output_arch ("${OUTPUT_ARCH}", bfd_arch_`echo ${ARCH} | sed -e 's/:.*//'`); |
1358 |
+EOF |
1359 |
+# Enable gnu hash by default for Linux (non-mips) targets. |
1360 |
+# This has been supported since glibc-2.5. |
1361 |
+case ${target} in |
1362 |
+ mips*) ;; |
1363 |
+ *-*-linux-* | *-*-gnu*) |
1364 |
+ fragment <<EOF |
1365 |
+ link_info.emit_hash = FALSE; |
1366 |
+ link_info.emit_gnu_hash = TRUE; |
1367 |
+EOF |
1368 |
+ ;; |
1369 |
+esac |
1370 |
+fragment <<EOF |
1371 |
input_flags.dynamic = ${DYNAMIC_LINK-TRUE}; |
1372 |
config.has_shared = `if test -n "$GENERATE_SHLIB_SCRIPT" ; then echo TRUE ; else echo FALSE ; fi`; |
1373 |
config.separate_code = `if test "x${SEPARATE_CODE}" = xyes ; then echo TRUE ; else echo FALSE ; fi`; |
1374 |
|
1375 |
From 4826dc786682aaa0b51fd337edd0775296a82e93 Mon Sep 17 00:00:00 2001 |
1376 |
From: Mike Frysinger <vapier@g.o> |
1377 |
Date: Sun, 3 Feb 2013 01:21:52 -0500 |
1378 |
Subject: [PATCH] gold: change default hash style to gnu |
1379 |
|
1380 |
Glibc first added .gnu.hash support to glibc-2.5 (released 29 Sep 2006), |
1381 |
and gold was first released after that. Let's default the gnu hash style |
1382 |
to the new "gnu" rather than the classic sysv. |
1383 |
|
1384 |
Signed-off-by: Mike Frysinger <vapier@g.o> |
1385 |
|
1386 |
2012-02-03 Mike Frysinger <vapier@g.o> |
1387 |
|
1388 |
* options.h (General_options): Change default to gnu for hash_style. |
1389 |
--- |
1390 |
gold/options.h | 2 +- |
1391 |
1 file changed, 1 insertion(+), 1 deletion(-) |
1392 |
|
1393 |
diff --git a/gold/options.h b/gold/options.h |
1394 |
index c138fa2..4698ebd 100644 |
1395 |
--- a/gold/options.h |
1396 |
+++ b/gold/options.h |
1397 |
@@ -809,7 +809,7 @@ class General_options |
1398 |
N_("Min fraction of empty buckets in dynamic hash"), |
1399 |
N_("FRACTION")); |
1400 |
|
1401 |
- DEFINE_enum(hash_style, options::TWO_DASHES, '\0', "sysv", |
1402 |
+ DEFINE_enum(hash_style, options::TWO_DASHES, '\0', "gnu", |
1403 |
N_("Dynamic hash style"), N_("[sysv,gnu,both]"), |
1404 |
{"sysv", "gnu", "both"}); |
1405 |
|
1406 |
-- |
1407 |
1.8.0.2 |
1408 |
|
1409 |
|
1410 |
|
1411 |
1.1 src/patchsets/binutils/2.24.51.0.3/78_all_use-relro.patch |
1412 |
|
1413 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/binutils/2.24.51.0.3/78_all_use-relro.patch?rev=1.1&view=markup |
1414 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/binutils/2.24.51.0.3/78_all_use-relro.patch?rev=1.1&content-type=text/plain |
1415 |
|
1416 |
Index: 78_all_use-relro.patch |
1417 |
=================================================================== |
1418 |
background: |
1419 |
http://www.airs.com/blog/archives/189 |
1420 |
|
1421 |
--- binutils/ld/ldmain.c |
1422 |
+++ binutils/ld/ldmain.c |
1423 |
@@ -293,2 +293,3 @@ main (int argc, char **argv) |
1424 |
link_info.combreloc = TRUE; |
1425 |
+ link_info.relro = TRUE; |
1426 |
link_info.strip_discarded = TRUE; |
1427 |
|
1428 |
|
1429 |
|
1430 |
1.1 src/patchsets/binutils/2.24.51.0.3/91_all_libiberty-pic.patch |
1431 |
|
1432 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/binutils/2.24.51.0.3/91_all_libiberty-pic.patch?rev=1.1&view=markup |
1433 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/binutils/2.24.51.0.3/91_all_libiberty-pic.patch?rev=1.1&content-type=text/plain |
1434 |
|
1435 |
Index: 91_all_libiberty-pic.patch |
1436 |
=================================================================== |
1437 |
this will install a pic version of libiberty.a by overwriting the non-pic |
1438 |
version of libiberty.a while compiling. we do this because there is no |
1439 |
shared version of libiberty for random apps to link against which means if |
1440 |
someone wants to use this in a shared library or PIE, they're out of luck. |
1441 |
it's arguable whether people should be able to use this in a shared lib, |
1442 |
but usage in PIE should be fine. you could argue that this penalizes the |
1443 |
non-PIE users, but the counter point is that people using this library in |
1444 |
general are fairly low, and we'd rather have things work for all of them. |
1445 |
|
1446 |
--- libiberty/Makefile.in |
1447 |
+++ libiberty/Makefile.in |
1448 |
@@ -224,6 +224,7 @@ $(TARGETLIB): $(REQUIRED_OFILES) $(EXTRA |
1449 |
$(AR) $(AR_FLAGS) $(TARGETLIB) \ |
1450 |
$(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS); \ |
1451 |
$(RANLIB) $(TARGETLIB); \ |
1452 |
+ cp $(TARGETLIB) ../ ; \ |
1453 |
cd ..; \ |
1454 |
else true; fi |
1455 |
|
1456 |
|
1457 |
|
1458 |
|
1459 |
1.1 src/patchsets/binutils/2.24.51.0.3/README.history |
1460 |
|
1461 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/binutils/2.24.51.0.3/README.history?rev=1.1&view=markup |
1462 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/binutils/2.24.51.0.3/README.history?rev=1.1&content-type=text/plain |
1463 |
|
1464 |
Index: README.history |
1465 |
=================================================================== |
1466 |
1.0 31 Jan 2014 |
1467 |
+ 12_all_sh-targets.patch |
1468 |
+ 30_all_binutils-2.22.52.0.2-flexible-tests.patch |
1469 |
+ 62_all_binutils-2.23.52.0.1-hardened-crtbegin.patch |
1470 |
+ 63_all_binutils-2.24.51.0.1-pt-pax-flags-20131130.patch |
1471 |
+ 66_all_binutils-2.22.52.0.1-warn-textrel.patch |
1472 |
+ 75_all_binutils-default-test-flags.patch |
1473 |
+ 76_all_use-new-ld-dtags.patch |
1474 |
+ 77_all_generate-gnu-hash.patch |
1475 |
+ 78_all_use-relro.patch |
1476 |
+ 91_all_libiberty-pic.patch |