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