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