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