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