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