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