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