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