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