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