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