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