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