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