Fix use-after-free error when parsing a corrupt nested archive.
[deliverable/binutils-gdb.git] / bfd / ChangeLog
1 2017-07-19 Nick Clifton <nickc@redhat.com>
2
3 PR 21787
4 * archive.c (bfd_generic_archive_p): If the bfd does not have the
5 correct magic bytes at the start, set the error to wrong format
6 and clear the format selector before returning NULL.
7
8 2017-07-19 Nick Clifton <nickc@redhat.com>
9
10 PR 21786
11 * coff-rs6000.c (_bfd_strntol): New function.
12 (_bfd_strntoll): New function.
13 (GET_VALUE_IN_FIELD): New macro.
14 (EQ_VALUE_IN_FIELD): new macro.
15 (_bfd_xcoff_slurp_armap): Use new macros.
16 (_bfd_xcoff_archive_p): Likewise.
17 (_bfd_xcoff_read_ar_hdr): Likewise.
18 (_bfd_xcoff_openr_next_archived_file): Likewise.
19 (_bfd_xcoff_stat_arch_elt): Likewise.
20
21 2017-07-19 Claudiu Zissulescu <claziss@synopsys.com>
22 John Eric Martin <John.Martin@emmicro-us.com>
23
24 * bfd-in2.h: Regenerate.
25 * libbfd.h: Regenerate.
26 * elf32-arc.c (JLI): Define.
27 * reloc.c: Add JLI relocations.
28
29 2017-07-18 Nick Clifton <nickc@redhat.com>
30
31 PR 21775
32 * coff-sh.c: Fix spelling typos.
33 * compress.c: Likewise.
34 * cpu-pdp11.c: Likewise.
35 * ecofflink.c: Likewise.
36 * elf-m10300.c: Likewise.
37 * elf.c: Likewise.
38 * elf32-arm.c: Likewise.
39 * elf32-m68k.c: Likewise.
40 * elf32-nds32.c: Likewise.
41 * elf32-ppc.c: Likewise.
42 * elf32-sh.c: Likewise.
43 * elf32-v850.c: Likewise.
44 * elf64-ppc.c: Likewise.
45 * elf64-x86-64.c: Likewise.
46 * elflink.c: Likewise.
47 * elfnn-aarch64.c: Likewise.
48 * elfxx-mips.c: Likewise.
49 * som.c: Likewise.
50 * sunos.c: Likewise.
51 * vms-alpha.c: Likewise.
52 * xcofflink.c: Likewise.
53
54 2017-07-18 Nick Clifton <nickc@redhat.com>
55
56 PR binutils/21781
57 * coffcode.h (handle_COMDAT): Replace abort with an error message
58 and return.
59
60 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
61
62 PR ld/21782
63 * elf64-x86-64.c (elf_x86_64_relocate_section): Limit PIC check
64 to shared library.
65
66 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
67
68 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
69
70 2017-07-16 Alan Modra <amodra@gmail.com>
71
72 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimize
73 __tls_index GOT entries when using __tls_get_addr_opt stub.
74 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
75
76 2017-07-12 Alan Modra <amodra@gmail.com>
77
78 * po/es.po: Update from translationproject.org/latest/bfd/.
79 * po/fi.po: Likewise.
80 * po/fr.po: Likewise.
81 * po/id.po: Likewise.
82 * po/ja.po: Likewise.
83 * po/ro.po: Likewise.
84 * po/ru.po: Likewise.
85 * po/sr.po: Likewise.
86 * po/sv.po: Likewise.
87 * po/tr.po: Likewise.
88 * po/uk.po: Likewise.
89 * po/vi.po: Likewise.
90 * po/zh_CN.po: Likewise.
91 * po/hr.po: New file from translationproject.org.
92 * configure.ac (ALL_LINGUAS): Add hr. Sort.
93 * configure: Regenerate.
94
95 2017-07-12 Nick Clifton <nickc@redhat.com>
96
97 Fix compile time warnings using gcc 7.1.1.
98 * elf32-xtensa.c (elf_xtensa_get_plt_section): Increase length of
99 plt_name buffer.
100 (elf_xtensa_get_gotplt_section): Increase length of got_name
101 buffer.
102 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add a
103 default return of FALSE.
104 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc): Add a
105 default return of FALSE.
106
107 2017-07-12 Alan Modra <amodra@gmail.com>
108
109 * binary.c (binary_set_section_contents): Don't print filepos in
110 error message.
111 (coff_write_object_contents): Cast size_t for error message.
112 (coff_slurp_line_table): Don't use bfd_vma symndx.
113 (coff_slurp_reloc_table): Remove unneeded cast.
114 * dwarf2.c (read_section): Cast bfd_int64_t to long long for
115 error message.
116 (find_abstract_instance_name): Likewise.
117 * elf32-arm.c (arm_type_of_stub): Correct error arg order.
118 (bfd_elf32_arm_stm32l4xx_erratum_scan): Don't cast error arg.
119 (elf32_arm_check_relocs): Make r_symndx an int.
120 * elf32-cris.c (cris_elf_check_relocs): Delete extraneous %s in
121 format string.
122 * elf32-metag.c (elf_metag_relocate_section): Delete extra error
123 message arg.
124 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Rewrite bogus
125 error message.
126 * elf32-i386.c (elf_i386_check_relocs): Make r_symndx an int.
127 * elf32-s390.c (elf_s390_check_relocs): Likewise.
128 * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
129 * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
130 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
131 * elf64-s390.c (elf_s390_check_relocs): Likewise.
132 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
133 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
134 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
135 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
136 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
137 * elf64-mmix.c (_bfd_mmix_after_linker_allocation): Cast size_t args
138 and use %lu for error message.
139 * elflink.c (elf_link_adjust_relocs): Delete extra error message arg.
140 * mmo.c (mmo_scan): Make stab_loc a file_ptr. Cast expression for
141 error message.
142
143 * elf32-arm.c (elf32_arm_tls_relax): Correct format string and args
144 in error message.
145 (elf32_arm_final_link_relocate): Likewise.
146 * coff-arm.c (bfd_arm_process_before_allocation): Likewise.
147 * coffcode.h (styp_to_sec_flags): Likewise.
148 * cofflink.c (_bfd_coff_write_global_sym): Likewise.
149 * ecoff.c (_bfd_ecoff_slurp_symbol_table): Likewise.
150 * elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise.
151 * elf32-bfin.c (bfinfdpic_check_relocs): Likewise.
152 (elf32_bfin_merge_private_bfd_data): Likewise.
153 * elf32-cris.c (cris_elf_relocate_section): Likewise.
154 * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
155 * elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise.
156 (i370_elf_relocate_section): Likewise.
157 * elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise.
158 * elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise.
159 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
160 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
161 * elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise.
162 * elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise.
163 * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
164 * elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise.
165 (_bfd_mips_elf_merge_private_bfd_data): Likewise.
166 * ieee.c (ieee_write_id, read_id): Likewise.
167 * mach-o.c (bfd_mach_o_write_contents): Likewise.
168 (bfd_mach_o_layout_commands, bfd_mach_o_read_section_32): Likewise.
169 (bfd_mach_o_read_section_64, bfd_mach_o_read_symtab_symbol): Likewise.
170 (bfd_mach_o_read_command, bfd_mach_o_header_p): Likewise.
171 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Likewise.
172 * stabs.c (_bfd_link_section_stabs): Likewise.
173
174 * coff-arm.c (coff_arm_relocate_section): Use L modifier in error
175 format.
176 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
177 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
178 * coff-rs6000.c (xcoff_reloc_type_toc): Likewise.
179 * coff-sh.c (sh_relax_section): Likewise.
180 (sh_relax_delete_bytes, sh_swap_insns): Likewise.
181 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
182 * coffcode.h (coff_slurp_reloc_table): Likewise.
183 * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
184 (_bfd_coff_read_string_table): Likewise.
185 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
186 * compress.c (bfd_get_full_section_contents): Likewise.
187 * dwarf2.c (read_formatted_entries, decode_line_info): Likewise.
188 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
189 * elf.c (bfd_elf_string_from_elf_section): Likewise.
190 * elf32-arc.c (arc_special_overflow_checks): Likewise.
191 * elf32-arm.c (elf32_arm_tls_relax): Likewise.
192 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Likewise.
193 (elf32_arm_write_section): Likewise.
194 * elf32-bfin.c (bfin_relocate_section): Likewise.
195 (bfinfdpic_relocate_section): Likewise.
196 * elf32-hppa.c (hppa_build_one_stub): Likewise.
197 (final_link_relocate, elf32_hppa_relocate_section): Likewise.
198 * elf32-i386.c (elf_i386_tls_transition): Likewise.
199 (elf_i386_relocate_section): Likewise.
200 * elf32-ip2k.c (ip2k_final_link_relocate): Likewise.
201 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
202 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
203 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
204 * elf32-metag.c (elf_metag_relocate_section): Likewise.
205 * elf32-nds32.c (unrecognized_reloc_msg): Likewise.
206 (nds32_elf_relax_longcall1, nds32_elf_relax_longcall2): Likewise.
207 (nds32_elf_relax_longcall3, nds32_elf_relax_longjump1): Likewise.
208 (nds32_elf_relax_longjump2, nds32_elf_relax_longjump3): Likewise.
209 (nds32_elf_relax_longcall4, nds32_elf_relax_longcall5): Likewise.
210 (nds32_elf_relax_longcall6, nds32_elf_relax_longjump4): Likewise.
211 (nds32_elf_relax_longjump5, nds32_elf_relax_longjump6): Likewise.
212 (nds32_elf_relax_longjump7, nds32_elf_relax_loadstore): Likewise.
213 (nds32_elf_relax_ptr, nds32_elf_ex9_build_hash_table): Likewise.
214 * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
215 * elf32-rx.c (UNSAFE_FOR_PID): Likewise.
216 * elf32-s390.c (invalid_tls_insn, elf_s390_relocate_section): Likewise.
217 * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
218 * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
219 * elf32-sh.c (sh_elf_relax_section): Likewise.
220 (sh_elf_relax_delete_bytes, sh_elf_swap_insns): Likewise.
221 (sh_elf_relocate_section): Likewise.
222 * elf32-sh64.c (shmedia_prepare_reloc): Likewise.
223 * elf32-spu.c (spu_elf_relocate_section): Likewise.
224 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
225 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
226 * elf32-v850.c (v850_elf_relax_section): Likewise.
227 * elf32-vax.c (elf_vax_check_relocs): Likewise.
228 (elf_vax_relocate_section): Likewise.
229 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
230 (extend_ebb_bounds_forward, extend_ebb_bounds_backward): Likewise.
231 (compute_text_actions, compute_ebb_proposed_actions): Likewise.
232 (do_fix_for_relocatable_link): Likewise.
233 * elf64-alpha.c (elf64_alpha_relax_got_load): Likewise.
234 (elf64_alpha_relax_with_lituse): Likewise.
235 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Likewise.
236 (elf_hppa_final_link_relocate): Likewise.
237 * elf64-ia64-vms.c (elf64_ia64_relax_section): Likewise.
238 (elf64_ia64_choose_gp, elf64_ia64_relocate_section): Likewise.
239 (elf64_vms_link_add_object_symbols): Likewise.
240 * elf64-mmix.c (mmix_elf_perform_relocation): Likewise.
241 (mmix_final_link_relocate): Likewise.
242 * elf64-s390.c (invalid_tls_insn): Likewise.
243 (elf_s390_relocate_section): Likewise.
244 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
245 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
246 (elf_x86_64_relocate_section): Likewise.
247 * elfcode.h (elf_slurp_symbol_table): Likewise.
248 * elfcore.h (elf_core_file_p): Likewise.
249 * elflink.c (elf_link_read_relocs_from_section): Likewise.
250 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
251 (elfNN_aarch64_relocate_section): Likewise.
252 * elfnn-ia64.c (elfNN_ia64_relax_section): Likewise.
253 (elfNN_ia64_choose_gp, elfNN_ia64_relocate_section): Likewise.
254 * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
255 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
256 (_bfd_mips_elf_relocate_section): Likewise.
257 (_bfd_mips_elf_finish_dynamic_symbol, mips_finish_exec_plt): Likewise.
258 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
259 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
260 * ieee.c (ieee_slurp_external_symbols): Likewise.
261 * ihex.c (ihex_write_object_content): Likewise.
262 * mach-o.c (bfd_mach_o_build_exec_seg_command): Likewise.
263 * merge.c (_bfd_merged_section_offset): Likewise.
264 * mmo.c (mmo_write_loc_chunk): Likewise.
265 (mmo_write_object_contents): Likewise.
266 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Likewise.
267 * stabs.c (_bfd_link_section_stabs): Likewise.
268 * xcofflink.c (xcoff_link_add_symbols, xcoff_find_tc0): Likewise.
269
270 2017-07-11 Alan Modra <amodra@gmail.com>
271
272 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo.
273
274 2017-07-11 Alan Modra <amodra@gmail.com>
275
276 * elf32-ppc.c (ppc_elf_relocate_section): Emit "unexpected
277 instruction" error using _bfd_error_handler, not einfo.
278
279 2017-07-10 Nick Clifton <nickc@redhat.com>
280
281 * coffcode.h (coff_slurp_symbol_table): Do not include an entry
282 for C_AIX_WEAKEXT if it has the same value as C_WEAKEXT.
283
284 2017-07-07 John Baldwin <jhb@FreeBSD.org>
285
286 * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PTLWPINFO.
287
288 2017-07-07 Alan Modra <amodra@gmail.com>
289
290 * coffcode.h (coff_slurp_symbol_table): Handle C_AIX_WEAKEXT.
291
292 2017-07-07 Alan Modra <amodra@gmail.com>
293
294 * bfd.c (_doprnt): Replace "L" with "ll" when printing bfd_vma
295 as long long. Move code replacing "ll" with "I64", and simplify.
296
297 2017-07-06 H.J. Lu <hongjiu.lu@intel.com>
298
299 * bfd.c (_doprnt): Convert 'L' to 'l' when setting wide_width
300 to 1.
301
302 2017-07-05 H.J. Lu <hongjiu.lu@intel.com>
303
304 * dwarf2.c (line_info_add_include_dir_stub): Replace time with
305 xtime.
306 (line_info_add_file_name): Likewise.
307 (decode_line_info): Likewise.
308
309 2017-07-04 Tristan Gingold <gingold@adacore.com>
310
311 * version.m4: Bump version to 2.29.51
312 * configure: Regenerate.
313
314 2017-07-04 Jiong Wang <jiong.wang@arm.com>
315
316 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Remove the
317 sanity check at the head of this function.
318
319 2017-07-04 Jan Kratochvil <jan.kratochvil@redhat.com>
320
321 * dwarf2.c (struct dwarf2_debug): Add fields dwarf_line_str_buffer and
322 dwarf_line_str_size.
323 (struct attr_abbrev): Add field implicit_const.
324 (dwarf_debug_sections): Add .debug_line_str.
325 (enum dwarf_debug_section_enum): Add debug_line_str and debug_max.
326 (dwarf_debug_section_assert): Add static assertion.
327 (read_indirect_line_string): New.
328 (read_abbrevs): Support DW_FORM_implicit_const.
329 (is_str_attr): Support DW_FORM_line_strp.
330 (read_attribute_value): Support DW_FORM_line_strp and
331 DW_FORM_implicit_const.
332 (read_attribute): Support DW_FORM_implicit_const.
333 (line_info_add_include_dir, line_info_add_include_dir_stub):
334 (line_info_add_file_name, read_formatted_entries): New.
335 (decode_line_info, parse_comp_unit): Support DWARF 5.
336 (_bfd_dwarf2_cleanup_debug_info): Free dwarf_line_str_buffer.
337
338 2017-07-03 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
339
340 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove the
341 abort statement that was put for symbols that are not dynamic.
342
343 2017-07-03 Tristan Gingold <gingold@adacore.com>
344
345 * po/bfd.pot: Regenerate
346
347 2017-07-03 Alan Modra <amodra@gmail.com>
348
349 * bfd.c (_doprnt): Rewrite "ll" and "L" modifiers to "I64" for
350 __MSVCRT__. Support "L" modifier for bfd_vma. Formatting.
351 * elf.c (setup_group): Use "Lx" to print sh_size.
352 (_bfd_elf_setup_sections): Remove unnecessary cast and print
353 unknown section type in hex.
354 (copy_special_section_fields): Style fix.
355 (bfd_section_from_shdr): Correct format for sh_link. Use a
356 common error message for all the variants of unrecognized
357 section types.
358 (assign_file_positions_for_load_sections): Use "Lx" for lma
359 adjust error message.
360 (assign_file_positions_for_non_load_sections): Formatting.
361 (rewrite_elf_program_header): Formatting. Use "Lx" for
362 bfd_vma values in error messages.
363 * elfcode.h (elf_slurp_reloc_table_from_section): Cast
364 ELF_R_SYM value to type expected by format.
365 * elflink.c (elf_link_read_relocs_from_section): Use "Lx"
366 in error messages.
367 (elf_link_add_object_symbols): Use "Lu" for symbol sizes.
368 (elf_link_input_bfd): Use "Lx" for r_info.
369 (bfd_elf_gc_record_vtinherit): Use "Lx" for offset.
370
371 2017-07-03 Alan Modra <amodra@gmail.com>
372
373 * bfd.c (bfd_scan_vma): Don't use long long unless HAVE_LONG_LONG.
374 * coff-rs6000.c (FMT20): Handle hosts with 64-bit long and
375 Microsoft C library variant of long long format specifier.
376 (PRINT20): Cast value to bfd_uint64_t not long long.
377 * coffcode.h (coff_print_aux): Use BFD_VMA_FMT.
378 * coff-x86_64.c (coff_amd64_reloc): Use bfd_uint64_t rather than
379 long long. Don't cast to bfd_vma.
380 * elf32-score.c (score3_bfd_getl48): Likewise.
381 * vms-alpha.c (_bfd_vms_slurp_eisd): Likewise.
382
383 2017-07-03 Alan Modra <amodra@gmail.com>
384
385 * elf.c (_bfd_elf_print_private_bfd_data): Use BFD_VMA_FMT to
386 print d_tag.
387 (bfd_elf_print_symbol): Don't cast symbol->flags.
388 (_bfd_elf_symbol_from_bfd_symbol): Likewise.
389 * elf32-ppc.c (ppc_elf_begin_write_processing): Correct
390 _bfd_error_handler argument order.
391 (ppc_elf_merge_private_bfd_data): Don't cast flags.
392
393 2017-07-03 Alan Modra <amodra@gmail.com>
394
395 * configure.ac: Invoke AC_CHECK_TYPES for long long. Invoke
396 AC_TYPE_LONG_DOUBLE.
397 * configure: Regenerate.
398 * config.in: Regenerate.
399
400 2017-06-29 Andrew Waterman <andrew@sifive.com>
401
402 * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Fix TLS copy
403 relocs.
404
405 2017-06-29 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
406
407 * elfxx-sparc.c (allocate_dynrelocs): Don't make a symbol dynamic
408 unless it is undefined weak.
409 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Set the flag
410 relative_reloc to direct non-dynamic symbols to R_SPARC_RELATIVE
411 relocation.
412 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): If symbol
413 is not dynamic in PIC, abort.
414
415 2017-06-29 Jiong Wang <jiong.wang@arm.com>
416
417 PR ld/21402
418 * elfnn-aarch64.c (elfNN_aarch64_allocate_dynrelocs): Only make
419 undefined weak symbols into dynamic.
420 (elfNN_aarch64_final_link_relocate): Generate runtime RELATIVE
421 relocation for non-dynamic symbols.
422 (elfNN_aarch64_finish_dynamic_symbol): Add sanity check.
423
424 2017-06-29 Jiong Wang <jiong.wang@arm.com>
425
426 * elfnn-aarch64.c (aarch64_relocation_aginst_gp_p): New function.
427 (elfNN_aarch64_final_link_relocate): Delete duplicated code for
428 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15, BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
429 BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
430 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Optimize the
431 support for them.
432
433 2017-06-29 Andreas Arnez <arnez@linux.vnet.ibm.com>
434
435 * elf-bfd.h (elfcore_write_s390_gs_cb): Add prototype.
436 (elfcore_write_s390_gs_bc): Likewise.
437 * elf.c (elfcore_grok_s390_gs_cb): New function.
438 (elfcore_grok_s390_gs_bc): New function.
439 (elfcore_grok_note): Call them.
440 (elfcore_write_s390_gs_cb): New function.
441 (elfcore_write_s390_gs_bc): New function.
442 (elfcore_write_register_note): Call them.
443
444 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
445
446 * libbfd.c (_bfd_generic_get_section_contents): Don't call
447 bfd_get_file_size. Check archive element size.
448 (_bfd_generic_get_section_contents_in_window): Likewise.
449
450 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
451
452 * bfd-in2.h: Regenerated.
453 * bfdio.c (bfd_get_size): Change return type to ufile_ptr.
454 (bfd_get_file_size): Likewise.
455
456 2017-06-28 Maciej W. Rozycki <macro@imgtec.com>
457 Matthew Fortune <matthew.fortune@imgtec.com>
458
459 * archures.c (bfd_mach_mips_interaptiv_mr2): New macro.
460 * cpu-mips.c (I_interaptiv_mr2): New enum value.
461 (arch_info_struct): Add "mips:interaptiv-mr2" entry.
462 * elfxx-mips.c (_bfd_elf_mips_mach) <E_MIPS_MACH_IAMR2>: New
463 case.
464 (mips_set_isa_flags) <bfd_mach_mips_interaptiv_mr2>: Likewise.
465 (bfd_mips_isa_ext) <bfd_mach_mips_interaptiv_mr2>: Likewise.
466 (print_mips_isa_ext) <AFL_EXT_INTERAPTIV_MR2>: Likewise.
467 (mips_mach_extensions): Add `bfd_mach_mipsisa32r3' and
468 `bfd_mach_mips_interaptiv_mr2' entries.
469 * bfd-in2.h: Regenerate.
470
471 2017-06-27 Nick Clifton <nickc@redhat.com>
472
473 * tekhex.c (pass_over): Revert accidental conversion of a local
474 array to a static array.
475
476 2017-06-27 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
477
478 PR ld/13402
479 * elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Adjust
480 reloc addend if necessary. Adjust diff only if
481 shrinked_insn_address < end_address.
482
483 2017-06-27 Alan Modra <amodra@gmail.com>
484
485 PR binutils/21665
486 * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
487 (_bfd_generic_get_section_contents_in_window): Likewise.
488
489 2017-06-26 Kuan-Lin Chen <rufus@andestech.com>
490
491 * elfnn-riscv.c (perform_relocation): Support the new
492 R_RISCV_32_PCREL relocation.
493 (riscv_elf_relocate_section): Likewise.
494 * elfxx-riscv.c (howto_table): Likewise.
495 (riscv_reloc_map): Likewise.
496 * bfd-in2.h (BFD_RELOC_RISCV_32_PCREL): New relocation.
497 * libbfd.h: Regenerate.
498
499 2017-06-27 Alan Modra <amodra@gmail.com>
500
501 PR binutils/21665
502 * libbfd.c (_bfd_generic_get_section_contents): Delete abort.
503 Use unsigned file pointer type, and remove cast.
504 * libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise.
505 Add "count", not "sz".
506
507 2017-06-26 Pedro Alves <palves@redhat.com>
508
509 PR binutils/21665
510 * libbfd.c (_bfd_generic_get_section_contents): Add "count", not
511 "sz".
512
513 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
514
515 PR binutils/21665
516 * libbfd.c (_bfd_generic_get_section_contents_in_window): Add
517 a missing line.
518
519 2017-06-26 Maciej W. Rozycki <macro@imgtec.com>
520
521 * cpu-mips.c (arch_info_struct): Mark the 4010 32-bit.
522 * elfxx-mips.c (mips_set_isa_flags) <bfd_mach_mips4010>: Set
523 E_MIPS_ARCH_2 rather than E_MIPS_ARCH_3 in `e_flags'.
524 (mips_mach_extensions): Mark `bfd_mach_mips4010' as extending
525 `bfd_mach_mips6000' rather than `bfd_mach_mips4000'.
526
527 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
528
529 PR binutils/21665
530 * compress.c (bfd_get_full_section_contents): Don't check the
531 file size here.
532 * libbfd.c (_bfd_generic_get_section_contents): Check for and
533 reject a section whose size + offset is greater than the size
534 of the entire file.
535 (_bfd_generic_get_section_contents_in_window): Likewise.
536
537 2017-06-26 Nick Clifton <nickc@redhat.com>
538
539 PR binutils/21670
540 * tekhex.c (getvalue): Check for the source pointer exceeding the
541 end pointer before the first byte is read.
542
543 2017-06-26 Nick Clifton <nickc@redhat.com>
544
545 PR binutils/21665
546 * opncls.c (get_build_id): Check that the section is big enough
547 to contain the whole note.
548 * compress.c (bfd_get_full_section_contents): Check for and reject
549 a section whose size is greater than the size of the entire file.
550 * elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not
551 contain a notes section.
552
553 2017-06-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
554
555 * elf64-s390.c (elf_s390_additional_program_headers): Add NULL
556 pointer checks.
557 (elf_s390_modify_segment_map): Likewise.
558 (bfd_elf_s390_set_options): Lisewise.
559
560 2017-06-26 Alan Modra <amodra@gmail.com>
561
562 * elflink.c (_bfd_elf_link_create_dynstrtab): Don't make dynobj
563 a --just-syms bfd.
564 (_bfd_elf_size_group_sections): Skip --just-syms bfds.
565 (bfd_elf_size_dynamic_sections): Ignore .note.GNU-stack and
566 .preinit_array on --just-syms bfds.
567 (_bfd_elf_gc_mark_extra_sections): Skip --just-syms bfds.
568 (elf_gc_sweep, bfd_elf_parse_eh_frame_entries): Likewise.
569 (bfd_elf_gc_sections, bfd_elf_discard_info): Likewise.
570
571 2017-06-25 Sergei Trofimovich <slyfox@gentoo.org>
572
573 * elf.c (find_link): Bounds check "hint".
574
575 2017-06-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
576
577 * elf32-arm.c (using_thumb_only): Update list of architectures in
578 BFD_ASSERT for which the logic is valid.
579 (using_thumb2_bl): Likewise.
580 (using_thumb2): Likewise and return true for ARMv8-R.
581 (arch_has_arm_nop): Likewise.
582 (tag_cpu_arch_combine): New v8r table for ARMv8-R Tag_CPU_arch
583 merging logic. Update commentis for value 15 of v8m_baseline,
584 v8m_mainline and v4t_plus_v6_m arrays. Use v8r array to decide
585 merging of value 15 of Tag_CPU_arch.
586
587 2017-06-23 Jiong Wang <jiong.wang@arm.com>
588
589 * reloc.c (BFD_RELOC_AARCH64_ADR_GOTPAGE): Rename to
590 BFD_RELOC_AARCH64_ADR_GOT_PAGE
591 * bfd-in2.h: Regenerate.
592
593 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
594
595 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Move
596 the error_alignment label forward. Properly align program
597 property note section.
598
599 2017-06-22 Eric Christopher <echristo@gmail.com>
600
601 * elf32-arm.c (elf32_arm_final_link_relocate): Use labs rather than
602 abs to fix a truncation warning.
603
604 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
605
606 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Resolve
607 local undefined weak symbol to 0.
608 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Likewise.
609
610 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
611
612 * elf32-i386.c (elf_i386_merge_gnu_properties): If info->shstk
613 is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
614 (elf_i386_link_setup_gnu_properties): If info->shstk is set,
615 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
616 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): If
617 info->shstk is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
618 (elf_x86_64_link_setup_gnu_properties): If info->shstk is set,
619 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
620
621 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
622
623 * elf32-i386.c (elf_i386_lazy_ibt_plt0_entry): New.
624 (elf_i386_lazy_ibt_plt_entry): Likewise.
625 (elf_i386_pic_lazy_ibt_plt0_entry): Likewise.
626 (elf_i386_non_lazy_ibt_plt_entry): Likewise.
627 (elf_i386_pic_non_lazy_ibt_plt_entry): Likewise.
628 (elf_i386_eh_frame_lazy_ibt_plt): Likewise.
629 (elf_i386_lazy_plt_layout): Likewise.
630 (elf_i386_non_lazy_plt_layout): Likewise.
631 (elf_i386_link_hash_entry): Add plt_second.
632 (elf_i386_link_hash_table): Add plt_second and
633 plt_second_eh_frame.
634 (elf_i386_allocate_dynrelocs): Use the second PLT if needed.
635 (elf_i386_size_dynamic_sections): Use .plt.got unwind info for
636 the second PLT. Check the second PLT.
637 (elf_i386_relocate_section): Use the second PLT to resolve
638 PLT reference if needed.
639 (elf_i386_finish_dynamic_symbol): Fill and use the second PLT if
640 needed.
641 (elf_i386_finish_dynamic_sections): Set sh_entsize on the
642 second PLT. Generate unwind info for the second PLT.
643 (elf_i386_plt_type): Add plt_second.
644 (elf_i386_get_synthetic_symtab): Support the second PLT.
645 (elf_i386_parse_gnu_properties): Support
646 GNU_PROPERTY_X86_FEATURE_1_AND.
647 (elf_i386_merge_gnu_properties): Support
648 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
649 on GNU_PROPERTY_X86_FEATURE_1_IBT
650 (elf_i386_link_setup_gnu_properties): If info->ibt is set,
651 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
652 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
653 is set on all relocatable inputs.
654 * elf64-x86-64.c (elf_x86_64_lazy_ibt_plt_entry): New.
655 (elf_x32_lazy_ibt_plt_entry): Likewise.
656 (elf_x86_64_non_lazy_ibt_plt_entry): Likewise.
657 (elf_x32_non_lazy_ibt_plt_entry): Likewise.
658 (elf_x86_64_eh_frame_lazy_ibt_plt): Likewise.
659 (elf_x32_eh_frame_lazy_ibt_plt): Likewise.
660 (elf_x86_64_lazy_ibt_plt): Likewise.
661 (elf_x32_lazy_ibt_plt): Likewise.
662 (elf_x86_64_non_lazy_ibt_plt): Likewise.
663 (elf_x32_non_lazy_ibt_plt): Likewise.
664 (elf_x86_64_get_synthetic_symtab): Support the second PLT.
665 (elf_x86_64_parse_gnu_properties): Support
666 GNU_PROPERTY_X86_FEATURE_1_AND.
667 (elf_x86_64_merge_gnu_properties): Support
668 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
669 on GNU_PROPERTY_X86_FEATURE_1_IBT
670 (elf_x86_64_link_setup_gnu_properties): If info->ibt is set,
671 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
672 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
673 is set on all relocatable inputs.
674
675 2017-06-22 Nick Clifton <nickc@redhat.com>
676
677 PR binutils/21649
678 * som.c (setup_sections): NUL terminate the space_strings buffer.
679 Check that the space.name field does not index beyond the end of
680 the space_strings buffer.
681
682 2017-06-21 Nick Clifton <nickc@redhat.com>
683
684 PR binutils/21646
685 * coff-sh.c (sh_reloc): Check for an out of range reloc.
686
687 2017-06-21 Nick Clifton <nickc@redhat.com>
688
689 PR binutils/21639
690 * vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as
691 type of the size parameter.
692 (_bfd_vms_save_counted_string): Add second parameter - the maximum
693 length of the counted string.
694 * vms.h (_bfd_vms_save_sized_string): Update prototype.
695 (_bfd_vms_save_counted_string): Likewise.
696 * vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to
697 _bfd_vms_save_counted_string.
698 (_bfd_vms_slurp_ehdr): Likewise.
699 (_bfd_vms_slurp_egsd): Likewise.
700 (Parse_module): Likewise.
701
702 2017-06-21 Alan Modra <amodra@gmail.com>
703
704 * elf64-ppc.c (ppc64_elf_size_stubs): Test for localentry:0 plt
705 calls before tocsave calls.
706 (ppc64_elf_relocate_section): Allow localentry:0 plt calls without
707 following nop.
708
709 2017-06-21 Nick Clifton <nickc@redhat.com>
710
711 PR binutils/21645
712 * reloc.c (bfd_generic_get_relocated_section_contents): Fail if
713 bfd_get_full_section_contents returns no contents.
714
715 2017-06-21 Nick Clifton <nickc@redhat.com>
716
717 PR binutils/21638
718 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized
719 record.
720
721 2017-06-21 Nick Clifton <nickc@redhat.com>
722
723 PR binutils/21637
724 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section
725 list.
726 (image_set_ptr): Likewise.
727 (alpha_vms_fix_sec_rel): Likewise.
728 (alpha_vms_slurp_relocs): Likewise.
729
730 2017-06-21 Nick Clifton <nickc@redhat.com>
731
732 PR binutils/21633
733 * ieee.c (ieee_slurp_sections): Check for a NULL return from
734 read_id.
735 (ieee_archive_p): Likewise.
736 (ieee_object_p): Likewise.
737
738 2017-06-21 Nick Clifton <nickc@redhat.com>
739
740 PR binutils/21640
741 * elf.c (setup_group): Zero the group section pointer list after
742 allocation so that loops can be caught. Check for NULL pointers
743 when processing a group list.
744
745 2017-06-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
746
747 * elf-s390.h: New file.
748 * elf64-s390.c (struct elf_s390_link_hash_table): Add params
749 field.
750 (elf_s390_additional_program_headers): New function.
751 (elf_s390_modify_segment_map): New function.
752 (bfd_elf_s390_set_options): New function.
753 (elf_backend_additional_program_headers)
754 (elf_backend_modify_segment_map): Add macro definitions.
755
756 2017-06-19 H.J. Lu <hongjiu.lu@intel.com>
757
758 PR ld/21626
759 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
760 the DYNAMIC bit instead of bfd_count_sections.
761
762 2017-06-19 Nick Clifton <nickc@redhat.com>
763
764 PR binutils/21618
765 * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record
766 length.
767 (evax_bfd_print_eeom): Likewise.
768 (evax_bfd_print_egsd): Check for an overlarge record length.
769 (evax_bfd_print_etir): Likewise.
770
771 2017-06-19 Nick Clifton <nickc@redhat.com>
772
773 PR binutils/21612
774 * libieee.h (struct common_header_type): Add end_p field.
775 * ieee.c (this_byte_and_next): Do not advance input_p beyond
776 end_p.
777 (read_id): Check for a length that exceeds the remaining bytes in
778 the input buffer.
779 (ieee_seek): Initialise end_p.
780 (ieee_archive_p): Likewise.
781 (ieee_object_p): Likewise.
782
783 2017-06-19 Nick Clifton <nickc@redhat.com>
784
785 PR binutils/21611
786 * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset
787 before reading the EIHS structure entries.
788
789 2017-06-19 Nick Clifton <nickc@redhat.com>
790
791 PR binutils/21615
792 * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for
793 gsd_size. Check that there are enough bytes remaining to read the
794 type and size of the next egsd. Check that the size of the egsd
795 does not exceed the size of the record.
796
797 2017-06-19 Alan Modra <amodra@gmail.com>
798
799 * config.bfd: Correct targ_underscore for cris.
800
801 2017-06-18 Alan Modra <amodra@gmail.com>
802
803 * config.bfd: Correct targ_underscore for epiphany, ip2k,
804 m32c, mn10200, pru, rl78, rx, crisv32 and v850.
805
806 2017-06-16 Nick Clifton <nickc@redhat.com>
807
808 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
809 bucketlist is empty because there are no symbols to add to the
810 list.
811
812 2017-06-16 Alan Modra <amodra@gmail.com>
813
814 PR ld/20022
815 PR ld/21557
816 PR ld/21562
817 PR ld/21571
818 * targets.c (struct bfd_target): Add _bfd_define_start_stop.
819 (BFD_JUMP_TABLE_LINK): Likewise.
820 * elf-bfd.h (bfd_elf_define_start_stop): Declare.
821 * elflink.c (_bfd_elf_gc_mark_rsec): Update comment.
822 (bfd_elf_define_start_stop): New function.
823 * linker.c (bfd_generic_define_start_stop): New function.
824 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init
825 new field.
826 * aout-adobe.c (aout_32_bfd_define_start_stop): Define.
827 * aout-target.h (MY_bfd_define_start_stop): Define.
828 * aout-tic30.c (MY_bfd_define_start_stop): Define.
829 * binary.c (binary_bfd_define_start_stop): Define.
830 * bout.c (b_out_bfd_define_start_stop): Define.
831 * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define.
832 * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define.
833 * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define.
834 * coffcode.h (coff_bfd_define_start_stop): Define.
835 * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define.
836 * i386msdos.c (msdos_bfd_define_start_stop): Define.
837 * i386os9k.c (os9k_bfd_define_start_stop): Define.
838 * ieee.c (ieee_bfd_define_start_stop): Define.
839 * ihex.c (ihex_bfd_define_start_stop): Define.
840 * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define.
841 * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define.
842 * mmo.c (mmo_bfd_define_start_stop): Define.
843 * nlm-target.h (nlm_bfd_define_start_stop): Define.
844 * oasys.c (oasys_bfd_define_start_stop): Define.
845 * pef.c (bfd_pef_bfd_define_start_stop): Define.
846 * plugin.c (bfd_plugin_bfd_define_start_stop): Define.
847 * ppcboot.c (ppcboot_bfd_define_start_stop): Define.
848 * som.c (som_bfd_define_start_stop): Define.
849 * srec.c (srec_bfd_define_start_stop): Define.
850 * tekhex.c (tekhex_bfd_define_start_stop): Define.
851 * versados.c (versados_bfd_define_start_stop): Define.
852 * vms-alpha.c (vms_bfd_define_start_stop): Define.
853 (alpha_vms_bfd_define_start_stop): Define.
854 * xsym.c (bfd_sym_bfd_define_start_stop): Define.
855 * bfd-in2.h: Regenerate.
856 * libbfd.h: Regenerate.
857
858 2017-06-16 Jiong Wang <jiong.wang@arm.com>
859
860 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
861 SYMBOL_REFERENCES_LOCAL.
862
863 2017-06-15 Jiong Wang <jiong.wang@arm.com>
864
865 PR ld/21532
866 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
867 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
868 runtime for if there needs copy relocation elimination.
869 (need_copy_relocation_p): New function. Return true for symbol with
870 pc-relative references and if it's against read-only sections.
871 (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
872 (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
873 that are related with accessing external objects.
874 (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change
875 in elfNN_aarch64_check_relocs.
876
877 2017-06-15 Nick Clifton <nickc@redhat.com>
878
879 PR binutils/21582
880 * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
881 bugs.
882 PR binutils/21581
883 (ieee_archive_p): Likewise.
884
885 2017-06-15 Nick Clifton <nickc@redhat.com>
886
887 PR binutils/21579
888 * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
889
890 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
891
892 * elf32-xtensa.c (elf_xtensa_be_plt_entry,
893 elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays,
894 keep both windowed and call0 ABI PLT definitions.
895 (elf_xtensa_create_plt_entry): Use selected ABI to choose upper
896 elf_xtensa_*_plt_entry endex.
897 (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size.
898
899 2017-06-14 Nick Clifton <nickc@redhat.com>
900
901 PR binutils/21578
902 * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
903 flag value.
904
905 2017-06-14 Nick Clifton <nickc@redhat.com>
906
907 PR binutils/21589
908 * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
909 maximum value for the ascic pointer. Check that name processing
910 does not read beyond this value.
911 (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
912 end of etir record.
913
914 2017-06-14 Nick Clifton <nickc@redhat.com>
915
916 PR binutils/21591
917 * versados.c (versados_mkobject): Zero the allocated tdata structure.
918 (process_otr): Check for an invalid offset in the otr structure.
919
920 2017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
921
922 * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
923
924 2017-06-13 H.J. Lu <hongjiu.lu@intel.com>
925
926 PR ld/20022
927 PR ld/21557
928 PR ld/21562
929 PR ld/21571
930 * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
931 vtable field to a union.
932 (_bfd_elf_is_start_stop): Removed.
933 * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
934 __start_SECNAME and __stop_SECNAME symbols.
935 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
936 * elflink.c (_bfd_elf_is_start_stop): Removed.
937 (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
938 _bfd_elf_is_start_stop.
939 (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
940 __stop_SECNAME symbols. Updated.
941 (elf_gc_smash_unused_vtentry_relocs): Likewise.
942 (bfd_elf_gc_record_vtinherit): Likewise.
943 (bfd_elf_gc_record_vtentry): Likewise.
944
945 2017-06-13 Nick Clifton <nickc@redhat.com>
946
947 PR ld/21524
948 * elflink.c (elf_link_adjust_relocs): Generate an error when
949 encountering a reloc against a symbol removed by garbage
950 collection.
951
952 2017-06-12 H.J. Lu <hongjiu.lu@intel.com>
953
954 * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
955 to merge_gnu_properties.
956 * elf-properties.c (elf_merge_gnu_properties): Add struct
957 bfd_link_info * and pass it to merge_gnu_properties.
958 (elf_merge_gnu_property_list): Add struct bfd_link_info *
959 and pass it to elf_merge_gnu_properties.
960 (_bfd_elf_link_setup_gnu_properties): Pass info to
961 elf_merge_gnu_property_list.
962 * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
963 bfd_link_info *.
964 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
965
966 2017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
967
968 PR 21564
969 * binary.c (binary_set_section_contents): Scale lma by octets
970 per byte to set filepos.
971
972 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
973
974 * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
975 dynamic sections.
976
977 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
978
979 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
980 require TEXTREL.
981
982 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
983
984 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
985 patched section contents for TLS IE reloc.
986 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
987
988 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
989
990 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
991 RELOC_FOR_GLOBAL_SYMBOL macro.
992
993 2018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
994
995 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
996 changes.
997
998 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
999
1000 * config/tc-arc.c (md_undefined_symbol): Changed.
1001 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
1002
1003 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1004
1005 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
1006 symbols.
1007
1008 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1009
1010 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
1011 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
1012
1013 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1014
1015 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
1016 object is created.
1017
1018 2017-06-08 Richard Earnshaw <rearnsha@arm.com>
1019
1020 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
1021 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
1022 is non-zero. Add clarifying comments.
1023
1024 2017-06-08 H.J. Lu <hongjiu.lu@intel.com>
1025
1026 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
1027 name. Use local IFUNC symbol name string to report unsupported
1028 non-PIC call to IFUNC function.
1029 (elf_i386_relocate_section): Dump local IFUNC name with minfo
1030 when generating R_386_IRELATIVE relocation.
1031 (elf_i386_finish_dynamic_symbol): Likewise.
1032 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
1033 IFUNC symbol name.
1034 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
1035 when generating R_X86_64_IRELATIVE relocation.
1036 (elf_x86_64_finish_dynamic_symbol): Likewise.
1037
1038 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
1039
1040 * elf.c (setup_group): Make sure BFD sections are created for all
1041 group sections in the input file when processing SHF_GROUP
1042 sections.
1043 (bfd_section_from_shdr): Avoid duplicating logic already
1044 implemented in `setup_group'.
1045
1046 2017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
1047
1048 PR binutils/21546
1049 * peXXigen.c (pe_print_idata): Use the address of the first thunk
1050 if the hint address is zero.
1051
1052 2017-06-06 James Clarke <jrtc27@jrtc27.com>
1053
1054 PR ld/19579
1055 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
1056 ELF_COMMON_DEF_P for common symbols.
1057
1058 2017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
1059
1060 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
1061 SEC_GROUP sections as SEC_EXCLUDE.
1062 (bfd_elf_set_group_contents): Replace use of abort with an assert.
1063 (assign_section_numbers): Use resolve_section_groups flag instead
1064 of relocatable link type.
1065 (_bfd_elf_init_private_section_data): Use resolve_section_groups
1066 flag instead of checking the final_link flag for part of the
1067 checks in here. Fix white space as a result.
1068 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
1069 instead of relocatable link type.
1070 (bfd_elf_final_link): Likewise.
1071
1072 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
1073
1074 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
1075 variable `bed'.
1076 * elf32-score.c (score_elf_final_link_relocate): Likewise.
1077 (s3_bfd_score_elf_check_relocs): Likewise.
1078 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
1079 (score_elf_final_link_relocate): Likewise.
1080 (s7_bfd_score_elf_check_relocs): Likewise.
1081
1082 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
1083
1084 * elflink.c (init_reloc_cookie_rels): Remove unused variable
1085 `bed'.
1086
1087 2017-06-06 Maciej W. Rozycki <macro@imgtec.com>
1088
1089 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
1090 from `reloc_count' rather than decrementing it.
1091 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
1092 `reloc_count' by `int_rels_per_ext_rel'.
1093 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
1094 `reloc_count' by `int_rels_per_ext_rel' for last relocation
1095 entry determination.
1096 (s3_bfd_score_elf_check_relocs): Likewise.
1097 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
1098 (s7_bfd_score_elf_relocate_section): Likewise.
1099 (s7_bfd_score_elf_check_relocs): Likewise.
1100 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
1101 prototype and function.
1102 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
1103 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
1104 triple rather than once the sum of REL and RELA relocation entry
1105 counts.
1106 (bfd_elf64_get_reloc_upper_bound): Remove macro.
1107 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
1108 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
1109 storage allocation size determination.
1110 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
1111 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
1112 by `int_rels_per_ext_rel' for last relocation entry
1113 determination.
1114 (bfd_elf_final_link): Do not multiply `reloc_count' by
1115 `int_rels_per_ext_rel' for internal relocation storage
1116 allocation size determination.
1117 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
1118 `int_rels_per_ext_rel' for last relocation entry determination.
1119 (elf_gc_smash_unused_vtentry_relocs): Likewise.
1120 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
1121 (_bfd_mips_elf_relocate_section): Likewise.
1122
1123 2017-06-05 Alan Modra <amodra@gmail.com>
1124
1125 PR 21529
1126 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
1127
1128 2017-06-01 John Baldwin <jhb@FreeBSD.org>
1129
1130 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
1131 determine structure sizes.
1132 (elfcore_grok_freebsd_prstatus): Likewise.
1133
1134 2017-06-01 Alan Modra <amodra@gmail.com>
1135
1136 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
1137 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
1138 dynamic objects.
1139 (is_elfv2_localentry0): New function.
1140 (ppc64_elf_tls_setup): Default params->plt_localentry0.
1141 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
1142 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
1143 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
1144 optimized localentry:0 stubs.
1145 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
1146 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
1147 localentry:0 stubs.
1148 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
1149 DT_PPC64_OPT.
1150 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
1151
1152 2017-05-30 Casey Smith <clegg89@gmail.com>
1153
1154 PR ld/21523
1155 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
1156 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
1157
1158 2017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
1159
1160 * cpu-arc.c (arc_compatible): New function.
1161
1162 2017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
1163
1164 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
1165
1166 2017-05-30 H.J. Lu <hongjiu.lu@intel.com>
1167
1168 PR binutils/21519
1169 * bfdio.c (bfd_get_file_size): New function.
1170 * bfd-in2.h: Regenerated.
1171
1172 2017-05-23 Dilian Palauzov <git-dpa@aegee.org>
1173
1174 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
1175 comments.
1176
1177 2017-05-22 H.J. Lu <hongjiu.lu@intel.com>
1178
1179 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
1180 dynobj instead of htab->elf.dynobj.
1181
1182 2017-05-19 Maciej W. Rozycki <macro@imgtec.com>
1183
1184 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
1185 and function.
1186 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
1187 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
1188 actual number of internal relocations retrieved. Adjust
1189 function description.
1190 (bfd_elf64_canonicalize_reloc): Remove macro.
1191 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
1192
1193 2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
1194
1195 * archures.c (bfd_mach_sparc_v9m8): Define.
1196 (bfd_mach_sparc_v8plusm8): Likewise.
1197 (bfd_mach_sparc_v9_p): Adjust to M8.
1198 (bfd_mach_sparc_64bit_p): Likewise.
1199 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
1200 bfd_mach_sparc_v8plusm8.
1201 * bfd-in2.h: Regenerated.
1202 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
1203 sparc:v8plusm8.
1204 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
1205 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
1206 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
1207 SHA3.
1208 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
1209 bfd_mach_sparc_v8plusm8.
1210
1211 2017-05-19 Alan Modra <amodra@gmail.com>
1212
1213 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
1214 debug and special sections when no non-note alloc sections in an
1215 object are kept.
1216
1217 2017-05-18 Alan Modra <amodra@gmail.com>
1218
1219 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
1220 * elf-m10300.c: Likewise.
1221 * elf.c: Likewise.
1222 * elf32-arc.c: Likewise.
1223 * elf32-bfin.c: Likewise.
1224 * elf32-m68k.c: Likewise.
1225 * elf32-nds32.c: Likewise.
1226 * elf32-tilepro.c: Likewise.
1227 * elflink.c: Likewise.
1228 * elfnn-aarch64.c: Likewise.
1229 * elfnn-riscv.c: Likewise.
1230 * elfxx-tilegx.c: Likewise.
1231 * mach-o.c: Likewise.
1232 * peXXigen.c: Likewise.
1233 * vms-alpha.c: Likewise.
1234 * vms-lib.c: Likewise.
1235
1236 2017-05-17 H.J. Lu <hongjiu.lu@intel.com>
1237
1238 PR ld/20882
1239 * elflink.c (elf_gc_mark_debug_section): New function.
1240 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
1241 referenced by kept debug sections.
1242
1243 2017-05-16 Alan Modra <amodra@gmail.com>
1244
1245 * elf-m10300.c: Rename occurrences of non_ir_ref.
1246 * elf32-arm.c: Likewise.
1247 * elf32-bfin.c: Likewise.
1248 * elf32-cr16.c: Likewise.
1249 * elf32-cris.c: Likewise.
1250 * elf32-d10v.c: Likewise.
1251 * elf32-dlx.c: Likewise.
1252 * elf32-fr30.c: Likewise.
1253 * elf32-frv.c: Likewise.
1254 * elf32-hppa.c: Likewise.
1255 * elf32-i370.c: Likewise.
1256 * elf32-i386.c: Likewise.
1257 * elf32-iq2000.c: Likewise.
1258 * elf32-lm32.c: Likewise.
1259 * elf32-m32c.c: Likewise.
1260 * elf32-m32r.c: Likewise.
1261 * elf32-m68hc1x.c: Likewise.
1262 * elf32-m68k.c: Likewise.
1263 * elf32-mcore.c: Likewise.
1264 * elf32-metag.c: Likewise.
1265 * elf32-microblaze.c: Likewise.
1266 * elf32-moxie.c: Likewise.
1267 * elf32-msp430.c: Likewise.
1268 * elf32-mt.c: Likewise.
1269 * elf32-nios2.c: Likewise.
1270 * elf32-or1k.c: Likewise.
1271 * elf32-ppc.c: Likewise.
1272 * elf32-rl78.c: Likewise.
1273 * elf32-s390.c: Likewise.
1274 * elf32-score.c: Likewise.
1275 * elf32-score7.c: Likewise.
1276 * elf32-sh.c: Likewise.
1277 * elf32-tic6x.c: Likewise.
1278 * elf32-tilepro.c: Likewise.
1279 * elf32-v850.c: Likewise.
1280 * elf32-vax.c: Likewise.
1281 * elf32-xstormy16.c: Likewise.
1282 * elf32-xtensa.c: Likewise.
1283 * elf64-alpha.c: Likewise.
1284 * elf64-hppa.c: Likewise.
1285 * elf64-ia64-vms.c: Likewise.
1286 * elf64-mmix.c: Likewise.
1287 * elf64-ppc.c: Likewise.
1288 * elf64-s390.c: Likewise.
1289 * elf64-sh64.c: Likewise.
1290 * elf64-x86-64.c: Likewise.
1291 * elflink.c: Likewise.
1292 * elfnn-aarch64.c: Likewise.
1293 * elfnn-ia64.c: Likewise.
1294 * elfnn-riscv.c: Likewise.
1295 * elfxx-mips.c: Likewise.
1296 * elfxx-sparc.c: Likewise.
1297 * elfxx-tilegx.c: Likewise.
1298 * linker.c: Likewise.
1299
1300 2017-05-16 Alan Modra <amodra@gmail.com>
1301
1302 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
1303 * elflink.c (elf_link_add_object_symbols): Update to use
1304 non_ir_ref_dynamic.
1305 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
1306 non_ir_ref.
1307 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
1308
1309 2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
1310
1311 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
1312
1313 2017-05-12 H.J. Lu <hongjiu.lu@intel.com>
1314
1315 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
1316 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
1317 properties.
1318 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
1319
1320 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
1321
1322 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
1323 to plt_second.
1324 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
1325 to plt_second/plt_second_eh_frame.
1326 (elf_x86_64_link_hash_newfunc): Updated.
1327 (elf_x86_64_allocate_dynrelocs): Likewise.
1328 (elf_x86_64_size_dynamic_sections): Likewise.
1329 (elf_x86_64_relocate_section): Likewise.
1330 (elf_x86_64_finish_dynamic_symbol): Likewise.
1331 (elf_x86_64_finish_dynamic_sections): Likewise.
1332 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
1333 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
1334 .plt.sec section.
1335 (elf_backend_setup_gnu_properties): Updated. Create the
1336 .plt.sec section instead of the .plt.sec section.
1337
1338 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
1339
1340 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
1341 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
1342 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
1343
1344 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
1345
1346 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
1347 (bfd_elf64_set_reloc): Define.
1348 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
1349
1350 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
1351
1352 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
1353 (struct bfd_target): New field _bfd_set_reloc.
1354 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
1355 * reloc.c (_bfd_generic_set_reloc): New function.
1356 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
1357 * nlm-target.h (nlm_set_reloc): Likewise.
1358 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
1359 * aout-tic30.c (MY_set_reloc): Likewise.
1360 * aout-target.h (MY_set_reloc): Likewise.
1361 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
1362 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
1363 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
1364 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
1365 * aout-adobe.c (aout_32_set_reloc): Likewise.
1366 * bout.c (b_out_set_reloc): Likewise.
1367 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
1368 * i386os9k.c (aout_32_set_reloc): Likewise.
1369 * ieee.c (ieee_set_reloc): Likewise.
1370 * oasys.c (oasys_set_reloc): Likewise.
1371 * som.c (som_set_reloc): Likewise.
1372 * versados.c (versados_set_reloc): Likewise.
1373 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
1374 _bfd_generic_set_reloc.
1375 (rs6000_xcoff64_aix_vec): LIkewise.
1376 * libbfd.c (_bfd_norelocs_set_reloc): New function.
1377 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
1378 * i386msdos.c (msdos_set_reloc): Define to
1379 _bfd_norelocs_set_reloc.
1380 * elfcode.h (elf_set_reloc): Define.
1381 * bfd-in2.h: Regenerated.
1382
1383 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
1384
1385 PR ld/21481
1386 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
1387 for IFUNC function address.
1388
1389 2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
1390
1391 * elf32-arc.c (FEATURE_LIST_NAME): Define.
1392 (CONFLICT_LIST): Likewise.
1393 (opcode/arc-attrs.h): Include.
1394 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
1395 (arc_extract_features): New file.
1396 (arc_stralloc): Likewise.
1397 (arc_elf_merge_attributes): Likewise.
1398 (arc_elf_merge_private_bfd_data): Use object attributes.
1399 (bfd_arc_get_mach_from_attributes): New function.
1400 (arc_elf_object_p): Use object attributes.
1401 (arc_elf_final_write_processing): Likewise.
1402 (elf32_arc_obj_attrs_arg_type): New function.
1403 (elf32_arc_obj_attrs_handle_unknown): Likewise.
1404 (elf32_arc_section_from_shdr): Likewise.
1405 (elf_backend_obj_attrs_vendor): Define.
1406 (elf_backend_obj_attrs_section): Likewise.
1407 (elf_backend_obj_attrs_arg_type): Likewise.
1408 (elf_backend_obj_attrs_section_type): Likewise.
1409 (elf_backend_obj_attrs_handle_unknown): Likewise.
1410 (elf_backend_section_from_shdr): Likewise.
1411
1412 2017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
1413
1414 PR ld/21458
1415 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
1416 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
1417 and the destination is a Thumb symbol.
1418
1419 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
1420
1421 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
1422 initializer to silence GCC 4.2.
1423 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1424
1425 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
1426
1427 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
1428 (LAZY_PLT_ENTRY_SIZE): This.
1429 (NON_LAZY_PLT_ENTRY_SIZE): New.
1430 (elf_x86_64_plt0_entry): Renamed to ...
1431 (elf_x86_64_lazy_plt0_entry): This.
1432 (elf_x86_64_plt_entry): Renamed to ...
1433 (elf_x86_64_lazy_plt_entry): This.
1434 (elf_x86_64_bnd_plt0_entry): Renamed to ...
1435 (elf_x86_64_lazy_bnd_plt0_entry): This.
1436 (elf_x86_64_legacy_plt_entry): Removed.
1437 (elf_x86_64_bnd_plt_entry): Renamed to ...
1438 (elf_x86_64_lazy_bnd_plt_entry): This.
1439 (elf_x86_64_legacy_plt2_entry): Renamed to ...
1440 (elf_x86_64_non_lazy_plt_entry): This.
1441 (elf_x86_64_bnd_plt2_entry): Renamed to ...
1442 (elf_x86_64_non_lazy_bnd_plt_entry): This.
1443 (elf_x86_64_eh_frame_plt): Renamed to ...
1444 (elf_x86_64_eh_frame_lazy_plt): This.
1445 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
1446 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
1447 (elf_x86_64_eh_frame_plt_got): Renamed to ...
1448 (elf_x86_64_eh_frame_non_lazy_plt): This.
1449 (elf_x86_64_lazy_plt_layout): New.
1450 (elf_x86_64_non_lazy_plt_layout): Likewise.
1451 (elf_x86_64_plt_layout): Likewise.
1452 (elf_x86_64_backend_data): Remove PLT layout information. Add
1453 os for target system.
1454 (GET_PLT_ENTRY_SIZE): Removed.
1455 (elf_x86_64_lazy_plt): New.
1456 (elf_x86_64_non_lazy_plt): Likewise.
1457 (elf_x86_64_lazy_bnd_plt): Likewise.
1458 (elf_x86_64_non_lazy_bnd_plt): Likewise.
1459 (elf_x86-64_arch_bed): Updated.
1460 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
1461 (elf_x86_64_create_dynamic_sections): Removed.
1462 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
1463 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
1464 (elf_x86-64_adjust_dynamic_symbol): Updated.
1465 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
1466 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
1467 size for PLT0 if there is no PLT0. Get plt_entry_size from
1468 non_lazy_plt for non-lazy PLT entries.
1469 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
1470 from non_lazy_plt for non-lazy PLT entries.
1471 (elf_x86-64_relocate_section): Updated. Properly get PLT index
1472 if there is no PLT0.
1473 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
1474 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
1475 entries with non-lazy PLT layout. Don't fill the second and third
1476 slots in the PLT entry if there is no PLT0.
1477 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
1478 if there is no PLT0. Set sh_entsize on the .plt.got section.
1479 (compare_relocs): New.
1480 (elf_x86_64_plt_type): Likewise.
1481 (elf_x86_64_plt): Likewise.
1482 (elf_x86_64_nacl_plt): New. Forward declaration.
1483 (elf_x86_64_get_plt_sym_val): Removed.
1484 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
1485 against all dynamic relocations.
1486 (elf_x86_64_link_setup_gnu_properties): New function.
1487 (elf_backend_create_dynamic_sections): Updated.
1488 (elf_backend_setup_gnu_properties): New.
1489 (elf_x86_64_nacl_plt): New.
1490 (elf_x86_64_nacl_arch_bed): Updated.
1491
1492 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
1493
1494 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
1495 (LAZY_PLT_ENTRY_SIZE): This.
1496 (NON_LAZY_PLT_ENTRY_SIZE): New.
1497 (elf_i386_plt0_entry): Renamed to ...
1498 (elf_i386_lazy_plt0_entry): This.
1499 (elf_i386_plt_entry): Renamed to ...
1500 (elf_i386_lazy_plt_entry): This.
1501 (elf_i386_pic_plt0_entry): Renamed to ...
1502 (elf_i386_pic_lazy_plt0_entry): This.
1503 (elf_i386_pic_plt_entry): Renamed to ...
1504 (elf_i386_pic_lazy_plt_entry): This.
1505 (elf_i386_got_plt_entry): Renamed to ...
1506 (elf_i386_non_lazy_plt_entry): This.
1507 (elf_i386_pic_got_plt_entry): Renamed to ...
1508 (elf_i386_pic_non_lazy_plt_entry): This.
1509 (elf_i386_eh_frame_plt): Renamed to ...
1510 (elf_i386_eh_frame_lazy_plt): This.
1511 (elf_i386_eh_frame_plt_got): Renamed to ...
1512 (elf_i386_eh_frame_non_lazy_plt): This.
1513 (elf_i386_plt_layout): Renamed to ...
1514 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
1515 eh_frame_plt_got_size.
1516 (elf_i386_non_lazy_plt_layout): New.
1517 (elf_i386_plt_layout): Likewise.
1518 (elf_i386_non_lazy_plt): Likewise.
1519 (GET_PLT_ENTRY_SIZE): Removed.
1520 (elf_i386_plt): Renamed to ...
1521 (elf_i386_lazy_plt): This.
1522 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
1523 (elf_i386_arch_bed): Updated.
1524 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
1525 (elf_i386_create_dynamic_sections): Removed.
1526 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
1527 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
1528 (elf_i386_adjust_dynamic_symbol): Updated.
1529 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
1530 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
1531 size for PLT0 if there is no PLT0.
1532 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
1533 output section is discarded only if GOT isn't empty.
1534 (elf_i386_relocate_section): Updated. Properly get PLT index
1535 if there is no PLT0.
1536 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
1537 second and third slots in the PLT entry if there is no PLT0.
1538 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
1539 if there is no PLT0. Set sh_entsize on the .plt.got section.
1540 (elf_i386_nacl_plt): Forward declaration.
1541 (elf_i386_get_plt_sym_val): Removed.
1542 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
1543 against all dynamic relocations.
1544 (elf_i386_link_setup_gnu_properties): New function.
1545 (elf_backend_create_dynamic_sections): Updated.
1546 (elf_backend_setup_gnu_properties): New.
1547 (elf_i386_nacl_plt): Updated.
1548 (elf_i386_nacl_arch_bed): Likewise.
1549 (elf_i386_vxworks_arch_bed): Likewise.
1550
1551 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
1552
1553 * elflink.c (elf_output_implib): Remove executable flag from import
1554 library bfd.
1555 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
1556 library is a relocatable object file.
1557
1558 2017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
1559
1560 PR ld/21404
1561 * elf32-avr.c (avr_should_move_sym): New function.
1562 (avr_should_reduce_sym_size): Likewise.
1563 (avr_should_increase_sym_size): Likewise.
1564 (elf32_avr_relax_delete_bytes): Adjust symbol values
1565 and sizes by calling new functions.
1566
1567 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
1568
1569 * config.bfd (riscv32-*): Enable rv64.
1570
1571 2017-05-02 Alan Modra <amodra@gmail.com>
1572
1573 PR 21384
1574 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
1575 rather than h->root.type == bfd_link_hash_new.
1576 (bfd_elf_record_link_assignment): Similarly, call
1577 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
1578
1579 2017-04-29 Alan Modra <amodra@gmail.com>
1580
1581 PR 21432
1582 * reloc.c (reloc_offset_in_range): New function.
1583 (bfd_perform_relocation, bfd_install_relocation): Use it.
1584 (_bfd_final_link_relocate): Likewise.
1585
1586 2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
1587
1588 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
1589 before using .plt.got.
1590 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
1591
1592 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
1593
1594 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
1595 instead of "+=" to update 0.
1596
1597 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
1598
1599 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
1600 .plt.got section here.
1601 (elf_i386_check_relocs): Don't create the .plt.got section.
1602 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
1603 the .plt.got and .plt.bnd sections here.
1604 (elf_x86_64_check_relocs): Don't create the .plt.got nor
1605 .plt.bnd sections.
1606
1607 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
1608
1609 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
1610 has_bnd_reloc.
1611 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
1612 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
1613 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
1614 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
1615 has_bnd_reloc.
1616
1617 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
1618
1619 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
1620 to return bfd *.
1621 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
1622 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
1623 the first relocatable ELF input with GNU properties.
1624
1625 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
1626
1627 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
1628 VxWorks for non-PIC.
1629
1630 2017-04-27 Alan Modra <amodra@gmail.com>
1631
1632 * elf-bfd.h (struct elf_backend_data): Make asection param of
1633 elf_backend_eh_frame_address_size const.
1634 (_bfd_elf_eh_frame_address_size): Likewise.
1635 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
1636 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
1637 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
1638 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
1639 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
1640 (next_cie_fde_offset): Constify params.
1641 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
1642
1643 2017-04-27 Alan Modra <amodra@gmail.com>
1644
1645 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
1646 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
1647 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
1648 aug_data_len.
1649 (offset_adjust): New function.
1650 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
1651 (adjust_eh_frame_local_symbols): Likewise.
1652 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
1653 after changing anything. Return true if anything changed.
1654 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
1655 _bfd_elf_adjust_eh_frame_global_symbol for globals.
1656
1657 2017-04-27 Alan Modra <amodra@gmail.com>
1658
1659 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
1660 when force_local.
1661
1662 2017-04-27 Alan Modra <amodra@gmail.com>
1663
1664 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
1665 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
1666 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
1667 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
1668 for undef and undefweak dyn_relocs.
1669 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
1670 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
1671 (allocate_got, allocate_dynrelocs): Likewise.
1672 (ppc64_elf_relocate_section): Likewise.
1673
1674 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
1675
1676 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
1677 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
1678 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
1679 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
1680
1681 2017-04-26 Nick Clifton <nickc@redhat.com>
1682
1683 PR binutils/21434
1684 * reloc.c (bfd_perform_relocation): Check for a negative address
1685 in the reloc.
1686
1687 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
1688
1689 PR ld/21334
1690 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
1691 member.
1692 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
1693 (elf_backend_always_renumber_dynsyms): Define.
1694 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
1695 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
1696 * elflink.c (bfd_elf_size_dynamic_sections): Also call
1697 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
1698 it.
1699 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
1700
1701 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
1702
1703 * elflink.c (bfd_elf_size_dynamic_sections): Only call
1704 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
1705 sections have been created.
1706
1707 2017-04-26 Nick Clifton <nickc@redhat.com>
1708
1709 PR binutils/21431
1710 * compress.c (bfd_init_section_compress_status): Check the return
1711 value from bfd_malloc.
1712
1713 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
1714
1715 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
1716 no_finish_dynamic_symbol.
1717 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
1718 0.
1719 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
1720 weak symbol, don't make it dynamic.
1721 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
1722 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
1723 relocation for GOT reference.
1724 (elf_x86_64_finish_dynamic_symbol): Abort if
1725 no_finish_dynamic_symbol isn't 0.
1726
1727 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
1728
1729 PR ld/21402
1730 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
1731 undefined weak symbol, don't make it dynamic.
1732 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
1733 set no_finish_dynamic_symbol and generate R_386_RELATIVE
1734 relocation for R_386_GOT32.
1735
1736 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
1737
1738 PR ld/21425
1739 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
1740
1741 2017-04-23 Alan Modra <amodra@gmail.com>
1742
1743 PR 21414
1744 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
1745 * elf.c (lcomm_sym): New.
1746 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
1747 * bfd-in2.h: Regenerate.
1748
1749 2017-04-23 Alan Modra <amodra@gmail.com>
1750
1751 PR 21412
1752 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
1753 parameters and comment.
1754 (_bfd_elf_get_reloc_section): Delete.
1755 (_bfd_elf_plt_get_reloc_section): Declare.
1756 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
1757 New functions. Don't blindly skip over assumed .rel/.rela prefix.
1758 Extracted from..
1759 (_bfd_elf_get_reloc_section): ..here. Delete.
1760 (assign_section_numbers): Call elf_get_reloc_section.
1761 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
1762 * elfxx-target.h (elf_backend_get_reloc_section): Update.
1763
1764 2017-04-23 Alan Modra <amodra@gmail.com>
1765
1766 PR 21409
1767 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
1768 no symbols.
1769
1770 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
1771
1772 PR ld/21402
1773 * elf32-i386.c (elf_i386_link_hash_entry): Add
1774 no_finish_dynamic_symbol.
1775 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
1776 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
1777 symbol, don't make it dynamic in PIE.
1778 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
1779 set no_finish_dynamic_symbol and generate R_386_RELATIVE
1780 relocation for R_386_GOT32
1781 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
1782 isn't 0.
1783
1784 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
1785
1786 PR ld/19617
1787 PR ld/21086
1788 * elflink.c (elf_link_add_object_symbols): Require
1789 --no-dynamic-linker with -E/--dynamic-list when creating
1790 dynamic sections.
1791
1792 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
1793
1794 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
1795 if forced local.
1796
1797 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
1798
1799 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
1800 dynamic symbol sorting.
1801
1802 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
1803
1804 PR ld/21382
1805 * elflink.c (elf_link_add_object_symbols): Preserve
1806 dynamic_ref_after_ir_def when restoring the symbol table for
1807 unneeded dynamic object.
1808
1809 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
1810
1811 PR ld/21401
1812 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
1813 on on undefined IFUNC symbol in the second PLT.
1814
1815 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
1816
1817 * peXXigen.c (pe_print_reloc): Correct chunk_end.
1818
1819 2017-04-19 Alan Modra <amodra@gmail.com>
1820
1821 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
1822 or make dynamic for info->dynamic_undefined_weak 0 and 1.
1823 * elf32-ppc.c:Formatting.
1824 (ensure_undefweak_dynamic): Don't make dynamic when
1825 info->dynamic_undefined_weak is zero.
1826 (allocate_dynrelocs): Discard undefweak dyn_relocs for
1827 info->dynamic_undefined_weak. Discard undef dyn_relocs when
1828 not default visibility. Discard undef and undefweak
1829 dyn_relocs earlier.
1830 (ppc_elf_relocate_section): Adjust to suit.
1831 * elf64-ppc.c: Formatting.
1832 (ensure_undefweak_dynamic): Don't make dynamic when
1833 info->dynamic_undefined_weak is zero.
1834 (allocate_dynrelocs): Discard undefweak dyn_relocs for
1835 info->dynamic_undefined_weak. Discard them earlier.
1836
1837 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
1838
1839 PR ld/21389
1840 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
1841 before generating the version definition section.
1842
1843 2017-04-17 Alan Modra <amodra@gmail.com>
1844
1845 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
1846 state when a regular object file defines a symbol with
1847 incompatible type to that defined by an earlier shared lib.
1848
1849 2017-04-13 Alan Modra <amodra@gmail.com>
1850
1851 * coffcode.h: Wrap some overly long _bfd_error_handler args.
1852 * elf.c: Likewise.
1853 * elf32-arm.c: Likewise.
1854 * elf32-i386.c: Likewise.
1855 * elf32-mep.c: Likewise.
1856 * elf64-ia64-vms.c: Likewise.
1857 * elf64-x86-64.c: Likewise.
1858 * elflink.c: Likewise.
1859 * elfnn-ia64.c: Likewise.
1860 * elfxx-mips.c: Likewise.
1861
1862 2017-04-13 Alan Modra <amodra@gmail.com>
1863
1864 * aoutx.h: Use %B and %A in error messages throughout file.
1865 * aout-cris.c: Likewise.
1866 * archive.c: Likewise.
1867 * binary.c: Likewise.
1868 * coff-rs6000.c: Likewise.
1869 * coff-tic4x.c: Likewise.
1870 * coffcode.h: Likewise.
1871 * coffgen.c: Likewise.
1872 * cofflink.c: Likewise.
1873 * coffswap.h: Likewise.
1874 * cpu-arm.c: Likewise.
1875 * elf-eh-frame.c: Likewise.
1876 * elf-m10300.c: Likewise.
1877 * elf.c: Likewise.
1878 * elf32-arc.c: Likewise.
1879 * elf32-arm.c: Likewise.
1880 * elf32-bfin.c: Likewise.
1881 * elf32-frv.c: Likewise.
1882 * elf32-iq2000.c: Likewise.
1883 * elf32-m32c.c: Likewise.
1884 * elf32-microblaze.c: Likewise.
1885 * elf32-nds32.c: Likewise.
1886 * elf32-rl78.c: Likewise.
1887 * elf32-rx.c: Likewise.
1888 * elf32-score.c: Likewise.
1889 * elf32-score7.c: Likewise.
1890 * elf32-sh64.c: Likewise.
1891 * elf32-v850.c: Likewise.
1892 * elf32-vax.c: Likewise.
1893 * elf32-visium.c: Likewise.
1894 * elf64-ia64-vms.c: Likewise.
1895 * elf64-mmix.c: Likewise.
1896 * elf64-sh64.c: Likewise.
1897 * elfcode.h: Likewise.
1898 * elfnn-aarch64.c: Likewise.
1899 * elfnn-ia64.c: Likewise.
1900 * elfxx-mips.c: Likewise.
1901 * hpux-core.c: Likewise.
1902 * ieee.c: Likewise.
1903 * ihex.c: Likewise.
1904 * linker.c: Likewise.
1905 * merge.c: Likewise.
1906 * mmo.c: Likewise.
1907 * oasys.c: Likewise.
1908 * pdp11.c: Likewise.
1909 * peXXigen.c: Likewise.
1910 * rs6000-core.c: Likewise.
1911 * vms-alpha.c: Likewise.
1912 * xcofflink.c: Likewise.
1913
1914 2017-04-13 Alan Modra <amodra@gmail.com>
1915
1916 * bfd.c (PRINT_TYPE): Define.
1917 (_doprnt): New function.
1918 (error_handler_internal): Use _doprnt.
1919 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
1920 calls in their natural order, throughout file.
1921 * coff-mcore.c: Likewise.
1922 * coff-ppc.c: Likewise.
1923 * coff-tic80.c: Likewise.
1924 * cofflink.c: Likewise.
1925 * elf-s390-common.c: Likewise.
1926 * elf.c: Likewise.
1927 * elf32-arm.c: Likewise.
1928 * elf32-i386.c: Likewise.
1929 * elf32-m32r.c: Likewise.
1930 * elf32-msp430.c: Likewise.
1931 * elf32-spu.c: Likewise.
1932 * elf64-ia64-vms.c: Likewise.
1933 * elf64-sparc.c: Likewise.
1934 * elf64-x86-64.c: Likewise.
1935 * elflink.c: Likewise.
1936 * elfnn-aarch64.c: Likewise.
1937 * elfnn-ia64.c: Likewise.
1938 * elfxx-mips.c: Likewise.
1939
1940 2017-04-13 Alan Modra <amodra@gmail.com>
1941
1942 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
1943 branch veneers" error. Fix double space and format message.
1944 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
1945 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
1946
1947 2017-04-13 Alan Modra <amodra@gmail.com>
1948
1949 * bfd-in2.h: Regenerate.
1950
1951 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
1952
1953 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
1954 extra `\n' in warning/error messages.
1955 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
1956 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
1957
1958 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
1959
1960 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
1961 processor-specific properties with generic ELF target vector.
1962
1963 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
1964
1965 * elf32-sparc.c (elf_backend_fixup_symbol): New.
1966 * elf64-sparc.c (elf_backend_fixup_symbol): New.
1967 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
1968 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
1969 has_non_got_reloc.
1970 (link_hash_newfunc): Initialize has_got_reloc and
1971 has_non_got_reloc.
1972 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
1973 section.
1974 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
1975 has_non_got_reloc.
1976 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
1977 has_non_got_reloc.
1978 (_bfd_sparc_elf_fixup_symbol): New function.
1979 (allocate_dynrelocs): Don't allocate space for dynamic
1980 relocations and discard relocations against resolved undefined
1981 weak symbols in executable. Don't make resolved undefined weak
1982 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
1983 relocation against undefined weak symbols in PIE.
1984 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
1985 relocations against resolved undefined weak symbols in PIE
1986 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
1987 without ynamic PLT/GOT relocations for resolved undefined weak
1988 symbols.
1989 Don't generate dynamic relocation against resolved undefined
1990 weak symbol in executable.
1991 (pie_finish_undefweak_symbol): New function.
1992 (_bfd_sparc_elf_finish_dynamic_sections): Call
1993 pie_finish_undefweak_symbol on all symbols in PIE.
1994 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
1995 (_bfd_sparc_elf_fixup_symbol): New function.
1996
1997 2017-04-10 Nick Clifton <nickc@redhat.com>
1998
1999 * config.bfd: Remove ns32k from obsolete list.
2000
2001 2017-04-10 Alan Modra <amodra@gmail.com>
2002
2003 PR 21287
2004 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
2005 (special_sections_i): Likewise for .init_array.
2006 (special_sections_p): Likewise for .preinit_array.
2007
2008 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
2009
2010 PR ld/19579
2011 PR ld/21306
2012 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
2013 ELF_COMMON_DEF_P for common symbols.
2014 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
2015 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
2016 * elflink.c (_bfd_elf_merge_symbol): Revert commits
2017 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
2018 07492f668d2173da7a2bda3707ff0985e0f460b6.
2019
2020 2017-04-07 Pedro Alves <palves@redhat.com>
2021
2022 * opncls.c (bfd_get_debug_link_info): Rename to...
2023 (bfd_get_debug_link_info_1): ... this. Change type of second
2024 parameter to void pointer. Adjust.
2025 (bfd_get_debug_link_info): Reimplement on top of
2026 bfd_get_debug_link_info_1.
2027 (separate_debug_file_exists, separate_alt_debug_file_exists):
2028 Change type of second parameter to void pointer. Adjust.
2029 (get_func_type, check_func_type): Change type of second parameter
2030 to void pointer.
2031 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
2032 the callback functions instead of passing the address of a local.
2033 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
2034 find_separate_debug_file.
2035 (get_alt_debug_link_info_shim): Change type of second parameter to
2036 void pointer. Adjust.
2037 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
2038 find_separate_debug_file.
2039 (get_build_id_name, bfd_boolean check_build_id_file): Change type
2040 of second parameter to void pointer. Adjust.
2041 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
2042 pointer local to find_separate_debug_file.
2043
2044 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
2045
2046 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
2047 external symbols with a definition.
2048 (_bfd_coff_gc_mark_extra_sections): Fix typo.
2049
2050 2017-04-07 Alan Modra <amodra@gmail.com>
2051
2052 * po/SRC-POTFILES.in: Regenerate.
2053
2054 2017-04-05 Alan Modra <amodra@gmail.com>
2055
2056 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
2057 reference counting.
2058
2059 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
2060
2061 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
2062 numbers for DataDirectory entry indicies passed to
2063 add_data_entry().
2064
2065 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
2066
2067 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
2068 each GNU_MBIND section and align GNU_MBIND section to page size.
2069 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
2070 segment for each GNU_MBIND section.
2071 (_bfd_elf_init_private_section_data): Copy sh_info from input
2072 for GNU_MBIND section.
2073
2074 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
2075
2076 * elfnn-riscv.c (GP_NAME): Delete.
2077 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
2078 (_bfd_riscv_relax_lui): Likewise.
2079
2080 2017-04-04 Nick Clifton <nickc@redhat.com>
2081
2082 PR binutils/21342
2083 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
2084 dereference.
2085 (bfd_elf_final_link): Only initialize the extended symbol index
2086 section if there are extended symbol tables to list.
2087
2088 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
2089
2090 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
2091 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
2092 * configure.ac (elf): Add elf-properties.lo.
2093 * Makefile.in: Regenerated.
2094 * configure: Likewise.
2095 * elf-bfd.h (elf_property_kind): New.
2096 (elf_property): Likewise.
2097 (elf_property_list): Likewise.
2098 (elf_properties): Likewise.
2099 (_bfd_elf_parse_gnu_properties): Likewise.
2100 (_bfd_elf_get_property): Likewise.
2101 (_bfd_elf_link_setup_gnu_properties): Likewise.
2102 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
2103 and setup_gnu_properties.
2104 (elf_obj_tdata): Add properties.
2105 * elf-properties.c: New file.
2106 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
2107 (elf_i386_merge_gnu_properties): Likewise.
2108 (elf_backend_parse_gnu_properties): Likewise.
2109 (elf_backend_merge_gnu_properties): Likewise.
2110 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
2111 (elf_x86_64_merge_gnu_properties): Likewise.
2112 (elf_backend_parse_gnu_properties): Likewise.
2113 (elf_backend_merge_gnu_properties): Likewise.
2114 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
2115 (elf_backend_parse_gnu_properties): Likewise.
2116 (elf_backend_setup_gnu_properties): Likewise.
2117 (elfNN_bed): Add elf_backend_parse_gnu_properties,
2118 elf_backend_merge_gnu_properties and
2119 elf_backend_setup_gnu_properties.
2120
2121 2017-03-30 Pip Cet <pipcet@gmail.com>
2122
2123 * elf32-wasm32.c: Add relocation code, two relocs.
2124 * reloc.c: Add wasm32 relocations.
2125 * libbfd.h: Regenerate.
2126 * bfd-in2.h: Regenerate.
2127 * bfd/po/bfd.pot: Regenerate.
2128
2129 2017-03-29 Nick Clifton <nickc@redhat.com>
2130
2131 PR binutils/18025
2132 * coff-bfd.h (struct coff_section_data): Add new fields:
2133 saved_bias and bias.
2134 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
2135 computed for PE binaries.
2136 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
2137 missing abbrev.
2138
2139 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
2140
2141 PR ld/16044
2142 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
2143 to handle a local symbol with a hash-symbol-entry; without PLT.
2144 Add BFD_ASSERT for an incidental case with GOT entry present.
2145 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
2146 isn't forced-or-set local.
2147
2148 2017-03-27 Pip Cet <pipcet@gmail.com>
2149
2150 * wasm-module.c: New file to support WebAssembly modules.
2151 * wasm-module.h: New file to support WebAssembly modules.
2152 * doc/webassembly.texi: Start documenting wasm-module.c.
2153 * config.bfd: Add wasm_vec.
2154 * targets.c: Likewise.
2155 * configure.ac: Likewise.
2156 * Makefile.am: Add entries for wasm-module.c.
2157 * Makefile.in: Regenerate.
2158 * configure: Regenerate.
2159 * po/SRC-POTFILES.in: Regenerate.
2160
2161 2017-03-27 Pip Cet <pipcet@gmail.com>
2162
2163 * cpu-wasm32.c: New file to support wasm32 architecture.
2164 * elf32-wasm32.c: New file to support wasm32 architecture.
2165 * Makefile.am: Add wasm32 architecture.
2166 * archures.c: Likewise.
2167 * config.bfd: Likewise.
2168 * configure.ac: Likewise.
2169 * targets.c: Likewise.
2170 * Makefile.in: Regenerate.
2171 * bfd-in2.h: Regenerate.
2172 * configure: Regenerate.
2173 * po/SRC-POTFILES.in: Regenerate.
2174
2175 2017-03-20 Alan Modra <amodra@gmail.com>
2176
2177 PR 21266
2178 * elf64-ppc.c (compare_symbols): Stabilize sort.
2179
2180 2017-03-18 Alan Modra <amodra@gmail.com>
2181
2182 * elf64-ppc.c (struct ppc_link_hash_table): Add
2183 local_ifunc_resolver and maybe_local_ifunc_resolver.
2184 (ppc_build_one_stub): Set flags on emitting dynamic
2185 relocation to ifunc.
2186 (ppc64_elf_relocate_section): Likewise.
2187 (ppc64_elf_finish_dynamic_symbol): Likewise.
2188 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
2189 local dynamic relocs to ifuncs.
2190 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
2191 local_ifunc_resolver and maybe_local_ifunc_resolver.
2192 (ppc_elf_relocate_section): Set flag on emitting dynamic
2193 relocation to ifuncs.
2194 (ppc_elf_finish_dynamic_symbol): Likewise.
2195 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
2196 dynamic relocs to ifuncs.
2197
2198 2017-03-13 Nick Clifton <nickc@redhat.com>
2199
2200 PR binutils/21202
2201 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
2202 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
2203 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
2204 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
2205 * bfd-in2.h: Regenerate.
2206 * libbfd.h: Regenerate.
2207 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
2208 names.
2209 (IS_AARCH64_TLSDESC_RELOC): Likewise.
2210 (elfNN_aarch64_howto_table): Likewise.
2211 (aarch64_tls_transition_without_check): Likewise.
2212 (aarch64_reloc_got_type): Likewise.
2213 (elfNN_aarch64_final_link_relocate): Likewise.
2214 (elfNN_aarch64_tls_relax): Likewise.
2215 (elfNN_aarch64_relocate_section): Likewise.
2216 (elfNN_aarch64_gc_sweep_hook): Likewise.
2217 (elfNN_aarch64_check_relocs): Likewise.
2218 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
2219 (_bfd_aarch64_elf_resolve_relocation): Likewise.
2220
2221 2017-03-11 Alan Modra <amodra@gmail.com>
2222
2223 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
2224 parameter is in fact used. Whitespace fixes.
2225 * elf64-ppc.c: Likewise.
2226
2227 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
2228
2229 * rs6000-core.c (CORE_NEW): Simplify macro when
2230 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
2231
2232 2017-03-07 Alan Modra <amodra@gmail.com>
2233
2234 PR 21224
2235 PR 20519
2236 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
2237 dyn_relocs check.
2238
2239 2017-03-05 Alan Modra <amodra@gmail.com>
2240
2241 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
2242 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
2243 (next_cie_fde_offset): New function.
2244 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
2245 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
2246 four bytes. Align CIEs to four or eight bytes depending on
2247 per_encoding_aligned8. Align FDEs according to their encoding.
2248 Pad last FDE to output section alignment.
2249 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
2250 assertion.
2251 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
2252 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
2253 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
2254
2255 2017-03-02 Martin Bickel <binutils@ineranves.de>
2256
2257 PR ld/21212
2258 * elf.c (rewrite_elf_program_header): Do not issue a warning for
2259 empty segments which have a zero filesz, but a non-zero memsz.
2260
2261 2017-03-02 Alan Modra <amodra@gmail.com>
2262
2263 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
2264
2265 2017-02-28 Alan Modra <amodra@gmail.com>
2266
2267 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
2268 (ppc64_elf_relocate_section): Likewise.
2269
2270 2017-02-28 Alan Modra <amodra@gmail.com>
2271
2272 PR 20995
2273 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
2274 rather than elf32_nios2_hash_table or elf_hash_table.
2275 (create_got_section): Likewise.
2276 (nios2_elf32_finish_dynamic_symbol): Likewise.
2277 (nios2_elf32_adjust_dynamic_symbol): Likewise.
2278 (nios2_elf32_size_dynamic_sections): Likewise.
2279 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
2280 vars. Use htab equivalents directly instead. Don't create
2281 all dynamic sections on needing just the GOT. Use a goto
2282 rather than a fall-through with reloc test. Ensure
2283 htab->dynobj is set when making dynamic sreloc section.
2284 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
2285 equivalent directly instead. Don't segfault on looking for
2286 .dynamic when dynamic sections have not been created. Don't
2287 segfault on .got.plt being discarded.
2288 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
2289 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
2290 fixme and another not so relevant comment.
2291 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
2292 already set, set hash table dynobj on creating .sbss.
2293
2294 2017-02-28 Alan Modra <amodra@gmail.com>
2295
2296 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
2297 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
2298 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
2299 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
2300 (ppc64_elf_relocate_section): Likewise.
2301 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
2302 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
2303 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
2304 * libbfd.h: Regenerate.
2305 * bfd-in2.h: Regenerate.
2306
2307 2017-02-28 Alan Modra <amodra@gmail.com>
2308
2309 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
2310 dynamic .data.rel.ro read-only.
2311 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
2312 rather than section flags when deciding where copy reloc goes.
2313 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
2314 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
2315 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
2316 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
2317 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
2318 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
2319 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
2320 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
2321 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
2322 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
2323 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
2324 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
2325 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
2326 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
2327 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
2328 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
2329 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
2330 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
2331 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
2332
2333 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
2334
2335 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
2336 `jalr $0, $25' instruction encoding.
2337
2338 2017-02-27 Nick Clifton <nickc@redhat.com>
2339
2340 PR ld/21180
2341 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
2342 generating a seg-fault when encountering a symbol that has been
2343 deleted by garbage collection.
2344
2345 2017-02-25 Alan Modra <amodra@gmail.com>
2346
2347 * elf32-arc.c (struct dynamic_sections): Delete.
2348 (enum dyn_section_types): Delete.
2349 (dyn_section_names): Delete.
2350 (arc_create_dynamic_sections): Delete.
2351 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
2352 segfault on discarded .rela.plt section.
2353 (elf_arc_size_dynamic_sections): Formatting. Don't call
2354 arc_create_dynamic_sections. Don't allocate memory for sections
2355 handled by the generic linker. Correct code finding relocs in
2356 read-only sections. Set SEC_EXCLUDE on zero size .got,
2357 .got.plt, and .dynbss sections. Do set .interp for pies.
2358
2359 2017-02-24 Andrew Waterman <andrew@sifive.com>
2360
2361 * elfnn-riscv.c (GP_NAME): New macro.
2362 (riscv_global_pointer_value): Use it.
2363 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
2364 output section, consider only that section's alignment.
2365
2366 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
2367
2368 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
2369 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
2370 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
2371 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
2372
2373 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
2374
2375 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
2376 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
2377 or misaligned.
2378
2379 2017-02-23 Alan Modra <amodra@gmail.com>
2380
2381 PR 20744
2382 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
2383 16D relocations.
2384 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
2385 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
2386 relocs.
2387
2388 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
2389
2390 PR ld/20828
2391 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
2392 processing ahead of the call to `elf_gc_sweep_symbol'.
2393
2394 2017-02-22 Nick Clifton <nickc@redhat.com>
2395
2396 PR binutils/21193
2397 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
2398 created section 4-byte alignment.
2399
2400 2017-02-22 Alan Modra <amodra@gmail.com>
2401
2402 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
2403 on .got or .plt output section being discarded by script.
2404 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
2405 vxworks splt temp.
2406
2407 2017-02-21 Alan Modra <amodra@gmail.com>
2408
2409 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
2410 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
2411
2412 2017-02-20 Alan Modra <amodra@gmail.com>
2413
2414 PR 21181
2415 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
2416 if DT_RELSZ/DT_RELASZ is zero.
2417
2418 2017-02-17 Nick Clifton <nickc@redhat.com>
2419
2420 * compress.c (bfd_get_full_section_contents): Remember to reduce
2421 compressed size by the sizeof the compression header when
2422 decompressing the contents.
2423
2424 2017-02-17 Pedro Alves <palves@redhat.com>
2425
2426 * srec.c (Chunk): Rename to ...
2427 (_bfd_srec_len): ... this.
2428 (S3Forced): Rename to ...
2429 (_bfd_srec_forceS3): ... this.
2430 * objcopy.c: Adjust all references.
2431
2432 2017-02-17 Pedro Alves <palves@redhat.com>
2433
2434 * archive.c (bsd_write_armap): Rename to ...
2435 (_bfd_bsd_write_armap): ... this.
2436 (coff_write_armap): Rename to ...
2437 (_bfd_coff_write_armap): ... this.
2438 * libbfd-in.h (bsd_write_armap): Rename to ...
2439 (_bfd_bsd_write_armap): ... this.
2440 (coff_write_armap): Rename to ...
2441 (_bfd_coff_write_armap): ... this.
2442 * aout-target.h, aout-tic30.c: Adjust all users.
2443 * libbfd.h: Regenerate.
2444
2445 2017-02-17 Pedro Alves <palves@redhat.com>
2446
2447 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
2448 (warn_deprecated): Rename to ...
2449 (_bfd_warn_deprecated): ... this.
2450 * libbfd.c (warn_deprecated): Rename to ...
2451 (_bfd_warn_deprecated): ... this.
2452 * bfd-in2.h: Regenerate.
2453
2454 2017-02-17 Pedro Alves <palves@redhat.com>
2455
2456 * bfdio.c (real_ftell): Rename to ...
2457 (_bfd_real_ftell): ... this.
2458 (real_fseek): Rename to ...
2459 (_bfd_real_fseek): ... this.
2460 (real_fopen): Rename to ...
2461 (_bfd_real_fopen): ... this.
2462 * libbfd-in.h (real_ftell): Rename to ...
2463 (_bfd_real_ftell): ... this.
2464 (real_fseek): Rename to ...
2465 (_bfd_real_fseek): ... this.
2466 (real_fopen): Rename to ...
2467 (_bfd_real_fopen): ... this.
2468 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
2469 * libbfd.h: Regenerate.
2470
2471 2017-02-17 Pedro Alves <palves@redhat.com>
2472
2473 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
2474 * libbfd.c (read_unsigned_leb128): Rename to ...
2475 (_bfd_read_unsigned_leb128): ... this.
2476 (read_signed_leb128): Rename to ...
2477 (_bfd_read_signed_leb128): ... this.
2478 (safe_read_leb128): Rename to ...
2479 (_bfd_safe_read_leb128): ... this.
2480 * libbfd-in.h (read_unsigned_leb128): Rename to ...
2481 (_bfd_read_unsigned_leb128): ... this.
2482 (read_signed_leb128): Rename to ...
2483 (_bfd_read_signed_leb128): ... this.
2484 (safe_read_leb128): Rename to ...
2485 (_bfd_safe_read_leb128): ... this.
2486 * libbfd.h: Renegerate.
2487
2488 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
2489
2490 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
2491 before trying to fine matching file and line information.
2492
2493 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
2494
2495 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
2496 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
2497 not match current bfd, then reload debug information. Record bfd
2498 we're loading debug info for in the stash. If we have debug
2499 informatin in the cache then perform section placement before
2500 returning.
2501
2502 2017-02-16 Alan Modra <amodra@gmail.com>
2503
2504 PR 21000
2505 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
2506 * elfxx-target.h (elf_backend_no_page_alias): Define.
2507 (elfNN_bed): Init new field.
2508 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
2509 ensure PT_LOAD segment starts on a new page.
2510 * elf32-hppa.c (elf_backend_no_page_alias): Define.
2511
2512 2017-02-16 Alan Modra <amodra@gmail.com>
2513
2514 PR 21132
2515 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
2516 if pic.
2517
2518 2017-02-16 Jiong Wang <jiong.wang@arm.com>
2519
2520 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
2521 * bfd-in2.h: Regenerated.
2522
2523 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
2524
2525 PR ld/21168
2526 * elf32-i386.c (elf_i386_relocate_section): Allow
2527 "lea foo@GOT, %reg" in PIC.
2528
2529 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
2530
2531 PR ld/20244
2532 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
2533 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
2534 error against local IFUNC symbol without a base register for
2535 PIC.
2536
2537 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
2538
2539 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
2540 `%P: %H:' with `info->callbacks->einfo'.
2541 (ppc_elf_relocate_section): Likewise.
2542 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
2543 (ppc64_elf_edit_toc): Likewise.
2544 (ppc64_elf_relocate_section): Likewise.
2545
2546 2017-02-14 Alan Modra <amodra@gmail.com>
2547
2548 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
2549 --gc-keep-exported, and test versioned field of sym rather than
2550 looking for @ in name.
2551
2552 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
2553
2554 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
2555 __global_pointer$.
2556
2557 2017-02-13 Nick Clifton <nickc@redhat.com>
2558
2559 PR binutils/21151
2560 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
2561 unit length field.
2562
2563 2017-02-07 Andrew Waterman <andrew@sifive.com>
2564
2565 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
2566 entry size if PLT header is written.
2567
2568 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
2569
2570 Fix sparc64 dynamic relocation processing to use the dynamic
2571 symbol count.
2572 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
2573 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
2574 should be used.
2575
2576 2017-02-03 Nick Clifton <nickc@redhat.com>
2577
2578 PR 21096
2579 * coffcode.h (coff_write_object_contents): Enlarge size of
2580 s_name_buf in order to avoid compile time warning about possible
2581 integer truncation.
2582 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
2583 32-bits of insn value before printing into buffer.
2584
2585 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
2586
2587 * elfxx-mips.c (mips_elf_hash_sort_data): Add
2588 `max_local_dynindx'.
2589 (mips_elf_sort_hash_table): Handle it.
2590 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
2591 symbols bump up `max_local_dynindx' rather than
2592 `max_non_got_dynindx'.
2593
2594 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
2595
2596 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
2597 `min_got_dynindx', `max_unref_got_dynindx' and
2598 `max_non_got_dynindx' members to the `bfd_size_type' data type.
2599 (mips_elf_sort_hash_table): Adjust accordingly.
2600
2601 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
2602
2603 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
2604 to access the hash table.
2605
2606 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
2607
2608 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
2609 non-NULL `htab' to the beginning.
2610
2611 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
2612
2613 * elflink.c (elf_gc_sweep): Wrap overlong line.
2614
2615 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
2616
2617 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
2618 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
2619 * elfxx-mips.c (mips_elf_link_hash_table): Add
2620 `ignore_branch_isa' member.
2621 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
2622 in branch relocation calculation as an error if
2623 `ignore_branch_isa' has been set.
2624 (_bfd_mips_elf_insn32): Rename to...
2625 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
2626 parameter to `insn32' and add an `ignore_branch_isa' parameter.
2627 Handle the new parameter.
2628
2629 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
2630
2631 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
2632 local variable dynobj.
2633
2634 PR ld/20995
2635 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
2636 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
2637 executable from read-only sections into sdynrelro.
2638 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
2639 dynamic relocs in sdynrelro.
2640 (elf_backend_want_dynrelro): Define.
2641
2642 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
2643
2644 * config.bfd (*-*-rtemsaout*): Mark as removed.
2645
2646 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
2647
2648 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
2649 (arm-*-rtems*): Move to (arm*-*-eabi*).
2650 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
2651 (m68-*-rtems*): Move to (m68*-*-elf*).
2652
2653 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
2654
2655 * config.bfd (*-*-rtemscoff*): Mark as removed.
2656
2657 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
2658
2659 PR ld/20828
2660 * elflink.c (bfd_elf_record_link_assignment): Revert last
2661 change and don't ever clear `forced_local'. Set `mark'
2662 unconditionally.
2663 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
2664 file.
2665 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
2666 (bfd_elf_size_dynamic_sections): ... here.
2667 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
2668 and set `mark' instead in `__tls_get_addr_opt' processing.
2669 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
2670
2671 2017-01-24 Alan Modra <amodra@gmail.com>
2672
2673 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
2674 where dynamic relocs are preferable. Allow ifunc too.
2675 (ensure_undefweak_dynamic): New function.
2676 (allocate_dynrelocs): Use it here. Move plt handling last and
2677 don't make symbols dynamic, simplifying loop. Only make undef
2678 weak symbols with GOT entries dynamic. Correct condition
2679 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
2680 comments. Remove goto.
2681 (ppc_elf_relocate_section): Correct test for using dynamic
2682 symbol on GOT relocs. Rearrange test for emitting GOT relocs
2683 to suit. Set up explicit tls_index entries and implicit GOT
2684 tls_index entries resolvable at link time for
2685 __tls_get_addr_opt. Simplify test to clear mem for prelink.
2686 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
2687 (ensure_undefweak_dynamic): New function.
2688 (allocate_dynrelocs): Use it here. Only make undef weak symbols
2689 with GOT entries dynamic. Remove unnecessary test of
2690 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
2691 (ppc64_elf_relocate_section): Correct test for using dynamic
2692 symbol on GOT relocs. Rearrange test for emitting GOT relocs
2693 to suit. Set up explicit tls_index entries and implicit GOT
2694 tls_index entries resolvable at link time for __tls_get_addr_opt.
2695 Simplify expression to clear mem for prelink.
2696
2697 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
2698
2699 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
2700
2701 2017-01-20 Jiong Wang <jiong.wang@arm.com>
2702
2703 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
2704 (elf_backend_hash_symbol): Define.
2705
2706 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
2707
2708 PR ld/20828
2709 * elflink.c (bfd_elf_record_link_assignment): Clear any
2710 `forced_local' marking for DSO symbols that are not being
2711 provided.
2712
2713 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
2714
2715 * elfnn-riscv.c (riscv_elf_object_p): New function.
2716
2717 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
2718
2719 PR ld/21038
2720 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
2721 plt_bnd_eh_frame.
2722 (elf_x86_64_check_relocs): Create .eh_frame section for the
2723 .plt.bnd section.
2724 (elf_x86_64_size_dynamic_sections): Allocate and initialize
2725 .eh_frame section for the .plt.bnd section.
2726 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
2727 for the .plt.bnd section.
2728
2729 2017-01-12 Nick Clifton <nickc@redhat.com>
2730
2731 PR binutils/20876
2732 * opncls.c (find_separate_debug_file): Add include_dirs
2733 parameter. Only include the directory part of the bfd's filename
2734 in search paths if include_dirs is true. Add a couple of extra
2735 locations for looking for debug files.
2736 ( bfd_follow_gnu_debuglink): Update invocation of
2737 find_separate_debug_file.
2738 (bfd_follow_gnu_debugaltlink): Likewise.
2739 (get_build_id): New function: Finds the build-id of the given bfd.
2740 (get_build_id_name): New function: Computes the name of the
2741 separate debug info file for a bfd, based upon its build-id.
2742 (check_build_id_file): New function: Checks to see if a separate
2743 debug info file exists at the given location, and that its
2744 build-id matches that of the original bfd.
2745 (bfd_follow_build_id_debuglink): New function: Finds a separate
2746 debug info file for a given bfd by using the build-id method.
2747 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
2748 method of locating a separate debug info file before using the
2749 debuglink method.
2750 * bfd-in2.h: Regenerate.
2751
2752 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
2753
2754 PR ld/21038
2755 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
2756 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
2757 elf_x86_64_eh_frame_plt_got.
2758 (elf_x86_64_size_dynamic_sections): Get unwind info from
2759 elf_x86_64_bnd_arch_bed for the BND PLT.
2760
2761 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
2762
2763 * config.bfd: Add entries for i686-redox and x86_64-redox.
2764
2765 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
2766
2767 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
2768 to 4 bytes.
2769 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
2770 .eh_frame section to 4 bytes for x32.
2771 (elf_x86_64_check_relocs): Likewise.
2772
2773 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
2774
2775 PR ld/20830
2776 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
2777 (PLT_GOT_FDE_LENGTH): Likewise.
2778 (elf_i386_plt_layout): Add eh_frame_plt_got and
2779 eh_frame_plt_got_size.
2780 (elf_i386_plt): Updated.
2781 (elf_i386_link_hash_table): Add plt_got_eh_frame.
2782 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
2783 (elf_i386_size_dynamic_sections): Allocate and initialize
2784 .eh_frame section for .plt.got.
2785 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
2786 .plt.got.
2787 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
2788 eh_frame_plt_got_size.
2789 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
2790 (PLT_GOT_FDE_LENGTH): Likewise.
2791 (elf_x86_64_backend_data): Add eh_frame_plt_got and
2792 eh_frame_plt_got_size.
2793 (elf_x86_64_arch_bed): Updated.
2794 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
2795 eh_frame_plt_got_size.
2796 (elf_x86_64_nacl_arch_bed): Likewise.
2797 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
2798 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
2799 (elf_x86_64_size_dynamic_sections): Allocate and initialize
2800 .eh_frame section for .plt.got.
2801 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
2802 for .plt.got.
2803
2804 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
2805
2806 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
2807 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
2808
2809 2017-01-09 Nick Clifton <nickc@redhat.com>
2810
2811 * dwarf2.c (lookup_address_in_function_table): Return early if
2812 there are no functions in the given comp unit, or if the high
2813 address of the last function in the comp unit is less than the
2814 desired address.
2815
2816 2017-01-09 Nick Clifton <nickc@redhat.com>
2817
2818 PR binutils/21013
2819 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
2820 message if there are too many symbols to load.
2821
2822 2017-01-04 James Clarke <jrtc27@jrtc27.com>
2823
2824 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
2825 if relocs are cached.
2826
2827 2017-01-03 Rich Felker <bugdal@aerifal.cx>
2828
2829 PR ld/21017
2830 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
2831 for R_MICROBLAZE_GOTOFF_64.
2832
2833 2017-01-03 Nick Clifton <nickc@redhat.com>
2834
2835 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
2836 warning about using a possibly uninitialised variable.
2837
2838 2017-01-02 Alan Modra <amodra@gmail.com>
2839
2840 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
2841 (allocate_plt_static, allocate_dynrelocs): Use it.
2842
2843 2017-01-02 Alan Modra <amodra@gmail.com>
2844
2845 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
2846 .PARISC.unwind section.
2847
2848 2017-01-02 Alan Modra <amodra@gmail.com>
2849
2850 PR ld/20989
2851 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
2852 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
2853 indirect to GOT pointer relative code edit.
2854
2855 2017-01-02 Alan Modra <amodra@gmail.com>
2856
2857 Update year range in copyright notice of all files.
2858
2859 For older changes see ChangeLog-2016
2860 \f
2861 Copyright (C) 2017 Free Software Foundation, Inc.
2862
2863 Copying and distribution of this file, with or without modification,
2864 are permitted in any medium without royalty provided the copyright
2865 notice and this notice are preserved.
2866
2867 Local Variables:
2868 mode: change-log
2869 left-margin: 8
2870 fill-column: 74
2871 version-control: never
2872 End:
This page took 0.090152 seconds and 4 git commands to generate.