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