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