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