[ARM] FDPIC: Add stack segment
[deliverable/binutils-gdb.git] / bfd / ChangeLog
1 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
2 Mickaël Guêné <mickael.guene@st.com>
3
4 * elf32-arm.c (DEFAULT_STACK_SIZE): New.
5 (elf32_arm_always_size_sections): Create stack segment.
6
7 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
8 Mickaël Guêné <mickael.guene@st.com>
9
10 * bfd-in2.h (BFD_RELOC_ARM_TLS_GD32_FDPIC)
11 (BFD_RELOC_ARM_TLS_LDM32_FDPIC, BFD_RELOC_ARM_TLS_IE32_FDPIC): New
12 relocations.
13 * elf32-arm.c (elf32_arm_howto_table_2): Add R_ARM_TLS_GD32_FDPIC,
14 R_ARM_TLS_LDM32_FDPIC, R_ARM_TLS_IE32_FDPIC relocations.
15 (elf32_arm_reloc_map): Add R_ARM_TLS_GD32_FDPIC,
16 R_ARM_TLS_LDM32_FDPIC, R_ARM_TLS_IE32_FDPIC.
17 (struct elf32_arm_link_hash_table): Update comment.
18 (elf32_arm_final_link_relocate): Handle TLS FDPIC relocations.
19 (IS_ARM_TLS_RELOC): Likewise.
20 (elf32_arm_check_relocs): Likewise.
21 (allocate_dynrelocs_for_symbol): Likewise.
22 (elf32_arm_size_dynamic_sections): Update comment.
23 * reloc.c: Add BFD_RELOC_ARM_TLS_GD32_FDPIC,
24 BFD_RELOC_ARM_TLS_LDM32_FDPIC, BFD_RELOC_ARM_TLS_IE32_FDPIC.
25
26 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
27 Mickaël Guêné <mickael.guene@st.com>
28
29 * elf32-arm.c (elf32_arm_fdpic_plt_entry): New.
30 (elf32_arm_create_dynamic_sections): Handle FDPIC.
31 (elf32_arm_allocate_plt_entry): Likewise.
32 (elf32_arm_populate_plt_entry): Likewise.
33 (elf32_arm_output_plt_map_1): Likewise.
34
35 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
36 Mickaël Guêné <mickael.guene@st.com>
37
38 * elf32-arm.c (struct fdpic_local): New.
39 (elf_arm_obj_tdata): Add local_fdpic_cnts field.
40 (elf32_arm_local_fdpic_cnts): New.
41 (struct fdpic_global): New.
42 (elf32_arm_link_hash_entry): Add fdpic_cnts field.
43 (elf32_arm_link_hash_table): Add srofixup field.
44 (arm_elf_add_rofixup): New.
45 (arm_elf_fill_funcdesc): New.
46 (elf32_arm_link_hash_newfunc): Handle fdpic_cnts.
47 (elf32_arm_allocate_local_sym_info): Likewise.
48 (create_got_section): Create .rofixup section.
49 (elf32_arm_copy_indirect_symbol): Handle fdpic_cnts.
50 (bfd_elf32_arm_set_target_params): Handle FDPIC.
51 (elf32_arm_final_link_relocate): Likewise.
52 (elf32_arm_check_relocs): Likewise.
53 (allocate_dynrelocs_for_symbol): Likewise.
54 (elf32_arm_size_dynamic_sections): Likewise.
55 (elf32_arm_finish_dynamic_sections): Likewise.
56 (elf32_arm_output_arch_local_syms): Likewise.
57 (elf32_arm_fdpic_omit_section_dynsym): New.
58
59 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
60 Mickaël Guêné <mickael.guene@st.com>
61
62 * bfd-in2.c (BFD_RELOC_ARM_GOTFUNCDESC)
63 (BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC)
64 (BFD_RELOC_ARM_FUNCDESC_VALUE): New.
65 * elf32-arm.c (elf32_arm_howto_table_2): Add R_ARM_GOTFUNCDESC,
66 R_ARM_GOTOFFFUNCDESC, R_ARM_FUNCDESC, R_ARM_FUNCDESC_VALUE.
67 (elf32_arm_howto_from_type): Take new members of
68 elf32_arm_howto_table_2 into account.
69 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_GOTFUNCDESC,
70 BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC,
71 BFD_RELOC_ARM_FUNCDESC_VALUE.
72 * reloc.c: Add BFD_RELOC_ARM_GOTFUNCDESC,
73 BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC,
74 BFD_RELOC_ARM_FUNCDESC_VALUE.
75
76 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
77 Mickaël Guêné <mickael.guene@st.com>
78
79 * elf32-arm.c (elf32_arm_print_private_bfd_data): Support
80 EF_ARM_PIC and ELFOSABI_ARM_FDPIC.
81 (elf32_arm_post_process_headers): Support ELFOSABI_ARM_FDPIC.
82 (ELF_OSABI): Define to ELFOSABI_ARM_FDPIC.
83
84 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
85 Mickaël Guêné <mickael.guene@st.com>
86
87 * config.bfd (arm*-*-linux-*): Add arm_elf32_fdpic_be_vec and
88 arm_elf32_fdpic_le_vec to targ_selvecs. Accept
89 arm*-*-uclinuxfdpiceabi.
90 * configure.ac: Add support for arm_elf32_fdpic_be_vec and
91 arm_elf32_fdpic_le_vec.
92 * configure: Regenerate.
93 * elf32-arm.c (struct elf32_arm_link_hash_table): Add fdpic_p.
94 (elf32_arm_link_hash_table_create): Initialize fdpic_p.
95 (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME, TARGET_BIG_SYM)
96 (TARGET_BIG_NAME, elf_match_priority): Define for FDPIC targets.
97 (elf32_arm_fdpic_link_hash_table_create): New.
98 * targets.c (_bfd_target_vector): Add arm_elf32_fdpic_be_vec and
99 arm_elf32_fdpic_le_vec.
100
101 2018-04-25 Alan Modra <amodra@gmail.com>
102
103 * elf-linux-core.h: Disable gcc-8 string truncation warning.
104 * elf.c (elfcore_write_prpsinfo): Likewise.
105
106 2018-04-25 Alan Modra <amodra@gmail.com>
107
108 * Makefile.am: Remove arm-aout and arm-coff support.
109 * config.bfd: Likewise.
110 * configure.ac: Likewise.
111 * targets.c: Likewise.
112 * aout-arm.c: Delete.
113 * armnetbsd.c: Delete.
114 * riscix.c: Delete.
115 * Makefile.in: Regenerate.
116 * configure: Regenerate.
117 * po/SRC-POTFILES.in: Regenerate.
118
119 2018-04-24 Nick Clifton <nickc@redhat.com>
120
121 PR 23113
122 * elf.c (ignore_section_sym): Check for the output_section pointer
123 being NULL before dereferencing it.
124
125 PR 23110
126 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Check for
127 a negative PE_DEBUG_DATA size before iterating over the debug data.
128
129 2018-04-23 Alan Modra <amodra@gmail.com>
130
131 * elf-linux-core.h: Revert last change.
132 * elf.c: Likewise.
133
134 2018-04-23 Nick Clifton <nickc@redhat.com>
135
136 PR 23056
137 * aoutx.h (aout_get_external_symbols): Allocate an extra byte at
138 the end of the string table, and zero it.
139
140 2018-04-23 Alan Modra <amodra@gmail.com>
141
142 * elf-linux-core.h (swap_linux_prpsinfo32_ugid32_out): Disable
143 gcc-8 string truncation warning.
144 (swap_linux_prpsinfo32_ugid16_out): Likewise.
145 (swap_linux_prpsinfo64_ugid32_out): Likewise.
146 (swap_linux_prpsinfo64_ugid16_out): Likewise.
147 * elf.c (elfcore_write_prpsinfo): Likewise.
148
149 2018-04-23 Nick Clifton <nickc@redhat.com>
150
151 PR 23056
152 * aoutx.h (aout_get_external_symbols): Allocate an extra byte at
153 the end of the string table, and zero it.
154
155 2018-04-20 Alan Modra <amodra@gmail.com>
156
157 PR 22978
158 * elf32-hppa.c (got_relocs_needed): Add extra param to special
159 case both dtprel and tprel relocs.
160 (allocate_dynrelocs): Adjust conditions for got relocs.
161 (elf32_hppa_relocate_section): Likewise for local sym got relocs.
162 Emit dynamic relocs on TLS GOT entries for shared libraries,
163 not when pic. Omit dynamic reloc on dtprel entry when local,
164 and on tprel entry when local and executable.
165
166 2018-04-19 Alan Modra <amodra@gmail.com>
167
168 PR 22537
169 * elf32-hppa.c (elf32_hppa_size_stubs): Init "destination" to -1.
170 (hppa_type_of_stub): Don't return a long branch stub for
171 symbols other than those defined statically.
172
173 2018-04-19 Alan Modra <amodra@gmail.com>
174
175 * Makefile.am: Revert 2018-04-18 coff-mips changes.
176 * config.bfd: Add back mips_ecoff_le_vec and mips_ecoff_be_vec
177 to selvecs for mips targets change 2018-04-18.
178 * configure.ac: Reinstate mips_ecoff_le_vec, mips_ecoff_be_vec
179 and mips_ecoff_bele_vec.
180 * targets.c: Likewise.
181 * coff-mips.c: Resurrect.
182 * Makefile.in: Regenerate.
183 * configure: Regenerate.
184 * po/SRC-POTFILES.in: Regenerate.
185
186 2018-04-18 Alan Modra <amodra@gmail.com>
187
188 * Makefile.am: Remove mips aout and coff support.
189 * config.bfd: Likewise.
190 * configure.ac: Likewise.
191 * targets.c: Likewise.
192 * coff-mips.c: Delete
193 * mipsbsd.c: Delete
194 * pe-mips.c: Delete
195 * pei-mips.c: Delete
196 * Makefile.in: Regenerate.
197 * configure: Regenerate.
198 * po/SRC-POTFILES.in: Regenerate.
199
200 2018-04-17 H.J. Lu <hongjiu.lu@intel.com>
201
202 * elf32-i386.c (elf32_bed): Define before including
203 "elf32-target.h".
204 * elf64-x86-64.c (elf64_bed): Define before including
205 "elf64-target.h".
206 (elf32_bed): Define before including "elf32-target.h".
207
208 2018-04-17 H.J. Lu <hongjiu.lu@intel.com>
209
210 PR ld/23055
211 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Use a
212 normal input file with compatible relocation.
213
214 2018-04-18 Alan Modra <amodra@gmail.com>
215
216 * Makefile.am: Remove support for assorted i386 aout and coff targets.
217 * config.bfd: Likewise.
218 * configure.ac: Likewise.
219 * doc/bfdint.texi: Likewise.
220 * targets.c: Likewise.
221 * freebsd.h: Delete.
222 * i386dynix.c: Delete.
223 * i386freebsd.c: Delete.
224 * i386linux.c: Delete.
225 * i386mach3.c: Delete.
226 * i386netbsd.c: Delete.
227 * i386os9k.c: Delete.
228 * Makefile.in: Regenerate.
229 * configure: Regenerate.
230 * po/SRC-POTFILES.in: Regenerate.
231
232 2018-04-17 Andrew Sadek <andrew.sadek.se@gmail.com>
233
234 Microblaze Target: PIC data text relative
235
236 * bfd/reloc.c (2 new BFD relocations):
237 BFD_RELOC_MICROBLAZE_64_TEXTPCREL &
238 BFD_RELOC_MICROBLAZE_64_TEXTPCREL
239 * bfd/bfd-in2.h: Regenerate
240 * bfd/libbfd.h: Regenerate
241 * bfd/elf32-microblaze.c (Handle new relocs): define 'HOWTO' of 3
242 new relocs and handle them in both relocate and relax functions.
243 (microblaze_elf_reloc_type_lookup): add mapping between for new
244 bfd relocs.
245 (microblaze_elf_relocate_section): Handle new relocs in case of
246 elf relocation.
247 (microblaze_elf_relax_section): Handle new relocs for elf relaxation.
248
249 2018-04-17 Nick Clifton <nickc@redhat.com>
250
251 PR 23055
252 * aoutx.h (find_nearest_line): Check that the symbol name exists
253 and is long enough, before attempting to see if it is for a .o
254 file.
255 * hash.c (bfd_hash_hash): Add an assertion that the string is not
256 NULL.
257 * linker.c (bfd_link_hash_lookup): Fail if the table or string are
258 NULL.
259 (_bfd_generic_link_add_archive_symbols): Fail if an archive entry
260 has no name.
261
262 PR 23065
263 * dwarf2.c (concat_filename): Check for a NULL table pointer.
264
265 2018-04-16 Nick Clifton <nickc@redhat.com>
266
267 PR 23061
268 * coffgen.c (coff_pointerize_aux): Check for an out of range
269 fixup.
270
271 2018-04-16 Alan Modra <amodra@gmail.com>
272
273 * Makefile.am: Remove arm-epoc-pe support.
274 * coff-arm.c: Likewise.
275 * config.bfd: Likewise.
276 * configure.ac: Likewise.
277 * targets.c: Likewise.
278 * epoc-pe-arm.c: Delete.
279 * epoc-pei-arm.c: Delete.
280 * Makefile.in: Regenerate.
281 * configure: Regenerate.
282 * po/SRC-POTFILES.in: Regenerate.
283
284 2018-04-16 Alan Modra <amodra@gmail.com>
285
286 * Makefile.am: Remove sparc-aout and sparc-coff support.
287 * config.bfd: Likewise.
288 * configure.ac: Likewise.
289 * targets.c: Likewise.
290 * aout-sparcle.c: Delete.
291 * aoutf1.h: Delete.
292 * cf-sparclynx.c: Delete.
293 * coff-sparc.c: Delete.
294 * demo64.c: Delete.
295 * sparclinux.c: Delete.
296 * sparclynx.c: Delete.
297 * sparcnetbsd.c: Delete.
298 * sunos.c: Delete.
299 * Makefile.in: Regenerate.
300 * configure: Regenerate.
301 * po/SRC-POTFILES.in: Regenerate.
302
303 2018-04-16 Alan Modra <amodra@gmail.com>
304
305 * Makefile.am: Remove m68k-aout and m68k-coff support.
306 * aoutf1.h: Likewise.
307 * aoutx.h: Likewise.
308 * archive.c: Likewise.
309 * bfd-in.h: Likewise.
310 * bfd.c: Likewise.
311 * coffcode.h: Likewise.
312 * coffswap.h: Likewise.
313 * config.bfd: Likewise.
314 * configure.ac: Likewise.
315 * configure.host: Likewise.
316 * doc/bfd.texinfo: Likewise.
317 * doc/bfdint.texi: Likewise.
318 * freebsd.h: Likewise.
319 * gen-aout.c: Likewise.
320 * hpux-core.c: Likewise.
321 * libaout.h: Likewise.
322 * libbfd-in.h: Likewise.
323 * pdp11.c: Likewise.
324 * peicode.h: Likewise.
325 * riscix.c: Likewise.
326 * targets.c: Likewise.
327 * aout0.c: Delete.
328 * coff-apollo.c: Delete.
329 * coff-aux.c: Delete.
330 * coff-m68k.c: Delete.
331 * coff-svm68k.c: Delete.
332 * coff-u68k.c: Delete.
333 * hosts/delta68.h: Delete.
334 * hosts/hp300bsd.h: Delete.
335 * hosts/m68kaux.h: Delete.
336 * hosts/news.h: Delete.
337 * hp300bsd.c: Delete.
338 * hp300hpux.c: Delete.
339 * liboasys.h: Delete.
340 * m68k4knetbsd.c: Delete.
341 * m68klinux.c: Delete.
342 * m68knetbsd.c: Delete.
343 * oasys.c: Delete.
344 * versados.c: Delete.
345 * Makefile.in: Regenerate.
346 * bfd-in2.h: Regenerate.
347 * configure: Regenerate.
348 * libbfd.h: Regenerate.
349 * po/SRC-POTFILES.in: Regenerate.
350
351 2018-04-16 Alan Modra <amodra@gmail.com>
352
353 * Makefile.am: Remove sh5 and sh64 support.
354 * archures.c: Likewise.
355 * config.bfd: Likewise.
356 * configure.ac: Likewise.
357 * cpu-sh.c: Likewise.
358 * elf32-sh-relocs.h: Likewise.
359 * elf32-sh.c: Likewise.
360 * targets.c: Likewise.
361 * elf32-sh64-com.c: Delete.
362 * elf32-sh64.c: Delete.
363 * elf32-sh64.h: Delete.
364 * elf64-sh64.c: Delete.
365 * Makefile.in: Regenerate.
366 * bfd-in2.h: Regenerate.
367 * configure: Regenerate.
368 * po/SRC-POTFILES.in: Regenerate.
369
370 2018-04-16 Alan Modra <amodra@gmail.com>
371
372 * Makefile.am: Remove sh-symbianelf support.
373 * config.bfd: Likewise.
374 * configure.ac: Likewise.
375 * targets.c: Likewise.
376 * elf32-sh-symbian.c: Delete.
377 * Makefile.in: Regenerate.
378 * configure: Regenerate.
379 * po/SRC-POTFILES.in: Regenerate.
380
381 2018-04-16 Alan Modra <amodra@gmail.com>
382
383 * Makefile.am: Remove vax-bsd and vax-ultrix support.
384 * config.bfd: Likewise.
385 * configure.ac: Likewise.
386 * targets.c: Likewise.
387 * vaxbsd.c: Delete.
388 * Makefile.in: Regenerate.
389 * configure: Regenerate.
390 * po/SRC-POTFILES.in: Regenerate.
391
392 2018-04-16 Alan Modra <amodra@gmail.com>
393
394 * Makefile.am: Remove w65 support.
395 * archures.c: Likewise.
396 * coffcode.h: Likewise.
397 * config.bfd: Likewise.
398 * configure.ac: Likewise.
399 * targets.c: Likewise.
400 * coff-w65.c: Delete.
401 * cpu-w65.c: Delete.
402 * Makefile.in: Regenerate.
403 * bfd-in2.h: Regenerate.
404 * configure: Regenerate.
405 * po/SRC-POTFILES.in: Regenerate.
406
407 2018-04-16 Alan Modra <amodra@gmail.com>
408
409 * Makefile.am: Remove we32k support.
410 * archures.c: Likewise.
411 * coffcode.h: Likewise.
412 * config.bfd: Likewise.
413 * configure.ac: Likewise.
414 * targets.c: Likewise.
415 * coff-we32k.c: Delete.
416 * cpu-we32k.c: Delete.
417 * Makefile.in: Regenerate.
418 * bfd-in2.h: Regenerate.
419 * configure: Regenerate.
420 * po/SRC-POTFILES.in: Regenerate.
421
422 2018-04-16 Alan Modra <amodra@gmail.com>
423
424 * Makefile.am: Remove m88k support.
425 * aoutx.h: Likewise.
426 * archures.c: Likewise.
427 * coffcode.h: Likewise.
428 * coffswap.h: Likewise.
429 * config.bfd: Likewise.
430 * configure.ac: Likewise.
431 * cpu-ns32k.c: Likewise.
432 * elf32-nds32.c: Likewise.
433 * mach-o.c: Likewise.
434 * netbsd-core.c: Likewise.
435 * reloc.c: Likewise.
436 * targets.c: Likewise.
437 * coff-m88k.c: Delete.
438 * cpu-m88k.c: Delete.
439 * elf32-m88k.c: Delete.
440 * hosts/m88kmach3.h: Delete.
441 * m88kmach3.c: Delete.
442 * m88kopenbsd.c: Delete.
443 * Makefile.in: Regenerate.
444 * bfd-in2.h: Regenerate.
445 * configure: Regenerate.
446 * po/SRC-POTFILES.in: Regenerate.
447
448 2018-04-16 Alan Modra <amodra@gmail.com>
449
450 * Makefile.am: Remove i370 support.
451 * archures.c: Likewise.
452 * config.bfd: Likewise.
453 * configure.ac: Likewise.
454 * targets.c: Likewise.
455 * cpu-i370.c: Delete.
456 * elf32-i370.c: Delete.
457 * Makefile.in: Regenerate.
458 * bfd-in2.h: Regenerate.
459 * configure: Regenerate.
460 * po/SRC-POTFILES.in: Regenerate.
461
462 2018-04-16 Alan Modra <amodra@gmail.com>
463
464 * Makefile.am: Remove h8500 support.
465 * archures.c: Likewise.
466 * coffcode.h: Likewise.
467 * config.bfd: Likewise.
468 * configure.ac: Likewise.
469 * targets.c: Likewise.
470 * coff-h8500.c: Delete.
471 * cpu-h8500.c: Delete.
472 * Makefile.in: Regenerate.
473 * bfd-in2.h: Regenerate.
474 * configure: Regenerate.
475 * po/SRC-POTFILES.in: Regenerate.
476
477 2018-04-16 Alan Modra <amodra@gmail.com>
478
479 * Makefile.am: Remove h8300-coff support.
480 * coffcode.h: Likewise.
481 * config.bfd: Likewise.
482 * configure.ac: Likewise.
483 * reloc16.c: Likewise.
484 * targets.c: Likewise.
485 * coff-h8300.c: Delete.
486 * Makefile.in: Regenerate.
487 * configure: Regenerate.
488 * po/SRC-POTFILES.in: Regenerate.
489
490 2018-04-16 Alan Modra <amodra@gmail.com>
491
492 * Makefile.am: Remove IEEE 695 support.
493 * archures.c: Likewise.
494 * bfd.c: Likewise.
495 * config.bfd: Likewise.
496 * configure.ac: Likewise.
497 * doc/bfd.texinfo: Likewise.
498 * doc/bfdint.texi: Likewise.
499 * doc/bfdsumm.texi: Likewise.
500 * section.c: Likewise.
501 * targets.c: Likewise.
502 * ieee.c: Delete.
503 * libieee.h: Delete.
504 * Makefile.in: Regenerate.
505 * bfd-in2.h: Regenerate.
506 * configure: Regenerate.
507 * po/SRC-POTFILES.in: Regenerate.
508
509 2018-04-16 Alan Modra <amodra@gmail.com>
510
511 * config.bfd: Remove tandem support.
512
513 2018-04-16 Alan Modra <amodra@gmail.com>
514
515 * Makefile.am: Remove newsos3 support.
516 * aoutx.h: Likewise.
517 * config.bfd: Likewise.
518 * configure.ac: Likewise.
519 * targets.c: Likewise.
520 * newsos3.c: Delete.
521 * Makefile.in: Regenerate.
522 * configure: Regenerate.
523 * po/SRC-POTFILES.in: Regenerate.
524
525 2018-04-16 Alan Modra <amodra@gmail.com>
526
527 * Makefile.am: Remove netware support.
528 * bfd-in.h: Likewise.
529 * bfd.c: Likewise.
530 * config.bfd: Likewise.
531 * configure.ac: Likewise.
532 * doc/bfdint.texi: Likewise.
533 * ecoff.c: Likewise.
534 * targets.c: Likewise.
535 * libnlm.h: Delete.
536 * nlm-target.h: Delete.
537 * nlm.c: Delete.
538 * nlm32-alpha.c: Delete.
539 * nlm32-i386.c: Delete.
540 * nlm32-ppc.c: Delete.
541 * nlm32-sparc.c: Delete.
542 * nlm32.c: Delete.
543 * nlm64.c: Delete.
544 * nlmcode.h: Delete.
545 * nlmswap.h: Delete.
546 * Makefile.in: Regenerate.
547 * bfd-in2.h: Regenerate.
548 * configure: Regenerate.
549 * po/SRC-POTFILES.in: Regenerate.
550
551 2018-04-16 Alan Modra <amodra@gmail.com>
552
553 * archures.c: Remove tahoe support.
554 * config.bfd: Likewise.
555 * configure.ac: Likewise.
556 * hosts/tahoe.h: Delete.
557 * bfd-in2.h: Regenerate.
558 * configure: Regenerate.
559
560 2018-04-14 Alan Modra <amodra@gmail.com>
561
562 * elf-bfd.h (struct elf_backend_data): Add relropagesize.
563 * elfxx-target.h (ELF_RELROPAGESIZE): Provide default and
564 sanity test.
565 (elfNN_bed): Init relropagesize.
566 * bfd.c (bfd_emul_get_commonpagesize): Add boolean param to
567 select relropagesize.
568 * elf32-ppc.c (ELF_COMMONPAGESIZE): Define as 0x1000.
569 (ELF_RELROPAGESIZE): Define as ELF_MAXPAGESIZE.
570 (ELF_MINPAGESIZE): Don't define.
571 * elf64-ppc.c (ELF_COMMONPAGESIZE): Define as 0x1000.
572 (ELF_RELROPAGESIZE): Define as ELF_MAXPAGESIZE.
573 * bfd-in2.h: Regenerate.
574
575 2018-04-14 Alan Modra <amodra@gmail.com>
576
577 * elf32-ppc.c (ELF_MAXPAGESIZE, ELF_COMMONPAGESIZE): Don't depend
578 on __QNXTARGET__ define.
579
580 2018-04-14 Alan Modra <amodra@gmail.com>
581
582 * config.bfd: Add powerpc-*-lynxos* and powerpc-*-windiss*
583 to obsolete list.
584
585 2018-04-11 Alan Modra <amodra@gmail.com>
586
587 * aout-adobe.c: Delete.
588 * bout.c: Delete.
589 * coff-i860.c: Delete.
590 * coff-i960.c: Delete.
591 * cpu-i860.c: Delete.
592 * cpu-i960.c: Delete.
593 * elf32-i860.c: Delete.
594 * elf32-i960.c: Delete.
595 * hosts/i860mach3.h: Delete.
596 * Makefile.am: Remove i860, i960, bout, and adobe support.
597 * archures.c: Remove i860 and i960 support.
598 * coffcode.h: Likewise.
599 * reloc.c: Likewise.
600 * aoutx.h: Comment updates.
601 * archive.c: Remove BOUT and i960 support.
602 * bfd.c: Remove BOUT support.
603 * coffswap.h: Remove i960 support.
604 * config.bfd: Remove i860, i960 and adobe targets.
605 * configure.ac: Remove adode, bout, i860, i960, icoff targets.
606 * targets.c: Likewise.
607 * ieee.c: Remove i960 support.
608 * mach-o.c: Remove i860 support.
609 * Makefile.in: Regenerate.
610 * bfd-in2.h: Regenerate.
611 * configure: Regenerate.
612 * libbfd.h: Regenerate.
613 * po/SRC-POTFILES.in: Regenerate.
614
615 2018-04-09 Maciej W. Rozycki <macro@mips.com>
616
617 * elf64-mips.c (mips_elf64_write_rel): Handle a NULL BFD pointer
618 in the BFD symbol referred by the relocation.
619 (mips_elf64_write_rela): Likewise.
620
621 2018-04-09 Maciej W. Rozycki <macro@mips.com>
622
623 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Issue an
624 error for out-of-range `r_sym' values.
625
626 2018-04-09 Alan Modra <amodra@gmail.com>
627
628 * elf64-ppc.c (struct _ppc64_elf_section_data): Add has_pltcall field.
629 (struct ppc_link_hash_table): Add can_convert_all_inline_plt.
630 (ppc64_elf_check_relocs): Set has_pltcall.
631 (ppc64_elf_adjust_dynamic_symbol): Discard some PLT entries.
632 (ppc64_elf_inline_plt): New function.
633 (ppc64_elf_size_dynamic_sections): Discard some PLT entries for locals.
634 * elf64-ppc.h (ppc64_elf_inline_plt): Declare.
635 * elf32-ppc.c (has_pltcall): Define.
636 (struct ppc_elf_link_hash_table): Add can_convert_all_inline_plt.
637 (ppc_elf_check_relocs): Set has_pltcall.
638 (ppc_elf_inline_plt): New function.
639 (ppc_elf_adjust_dynamic_symbol): Discard some PLT entries.
640 (ppc_elf_size_dynamic_sections): Likewise.
641 * elf32-ppc.h (ppc_elf_inline_plt): Declare.
642
643 2018-04-09 Alan Modra <amodra@gmail.com>
644
645 * elf32-ppc.c (ppc_elf_howto_raw): Add PLTSEQ and PLTCALL howtos.
646 (is_plt_seq_reloc): New function.
647 (ppc_elf_check_relocs): Handle PLTSEQ and PLTCALL relocs.
648 (ppc_elf_tls_optimize): Handle inline plt call sequence.
649 (ppc_elf_relax_section): Handle PLTCALL reloc.
650 (ppc_elf_relocate_section): Nop out inline plt call sequence when
651 resolving locally.
652 * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_PLTSEQ and
653 R_PPC64_PLTCALL entries. Comment R_PPC64_TOCSAVE.
654 (has_tls_get_addr_call): Correct comment.
655 (is_branch_reloc): Add PLTCALL.
656 (is_plt_seq_reloc): New function.
657 (ppc64_elf_check_relocs): Handle PLT16_LO_DS reloc. Set
658 has_tls_reloc for R_PPC64_TLSGD and R_PPC64_TLSLD. Create plt
659 entry for R_PPC64_PLTCALL.
660 (ppc64_elf_tls_optimize): Handle inline plt call sequence.
661 (ppc_type_of_stub): Handle PLTCALL reloc.
662 (toc_adjusting_stub_needed): Likewise.
663 (ppc64_elf_relocate_section): Set "can_plt_call" for PLTCALL
664 reloc insn. Nop out inline plt call sequence when resolving
665 locally. Handle __tls_get_addr inline plt call optimization.
666
667 2018-04-09 Alan Modra <amodra@gmail.com>
668
669 * elf64-ppc.c (LOCAL_PLT_ENTRY_SIZE): Define.
670 (struct ppc_stub_hash_entry): Add symtype field.
671 (PLT_KEEP): Define.
672 (struct ppc_link_hash_table): Add pltlocal and relpltlocal.
673 (create_linkage_sections): Create pltlocal and relpltlocal.
674 (ppc64_elf_check_relocs): Allow PLT relocs on local symbols.
675 Set PLT_KEEP.
676 (ppc64_elf_adjust_dynamic_symbol): Keep PLT entries for inline calls.
677 (allocate_dynrelocs): Allocate pltlocal and relpltlocal.
678 (ppc64_elf_size_dynamic_sections): Size pltlocal and relpltlocal.
679 Keep PLT entries for inline calls against locals.
680 (ppc_build_one_stub): Use pltlocal as appropriate.
681 (ppc_size_one_stub): Likewise.
682 (ppc64_elf_size_stubs): Set symtype.
683 (build_global_entry_stubs_and_plt): Init pltlocal and write
684 relpltlocal for globals.
685 (write_plt_relocs_for_local_syms): Likewise for local syms.
686 (ppc64_elf_relocate_section): Support PLT for local syms.
687 * elf32-ppc.c (PLT_KEEP): Define.
688 (struct ppc_elf_link_hash_table): Add pltlocal and relpltlocal.
689 (ppc_elf_create_glink): Create pltlocal and relpltlocal.
690 (ppc_elf_check_relocs): Allow PLT relocs on local symbols.
691 Set PLT_KEEP. Adjust update_local_sym_info call.
692 (ppc_elf_adjust_dynamic_symbol): Keep PLT entries for inline calls.
693 (allocate_dynrelocs): Allocate pltlocal and relpltlocal.
694 (ppc_elf_size_dynamic_sections): Size pltlocal and relpltlocal.
695 (ppc_elf_relocate_section): Support PLT16 relocs for local syms.
696 (write_global_sym_plt): Init pltlocal and write relpltlocal.
697 (ppc_finish_symbols): Likewise for locals.
698
699 2018-04-09 Alan Modra <amodra@gmail.com>
700
701 * elf64-ppc.c (ppc_build_one_stub): Move output of PLT relocs
702 for local symbols to..
703 (write_plt_relocs_for_local_syms): ..here. New function.
704 (ppc64_elf_finish_dynamic_symbol): Move output of PLT relocs for
705 global symbols to..
706 (build_global_entry_stubs_and_plt): ..here. Rename from
707 build_global_entry_stubs.
708 (ppc64_elf_build_stubs): Always call build_global_entry_stubs_and_plt.
709 Call write_plt_relocs_for_local_syms.
710 * elf32-ppc.c (get_sym_h): New function.
711 (ppc_elf_relax_section): Use get_sym_h.
712 (ppc_elf_relocate_section): Move output of PLT relocs and glink
713 stubs for local symbols to..
714 (ppc_finish_symbols): ..here. New function.
715 (ppc_elf_finish_dynamic_symbol): Move output of PLT relocs for
716 global syms to..
717 (write_global_sym_plt): ..here. New function.
718 * elf32-ppc.h (ppc_elf_modify_segment_map): Delete attribute.
719 (ppc_finish_symbols): Declare.
720
721 2018-04-09 Alan Modra <amodra@gmail.com>
722
723 * elf32-ppc.c (ppc_elf_check_relocs): Handle PLT16 relocs.
724 (ppc_elf_relocate_section): Likewise.
725 * elf64-ppc.c (ppc64_elf_check_relocs): Handle PLT16_LO_DS.
726 (ppc64_elf_relocate_section): Likewise. Correct PLT16
727 resolution to plt entry relative to toc pointer.
728
729 2018-04-09 Alan Modra <amodra@gmail.com>
730
731 * elf64-ppc.c (TLS_TLS, TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL,
732 TLS_TPRELGD, TLS_EXPLICIT): Renumber. Test TLS_TLS throughout
733 file when other TLS flags are tested in a mask.
734 (TLS_MARK, NON_GOT): Define.
735 (PLT_IFUNC): Redefine, and test TLS_TLS throughout file as well.
736 (update_local_sym_info): Don't create got entry when NON_GOT.
737 (ppc64_elf_check_relocs): Pass NON_GOT with PLT_IFUNC.
738 Set TLS_MARK.
739 (get_tls_mask): Do toc lookup if tls_mask is just TLS_MARK.
740 (ppc64_elf_relocate_section): Likewise.
741 (ppc64_elf_tls_optimize): Don't attempt to optimize indirect
742 __tls_get_addr calls lacking a marker reloc.
743 * elf32-ppc.c (TLS_TLS, TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL,
744 TLS_TPRELGD): Renumber. Update comment.
745 (TLS_MARK, NON_GOT): Define.
746 (PLT_IFUNC): Redefine, and test TLS_TLS throughout file as well.
747 (update_local_sym_info): Don't create got entry when NON_GOT.
748 (ppc_elf_check_relocs): Pass NON_GOT with PLT_IFUNC.
749 Set TLS_MARK.
750 (ppc_elf_tls_optimize): Don't attempt to optimize indirect
751 __tls_get_addr calls lacking a marker reloc.
752
753 2018-04-06 H.J. Lu <hongjiu.lu@intel.com>
754
755 * elf64-x86-64.c (elf_x86_64_info_to_howto): Don't mask out
756 R_X86_64_converted_reloc_bit.
757
758 2018-04-05 H.J. Lu <hongjiu.lu@intel.com>
759
760 PR gas/22318
761 * configure: Regenerated.
762
763 2018-04-05 Alan Modra <amodra@gmail.com>
764
765 * elf-hppa.h (elf_hppa_info_to_howto): Init howto to NULL.
766 (elf_hppa_info_to_howto_rel): Likewise.
767
768 2018-04-04 Maciej W. Rozycki <macro@mips.com>
769
770 * elf-hppa.h (elf_hppa_info_to_howto): Also return
771 unsuccessfully for unimplemented relocations.
772 (elf_hppa_info_to_howto_rel): Likewise.
773
774 2018-04-04 Maciej W. Rozycki <macro@mips.com>
775
776 * elf32-i860.c (lookup_howto): Add `abfd' parameter. Set the
777 `bfd_error_bad_value' error and call `_bfd_error_handler' on a
778 howto lookup failure.
779 (elf32_i860_reloc_type_lookup): Adjust `lookup_howto' call
780 accordingly.
781 (elf32_i860_info_to_howto_rela): Likewise.
782 (elf32_i860_relocate_splitn): Likewise.
783 (elf32_i860_relocate_pc16): Likewise.
784 (elf32_i860_relocate_pc26): Likewise.
785 (elf32_i860_relocate_section): Likewise.
786
787 2018-04-04 Maciej W. Rozycki <macro@mips.com>
788
789 * elf32-visium.c (visium_info_to_howto_rela): Correct the range
790 check for `visium_elf_howto_table' table access.
791
792 2018-04-04 Maciej W. Rozycki <macro@mips.com>
793
794 * elf32-iq2000.c (iq2000_info_to_howto_rela): Correct the range
795 check for `iq2000_elf_howto_table' table access.
796
797 2018-04-04 Maciej W. Rozycki <macro@mips.com>
798
799 * elf32-frv.c (frv_info_to_howto_rela): Correct the range check
800 for `elf32_frv_howto_table' table access.
801
802 2018-04-04 Maciej W. Rozycki <macro@mips.com>
803
804 * elf32-mips.c (mips_elf32_rtype_to_howto): Also return
805 unsuccessfully for placeholder howtos.
806 * elf64-mips.c (mips_elf64_rtype_to_howto): Likewise.
807 * elfn32-mips.c (mips_elf_n32_rtype_to_howto): Likewise.
808
809 2018-03-29 Maciej W. Rozycki <macro@mips.com>
810
811 * elf32-mips.c (mips_info_to_howto_rel): Remove the calls to
812 `_bfd_error_handler' and to set the `bfd_error_bad_value' error.
813
814 2018-03-28 Maciej W. Rozycki <macro@mips.com>
815
816 * elf-hppa.h (elf_hppa_info_to_howto_rel): Remove
817 ATTRIBUTE_UNUSED from `abfd'.
818
819 2018-03-28 Maciej W. Rozycki <macro@mips.com>
820
821 * elf-hppa.h (elf_hppa_info_to_howto_rel): Correct
822 `_bfd_error_handler' call formatting.
823
824 2018-03-28 Maciej W. Rozycki <macro@mips.com>
825
826 * elf32-mips.c (mips_info_to_howto_rel): Call
827 `mips_elf32_rtype_to_howto' directly rather than via
828 `->elf_backend_mips_rtype_to_howto'.
829
830 2018-03-28 Renlin Li <renlin.li@arm.com>
831
832 PR ld/22970
833 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Add cases for
834 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12,
835 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
836 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12,
837 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
838 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12,
839 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
840 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12,
841 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
842 (elfNN_aarch64_final_link_relocate): Support new relocations.
843 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Support new
844 relocations.
845 (_bfd_aarch64_elf_resolve_relocation): Support new relocations.
846
847 2018-03-28 Renlin Li <renlin.li@arm.com>
848
849 PR ld/22970
850 * reloc.c: Add BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12
851 BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12_NC,
852 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12,
853 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
854 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12,
855 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
856 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12,
857 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
858 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12,
859 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
860 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add table entry for
861 TLSLE_LDST16_TPREL_LO12,
862 TLSLE_LDST16_TPREL_LO12_NC,
863 TLSLE_LDST32_TPREL_LO12,
864 TLSLE_LDST32_TPREL_LO12_NC,
865 TLSLE_LDST64_TPREL_LO12,
866 TLSLE_LDST64_TPREL_LO12_NC,
867 TLSLE_LDST8_TPREL_LO12,
868 TLSLE_LDST8_TPREL_LO12_NC.
869 * bfd-in2.h: Regenerated.
870 * libbfd.h: Regenerated.
871
872 2018-03-28 Eric Botcazou <ebotcazou@adacore.com>
873
874 PR ld/22972
875 * elfxx-sparc.c (struct _bfd_sparc_elf_link_hash_entry): Add new flag
876 has_old_style_got_reloc.
877 (_bfd_sparc_elf_check_relocs) <GOT relocations>: Set it for old-style
878 relocations. Fix a couple of long lines.
879 (_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: Do not generate
880 a R_SPARC_NONE for the GOT slot if the symbol is also subject to old-style
881 GOT relocations.
882
883 2018-03-25 H.J. Lu <hongjiu.lu@intel.com>
884
885 PR ld/23000
886 * elf64-x86-64.c (elf_x86_64_finish_dynamic_sections): Add
887 ENDBR64 to the TLSDESC PLT entry.
888
889 2018-03-21 Alan Modra <amodra@gmail.com>
890
891 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Trim uninteresting
892 symbols. Use size_t counts. Delete redundant opd test.
893
894 2018-03-21 Alan Modra <amodra@gmail.com>
895
896 * elf32-ppc.c (ppc_elf_tls_optimize): Delete locsyms.
897
898 2018-03-21 Alan Modra <amodra@gmail.com>
899
900 * elf32-ppc.c (struct ppc_elf_link_hash_entry): Make tls_mask
901 field unsigned.
902 (update_local_sym_info): Likewise for local_got_tls_masks.
903 (ppc_elf_tls_optimize): Likewise for lgot_masks.
904
905 2018-03-21 Alan Modra <amodra@gmail.com>
906
907 * elf64-ppc.c (ppc_size_one_stub): Fix comment typo.
908 (ppc64_elf_layout_multitoc): Allocate relocs for tprel as we
909 do in size_dynamic_sections.
910
911 2018-03-21 Alan Modra <amodra@gmail.com>
912
913 * elf64-ppc.c (ppc64_elf_relocate_section): Don't access rel[1]
914 without first checking array bounds.
915 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
916
917 2018-03-20 H.J. Lu <hongjiu.lu@intel.com>
918
919 PR ld/22983
920 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Set
921 non_ir_ref_dynamic if a symbol is made dynamic by --dynamic-list.
922
923 2018-03-19 Nick Clifton <nickc@redhat.com>
924
925 * po/es.po: Updated Spanish translation.
926
927 2018-03-15 Max Filippov <jcmvbkbc@gmail.com>
928
929 * elf32-xtensa.c (xlate_map_entry): Change types of address
930 fields from 'unsigned' to 'bfd_vma'.
931 (xlate_offset_with_removed_text): Use struct xlate_map_entry as
932 the key argument to bsearch. Allow offsets past the end of a
933 section, use the last map entry for translation of such offsets.
934
935 2018-03-15 Kuan-Lin Chen <kuanlinchentw@gmail.com>
936
937 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Removed.
938 Not support the target feature.
939 (nds32_elf_ex9_itb_base): Likewise.
940 (nds32_elf_ex9_import_table): Likewise.
941 (nds32_elf_ex9_finish): Likewise.
942 (nds32_elf_ex9_reloc_jmp): Likewise.
943 (nds32_elf_get_insn_with_reg): Likewise.
944 (nds32_get_local_syms): Likewise.
945 (nds32_elf_ex9_replace_instruction): Likewise.
946 (nds32_elf_ifc_calc): Likewise.
947 (nds32_elf_ifc_finish): Likewise.
948 (nds32_elf_ifc_replace): Likewise.
949 (nds32_elf_ifc_reloc): Likewise.
950
951 2018-03-14 Alan Modra <amodra@gmail.com>
952
953 * elf64-ppc.c (sfpr_define): Adjust for stub_sec size having
954 sfpr size added before defining alias symbols.
955 (ppc64_elf_build_stubs): Add stub section padding before
956 copying sfpr contents and defining save/restore alias symbols.
957
958 2018-03-14 H.J. Lu <hongjiu.lu@intel.com>
959
960 PR ld/20882
961 * elflink.c (elf_gc_mark_debug_section): Also check the local
962 debug definition section.
963
964 2018-03-13 Nick Clifton <nickc@redhat.com>
965
966 PR 22113
967 * pei-x86_64.c (pex64_get_unwind_info): Change to a boolean
968 function. Add an end address parameter. Check access of the data
969 pointer to make sure that they do not extend beyond the end
970 address. Return FALSE if any check fails. Add the end address
971 pointer to the ui structure.
972 (pex64_xdata_print_uwd_codes): Check accesses of the raw unwind
973 codes to make sure that they do not extend beyond the end address
974 pointer. Print an error message and return immediately if any
975 check fails.
976
977 2018-03-09 Nick Clifton <nickc@redhat.com>
978
979 * elf64-s390.c (elf_s390_relocate_section): Move check for
980 relocations against non-allocated sections to before the code that
981 handles ifunc relocations.
982 * elf32-s390.c (elf_s390_relocate_section): Likewise.
983 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Treat
984 relocs against IFUNC symbols in non-allocated sections as relocs
985 against FUNC symbols.
986 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
987
988 2018-03-08 H.J. Lu <hongjiu.lu@intel.com>
989
990 PR ld/22929
991 * elf32-i386.c (elf_i386_relocate_section): Treat relocation
992 against IFUNC symbol in SHT_NOTE section without SHF_ALLOC as
993 relocation against FUNC symbol.
994 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
995
996 2018-03-07 Renlin Li <renlin.li@arm.com>
997
998 PR ld/20402
999 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Check absolute
1000 symbol, and don't emit relocation in specific case.
1001
1002 2018-03-07 Alan Modra <amodra@gmail.com>
1003
1004 * elf64-mips.c (mips_elf64_rtype_to_howto): Return NULL on error.
1005 (mips_elf64_slurp_one_reloc_table): Pass on error.
1006
1007 2018-03-03 James Cowgill <james.cowgill@mips.com>
1008 Maciej W. Rozycki <macro@mips.com>
1009
1010 PR ld/21900
1011 * elfxx-mips.c (mips_elf_calculate_relocation): Only return
1012 after calling `undefined_symbol' hook if this is an error
1013 condition. Assume the value of 0 for the symbol requested
1014 otherwise.
1015
1016 2018-03-02 Jim Wilson <jimw@sifive.com>
1017
1018 PR 22903
1019 * elfnn-aarch64.c (_bfd_aarch64_resize_stubs): Add 8 bytes for branch
1020 and nop instead of 4.
1021 (elfNN_arch64_build_stubs): Add nop after branch. Increase size by
1022 8 instead of 4.
1023
1024 2018-03-01 Jim Wilson <jimw@sifive.com>
1025
1026 PR 22756
1027 * elfnn-riscv.c (riscv_relax_delete_bytes): When adjust st_size, use
1028 else if instead of if.
1029
1030 2018-03-01 Alan Modra <amodra@gmail.com>
1031
1032 * elf32-ft32.c (ft32_info_to_howto_rela): Correct range test.
1033
1034 2018-02-28 Alan Modra <amodra@gmail.com>
1035
1036 PR 22887
1037 * aoutx.h (swap_std_reloc_in): Correct r_index bound check.
1038
1039 2018-02-28 Nick Clifton <nickc@redhat.com>
1040
1041 PR 22895
1042 PR 22893
1043 * dwarf2.c (read_n_bytes): Replace size parameter with dwarf_block
1044 pointer. Drop unused abfd parameter. Check the size of the block
1045 before initialising the data field. Return the end pointer if the
1046 size is invalid.
1047 (read_attribute_value): Adjust invocations of read_n_bytes.
1048
1049 PR 22894
1050 * dwarf1.c (parse_die): Check the length of form blocks before
1051 advancing the data pointer.
1052
1053 2018-02-28 Alan Modra <amodra@gmail.com>
1054
1055 PR 22887
1056 * aoutx.h (translate_symbol_table): Print an error message and set
1057 bfd_error on finding an invalid name string offset.
1058
1059 2018-02-27 H.J. Lu <hongjiu.lu@intel.com>
1060
1061 * config.in: Regenerated.
1062 * configure: Likewise.
1063 * configure.ac: Add --enable-separate-code.
1064 (DEFAULT_LD_Z_SEPARATE_CODE): New AC_DEFINE_UNQUOTED. Default
1065 to 1 for Linux/x86 targets,
1066 * elf64-x86-64.c (ELF_MAXPAGESIZE): Set to 0x1000 if
1067 DEFAULT_LD_Z_SEPARATE_CODE is 1.
1068
1069 2018-02-27 Nick Clifton <nickc@redhat.com>
1070
1071 * aout-cris.c (swap_ext_reloc_out): Standadize error/warning
1072 message.
1073 * elf-hppa.h (elf_hppa_info_to_howto_rel): Likewise.
1074 * elf32-i386.c (elf_i386_reloc_type_lookup): Likewise.
1075 * elf32-xtensa.c (elf_xtensa_reloc_type_lookup): Likewise.
1076 * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Likewise.
1077 * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise.
1078 * elf64-sh64.c (sh_elf64_info_to_howto): Likewise.
1079 * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise.
1080 * elfxx-sparc.c (_bfd_sparc_elf_reloc_type_lookup): Likewise.
1081 * elfxx-tilegx.c (tilegx_reloc_type_lookup): Likewise.
1082
1083 PR 22875
1084 * elf-bfd.h (struct elf_backend_data): Change the return type of
1085 the elf_info_to_howto and elf_info_to_howto_rel function pointers
1086 to bfd_boolean.
1087 * elfcode.h (elf_slurp_reloc_table_from_section): Check the return
1088 value from the info_to_howto function and fail if that function
1089 failed.
1090 * elf32-h8300.c (elf32_h8_relocate_section): Check return value
1091 from the info_to_howto function.
1092 (elf32_h8_relax_section): Likewise.
1093 * elf32-lm32.c (lm32_elf_relocate_section): Likewise.
1094 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
1095 * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise.
1096 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
1097 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
1098 * elf64-ia64-vms.c (elf64_ia64_relocate_section): Likewise.
1099 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Likewise.
1100 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
1101 * elfnn-ia64.c (elfNN_ia64_relocate_section): Likewise.
1102 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
1103 (riscv_elf_relocate_section): Likewise.
1104 * elf-hppa.h (elf_hppa_info_to_howto): Change return type to
1105 bfd_boolean. Issue an error message, set an error value and
1106 return FALSE if the reloc is not recognized.
1107 (elf_hppa_info_to_howto_rel): Likewise.
1108 * elf-m10200.c (mn10200_info_to_howto): Likewise.
1109 * elf-m10300.c (mn10300_info_to_howto): Likewise.
1110 * elf.c (_bfd_elf_no_info_to_howto): Likewise.
1111 * elf32-arc.c (arc_info_to_howto_rel): Likewise.
1112 * elf32-arm.c (elf32_arm_info_to_howto): Likewise.
1113 * elf32-avr.c (avr_info_to_howto_rela): Likewise.
1114 * elf32-bfin.c (bfin_info_to_howto): Likewise.
1115 * elf32-cr16.c (elf_cr16_info_to_howto): Likewise.
1116 * elf32-cr16c.c (elf_cr16c_info_to_howto): Likewise.
1117 * elf32-cris.c (elf_cr16c_info_to_howto_rel)
1118 (cris_info_to_howto_rela): Likewise.
1119 * elf32-crx.c (elf_crx_info_to_howto): Likewise.
1120 * elf32-d10v.c (d10v_info_to_howto_rel): Likewise.
1121 * elf32-d30v.c (d30v_info_to_howto_rel, d30v_info_to_howto_rela):
1122 Likewise.
1123 * elf32-dlx.c (dlx_rtype_to_howto, elf32_dlx_info_to_howto)
1124 (elf32_dlx_info_to_howto_rel): Likewise.
1125 * elf32-epiphany.c (epiphany_info_to_howto_rela): Likewise.
1126 * elf32-fr30.c (fr30_info_to_howto_rela): Likewise.
1127 * elf32-frv.c (frv_info_to_howto_rela)
1128 (frvfdpic_info_to_howto_rel): Likewise.
1129 * elf32-ft32.c (ft32_info_to_howto_rela): Likewise.
1130 * elf32-gen.c (elf_generic_info_to_howto)
1131 (elf_generic_info_to_howto_rel): Likewise.
1132 * elf32-h8300.c (elf32_h8_info_to_howto)
1133 (elf32_h8_info_to_howto_rel): Likewise.
1134 * elf32-i370.c (i370_elf_info_to_howto): Likewise.
1135 * elf32-i386.c (elf_i386_reloc_type_lookup)
1136 (elf_i386_rtype_to_howto, elf_i386_info_to_howto_rel): Likewise.
1137 * elf32-i860.c (lookup_howto, elf32_i860_info_to_howto_rela):
1138 Likewise.
1139 * elf32-i960.c (elf32_i960_info_to_howto_rel): Likewise.
1140 * elf32-ip2k.c (ip2k_info_to_howto_rela): Likewise.
1141 * elf32-iq2000.c (iq2000_info_to_howto_rela): Likewise.
1142 * elf32-lm32.c (lm32_info_to_howto_rela): Likewise.
1143 * elf32-m32c.c (m32c_info_to_howto_rela): Likewise.
1144 * elf32-m32r.c (m32r_info_to_howto_rel, m32r_info_to_howto):
1145 Likewise.
1146 * elf32-m68hc11.c (m68hc11_info_to_howto_rel): Likewise.
1147 * elf32-m68hc12.c (m68hc11_info_to_howto_rel): Likewise.
1148 * elf32-m68k.c (rtype_to_howto): Likewise.
1149 * elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
1150 * elf32-mep.c (mep_info_to_howto_rela): Likewise.
1151 * elf32-metag.c (metag_info_to_howto_rela): Likewise.
1152 * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
1153 * elf32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela):
1154 Likewise.
1155 * elf32-moxie.c (moxie_info_to_howto_rela): Likewise.
1156 * elf32-msp430.c (msp430_info_to_howto_rela): Likewise.
1157 * elf32-mt.c (mt_info_to_howto_rela): Likewise.
1158 * elf32-nds32.c (nds32_info_to_howto_rel, nds32_info_to_howto):
1159 Likewise.
1160 * elf32-nios2.c (nios2_elf32_info_to_howto): Likewise.
1161 * elf32-or1k.c (or1k_info_to_howto_rela): Likewise.
1162 * elf32-pj.c (pj_elf_info_to_howto): Likewise.
1163 * elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
1164 * elf32-pru.c (pru_elf32_info_to_howto): Likewise.
1165 * elf32-rl78.c (rl78_info_to_howto_rela): Likewise.
1166 * elf32-rx.c (rx_info_to_howto_rela): Likewise.
1167 * elf32-s390.c (elf_s390_info_to_howto): Likewise.
1168 * elf32-score.c (s3_bfd_score_info_to_howto)
1169 (_bfd_score_info_to_howto): Likewise.
1170 * elf32-score7.c (s7_bfd_score_info_to_howto): Likewise.
1171 * elf32-sh.c (sh_elf_info_to_howto): Likewise.
1172 * elf32-spu.c (spu_elf_info_to_howto): Likewise.
1173 * elf32-tic6x.c (elf32_tic6x_info_to_howto)
1174 (elf32_tic6x_info_to_howto_rel): Likewise.
1175 * elf32-tilepro.c (tilepro_info_to_howto_rela): Likewise.
1176 * elf32-v850.c (v850_elf_info_to_howto_rel)
1177 (v850_elf_info_to_howto_rela, v800_elf_info_to_howto): Likewise.
1178 * elf32-vax.c (rtype_to_howto): Likewise.
1179 * elf32-visium.c (visium_info_to_howto_rela): Likewise.
1180 * elf32-wasm32.c (elf32_wasm32_rtype_to_howto)
1181 (elf32_wasm32_info_to_howto_rela): Likewise.
1182 * elf32-xc16x.c (elf32_xc16x_info_to_howto): Likewise.
1183 * elf32-xgate.c (xgate_info_to_howto_rel): Likewise.
1184 * elf32-xstormy16.c (xstormy16_info_to_howto_rela): Likewise.
1185 * elf32-xtensa.c (elf_xtensa_info_to_howto_rela): Likewise.
1186 * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
1187 * elf64-gen.c (elf_generic_info_to_howto)
1188 (elf_generic_info_to_howto_rel): Likewise.
1189 * elf64-ia64-vms.c (elf64_ia64_info_to_howto): Likewise.
1190 * elf64-mips.c (mips_elf64_info_to_howto_rela): Likewise.
1191 * elf64-mmix.c (mmix_info_to_howto_rela): Likewise.
1192 * elf64-ppc.c (ppc64_elf_info_to_howto): Likewise.
1193 * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise.
1194 * elf64-sh64.c (elf_s390_info_to_howto, sh_elf64_info_to_howto):
1195 Likewise.
1196 * elf64-x86-64.c (elf_x86_64_info_to_howto): Likewise.
1197 * elfn32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela):
1198 Likewise.
1199 * elfnn-aarch64.c (elfNN_aarch64_info_to_howto): Likewise.
1200 * elfnn-ia64.c (elfNN_ia64_info_to_howto): Likewise.
1201 * elfnn-riscv.c (riscv_info_to_howto_rela): Likewise.
1202 * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise.
1203 * elfxx-sparc.c (_bfd_sparc_elf_info_to_howto): Likewise.
1204 * elfxx-tilegx.c (tilegx_info_to_howto_rela): Likewise.
1205 * elf32-score.h (s7_bfd_score_info_to_howto): Update prototype.
1206 * elfxx-sparc.h (_bfd_sparc_elf_info_to_howto): Update prototype.
1207 * elfxx-tilegx.h (tilegx_info_to_howto_rela): Update prototype.
1208 * elfxx-target.h (elf_info_to_howto, elf_info_to_howto_rel):
1209 Default to NULL.
1210
1211 2018-02-26 Jim Wilson <jimw@sifive.com>
1212 Stephan Schreiber <info@fs-driver.org>
1213
1214 PR 15904
1215 * elfnn-ia64.c (elfNN_ia64_relax_section): After ia64_elf_relax_brl
1216 call, set changed_contents and changed_relocs. Likewise after
1217 successful ia64_elf_relax_br call.
1218
1219 2018-02-26 Alan Modra <amodra@gmail.com>
1220
1221 * elf.c (assign_file_positions_except_relocs): Don't segfault
1222 when actual number of phdrs is less than allocated. Delete
1223 outdated comment. Formatting.
1224
1225 2018-02-26 Alan Modra <amodra@gmail.com>
1226
1227 * elf-m10300.c, * elf-s390-common.c, * elf32-arc.c, * elf32-cris.c,
1228 * elf32-dlx.c, * elf32-frv.c, * elf32-i370.c, * elf32-lm32.c,
1229 * elf32-m32r.c, * elf32-m68hc1x.c, * elf32-m68k.c,
1230 * elf32-microblaze.c, * elf32-msp430.c, * elf32-nds32.c,
1231 * elf32-nios2.c, * elf32-or1k.c, * elf32-rl78.c, * elf32-rx.c,
1232 * elf32-score.c, * elf32-score7.c, * elf32-sh-symbian.c,
1233 * elf32-sh.c, * elf32-spu.c, * elf32-v850.c, * elf32-xtensa.c,
1234 * elf64-alpha.c, * elf64-ia64-vms.c, * elf64-mmix.c,
1235 * elf64-sh64.c, * elf64-sparc.c, * elfnn-ia64.c, * elfxx-tilegx.c,
1236 * mmo.c, * osf-core.c, * srec.c, * vms-alpha.c: Standardize
1237 error/warning messages.
1238
1239 2018-02-26 Alan Modra <amodra@gmail.com>
1240
1241 * archive.c, * bfd.c, * linker.c, * reloc.c, * stabs.c,
1242 * syms.c: Standardize error/warning messages.
1243
1244 2018-02-26 Alan Modra <amodra@gmail.com>
1245
1246 * aout-adobe.c, * aout-cris.c, * i386linux.c, * m68klinux.c,
1247 * sparclinux.c, * coff-alpha.c, * coff-arm.c, * coff-mcore.c,
1248 * coffcode.h, * coffgen.c, * cofflink.c, * ecoff.c, * pe-mips.c,
1249 * peXXigen.c, * peicode.h: Standardize error/warning messages.
1250
1251 2018-02-26 Alan Modra <amodra@gmail.com>
1252
1253 * elf32-arm.c, * elfnn-aarch64.c: Standardize error/warning messages.
1254
1255 2018-02-26 Alan Modra <amodra@gmail.com>
1256
1257 * elfxx-mips.c: Standardize error/warning messages.
1258
1259 2018-02-26 Alan Modra <amodra@gmail.com>
1260
1261 * dwarf2.c, * elf-attrs.c, * elf-eh-frame.c, * elf.c, * elf32-gen.c,
1262 * elflink.c: Standardize error/warning messages. Replace use of
1263 linker callback einfo with _bfd_error_handler when possible.
1264
1265 2018-02-26 Alan Modra <amodra@gmail.com>
1266
1267 * aoutx.h, * coff-alpha.c, * coff-i860.c, * coff-m68k.c,
1268 * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c,
1269 * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-w65.c,
1270 * elf-bfd.h, * elf-m10300.c, * elf.c, * elf32-avr.c, * elf32-bfin.c,
1271 * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c,
1272 * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c,
1273 * elf32-fr30.c, * elf32-frv.c, * elf32-i370.c, * elf32-i386.c,
1274 * elf32-i960.c, * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c,
1275 * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c,
1276 * elf32-m68k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c,
1277 * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c,
1278 * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-or1k.c,
1279 * elf32-pj.c, * elf32-ppc.c, * elf32-rl78.c, * elf32-rx.c,
1280 * elf32-s390.c, * elf32-sh.c, * elf32-spu.c, * elf32-tic6x.c,
1281 * elf32-v850.c, * elf32-vax.c, * elf32-visium.c, * elf32-wasm32.c,
1282 * elf32-xgate.c, * elf32-xtensa.c, * elf64-alpha.c,
1283 * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c,
1284 * elf64-ppc.c, * elf64-s390.c, * elf64-sparc.c, * elf64-x86-64.c,
1285 * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c,
1286 * elfnn-riscv.c, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-riscv.h,
1287 * elfxx-sparc.c, * elfxx-sparc.h, * reloc.c: Standardize
1288 unrecognized/unsupported reloc message.
1289
1290 2018-02-26 Alan Modra <amodra@gmail.com>
1291
1292 * elf32-ppc.c: Standardize error/warning messages. Use
1293 _bfd_error_handler rather than einfo when einfo features not used.
1294 * elf64-ppc.c: Likewise.
1295
1296 2018-02-23 Alan Modra <amodra@gmail.com>
1297
1298 PR 22881
1299 * elf.c (assign_file_positions_for_non_load_sections): Remove RELRO
1300 segment if no matching LOAD segment.
1301
1302 2018-02-23 Kuan-Lin Chen <kuanlinchentw@gmail.com>
1303
1304 * elf32-nds32.h: Define mask for ict_model.
1305
1306 2018-02-20 Jason Duerstock <jason.duerstock@gmail.com>
1307
1308 * elfnn-ia64.c (elf_backend_can_gc_sections): Enable.
1309
1310 2018-02-19 Maciej W. Rozycki <macro@mips.com>
1311
1312 Revert
1313 2018-01-12 Vlad Ivanov <vlad@ivanov.email>
1314
1315 * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
1316 .reginfo section has wrong size.
1317
1318 2018-02-19 Maciej W. Rozycki <macro@mips.com>
1319
1320 * elfxx-mips.c (_bfd_mips_elf_always_size_sections): Set
1321 SEC_FIXED_SIZE and SEC_HAS_CONTENTS flags for `.reginfo' and
1322 `.MIPS.abiflags' sections.
1323 (_bfd_mips_elf_final_link): Avoid reading beyond `.reginfo'
1324 section's end.
1325
1326 2018-02-19 Maciej W. Rozycki <macro@mips.com>
1327
1328 * section.c (SEC_FIXED_SIZE): New macro.
1329 * bfd-in2.h: Regenerate.
1330
1331 2018-02-19 Maciej W. Rozycki <macro@mips.com>
1332
1333 * section.c (SEC_HAS_GOT_REF): Remove macro.
1334 * bfd-in2.h: Regenerate.
1335
1336 2018-02-19 Alan Modra <amodra@gmail.com>
1337
1338 * elf-attrs.c (_bfd_elf_parse_attributes): Correct _bfd_error_handler
1339 arguments.
1340 * elfxx-mips.c (_bfd_mips_elf_final_link): Likewise.
1341 * elfnn-riscv.c (_bfd_riscv_relax_align): Likewise.
1342 (_bfd_riscv_relax_pc): Likewise and fix typos.
1343 * libbfd-in.h (_bfd_error_handler): Add attribute printf.
1344 * libbfd.h: Regenerate.
1345
1346 2018-02-19 Alan Modra <amodra@gmail.com>
1347
1348 * dwarf2.c (read_section): Don't use 'll' format modifier.
1349 (find_abstract_instance): Likewise.
1350 * elfcore.h (elf_core_file_p): Likewise.
1351
1352 2018-02-19 Alan Modra <amodra@gmail.com>
1353
1354 * bfd-in.h: Include inttypes.h or if not available define
1355 PRId64, PRIu64 and PRIx64.
1356 * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Remove support for L
1357 modifier to print bfd_vma.
1358 * coff-arm.c, * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c,
1359 * coff-sh.c, * coff-tic80.c, * coffcode.h, * coffgen.c, * cofflink.c,
1360 * compress.c, * dwarf2.c, * elf-m10300.c, * elf.c, * elf32-arc.c,
1361 * elf32-arm.c, * elf32-bfin.c, * elf32-cris.c, * elf32-hppa.c,
1362 * elf32-i386.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32r.c,
1363 * elf32-m68k.c, * elf32-metag.c, * elf32-nds32.c, * elf32-nios2.c,
1364 * elf32-ppc.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c,
1365 * elf32-score7.c, * elf32-sh.c, * elf32-sh64.c, * elf32-spu.c,
1366 * elf32-tic6x.c, * elf32-tilepro.c, * elf32-v850.c, * elf32-vax.c,
1367 * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c,
1368 * elf64-mmix.c, * elf64-s390.c, * elf64-sh64.c, * elf64-x86-64.c,
1369 * elfcode.h, * elfcore.h, * elflink.c, * elfnn-aarch64.c,
1370 * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-mips.c, * elfxx-sparc.c,
1371 * elfxx-tilegx.c, * ieee.c, * ihex.c, * mach-o.c, * merge.c, * mmo.c,
1372 * peXXigen.c, * xcofflink.c: Replace use of Lx modifier with PRIx64,
1373 and cast input to uint64_t, and similarly for Ld and Lu.
1374 * bfd-in2.h: Regenerate.
1375
1376 2018-02-19 Alan Modra <amodra@gmail.com>
1377
1378 * elf32-arm.c, * elf32-hppa.c, * elf32-lm32.c, * elf32-m32r.c,
1379 * elf32-metag.c, * elf32-nds32.c, * elf32-or1k.c, * elf32-ppc.c,
1380 * elf32-s390.c, * elf32-sh.c, * elf32-tic6x.c, * elf32-tilepro.c,
1381 * elf64-ppc.c, * elf64-s390.c, * elflink.c, * elfnn-aarch64.c,
1382 * elfnn-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c,
1383 * reloc.c: Replace use of %R and %T in format strings passed to
1384 einfo and friends by %pR and %pT.
1385
1386 2018-02-19 Alan Modra <amodra@gmail.com>
1387
1388 * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Handle %pA and %pB in place
1389 of %A and %B.
1390 * aout-adobe.c: Update all messages using %A and %B.
1391 * aout-cris.c: Likewise.
1392 * aoutx.h: Likewise.
1393 * archive.c: Likewise.
1394 * binary.c: Likewise.
1395 * cache.c: Likewise.
1396 * coff-alpha.c: Likewise.
1397 * coff-arm.c: Likewise.
1398 * coff-i860.c: Likewise.
1399 * coff-mcore.c: Likewise.
1400 * coff-ppc.c: Likewise.
1401 * coff-rs6000.c: Likewise.
1402 * coff-sh.c: Likewise.
1403 * coff-tic4x.c: Likewise.
1404 * coff-tic54x.c: Likewise.
1405 * coff-tic80.c: Likewise.
1406 * coff64-rs6000.c: Likewise.
1407 * coffcode.h: Likewise.
1408 * coffgen.c: Likewise.
1409 * cofflink.c: Likewise.
1410 * coffswap.h: Likewise.
1411 * compress.c: Likewise.
1412 * cpu-arm.c: Likewise.
1413 * ecoff.c: Likewise.
1414 * elf-attrs.c: Likewise.
1415 * elf-eh-frame.c: Likewise.
1416 * elf-ifunc.c: Likewise.
1417 * elf-m10300.c: Likewise.
1418 * elf-properties.c: Likewise.
1419 * elf-s390-common.c: Likewise.
1420 * elf.c: Likewise.
1421 * elf32-arc.c: Likewise.
1422 * elf32-arm.c: Likewise.
1423 * elf32-avr.c: Likewise.
1424 * elf32-bfin.c: Likewise.
1425 * elf32-cr16.c: Likewise.
1426 * elf32-cr16c.c: Likewise.
1427 * elf32-cris.c: Likewise.
1428 * elf32-crx.c: Likewise.
1429 * elf32-d10v.c: Likewise.
1430 * elf32-d30v.c: Likewise.
1431 * elf32-epiphany.c: Likewise.
1432 * elf32-fr30.c: Likewise.
1433 * elf32-frv.c: Likewise.
1434 * elf32-gen.c: Likewise.
1435 * elf32-hppa.c: Likewise.
1436 * elf32-i370.c: Likewise.
1437 * elf32-i386.c: Likewise.
1438 * elf32-i960.c: Likewise.
1439 * elf32-ip2k.c: Likewise.
1440 * elf32-iq2000.c: Likewise.
1441 * elf32-lm32.c: Likewise.
1442 * elf32-m32c.c: Likewise.
1443 * elf32-m32r.c: Likewise.
1444 * elf32-m68hc11.c: Likewise.
1445 * elf32-m68hc12.c: Likewise.
1446 * elf32-m68hc1x.c: Likewise.
1447 * elf32-m68k.c: Likewise.
1448 * elf32-mcore.c: Likewise.
1449 * elf32-mep.c: Likewise.
1450 * elf32-metag.c: Likewise.
1451 * elf32-microblaze.c: Likewise.
1452 * elf32-moxie.c: Likewise.
1453 * elf32-msp430.c: Likewise.
1454 * elf32-mt.c: Likewise.
1455 * elf32-nds32.c: Likewise.
1456 * elf32-nios2.c: Likewise.
1457 * elf32-or1k.c: Likewise.
1458 * elf32-pj.c: Likewise.
1459 * elf32-ppc.c: Likewise.
1460 * elf32-rl78.c: Likewise.
1461 * elf32-rx.c: Likewise.
1462 * elf32-s390.c: Likewise.
1463 * elf32-score.c: Likewise.
1464 * elf32-score7.c: Likewise.
1465 * elf32-sh-symbian.c: Likewise.
1466 * elf32-sh.c: Likewise.
1467 * elf32-sh64.c: Likewise.
1468 * elf32-sparc.c: Likewise.
1469 * elf32-spu.c: Likewise.
1470 * elf32-tic6x.c: Likewise.
1471 * elf32-tilepro.c: Likewise.
1472 * elf32-v850.c: Likewise.
1473 * elf32-vax.c: Likewise.
1474 * elf32-visium.c: Likewise.
1475 * elf32-wasm32.c: Likewise.
1476 * elf32-xgate.c: Likewise.
1477 * elf32-xtensa.c: Likewise.
1478 * elf64-alpha.c: Likewise.
1479 * elf64-gen.c: Likewise.
1480 * elf64-hppa.c: Likewise.
1481 * elf64-ia64-vms.c: Likewise.
1482 * elf64-mmix.c: Likewise.
1483 * elf64-ppc.c: Likewise.
1484 * elf64-s390.c: Likewise.
1485 * elf64-sh64.c: Likewise.
1486 * elf64-sparc.c: Likewise.
1487 * elf64-x86-64.c: Likewise.
1488 * elfcode.h: Likewise.
1489 * elfcore.h: Likewise.
1490 * elflink.c: Likewise.
1491 * elfnn-aarch64.c: Likewise.
1492 * elfnn-ia64.c: Likewise.
1493 * elfnn-riscv.c: Likewise.
1494 * elfxx-mips.c: Likewise.
1495 * elfxx-sparc.c: Likewise.
1496 * elfxx-tilegx.c: Likewise.
1497 * elfxx-x86.c: Likewise.
1498 * hpux-core.c: Likewise.
1499 * ieee.c: Likewise.
1500 * ihex.c: Likewise.
1501 * libbfd.c: Likewise.
1502 * linker.c: Likewise.
1503 * mach-o.c: Likewise.
1504 * merge.c: Likewise.
1505 * mmo.c: Likewise.
1506 * oasys.c: Likewise.
1507 * pdp11.c: Likewise.
1508 * pe-mips.c: Likewise.
1509 * peXXigen.c: Likewise.
1510 * peicode.h: Likewise.
1511 * reloc.c: Likewise.
1512 * rs6000-core.c: Likewise.
1513 * srec.c: Likewise.
1514 * stabs.c: Likewise.
1515 * vms-alpha.c: Likewise.
1516 * xcofflink.c: Likewise.
1517
1518 2018-02-19 Alan Modra <amodra@gmail.com>
1519
1520 PR 22845
1521 * elf.c (IS_TBSS): Define.
1522 (_bfd_elf_map_sections_to_segments): Use IS_TBSS.
1523 (assign_file_positions_for_non_load_sections): Revert last change.
1524 Properly calculate load segment limits to compare against relro limits.
1525
1526 2018-02-17 Alan Modra <amodra@gmail.com>
1527
1528 PR 22845
1529 * elf.c (assign_file_positions_for_non_load_sections): Ignore
1530 degenerate zero size PT_LOAD segments when finding one overlapping
1531 the PT_GNU_RELRO segment.
1532
1533 2018-02-16 Alan Modra <amodra@gmail.com>
1534
1535 * libbfd.c (_bfd_bool_bfd_false_error): Rename from bfd_false.
1536 (_bfd_bool_bfd_true): Rename from bfd_true.
1537 (_bfd_ptr_bfd_null_error): Rename from bfd_nullvoidptr.
1538 (_bfd_int_bfd_0): Rename from bfd_0.
1539 (_bfd_uint_bfd_0): Rename from bfd_0u.
1540 (_bfd_long_bfd_0): Rename from bfd_0l.
1541 (_bfd_long_bfd_n1_error): Rename from _bfd_n1.
1542 (_bfd_void_bfd): Rename from bfd_void.
1543 (_bfd_bool_bfd_false, _bfd_bool_bfd_asymbol_false),
1544 (_bfd_bool_bfd_link_false_error),
1545 (_bfd_bool_bfd_link_true, _bfd_bool_bfd_bfd_true),
1546 (_bfd_bool_bfd_uint_true, _bfd_bool_bfd_ptr_true),
1547 (_bfd_bool_bfd_asection_bfd_asection_true),
1548 (_bfd_bool_bfd_asymbol_bfd_asymbol_true),
1549 (_bfd_void_bfd_link, _bfd_void_bfd_asection): New functions.
1550 * archive.c (_bfd_noarchive_get_elt_at_index),
1551 (_bfd_noarchive_openr_next_archived_file),
1552 (_bfd_noarchive_construct_extended_name_table),
1553 (_bfd_noarchive_write_ar_hdr, _bfd_noarchive_truncate_arname),
1554 (_bfd_noarchive_write_armap): New functions.
1555 * archures.c (_bfd_nowrite_set_arch_mach): New function.
1556 * coff-alpha.c (alpha_ecoff_swap_coff_aux_in),
1557 (alpha_ecoff_swap_coff_sym_in, alpha_ecoff_swap_coff_lineno_in),
1558 (alpha_ecoff_swap_coff_aux_out, alpha_ecoff_swap_coff_sym_out),
1559 (alpha_ecoff_swap_coff_lineno_out),
1560 (alpha_ecoff_swap_coff_reloc_out): New functions.
1561 * coff-mips.c (mips_ecoff_swap_coff_aux_in),
1562 (mips_ecoff_swap_coff_sym_in, mips_ecoff_swap_coff_lineno_in),
1563 (mips_ecoff_swap_coff_aux_out, mips_ecoff_swap_coff_sym_out),
1564 (mips_ecoff_swap_coff_lineno_out),
1565 (mips_ecoff_swap_coff_reloc_out): New functions.
1566 * coffcode.h (coff_set_alignment_hook): Replace define with
1567 new function.
1568 (symname_in_debug_hook): Likewise.
1569 * ecoff.c (_bfd_ecoff_set_alignment_hook): New function.
1570 * elfxx-target.h (elf_backend_allow_non_load_phdr): Default to 0.
1571 * elf.c (assign_file_positions_except_relocs): Test
1572 elf_backend_allow_non_load_phdr for NULL.
1573 * elflink.c (_bfd_elf_omit_section_dynsym_default): Rename from
1574 _bfd_elf_link_omit_section_dynsym. Update uses.
1575 (_bfd_elf_omit_section_dynsym_all): New function.
1576 * elf-bfd.h (_bfd_elf_link_omit_section_dynsym): Delete.
1577 (_bfd_elf_omit_section_dynsym_default): Declare.
1578 (_bfd_elf_omit_section_dynsym_all): Declare.
1579 * linker.c (_bfd_nolink_sizeof_headers, _bfd_nolink_bfd_relax_section),
1580 (_bfd_nolink_bfd_get_relocated_section_contents),
1581 (_bfd_nolink_bfd_lookup_section_flags),
1582 (_bfd_nolink_bfd_is_group_section, _bfd_nolink_bfd_discard_group),
1583 (_bfd_nolink_bfd_link_hash_table_create),
1584 (_bfd_nolink_bfd_link_just_syms),
1585 (_bfd_nolink_bfd_copy_link_hash_symbol_type),
1586 (_bfd_nolink_bfd_link_split_section),
1587 (_bfd_nolink_section_already_linked),
1588 (_bfd_nolink_bfd_define_common_symbol),
1589 (_bfd_nolink_bfd_define_start_stop): New functions.
1590 * reloc.c (_bfd_norelocs_bfd_reloc_type_lookup),
1591 (_bfd_norelocs_bfd_reloc_name_lookup),
1592 (_bfd_nodynamic_canonicalize_dynamic_reloc): New functions.
1593 * section.c (_bfd_nowrite_set_section_contents): New function.
1594 * syms.c (_bfd_nosymbols_canonicalize_symtab),
1595 (_bfd_nosymbols_print_symbol, _bfd_nosymbols_get_symbol_info),
1596 (_bfd_nosymbols_get_symbol_version_string),
1597 (_bfd_nosymbols_bfd_is_local_label_name),
1598 (_bfd_nosymbols_get_lineno, _bfd_nosymbols_find_nearest_line),
1599 (_bfd_nosymbols_find_line, _bfd_nosymbols_find_inliner_info),
1600 (_bfd_nosymbols_bfd_make_debug_symbol),
1601 ( _bfd_nosymbols_read_minisymbols),
1602 ( _bfd_nosymbols_minisymbol_to_symbol),
1603 (_bfd_nodynamic_get_synthetic_symtab): New functions.
1604 * libbfd-in.h: Declare new functions. Update existing defines,
1605 removing casts.
1606 * aix386-core.c: Update to use new hooks. Formatting.
1607 * aout-adobe.c: Likewise.
1608 * aout-arm.c: Likewise.
1609 * aout-target.h: Likewise.
1610 * aout-tic30.c: Likewise.
1611 * aoutf1.h: Likewise.
1612 * binary.c: Likewise.
1613 * bout.c: Likewise.
1614 * cisco-core.c: Likewise.
1615 * coff-alpha.c: Likewise.
1616 * coff-i386.c: Likewise.
1617 * coff-i860.c: Likewise.
1618 * coff-i960.c: Likewise.
1619 * coff-ia64.c: Likewise.
1620 * coff-mips.c: Likewise.
1621 * coff-ppc.c: Likewise.
1622 * coff-rs6000.c: Likewise.
1623 * coff-sh.c: Likewise.
1624 * coff-tic30.c: Likewise.
1625 * coff-tic54x.c: Likewise.
1626 * coff-x86_64.c: Likewise.
1627 * coff64-rs6000.c: Likewise.
1628 * coffcode.h: Likewise.
1629 * elf-m10300.c: Likewise.
1630 * elf32-cr16.c: Likewise.
1631 * elf32-lm32.c: Likewise.
1632 * elf32-m32r.c: Likewise.
1633 * elf32-metag.c: Likewise.
1634 * elf32-score.c: Likewise.
1635 * elf32-score7.c: Likewise.
1636 * elf32-tilepro.c: Likewise.
1637 * elf32-xstormy16.c: Likewise.
1638 * elf32-xtensa.c: Likewise.
1639 * elf64-alpha.c: Likewise.
1640 * elf64-hppa.c: Likewise.
1641 * elf64-ia64-vms.c: Likewise.
1642 * elf64-mmix.c: Likewise.
1643 * elf64-sh64.c: Likewise.
1644 * elfnn-ia64.c: Likewise.
1645 * elfxx-sparc.c: Likewise.
1646 * elfxx-target.h: Likewise.
1647 * elfxx-tilegx.c: Likewise.
1648 * elfxx-x86.h: Likewise.
1649 * hp300hpux.c: Likewise.
1650 * hppabsd-core.c: Likewise.
1651 * hpux-core.c: Likewise.
1652 * i386msdos.c: Likewise.
1653 * i386os9k.c: Likewise.
1654 * ieee.c: Likewise.
1655 * ihex.c: Likewise.
1656 * irix-core.c: Likewise.
1657 * libaout.h: Likewise.
1658 * libecoff.h: Likewise.
1659 * mach-o-target.c: Likewise.
1660 * mach-o.c: Likewise.
1661 * mipsbsd.c: Likewise.
1662 * mmo.c: Likewise.
1663 * netbsd-core.c: Likewise.
1664 * nlm-target.h: Likewise.
1665 * oasys.c: Likewise.
1666 * osf-core.c: Likewise.
1667 * pdp11.c: Likewise.
1668 * pe-mips.c: Likewise.
1669 * pe-x86_64.c: Likewise.
1670 * pef.c: Likewise.
1671 * plugin.c: Likewise.
1672 * ppcboot.c: Likewise.
1673 * ptrace-core.c: Likewise.
1674 * sco5-core.c: Likewise.
1675 * som.c: Likewise.
1676 * sparclynx.c: Likewise.
1677 * srec.c: Likewise.
1678 * tekhex.c: Likewise.
1679 * trad-core.c: Likewise.
1680 * verilog.c: Likewise.
1681 * versados.c: Likewise.
1682 * vms-alpha.c: Likewise.
1683 * vms-lib.c: Likewise.
1684 * wasm-module.c: Likewise.
1685 * xsym.c: Likewise.
1686 * libbfd.h: Regenerate.
1687
1688 2018-02-15 Jim Wilson <jimw@sifive.com>
1689
1690 * elfnn-riscv.c (_bfd_riscv_relax_section): Ifdef out check to ignore
1691 symbols whose section address is zero.
1692
1693 * elfnn-riscv.c (riscv_elf_relocate_section): Use bfd_reloc_dangerous
1694 when pcrel_lo reloc has an addend. Use reloc_dangerous callback for
1695 bfd_reloc_dangerous. Use einfo instead of warning callback for errors.
1696 Add %X%P to error messages.
1697
1698 2018-02-15 Eric Botcazou <ebotcazou@adacore.com>
1699
1700 PR ld/22832
1701 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
1702 Pass FALSE instead of TRUE as 'create' argument to bfd_link_hash_lookup
1703 and assert that the result of the call is not NULL.
1704
1705 2018-02-14 Nick Clifton <nickc@redhat.com>
1706
1707 PR 22823
1708 Revert previous delta. Add extra casts to avoid compile time
1709 warnings instead.
1710 * libbfd-in.h (_bfd_generic_bfd_copy_private_bfd_data): Add extra
1711 cast to avoid warning from gcc v8 compiler.
1712 (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
1713 (_bfd_generic_bfd_set_private_flags): Likewise.
1714 (_bfd_generic_bfd_copy_private_section_data): Likewise.
1715 (_bfd_generic_bfd_copy_private_symbol_data): Likewise.
1716 (_bfd_generic_bfd_copy_private_header_data): Likewise.
1717 (_bfd_generic_bfd_print_private_bfd_data): Likewise.
1718 (_bfd_noarchive_construct_extended_name_table): Likewise.
1719 (_bfd_noarchive_truncate_arname): Likewise.
1720 (_bfd_noarchive_write_ar_hdr): Likewise.
1721 (_bfd_noarchive_get_elt_at_index): Likewise.
1722 (_bfd_nosymbols_canonicalize_symtab): Likewise.
1723 (_bfd_nosymbols_print_symbol): Likewise.
1724 (_bfd_nosymbols_get_symbol_info): Likewise.
1725 (_bfd_nosymbols_get_symbol_version_string): Likewise.
1726 (_bfd_nosymbols_bfd_is_local_label_name): Likewise.
1727 (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise.
1728 (_bfd_nosymbols_get_lineno): Likewise.
1729 (_bfd_nosymbols_find_nearest_line): Likewise.
1730 (_bfd_nosymbols_find_line): Likewise.
1731 (_bfd_nosymbols_find_inliner_info): Likewise.
1732 (_bfd_nosymbols_bfd_make_debug_symbol): Likewise.
1733 (_bfd_nosymbols_read_minisymbols): Likewise.
1734 (_bfd_nosymbols_minisymbol_to_symbol): Likewise.
1735 (_bfd_norelocs_bfd_reloc_type_lookup): Likewise.
1736 (_bfd_norelocs_bfd_reloc_name_lookup): Likewise.
1737 (_bfd_nowrite_set_arch_mach): Likewise.
1738 (_bfd_nowrite_set_section_contents): Likewise.
1739 (_bfd_nolink_sizeof_headers): Likewise.
1740 (_bfd_nolink_bfd_get_relocated_section_contents): Likewise.
1741 (_bfd_nolink_bfd_relax_section): Likewise.
1742 (_bfd_nolink_bfd_gc_sections): Likewise.
1743 (_bfd_nolink_bfd_lookup_section_flags): Likewise.
1744 (_bfd_nolink_bfd_merge_sections): Likewise.
1745 (_bfd_nolink_bfd_is_group_section): Likewise.
1746 (_bfd_nolink_bfd_discard_group): Likewise.
1747 (_bfd_nolink_bfd_link_hash_table_create): Likewise.
1748 (_bfd_nolink_bfd_link_add_symbols): Likewise.
1749 (_bfd_nolink_bfd_link_just_syms): Likewise.
1750 (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise.
1751 (_bfd_nolink_bfd_final_link): Likewise.
1752 (_bfd_nolink_bfd_link_split_section): Likewise.
1753 (_bfd_nolink_section_already_linked): Likewise.
1754 (_bfd_nolink_bfd_define_common_symbol): Likewise.
1755 (_bfd_nolink_bfd_define_start_stop): Likewise.
1756 (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise.
1757 (_bfd_nodynamic_get_synthetic_symtab): Likewise.
1758 (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise.
1759 (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise.
1760 * libbfd.c (bfd_false_any): Delete.
1761 (bfd_true_any, bfd_nullvoidptr_any, bfd_0_any): Delete.
1762 (bfd_0u_any, bfd_0l_any, _bfd_n1_any, bfd_void_any): Delete.
1763 * libbfd.h (extern): Regenerate
1764 * aout-target.h (MY_bfd_is_target_special_symbol): Add extra
1765 cast to avoid warning from gcc v8 compiler.
1766 * aout-tic30.c (tic30_aout_set_arch_mach): Likewise.
1767 * binary.c (binary_get_symbol_info): Likewise.
1768 * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
1769 * coff-mips.c (mips_ecoff_backend_data): Likewise.
1770 * coffcode.h (coff_set_alignment_hook): Likewise.
1771 (symname_in_debug_hook): Likewise.
1772 (bfd_coff_backend_data bigobj_swap_table): Likewise.
1773 * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise.
1774 * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise.
1775 * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise.
1776 * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise.
1777 * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise.
1778 * elf32-score.c (elf_backend_omit_section_dynsym): Likewise.
1779 * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise.
1780 * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise.
1781 * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise.
1782 * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise.
1783 * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise.
1784 * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise.
1785 * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise.
1786 * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise.
1787 * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise.
1788 * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise.
1789 (bfd_elfNN_bfd_make_debug_symbol): Likewise.
1790 (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
1791 (bfd_elfNN_bfd_set_private_flags): Likewise.
1792 (bfd_elfNN_bfd_is_target_special_symbol): Likewise.
1793 (elf_backend_init_index_section): Likewise.
1794 (elf_backend_allow_non_load_phdr): Likewise.
1795 * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise.
1796 * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise.
1797 * ieee.c (ieee_construct_extended_name_table): Likewise.
1798 (ieee_write_armap): Likewise.
1799 (ieee_write_ar_hdr): Likewise.
1800 (ieee_bfd_is_target_special_symbol): Likewise.
1801 * ihex.c (ihex_canonicalize_symtab): Likewise.
1802 (ihex_bfd_is_target_special_symbol): Likewise.
1803 * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise.
1804 * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise.
1805 (_bfd_ecoff_set_alignment_hook): Likewise.
1806 * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise.
1807 * mmo.c (mmo_bfd_is_target_special_symbol): Likewise.
1808 * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise.
1809 * oasys.c (oasys_construct_extended_name_table): Likewise.
1810 (oasys_write_armap): Likewise.
1811 (oasys_write_ar_hdr): Likewise.
1812 (oasys_bfd_is_target_special_symbol): Likewise.
1813 * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise.
1814 * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise.
1815 * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise.
1816 * som.c (som_bfd_is_target_special_symbol): Likewise.
1817 * srec.c (srec_bfd_is_target_special_symbol): Likewise.
1818 * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise.
1819 * verilog.c (verilog_bfd_is_target_special_symbol): Likewise.
1820 * versados.c (versados_bfd_is_target_special_symbol): Likewise.
1821 (versados_bfd_reloc_name_lookup): Likewise.
1822 * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise.
1823 (vms_bfd_define_start_stop): Likewise.
1824 (alpha_vms_bfd_is_target_special_symbol): Likewise.
1825 * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise.
1826 * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise.
1827
1828 2018-02-14 H.J. Lu <hongjiu.lu@intel.com>
1829
1830 PR ld/22842
1831 * elf32-i386.c (elf_i386_check_relocs): Pass FALSE for non
1832 PC-relative PLT to NEED_DYNAMIC_RELOCATION_P.
1833 * elf64-x86-64.c (elf_x86_64_check_relocs): Create PLT for
1834 R_X86_64_PC32 reloc against dynamic function in data section.
1835 Pass TRUE for PC-relative PLT to NEED_DYNAMIC_RELOCATION_P.
1836 (elf_x86_64_relocate_section): Use PLT for R_X86_64_PC32 reloc
1837 against dynamic function in data section.
1838 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Use PLT in PIE as
1839 function address only if pcrel_plt is true.
1840 (_bfd_x86_elf_link_hash_table_create): Set pcrel_plt.
1841 * elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): Add PCREL_PLT for
1842 PC-relative PLT. If PLT is PC-relative, don't generate dynamic
1843 PC-relative relocation against a function definition in data
1844 secton in PIE. Remove the obsolete comments.
1845 (elf_x86_link_hash_table): Add pcrel_plt.
1846
1847 2018-02-13 H.J. Lu <hongjiu.lu@intel.com>
1848
1849 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Check bfd_link_dll,
1850 instead of bfd_link_pic, for building shared library.
1851
1852 2018-02-13 H.J. Lu <hongjiu.lu@intel.com>
1853
1854 PR gas/22791
1855 * elf64-x86-64.c (is_32bit_relative_branch): Removed.
1856 (elf_x86_64_relocate_section): Check PIC relocations in PIE.
1857 Remove is_32bit_relative_branch usage. Disallow PC32 reloc
1858 against protected function in shared object.
1859
1860 2018-02-13 Sergei Trofimovich <slyfox@inbox.ru>
1861
1862 PR 22828
1863 * po/ru.po: Fix typo in Russian translation.
1864
1865 2018-02-13 Maciej W. Rozycki <macro@mips.com>
1866
1867 * wasm-module.c (wasm_scan_name_function_section): Rename
1868 `index' local variable to `idx'.
1869
1870 2018-02-13 Nick Clifton <nickc@redhat.com>
1871
1872 PR 22823
1873 Fix compile time warnings generated by gcc version 8.
1874 * libbfd-in.h: Remove extraneous text from prototypes.
1875 Add prototypes for bfd_false_any, bfd_true_any,
1876 bfd_nullvoidptr_any, bfd_0_any, bfd_0u_any, bfd_0l_any,
1877 bfd_n1_any, bfd_void_any.
1878 (_bfd_generic_bfd_copy_private_bfd_data): Use vararg based dummy
1879 function.
1880 (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
1881 (_bfd_generic_bfd_set_private_flags): Likewise.
1882 (_bfd_generic_bfd_copy_private_section_data): Likewise.
1883 (_bfd_generic_bfd_copy_private_symbol_data): Likewise.
1884 (_bfd_generic_bfd_copy_private_header_data): Likewise.
1885 (_bfd_generic_bfd_print_private_bfd_data): Likewise.
1886 (_bfd_noarchive_construct_extended_name_table): Likewise.
1887 (_bfd_noarchive_truncate_arname): Likewise.
1888 (_bfd_noarchive_write_ar_hdr): Likewise.
1889 (_bfd_noarchive_get_elt_at_index): Likewise.
1890 (_bfd_nosymbols_canonicalize_symtab): Likewise.
1891 (_bfd_nosymbols_print_symbol): Likewise.
1892 (_bfd_nosymbols_get_symbol_info): Likewise.
1893 (_bfd_nosymbols_get_symbol_version_string): Likewise.
1894 (_bfd_nosymbols_bfd_is_local_label_name): Likewise.
1895 (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise.
1896 (_bfd_nosymbols_get_lineno): Likewise.
1897 (_bfd_nosymbols_find_nearest_line): Likewise.
1898 (_bfd_nosymbols_find_line): Likewise.
1899 (_bfd_nosymbols_find_inliner_info): Likewise.
1900 (_bfd_nosymbols_bfd_make_debug_symbol): Likewise.
1901 (_bfd_nosymbols_read_minisymbols): Likewise.
1902 (_bfd_nosymbols_minisymbol_to_symbol): Likewise.
1903 (_bfd_norelocs_bfd_reloc_type_lookup): Likewise.
1904 (_bfd_norelocs_bfd_reloc_name_lookup): Likewise.
1905 (_bfd_nowrite_set_arch_mach): Likewise.
1906 (_bfd_nowrite_set_section_contents): Likewise.
1907 (_bfd_nolink_sizeof_headers): Likewise.
1908 (_bfd_nolink_bfd_get_relocated_section_contents): Likewise.
1909 (_bfd_nolink_bfd_relax_section): Likewise.
1910 (_bfd_nolink_bfd_gc_sections): Likewise.
1911 (_bfd_nolink_bfd_lookup_section_flags): Likewise.
1912 (_bfd_nolink_bfd_merge_sections): Likewise.
1913 (_bfd_nolink_bfd_is_group_section): Likewise.
1914 (_bfd_nolink_bfd_discard_group): Likewise.
1915 (_bfd_nolink_bfd_link_hash_table_create): Likewise.
1916 (_bfd_nolink_bfd_link_add_symbols): Likewise.
1917 (_bfd_nolink_bfd_link_just_syms): Likewise.
1918 (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise.
1919 (_bfd_nolink_bfd_final_link): Likewise.
1920 (_bfd_nolink_bfd_link_split_section): Likewise.
1921 (_bfd_nolink_section_already_linked): Likewise.
1922 (_bfd_nolink_bfd_define_common_symbol): Likewise.
1923 (_bfd_nolink_bfd_define_start_stop): Likewise.
1924 (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise.
1925 (_bfd_nodynamic_get_synthetic_symtab): Likewise.
1926 (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise.
1927 (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise.
1928 * libbfd.c (bfd_false_any): New function. Like bfd_false but
1929 accepts one or more arguments.
1930 (bfd_true_any): Likewise.
1931 (bfd_nullvoidptr_any): Likewise.
1932 (bfd_0_any): Likewise.
1933 (bfd_0u_any): Likewise.
1934 (bfd_0l_any): Likewise.
1935 (_bfd_n1_any): Likewise.
1936 (bfd_void_any): Likewise.
1937 * libbfd.h (extern): Regenerate
1938 * aout-target.h (MY_bfd_is_target_special_symbol): Use vararg
1939 based dummy function.
1940 * aout-tic30.c (tic30_aout_set_arch_mach): Likewise.
1941 * binary.c (binary_get_symbol_info): Likewise.
1942 * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
1943 * coff-mips.c (mips_ecoff_backend_data): Likewise.
1944 * coffcode.h (coff_set_alignment_hook): Likewise.
1945 (symname_in_debug_hook): Likewise.
1946 (bfd_coff_backend_data bigobj_swap_table): Likewise.
1947 * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise.
1948 * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise.
1949 * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise.
1950 * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise.
1951 * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise.
1952 * elf32-score.c (elf_backend_omit_section_dynsym): Likewise.
1953 * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise.
1954 * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise.
1955 * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise.
1956 * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise.
1957 * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise.
1958 * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise.
1959 * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise.
1960 * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise.
1961 * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise.
1962 * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise.
1963 (bfd_elfNN_bfd_make_debug_symbol): Likewise.
1964 (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
1965 (bfd_elfNN_bfd_set_private_flags): Likewise.
1966 (bfd_elfNN_bfd_is_target_special_symbol): Likewise.
1967 (elf_backend_init_index_section): Likewise.
1968 (elf_backend_allow_non_load_phdr): Likewise.
1969 * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise.
1970 * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise.
1971 * ieee.c (ieee_construct_extended_name_table): Likewise.
1972 (ieee_write_armap): Likewise.
1973 (ieee_write_ar_hdr): Likewise.
1974 (ieee_bfd_is_target_special_symbol): Likewise.
1975 * ihex.c (ihex_canonicalize_symtab): Likewise.
1976 (ihex_bfd_is_target_special_symbol): Likewise.
1977 * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise.
1978 * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise.
1979 (_bfd_ecoff_set_alignment_hook): Likewise.
1980 * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise.
1981 * mmo.c (mmo_bfd_is_target_special_symbol): Likewise.
1982 * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise.
1983 * oasys.c (oasys_construct_extended_name_table): Likewise.
1984 (oasys_write_armap): Likewise.
1985 (oasys_write_ar_hdr): Likewise.
1986 (oasys_bfd_is_target_special_symbol): Likewise.
1987 * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise.
1988 * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise.
1989 * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise.
1990 * som.c (som_bfd_is_target_special_symbol): Likewise.
1991 * srec.c (srec_bfd_is_target_special_symbol): Likewise.
1992 * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise.
1993 * verilog.c (verilog_bfd_is_target_special_symbol): Likewise.
1994 * versados.c (versados_bfd_is_target_special_symbol): Likewise.
1995 (versados_bfd_reloc_name_lookup): Likewise.
1996 * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise.
1997 (vms_bfd_define_start_stop): Likewise.
1998 (alpha_vms_bfd_is_target_special_symbol): Likewise.
1999 * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise.
2000 * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise.
2001 * elf32-arc.c (get_replace_function): Assign replacement function
2002 to func pointer.
2003 * elf32-i370.c (i370_noop): Update prototype.
2004
2005 2018-02-13 Alan Modra <amodra@gmail.com>
2006
2007 PR 22836
2008 * elf.c (_bfd_elf_fixup_group_sections): Account for removed
2009 relocation sections. If size reduces to just the flag word,
2010 remove that too and mark with SEC_EXCLUDE.
2011 * elflink.c (bfd_elf_final_link): Strip empty group sections.
2012
2013 2018-02-13 Alan Modra <amodra@gmail.com>
2014
2015 PR 22829
2016 * elf.c (assign_file_positions_for_non_load_sections): Rewrite
2017 PT_GNU_RELRO setup.
2018
2019 2018-02-12 Zebediah Figura <z.figura12@gmail.com>
2020
2021 * i386msdos.c (msdos_mkobject); New function.
2022 (msdos_object_p): New function.
2023 (i386_msdos_vec): Use msdos_object_p as the check_format
2024 function.
2025 * peicode.h: Rename external_PEI_DOS_hdr, DOSMAGIC, and
2026 NT_SIGNATURE to external_DOS_hdr, IMAGE_DOS_SIGNATURE, and
2027 IMAGE_NT_SIGNATURE.
2028 * peXXigen.c: Likewise.
2029 * coff-ia64.c: Likewise.
2030
2031 2018-02-12 Nick Clifton <nickc@redhat.com>
2032
2033 * elf32-nds32.c (nds32_elf_relax_longjump3): Remove redundant
2034 assignment.
2035 * elf32-arc.c (elf_arc_relocate_section): Likewise.
2036
2037 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
2038
2039 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Reorder conditions.
2040 (sparc_elf_append_rela): Assert that there is enough room in section.
2041 (_bfd_sparc_elf_copy_indirect_symbol): Fix formatting.
2042 (_bfd_sparc_elf_adjust_dynamic_symbol): Minor tweak.
2043 (allocate_dynrelocs): Remove outdated comments and reorder conditions.
2044 For a symbol subject to a GOT relocation, reserve a slot in the
2045 relocation section if the symbol isn't dynamic and we are in PIC mode.
2046 (_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: If relocation
2047 is relaxed and a slot was reserved, generate a R_SPARC_NONE relocation.
2048 <R_SPARC_GOTDATA_OP_HIX22>: Adjust comments.
2049 <R_SPARC_PC10>: Reorder conditions. Remove always-false assertion.
2050 (_bfd_sparc_elf_finish_dynamic_symbol): Rename local_undefweak into
2051 resolved_to_zero. Do not generate a dynamic GOT relocation for an
2052 undefined weak symbol with non-default visibility. Remove superfluous
2053 'else' and fix formatting.
2054
2055 2018-02-09 H.J. Lu <hongjiu.lu@intel.com>
2056
2057 * elf32-i386.c (elf_i386_get_synthetic_symtab): Also handle
2058 is_solaris.
2059 (i386_elf32_sol2_vec): Don't declare.
2060 (elf_i386_link_setup_gnu_properties): Also handle is_solaris.
2061 Don't set need_global_offset_table.
2062 (elf_i386_solaris_arch_bed): New.
2063 (elf_backend_arch_data): Set to elf_i386_solaris_arch_bed for
2064 Solaris.
2065 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Check
2066 target_os != is_nacl instead of target_os == is_normal.
2067 (x86_64_elf64_sol2_vec): Don't declare.
2068 (elf_x86_64_link_setup_gnu_properties): Check target_os !=
2069 is_nacl instead of target_os == is_normal. Don't set
2070 need_global_offset_table.
2071 (elf_x86_64_solaris_arch_bed): New.
2072 (elf_backend_arch_data): Set to elf_x86_64_solaris_arch_bed for
2073 Solaris.
2074 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep
2075 _GLOBAL_OFFSET_TABLE_ for Solaris.
2076 (_bfd_x86_elf_link_setup_gnu_properties): Don't copy
2077 need_global_offset_table.
2078 * elfxx-x86.h (elf_x86_target_os): Add is_solaris.
2079 (elf_x86_link_hash_table): Remove need_global_offset_table.
2080 (elf_x86_init_table): Likewise.
2081
2082 2018-02-08 H.J. Lu <hongjiu.lu@intel.com>
2083
2084 * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
2085 Remove prototype.
2086 (i386_elf32_sol2_vec): Declared.
2087 (elf_i386_link_setup_gnu_properties): Set
2088 need_global_offset_table with info->output_bfd->xvec.
2089 * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
2090 Remove prototype.
2091 (x86_64_elf64_sol2_vec): Declared.
2092 (elf_x86_64_link_setup_gnu_properties): Set
2093 need_global_offset_table with info->output_bfd->xvec.
2094
2095 2018-02-08 H.J. Lu <hongjiu.lu@intel.com>
2096
2097 * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
2098 New prototype.
2099 (elf_i386_link_setup_gnu_properties): Set need_global_offset_table
2100 for Solaris.
2101 * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
2102 New prototype.
2103 (elf_x86_64_link_setup_gnu_properties): Set
2104 need_global_offset_table for Solaris.
2105 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep the
2106 unused _GLOBAL_OFFSET_TABLE_ for Solaris.
2107 (_bfd_x86_elf_link_setup_gnu_properties): Copy
2108 need_global_offset_table.
2109 * elfxx-x86.h (elf_x86_link_hash_table): Add
2110 need_global_offset_table.
2111 (elf_x86_init_table): Likewise.
2112
2113 2018-02-08 Jim Wilson <jimw@sifive.com>
2114
2115 * elfnn-riscv.c (riscv_elf_relocate_section): Add comment for previous
2116 change.
2117
2118 2018-02-08 Nick Clifton <nickc@redhat.com>
2119
2120 PR 22788
2121 * elf.c (elf_parse_notes): Reject notes with excessuively large
2122 alignments.
2123
2124 2018-02-07 Alan Modra <amodra@gmail.com>
2125
2126 Revert 2018-01-17 Alan Modra <amodra@gmail.com>
2127 * elf32-ppc.c: Remove speculation barrier support.
2128 * elf32-ppc.h: Likewise.
2129 * elf64-ppc.c: Likewise.
2130 * elf64-ppc.h: Likewise.
2131
2132 2018-02-06 Jim Wilson <jimw@sifive.com>
2133
2134 * elfnn-riscv.c (riscv_elf_relocate_section): Return TRUE if used
2135 callback to report an error.
2136
2137 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
2138
2139 PR ld/22263
2140 * elfxx-sparc.c (sparc_elf_tls_transition): Turn call to bfd_link_pic
2141 into call to !bfd_link_executable and tidy up.
2142 (_bfd_sparc_elf_check_relocs): Fix formatting and tidy up.
2143 <R_SPARC_TLS_LE_HIX22>: Turn call to bfd_link_pic into call to
2144 !bfd_link_executable.
2145 <R_SPARC_TLS_IE_HI22>: Likewise.
2146 <GOT relocations>: Remove useless code, tidy and merge related blocks.
2147 <R_SPARC_TLS_GD_CALL>: Turn call to bfd_link_pic into call to
2148 !bfd_link_executable.
2149 <R_SPARC_WPLT30>: Tidy up.
2150 (_bfd_sparc_elf_gc_mark_hook): Turn call to bfd_link_pic into call to
2151 !bfd_link_executable.
2152 (allocate_dynrelocs): Likewise.
2153 (_bfd_sparc_elf_relocate_section): Fix formatting and tidy up.
2154 <R_SPARC_TLS_GD_HI22>: Merge into...
2155 <R_SPARC_TLS_GD_LO10>: ...this. Adjust 4th argument in call to
2156 sparc_elf_tls_transition and remove redundant code.
2157 <R_SPARC_TLS_LDM_HI22>: Turn call to bfd_link_pic into call to
2158 !bfd_link_executable.
2159 <R_SPARC_TLS_LDO_HIX22>: Likewise.
2160 <R_SPARC_TLS_LE_HIX22>: Likewise. Tidy up.
2161 <R_SPARC_TLS_LDM_CALL>: Likewise.
2162 <R_SPARC_TLS_GD_CALL>: Likewise. Tidy up.
2163 <R_SPARC_TLS_GD_ADD>: Likewise.
2164 <R_SPARC_TLS_LDM_ADD>: Likewise.
2165 <R_SPARC_TLS_LDO_ADD>: Likewise.
2166 <R_SPARC_TLS_IE_LD>: Likewise.
2167
2168 2018-02-06 Miloš Stojanović <milos.stojanovic@rt-rk.com>
2169
2170 PR 22789
2171 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): If the dwarf
2172 functions failed to find the function name, try the generic elf
2173 find function instead.
2174
2175 2018-02-06 Sergio Durigan Junior <sergiodj@redhat.com>
2176
2177 * coff-rs6000.c (xcoff_write_archive_contents_old): Use
2178 'memcpy' instead of 'strncpy' when writing the magic number.
2179
2180 2018-02-06 Nick Clifton <nickc@redhat.com>
2181
2182 PR 22794
2183 * opncls.c (bfd_get_debug_link_info_1): Check the size of the
2184 section before attempting to read it in.
2185 (bfd_get_alt_debug_link_info): Likewise.
2186
2187 2018-02-06 Paul Carroll <pcarroll@codesourcery.com>
2188
2189 * bfd/dwarf2.c (find_abstract_name): Modified to return file and
2190 line information in addition to name, if they can be found.
2191
2192 2018-02-05 Renlin Li <renlin.li@arm.com>
2193
2194 PR ld/22764
2195 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Relax the
2196 R_AARCH64_ABS32 and R_AARCH64_ABS16 for absolute symbol. Apply the
2197 check for writeable section as well.
2198
2199 2018-02-05 H.J. Lu <hongjiu.lu@intel.com>
2200
2201 PR ld/22782
2202 * elf32-i386.c (elf_i386_check_relocs): Set got_referenced if
2203 _GLOBAL_OFFSET_TABLE_ is referenced or GOT is needed to resolve
2204 undefined weak symbol to 0.
2205 * elf64-x86-64.c (elf_x86_64_check_relocs): Set got_referenced
2206 if _GLOBAL_OFFSET_TABLE_ is referenced.
2207 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Check
2208 got_referenced instead of ref_regular_nonweak. Remove the
2209 unused _GLOBAL_OFFSET_TABLE_ from symbol table.
2210 * elfxx-x86.h (elf_x86_link_hash_table): Add got_referenced.
2211
2212 2018-02-05 Maciej W. Rozycki <macro@mips.com>
2213
2214 * elfnn-riscv.c (_bfd_riscv_relax_pc): Use `memset' to
2215 initialize `hi_reloc'.
2216
2217 2018-02-05 Maciej W. Rozycki <macro@mips.com>
2218
2219 * elfxx-mips.c (_bfd_mips_elf_section_processing): For
2220 SHT_MIPS_REGINFO sections don't assert the correct size and
2221 report an error instead.
2222
2223 2018-02-05 Maciej W. Rozycki <macro@mips.com>
2224
2225 * elf.c (_bfd_elf_write_object_contents): Propagate a failure
2226 status from `->elf_backend_section_processing'.
2227
2228 2018-02-02 Jim Wilson <jimw@sifive.com>
2229
2230 PR ld/22756
2231 * elfnn-riscv.c (riscv_relax_delete_bytes): New parameter link_info.
2232 If link_info->wrap_hash, check for a duplicate symbol and ignore.
2233 (_bfd_riscv_relax_call, bfd_riscv_relax_lui, _bfd_riscv_relax_tls_le):
2234 Pass new argument to riscv_relax_delete_bytes.
2235 (_bfd_riscv_relax_align, _bfd_riscv_relax_delete): Likewise. Remove
2236 ATTRIBUTE_UNUSED from link_info parameter.
2237
2238 2018-02-02 Alan Modra <amodra@gmail.com>
2239
2240 * elf64-ppc.c (ppc64_elf_relocate_section): Don't relocate nops
2241 emitted for toc sequence optimization. Set and use "howto" later.
2242
2243 2018-02-01 Simon Marchi <simon.marchi@ericsson.com>
2244
2245 * elf64-ppc.c (ppc64_elf_archive_symbol_lookup): Avoid pointer
2246 arithmetic on NULL pointer.
2247 * elflink.c (_bfd_elf_archive_symbol_lookup,
2248 elf_link_add_archive_symbols): Likewise.
2249
2250 2018-01-31 Michael Matz <matz@suse.de>
2251
2252 * elflink.c (bfd_elf_define_start_stop): Fix check of
2253 def_dynamic.
2254
2255 2018-01-31 H.J. Lu <hongjiu.lu@intel.com>
2256
2257 PR ld/21964
2258 * elflink.c (bfd_elf_define_start_stop): Check if __start and
2259 __stop symbols are referenced by shared objects.
2260
2261 2018-01-30 Alan Modra <amodra@gmail.com>
2262
2263 PR 22758
2264 * elf.c (_bfd_elf_map_sections_to_segments): Don't start a new
2265 segment when demand paged with lma on the same page. Test this
2266 before load/non-load, executable/non-executable,
2267 writable/non-writable tests and simplify. Delete bogus relro
2268 condition in writable/non-writable test. Delete outdated
2269 comment. Formatting.
2270
2271 2018-01-30 Alan Modra <amodra@gmail.com>
2272
2273 * elflink.c (bfd_elf_define_start_stop): Make __start and __stop
2274 symbols dynamic.
2275
2276 2018-01-29 Alan Modra <amodra@gmail.com>
2277
2278 PR 22741
2279 * coffgen.c (coff_pointerize_aux): Ensure auxent tagndx is in
2280 range before converting to a symbol table pointer.
2281
2282 2018-01-27 Nick Clifton <nickc@redhat.com>
2283
2284 * po/ru.po: Updated Russian translation.
2285
2286 2018-01-26 Alan Modra <amodra@gmail.com>
2287
2288 * elflink.c (bfd_elf_define_start_stop): Override symbols when
2289 they are defined dynamically.
2290
2291 2018-01-26 Alan Modra <amodra@gmail.com>
2292
2293 * elf64-ppc.c (ppc64_elf_size_stubs): Iterate sizing when
2294 .branch_lt changes size.
2295
2296 2018-01-25 Alan Modra <amodra@gmail.com>
2297
2298 PR 22746
2299 * elfcode.h (elf_object_p): Avoid integer overflow.
2300
2301 2018-01-25 Eric Botcazou <ebotcazou@adacore.com>
2302
2303 PR ld/22727
2304 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
2305 Do a mere lookup of the __tls_get_addr symbol instead of adding it.
2306
2307 Revert
2308 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
2309
2310 PR ld/22263
2311 * elfxx-sparc.c (sparc_elf_tls_transition): Replace
2312 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
2313 bfd_link_executable for TLS check.
2314 (_bfd_sparc_elf_check_relocs): Likewise.
2315 (allocate_dynrelocs): Likewise.
2316 (_bfd_sparc_elf_relocate_section): Likewise.
2317
2318 2018-01-24 Renlin Li <renlin.li@arm.com>
2319
2320 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Add support for
2321 BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
2322 BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
2323 BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
2324 BFD_RELOC_AARCH64_MOVW_PREL_G3.
2325 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
2326 (_bfd_aarch64_elf_resolve_relocation): Likewise.
2327
2328 2018-01-24 Renlin Li <renlin.li@arm.com>
2329
2330 * reloc.c: Add BFD_RELOC_AARCH64_MOVW_PREL_G0,
2331 BFD_RELOC_AARCH64_MOVW_PREL_G0_NC, BFD_RELOC_AARCH64_MOVW_PREL_G1,
2332 BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, BFD_RELOC_AARCH64_MOVW_PREL_G2,
2333 BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, BFD_RELOC_AARCH64_MOVW_PREL_G3.
2334 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add entries for
2335 BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
2336 BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
2337 BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
2338 BFD_RELOC_AARCH64_MOVW_PREL_G3.
2339 * bfd-in2.h: Regenerate.
2340 * libbfd.h: Regenerate.
2341
2342 2018-01-23 Maciej W. Rozycki <macro@mips.com>
2343
2344 * elfxx-mips.c (_bfd_mips_elf_final_link): Update a stale
2345 `mips_elf32_section_processing' comment reference.
2346
2347 2018-01-20 H.J. Lu <hongjiu.lu@intel.com>
2348
2349 PR ld/22721
2350 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Check the
2351 versioned __tls_get_addr symbol.
2352
2353 2018-01-19 Nick Clifton <nickc@redhat.com>
2354
2355 * po/fr.po: Updated French translation.
2356
2357 2018-01-18 Alan Modra <amodra@gmail.com>
2358
2359 * elf32-ppc.c (ppc_elf_create_glink): Correct alignment of .glink.
2360 * elf64-ppc.c (ppc64_elf_size_stubs): Handle negative plt_stub_align.
2361 (ppc64_elf_build_stubs): Likewise.
2362
2363 2018-01-17 Nick Clifton <nickc@redhat.com>
2364
2365 * po/ru.po: Updated Russian translation.
2366 * po/uk/po: Updated Ukranian translation.
2367
2368 2018-01-17 Alan Modra <amodra@gmail.com>
2369
2370 * elf64-ppc.c (ppc64_elf_build_stubs): Silence gcc warning.
2371
2372 2018-01-17 Alan Modra <amodra@gmail.com>
2373
2374 * elf32-ppc.c (GLINK_ENTRY_SIZE): Handle speculation barrier.
2375 (CRSETEQ, BEQCTRM): Define.
2376 (is_nonpic_glink_stub): Don't check bctr.
2377 (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
2378 (ppc_elf_relax_section): Size speculation barrier.
2379 (output_bctr): New function.
2380 (write_glink_stub): Use output_bctr.
2381 (ppc_elf_relocate_section): Use output_bctr for long branch stub.
2382 (ppc_elf_finish_dynamic_symbol): Likewise.
2383 (ppc_elf_finish_dynamic_sections): Use output_bctr.
2384 * elf32-ppc.h (struct ppc_elf_params): Add speculate_indirect_jumps.
2385 * elf64-ppc.c (CRSETEQ, BEQCTRM, BEQCTRLM): Define.
2386 (GLINK_PLTRESOLVE_SIZE): Size speculation barrier.
2387 (size_global_entry_stubs): Handle speculation barrier sizing.
2388 (plt_stub_size): Likewise.
2389 (output_bctr): New function.
2390 (build_plt_stub, build_tls_get_addr_stub): Output speculation
2391 barrier.
2392 (ppc_build_one_stub): Likewise for ppc_stub_plt_branch.
2393 (ppc_size_one_stub): Size speculation barrier in ppc_stub_plt_branch.
2394 (build_global_entry_stubs): Output speculation barrier.
2395 (ppc64_elf_build_stubs): Likewise in __glink_PLTresolve stub.
2396 * elf64-ppc.h (struct ppc64_elf_params): Add speculate_indirect_jumps.
2397
2398 2018-01-17 Alan Modra <amodra@gmail.com>
2399
2400 * elf32-ppc.c (GLINK_ENTRY_SIZE): Add parameters, handle
2401 __tls_get_addr_opt, and alignment sizing.
2402 (TLS_GET_ADDR_GLINK_SIZE): Delete.
2403 (is_nonpic_glink_stub): Don't use GLINK_ENTRY_SIZE.
2404 (ppc_elf_get_synthetic_symtab): Recognize stubs spaced at 4, 6,
2405 or 8 insns.
2406 (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
2407 (allocate_dynrelocs): Use new GLINK_ENTRY_SIZE.
2408 (ppc_elf_size_dynamic_sections): Likewise. Size branch table
2409 by PLT reloc count.
2410 (write_glink_stub): Handle __tls_get_addr_opt stub.
2411 Pad out to size given by GLINK_ENTRY_SIZE.
2412 (ppc_elf_relocate_section): Adjust write_glink_stub call.
2413 (ppc_elf_finish_dynamic_symbol): Likewise.
2414 (ppc_elf_finish_dynamic_sections): Write PLTresolve without using
2415 insn array since so many need rewriting.
2416 * elf32-ppc.h (struct ppc_elf_params): Add plt_stub_align.
2417 * elf64-ppc.c (GLINK_PLTRESOLVE_SIZE): Rename from
2418 GLINK_CALL_STUB_SIZE. Add htab param and evaluate to size without
2419 nops. Adjust all uses.
2420 (ppc64_elf_get_synthetic_symtab): Don't use GLINK_CALL_STUB_SIZE
2421 in glink_vma calculation.
2422 (struct ppc_link_hash_table): Add global_entry section pointer.
2423 (create_linkage_sections): Create separate section for global
2424 entry stubs.
2425 (PPC_LO, PPC_HI, PPC_HA): Move earlier.
2426 (size_global_entry_stubs): Handle sizing for aligned stubs.
2427 (ppc64_elf_size_dynamic_sections): Handle global_entry alloc,
2428 and don't stash end of glink branch table in rawsize.
2429 (ppc_build_one_stub): Rewrite stub size calculations.
2430 (build_global_entry_stubs): Use new section.
2431 (ppc64_elf_build_stubs): Don't pad __glink_PLTresolve with nops.
2432 Build lazy link stubs out to end of section. Build global entry
2433 stubs in new section.
2434
2435 2018-01-15 Nick Clifton <nickc@redhat.com>
2436
2437 * po/uk.po: Updated Ukranian translation.
2438
2439 2018-01-13 Nick Clifton <nickc@redhat.com>
2440
2441 * po/bfd.pot: Regenerated.
2442
2443 2018-01-13 Nick Clifton <nickc@redhat.com>
2444
2445 * version.m4: Bump version to 2.30.51
2446 * configure: Regenerate.
2447
2448 2018-01-13 Nick Clifton <nickc@redhat.com>
2449
2450 2.30 branch created.
2451
2452 2018-01-12 Jens Widell <jl@opera.com>
2453
2454 * elf.c (setup_group): Optimize search for group by remembering
2455 last found group and restarting search at that index.
2456 * elf-bfd.h (struct elf_obj_tdata): Add group_search_offset field.
2457
2458 2018-01-12 Gunther Nikl <gnikl@users.sourceforge.net>
2459
2460 * aoutx.h (aout_link_check_ar_symbols): Remove default and handle
2461 bfd_link_common_skip_none in switch.
2462
2463 2018-01-12 Alan Modra <amodra@gmail.com>
2464
2465 PR ld/22649
2466 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Ignore dynamic
2467 references on forced local symbols.
2468
2469 2018-01-12 Vlad Ivanov <vlad@ivanov.email>
2470
2471 * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
2472 .reginfo section has wrong size.
2473
2474 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
2475
2476 PR ld/22393
2477 * elf.c (_bfd_elf_map_sections_to_segments): When generating
2478 separate code and read-only data LOAD segments, create a new
2479 LOAD segment if the previous section contains text and the
2480 current section doesn't or vice versa. Don't put a writable
2481 section in a read-only segment if there is a RELRO segment.
2482
2483 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
2484
2485 PR ld/22649
2486 * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Ignore dynamic
2487 references on forced local symbols.
2488
2489 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
2490
2491 PR ld/22677
2492 * elflink.c (bfd_elf_gc_sections): Keep all PREINIT_ARRAY,
2493 INIT_ARRAY as well as FINI_ARRAY sections for ld -r --gc-section.
2494
2495 2018-01-09 Kuan-Lin Chen <kuanlinchentw@gmail.com>
2496
2497 PR 22662
2498 * elf32-nds32.c (nds32_elf_relax_loadstore): Fix a typographical error.
2499
2500 2018-01-03 John Baldwin <jhb@FreeBSD.org>
2501
2502 * elf.c (elfcore_grok_freebsd_note): Handle
2503 NT_FREEBSD_PROCSTAT_PROC, NT_FREEBSD_PROCSTAT_FILES, and
2504 NT_FREEBSD_PROCSTAT_VMMAP.
2505
2506 2018-01-03 Alan Modra <amodra@gmail.com>
2507
2508 Update year range in copyright notice of all files.
2509
2510 For older changes see ChangeLog-2017
2511 \f
2512 Copyright (C) 2018 Free Software Foundation, Inc.
2513
2514 Copying and distribution of this file, with or without modification,
2515 are permitted in any medium without royalty provided the copyright
2516 notice and this notice are preserved.
2517
2518 Local Variables:
2519 mode: change-log
2520 left-margin: 8
2521 fill-column: 74
2522 version-control: never
2523 End:
This page took 0.088849 seconds and 4 git commands to generate.