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