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