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