PowerPC64 statistics message
[binutils-gdb.git] / bfd / ChangeLog
1 2017-11-07 Alan Modra <amodra@gmail.com>
2
3 * elf64-ppc.c (ppc64_elf_build_stubs): Correct pluralization in
4 statistics message.
5
6 2017-11-07 Alan Modra <amodra@gmail.com>
7
8 * sysdep.h: Formatting, comment fixes.
9 (gettext, ngettext): Redefine when ENABLE_NLS.
10 (ngettext, dngettext, dcngettext): Define when !ENABLE_NLS.
11 (_): Define using gettext.
12 (textdomain, bindtextdomain): Use safer "do nothing".
13 * hosts/alphavms.h (textdomain, bindtextdomain): Likewise.
14 (ngettext, dngettext, dcngettext): Define when !ENABLE_NLS.
15
16 2017-11-05 Alan Modra <amodra@gmail.com>
17
18 PR 22397
19 * bfd.c (_bfd_doprnt_scan): Check args index before storing, not
20 after.
21
22 2017-11-05 Alan Modra <amodra@gmail.com>
23
24 PR 22397
25 * bfd.c (union _bfd_doprnt_args): New.
26 (PRINT_TYPE): Add FIELD arg. Take value from args.
27 (_bfd_doprnt): Replace ap parameter with args. Adjust all
28 PRINT_TYPE invocations and reading of format args to suit.
29 Move "%%" handling out of switch handling args. Support
30 positional parameters.
31 (_bfd_doprnt_scan): New function.
32 (error_handler_internal): Call _bfd_doprnt_scan and read args.
33
34 2017-11-04 Alan Modra <amodra@gmail.com>
35
36 * elf32-ppc.c (got_entries_needed, got_relocs_needed): New functions.
37 (allocate_dynrelocs, ppc_elf_size_dynamic_sections): Use them here.
38 (ppc_elf_relocate_section): Don't output a dynamic relocation
39 for IE GOT entries in an executable.
40 * elf64-ppc.c (allocate_got): Trim unnecessary TPREL relocs.
41 (ppc64_elf_size_dynamic_sections): Likewise.
42 (ppc64_elf_relocate_section): Likewise.
43
44 2017-11-04 Alan Modra <amodra@gmail.com>
45
46 * elf32-ppc.c (readonly_dynrelocs): Delete info param. Update all
47 callers. Don't bother with SEC_ALLOC test. Return section pointer.
48 Move minfo call to..
49 (maybe_set_textrel): ..here.
50 * elf64-ppc.c (readonly_dynrelocs): Return section pointer.
51 (maybe_set_textrel): Call minfo to print textrel warning to map file.
52
53 2017-11-04 Alan Modra <amodra@gmail.com>
54
55 * elf32-hppa.c (enum _tls_type): Move.
56 (struct elf32_hppa_link_hash_entry): Make tls_type a bitfield.
57 (elf32_hppa_check_relocs): Set DF_STATIC_TLS only for shared libraries.
58 Tidy tls_type handling. Set symbol tls_type for GOT_TLS_LDM too.
59 (got_entries_needed, got_relocs_needed): New functions.
60 (allocate_dynrelocs): Use them.
61 (elf32_hppa_size_dynamic_sections): Likewise.
62 (elf32_hppa_relocate_section): Delete bogus FIXME. Formatting.
63 Correct code emitting relocs on GD/IE got entries. Report an
64 error when a symbol has both normal and TLS GOT relocs.
65
66 2017-11-04 Alan Modra <amodra@gmail.com>
67
68 PR 22394
69 * elf32-hppa.c (elf32_hppa_check_relocs): Don't create dyn_relocs
70 for plabels when non-pic.
71 (maybe_set_textrel): New function.
72 (readonly_dynrelocs): Move and rewrite.
73 (elf32_hppa_adjust_dynamic_symbol): Use it. Don't create copy
74 relocs when def_regular or -z nocopyreloc. Handle non_got_ref
75 for functions. Expand non_got_ref comments.
76 (elf32_hppa_size_dynamic_sections): Use maybe_set_textrel.
77
78 2017-11-03 H.J. Lu <hongjiu.lu@intel.com>
79
80 * elf32-i386.c (elf_i386_check_relocs): Set plt.refcount to 1.
81 Don't use func_pointer_refcount. Don't set plt.refcount nor
82 non_got_ref for function pointer reference.
83 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
84 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Don't use
85 func_pointer_refcount.
86 (_bfd_x86_elf_copy_indirect_symbol): Don't copy
87 func_pointer_refcount.
88 (_bfd_x86_elf_hide_symbol): Don't use func_pointer_refcount.
89 * elfxx-x86.h (GENERATE_DYNAMIC_RELOCATION_P): Likewise.
90 (elf_x86_link_hash_entry): Remove func_pointer_refcount.
91
92 2017-11-03 Mingi Cho <mgcho.minic@gmail.com>
93 Nick Clifton <nickc@redhat.com>
94
95 PR 22385
96 * coffgen.c (_bfd_coff_get_external_symbols): Check for an
97 overlarge raw syment count.
98 (coff_get_normalized_symtab): Likewise.
99
100 2017-11-01 James Bowman <james.bowman@ftdichip.com>
101
102 * archures.c: Add bfd_mach_ft32b.
103 * cpu-ft32.c: Add arch_info_struct.
104 * elf32-ft32.c: Add R_FT32_RELAX, SC0, SC1,
105 DIFF32.
106 (ft32_elf_relocate_section): Add clauses for R_FT32_SC0, SC1,
107 DIFF32.
108 (ft32_reloc_shortable, elf32_ft32_is_diff_reloc)
109 (elf32_ft32_adjust_diff_reloc_value)
110 (elf32_ft32_adjust_reloc_if_spans_insn)
111 (elf32_ft32_relax_delete_bytes, elf32_ft32_relax_is_branch_target)
112 (ft32_elf_relax_section): New function.
113 * reloc.c: Add BFD_RELOC_FT32_RELAX, SC0, SC1, DIFF32.
114 * bfd-in2.h: Regenerate.
115 * libbfd.h: Regenerate.
116
117 2017-11-01 Nick Clifton <nickc@redhat.com>
118
119 PR 22376
120 * coffcode.h (coff_slurp_line_table): Check for an excessively
121 large line number count.
122
123 2017-11-01 Nick Clifton <nickc@redhat.com>
124
125 PR 22373
126 * peicode.h (pe_bfd_read_buildid): Revise check for invalid size
127 and offset in light of further possible bogus values.
128
129 2017-11-01 Alan Modra <amodra@gmail.com>
130
131 PR 22374
132 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't create a plt
133 entry when just a dynamic reloc can serve. Ensure no dynamic
134 relocations when UNDEFWEAK_NO_DYNAMIC_RELOC by setting non_got_ref.
135 Expand and move the non_got_ref comment.
136 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
137
138 2017-11-01 Nick Clifton <nickc@redhat.com>
139
140 PR 22369
141 * coffgen.c (_bfd_coff_free_symbols): Fail if called on a non-COFF
142 file.
143 * cofflink.c (coff_link_check_archive_element): Skip non-COFF
144 members of an archive.
145
146 2017-10-31 Nick Clifton <nickc@redhat.com>
147
148 PR 22373
149 * peicode.h (pe_bfd_read_buildid): Check for invalid size and data
150 offset values.
151
152 2017-10-30 Alan Modra <amodra@gmail.com>
153
154 * elf32-frv.c (ELF_TARGET_ID): Don't define for generic
155 elf target.
156
157 * elflink.c (elf_gc_sweep): Test elf_object_id in addition to
158 relocs_compatible.
159 (bfd_elf_gc_sections): Likewise.
160
161 2017-10-30 Alan Modra <amodra@gmail.com>
162
163 PR 22269
164 * elf32-hppa.c (elf32_hppa_check_relocs): Move SEC_ALLOC test to
165 ensure non_got_ref is not set due to debug references.
166 (elf32_hppa_adjust_dynamic_symbol): Tidy plabel handling. Use
167 SYMBOL_CALLS_LOCAL and UNDEFWEAK_NO_DYNAMIC_RELOC when determining
168 need for a plt entry.
169 (allocate_dynrelocs): Similarly for got entries. Tidy code discarding
170 dynamic relocs when pic. Remove bogus code attempting to handle
171 commons.
172 (elf32_hppa_relocate_section): Similarly. Delete resolved_to_zero
173 and simplify.
174 (elf32_hppa_finish_dynamic_symbol): Use UNDEFWEAK_NO_DYNAMIC_RELOC
175 and SYMBOL_REFERENCES_LOCAL in GOT handling.
176
177 2017-10-28 Alan Modra <amodra@gmail.com>
178
179 PR 22300
180 * elflink.c (_bfd_elf_merge_symbol): Remove relocs_compatible check.
181 * elf32-hppa.c (elf_backend_relocs_compatible): Define.
182 * elf32-ppc.c (elf_backend_relocs_compatible): Define.
183 * elf64-ppc.c (elf_backend_relocs_compatible): Define.
184
185 2017-10-25 Alan Modra <amodra@gmail.com>
186
187 * archive.c (_bfd_compute_and_write_armap): Match "__gnu_lto_slim"
188 optionally prefixed with "_".
189 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
190
191 2017-10-24 Andrew Waterman <andrew@sifive.com>
192
193 * elfnn-riscv.c (_bfd_riscv_relax_lui): Don't relax to c.lui
194 when rd is x0.
195
196 2017-10-24 Renlin Li <renlin.li@arm.com>
197
198 PR ld/21703
199 * elflink.c (_bfd_elf_merge_symbol): Handle multiple definition case.
200
201 2017-10-23 Nick Clifton <nickc@redhat.com>
202
203 PR 22319
204 * elflink.c (elf_link_output_extsym): Keep global undefined
205 symbols if they have been marked as needed.
206
207 2017-10-23 Maciej W. Rozycki <macro@imgtec.com>
208
209 * elfn32-mips.c (mips_elf_n32_mkobject): New prototype and
210 function.
211 (bfd_elf32_mkobject): Use `mips_elf_n32_mkobject' rather than
212 `_bfd_mips_elf_mkobject'.
213
214 2017-10-22 Hans-Peter Nilsson <hp@axis.com>
215
216 PR gas/22304
217 * config.bfd (cris-*-* | crisv32-*-*): Require a 64-bit BFD.
218
219 2017-10-19 Palmer Dabbelt <palmer@dabbelt.com>
220
221 * elfnn-riscv.c (riscv_pcgp_hi_reloc): New structure.
222 (riscv_pcgp_lo_reloc): Likewise.
223 (riscv_pcgp_relocs): Likewise.
224 (riscv_init_pcgp_relocs): New function.
225 (riscv_free_pcgp_relocs): Likewise.
226 (riscv_record_pcgp_hi_reloc): Likewise.
227 (riscv_record_pcgp_lo_reloc): Likewise.
228 (riscv_delete_pcgp_hi_reloc): Likewise.
229 (riscv_use_pcgp_hi_reloc): Likewise.
230 (riscv_record_pcgp_lo_reloc): Likewise.
231 (riscv_find_pcgp_lo_reloc): Likewise.
232 (riscv_delete_pcgp_lo_reloc): Likewise.
233 (_bfd_riscv_relax_pc): Likewise.
234 (_bfd_riscv_relax_section): Handle R_RISCV_PCREL_* relocations
235 via the new functions above.
236
237 2017-10-19 Palmer Dabbelt <palmer@dabbelt.com>
238
239 * elfnn-riscv.c (R_RISCV_DELETE): New define.
240 (_bfd_riscv_relax_delete): New function.
241 (perform_relocation): Handle R_RISCV_DELETE.
242 (_bfd_riscv_relax_section): Likewise.
243
244 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
245
246 PR ld/22263
247 * elfxx-tilegx.c (tilegx_elf_tls_transition): Replace
248 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
249 bfd_link_executable for TLS check.
250 (tilegx_elf_check_relocs): Likewise.
251 (allocate_dynrelocs): Likewise.
252 (tilegx_elf_relocate_section): Likewise.
253
254 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
255
256 PR ld/22263
257 * elf32-tilepro.c (tilepro_elf_tls_transition): Replace
258 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
259 bfd_link_executable for TLS check.
260 (tilepro_elf_check_relocs): Likewise.
261 (allocate_dynrelocs): Likewise.
262 (tilepro_elf_relocate_section): Likewise.
263
264 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
265
266 PR ld/22263
267 * elfxx-sparc.c (sparc_elf_tls_transition): Replace
268 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
269 bfd_link_executable for TLS check.
270 (_bfd_sparc_elf_check_relocs): Likewise.
271 (allocate_dynrelocs): Likewise.
272 (_bfd_sparc_elf_relocate_section): Likewise.
273
274 2017-10-18 H.J. Lu <hongjiu.lu@intel.com>
275
276 * elf32-tilepro.c (tilepro_elf_gc_mark_hook): Call
277 _bfd_generic_link_add_one_symbol to mark __tls_get_addr.
278 * elfxx-tilegx.c (tilegx_elf_gc_mark_hook): Likewise.
279
280 2017-10-17 H.J. Lu <hongjiu.lu@intel.com>
281
282 * elf32-microblaze.c (microblaze_elf_check_relocs): Check for
283 indirect and warning symbols.
284
285 2017-10-17 Alan Modra <amodra@gmail.com>
286
287 PR 22307
288 * elf-properties.c (_bfd_elf_parse_gnu_properties): Compare datasz
289 against size left rather than comparing pointers. Reorganise loop.
290
291 2017-10-17 Alan Modra <amodra@gmail.com>
292
293 PR 22306
294 * aoutx.h (aout_get_external_symbols): Handle stringsize of zero,
295 and error for any other size that doesn't cover the header word.
296
297 2017-10-16 H.J. Lu <hongjiu.lu@intel.com>
298
299 * elf-bfd.h (elf_backend_data): Remove gc_sweep_hook.
300 * elf32-arm.c (elf32_arm_gc_sweep_hook): Removed.
301 (elf_backend_gc_sweep_hook): Likewise.
302 * elf32-bfin.c (bfin_gc_sweep_hook): Likewise.
303 (bfinfdpic_gc_sweep_hook): Likewise.
304 (elf_backend_gc_sweep_hook): Likewise.
305 * elf32-cr16.c (elf32_cr16_gc_sweep_hook): Likewise.
306 (elf_backend_gc_sweep_hook): Likewise.
307 * elf32-cris.c (cris_elf_gc_sweep_hook): Likewise.
308 (elf_backend_gc_sweep_hook): Likewise.
309 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Likewise.
310 (elf_backend_gc_sweep_hook): Likewise.
311 * elf32-lm32.c (lm32_elf_gc_sweep_hook): Likewise.
312 (elf_backend_gc_sweep_hook): Likewise.
313 * elf32-m32r.c (m32r_elf_gc_sweep_hook): Likewise.
314 (elf_backend_gc_sweep_hook): Likewise.
315 * elf32-m68k.c (elf_m68k_got_entry): Remove elf_m68k_gc_sweep_hook
316 from comments.
317 (elf_m68k_remove_got_entry_type): Removed.
318 (elf_m68k_find_got_entry_ptr): Likewise.
319 (elf_m68k_remove_got_entry): Likewise.
320 (elf_m68k_gc_sweep_hook): Likewise.
321 (elf_backend_gc_sweep_hook): Likewise.
322 * elf32-mcore.c (mcore_elf_gc_sweep_hook): Likewise.
323 (elf_backend_gc_sweep_hook): Likewise.
324 * elf32-metag.c (elf_metag_gc_sweep_hook): Likewise.
325 (elf_backend_gc_sweep_hook): Likewise.
326 * elf32-microblaze.c (elf_backend_gc_sweep_hook): Likewise.
327 (elf_backend_gc_sweep_hook): Likewise.
328 * elf32-mips.c (elf_backend_gc_sweep_hook): Likewise.
329 (elf_backend_gc_sweep_hook): Likewise.
330 * elf32-nds32.c (nds32_elf_gc_sweep_hook): Likewise.
331 (elf_backend_gc_sweep_hook): Likewise.
332 * elf32-nios2.c (nios2_elf32_gc_sweep_hook): Likewise.
333 (elf_backend_gc_sweep_hook): Likewise.
334 * elf32-or1k.c (or1k_elf_gc_sweep_hook): Likewise.
335 (elf_backend_gc_sweep_hook): Likewise.
336 * elf32-ppc.c (ppc_elf_gc_sweep_hook): Likewise.
337 (elf_backend_gc_sweep_hook): Likewise.
338 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
339 (elf_backend_gc_sweep_hook): Likewise.
340 * elf32-sparc.c (elf_backend_gc_sweep_hook): Likewise.
341 * elf32-tic6x.c (elf32_tic6x_gc_sweep_hook): Likewise.
342 (elf_backend_gc_sweep_hook): Likewise.
343 * elf32-tilegx.c (elf_backend_gc_sweep_hook): Likewise.
344 * elf32-tilepro.c (tilepro_elf_gc_sweep_hook): Likewise.
345 (elf_backend_gc_sweep_hook): Likewise.
346 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
347 (elf_backend_gc_sweep_hook): Likewise.
348 * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Likewise.
349 (elf_backend_gc_sweep_hook): Likewise.
350 * elf64-alpha.c (elf64_alpha_gc_sweep_hook): Likewise.
351 (elf_backend_gc_sweep_hook): Likewise.
352 * elf64-mips.c (elf_backend_gc_sweep_hook): Likewise.
353 * elf64-mmix.c (mmix_elf_gc_sweep_hook): Likewise.
354 (elf_backend_gc_sweep_hook): Likewise.
355 * elf64-ppc.c (elf_backend_gc_sweep_hook): Likewise.
356 (ppc64_elf_gc_sweep_hook): Likewise.
357 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
358 (elf_backend_gc_sweep_hook): Likewise.
359 * elf64-sparc.c (elf_backend_gc_sweep_hook): Likewise.
360 * elf64-tilegx.c (elf_backend_gc_sweep_hook): Likewise.
361 * elflink.c (elf_link_add_object_symbols): Don't call
362 _bfd_elf_link_check_relocs here.
363 (gc_sweep_hook_fn): Removed.
364 (elf_gc_sweep): Remove gc_sweep_hook.
365 * elfnn-aarch64.c (elfNN_aarch64_gc_sweep_hook): Removed.
366 (elf_backend_gc_sweep_hook): Likewise.
367 * elfnn-riscv.c (riscv_elf_gc_sweep_hook): Likewise.
368 (elf_backend_gc_sweep_hook): Likewise.
369 * elfxx-mips.c (_bfd_mips_elf_gc_sweep_hook): Likewise.
370 * elfxx-mips.h (_bfd_mips_elf_gc_sweep_hook): Likewise.
371 (elf_backend_gc_sweep_hook): Likewise.
372 * elfxx-sparc.c (_bfd_sparc_elf_gc_sweep_hook): Likewise.
373 * elfxx-sparc.h (_bfd_sparc_elf_gc_sweep_hook): Likewise.
374 * elfxx-target.h (elf_backend_gc_sweep_hook): Likewise.
375 (elfNN_bed): Remove elf_backend_gc_sweep_hook.
376 * elfxx-tilegx.c (tilegx_elf_gc_sweep_hook): Removed.
377 * elfxx-tilegx.h (tilegx_elf_gc_sweep_hook): Likewise.
378
379 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
380
381 * elf32-i386.c (elf_i386_backend_data): Removed.
382 (get_elf_i386_backend_data): Likewise.
383 (elf_i386_arch_bed): Replace elf_i386_backend_data with
384 elf_x86_backend_data.
385 (elf_i386_get_synthetic_symtab): Likewise.
386 (elf_i386_nacl_arch_bed): Likewise.
387 (elf_i386_vxworks_arch_bed): Likewise.
388 (elf_i386_relocate_section): Check target_os instead of
389 is_vxworks.
390 (elf_i386_finish_dynamic_symbol): Likewise.
391 (elf_i386_finish_dynamic_sections): Use htab->plt0_pad_byte.
392 Check target_os instead of is_vxworks.
393 (elf_i386_link_setup_gnu_properties): Remove normal_target and
394 is_vxworks. Initialize plt0_pad_byte.
395 * elf64-x86-64.c (elf_x86_64_backend_data); Removed.
396 (get_elf_x86_64_arch_data): Likewise.
397 (get_elf_x86_64_backend_data): Likewise.
398 (elf_x86_64_arch_bed): Replace elf_x86_64_backend_data with
399 elf_x86_backend_data.
400 (elf_x86_64_get_synthetic_symtab): Likewise.
401 (elf_x86_64_nacl_arch_bed): Likewise.
402 (elf_x86_64_link_setup_gnu_properties): Remove is_vxworks and
403 normal_target. Initialize plt0_pad_byte.
404 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Check target_os
405 instead of is_vxworks.
406 (_bfd_x86_elf_size_dynamic_sections): Likewise.
407 (_bfd_x86_elf_finish_dynamic_sections): Likewise.
408 (_bfd_x86_elf_adjust_dynamic_symbol): Likewise.
409 (_bfd_x86_elf_link_hash_table_create): Initialize target_os.
410 (_bfd_x86_elf_link_setup_gnu_properties): Remove is_vxworks.
411 Update normal_target. Set up plt0_pad_byte. Check target_os
412 instead of is_vxworks.
413 * elfxx-x86.h (elf_x86_target_os): New.
414 (elf_x86_backend_data): Likewise.
415 (get_elf_x86_backend_data): Likewise.
416 (elf_x86_link_hash_table): Remove is_vxworks. Add plt0_pad_byte
417 and target_os.
418 (elf_x86_init_table): Remove normal_target and is_vxworks. Add
419 plt0_pad_byte.
420
421 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
422
423 * elf32-i386.c (elf_i386_finish_dynamic_sections): Call
424 _bfd_x86_elf_finish_dynamic_sections.
425 * elf64-x86-64.c (elf_x86_64_finish_dynamic_sections): Likewise.
426 * elfxx-x86.c (_bfd_x86_elf_finish_dynamic_sections): New
427 function.
428 * elfxx-x86.h (_bfd_x86_elf_finish_dynamic_sections): New
429 prototype.
430
431 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
432
433 PR ld/21384
434 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
435 hide symbol which was forced to be dynamic.
436
437 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
438
439 PR ld/22269
440 * elf32-cris.c (cris_elf_relocate_section): Don't generate
441 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
442 (cris_elf_check_relocs): Don't allocate dynamic relocation
443 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
444
445 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
446
447 PR ld/22269
448 * elf32-sh.c (allocate_dynrelocs): Discard dynamic relocations
449 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
450 (sh_elf_relocate_section): Don't generate dynamic relocation if
451 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
452
453 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
454
455 PR ld/22269
456 * elf32-s390.c (allocate_dynrelocs): Discard dynamic
457 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
458 (elf_s390_relocate_section): Don't generate dynamic relocation
459 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
460 * elf64-s390.c (allocate_dynrelocs): Discard dynamic
461 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
462 (elf_s390_relocate_section): Don't generate dynamic relocation
463 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
464
465 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
466
467 PR ld/22269
468 * elf32-nios2.c (nios2_elf32_relocate_section): Don't generate
469 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
470 (allocate_dynrelocs): Discard dynamic relocations if
471 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
472
473 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
474
475 PR ld/22269
476 * elf32-microblaze.c (microblaze_elf_relocate_section): Don't
477 generate dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is
478 true.
479 (allocate_dynrelocs): Discard dynamic relocations if
480 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
481
482 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
483
484 PR ld/22269
485 * elf32-m68k.c (elf_m68k_check_relocs): Don't allocate dynamic
486 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
487 (elf_m68k_adjust_dynamic_symbol): Don't make symbol dynamic if
488 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
489 (elf_m68k_relocate_section): Don't generate dynamic relocation
490 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
491
492 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
493
494 PR ld/22269
495 * elf32-hppa.c (ensure_undef_dynamic): Don't make undefined
496 symbol dynamic if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
497 (allocate_dynrelocs): Discard dynamic relocations if
498 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
499 (elf32_hppa_relocate_section): Don't generate dynamic
500 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
501
502 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
503
504 PR ld/22269
505 * elfnn-ia64.c (elfNN_ia64_check_relocs): Don't allocate
506 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
507 (allocate_fptr): Don't allocate function pointer if
508 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
509 (allocate_dynrel_entries): Don't allocate dynamic relocation
510 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
511 (set_got_entry): Don't set GOT entry if
512 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
513 (set_pltoff_entry): Don't set PLTOFF entry if
514 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
515 (elfNN_ia64_relocate_section): Don't install dynamic relocation
516 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
517
518 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
519
520 PR ld/22269
521 * elfxx-mips.c (mips_elf_calculate_relocation): Don't generate
522 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
523 (allocate_dynrelocs): Don't allocate dynamic relocations if
524 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
525
526 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
527
528 PR ld/22269
529 * elf32-arm.c (elf32_arm_final_link_relocate): Don't generate
530 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
531 (allocate_dynrelocs_for_symbol): Discard dynamic relocations
532 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
533
534 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
535
536 PR ld/22269
537 * elf32-tilepro.c (allocate_dynrelocs): Discard dynamic
538 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
539 (tilepro_elf_relocate_section): Don't generate dynamic
540 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
541 * elfxx-tilegx.c (allocate_dynrelocs): Discard dynamic
542 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
543 (tilegx_elf_relocate_section): Don't generate dynamic
544 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
545
546 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
547
548 PR ld/22269
549 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Don't
550 generate dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is
551 true.
552 (elfNN_aarch64_allocate_dynrelocs): Discard dynamic relocations
553 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
554
555 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
556
557 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Moved to ...
558 * elf-bfd.h (UNDEFWEAK_NO_DYNAMIC_RELOC): Here.
559 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Removed.
560
561 2017-10-12 James Bowman <james.bowman@ftdichip.com>
562
563 * bfd-in2.h: Regenerate.
564 * libbfd.h: Regenerate.
565 * elf32-ft32.c: Add HOWTO R_FT32_15.
566 * reloc.c: Add BFD_RELOC_FT32_15.
567
568 2017-10-12 Nick Clifton <nickc@redhat.com>
569
570 * reloc.c (enum bfd_reloc_status): Start values at 2.
571 * bfd-in2.h: Regenerate.
572 * elfnn-aarch64.c (aarch64_relocate): Invert sense of function, so
573 that a TRUE return indicates success. Compare the result of
574 calling _bfd_aarch64_elf_put_addend against bfd_reloc_ok.
575 (build_one_stub): Change sense of tests against aarch64_relocate
576 return value.
577 (elfNN_aarch64_tls_relax): Return bfd_reloc_notsupported, rather
578 than FALSE, when an error is detected.
579 (elfNN_aarch64_final_link_relocate): Likewise.
580
581 2017-10-12 H.J. Lu <hongjiu.lu@intel.com>
582
583 * elf32-i386.c (elf_backend_hide_symbol): New.
584 * elf64-x86-64.c (elf_backend_hide_symbol): Likewise.
585 * elfxx-x86.c (_bfd_x86_elf_hide_symbol): Likewise.
586 * elfxx-x86.h (_bfd_x86_elf_hide_symbol): Likewise.
587
588 2017-10-12 Alan Modra <amodra@gmail.com>
589
590 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Call
591 elf_backend_hide_symbol, not _bfd_elf_link_hash_hide_symbol.
592 (bfd_elf_define_start_stop): Likewise.
593
594 2017-10-12 Alan Modra <amodra@gmail.com>
595
596 * elf32-nds32.c (nds32_elf_size_dynamic_sections): Set .interp
597 when executable rather than non-PIC.
598 * elf32-score.c (s3_bfd_score_elf_size_dynamic_sections): Likewise.
599 * elf32-score7.c (s7_bfd_score_elf_size_dynamic_sections): Likewise.
600
601 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
602
603 * elf-bfd.h (elf_backend_data): Add `linux_prpsinfo64_ugid16'
604 member.
605 * elf-linux-core.h (elf_external_linux_prpsinfo64): Rename to...
606 (elf_external_linux_prpsinfo64_ugid32): ... this.
607 (swap_linux_prpsinfo32_out): Rename to...
608 (swap_linux_prpsinfo32_ugid32_out): ... this.
609 (elf_external_linux_prpsinfo64_ugid16): New structure.
610 (swap_linux_prpsinfo64_ugid16_out): New function.
611 * elfxx-target.h [!elf_backend_linux_prpsinfo64_ugid16]
612 (elf_backend_linux_prpsinfo64_ugid16): Define.
613 (elfNN_bed): Initialize `linux_prpsinfo64_ugid16' member.
614 * elf.c (elfcore_write_linux_prpsinfo64): Handle both variants
615 of the 64-bit Linux core PRPSINFO note.
616 * elf64-sh64.c (elf_backend_linux_prpsinfo64_ugid16): Define.
617
618 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
619
620 * elf-bfd.h (elf_backend_data): Add `linux_prpsinfo32_ugid16'
621 member.
622 (elfcore_write_ppc_linux_prpsinfo32): Remove prototype.
623 * elf32-ppc.c (elfcore_write_ppc_linux_prpsinfo32): Remove.
624 (elf_external_ppc_linux_prpsinfo32)
625 (swap_ppc_linux_prpsinfo32_out): Move to...
626 * elf-linux-core.h (elf_external_linux_prpsinfo32_ugid32)
627 (swap_linux_prpsinfo32_ugid32_out): ... these.
628 (elf_external_linux_prpsinfo32): Rename to...
629 (elf_external_linux_prpsinfo32_ugid16): ... this.
630 (swap_linux_prpsinfo32_out): Rename to...
631 (swap_linux_prpsinfo32_ugid16_out): ... this.
632 * elfxx-target.h [!elf_backend_linux_prpsinfo32_ugid16]
633 (elf_backend_linux_prpsinfo32_ugid16): Define.
634 (elfNN_bed): Initialize `linux_prpsinfo32_ugid16' member.
635 * elf.c (elfcore_write_linux_prpsinfo32): Handle both variants
636 of the 32-bit Linux core PRPSINFO note.
637 * elf32-am33lin.c (elf_backend_linux_prpsinfo32_ugid16): Define.
638 * elf32-arm.c (elf_backend_linux_prpsinfo32_ugid16): Define.
639 * elf32-cris.c (elf_backend_linux_prpsinfo32_ugid16): Define.
640 * elf32-frv.c (elf_backend_linux_prpsinfo32_ugid16): Define.
641 * elf32-i386.c (elf_backend_linux_prpsinfo32_ugid16): Define.
642 * elf32-m32r.c (elf_backend_linux_prpsinfo32_ugid16): Define.
643 * elf32-m68k.c (elf_backend_linux_prpsinfo32_ugid16): Define.
644 * elf32-s390.c (elf_backend_linux_prpsinfo32_ugid16): Define.
645 * elf32-sh.c (elf_backend_linux_prpsinfo32_ugid16): Define.
646 * elf32-sparc.c (elf_backend_linux_prpsinfo32_ugid16): Define.
647
648 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
649
650 * elf-linux-core.h (elf_external_linux_prpsinfo64): Move the
651 `gap' member ahead of `pr_flag'.
652
653 2017-10-11 Pedro Alves <palves@redhat.com>
654
655 * bfd.c (_doprnt): Rename to ...
656 (_bfd_doprnt): ... this.
657 (error_handler_internal): Adjust.
658
659 2017-10-10 H.J. Lu <hongjiu.lu@intel.com>
660
661 * elf32-i386.c (elf_i386_check_relocs): Set GOT refcount to 1
662 instead of incrementing it.
663 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
664
665 2017-10-10 Renlin Li <renlin.li@arm.com>
666
667 PR ld/21402
668 * elf32-arm.c (allocate_dynrelocs_for_symbol): Only make undefined weak
669 symbols into dynamic.
670
671 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
672
673 PR ld/22274
674 * elfnn-riscv.c (riscv_elf_link_hash_table): Add max_alignment.
675 (riscv_elf_link_hash_table_create): Initialize max_alignment to
676 (bfd_vma) -1.
677 (_bfd_riscv_relax_section): Cache the max alignment of output
678 sections if possible.
679
680 2017-10-10 Alan Modra <amodra@gmail.com>
681
682 * elf64-ppc.c (ppc64_elf_before_check_relocs): Set sec_type for
683 .opd whenever .opd is present and non-zero size. Move code
684 setting abiversion to/from output file earlier. Only set
685 u.opd.func_sec when --gc-sections. Read relocs and set up
686 u.opd.func_sec values here..
687 (ppc64_elf_check_relocs): ..rather than here. Simplify opd
688 section tests.
689 (ppc64_elf_edit_opd): Don't set sec_type for .opd here.
690
691 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
692
693 * elf-m10300.c (mn10300_elf_check_relocs): Don't free cached
694 isymbuf.
695
696 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
697
698 * elf32-bfin.c (bfin_size_dynamic_sections): Don't create the
699 .interp section with "ld --no-dynamic-linker".
700
701 2017-10-09 Alan Modra <amodra@gmail.com>
702
703 PR 22212
704 * dwarf2.c (_bfd_dwarf2_cleanup_debug_info): Free
705 funcinfo_hash_table and varinfo_hash_table.
706
707 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
708
709 * elf32-sh.c (readonly_dynrelocs): Dump dynamic relocation
710 in read-only section with minfo.
711 (sh_elf_size_dynamic_sections): Likewise.
712
713 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
714
715 * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Remove
716 a strayed comment.
717
718 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
719
720 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_sections): Set
721 this_hdr.sh_entsize only if section size > 0.
722
723 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
724
725 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Reformat.
726
727 2017-10-07 H.J. Lu <hongjiu.lu@intel.com>
728
729 * elfxx-sparc.c (readonly_dynrelocs): Dump dynamic relocation
730 in read-only section with minfo.
731 (_bfd_sparc_elf_size_dynamic_sections): Likewise.
732
733 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
734
735 * elfxx-x86.h (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Update
736 comments.
737
738 2017-10-06 John Baldwin <jhb@FreeBSD.org>
739
740 * elf-bfd.h (struct elf_backend_data): Add
741 `elf_backend_grok_freebsd_prstatus'.
742 * elf.c (elfcore_grok_freebsd_note): Call
743 `elf_backend_grok_freebsd_prstatus' to handle NT_PRSTATUS if
744 present.
745 * elfn32-mips.c (elf_n32_mips_grok_freebsd_prstatus): New
746 function.
747 (elf_backend_grok_freebsd_prstatus): Define.
748 * elfxx-target.h (elf_backend_grok_freebsd_prstatus): Define.
749 (elfNN_bed): Initialize `elf_backend_grok_freebsd_prstatus'.
750
751 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
752
753 * elf32-i386.c (elf_i386_check_relocs): Replace has_got_reloc
754 and has_non_got_reloc with zero_undefweak.
755 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
756 * elfxx-x86.c (_bfd_x86_elf_link_hash_newfunc): Initialize
757 zero_undefweak to 1.
758 (_bfd_x86_elf_copy_indirect_symbol): Replace has_got_reloc and
759 has_non_got_reloc with zero_undefweak.
760 * elfxx-x86.h (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace
761 has_got_reloc and has_non_got_reloc with zero_undefweak.
762 (elf_x86_link_hash_entry): Likewise.
763
764 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
765
766 * elfxx-x86.h (COPY_INPUT_RELOC_P): Add "do/while(0);".
767 (VERIFY_COPY_RELOC): Likewise.
768
769 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
770
771 * elfxx-x86.h (VERIFY_COPY_RELOC): New.
772 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Use it.
773 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
774
775 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
776
777 * elfxx-x86.h (VERIFY_PLT_ENTRY): New.
778 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Use it.
779 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
780
781 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
782
783 * elfxx-x86.h (COPY_INPUT_RELOC_P): New.
784 * elf32-i386.c (elf_i386_relocate_section): Use it.
785 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
786
787 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
788
789 * elf32-i386.c (X86_SIZE_TYPE_P): New.
790 (elf_i386_relocate_section): Use GENERATE_DYNAMIC_RELOCATION_P.
791 * elf64-x86-64.c (X86_SIZE_TYPE_P): New.
792 (elf_x86_64_relocate_section): Use GENERATE_DYNAMIC_RELOCATION_P.
793 * elfxx-x86.h (GENERATE_DYNAMIC_RELOCATION_P): New.
794
795 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
796
797 * elfxx-x86.h (POINTER_LOCAL_IFUNC_P): New.
798 (PLT_LOCAL_IFUNC_P): Likewise.
799 * elf32-i386.c (elf_i386_relocate_section): Use them.
800 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
801
802 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
803
804 * elfxx-x86.h (GENERATE_RELATIVE_RELOC_P): New.
805 * elf32-i386.c (elf_i386_relocate_section): Use it.
806 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
807
808 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
809
810 * elfxx-x86.h (RESOLVED_LOCALLY_P): New.
811 * elf32-i386.c (elf_i386_relocate_section): Use it.
812 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
813
814 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
815
816 * elf32-i386.c (X86_PCREL_TYPE_P): New.
817 (elf_i386_check_relocs): Use NEED_DYNAMIC_RELOCATION_P.
818 * elf64-x86-64.c (IS_X86_64_PCREL_TYPE): Renamed to ...
819 (X86_PCREL_TYPE_P): This.
820 (elf_x86_64_check_relocs): Use NEED_DYNAMIC_RELOCATION_P.
821 Replace IS_X86_64_PCREL_TYPE with X86_PCREL_TYPE_P.
822 (elf_x86_64_relocate_section): Replace IS_X86_64_PCREL_TYPE with
823 X86_PCREL_TYPE_P.
824 * elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): New.
825
826 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
827
828 * elfxx-x86.h (TLS_TRANSITION_IE_TO_LE_P): New.
829 * elf32-i386.c (elf_i386_tls_transition): Use it.
830 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
831
832 2017-10-05 H.J. Lu <hongjiu.lu@intel.com>
833
834 * elf32-ppc.c (readonly_dynrelocs): Add a link_info argument.
835 Dump dynamic relocation in read-only section with minfo if
836 needed.
837 (ppc_elf_adjust_dynamic_symbol): Pass NULL to readonly_dynrelocs.
838 (maybe_set_textrel): Likewise.
839 (ppc_elf_size_dynamic_sections): Dump dynamic relocation in
840 read-only section with minfo.
841
842 2017-10-05 John Baldwin <jhb@FreeBSD.org>
843
844 * elf.c (elfcore_grok_freebsd_note): Handle NT_ARM_VFP.
845
846 2017-10-05 H.J. Lu <hongjiu.lu@intel.com>
847
848 * elf32-tilepro.c (readonly_dynrelocs): Dump dynamic relocation
849 in read-only section with minfo.
850 (tilepro_elf_size_dynamic_sections): Likewise.
851 * elfxx-tilegx.c (readonly_dynrelocs): Likewise.
852 (tilegx_elf_size_dynamic_sections): Likewise.
853
854 2017-10-05 Pedro Alves <palves@redhat.com>
855
856 PR 22245
857 * bfd.c (bfd_set_error): Revert 2017-10-04 change. Remove
858 ellipsis parameter. Split out bfd_error_on_input code to..
859 (bfd_set_input_error): .. New function.
860 * archive.c (_bfd_write_archive_contents): Use bfd_set_input_error.
861 * vms-lib.c (_bfd_vms_lib_write_archive_contents): Likewise.
862 * bfd-in2.h: Regenerate.
863
864 2017-10-05 Alan Modra <amodra@gmail.com>
865
866 * elflink.c (elf_link_input_bfd): Correct ctor/dtor in init_array/
867 fini_array error value.
868
869 2017-10-05 Alan Modra <amodra@gmail.com>
870
871 PR 21167
872 * elf.c (_bfd_elf_setup_sections): Don't trim reloc sections from
873 groups.
874 (_bfd_elf_init_reloc_shdr): Pass sec_hdr, use it to copy SHF_GROUP
875 flag from section.
876 (elf_fake_sections): Adjust calls. Exit immediately on failure.
877 (bfd_elf_set_group_contents): Add associated reloc section indices
878 to group contents.
879
880 2017-10-04 Alan Modra <amodra@gmail.com>
881
882 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't sort or
883 classify symbols for ELFv2.
884
885 2017-10-04 Pavel I. Kryukov <kryukov@frtk.ru>
886
887 PR 22245
888 * bfd.c (bfd_set_error): Avoid UB on passing arg to va_start that
889 undergoes default promotion.
890 * bfd-in2.h: Regenerate.
891
892 2017-10-02 Alan Modra <amodra@gmail.com>
893
894 * elf32-ppc.c (ppc_elf_relocate_section): Fix comment typo.
895 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
896
897 2017-10-01 Alan Modra <amodra@gmail.com>
898
899 PR 21957
900 * dwarf2.c (new_line_sorts_after): Remove end_sequence comparison.
901 (add_line_info): Always put end_sequence last.
902
903 2017-10-01 Alan Modra <amodra@gmail.com>
904
905 PR 22047
906 * dwarf2.c (read_section): Allocate buffer with extra byte for
907 bfd_simple_get_relocated_section_contents rather than copying
908 afterwards.
909
910 2017-09-29 Alan Modra <amodra@gmail.com>
911
912 * merge.c (merge_strings): Return FALSE on malloc failure.
913 (_bfd_merge_sections): Return failures from record_section and
914 merge_strings.
915
916 2017-09-28 Alan Modra <amodra@gmail.com>
917
918 PR 22220
919 * elflink.c (_bfd_elf_merge_symbol): Set non_ir_ref_dynamic in
920 a case where plugin_notice isn't called.
921
922 2017-09-27 Kuan-Lin Chen <kuanlinchentw@gmail.com>
923
924 * elf32-nds32.c (nds32_elf_relax_section): Fix a tautological
925 comparison.
926
927 2017-09-26 H.J. Lu <hongjiu.lu@intel.com>
928
929 PR ld/22199
930 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't pass
931 output_bfd to info->callbacks->minfo.
932
933 2017-09-26 Nick Clifton <nickc@redhat.com>
934
935 PR 22172
936 * elf64-x86-64.c (elf_x86_64_info_to_howto): Do not trigger an
937 assertion failure if elf_x86_64_rtype_to_howto has already issued
938 an error message.
939
940 2017-09-26 Alan Modra <amodra@gmail.com>
941
942 PR 22210
943 * dwarf2.c (read_formatted_entries): Use read_attribute_value to
944 read data.
945
946 2017-09-26 Nick Clifton <nickc@redhat.com>
947
948 PR 22210
949 * dwarf2.c (read_formatted_entries): Fail early if we know that
950 the loop parsing data entries will overflow the end of the
951 section.
952
953 2017-09-26 Alan Modra <amodra@gmail.com>
954
955 PR 22209
956 * dwarf2.c (struct comp_unit): Delete sec_info_ptr field.
957 (find_abstract_instance_name): Calculate DW_FORM_ref_addr relative
958 to stash->info_ptr_memory, and check die_ref is within that memory.
959 Set info_ptr_end correctly when another CU is refd. Check die_ref
960 for DW_FORM_ref4 etc. is within CU.
961
962 2017-09-26 Alan Modra <amodra@gmail.com>
963
964 PR 22205
965 * dwarf2.c (concat_filename): Return "<unknown>" on NULL filename.
966 (read_formatted_entries): Init "fe".
967 (decode_line_info <DW_LNE_define_file>): Use line_info_add_file_name.
968
969 2017-09-26 Alan Modra <amodra@gmail.com>
970
971 PR 22204
972 * dwarf2.c (decode_line_info): Ensure line_ptr stays within
973 bounds in inner loop.
974
975 2017-09-25 Alan Modra <amodra@gmail.com>
976
977 PR 22202
978 * dwarf1.c (parse_die): Sanity check pointer against section limit
979 before dereferencing.
980 (parse_line_table): Likewise.
981
982 2017-09-25 Alan Modra <amodra@gmail.com>
983
984 PR 22201
985 * dwarf2.c (scan_unit_for_symbols): Ignore DW_AT_name unless it
986 has string form.
987 (parse_comp_unit): Likewise.
988
989 2017-09-25 Alan Modra <amodra@gmail.com>
990
991 PR 22200
992 * dwarf2.c (read_formatted_entries): Error on format_count zero.
993
994 2017-09-24 Alan Modra <amodra@gmail.com>
995
996 PR 22197
997 * opncls.c (bfd_get_debug_link_info_1): Properly check that crc is
998 within section bounds.
999
1000 2017-09-24 Alan Modra <amodra@gmail.com>
1001
1002 PR 22191
1003 * dwarf2.c (decode_line_info): Properly free line sequences on error.
1004
1005 2017-09-24 Alan Modra <amodra@gmail.com>
1006
1007 PR 22187
1008 * dwarf2.c (find_abstract_instance_name): Add orig_info_ptr and
1009 pname param. Return status. Make name const. Don't abort,
1010 return an error. Formatting. Exit if current info_ptr matches
1011 orig_info_ptr. Update callers.
1012 (scan_unit_for_symbols): Start at nesting_level of zero. Make
1013 nested_funcs an array of structs for extensibility. Formatting.
1014
1015 2017-09-24 Alan Modra <amodra@gmail.com>
1016
1017 PR 22186
1018 * dwarf2.c (decode_line_info): Fail on lh.line_range of zero
1019 rather than dividing by zero.
1020
1021 2017-09-24 Alan Modra <amodra@gmail.com>
1022
1023 PR 22169
1024 * dwarf2.c (decode_line_info): Correct .debug_line unit_length check.
1025
1026 2017-09-24 Alan Modra <amodra@gmail.com>
1027
1028 PR 22167
1029 * dwarf2.c (scan_unit_for_symbols): Check u.blk->data is non-NULL.
1030
1031 2017-09-24 Alan Modra <amodra@gmail.com>
1032
1033 PR 22166
1034 * elf.c (_bfd_elf_slurp_version_tables): Test sh_info on
1035 SHT_GNU_verneed section for sanity. Don't zalloc memory for
1036 verref.
1037
1038 2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
1039
1040 PR binutils/22170
1041 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Guard against
1042 corrupted PLT.
1043
1044 2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
1045
1046 PR binutils/22163
1047 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Also return
1048 -1 if bfd_canonicalize_dynamic_reloc returns 0.
1049
1050 2017-09-22 Pedro Alves <palves@redhat.com>
1051 Alan Modra <amodra@gmail.com>
1052
1053 * version.h: Add comment.
1054
1055 2017-09-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1056
1057 * elf.c (elfcore_grok_note): For the cases NT_S390_GS_CB and
1058 NT_S390_GS_BC, correct the previously swapped invocations of
1059 elfcore_grok_s390_gs_bc and elfcore_grok_s390_gs_cb.
1060
1061 2017-09-19 Alan Modra <amodra@gmail.com>
1062
1063 PR 21441
1064 * elf64-ppc.c (ppc64_elf_build_stubs): Don't check glink_eh_frame
1065 size.
1066
1067 2017-09-19 Alan Modra <amodra@gmail.com>
1068
1069 PR 22150
1070 * elflink.c (bfd_elf_size_dynamic_sections): Garbage collect
1071 symbols before calculating verrefs. Don't renumber dynsyms
1072 after gc. Exclude .gnu.version when zero or one dynsym.
1073 Localize some vars and reindent.
1074
1075 2017-09-18 H.J. Lu <hongjiu.lu@intel.com>
1076
1077 PR ld/22148
1078 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Check error
1079 return from bfd_canonicalize_dynamic_reloc.
1080
1081 2017-09-15 Alan Modra <amodra@gmail.com>
1082
1083 PR 22116
1084 * archive.c (bfd_ar_hdr_from_filesystem): Detect when status.st_size
1085 overflows bfd_size_type.
1086
1087 2017-09-14 H.J. Lu <hongjiu.lu@intel.com>
1088
1089 PR ld/22135
1090 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument
1091 to indicate if conversion is performed.
1092 (elf_i386_check_relocs): Cache section contents and relocations
1093 if conversion is performed.
1094 * elf64-x86-64.c (elf_x86_64_check_relocs): Cache section
1095 contents and relocations if conversion is performed.
1096
1097 2017-09-14 Nick Clifton <nickc@redhat.com>
1098
1099 PR binutils/22113
1100 * peXXigen.c (pe_print_idata): Extend check for HintName vector
1101 entries.
1102
1103 2017-09-13 H.J. Lu <hongjiu.lu@intel.com>
1104
1105 * elfxx-x86.h: Fix a typo in comments.
1106
1107 2017-09-09 Kamil Rytarowski <n54@gmx.com>
1108
1109 * elf32-nds32.c: Rename __BIT() to N32_BIT().
1110
1111 2017-09-09 Alan Modra <amodra@gmail.com>
1112
1113 * elf64-ppp.c (plt_stub_pad): Handle positive and negative
1114 plt_stub_align.
1115
1116 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
1117
1118 * elf32-i386.c (elf_i386_relocate_section): Update usage of
1119 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
1120 (elf_i386_finish_dynamic_symbol): Likewise.
1121 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1122 (elf_x86_64_finish_dynamic_symbol): Likewise.
1123 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Likewise.
1124 (_bfd_x86_elf_fixup_symbol): Likewise.
1125
1126 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
1127
1128 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
1129 check has_non_got_reloc.
1130
1131 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
1132
1133 PR ld/22115
1134 * elf32-i386.c (elf_i386_convert_load_reloc): Check linker_def.
1135 Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
1136 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Check
1137 linker_def. Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
1138 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Set local_ref
1139 and linker_def on __ehdr_start if it is referenced and not
1140 defined.
1141 (_bfd_x86_elf_link_symbol_references_local): Also set local_ref
1142 and return TRUE when building executable, if a symbol has
1143 non-GOT/non-PLT relocations in text section or there is no
1144 dynamic linker.
1145 * elfxx-x86.h (elf_x86_link_hash_entry): Add linker_def.
1146
1147 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
1148
1149 * elfxx-x86.h: Update comments.
1150
1151 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
1152
1153 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Replace
1154 elf_x86_plt_layout_table with elf_x86_init_table.
1155 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
1156 Likewise.
1157 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties):
1158 Likewise.
1159 * elfxx-x86.h (elf_x86_plt_layout_table): Renamed to ...
1160 (elf_x86_init_table): This.
1161 (_bfd_x86_elf_link_setup_gnu_properties): Replace
1162 elf_x86_plt_layout_table with elf_x86_init_table.
1163
1164 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
1165
1166 * configure.ac (bfd_backends): Don't add elf64-x86-64.lo nor
1167 elf64.lo together with elfxx-x86.lo for 64-bit BFD.
1168 * configure: Regenerated.
1169 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set r_info
1170 and r_sym fields of plt_layout.
1171 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
1172 Likewise.
1173 * elfxx-x86.c (elf_x86_64_is_reloc_section): Remove BFD64 check.
1174 (_bfd_x86_elf_link_hash_table_create): Likewise. Don't set
1175 r_info nor r_sym fields.
1176 (_bfd_x86_elf_link_setup_gnu_properties): Set r_info and r_sym
1177 fields of htab.
1178 * elfxx-x86.h (elf_x86_plt_layout_table): Add r_info and r_sym.
1179
1180 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
1181
1182 * (_bfd_riscv_relax_align): Call bfd_set_error and
1183 print an error message when unable to relax a .align directive.
1184
1185 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
1186
1187 * elfnn-riscv.c (riscv_zero_pcrel_hi_reloc): New function.
1188 (riscv_record_pcrel_hi_reloc): Add absolute argument.
1189 (riscv_elf_relocate_section): Call riscv_zero_pcrel_hi_reloc for
1190 R_RISCV_PCREL_HI20 relocs, and pass the result to
1191 riscv_record_pcrel_hi_reloc.
1192
1193 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
1194
1195 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument,
1196 r_type_p. Remove the converted argument. Replace
1197 SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P. Return
1198 the new relocation type via r_type_p.
1199 (elf_i386_relocate_section): Likewise.
1200 (elf_i386_finish_dynamic_symbol): Likewise.
1201 (need_convert_load): Removed.
1202 (check_relocs_failed): Updated.
1203 (elf_i386_check_relocs): Call elf_i386_convert_load_reloc,
1204 instead of setting need_convert_load.
1205 (_bfd_i386_elf_convert_load): Removed.
1206 * elf64-x86-64.c (need_convert_load): Removed.
1207 (check_relocs_failed): Updated.
1208 (elf_x86_64_convert_load_reloc): Add an argument, r_type_p.
1209 Replace SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P.
1210 Return the new relocation type via r_type_p.
1211 (elf_x86_64_check_relocs): Call elf_x86_64_convert_load_reloc,
1212 instead of setting need_convert_load.
1213 (elf_x86_64_check_relocs): Don't check PIC if relocation has
1214 been converted.
1215 (_bfd_x86_64_elf_convert_load): Removed.
1216 (elf_x86_64_relocate_section): Replace SYMBOL_REFERENCES_LOCAL
1217 with SYMBOL_REFERENCES_LOCAL_P.
1218 (elf_x86_64_finish_dynamic_symbol): Likewise.
1219 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Don't
1220 set convert_load.
1221 (_bfd_x86_elf_size_dynamic_sections): Don't call convert_load.
1222 (_bfd_x86_elf_link_symbol_references_local): New function.
1223 * elfxx-x86.h (SYMBOL_REFERENCES_LOCAL_P): New.
1224 (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace elf.forced_local with
1225 SYMBOL_REFERENCES_LOCAL_P.
1226 (elf_x86_link_hash_entry): Add local_ref.
1227 (elf_x86_link_hash_table): Remove convert_load.
1228 (_bfd_i386_elf_convert_load): Removed.
1229 (_bfd_x86_64_elf_convert_load): Likewise.
1230 (_bfd_x86_elf_link_symbol_references_local): New.
1231
1232 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
1233
1234 * elf64-x86-64.c (R_X86_64_converted_reloc_bit): New.
1235 (elf_x86_64_info_to_howto): Get the real relocation type by
1236 masking out R_X86_64_converted_reloc_bit.
1237 (elf_x86_64_check_tls_transition): Get the real relocation type
1238 by masking out R_X86_64_converted_reloc_bit.
1239 (elf_x86_64_convert_load_reloc): Set R_X86_64_converted_reloc_bit
1240 instead of setting converted_reloc.
1241 (elf_x86_64_relocate_section): Check R_X86_64_converted_reloc_bit
1242 instead of converted_reloc. Get the real relocation type by
1243 masking out R_X86_64_converted_reloc_bit.
1244 (elf_x86_64_link_setup_gnu_properties): Verify that the value of
1245 R_X86_64_converted_reloc_bit is valid.
1246 * elfxx-x86.h (converted_reloc): Removed.
1247
1248 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
1249
1250 * elf32-i386.c (elf_i386_relocate_section): Don't change r_type
1251 when calling elf_i386_tls_transition. Don't use ELF32_R_TYPE
1252 to get the relocation type again.
1253 * elf64-x86-64.c (elf_x86_64_relocate_section): Don't change
1254 r_type when calling elf_x86_64_tls_transition. Don't use
1255 ELF32_R_TYPE to get the relocation type again.
1256
1257 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
1258
1259 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Properly set
1260 converted_reloc.
1261
1262 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
1263
1264 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Remove the sec
1265 argument. Don't check relocation overflow. Avoid relocation
1266 overflow if --no-relax is used. Set converted_reloc on symbol
1267 if a GOTPCREL relocation is converted.
1268 (elf_x86_64_relocate_section): Issue a fatal error and suggest
1269 --no-relax if GOTPCREL relocation conversion leads to relocation
1270 overflow.
1271 * elfxx-x86.h (elf_x86_link_hash_entry): Add converted_reloc.
1272
1273 2017-09-05 Alexander Fedotov <alexander.fedotov@nxp.com>
1274 Edmar Wienskoski <edmar.wienskoski@nxp.com
1275
1276 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_VLE_ADDR20.
1277 (ppc_elf_check_relocs): Handle it.
1278 (ppc_elf_vle_split20): New function.
1279 (ppc_elf_relocate_section): Handle R_PPC_VLE_ADDR20.
1280
1281 2017-09-03 H.J. Lu <hongjiu.lu@intel.com>
1282
1283 PR ld/22071
1284 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Set tlsdesc_plt
1285 for x86-64 if GOT_TLS_GDESC_P is true.
1286
1287 2017-09-03 Alan Modra <amodra@gmail.com>
1288
1289 PR 22067
1290 * elfxx-x86.h (elf_x86_hash_table): Check is_elf_hash_table first.
1291
1292 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1293
1294 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1295 tls_get_addr for x86-64 in one place.
1296
1297 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1298
1299 * configure.ac (bfd_backends): Add elf64-x86-64.lo together
1300 with elfxx-x86.lo for 64-bit BFD.
1301 * configure: Regenerated.
1302
1303 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1304
1305 * elf32-i386.c (elf_i386_convert_load): Renamed to ...
1306 (_bfd_i386_elf_convert_load): This. Remove static.
1307 (elf_i386_size_dynamic_sections): Removed.
1308 (elf_backend_size_dynamic_sections): Likewise.
1309 * elf64-x86-64.c (elf_x86_64_convert_load): Renamed to ...
1310 (_bfd_x86_64_elf_convert_load): This. Remove static.
1311 (elf_x86_64_size_dynamic_sections): Removed.
1312 (elf_backend_size_dynamic_sections): Likewise.
1313 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): Renamed to ...
1314 (elf_x86_allocate_dynrelocs): This. Make it static.
1315 (_bfd_x86_elf_allocate_local_dynrelocs): Renamed to ...
1316 (elf_x86_allocate_local_dynreloc): This. Make it static.
1317 (elf_i386_is_reloc_section): New function.
1318 (elf_x86_64_is_reloc_section): Likewise.
1319 (_bfd_x86_elf_link_hash_table_create): Initialize convert_load,
1320 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
1321 Rearrange got_entry_size initialization.
1322 (_bfd_x86_elf_size_dynamic_sections): New function.
1323 * elfxx-x86.h (elf_x86_link_hash_table): Add convert_load,
1324 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
1325 (_bfd_i386_elf_convert_load): New.
1326 (_bfd_x86_64_elf_convert_load): Likewise.
1327 (_bfd_x86_elf_size_dynamic_sections): Likewise.
1328 (elf_backend_size_dynamic_sections): Likewise.
1329 (_bfd_x86_elf_allocate_dynrelocs): Removed.
1330 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
1331
1332 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1333
1334 * elfxx-x86.h (elf_x86_link_hash_table): Rearrange fields and
1335 update comments.
1336
1337 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1338
1339 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
1340 sgotplt_jump_table_size with elf_x86_compute_jump_table_size.
1341
1342 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1343
1344 * elf32-i386.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
1345 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Moved to ...
1346 * elfxx-x86.h (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
1347 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Here.
1348 * elf64-x86-64.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
1349 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Removed.
1350
1351 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1352
1353 * elf32-i386.c (elf_i386_allocate_dynrelocs): Removed.
1354 (elf_i386_allocate_local_dynrelocs): Likewise.
1355 (elf_i386_size_dynamic_sections): Replace
1356 elf_i386_allocate_dynrelocs/elf_i386_allocate_local_dynrelocs
1357 with _bfd_x86_elf_allocate_dynrelocs and
1358 _bfd_x86_elf_allocate_local_dynrelocs.
1359 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Removed.
1360 (elf_x86_64_allocate_local_dynrelocs): Likewise.
1361 (elf_x86_64_size_dynamic_sections): Replace
1362 elf_x86_64_allocate_dynrelocs/elf_x86_64_allocate_local_dynrelocs
1363 with _bfd_x86_elf_allocate_dynrelocs and
1364 _bfd_x86_elf_allocate_local_dynrelocs.
1365 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): New function.
1366 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
1367 * elfxx-x86.h (_bfd_x86_elf_allocate_dynrelocs): New prototype.
1368 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
1369
1370 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1371
1372 * elf32-i386.c (is_i386_elf): Removed.
1373 (elf_i386_check_relocs): Replace is_i386_elf with is_x86_elf.
1374 (elf_i386_size_dynamic_sections): Likewise.
1375 (elf_i386_relocate_section): Likewise.
1376 * elf64-x86-64.c (is_x86_64_elf): Removed.
1377 (elf_x86_64_check_relocs): Replace is_x86_64_elf with
1378 is_x86_elf.
1379 (elf_x86_64_size_dynamic_sections): Likewise.
1380 (elf_x86_64_relocate_section): Likewise.
1381 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1382 target_id.
1383 * elfxx-x86.h (elf_x86_link_hash_table): Add target_id.
1384 (is_x86_elf): New.
1385
1386 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1387
1388 * elf32-i386.c (elf_i386_compute_jump_table_size): Removed.
1389 (elf_i386_allocate_dynrelocs): Replace
1390 elf_i386_compute_jump_table_size with
1391 elf_x86_compute_jump_table_size.
1392 (elf_i386_size_dynamic_sections): Likewise.
1393 * elf64-x86-64.c (elf_x86_64_compute_jump_table_size): Removed.
1394 (elf_x86_64_allocate_dynrelocs): Replace
1395 elf_x86_64_compute_jump_table_size with
1396 elf_x86_compute_jump_table_size.
1397 (elf_x86_64_size_dynamic_sections): Likewise.
1398 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1399 got_entry_size.
1400 * elfxx-x86.h (elf_x86_link_hash_table): Add got_entry_size.
1401 (elf_x86_compute_jump_table_size): New.
1402
1403 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1404
1405 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1406 sizeof_reloc.
1407 (_bfd_x86_elf_adjust_dynamic_symbol): Use sizeof_reloc.
1408 * elfxx-x86.h (elf_x86_link_hash_table): Add sizeof_reloc.
1409
1410 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1411
1412 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check VxWorks
1413 with htab->is_vxworks.
1414 (elf_i386_size_dynamic_sections): Likewise.
1415 (elf_i386_relocate_section): Likewise.
1416 (elf_i386_finish_dynamic_symbol): Likewise.
1417 (elf_i386_finish_dynamic_sections): Likewise.
1418
1419 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1420
1421 * elf32-i386.c (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
1422 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
1423 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Moved to ...
1424 * elfxx-x86.h (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
1425 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
1426 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Here.
1427 * elf64-x86-64.c (GOT_TLS_IE, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
1428 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Removed.
1429
1430 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1431
1432 PR ld/22064
1433 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Check
1434 ELF_COMMON_DEF_P for common symbols.
1435
1436 2017-09-02 Alan Modra <amodra@gmail.com>
1437
1438 * elf-eh-frame.c (offset_adjust): Avoid false positive gcc warning.
1439 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Likewise.
1440 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
1441
1442 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1443
1444 * elf32-i386.c (elf_i386_gc_mark_hook): Removed.
1445 (elf_backend_gc_mark_hook): Likewise.
1446 * elf64-x86-64.c (elf_x86_64_gc_mark_hook): Likewise.
1447 (elf_backend_gc_mark_hook): Likewise.
1448 * elfxx-x86.c (_bfd_x86_elf_gc_mark_hook): New function.
1449 * elfxx-x86.h (_bfd_x86_elf_gc_mark_hook): New.
1450 (elf_backend_gc_mark_hook): Likewise.
1451
1452 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1453
1454 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Removed.
1455 (elf_backend_adjust_dynamic_symbol): Likewise.
1456 * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.
1457 (elf_backend_adjust_dynamic_symbol): Likewise.
1458 * elfxx-x86.c (_bfd_x86_elf_adjust_dynamic_symbol): New function.
1459 (_bfd_x86_elf_link_setup_gnu_properties): Copy is_vxworks.
1460 * elfxx-x86.h (elf_x86_link_hash_table): Add is_vxworks.
1461 (_bfd_x86_elf_adjust_dynamic_symbol): New.
1462 (elf_backend_adjust_dynamic_symbol): Likewise.
1463
1464 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1465
1466 * elfxx-x86.h (elf_x86_plt_layout_table): Fix a typo in
1467 comments.
1468
1469 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1470
1471 * elf32-i386.c (elf_i386_mkobject): Removed.
1472 (bfd_elf32_mkobject): Likewise.
1473 * elf64-x86-64.c (elf_x86_64_mkobject): Likewise.
1474 (bfd_elf64_mkobject): Likewise.
1475 (bfd_elf32_mkobject): Likewise.
1476 * elfxx-x86.c (_bfd_x86_elf_mkobject): New function.
1477 * elfxx-x86.h (_bfd_x86_elf_mkobject): New.
1478 (bfd_elf64_mkobject): Likewise.
1479 (bfd_elf32_mkobject): Likewise.
1480
1481 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1482
1483 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Updated.
1484 Call _bfd_x86_elf_link_setup_gnu_properties.
1485 * elf64-x86-64.c (elf_x86_lazy_plt_layout): Initialize
1486 pic_plt0_entry and pic_plt_entry fields with the non-PIC PLT
1487 entries.
1488 (elf_x86_64_non_lazy_plt): Likewise.
1489 (elf_x86_64_lazy_bnd_plt): Likewise.
1490 (elf_x86_64_non_lazy_bnd_plt): Likewise.
1491 (elf_x86_64_lazy_ibt_plt): Likewise.
1492 (elf_x32_lazy_ibt_plt): Likewise.
1493 (elf_x86_64_non_lazy_ibt_plt): Likewise.
1494 (elf_x32_non_lazy_ibt_plt): Likewise.
1495 (elf_x86_64_nacl_plt): Likewise.
1496 (elf_x86_64_link_setup_gnu_properties): Updated. Call
1497 _bfd_x86_elf_link_setup_gnu_properties.
1498 * elfxx-x86.c: Include elf-vxworks.h".
1499 (_bfd_x86_elf_link_setup_gnu_properties): New function.
1500 * elfxx-x86.h (elf_x86_lazy_plt_layout): Remove "for i386 only"
1501 comments for pic_plt0_entry and pic_plt_entry.
1502 (elf_x86_non_lazy_plt_layout): Likewise.
1503 (elf_x86_plt_layout_table): New.
1504 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
1505
1506 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1507
1508 PR ld/22061
1509 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Create
1510 .eh_frame section for the second PLT.
1511 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Correct
1512 alignment of .eh_frame section for the second PLT.
1513
1514 2017-09-01 Nick Clifton <nickc@redhat.com>
1515
1516 PR 22059
1517 * dwarf2.c (decode_line_info): Fix test for an overlong line info
1518 structure.
1519
1520 2017-09-01 Nick Clifton <nickc@redhat.com>
1521
1522 PR 22058
1523 * elf-attrs.c (_bfd_elf_parse_attributes): Ensure that the
1524 attribute buffer is NUL terminated.
1525
1526 2017-08-31 Nick Clifton <nickc@redhat.com>
1527
1528 PR 22047
1529 * dwarf2.c (read_section): If necessary add a terminating NUL byte
1530 to dwarf string sections.
1531
1532 2017-08-31 Alan Modra <amodra@gmail.com>
1533
1534 * po/SRC-POTFILES.in: Regenerate.
1535
1536 2017-08-31 Alan Modra <amodra@gmail.com>
1537
1538 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Don't exit early
1539 for a section containing just a terminator. Allow multiple
1540 terminators at end of section.
1541 * elflink.c (bfd_elf_discard_info): Iterate over .eh_frame
1542 sections when not adding alignment. Assert on terminator in
1543 the middle of FDEs.
1544
1545 2017-08-31 Alan Modra <amodra@gmail.com>
1546
1547 PR 21441
1548 PR 22048
1549 * elflink.c (bfd_elf_discard_info): Don't pad embedded zero
1550 terminators.
1551
1552 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1553
1554 * configure.ac (bfd_backends): Add elf64.lo together with
1555 elfxx-x86.lo for 64-bit BFD.
1556 * configure: Regenerated.
1557
1558 2017-08-31 James Bowman <james.bowman@ftdichip.com>
1559
1560 * elf32-ft32.c (ft32_elf_howto_table): Use complain_overflow_dont
1561 for R_FT32_18.
1562
1563 2017-08-31 Alan Modra <amodra@gmail.com>
1564
1565 PR binutils/22032
1566 * opncls.c (bfd_close_all_done): Don't call bfd_cache_close
1567 before _close_and_cleanup. Call iovec->bclose after.
1568 (bfd_close): Remove code common to, and call, bfd_close_all_done.
1569
1570 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1571
1572 * elf32-i386.c (elf_i386_plt_type): Removed.
1573 (elf_i386_plt): Likewise.
1574 (elf_i386_get_synthetic_symtab): Updated. Call
1575 _bfd_x86_elf_get_synthetic_symtab.
1576 * elf64-x86-64.c (elf_x86_64_plt_type): Removed.
1577 (elf_x86_64_plt): Likewise.
1578 (elf_x86_64_get_synthetic_symtab): Updated. Call
1579 _bfd_x86_elf_get_synthetic_symtab.
1580 * elfxx-x86.c (elf_i386_get_plt_got_vma): New function.
1581 (elf_x86_64_get_plt_got_vma): Likewise.
1582 (elf_i386_valid_plt_reloc_p): Likewise.
1583 (elf_x86_64_valid_plt_reloc_p): Likewise.
1584 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
1585 * elfxx-x86.h (elf_x86_plt_type): New.
1586 (elf_x86_plt): Likewise.
1587 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
1588
1589 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1590
1591 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Check
1592 target_id instead of elf_machine_code.
1593
1594 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1595
1596 * elf32-i386.c (ELF_DYNAMIC_INTERPRETER): Removed.
1597 (elf_i386_lazy_plt_layout): Likewise.
1598 (elf_i386_non_lazy_plt_layout): Likewise.
1599 (elf_i386_plt_layout): Likewise.
1600 (elf_i386_link_hash_table): Likewise.
1601 (elf_i386_next_tls_desc_index): Likewise.
1602 (elf_i386_srelplt2): Likewise.
1603 (elf_i386_plt): Likewise.
1604 (elf_i386_lazy_plt): Likewise.
1605 (elf_i386_non_lazy_plt): Likewise.
1606 (elf_i386_link_hash_table_create): Likewise.
1607 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1608 (elf_i386_lazy_plt): Updated.
1609 (elf_i386_non_lazy_plt): Likewise.
1610 (elf_i386_lazy_ibt_plt): Likewise.
1611 (elf_i386_non_lazy_ibt_plt): Likewise.
1612 (elf_i386_allocate_dynrelocs): Likewise.
1613 (elf_i386_size_dynamic_sections): Likewise.
1614 (elf_i386_relocate_section): Likewise.
1615 (elf_i386_finish_dynamic_symbol): Likewise.
1616 (elf_i386_finish_dynamic_sections): Likewise.
1617 (elf_i386_get_synthetic_symtab): Likewise.
1618 (elf_i386_link_setup_gnu_properties): Likewise.
1619 (elf_i386_nacl_plt): Likewise.
1620 * elf64-x86-64.c (ABI_64_P): Removed.
1621 (ELF64_DYNAMIC_INTERPRETER): Likewise.
1622 (ELF32_DYNAMIC_INTERPRETER): Likewise.
1623 (elf_x86_64_lazy_plt_layout): Likewise.
1624 (elf_x86_64_non_lazy_plt_layout): Likewise.
1625 (elf_x86_64_plt_layout): Likewise.
1626 (elf_x86_64_link_hash_table): Likewise.
1627 (elf_x86_64_plt): Likewise.
1628 (elf_x86_64_lazy_plt): Likewise.
1629 (elf_x86_64_non_lazy_plt): Likewise.
1630 (elf_x86_64_link_hash_table_create): Likewise.
1631 (bfd_elf64_bfd_link_hash_table_create): Likewise.
1632 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1633 (elf_x86_64_lazy_plt): Updated.
1634 (elf_x86_64_non_lazy_plt): Likewise.
1635 (elf_x86_64_lazy_bnd_plt): Likewise.
1636 (elf_x86_64_non_lazy_bnd_plt): Likewise.
1637 (elf_x86_64_lazy_ibt_plt): Likewise.
1638 (elf_x32_lazy_ibt_plt): Likewise.
1639 (elf_x86_64_non_lazy_ibt_plt): Likewise.
1640 (elf_x32_non_lazy_ibt_plt): Likewise.
1641 (elf_x86_64_allocate_dynrelocs): Likewise.
1642 (elf_x86_64_size_dynamic_sections): Likewise.
1643 (elf_x86_64_relocate_section): Likewise.
1644 (elf_x86_64_finish_dynamic_symbol): Likewise.
1645 (elf_x86_64_finish_dynamic_sections): Likewise.
1646 (elf_x86_64_get_synthetic_symtab): Likewise.
1647 (elf_x86_64_link_setup_gnu_properties): Likewise.
1648 (elf_x86_64_nacl_plt): Likewise.
1649 * elfxx-x86.c: Include "objalloc.h", "elf/i386.h" and
1650 "elf/x86-64.h".
1651 (ELF32_DYNAMIC_INTERPRETER): New.
1652 (ELF64_DYNAMIC_INTERPRETER): Likewise.
1653 (ELFX32_DYNAMIC_INTERPRETER): Likewise.
1654 (_bfd_x86_elf_link_hash_table_create): Likewise.
1655 (_bfd_x86_elf_link_hash_table_free): Renamed to ...
1656 (elf_x86_link_hash_table_free): This. Make it static.
1657 * elfxx-x86.h: Don't include "objalloc.h".
1658 (ABI_64_P): New.
1659 (elf_x86_lazy_plt_layout): Likewise.
1660 (elf_x86_non_lazy_plt_layout): Likewise.
1661 (elf_x86_plt_layout): Likewise.
1662 (_bfd_x86_elf_link_hash_table_create): Likewise.
1663 (bfd_elf64_bfd_link_hash_table_create): Likewise.
1664 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1665 (elf_x86_link_hash_table): Add plt, lazy_plt, non_lazy_plt,
1666 srelplt2 and next_tls_desc_index.
1667 (_bfd_x86_elf_link_hash_table_free): Removed.
1668
1669 2017-08-30 Maciej W. Rozycki <macro@imgtec.com>
1670
1671 * elfxx-mips.c (mips_elf_perform_relocation): Correct microMIPS
1672 branch offset interpretation.
1673
1674 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1675
1676 PR binutils/22032
1677 * opncls.c (bfd_close_all_done): Call _close_and_cleanup.
1678
1679 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1680
1681 * elf64-x86-64.c (elf_x86_64_next_tls_desc_index): Removed.
1682 (elf_x86_64_srelplt2): Likewise.
1683
1684 2017-08-30 Alan Modra <amodra@gmail.com>
1685
1686 * elf64-ppc.c (struct ppc_link_hash_table): Add do_tls_opt.
1687 (ppc64_elf_tls_optimize): Set it.
1688 (ppc64_elf_relocate_section): Nop addis on TPREL16_HA, and convert
1689 insn on TPREL16_LO and TPREL16_LO_DS relocs to use r13 when
1690 addis would add zero.
1691 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add do_tls_opt.
1692 (ppc_elf_tls_optimize): Set it.
1693 (ppc_elf_relocate_section): Nop addis on TPREL16_HA, and convert
1694 insn on TPREL16_LO relocs to use r2 when addis would add zero.
1695
1696 2017-08-30 Alan Modra <amodra@gmail.com>
1697
1698 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing
1699 __tls_get_addr call sequences to LE, don't move the addi down
1700 to the nop. Replace the bl with addi and leave the nop alone.
1701
1702 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1703
1704 * elf32-i386.c (elf_i386_pie_finish_undefweak_symbol):
1705 Re-indent.
1706 * elf64-x86-64.c (elf_x86_64_finish_local_dynamic_symbol):
1707 Likewise.
1708 (elf_x86_64_pie_finish_undefweak_symbol): Likewise.
1709
1710 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1711
1712 * Makefile.am (BFD32_BACKENDS): Add elfxx-x86.lo.
1713 (BFD64_BACKENDS): Likewise.
1714 (BFD32_BACKENDS_CFILES): Add elfxx-x86.c.
1715 (BFD64_BACKENDS_CFILES): Likewise.
1716 * Makefile.in: Regenerated.
1717 * configure.ac (bfd_backends): Add elfxx-x86.lo together with
1718 elf32-i386.lo and elf64-x86-64.lo.
1719 * configure: Regenerated.
1720 * elf32-i386.c: Include "elfxx-x86.h" instead of "sysdep.h",
1721 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
1722 "objalloc.h" and "hashtab.h".
1723 (ELIMINATE_COPY_RELOCS): Removed.
1724 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
1725 (SYMBOL_NO_COPYRELOC): Likewise.
1726 (elf_i386_link_hash_entry): Likewise.
1727 (GOT_UNKNOWN): Likewise.
1728 (GOT_NORMAL): Likewise.
1729 (GOT_TLS_GD): Likewise.
1730 (elf_i386_hash_entry): Likewise.
1731 (elf_i386_obj_tdata): Likewise.
1732 (elf_i386_tdata): Likewise.
1733 (elf_i386_local_got_tls_type): Likewise.
1734 (elf_i386_local_tlsdesc_gotent): Likewise.
1735 (elf_i386_hash_table): Likewise.
1736 (elf_i386_link_hash_newfunc): Likewise.
1737 (elf_i386_local_htab_hash): Likewise.
1738 (elf_i386_local_htab_eq): Likewise.
1739 (elf_i386_get_local_sym_hash): Likewise.
1740 (elf_i386_link_hash_table_free): Likewise.
1741 (elf_i386_copy_indirect_symbol): Likewise.
1742 (elf_i386_fixup_symbol): Likewise.
1743 (elf_i386_readonly_dynrelocs): Likewise.
1744 (elf_i386_always_size_sections): Likewise.
1745 (elf_i386_set_tls_module_base): Likewise.
1746 (elf_i386_dtpoff_base): Likewise.
1747 (compare_relocs): Likewise.
1748 (elf_i386_hash_symbol): Likewise.
1749 (elf_i386_parse_gnu_properties): Likewise.
1750 (elf_i386_merge_gnu_properties): Likewise.
1751 (elf_i386_link_check_relocs): Likewise.
1752 (elf_i386_merge_symbol_attribute): Likewise.
1753 (bfd_elf32_bfd_link_check_relocs): Likewise.
1754 (elf_backend_copy_indirect_symbol): Likewise.
1755 (elf_backend_always_size_sections): Likewise.
1756 (elf_backend_omit_section_dynsym): Likewise.
1757 (elf_backend_hash_symbol): Likewise.
1758 (elf_backend_fixup_symbol): Likewise.
1759 (elf_backend_parse_gnu_properties): Likewise.
1760 (elf_backend_merge_gnu_properties): Likewise.
1761 (elf_backend_merge_symbol_attribute): Likewise.
1762 (elf_i386_mkobject): Updated.
1763 (elf_i386_link_hash_table_create): Likewise.
1764 (elf_i386_check_tls_transition): Likewise.
1765 (elf_i386_tls_transition): Likewise.
1766 (elf_i386_convert_load_reloc): Likewise.
1767 (elf_i386_check_relocs): Likewise.
1768 (elf_i386_adjust_dynamic_symbol): Likewise.
1769 (elf_i386_allocate_dynrelocs): Likewise.
1770 (elf_i386_convert_load): Likewise.
1771 (elf_i386_size_dynamic_sections): Likewise.
1772 (elf_i386_relocate_section): Likewise.
1773 (elf_i386_finish_dynamic_symbol ): Likewise.
1774 (elf_i386_finish_dynamic_sections): Likewise.
1775 (elf_i386_output_arch_local_syms): Likewise.
1776 (elf_i386_get_synthetic_symtab): Likewise.
1777 (elf_i386_link_setup_gnu_properties): Likewise.
1778 (elf_i386_link_hash_table): Use elf_x86_link_hash_table, instead
1779 of elf_link_hash_table, as base.
1780 (elf_i386_next_tls_desc_index): New.
1781 (elf_i386_srelplt2): Likewise.
1782 (elf_i386_plt): Likewise.
1783 (elf_i386_lazy_plt): Likewise.
1784 (elf_i386_non_lazy_plt): Likewise.
1785 * elf32-x86-64.c: Include "elfxx-x86.h" instead of "sysdep.h",
1786 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
1787 "objalloc.h" and "hashtab.h".
1788 (ELIMINATE_COPY_RELOCS): Removed.
1789 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
1790 (SYMBOL_NO_COPYRELOC): Likewise.
1791 (elf_x86_64_link_hash_entry): Likewise.
1792 (GOT_UNKNOWN): Likewise.
1793 (GOT_NORMAL): Likewise.
1794 (GOT_TLS_GD): Likewise.
1795 (elf_x86_64_hash_entry): Likewise.
1796 (elf_x86_64_obj_tdata): Likewise.
1797 (elf_x86_64_tdata): Likewise.
1798 (elf_x86_64_local_got_tls_type): Likewise.
1799 (elf_x86_64_local_tlsdesc_gotent): Likewise.
1800 (elf_x86_64_hash_table): Likewise.
1801 (elf_x86_64_link_hash_newfunc): Likewise.
1802 (elf_x86_64_local_htab_hash): Likewise.
1803 (elf_x86_64_local_htab_eq): Likewise.
1804 (elf_x86_64_get_local_sym_hash): Likewise.
1805 (elf_x86_64_link_hash_table_free): Likewise.
1806 (elf_x86_64_copy_indirect_symbol): Likewise.
1807 (elf_x86_64_fixup_symbol): Likewise.
1808 (elf_x86_64_readonly_dynrelocs): Likewise.
1809 (elf_x86_64_always_size_sections): Likewise.
1810 (elf_x86_64_set_tls_module_base): Likewise.
1811 (elf_x86_64_dtpoff_base): Likewise.
1812 (compare_relocs): Likewise.
1813 (elf_x86_64_merge_symbol_attribute): Likewise.
1814 (elf_x86_64_hash_symbol): Likewise.
1815 (elf_x86_64_parse_gnu_properties): Likewise.
1816 (elf_x86_64_merge_gnu_properties): Likewise.
1817 (elf_x86_64_link_check_relocs): Likewise.
1818 (elf_backend_copy_indirect_symbol): Likewise.
1819 (elf_backend_always_size_sections): Likewise.
1820 (bfd_elf64_bfd_link_check_relocs): Likewise.
1821 (elf_backend_merge_symbol_attribute): Likewise.
1822 (elf_backend_hash_symbol): Likewise.
1823 (elf_backend_omit_section_dynsym): Likewise.
1824 (elf_backend_fixup_symbol): Likewise.
1825 (elf_backend_parse_gnu_properties): Likewise.
1826 (elf_backend_merge_gnu_properties): Likewise.
1827 (bfd_elf32_bfd_link_check_relocs): Likewise.
1828 (elf_x86_64_mkobject): Updated.
1829 (elf_x86_64_link_hash_table_create): Likewise.
1830 (elf_x86_64_check_tls_transition): Likewise.
1831 (elf_x86_64_tls_transition): Likewise.
1832 (elf_x86_64_convert_load_reloc): Likewise.
1833 (elf_x86_64_check_relocs): Likewise.
1834 (elf_x86_64_adjust_dynamic_symbol): Likewise.
1835 (elf_x86_64_allocate_dynrelocs): Likewise.
1836 (elf_x86_64_convert_load): Likewise.
1837 (elf_x86_64_size_dynamic_sections): Likewise.
1838 (elf_x86_64_relocate_section): Likewise.
1839 (elf_x86_64_finish_dynamic_symbol ): Likewise.
1840 (elf_x86_64_finish_dynamic_sections): Likewise.
1841 (elf_x86_64_output_arch_local_syms): Likewise.
1842 (elf_x86_64_get_synthetic_symtab): Likewise.
1843 (elf_x86_64_link_setup_gnu_properties): Likewise.
1844 (elf_x86_64_link_hash_table): Use elf_x86_link_hash_table,
1845 instead of elf_link_hash_table, as base.
1846 (elf_x86_64_next_tls_desc_index): New.
1847 (elf_x86_64_srelplt2): Likewise.
1848 (elf_x86_64_plt): Likewise.
1849 (elf_x86_64_lazy_plt): Likewise.
1850 (elf_x86_64_non_lazy_plt): Likewise.
1851 * elfxx-x86.c: New file.
1852 * elfxx-x86.h: Likewise.
1853
1854 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1855
1856 * elf32-i386.c (elf_i386_get_synthetic_symtab): Simplify bad
1857 return.
1858 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1859
1860 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1861
1862 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check valid PLT
1863 sections before checking dynamic relocations and free invalid
1864 PLT section contents.
1865 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1866
1867 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
1868
1869 * elf-bfd.h (_bfd_elf_ifunc_get_synthetic_symtab): Removed.
1870 * elf-ifunc.c (_bfd_elf_ifunc_get_synthetic_symtab): Likewise.
1871
1872 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
1873
1874 PR binutils/22018
1875 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check for valid
1876 PLT section size.
1877 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1878
1879 2017-08-27 H.J. Lu <hongjiu.lu@intel.com>
1880
1881 * elf32-i386.c (elf_i386_link_hash_newfunc): Initialize
1882 def_protected.
1883 * elf64-x86-64.c (elf_x86_64_link_hash_newfunc): Likewise.
1884
1885 2017-08-26 H.J. Lu <hongjiu.lu@intel.com>
1886
1887 PR ld/21997
1888 * elf-bfd.h (elf_obj_tdata): Use ENUM_BITFIELD on object_id,
1889 dyn_lib_class and has_gnu_symbols. Change bad_symtab to bitfield.
1890 Add a has_no_copy_on_protected bitfield.
1891 (elf_has_no_copy_on_protected): New.
1892 * elf-properties.c (_bfd_elf_parse_gnu_properties): Set
1893 elf_has_no_copy_on_protected for GNU_PROPERTY_NO_COPY_ON_PROTECTED.
1894 (elf_merge_gnu_property_list): Likewise.
1895 (_bfd_elf_link_setup_gnu_properties): Set extern_protected_data
1896 to FALSE for elf_has_no_copy_on_protected.
1897 * elf32-i386.c (SYMBOL_NO_COPYRELOC): New.
1898 (elf_i386_link_hash_entry): Add def_protected.
1899 (elf_i386_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
1900 when checking info->nocopyreloc.
1901 (elf_i386_link_setup_gnu_properties): Don't set
1902 extern_protected_data here.
1903 (elf_i386_merge_symbol_attribute): New function.
1904 (elf_backend_merge_symbol_attribute): New.
1905 * elf64-x86-64.c (SYMBOL_NO_COPYRELOC): New.
1906 (elf_x86_64_link_hash_entry): Add def_protected.
1907 (elf_x86_64_need_pic): Report protected symbol for def_protected.
1908 (elf_x86_64_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
1909 when checking info->nocopyreloc.
1910 (elf_x86_64_relocate_section): Also check for R_X86_64_PC32
1911 relocation run-time overflow and unresolvable R_X86_64_32S
1912 relocation against protected data symbol defined in shared object
1913 with GNU_PROPERTY_NO_COPY_ON_PROTECTED.
1914 (elf_x86_64_link_setup_gnu_properties): Don't set
1915 extern_protected_data here.
1916 (elf_x86_64_merge_symbol_attribute): New function.
1917 (elf_backend_merge_symbol_attribute): New.
1918
1919 2017-08-26 Alan Modra <amodra@gmail.com>
1920
1921 * elf32-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
1922 (ppc_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
1923 (ppc_elf_relocate_section): Comment fix.
1924 * elf64-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
1925 (ppc64_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
1926 Support dynamic relocs for TPREL16 when non-pic too.
1927 (dec_dynrel_count): Adjust TPREL16 handling as per check_relocs.
1928 (ppc64_elf_relocate_section): Support dynamic relocs for TPREL16
1929 when non-pic too.
1930
1931 2017-08-25 H.J. Lu <hongjiu.lu@intel.com>
1932
1933 * elf32-i386.c (elf_i386_link_hash_entry): Remove redundant
1934 "symbol" in comments.
1935 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Likewise.
1936
1937 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
1938
1939 PR ld/22001
1940 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for
1941 R_X86_64_PC32 relocation run-time overflow and unresolvable
1942 R_X86_64_32S relocation with -z nocopyreloc.
1943
1944 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
1945
1946 * elf32-i386.c (elf_i386_check_relocs): Revert the last change.
1947 Undefined symbols may not have a type.
1948 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1949
1950 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1951
1952 * elf64-x86-64.c (elf_x86_64_need_pic): Add an argument for
1953 bfd_link_info. Report shared, PIE or PDE object based on
1954 bfd_link_info.
1955 (elf_x86_64_check_relocs): Update elf_x86_64_need_pic call.
1956 (elf_x86_64_relocate_section): Likewise.
1957
1958 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1959
1960 * elf32-i386.c (elf_i386_check_relocs): Increment PLT count only
1961 for function symbols.
1962 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1963
1964 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1965
1966 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set
1967 extern_protected_data to FALSE if GNU_PROPERTY_NO_COPY_ON_PROTECTED
1968 is set on any input relocatable file.
1969 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
1970
1971 2017-08-23 Alan Modra <amodra@gmail.com>
1972
1973 PR 21988
1974 * elf64-ppc.c (ensure_undef_dynamic): Rename from
1975 ensure_undefweak_dynamic. Handle undefined too.
1976 * elf32-ppc.c (ensure_undef_dynamic): Likewise.
1977 * elf32-hppa.c (ensure_undef_dynamic): Likewise.
1978 (allocate_dynrelocs): Discard undefined non-default visibility
1979 relocs first. Make undefined syms dynamic. Tidy goto.
1980
1981 2017-08-21 Alan Modra <amodra@gmail.com>
1982 H.J. Lu <hongjiu.lu@intel.com>
1983
1984 PR ld/21964
1985 * elf-bfd.h (SYMBOLIC_BIND): Return TRUE for __start/__stop symbols.
1986 * elflink.c (bfd_elf_define_start_stop): Rewrite.
1987
1988 2017-08-21 Hans-Peter Nilsson <hp@bitrange.com>
1989
1990 PR ld/20125
1991 * elf64-mmix.c (mmix_elf_relax_section): Correct handling of
1992 undefined weak symbols.
1993
1994 2017-08-18 Nick Clifton <nickc@redhat.com>
1995
1996 PR binutils/21962
1997 * tekhex.c (getsym): Fix check for source pointer walking off the
1998 end of the input buffer.
1999
2000 2017-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
2001
2002 PR ld/18808
2003 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Skip IFUNC
2004 relocations in debug sections, change abort to _bfd_error_handler.
2005
2006 2017-08-14 Nick Clifton <nickc@redhat.com>
2007
2008 PR 21957
2009 * elf.c (setup_group): Check for an empty or very small group
2010 section.
2011 * po/bfd.pot: Regenerate.
2012
2013 2017-08-14 Alan Modra <amodra@gmail.com>
2014
2015 PR 21441
2016 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't add
2017 alignment padding here.
2018 * elflink.c (bfd_elf_discard_info): Add .eh_frame padding here
2019 in a reverse pass over sections.
2020
2021 2017-08-11 H.J. Lu <hongjiu.lu@intel.com>
2022
2023 PR binutils/21943
2024 * elf32-i386.c (elf_i386_get_synthetic_symtab): Allocate space
2025 for @plt suffixes first.
2026 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
2027
2028 2017-08-08 Nick Clifton <nickc@redhat.com>
2029
2030 PR 21916
2031 * elf-attrs.c (_bfd_elf_parse_attributes): Complain about very
2032 small section lengths.
2033 * elf.c (_bfd_elf_setup_sections): Skip empty entries in the group
2034 table.
2035 (elfcore_grok_freebsd_prstatus): Add checks to make sure that
2036 there is enough data present in the note.
2037
2038 2017-08-08 Alan Modra <amodra@gmail.com>
2039
2040 PR 21017
2041 * elf32-microblaze.c (microblaze_elf_check_relocs): Don't bump
2042 got.refcount for GOTOFF relocs, just create .got section.
2043
2044 2017-08-07 H.J. Lu <hongjiu.lu@intel.com>
2045
2046 * elflink.c (elf_link_add_object_symbols): Move common symbol
2047 check after bed->common_definition.
2048
2049 2017-08-07 Alan Modra <amodra@gmail.com>
2050
2051 PR 21910
2052 * elflink.c (bfd_elf_final_link): Don't segfault when sections
2053 needed to define various dynamic tags have been discarded.
2054
2055 2017-08-07 Nick Clifton <nickc@redhat.com>
2056
2057 PR 21884
2058 * elf32-i386.c (elf_i386_link_setup_gnu_properties): If the dynobj
2059 has not been set then use the bfd returned by
2060 _bfd_elf_link_setup_gnu_properties. If that is null then search
2061 through all the input bfds selecting the first normal, ELF format
2062 one.
2063 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
2064
2065 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
2066
2067 * elf32-i386.c (elf_i386_link_hash_entry): Change tls_get_addr
2068 to 1 bit.
2069 (elf_i386_link_hash_newfunc): Initialize tls_get_addr to 0.
2070 (elf_i386_check_tls_transition): Check tls_get_addr directly.
2071 (elf_i386_convert_load_reloc): Update tls_get_addr check.
2072 (elf_i386_link_check_relocs): New function.
2073 (bfd_elf32_bfd_link_check_relocs): New.
2074 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Change tls_get_addr
2075 to 1 bit.
2076 (elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 0.
2077 (elf_x86_64_check_tls_transition): Check tls_get_addr directly.
2078 (elf_x86_64_convert_load_reloc): Update tls_get_addr check.
2079 (elf_x86_64_link_check_relocs): New function.
2080 (bfd_elf64_bfd_link_check_relocs): New.
2081 (bfd_elf32_bfd_link_check_relocs): Likewise.
2082
2083 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
2084
2085 PR ld/21903:
2086 * elflink.c (elf_link_add_object_symbols): Treat common symbol
2087 as undefined for --no-define-common.
2088
2089 2017-08-05 Alan Modra <amodra@gmail.com>
2090
2091 * elf32-hppa.c (elf32_hppa_set_gp): Don't require an
2092 hppa_link_hash_table.
2093
2094 2017-08-02 Max Filippov <jcmvbkbc@gmail.com>
2095
2096 * xtensa-isa.c (xtensa_isa_init): Don't update lookup table
2097 entries for sysregs with negative indices.
2098
2099 2017-08-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2100
2101 * elf32-s390.c (elf_s390_finish_dynamic_sections): Skip if it
2102 isn't the S/390 specific elf data.
2103 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
2104
2105 2017-07-31 Kuan-Lin Chen <rufus@andestech.com>
2106
2107 * elfxx-riscv.c (riscv_elf_add_sub_reloc): New function.
2108 * (howto_table) [R_RISCV_ADD8]: Use riscv_elf_add_sub_reloc.
2109 [R_RISCV_ADD16]: Likewise.
2110 [R_RISCV_ADD32]: Likewise.
2111 [R_RISCV_ADD64]: Likewise.
2112 [R_RISCV_SUB6]: Likewise.
2113 [R_RISCV_SUB8]: Likewise.
2114 [R_RISCV_SUB16]: Likewise.
2115 [R_RISCV_SUB32]: Likewise.
2116 [R_RISCV_SUB64]: Likewise.
2117
2118 2017-07-31 Alan Modra <amodra@gmail.com>
2119
2120 * elf64-ppc.c (ppc64_elf_tls_setup): Warn on --plt-localentry
2121 without ld.so checks.
2122
2123 2017-07-29 Alan Modra <amodra@gmail.com>
2124
2125 PR 21847
2126 * elf64-ppc.c (struct ppc_link_hash_entry): Add non_zero_localentry.
2127 (ppc64_elf_merge_symbol): Set non_zero_localentry.
2128 (is_elfv2_localentry0): Test non_zero_localentry.
2129 (ppc64_elf_tls_setup): Default to --no-plt-localentry.
2130
2131 2017-07-28 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2132
2133 * elf32-s390.c (elf_s390_finish_dynamic_sections): Add NULL
2134 pointer check for htab->elf.irelplt.
2135 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
2136
2137 2017-07-27 Nick Clifton <nickc@redhat.com>
2138
2139 PR 21840
2140 * mach-o.c (bfd_mach_o_read_symtab_strtab): Fail if the symtab
2141 size is -1.
2142 * nlmcode.h (nlm_swap_auxiliary_headers_in): Replace assertion
2143 with error return.
2144 * section.c (bfd_make_section_with_flags): Fail if the name or bfd
2145 are NULL.
2146 * vms-alpha.c (bfd_make_section_with_flags): Correct computation
2147 of end pointer.
2148 (evax_bfd_print_emh): Check for invalid string lengths.
2149
2150 2017-07-25 Nick Clifton <nickc@redhat.com>
2151
2152 * po/fr.po: Updated French translation.
2153
2154 2017-07-25 Benjamin Green <bengreen5mx@gmail.com>
2155
2156 PR 21824
2157 * elf32-msp430.c (msp430_elf_relax_section): Allow conversion of
2158 16-bit absolute branches into 10-bit pc-relative branches on the
2159 MSP430 as well as the MSP430X.
2160
2161 2017-07-25 Alan Modra <amodra@gmail.com>
2162
2163 * elf64-ppc.c (struct map_stub): Add tls_get_addr_opt_bctrl.
2164 (stub_eh_frame_size): New function.
2165 (ppc_size_one_stub): Set group tls_get_addr_opt_bctrl.
2166 (group_sections): Init group tls_get_addr_opt_bctrl.
2167 (ppc64_elf_size_stubs): Update sizing and initialization of
2168 .eh_frame. Iteration over stubs via group list.
2169 (ppc64_elf_build_stubs): Iterate over stubs via group list.
2170 (ppc64_elf_finish_dynamic_sections): Update finalization of
2171 .eh_frame.
2172
2173 2017-07-24 Nick Clifton <nickc@redhat.com>
2174
2175 PR 21813
2176 * mach-o.c (bfd_mach_o_canonicalize_relocs): Pass the base address
2177 of the relocs to the canonicalize_one_reloc routine.
2178 * mach-o.h (struct bfd_mach_o_backend_data): Update the prototype
2179 for the _bfd_mach_o_canonicalize_one_reloc field.
2180 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add
2181 res_base parameter. Use to check for corrupt pair relocs.
2182 * mach-o-aarch64.c (bfd_mach_o_arm64_canonicalize_one_reloc):
2183 Likewise.
2184 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc):
2185 Likewise.
2186 * mach-o-x86-64.c (bfd_mach_o_x86_64_canonicalize_one_reloc):
2187 Likewise.
2188
2189 * vms-alpha.c (_bfd_vms_slurp_eihd): Make sure that there is
2190 enough data in the record before attempting to parse it.
2191 (_bfd_vms_slurp_eeom): Likewise.
2192
2193 (_bfd_vms_slurp_egsd): Check for an invalid section index.
2194 (image_set_ptr): Likewise.
2195 (alpha_vms_slurp_relocs): Likewise.
2196
2197 (alpha_vms_object_p): Check for a truncated record.
2198
2199 2017-07-24 Nick Clifton <nickc@redhat.com>
2200
2201 PR 21803
2202 * reloc.c (_bfd_unrecognized_reloc): New function. Reports
2203 an unrecognized reloc and sets the bfd_error value.
2204 * libbfd.h: Regenerate.
2205 * elf32-arm.c (elf32_arm_final_link_relocate): Use the new
2206 function.
2207 * elf32-i386.c (elf_i386_relocate_section): Likewise.
2208 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
2209 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
2210 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.
2211 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
2212
2213 2017-07-23 Alan Modra <amodra@gmail.com>
2214
2215 * elf64-ppc.c (ppc64_elf_size_stubs): Correct advance to
2216 restore of LR.
2217
2218 2017-07-19 Szabolcs Nagy <szabolcs.nagy@arm.com>
2219
2220 PR ld/18841
2221 * elfnn-aarch64.c (elfNN_aarch64_reloc_type_class): Return
2222 reloc_class_ifunc for ifunc symbols.
2223
2224 2017-07-19 Nick Clifton <nickc@redhat.com>
2225
2226 PR 21787
2227 * archive.c (bfd_generic_archive_p): If the bfd does not have the
2228 correct magic bytes at the start, set the error to wrong format
2229 and clear the format selector before returning NULL.
2230
2231 2017-07-19 Nick Clifton <nickc@redhat.com>
2232
2233 PR 21786
2234 * coff-rs6000.c (_bfd_strntol): New function.
2235 (_bfd_strntoll): New function.
2236 (GET_VALUE_IN_FIELD): New macro.
2237 (EQ_VALUE_IN_FIELD): new macro.
2238 (_bfd_xcoff_slurp_armap): Use new macros.
2239 (_bfd_xcoff_archive_p): Likewise.
2240 (_bfd_xcoff_read_ar_hdr): Likewise.
2241 (_bfd_xcoff_openr_next_archived_file): Likewise.
2242 (_bfd_xcoff_stat_arch_elt): Likewise.
2243 * coff64-rs6000.c (_bfd_strntol): New function.
2244 (_bfd_strntoll): New function.
2245 (GET_VALUE_IN_FIELD): New macro.
2246 (xcoff64_slurp_armap): Use new macros.
2247
2248 2017-07-19 Claudiu Zissulescu <claziss@synopsys.com>
2249 John Eric Martin <John.Martin@emmicro-us.com>
2250
2251 * bfd-in2.h: Regenerate.
2252 * libbfd.h: Regenerate.
2253 * elf32-arc.c (JLI): Define.
2254 * reloc.c: Add JLI relocations.
2255
2256 2017-07-18 Nick Clifton <nickc@redhat.com>
2257
2258 PR 21775
2259 * coff-sh.c: Fix spelling typos.
2260 * compress.c: Likewise.
2261 * cpu-pdp11.c: Likewise.
2262 * ecofflink.c: Likewise.
2263 * elf-m10300.c: Likewise.
2264 * elf.c: Likewise.
2265 * elf32-arm.c: Likewise.
2266 * elf32-m68k.c: Likewise.
2267 * elf32-nds32.c: Likewise.
2268 * elf32-ppc.c: Likewise.
2269 * elf32-sh.c: Likewise.
2270 * elf32-v850.c: Likewise.
2271 * elf64-ppc.c: Likewise.
2272 * elf64-x86-64.c: Likewise.
2273 * elflink.c: Likewise.
2274 * elfnn-aarch64.c: Likewise.
2275 * elfxx-mips.c: Likewise.
2276 * som.c: Likewise.
2277 * sunos.c: Likewise.
2278 * vms-alpha.c: Likewise.
2279 * xcofflink.c: Likewise.
2280
2281 2017-07-18 Nick Clifton <nickc@redhat.com>
2282
2283 PR binutils/21781
2284 * coffcode.h (handle_COMDAT): Replace abort with an error message
2285 and return.
2286
2287 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
2288
2289 PR ld/21782
2290 * elf64-x86-64.c (elf_x86_64_relocate_section): Limit PIC check
2291 to shared library.
2292
2293 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
2294
2295 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
2296
2297 2017-07-16 Alan Modra <amodra@gmail.com>
2298
2299 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimize
2300 __tls_index GOT entries when using __tls_get_addr_opt stub.
2301 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2302
2303 2017-07-12 Alan Modra <amodra@gmail.com>
2304
2305 * po/es.po: Update from translationproject.org/latest/bfd/.
2306 * po/fi.po: Likewise.
2307 * po/fr.po: Likewise.
2308 * po/id.po: Likewise.
2309 * po/ja.po: Likewise.
2310 * po/ro.po: Likewise.
2311 * po/ru.po: Likewise.
2312 * po/sr.po: Likewise.
2313 * po/sv.po: Likewise.
2314 * po/tr.po: Likewise.
2315 * po/uk.po: Likewise.
2316 * po/vi.po: Likewise.
2317 * po/zh_CN.po: Likewise.
2318 * po/hr.po: New file from translationproject.org.
2319 * configure.ac (ALL_LINGUAS): Add hr. Sort.
2320 * configure: Regenerate.
2321
2322 2017-07-12 Nick Clifton <nickc@redhat.com>
2323
2324 Fix compile time warnings using gcc 7.1.1.
2325 * elf32-xtensa.c (elf_xtensa_get_plt_section): Increase length of
2326 plt_name buffer.
2327 (elf_xtensa_get_gotplt_section): Increase length of got_name
2328 buffer.
2329 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add a
2330 default return of FALSE.
2331 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc): Add a
2332 default return of FALSE.
2333
2334 2017-07-12 Alan Modra <amodra@gmail.com>
2335
2336 * binary.c (binary_set_section_contents): Don't print filepos in
2337 error message.
2338 (coff_write_object_contents): Cast size_t for error message.
2339 (coff_slurp_line_table): Don't use bfd_vma symndx.
2340 (coff_slurp_reloc_table): Remove unneeded cast.
2341 * dwarf2.c (read_section): Cast bfd_int64_t to long long for
2342 error message.
2343 (find_abstract_instance_name): Likewise.
2344 * elf32-arm.c (arm_type_of_stub): Correct error arg order.
2345 (bfd_elf32_arm_stm32l4xx_erratum_scan): Don't cast error arg.
2346 (elf32_arm_check_relocs): Make r_symndx an int.
2347 * elf32-cris.c (cris_elf_check_relocs): Delete extraneous %s in
2348 format string.
2349 * elf32-metag.c (elf_metag_relocate_section): Delete extra error
2350 message arg.
2351 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Rewrite bogus
2352 error message.
2353 * elf32-i386.c (elf_i386_check_relocs): Make r_symndx an int.
2354 * elf32-s390.c (elf_s390_check_relocs): Likewise.
2355 * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
2356 * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
2357 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
2358 * elf64-s390.c (elf_s390_check_relocs): Likewise.
2359 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
2360 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
2361 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
2362 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
2363 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
2364 * elf64-mmix.c (_bfd_mmix_after_linker_allocation): Cast size_t args
2365 and use %lu for error message.
2366 * elflink.c (elf_link_adjust_relocs): Delete extra error message arg.
2367 * mmo.c (mmo_scan): Make stab_loc a file_ptr. Cast expression for
2368 error message.
2369
2370 * elf32-arm.c (elf32_arm_tls_relax): Correct format string and args
2371 in error message.
2372 (elf32_arm_final_link_relocate): Likewise.
2373 * coff-arm.c (bfd_arm_process_before_allocation): Likewise.
2374 * coffcode.h (styp_to_sec_flags): Likewise.
2375 * cofflink.c (_bfd_coff_write_global_sym): Likewise.
2376 * ecoff.c (_bfd_ecoff_slurp_symbol_table): Likewise.
2377 * elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise.
2378 * elf32-bfin.c (bfinfdpic_check_relocs): Likewise.
2379 (elf32_bfin_merge_private_bfd_data): Likewise.
2380 * elf32-cris.c (cris_elf_relocate_section): Likewise.
2381 * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
2382 * elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise.
2383 (i370_elf_relocate_section): Likewise.
2384 * elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise.
2385 * elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise.
2386 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
2387 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
2388 * elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise.
2389 * elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise.
2390 * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
2391 * elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise.
2392 (_bfd_mips_elf_merge_private_bfd_data): Likewise.
2393 * ieee.c (ieee_write_id, read_id): Likewise.
2394 * mach-o.c (bfd_mach_o_write_contents): Likewise.
2395 (bfd_mach_o_layout_commands, bfd_mach_o_read_section_32): Likewise.
2396 (bfd_mach_o_read_section_64, bfd_mach_o_read_symtab_symbol): Likewise.
2397 (bfd_mach_o_read_command, bfd_mach_o_header_p): Likewise.
2398 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Likewise.
2399 * stabs.c (_bfd_link_section_stabs): Likewise.
2400
2401 * coff-arm.c (coff_arm_relocate_section): Use L modifier in error
2402 format.
2403 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
2404 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
2405 * coff-rs6000.c (xcoff_reloc_type_toc): Likewise.
2406 * coff-sh.c (sh_relax_section): Likewise.
2407 (sh_relax_delete_bytes, sh_swap_insns): Likewise.
2408 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
2409 * coffcode.h (coff_slurp_reloc_table): Likewise.
2410 * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
2411 (_bfd_coff_read_string_table): Likewise.
2412 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
2413 * compress.c (bfd_get_full_section_contents): Likewise.
2414 * dwarf2.c (read_formatted_entries, decode_line_info): Likewise.
2415 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
2416 * elf.c (bfd_elf_string_from_elf_section): Likewise.
2417 * elf32-arc.c (arc_special_overflow_checks): Likewise.
2418 * elf32-arm.c (elf32_arm_tls_relax): Likewise.
2419 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Likewise.
2420 (elf32_arm_write_section): Likewise.
2421 * elf32-bfin.c (bfin_relocate_section): Likewise.
2422 (bfinfdpic_relocate_section): Likewise.
2423 * elf32-hppa.c (hppa_build_one_stub): Likewise.
2424 (final_link_relocate, elf32_hppa_relocate_section): Likewise.
2425 * elf32-i386.c (elf_i386_tls_transition): Likewise.
2426 (elf_i386_relocate_section): Likewise.
2427 * elf32-ip2k.c (ip2k_final_link_relocate): Likewise.
2428 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
2429 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
2430 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
2431 * elf32-metag.c (elf_metag_relocate_section): Likewise.
2432 * elf32-nds32.c (unrecognized_reloc_msg): Likewise.
2433 (nds32_elf_relax_longcall1, nds32_elf_relax_longcall2): Likewise.
2434 (nds32_elf_relax_longcall3, nds32_elf_relax_longjump1): Likewise.
2435 (nds32_elf_relax_longjump2, nds32_elf_relax_longjump3): Likewise.
2436 (nds32_elf_relax_longcall4, nds32_elf_relax_longcall5): Likewise.
2437 (nds32_elf_relax_longcall6, nds32_elf_relax_longjump4): Likewise.
2438 (nds32_elf_relax_longjump5, nds32_elf_relax_longjump6): Likewise.
2439 (nds32_elf_relax_longjump7, nds32_elf_relax_loadstore): Likewise.
2440 (nds32_elf_relax_ptr, nds32_elf_ex9_build_hash_table): Likewise.
2441 * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
2442 * elf32-rx.c (UNSAFE_FOR_PID): Likewise.
2443 * elf32-s390.c (invalid_tls_insn, elf_s390_relocate_section): Likewise.
2444 * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
2445 * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
2446 * elf32-sh.c (sh_elf_relax_section): Likewise.
2447 (sh_elf_relax_delete_bytes, sh_elf_swap_insns): Likewise.
2448 (sh_elf_relocate_section): Likewise.
2449 * elf32-sh64.c (shmedia_prepare_reloc): Likewise.
2450 * elf32-spu.c (spu_elf_relocate_section): Likewise.
2451 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
2452 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
2453 * elf32-v850.c (v850_elf_relax_section): Likewise.
2454 * elf32-vax.c (elf_vax_check_relocs): Likewise.
2455 (elf_vax_relocate_section): Likewise.
2456 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
2457 (extend_ebb_bounds_forward, extend_ebb_bounds_backward): Likewise.
2458 (compute_text_actions, compute_ebb_proposed_actions): Likewise.
2459 (do_fix_for_relocatable_link): Likewise.
2460 * elf64-alpha.c (elf64_alpha_relax_got_load): Likewise.
2461 (elf64_alpha_relax_with_lituse): Likewise.
2462 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Likewise.
2463 (elf_hppa_final_link_relocate): Likewise.
2464 * elf64-ia64-vms.c (elf64_ia64_relax_section): Likewise.
2465 (elf64_ia64_choose_gp, elf64_ia64_relocate_section): Likewise.
2466 (elf64_vms_link_add_object_symbols): Likewise.
2467 * elf64-mmix.c (mmix_elf_perform_relocation): Likewise.
2468 (mmix_final_link_relocate): Likewise.
2469 * elf64-s390.c (invalid_tls_insn): Likewise.
2470 (elf_s390_relocate_section): Likewise.
2471 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
2472 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
2473 (elf_x86_64_relocate_section): Likewise.
2474 * elfcode.h (elf_slurp_symbol_table): Likewise.
2475 * elfcore.h (elf_core_file_p): Likewise.
2476 * elflink.c (elf_link_read_relocs_from_section): Likewise.
2477 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
2478 (elfNN_aarch64_relocate_section): Likewise.
2479 * elfnn-ia64.c (elfNN_ia64_relax_section): Likewise.
2480 (elfNN_ia64_choose_gp, elfNN_ia64_relocate_section): Likewise.
2481 * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
2482 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
2483 (_bfd_mips_elf_relocate_section): Likewise.
2484 (_bfd_mips_elf_finish_dynamic_symbol, mips_finish_exec_plt): Likewise.
2485 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
2486 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
2487 * ieee.c (ieee_slurp_external_symbols): Likewise.
2488 * ihex.c (ihex_write_object_content): Likewise.
2489 * mach-o.c (bfd_mach_o_build_exec_seg_command): Likewise.
2490 * merge.c (_bfd_merged_section_offset): Likewise.
2491 * mmo.c (mmo_write_loc_chunk): Likewise.
2492 (mmo_write_object_contents): Likewise.
2493 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Likewise.
2494 * stabs.c (_bfd_link_section_stabs): Likewise.
2495 * xcofflink.c (xcoff_link_add_symbols, xcoff_find_tc0): Likewise.
2496
2497 2017-07-11 Alan Modra <amodra@gmail.com>
2498
2499 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo.
2500
2501 2017-07-11 Alan Modra <amodra@gmail.com>
2502
2503 * elf32-ppc.c (ppc_elf_relocate_section): Emit "unexpected
2504 instruction" error using _bfd_error_handler, not einfo.
2505
2506 2017-07-10 Nick Clifton <nickc@redhat.com>
2507
2508 * coffcode.h (coff_slurp_symbol_table): Do not include an entry
2509 for C_AIX_WEAKEXT if it has the same value as C_WEAKEXT.
2510
2511 2017-07-07 John Baldwin <jhb@FreeBSD.org>
2512
2513 * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PTLWPINFO.
2514
2515 2017-07-07 Alan Modra <amodra@gmail.com>
2516
2517 * coffcode.h (coff_slurp_symbol_table): Handle C_AIX_WEAKEXT.
2518
2519 2017-07-07 Alan Modra <amodra@gmail.com>
2520
2521 * bfd.c (_doprnt): Replace "L" with "ll" when printing bfd_vma
2522 as long long. Move code replacing "ll" with "I64", and simplify.
2523
2524 2017-07-06 H.J. Lu <hongjiu.lu@intel.com>
2525
2526 * bfd.c (_doprnt): Convert 'L' to 'l' when setting wide_width
2527 to 1.
2528
2529 2017-07-05 H.J. Lu <hongjiu.lu@intel.com>
2530
2531 * dwarf2.c (line_info_add_include_dir_stub): Replace time with
2532 xtime.
2533 (line_info_add_file_name): Likewise.
2534 (decode_line_info): Likewise.
2535
2536 2017-07-04 Tristan Gingold <gingold@adacore.com>
2537
2538 * version.m4: Bump version to 2.29.51
2539 * configure: Regenerate.
2540
2541 2017-07-04 Jiong Wang <jiong.wang@arm.com>
2542
2543 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Remove the
2544 sanity check at the head of this function.
2545
2546 2017-07-04 Jan Kratochvil <jan.kratochvil@redhat.com>
2547
2548 * dwarf2.c (struct dwarf2_debug): Add fields dwarf_line_str_buffer and
2549 dwarf_line_str_size.
2550 (struct attr_abbrev): Add field implicit_const.
2551 (dwarf_debug_sections): Add .debug_line_str.
2552 (enum dwarf_debug_section_enum): Add debug_line_str and debug_max.
2553 (dwarf_debug_section_assert): Add static assertion.
2554 (read_indirect_line_string): New.
2555 (read_abbrevs): Support DW_FORM_implicit_const.
2556 (is_str_attr): Support DW_FORM_line_strp.
2557 (read_attribute_value): Support DW_FORM_line_strp and
2558 DW_FORM_implicit_const.
2559 (read_attribute): Support DW_FORM_implicit_const.
2560 (line_info_add_include_dir, line_info_add_include_dir_stub):
2561 (line_info_add_file_name, read_formatted_entries): New.
2562 (decode_line_info, parse_comp_unit): Support DWARF 5.
2563 (_bfd_dwarf2_cleanup_debug_info): Free dwarf_line_str_buffer.
2564
2565 2017-07-03 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
2566
2567 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove the
2568 abort statement that was put for symbols that are not dynamic.
2569
2570 2017-07-03 Tristan Gingold <gingold@adacore.com>
2571
2572 * po/bfd.pot: Regenerate
2573
2574 2017-07-03 Alan Modra <amodra@gmail.com>
2575
2576 * bfd.c (_doprnt): Rewrite "ll" and "L" modifiers to "I64" for
2577 __MSVCRT__. Support "L" modifier for bfd_vma. Formatting.
2578 * elf.c (setup_group): Use "Lx" to print sh_size.
2579 (_bfd_elf_setup_sections): Remove unnecessary cast and print
2580 unknown section type in hex.
2581 (copy_special_section_fields): Style fix.
2582 (bfd_section_from_shdr): Correct format for sh_link. Use a
2583 common error message for all the variants of unrecognized
2584 section types.
2585 (assign_file_positions_for_load_sections): Use "Lx" for lma
2586 adjust error message.
2587 (assign_file_positions_for_non_load_sections): Formatting.
2588 (rewrite_elf_program_header): Formatting. Use "Lx" for
2589 bfd_vma values in error messages.
2590 * elfcode.h (elf_slurp_reloc_table_from_section): Cast
2591 ELF_R_SYM value to type expected by format.
2592 * elflink.c (elf_link_read_relocs_from_section): Use "Lx"
2593 in error messages.
2594 (elf_link_add_object_symbols): Use "Lu" for symbol sizes.
2595 (elf_link_input_bfd): Use "Lx" for r_info.
2596 (bfd_elf_gc_record_vtinherit): Use "Lx" for offset.
2597
2598 2017-07-03 Alan Modra <amodra@gmail.com>
2599
2600 * bfd.c (bfd_scan_vma): Don't use long long unless HAVE_LONG_LONG.
2601 * coff-rs6000.c (FMT20): Handle hosts with 64-bit long and
2602 Microsoft C library variant of long long format specifier.
2603 (PRINT20): Cast value to bfd_uint64_t not long long.
2604 * coffcode.h (coff_print_aux): Use BFD_VMA_FMT.
2605 * coff-x86_64.c (coff_amd64_reloc): Use bfd_uint64_t rather than
2606 long long. Don't cast to bfd_vma.
2607 * elf32-score.c (score3_bfd_getl48): Likewise.
2608 * vms-alpha.c (_bfd_vms_slurp_eisd): Likewise.
2609
2610 2017-07-03 Alan Modra <amodra@gmail.com>
2611
2612 * elf.c (_bfd_elf_print_private_bfd_data): Use BFD_VMA_FMT to
2613 print d_tag.
2614 (bfd_elf_print_symbol): Don't cast symbol->flags.
2615 (_bfd_elf_symbol_from_bfd_symbol): Likewise.
2616 * elf32-ppc.c (ppc_elf_begin_write_processing): Correct
2617 _bfd_error_handler argument order.
2618 (ppc_elf_merge_private_bfd_data): Don't cast flags.
2619
2620 2017-07-03 Alan Modra <amodra@gmail.com>
2621
2622 * configure.ac: Invoke AC_CHECK_TYPES for long long. Invoke
2623 AC_TYPE_LONG_DOUBLE.
2624 * configure: Regenerate.
2625 * config.in: Regenerate.
2626
2627 2017-06-29 Andrew Waterman <andrew@sifive.com>
2628
2629 * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Fix TLS copy
2630 relocs.
2631
2632 2017-06-29 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
2633
2634 * elfxx-sparc.c (allocate_dynrelocs): Don't make a symbol dynamic
2635 unless it is undefined weak.
2636 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Set the flag
2637 relative_reloc to direct non-dynamic symbols to R_SPARC_RELATIVE
2638 relocation.
2639 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): If symbol
2640 is not dynamic in PIC, abort.
2641
2642 2017-06-29 Jiong Wang <jiong.wang@arm.com>
2643
2644 PR ld/21402
2645 * elfnn-aarch64.c (elfNN_aarch64_allocate_dynrelocs): Only make
2646 undefined weak symbols into dynamic.
2647 (elfNN_aarch64_final_link_relocate): Generate runtime RELATIVE
2648 relocation for non-dynamic symbols.
2649 (elfNN_aarch64_finish_dynamic_symbol): Add sanity check.
2650
2651 2017-06-29 Jiong Wang <jiong.wang@arm.com>
2652
2653 * elfnn-aarch64.c (aarch64_relocation_aginst_gp_p): New function.
2654 (elfNN_aarch64_final_link_relocate): Delete duplicated code for
2655 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15, BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
2656 BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
2657 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Optimize the
2658 support for them.
2659
2660 2017-06-29 Andreas Arnez <arnez@linux.vnet.ibm.com>
2661
2662 * elf-bfd.h (elfcore_write_s390_gs_cb): Add prototype.
2663 (elfcore_write_s390_gs_bc): Likewise.
2664 * elf.c (elfcore_grok_s390_gs_cb): New function.
2665 (elfcore_grok_s390_gs_bc): New function.
2666 (elfcore_grok_note): Call them.
2667 (elfcore_write_s390_gs_cb): New function.
2668 (elfcore_write_s390_gs_bc): New function.
2669 (elfcore_write_register_note): Call them.
2670
2671 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
2672
2673 * libbfd.c (_bfd_generic_get_section_contents): Don't call
2674 bfd_get_file_size. Check archive element size.
2675 (_bfd_generic_get_section_contents_in_window): Likewise.
2676
2677 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
2678
2679 * bfd-in2.h: Regenerated.
2680 * bfdio.c (bfd_get_size): Change return type to ufile_ptr.
2681 (bfd_get_file_size): Likewise.
2682
2683 2017-06-28 Maciej W. Rozycki <macro@imgtec.com>
2684 Matthew Fortune <matthew.fortune@imgtec.com>
2685
2686 * archures.c (bfd_mach_mips_interaptiv_mr2): New macro.
2687 * cpu-mips.c (I_interaptiv_mr2): New enum value.
2688 (arch_info_struct): Add "mips:interaptiv-mr2" entry.
2689 * elfxx-mips.c (_bfd_elf_mips_mach) <E_MIPS_MACH_IAMR2>: New
2690 case.
2691 (mips_set_isa_flags) <bfd_mach_mips_interaptiv_mr2>: Likewise.
2692 (bfd_mips_isa_ext) <bfd_mach_mips_interaptiv_mr2>: Likewise.
2693 (print_mips_isa_ext) <AFL_EXT_INTERAPTIV_MR2>: Likewise.
2694 (mips_mach_extensions): Add `bfd_mach_mipsisa32r3' and
2695 `bfd_mach_mips_interaptiv_mr2' entries.
2696 * bfd-in2.h: Regenerate.
2697
2698 2017-06-27 Nick Clifton <nickc@redhat.com>
2699
2700 * tekhex.c (pass_over): Revert accidental conversion of a local
2701 array to a static array.
2702
2703 2017-06-27 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
2704
2705 PR ld/13402
2706 * elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Adjust
2707 reloc addend if necessary. Adjust diff only if
2708 shrinked_insn_address < end_address.
2709
2710 2017-06-27 Alan Modra <amodra@gmail.com>
2711
2712 PR binutils/21665
2713 * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
2714 (_bfd_generic_get_section_contents_in_window): Likewise.
2715
2716 2017-06-26 Kuan-Lin Chen <rufus@andestech.com>
2717
2718 * elfnn-riscv.c (perform_relocation): Support the new
2719 R_RISCV_32_PCREL relocation.
2720 (riscv_elf_relocate_section): Likewise.
2721 * elfxx-riscv.c (howto_table): Likewise.
2722 (riscv_reloc_map): Likewise.
2723 * bfd-in2.h (BFD_RELOC_RISCV_32_PCREL): New relocation.
2724 * libbfd.h: Regenerate.
2725
2726 2017-06-27 Alan Modra <amodra@gmail.com>
2727
2728 PR binutils/21665
2729 * libbfd.c (_bfd_generic_get_section_contents): Delete abort.
2730 Use unsigned file pointer type, and remove cast.
2731 * libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise.
2732 Add "count", not "sz".
2733
2734 2017-06-26 Pedro Alves <palves@redhat.com>
2735
2736 PR binutils/21665
2737 * libbfd.c (_bfd_generic_get_section_contents): Add "count", not
2738 "sz".
2739
2740 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
2741
2742 PR binutils/21665
2743 * libbfd.c (_bfd_generic_get_section_contents_in_window): Add
2744 a missing line.
2745
2746 2017-06-26 Maciej W. Rozycki <macro@imgtec.com>
2747
2748 * cpu-mips.c (arch_info_struct): Mark the 4010 32-bit.
2749 * elfxx-mips.c (mips_set_isa_flags) <bfd_mach_mips4010>: Set
2750 E_MIPS_ARCH_2 rather than E_MIPS_ARCH_3 in `e_flags'.
2751 (mips_mach_extensions): Mark `bfd_mach_mips4010' as extending
2752 `bfd_mach_mips6000' rather than `bfd_mach_mips4000'.
2753
2754 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
2755
2756 PR binutils/21665
2757 * compress.c (bfd_get_full_section_contents): Don't check the
2758 file size here.
2759 * libbfd.c (_bfd_generic_get_section_contents): Check for and
2760 reject a section whose size + offset is greater than the size
2761 of the entire file.
2762 (_bfd_generic_get_section_contents_in_window): Likewise.
2763
2764 2017-06-26 Nick Clifton <nickc@redhat.com>
2765
2766 PR binutils/21670
2767 * tekhex.c (getvalue): Check for the source pointer exceeding the
2768 end pointer before the first byte is read.
2769
2770 2017-06-26 Nick Clifton <nickc@redhat.com>
2771
2772 PR binutils/21665
2773 * opncls.c (get_build_id): Check that the section is big enough
2774 to contain the whole note.
2775 * compress.c (bfd_get_full_section_contents): Check for and reject
2776 a section whose size is greater than the size of the entire file.
2777 * elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not
2778 contain a notes section.
2779
2780 2017-06-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2781
2782 * elf64-s390.c (elf_s390_additional_program_headers): Add NULL
2783 pointer checks.
2784 (elf_s390_modify_segment_map): Likewise.
2785 (bfd_elf_s390_set_options): Lisewise.
2786
2787 2017-06-26 Alan Modra <amodra@gmail.com>
2788
2789 * elflink.c (_bfd_elf_link_create_dynstrtab): Don't make dynobj
2790 a --just-syms bfd.
2791 (_bfd_elf_size_group_sections): Skip --just-syms bfds.
2792 (bfd_elf_size_dynamic_sections): Ignore .note.GNU-stack and
2793 .preinit_array on --just-syms bfds.
2794 (_bfd_elf_gc_mark_extra_sections): Skip --just-syms bfds.
2795 (elf_gc_sweep, bfd_elf_parse_eh_frame_entries): Likewise.
2796 (bfd_elf_gc_sections, bfd_elf_discard_info): Likewise.
2797
2798 2017-06-25 Sergei Trofimovich <slyfox@gentoo.org>
2799
2800 * elf.c (find_link): Bounds check "hint".
2801
2802 2017-06-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
2803
2804 * elf32-arm.c (using_thumb_only): Update list of architectures in
2805 BFD_ASSERT for which the logic is valid.
2806 (using_thumb2_bl): Likewise.
2807 (using_thumb2): Likewise and return true for ARMv8-R.
2808 (arch_has_arm_nop): Likewise.
2809 (tag_cpu_arch_combine): New v8r table for ARMv8-R Tag_CPU_arch
2810 merging logic. Update commentis for value 15 of v8m_baseline,
2811 v8m_mainline and v4t_plus_v6_m arrays. Use v8r array to decide
2812 merging of value 15 of Tag_CPU_arch.
2813
2814 2017-06-23 Jiong Wang <jiong.wang@arm.com>
2815
2816 * reloc.c (BFD_RELOC_AARCH64_ADR_GOTPAGE): Rename to
2817 BFD_RELOC_AARCH64_ADR_GOT_PAGE
2818 * bfd-in2.h: Regenerate.
2819
2820 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2821
2822 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Move
2823 the error_alignment label forward. Properly align program
2824 property note section.
2825
2826 2017-06-22 Eric Christopher <echristo@gmail.com>
2827
2828 * elf32-arm.c (elf32_arm_final_link_relocate): Use labs rather than
2829 abs to fix a truncation warning.
2830
2831 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2832
2833 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Resolve
2834 local undefined weak symbol to 0.
2835 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Likewise.
2836
2837 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2838
2839 * elf32-i386.c (elf_i386_merge_gnu_properties): If info->shstk
2840 is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
2841 (elf_i386_link_setup_gnu_properties): If info->shstk is set,
2842 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
2843 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): If
2844 info->shstk is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
2845 (elf_x86_64_link_setup_gnu_properties): If info->shstk is set,
2846 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
2847
2848 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2849
2850 * elf32-i386.c (elf_i386_lazy_ibt_plt0_entry): New.
2851 (elf_i386_lazy_ibt_plt_entry): Likewise.
2852 (elf_i386_pic_lazy_ibt_plt0_entry): Likewise.
2853 (elf_i386_non_lazy_ibt_plt_entry): Likewise.
2854 (elf_i386_pic_non_lazy_ibt_plt_entry): Likewise.
2855 (elf_i386_eh_frame_lazy_ibt_plt): Likewise.
2856 (elf_i386_lazy_plt_layout): Likewise.
2857 (elf_i386_non_lazy_plt_layout): Likewise.
2858 (elf_i386_link_hash_entry): Add plt_second.
2859 (elf_i386_link_hash_table): Add plt_second and
2860 plt_second_eh_frame.
2861 (elf_i386_allocate_dynrelocs): Use the second PLT if needed.
2862 (elf_i386_size_dynamic_sections): Use .plt.got unwind info for
2863 the second PLT. Check the second PLT.
2864 (elf_i386_relocate_section): Use the second PLT to resolve
2865 PLT reference if needed.
2866 (elf_i386_finish_dynamic_symbol): Fill and use the second PLT if
2867 needed.
2868 (elf_i386_finish_dynamic_sections): Set sh_entsize on the
2869 second PLT. Generate unwind info for the second PLT.
2870 (elf_i386_plt_type): Add plt_second.
2871 (elf_i386_get_synthetic_symtab): Support the second PLT.
2872 (elf_i386_parse_gnu_properties): Support
2873 GNU_PROPERTY_X86_FEATURE_1_AND.
2874 (elf_i386_merge_gnu_properties): Support
2875 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
2876 on GNU_PROPERTY_X86_FEATURE_1_IBT
2877 (elf_i386_link_setup_gnu_properties): If info->ibt is set,
2878 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
2879 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
2880 is set on all relocatable inputs.
2881 * elf64-x86-64.c (elf_x86_64_lazy_ibt_plt_entry): New.
2882 (elf_x32_lazy_ibt_plt_entry): Likewise.
2883 (elf_x86_64_non_lazy_ibt_plt_entry): Likewise.
2884 (elf_x32_non_lazy_ibt_plt_entry): Likewise.
2885 (elf_x86_64_eh_frame_lazy_ibt_plt): Likewise.
2886 (elf_x32_eh_frame_lazy_ibt_plt): Likewise.
2887 (elf_x86_64_lazy_ibt_plt): Likewise.
2888 (elf_x32_lazy_ibt_plt): Likewise.
2889 (elf_x86_64_non_lazy_ibt_plt): Likewise.
2890 (elf_x32_non_lazy_ibt_plt): Likewise.
2891 (elf_x86_64_get_synthetic_symtab): Support the second PLT.
2892 (elf_x86_64_parse_gnu_properties): Support
2893 GNU_PROPERTY_X86_FEATURE_1_AND.
2894 (elf_x86_64_merge_gnu_properties): Support
2895 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
2896 on GNU_PROPERTY_X86_FEATURE_1_IBT
2897 (elf_x86_64_link_setup_gnu_properties): If info->ibt is set,
2898 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
2899 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
2900 is set on all relocatable inputs.
2901
2902 2017-06-22 Nick Clifton <nickc@redhat.com>
2903
2904 PR binutils/21649
2905 * som.c (setup_sections): NUL terminate the space_strings buffer.
2906 Check that the space.name field does not index beyond the end of
2907 the space_strings buffer.
2908
2909 2017-06-21 Nick Clifton <nickc@redhat.com>
2910
2911 PR binutils/21646
2912 * coff-sh.c (sh_reloc): Check for an out of range reloc.
2913
2914 2017-06-21 Nick Clifton <nickc@redhat.com>
2915
2916 PR binutils/21639
2917 * vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as
2918 type of the size parameter.
2919 (_bfd_vms_save_counted_string): Add second parameter - the maximum
2920 length of the counted string.
2921 * vms.h (_bfd_vms_save_sized_string): Update prototype.
2922 (_bfd_vms_save_counted_string): Likewise.
2923 * vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to
2924 _bfd_vms_save_counted_string.
2925 (_bfd_vms_slurp_ehdr): Likewise.
2926 (_bfd_vms_slurp_egsd): Likewise.
2927 (Parse_module): Likewise.
2928
2929 2017-06-21 Alan Modra <amodra@gmail.com>
2930
2931 * elf64-ppc.c (ppc64_elf_size_stubs): Test for localentry:0 plt
2932 calls before tocsave calls.
2933 (ppc64_elf_relocate_section): Allow localentry:0 plt calls without
2934 following nop.
2935
2936 2017-06-21 Nick Clifton <nickc@redhat.com>
2937
2938 PR binutils/21645
2939 * reloc.c (bfd_generic_get_relocated_section_contents): Fail if
2940 bfd_get_full_section_contents returns no contents.
2941
2942 2017-06-21 Nick Clifton <nickc@redhat.com>
2943
2944 PR binutils/21638
2945 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized
2946 record.
2947
2948 2017-06-21 Nick Clifton <nickc@redhat.com>
2949
2950 PR binutils/21637
2951 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section
2952 list.
2953 (image_set_ptr): Likewise.
2954 (alpha_vms_fix_sec_rel): Likewise.
2955 (alpha_vms_slurp_relocs): Likewise.
2956
2957 2017-06-21 Nick Clifton <nickc@redhat.com>
2958
2959 PR binutils/21633
2960 * ieee.c (ieee_slurp_sections): Check for a NULL return from
2961 read_id.
2962 (ieee_archive_p): Likewise.
2963 (ieee_object_p): Likewise.
2964
2965 2017-06-21 Nick Clifton <nickc@redhat.com>
2966
2967 PR binutils/21640
2968 * elf.c (setup_group): Zero the group section pointer list after
2969 allocation so that loops can be caught. Check for NULL pointers
2970 when processing a group list.
2971
2972 2017-06-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2973
2974 * elf-s390.h: New file.
2975 * elf64-s390.c (struct elf_s390_link_hash_table): Add params
2976 field.
2977 (elf_s390_additional_program_headers): New function.
2978 (elf_s390_modify_segment_map): New function.
2979 (bfd_elf_s390_set_options): New function.
2980 (elf_backend_additional_program_headers)
2981 (elf_backend_modify_segment_map): Add macro definitions.
2982
2983 2017-06-19 H.J. Lu <hongjiu.lu@intel.com>
2984
2985 PR ld/21626
2986 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
2987 the DYNAMIC bit instead of bfd_count_sections.
2988
2989 2017-06-19 Nick Clifton <nickc@redhat.com>
2990
2991 PR binutils/21618
2992 * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record
2993 length.
2994 (evax_bfd_print_eeom): Likewise.
2995 (evax_bfd_print_egsd): Check for an overlarge record length.
2996 (evax_bfd_print_etir): Likewise.
2997
2998 2017-06-19 Nick Clifton <nickc@redhat.com>
2999
3000 PR binutils/21612
3001 * libieee.h (struct common_header_type): Add end_p field.
3002 * ieee.c (this_byte_and_next): Do not advance input_p beyond
3003 end_p.
3004 (read_id): Check for a length that exceeds the remaining bytes in
3005 the input buffer.
3006 (ieee_seek): Initialise end_p.
3007 (ieee_archive_p): Likewise.
3008 (ieee_object_p): Likewise.
3009
3010 2017-06-19 Nick Clifton <nickc@redhat.com>
3011
3012 PR binutils/21611
3013 * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset
3014 before reading the EIHS structure entries.
3015
3016 2017-06-19 Nick Clifton <nickc@redhat.com>
3017
3018 PR binutils/21615
3019 * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for
3020 gsd_size. Check that there are enough bytes remaining to read the
3021 type and size of the next egsd. Check that the size of the egsd
3022 does not exceed the size of the record.
3023
3024 2017-06-19 Alan Modra <amodra@gmail.com>
3025
3026 * config.bfd: Correct targ_underscore for cris.
3027
3028 2017-06-18 Alan Modra <amodra@gmail.com>
3029
3030 * config.bfd: Correct targ_underscore for epiphany, ip2k,
3031 m32c, mn10200, pru, rl78, rx, crisv32 and v850.
3032
3033 2017-06-16 Nick Clifton <nickc@redhat.com>
3034
3035 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
3036 bucketlist is empty because there are no symbols to add to the
3037 list.
3038
3039 2017-06-16 Alan Modra <amodra@gmail.com>
3040
3041 PR ld/20022
3042 PR ld/21557
3043 PR ld/21562
3044 PR ld/21571
3045 * targets.c (struct bfd_target): Add _bfd_define_start_stop.
3046 (BFD_JUMP_TABLE_LINK): Likewise.
3047 * elf-bfd.h (bfd_elf_define_start_stop): Declare.
3048 * elflink.c (_bfd_elf_gc_mark_rsec): Update comment.
3049 (bfd_elf_define_start_stop): New function.
3050 * linker.c (bfd_generic_define_start_stop): New function.
3051 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init
3052 new field.
3053 * aout-adobe.c (aout_32_bfd_define_start_stop): Define.
3054 * aout-target.h (MY_bfd_define_start_stop): Define.
3055 * aout-tic30.c (MY_bfd_define_start_stop): Define.
3056 * binary.c (binary_bfd_define_start_stop): Define.
3057 * bout.c (b_out_bfd_define_start_stop): Define.
3058 * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define.
3059 * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define.
3060 * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define.
3061 * coffcode.h (coff_bfd_define_start_stop): Define.
3062 * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define.
3063 * i386msdos.c (msdos_bfd_define_start_stop): Define.
3064 * i386os9k.c (os9k_bfd_define_start_stop): Define.
3065 * ieee.c (ieee_bfd_define_start_stop): Define.
3066 * ihex.c (ihex_bfd_define_start_stop): Define.
3067 * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define.
3068 * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define.
3069 * mmo.c (mmo_bfd_define_start_stop): Define.
3070 * nlm-target.h (nlm_bfd_define_start_stop): Define.
3071 * oasys.c (oasys_bfd_define_start_stop): Define.
3072 * pef.c (bfd_pef_bfd_define_start_stop): Define.
3073 * plugin.c (bfd_plugin_bfd_define_start_stop): Define.
3074 * ppcboot.c (ppcboot_bfd_define_start_stop): Define.
3075 * som.c (som_bfd_define_start_stop): Define.
3076 * srec.c (srec_bfd_define_start_stop): Define.
3077 * tekhex.c (tekhex_bfd_define_start_stop): Define.
3078 * versados.c (versados_bfd_define_start_stop): Define.
3079 * vms-alpha.c (vms_bfd_define_start_stop): Define.
3080 (alpha_vms_bfd_define_start_stop): Define.
3081 * xsym.c (bfd_sym_bfd_define_start_stop): Define.
3082 * bfd-in2.h: Regenerate.
3083 * libbfd.h: Regenerate.
3084
3085 2017-06-16 Jiong Wang <jiong.wang@arm.com>
3086
3087 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
3088 SYMBOL_REFERENCES_LOCAL.
3089
3090 2017-06-15 Jiong Wang <jiong.wang@arm.com>
3091
3092 PR ld/21532
3093 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
3094 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
3095 runtime for if there needs copy relocation elimination.
3096 (need_copy_relocation_p): New function. Return true for symbol with
3097 pc-relative references and if it's against read-only sections.
3098 (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
3099 (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
3100 that are related with accessing external objects.
3101 (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change
3102 in elfNN_aarch64_check_relocs.
3103
3104 2017-06-15 Nick Clifton <nickc@redhat.com>
3105
3106 PR binutils/21582
3107 * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
3108 bugs.
3109 PR binutils/21581
3110 (ieee_archive_p): Likewise.
3111
3112 2017-06-15 Nick Clifton <nickc@redhat.com>
3113
3114 PR binutils/21579
3115 * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
3116
3117 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
3118
3119 * elf32-xtensa.c (elf_xtensa_be_plt_entry,
3120 elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays,
3121 keep both windowed and call0 ABI PLT definitions.
3122 (elf_xtensa_create_plt_entry): Use selected ABI to choose upper
3123 elf_xtensa_*_plt_entry endex.
3124 (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size.
3125
3126 2017-06-14 Nick Clifton <nickc@redhat.com>
3127
3128 PR binutils/21578
3129 * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
3130 flag value.
3131
3132 2017-06-14 Nick Clifton <nickc@redhat.com>
3133
3134 PR binutils/21589
3135 * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
3136 maximum value for the ascic pointer. Check that name processing
3137 does not read beyond this value.
3138 (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
3139 end of etir record.
3140
3141 2017-06-14 Nick Clifton <nickc@redhat.com>
3142
3143 PR binutils/21591
3144 * versados.c (versados_mkobject): Zero the allocated tdata structure.
3145 (process_otr): Check for an invalid offset in the otr structure.
3146
3147 2017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
3148
3149 * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
3150
3151 2017-06-13 H.J. Lu <hongjiu.lu@intel.com>
3152
3153 PR ld/20022
3154 PR ld/21557
3155 PR ld/21562
3156 PR ld/21571
3157 * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
3158 vtable field to a union.
3159 (_bfd_elf_is_start_stop): Removed.
3160 * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
3161 __start_SECNAME and __stop_SECNAME symbols.
3162 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
3163 * elflink.c (_bfd_elf_is_start_stop): Removed.
3164 (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
3165 _bfd_elf_is_start_stop.
3166 (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
3167 __stop_SECNAME symbols. Updated.
3168 (elf_gc_smash_unused_vtentry_relocs): Likewise.
3169 (bfd_elf_gc_record_vtinherit): Likewise.
3170 (bfd_elf_gc_record_vtentry): Likewise.
3171
3172 2017-06-13 Nick Clifton <nickc@redhat.com>
3173
3174 PR ld/21524
3175 * elflink.c (elf_link_adjust_relocs): Generate an error when
3176 encountering a reloc against a symbol removed by garbage
3177 collection.
3178
3179 2017-06-12 H.J. Lu <hongjiu.lu@intel.com>
3180
3181 * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
3182 to merge_gnu_properties.
3183 * elf-properties.c (elf_merge_gnu_properties): Add struct
3184 bfd_link_info * and pass it to merge_gnu_properties.
3185 (elf_merge_gnu_property_list): Add struct bfd_link_info *
3186 and pass it to elf_merge_gnu_properties.
3187 (_bfd_elf_link_setup_gnu_properties): Pass info to
3188 elf_merge_gnu_property_list.
3189 * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
3190 bfd_link_info *.
3191 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
3192
3193 2017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
3194
3195 PR 21564
3196 * binary.c (binary_set_section_contents): Scale lma by octets
3197 per byte to set filepos.
3198
3199 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3200
3201 * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
3202 dynamic sections.
3203
3204 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3205
3206 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
3207 require TEXTREL.
3208
3209 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3210
3211 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
3212 patched section contents for TLS IE reloc.
3213 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
3214
3215 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3216
3217 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
3218 RELOC_FOR_GLOBAL_SYMBOL macro.
3219
3220 2018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3221
3222 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
3223 changes.
3224
3225 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3226
3227 * config/tc-arc.c (md_undefined_symbol): Changed.
3228 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
3229
3230 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3231
3232 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
3233 symbols.
3234
3235 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3236
3237 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
3238 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
3239
3240 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3241
3242 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
3243 object is created.
3244
3245 2017-06-08 Richard Earnshaw <rearnsha@arm.com>
3246
3247 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
3248 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
3249 is non-zero. Add clarifying comments.
3250
3251 2017-06-08 H.J. Lu <hongjiu.lu@intel.com>
3252
3253 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
3254 name. Use local IFUNC symbol name string to report unsupported
3255 non-PIC call to IFUNC function.
3256 (elf_i386_relocate_section): Dump local IFUNC name with minfo
3257 when generating R_386_IRELATIVE relocation.
3258 (elf_i386_finish_dynamic_symbol): Likewise.
3259 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
3260 IFUNC symbol name.
3261 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
3262 when generating R_X86_64_IRELATIVE relocation.
3263 (elf_x86_64_finish_dynamic_symbol): Likewise.
3264
3265 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
3266
3267 * elf.c (setup_group): Make sure BFD sections are created for all
3268 group sections in the input file when processing SHF_GROUP
3269 sections.
3270 (bfd_section_from_shdr): Avoid duplicating logic already
3271 implemented in `setup_group'.
3272
3273 2017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
3274
3275 PR binutils/21546
3276 * peXXigen.c (pe_print_idata): Use the address of the first thunk
3277 if the hint address is zero.
3278
3279 2017-06-06 James Clarke <jrtc27@jrtc27.com>
3280
3281 PR ld/19579
3282 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
3283 ELF_COMMON_DEF_P for common symbols.
3284
3285 2017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
3286
3287 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
3288 SEC_GROUP sections as SEC_EXCLUDE.
3289 (bfd_elf_set_group_contents): Replace use of abort with an assert.
3290 (assign_section_numbers): Use resolve_section_groups flag instead
3291 of relocatable link type.
3292 (_bfd_elf_init_private_section_data): Use resolve_section_groups
3293 flag instead of checking the final_link flag for part of the
3294 checks in here. Fix white space as a result.
3295 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
3296 instead of relocatable link type.
3297 (bfd_elf_final_link): Likewise.
3298
3299 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
3300
3301 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
3302 variable `bed'.
3303 * elf32-score.c (score_elf_final_link_relocate): Likewise.
3304 (s3_bfd_score_elf_check_relocs): Likewise.
3305 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
3306 (score_elf_final_link_relocate): Likewise.
3307 (s7_bfd_score_elf_check_relocs): Likewise.
3308
3309 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
3310
3311 * elflink.c (init_reloc_cookie_rels): Remove unused variable
3312 `bed'.
3313
3314 2017-06-06 Maciej W. Rozycki <macro@imgtec.com>
3315
3316 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
3317 from `reloc_count' rather than decrementing it.
3318 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
3319 `reloc_count' by `int_rels_per_ext_rel'.
3320 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
3321 `reloc_count' by `int_rels_per_ext_rel' for last relocation
3322 entry determination.
3323 (s3_bfd_score_elf_check_relocs): Likewise.
3324 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
3325 (s7_bfd_score_elf_relocate_section): Likewise.
3326 (s7_bfd_score_elf_check_relocs): Likewise.
3327 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
3328 prototype and function.
3329 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
3330 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
3331 triple rather than once the sum of REL and RELA relocation entry
3332 counts.
3333 (bfd_elf64_get_reloc_upper_bound): Remove macro.
3334 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
3335 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
3336 storage allocation size determination.
3337 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
3338 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
3339 by `int_rels_per_ext_rel' for last relocation entry
3340 determination.
3341 (bfd_elf_final_link): Do not multiply `reloc_count' by
3342 `int_rels_per_ext_rel' for internal relocation storage
3343 allocation size determination.
3344 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
3345 `int_rels_per_ext_rel' for last relocation entry determination.
3346 (elf_gc_smash_unused_vtentry_relocs): Likewise.
3347 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
3348 (_bfd_mips_elf_relocate_section): Likewise.
3349
3350 2017-06-05 Alan Modra <amodra@gmail.com>
3351
3352 PR 21529
3353 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
3354
3355 2017-06-01 John Baldwin <jhb@FreeBSD.org>
3356
3357 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
3358 determine structure sizes.
3359 (elfcore_grok_freebsd_prstatus): Likewise.
3360
3361 2017-06-01 Alan Modra <amodra@gmail.com>
3362
3363 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
3364 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
3365 dynamic objects.
3366 (is_elfv2_localentry0): New function.
3367 (ppc64_elf_tls_setup): Default params->plt_localentry0.
3368 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
3369 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
3370 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
3371 optimized localentry:0 stubs.
3372 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
3373 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
3374 localentry:0 stubs.
3375 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
3376 DT_PPC64_OPT.
3377 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
3378
3379 2017-05-30 Casey Smith <clegg89@gmail.com>
3380
3381 PR ld/21523
3382 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
3383 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
3384
3385 2017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
3386
3387 * cpu-arc.c (arc_compatible): New function.
3388
3389 2017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
3390
3391 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
3392
3393 2017-05-30 H.J. Lu <hongjiu.lu@intel.com>
3394
3395 PR binutils/21519
3396 * bfdio.c (bfd_get_file_size): New function.
3397 * bfd-in2.h: Regenerated.
3398
3399 2017-05-23 Dilian Palauzov <git-dpa@aegee.org>
3400
3401 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
3402 comments.
3403
3404 2017-05-22 H.J. Lu <hongjiu.lu@intel.com>
3405
3406 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
3407 dynobj instead of htab->elf.dynobj.
3408
3409 2017-05-19 Maciej W. Rozycki <macro@imgtec.com>
3410
3411 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
3412 and function.
3413 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
3414 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
3415 actual number of internal relocations retrieved. Adjust
3416 function description.
3417 (bfd_elf64_canonicalize_reloc): Remove macro.
3418 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
3419
3420 2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
3421
3422 * archures.c (bfd_mach_sparc_v9m8): Define.
3423 (bfd_mach_sparc_v8plusm8): Likewise.
3424 (bfd_mach_sparc_v9_p): Adjust to M8.
3425 (bfd_mach_sparc_64bit_p): Likewise.
3426 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
3427 bfd_mach_sparc_v8plusm8.
3428 * bfd-in2.h: Regenerated.
3429 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
3430 sparc:v8plusm8.
3431 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
3432 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
3433 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
3434 SHA3.
3435 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
3436 bfd_mach_sparc_v8plusm8.
3437
3438 2017-05-19 Alan Modra <amodra@gmail.com>
3439
3440 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
3441 debug and special sections when no non-note alloc sections in an
3442 object are kept.
3443
3444 2017-05-18 Alan Modra <amodra@gmail.com>
3445
3446 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
3447 * elf-m10300.c: Likewise.
3448 * elf.c: Likewise.
3449 * elf32-arc.c: Likewise.
3450 * elf32-bfin.c: Likewise.
3451 * elf32-m68k.c: Likewise.
3452 * elf32-nds32.c: Likewise.
3453 * elf32-tilepro.c: Likewise.
3454 * elflink.c: Likewise.
3455 * elfnn-aarch64.c: Likewise.
3456 * elfnn-riscv.c: Likewise.
3457 * elfxx-tilegx.c: Likewise.
3458 * mach-o.c: Likewise.
3459 * peXXigen.c: Likewise.
3460 * vms-alpha.c: Likewise.
3461 * vms-lib.c: Likewise.
3462
3463 2017-05-17 H.J. Lu <hongjiu.lu@intel.com>
3464
3465 PR ld/20882
3466 * elflink.c (elf_gc_mark_debug_section): New function.
3467 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
3468 referenced by kept debug sections.
3469
3470 2017-05-16 Alan Modra <amodra@gmail.com>
3471
3472 * elf-m10300.c: Rename occurrences of non_ir_ref.
3473 * elf32-arm.c: Likewise.
3474 * elf32-bfin.c: Likewise.
3475 * elf32-cr16.c: Likewise.
3476 * elf32-cris.c: Likewise.
3477 * elf32-d10v.c: Likewise.
3478 * elf32-dlx.c: Likewise.
3479 * elf32-fr30.c: Likewise.
3480 * elf32-frv.c: Likewise.
3481 * elf32-hppa.c: Likewise.
3482 * elf32-i370.c: Likewise.
3483 * elf32-i386.c: Likewise.
3484 * elf32-iq2000.c: Likewise.
3485 * elf32-lm32.c: Likewise.
3486 * elf32-m32c.c: Likewise.
3487 * elf32-m32r.c: Likewise.
3488 * elf32-m68hc1x.c: Likewise.
3489 * elf32-m68k.c: Likewise.
3490 * elf32-mcore.c: Likewise.
3491 * elf32-metag.c: Likewise.
3492 * elf32-microblaze.c: Likewise.
3493 * elf32-moxie.c: Likewise.
3494 * elf32-msp430.c: Likewise.
3495 * elf32-mt.c: Likewise.
3496 * elf32-nios2.c: Likewise.
3497 * elf32-or1k.c: Likewise.
3498 * elf32-ppc.c: Likewise.
3499 * elf32-rl78.c: Likewise.
3500 * elf32-s390.c: Likewise.
3501 * elf32-score.c: Likewise.
3502 * elf32-score7.c: Likewise.
3503 * elf32-sh.c: Likewise.
3504 * elf32-tic6x.c: Likewise.
3505 * elf32-tilepro.c: Likewise.
3506 * elf32-v850.c: Likewise.
3507 * elf32-vax.c: Likewise.
3508 * elf32-xstormy16.c: Likewise.
3509 * elf32-xtensa.c: Likewise.
3510 * elf64-alpha.c: Likewise.
3511 * elf64-hppa.c: Likewise.
3512 * elf64-ia64-vms.c: Likewise.
3513 * elf64-mmix.c: Likewise.
3514 * elf64-ppc.c: Likewise.
3515 * elf64-s390.c: Likewise.
3516 * elf64-sh64.c: Likewise.
3517 * elf64-x86-64.c: Likewise.
3518 * elflink.c: Likewise.
3519 * elfnn-aarch64.c: Likewise.
3520 * elfnn-ia64.c: Likewise.
3521 * elfnn-riscv.c: Likewise.
3522 * elfxx-mips.c: Likewise.
3523 * elfxx-sparc.c: Likewise.
3524 * elfxx-tilegx.c: Likewise.
3525 * linker.c: Likewise.
3526
3527 2017-05-16 Alan Modra <amodra@gmail.com>
3528
3529 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
3530 * elflink.c (elf_link_add_object_symbols): Update to use
3531 non_ir_ref_dynamic.
3532 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
3533 non_ir_ref.
3534 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
3535
3536 2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
3537
3538 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
3539
3540 2017-05-12 H.J. Lu <hongjiu.lu@intel.com>
3541
3542 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
3543 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
3544 properties.
3545 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3546
3547 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
3548
3549 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
3550 to plt_second.
3551 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
3552 to plt_second/plt_second_eh_frame.
3553 (elf_x86_64_link_hash_newfunc): Updated.
3554 (elf_x86_64_allocate_dynrelocs): Likewise.
3555 (elf_x86_64_size_dynamic_sections): Likewise.
3556 (elf_x86_64_relocate_section): Likewise.
3557 (elf_x86_64_finish_dynamic_symbol): Likewise.
3558 (elf_x86_64_finish_dynamic_sections): Likewise.
3559 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
3560 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
3561 .plt.sec section.
3562 (elf_backend_setup_gnu_properties): Updated. Create the
3563 .plt.sec section instead of the .plt.sec section.
3564
3565 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
3566
3567 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
3568 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
3569 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
3570
3571 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
3572
3573 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
3574 (bfd_elf64_set_reloc): Define.
3575 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
3576
3577 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
3578
3579 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
3580 (struct bfd_target): New field _bfd_set_reloc.
3581 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
3582 * reloc.c (_bfd_generic_set_reloc): New function.
3583 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
3584 * nlm-target.h (nlm_set_reloc): Likewise.
3585 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
3586 * aout-tic30.c (MY_set_reloc): Likewise.
3587 * aout-target.h (MY_set_reloc): Likewise.
3588 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
3589 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
3590 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
3591 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
3592 * aout-adobe.c (aout_32_set_reloc): Likewise.
3593 * bout.c (b_out_set_reloc): Likewise.
3594 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
3595 * i386os9k.c (aout_32_set_reloc): Likewise.
3596 * ieee.c (ieee_set_reloc): Likewise.
3597 * oasys.c (oasys_set_reloc): Likewise.
3598 * som.c (som_set_reloc): Likewise.
3599 * versados.c (versados_set_reloc): Likewise.
3600 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
3601 _bfd_generic_set_reloc.
3602 (rs6000_xcoff64_aix_vec): LIkewise.
3603 * libbfd.c (_bfd_norelocs_set_reloc): New function.
3604 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
3605 * i386msdos.c (msdos_set_reloc): Define to
3606 _bfd_norelocs_set_reloc.
3607 * elfcode.h (elf_set_reloc): Define.
3608 * bfd-in2.h: Regenerated.
3609
3610 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
3611
3612 PR ld/21481
3613 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
3614 for IFUNC function address.
3615
3616 2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
3617
3618 * elf32-arc.c (FEATURE_LIST_NAME): Define.
3619 (CONFLICT_LIST): Likewise.
3620 (opcode/arc-attrs.h): Include.
3621 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
3622 (arc_extract_features): New file.
3623 (arc_stralloc): Likewise.
3624 (arc_elf_merge_attributes): Likewise.
3625 (arc_elf_merge_private_bfd_data): Use object attributes.
3626 (bfd_arc_get_mach_from_attributes): New function.
3627 (arc_elf_object_p): Use object attributes.
3628 (arc_elf_final_write_processing): Likewise.
3629 (elf32_arc_obj_attrs_arg_type): New function.
3630 (elf32_arc_obj_attrs_handle_unknown): Likewise.
3631 (elf32_arc_section_from_shdr): Likewise.
3632 (elf_backend_obj_attrs_vendor): Define.
3633 (elf_backend_obj_attrs_section): Likewise.
3634 (elf_backend_obj_attrs_arg_type): Likewise.
3635 (elf_backend_obj_attrs_section_type): Likewise.
3636 (elf_backend_obj_attrs_handle_unknown): Likewise.
3637 (elf_backend_section_from_shdr): Likewise.
3638
3639 2017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
3640
3641 PR ld/21458
3642 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
3643 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
3644 and the destination is a Thumb symbol.
3645
3646 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
3647
3648 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
3649 initializer to silence GCC 4.2.
3650 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
3651
3652 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
3653
3654 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
3655 (LAZY_PLT_ENTRY_SIZE): This.
3656 (NON_LAZY_PLT_ENTRY_SIZE): New.
3657 (elf_x86_64_plt0_entry): Renamed to ...
3658 (elf_x86_64_lazy_plt0_entry): This.
3659 (elf_x86_64_plt_entry): Renamed to ...
3660 (elf_x86_64_lazy_plt_entry): This.
3661 (elf_x86_64_bnd_plt0_entry): Renamed to ...
3662 (elf_x86_64_lazy_bnd_plt0_entry): This.
3663 (elf_x86_64_legacy_plt_entry): Removed.
3664 (elf_x86_64_bnd_plt_entry): Renamed to ...
3665 (elf_x86_64_lazy_bnd_plt_entry): This.
3666 (elf_x86_64_legacy_plt2_entry): Renamed to ...
3667 (elf_x86_64_non_lazy_plt_entry): This.
3668 (elf_x86_64_bnd_plt2_entry): Renamed to ...
3669 (elf_x86_64_non_lazy_bnd_plt_entry): This.
3670 (elf_x86_64_eh_frame_plt): Renamed to ...
3671 (elf_x86_64_eh_frame_lazy_plt): This.
3672 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
3673 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
3674 (elf_x86_64_eh_frame_plt_got): Renamed to ...
3675 (elf_x86_64_eh_frame_non_lazy_plt): This.
3676 (elf_x86_64_lazy_plt_layout): New.
3677 (elf_x86_64_non_lazy_plt_layout): Likewise.
3678 (elf_x86_64_plt_layout): Likewise.
3679 (elf_x86_64_backend_data): Remove PLT layout information. Add
3680 os for target system.
3681 (GET_PLT_ENTRY_SIZE): Removed.
3682 (elf_x86_64_lazy_plt): New.
3683 (elf_x86_64_non_lazy_plt): Likewise.
3684 (elf_x86_64_lazy_bnd_plt): Likewise.
3685 (elf_x86_64_non_lazy_bnd_plt): Likewise.
3686 (elf_x86-64_arch_bed): Updated.
3687 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
3688 (elf_x86_64_create_dynamic_sections): Removed.
3689 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
3690 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
3691 (elf_x86-64_adjust_dynamic_symbol): Updated.
3692 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
3693 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
3694 size for PLT0 if there is no PLT0. Get plt_entry_size from
3695 non_lazy_plt for non-lazy PLT entries.
3696 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
3697 from non_lazy_plt for non-lazy PLT entries.
3698 (elf_x86-64_relocate_section): Updated. Properly get PLT index
3699 if there is no PLT0.
3700 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
3701 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
3702 entries with non-lazy PLT layout. Don't fill the second and third
3703 slots in the PLT entry if there is no PLT0.
3704 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
3705 if there is no PLT0. Set sh_entsize on the .plt.got section.
3706 (compare_relocs): New.
3707 (elf_x86_64_plt_type): Likewise.
3708 (elf_x86_64_plt): Likewise.
3709 (elf_x86_64_nacl_plt): New. Forward declaration.
3710 (elf_x86_64_get_plt_sym_val): Removed.
3711 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
3712 against all dynamic relocations.
3713 (elf_x86_64_link_setup_gnu_properties): New function.
3714 (elf_backend_create_dynamic_sections): Updated.
3715 (elf_backend_setup_gnu_properties): New.
3716 (elf_x86_64_nacl_plt): New.
3717 (elf_x86_64_nacl_arch_bed): Updated.
3718
3719 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
3720
3721 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
3722 (LAZY_PLT_ENTRY_SIZE): This.
3723 (NON_LAZY_PLT_ENTRY_SIZE): New.
3724 (elf_i386_plt0_entry): Renamed to ...
3725 (elf_i386_lazy_plt0_entry): This.
3726 (elf_i386_plt_entry): Renamed to ...
3727 (elf_i386_lazy_plt_entry): This.
3728 (elf_i386_pic_plt0_entry): Renamed to ...
3729 (elf_i386_pic_lazy_plt0_entry): This.
3730 (elf_i386_pic_plt_entry): Renamed to ...
3731 (elf_i386_pic_lazy_plt_entry): This.
3732 (elf_i386_got_plt_entry): Renamed to ...
3733 (elf_i386_non_lazy_plt_entry): This.
3734 (elf_i386_pic_got_plt_entry): Renamed to ...
3735 (elf_i386_pic_non_lazy_plt_entry): This.
3736 (elf_i386_eh_frame_plt): Renamed to ...
3737 (elf_i386_eh_frame_lazy_plt): This.
3738 (elf_i386_eh_frame_plt_got): Renamed to ...
3739 (elf_i386_eh_frame_non_lazy_plt): This.
3740 (elf_i386_plt_layout): Renamed to ...
3741 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
3742 eh_frame_plt_got_size.
3743 (elf_i386_non_lazy_plt_layout): New.
3744 (elf_i386_plt_layout): Likewise.
3745 (elf_i386_non_lazy_plt): Likewise.
3746 (GET_PLT_ENTRY_SIZE): Removed.
3747 (elf_i386_plt): Renamed to ...
3748 (elf_i386_lazy_plt): This.
3749 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
3750 (elf_i386_arch_bed): Updated.
3751 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
3752 (elf_i386_create_dynamic_sections): Removed.
3753 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
3754 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
3755 (elf_i386_adjust_dynamic_symbol): Updated.
3756 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
3757 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
3758 size for PLT0 if there is no PLT0.
3759 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
3760 output section is discarded only if GOT isn't empty.
3761 (elf_i386_relocate_section): Updated. Properly get PLT index
3762 if there is no PLT0.
3763 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
3764 second and third slots in the PLT entry if there is no PLT0.
3765 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
3766 if there is no PLT0. Set sh_entsize on the .plt.got section.
3767 (elf_i386_nacl_plt): Forward declaration.
3768 (elf_i386_get_plt_sym_val): Removed.
3769 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
3770 against all dynamic relocations.
3771 (elf_i386_link_setup_gnu_properties): New function.
3772 (elf_backend_create_dynamic_sections): Updated.
3773 (elf_backend_setup_gnu_properties): New.
3774 (elf_i386_nacl_plt): Updated.
3775 (elf_i386_nacl_arch_bed): Likewise.
3776 (elf_i386_vxworks_arch_bed): Likewise.
3777
3778 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
3779
3780 * elflink.c (elf_output_implib): Remove executable flag from import
3781 library bfd.
3782 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
3783 library is a relocatable object file.
3784
3785 2017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
3786
3787 PR ld/21404
3788 * elf32-avr.c (avr_should_move_sym): New function.
3789 (avr_should_reduce_sym_size): Likewise.
3790 (avr_should_increase_sym_size): Likewise.
3791 (elf32_avr_relax_delete_bytes): Adjust symbol values
3792 and sizes by calling new functions.
3793
3794 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
3795
3796 * config.bfd (riscv32-*): Enable rv64.
3797
3798 2017-05-02 Alan Modra <amodra@gmail.com>
3799
3800 PR 21384
3801 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
3802 rather than h->root.type == bfd_link_hash_new.
3803 (bfd_elf_record_link_assignment): Similarly, call
3804 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
3805
3806 2017-04-29 Alan Modra <amodra@gmail.com>
3807
3808 PR 21432
3809 * reloc.c (reloc_offset_in_range): New function.
3810 (bfd_perform_relocation, bfd_install_relocation): Use it.
3811 (_bfd_final_link_relocate): Likewise.
3812
3813 2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
3814
3815 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
3816 before using .plt.got.
3817 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
3818
3819 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3820
3821 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
3822 instead of "+=" to update 0.
3823
3824 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3825
3826 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
3827 .plt.got section here.
3828 (elf_i386_check_relocs): Don't create the .plt.got section.
3829 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
3830 the .plt.got and .plt.bnd sections here.
3831 (elf_x86_64_check_relocs): Don't create the .plt.got nor
3832 .plt.bnd sections.
3833
3834 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3835
3836 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
3837 has_bnd_reloc.
3838 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
3839 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
3840 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
3841 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
3842 has_bnd_reloc.
3843
3844 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3845
3846 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
3847 to return bfd *.
3848 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
3849 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
3850 the first relocatable ELF input with GNU properties.
3851
3852 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3853
3854 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
3855 VxWorks for non-PIC.
3856
3857 2017-04-27 Alan Modra <amodra@gmail.com>
3858
3859 * elf-bfd.h (struct elf_backend_data): Make asection param of
3860 elf_backend_eh_frame_address_size const.
3861 (_bfd_elf_eh_frame_address_size): Likewise.
3862 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
3863 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
3864 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
3865 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
3866 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
3867 (next_cie_fde_offset): Constify params.
3868 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
3869
3870 2017-04-27 Alan Modra <amodra@gmail.com>
3871
3872 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
3873 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
3874 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
3875 aug_data_len.
3876 (offset_adjust): New function.
3877 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
3878 (adjust_eh_frame_local_symbols): Likewise.
3879 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
3880 after changing anything. Return true if anything changed.
3881 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
3882 _bfd_elf_adjust_eh_frame_global_symbol for globals.
3883
3884 2017-04-27 Alan Modra <amodra@gmail.com>
3885
3886 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
3887 when force_local.
3888
3889 2017-04-27 Alan Modra <amodra@gmail.com>
3890
3891 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
3892 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
3893 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
3894 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
3895 for undef and undefweak dyn_relocs.
3896 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
3897 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
3898 (allocate_got, allocate_dynrelocs): Likewise.
3899 (ppc64_elf_relocate_section): Likewise.
3900
3901 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
3902
3903 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
3904 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
3905 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
3906 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
3907
3908 2017-04-26 Nick Clifton <nickc@redhat.com>
3909
3910 PR binutils/21434
3911 * reloc.c (bfd_perform_relocation): Check for a negative address
3912 in the reloc.
3913
3914 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
3915
3916 PR ld/21334
3917 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
3918 member.
3919 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
3920 (elf_backend_always_renumber_dynsyms): Define.
3921 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
3922 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
3923 * elflink.c (bfd_elf_size_dynamic_sections): Also call
3924 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
3925 it.
3926 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
3927
3928 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
3929
3930 * elflink.c (bfd_elf_size_dynamic_sections): Only call
3931 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
3932 sections have been created.
3933
3934 2017-04-26 Nick Clifton <nickc@redhat.com>
3935
3936 PR binutils/21431
3937 * compress.c (bfd_init_section_compress_status): Check the return
3938 value from bfd_malloc.
3939
3940 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3941
3942 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
3943 no_finish_dynamic_symbol.
3944 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
3945 0.
3946 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
3947 weak symbol, don't make it dynamic.
3948 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
3949 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
3950 relocation for GOT reference.
3951 (elf_x86_64_finish_dynamic_symbol): Abort if
3952 no_finish_dynamic_symbol isn't 0.
3953
3954 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3955
3956 PR ld/21402
3957 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
3958 undefined weak symbol, don't make it dynamic.
3959 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
3960 set no_finish_dynamic_symbol and generate R_386_RELATIVE
3961 relocation for R_386_GOT32.
3962
3963 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3964
3965 PR ld/21425
3966 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
3967
3968 2017-04-23 Alan Modra <amodra@gmail.com>
3969
3970 PR 21414
3971 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
3972 * elf.c (lcomm_sym): New.
3973 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
3974 * bfd-in2.h: Regenerate.
3975
3976 2017-04-23 Alan Modra <amodra@gmail.com>
3977
3978 PR 21412
3979 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
3980 parameters and comment.
3981 (_bfd_elf_get_reloc_section): Delete.
3982 (_bfd_elf_plt_get_reloc_section): Declare.
3983 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
3984 New functions. Don't blindly skip over assumed .rel/.rela prefix.
3985 Extracted from..
3986 (_bfd_elf_get_reloc_section): ..here. Delete.
3987 (assign_section_numbers): Call elf_get_reloc_section.
3988 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
3989 * elfxx-target.h (elf_backend_get_reloc_section): Update.
3990
3991 2017-04-23 Alan Modra <amodra@gmail.com>
3992
3993 PR 21409
3994 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
3995 no symbols.
3996
3997 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
3998
3999 PR ld/21402
4000 * elf32-i386.c (elf_i386_link_hash_entry): Add
4001 no_finish_dynamic_symbol.
4002 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
4003 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
4004 symbol, don't make it dynamic in PIE.
4005 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
4006 set no_finish_dynamic_symbol and generate R_386_RELATIVE
4007 relocation for R_386_GOT32
4008 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
4009 isn't 0.
4010
4011 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
4012
4013 PR ld/19617
4014 PR ld/21086
4015 * elflink.c (elf_link_add_object_symbols): Require
4016 --no-dynamic-linker with -E/--dynamic-list when creating
4017 dynamic sections.
4018
4019 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
4020
4021 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
4022 if forced local.
4023
4024 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
4025
4026 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
4027 dynamic symbol sorting.
4028
4029 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
4030
4031 PR ld/21382
4032 * elflink.c (elf_link_add_object_symbols): Preserve
4033 dynamic_ref_after_ir_def when restoring the symbol table for
4034 unneeded dynamic object.
4035
4036 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
4037
4038 PR ld/21401
4039 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
4040 on on undefined IFUNC symbol in the second PLT.
4041
4042 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
4043
4044 * peXXigen.c (pe_print_reloc): Correct chunk_end.
4045
4046 2017-04-19 Alan Modra <amodra@gmail.com>
4047
4048 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
4049 or make dynamic for info->dynamic_undefined_weak 0 and 1.
4050 * elf32-ppc.c:Formatting.
4051 (ensure_undefweak_dynamic): Don't make dynamic when
4052 info->dynamic_undefined_weak is zero.
4053 (allocate_dynrelocs): Discard undefweak dyn_relocs for
4054 info->dynamic_undefined_weak. Discard undef dyn_relocs when
4055 not default visibility. Discard undef and undefweak
4056 dyn_relocs earlier.
4057 (ppc_elf_relocate_section): Adjust to suit.
4058 * elf64-ppc.c: Formatting.
4059 (ensure_undefweak_dynamic): Don't make dynamic when
4060 info->dynamic_undefined_weak is zero.
4061 (allocate_dynrelocs): Discard undefweak dyn_relocs for
4062 info->dynamic_undefined_weak. Discard them earlier.
4063
4064 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
4065
4066 PR ld/21389
4067 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
4068 before generating the version definition section.
4069
4070 2017-04-17 Alan Modra <amodra@gmail.com>
4071
4072 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
4073 state when a regular object file defines a symbol with
4074 incompatible type to that defined by an earlier shared lib.
4075
4076 2017-04-13 Alan Modra <amodra@gmail.com>
4077
4078 * coffcode.h: Wrap some overly long _bfd_error_handler args.
4079 * elf.c: Likewise.
4080 * elf32-arm.c: Likewise.
4081 * elf32-i386.c: Likewise.
4082 * elf32-mep.c: Likewise.
4083 * elf64-ia64-vms.c: Likewise.
4084 * elf64-x86-64.c: Likewise.
4085 * elflink.c: Likewise.
4086 * elfnn-ia64.c: Likewise.
4087 * elfxx-mips.c: Likewise.
4088
4089 2017-04-13 Alan Modra <amodra@gmail.com>
4090
4091 * aoutx.h: Use %B and %A in error messages throughout file.
4092 * aout-cris.c: Likewise.
4093 * archive.c: Likewise.
4094 * binary.c: Likewise.
4095 * coff-rs6000.c: Likewise.
4096 * coff-tic4x.c: Likewise.
4097 * coffcode.h: Likewise.
4098 * coffgen.c: Likewise.
4099 * cofflink.c: Likewise.
4100 * coffswap.h: Likewise.
4101 * cpu-arm.c: Likewise.
4102 * elf-eh-frame.c: Likewise.
4103 * elf-m10300.c: Likewise.
4104 * elf.c: Likewise.
4105 * elf32-arc.c: Likewise.
4106 * elf32-arm.c: Likewise.
4107 * elf32-bfin.c: Likewise.
4108 * elf32-frv.c: Likewise.
4109 * elf32-iq2000.c: Likewise.
4110 * elf32-m32c.c: Likewise.
4111 * elf32-microblaze.c: Likewise.
4112 * elf32-nds32.c: Likewise.
4113 * elf32-rl78.c: Likewise.
4114 * elf32-rx.c: Likewise.
4115 * elf32-score.c: Likewise.
4116 * elf32-score7.c: Likewise.
4117 * elf32-sh64.c: Likewise.
4118 * elf32-v850.c: Likewise.
4119 * elf32-vax.c: Likewise.
4120 * elf32-visium.c: Likewise.
4121 * elf64-ia64-vms.c: Likewise.
4122 * elf64-mmix.c: Likewise.
4123 * elf64-sh64.c: Likewise.
4124 * elfcode.h: Likewise.
4125 * elfnn-aarch64.c: Likewise.
4126 * elfnn-ia64.c: Likewise.
4127 * elfxx-mips.c: Likewise.
4128 * hpux-core.c: Likewise.
4129 * ieee.c: Likewise.
4130 * ihex.c: Likewise.
4131 * linker.c: Likewise.
4132 * merge.c: Likewise.
4133 * mmo.c: Likewise.
4134 * oasys.c: Likewise.
4135 * pdp11.c: Likewise.
4136 * peXXigen.c: Likewise.
4137 * rs6000-core.c: Likewise.
4138 * vms-alpha.c: Likewise.
4139 * xcofflink.c: Likewise.
4140
4141 2017-04-13 Alan Modra <amodra@gmail.com>
4142
4143 * bfd.c (PRINT_TYPE): Define.
4144 (_doprnt): New function.
4145 (error_handler_internal): Use _doprnt.
4146 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
4147 calls in their natural order, throughout file.
4148 * coff-mcore.c: Likewise.
4149 * coff-ppc.c: Likewise.
4150 * coff-tic80.c: Likewise.
4151 * cofflink.c: Likewise.
4152 * elf-s390-common.c: Likewise.
4153 * elf.c: Likewise.
4154 * elf32-arm.c: Likewise.
4155 * elf32-i386.c: Likewise.
4156 * elf32-m32r.c: Likewise.
4157 * elf32-msp430.c: Likewise.
4158 * elf32-spu.c: Likewise.
4159 * elf64-ia64-vms.c: Likewise.
4160 * elf64-sparc.c: Likewise.
4161 * elf64-x86-64.c: Likewise.
4162 * elflink.c: Likewise.
4163 * elfnn-aarch64.c: Likewise.
4164 * elfnn-ia64.c: Likewise.
4165 * elfxx-mips.c: Likewise.
4166
4167 2017-04-13 Alan Modra <amodra@gmail.com>
4168
4169 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
4170 branch veneers" error. Fix double space and format message.
4171 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
4172 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
4173
4174 2017-04-13 Alan Modra <amodra@gmail.com>
4175
4176 * bfd-in2.h: Regenerate.
4177
4178 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
4179
4180 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
4181 extra `\n' in warning/error messages.
4182 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
4183 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
4184
4185 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
4186
4187 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
4188 processor-specific properties with generic ELF target vector.
4189
4190 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
4191
4192 * elf32-sparc.c (elf_backend_fixup_symbol): New.
4193 * elf64-sparc.c (elf_backend_fixup_symbol): New.
4194 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
4195 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
4196 has_non_got_reloc.
4197 (link_hash_newfunc): Initialize has_got_reloc and
4198 has_non_got_reloc.
4199 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
4200 section.
4201 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
4202 has_non_got_reloc.
4203 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
4204 has_non_got_reloc.
4205 (_bfd_sparc_elf_fixup_symbol): New function.
4206 (allocate_dynrelocs): Don't allocate space for dynamic
4207 relocations and discard relocations against resolved undefined
4208 weak symbols in executable. Don't make resolved undefined weak
4209 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
4210 relocation against undefined weak symbols in PIE.
4211 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
4212 relocations against resolved undefined weak symbols in PIE
4213 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
4214 without ynamic PLT/GOT relocations for resolved undefined weak
4215 symbols.
4216 Don't generate dynamic relocation against resolved undefined
4217 weak symbol in executable.
4218 (pie_finish_undefweak_symbol): New function.
4219 (_bfd_sparc_elf_finish_dynamic_sections): Call
4220 pie_finish_undefweak_symbol on all symbols in PIE.
4221 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
4222 (_bfd_sparc_elf_fixup_symbol): New function.
4223
4224 2017-04-10 Nick Clifton <nickc@redhat.com>
4225
4226 * config.bfd: Remove ns32k from obsolete list.
4227
4228 2017-04-10 Alan Modra <amodra@gmail.com>
4229
4230 PR 21287
4231 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
4232 (special_sections_i): Likewise for .init_array.
4233 (special_sections_p): Likewise for .preinit_array.
4234
4235 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
4236
4237 PR ld/19579
4238 PR ld/21306
4239 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
4240 ELF_COMMON_DEF_P for common symbols.
4241 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
4242 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
4243 * elflink.c (_bfd_elf_merge_symbol): Revert commits
4244 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
4245 07492f668d2173da7a2bda3707ff0985e0f460b6.
4246
4247 2017-04-07 Pedro Alves <palves@redhat.com>
4248
4249 * opncls.c (bfd_get_debug_link_info): Rename to...
4250 (bfd_get_debug_link_info_1): ... this. Change type of second
4251 parameter to void pointer. Adjust.
4252 (bfd_get_debug_link_info): Reimplement on top of
4253 bfd_get_debug_link_info_1.
4254 (separate_debug_file_exists, separate_alt_debug_file_exists):
4255 Change type of second parameter to void pointer. Adjust.
4256 (get_func_type, check_func_type): Change type of second parameter
4257 to void pointer.
4258 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
4259 the callback functions instead of passing the address of a local.
4260 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
4261 find_separate_debug_file.
4262 (get_alt_debug_link_info_shim): Change type of second parameter to
4263 void pointer. Adjust.
4264 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
4265 find_separate_debug_file.
4266 (get_build_id_name, bfd_boolean check_build_id_file): Change type
4267 of second parameter to void pointer. Adjust.
4268 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
4269 pointer local to find_separate_debug_file.
4270
4271 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
4272
4273 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
4274 external symbols with a definition.
4275 (_bfd_coff_gc_mark_extra_sections): Fix typo.
4276
4277 2017-04-07 Alan Modra <amodra@gmail.com>
4278
4279 * po/SRC-POTFILES.in: Regenerate.
4280
4281 2017-04-05 Alan Modra <amodra@gmail.com>
4282
4283 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
4284 reference counting.
4285
4286 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
4287
4288 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
4289 numbers for DataDirectory entry indicies passed to
4290 add_data_entry().
4291
4292 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
4293
4294 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
4295 each GNU_MBIND section and align GNU_MBIND section to page size.
4296 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
4297 segment for each GNU_MBIND section.
4298 (_bfd_elf_init_private_section_data): Copy sh_info from input
4299 for GNU_MBIND section.
4300
4301 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
4302
4303 * elfnn-riscv.c (GP_NAME): Delete.
4304 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
4305 (_bfd_riscv_relax_lui): Likewise.
4306
4307 2017-04-04 Nick Clifton <nickc@redhat.com>
4308
4309 PR binutils/21342
4310 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
4311 dereference.
4312 (bfd_elf_final_link): Only initialize the extended symbol index
4313 section if there are extended symbol tables to list.
4314
4315 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
4316
4317 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
4318 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
4319 * configure.ac (elf): Add elf-properties.lo.
4320 * Makefile.in: Regenerated.
4321 * configure: Likewise.
4322 * elf-bfd.h (elf_property_kind): New.
4323 (elf_property): Likewise.
4324 (elf_property_list): Likewise.
4325 (elf_properties): Likewise.
4326 (_bfd_elf_parse_gnu_properties): Likewise.
4327 (_bfd_elf_get_property): Likewise.
4328 (_bfd_elf_link_setup_gnu_properties): Likewise.
4329 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
4330 and setup_gnu_properties.
4331 (elf_obj_tdata): Add properties.
4332 * elf-properties.c: New file.
4333 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
4334 (elf_i386_merge_gnu_properties): Likewise.
4335 (elf_backend_parse_gnu_properties): Likewise.
4336 (elf_backend_merge_gnu_properties): Likewise.
4337 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
4338 (elf_x86_64_merge_gnu_properties): Likewise.
4339 (elf_backend_parse_gnu_properties): Likewise.
4340 (elf_backend_merge_gnu_properties): Likewise.
4341 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
4342 (elf_backend_parse_gnu_properties): Likewise.
4343 (elf_backend_setup_gnu_properties): Likewise.
4344 (elfNN_bed): Add elf_backend_parse_gnu_properties,
4345 elf_backend_merge_gnu_properties and
4346 elf_backend_setup_gnu_properties.
4347
4348 2017-03-30 Pip Cet <pipcet@gmail.com>
4349
4350 * elf32-wasm32.c: Add relocation code, two relocs.
4351 * reloc.c: Add wasm32 relocations.
4352 * libbfd.h: Regenerate.
4353 * bfd-in2.h: Regenerate.
4354 * bfd/po/bfd.pot: Regenerate.
4355
4356 2017-03-29 Nick Clifton <nickc@redhat.com>
4357
4358 PR binutils/18025
4359 * coff-bfd.h (struct coff_section_data): Add new fields:
4360 saved_bias and bias.
4361 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
4362 computed for PE binaries.
4363 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
4364 missing abbrev.
4365
4366 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
4367
4368 PR ld/16044
4369 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
4370 to handle a local symbol with a hash-symbol-entry; without PLT.
4371 Add BFD_ASSERT for an incidental case with GOT entry present.
4372 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
4373 isn't forced-or-set local.
4374
4375 2017-03-27 Pip Cet <pipcet@gmail.com>
4376
4377 * wasm-module.c: New file to support WebAssembly modules.
4378 * wasm-module.h: New file to support WebAssembly modules.
4379 * doc/webassembly.texi: Start documenting wasm-module.c.
4380 * config.bfd: Add wasm_vec.
4381 * targets.c: Likewise.
4382 * configure.ac: Likewise.
4383 * Makefile.am: Add entries for wasm-module.c.
4384 * Makefile.in: Regenerate.
4385 * configure: Regenerate.
4386 * po/SRC-POTFILES.in: Regenerate.
4387
4388 2017-03-27 Pip Cet <pipcet@gmail.com>
4389
4390 * cpu-wasm32.c: New file to support wasm32 architecture.
4391 * elf32-wasm32.c: New file to support wasm32 architecture.
4392 * Makefile.am: Add wasm32 architecture.
4393 * archures.c: Likewise.
4394 * config.bfd: Likewise.
4395 * configure.ac: Likewise.
4396 * targets.c: Likewise.
4397 * Makefile.in: Regenerate.
4398 * bfd-in2.h: Regenerate.
4399 * configure: Regenerate.
4400 * po/SRC-POTFILES.in: Regenerate.
4401
4402 2017-03-20 Alan Modra <amodra@gmail.com>
4403
4404 PR 21266
4405 * elf64-ppc.c (compare_symbols): Stabilize sort.
4406
4407 2017-03-18 Alan Modra <amodra@gmail.com>
4408
4409 * elf64-ppc.c (struct ppc_link_hash_table): Add
4410 local_ifunc_resolver and maybe_local_ifunc_resolver.
4411 (ppc_build_one_stub): Set flags on emitting dynamic
4412 relocation to ifunc.
4413 (ppc64_elf_relocate_section): Likewise.
4414 (ppc64_elf_finish_dynamic_symbol): Likewise.
4415 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
4416 local dynamic relocs to ifuncs.
4417 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
4418 local_ifunc_resolver and maybe_local_ifunc_resolver.
4419 (ppc_elf_relocate_section): Set flag on emitting dynamic
4420 relocation to ifuncs.
4421 (ppc_elf_finish_dynamic_symbol): Likewise.
4422 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
4423 dynamic relocs to ifuncs.
4424
4425 2017-03-13 Nick Clifton <nickc@redhat.com>
4426
4427 PR binutils/21202
4428 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
4429 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
4430 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
4431 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
4432 * bfd-in2.h: Regenerate.
4433 * libbfd.h: Regenerate.
4434 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
4435 names.
4436 (IS_AARCH64_TLSDESC_RELOC): Likewise.
4437 (elfNN_aarch64_howto_table): Likewise.
4438 (aarch64_tls_transition_without_check): Likewise.
4439 (aarch64_reloc_got_type): Likewise.
4440 (elfNN_aarch64_final_link_relocate): Likewise.
4441 (elfNN_aarch64_tls_relax): Likewise.
4442 (elfNN_aarch64_relocate_section): Likewise.
4443 (elfNN_aarch64_gc_sweep_hook): Likewise.
4444 (elfNN_aarch64_check_relocs): Likewise.
4445 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
4446 (_bfd_aarch64_elf_resolve_relocation): Likewise.
4447
4448 2017-03-11 Alan Modra <amodra@gmail.com>
4449
4450 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
4451 parameter is in fact used. Whitespace fixes.
4452 * elf64-ppc.c: Likewise.
4453
4454 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
4455
4456 * rs6000-core.c (CORE_NEW): Simplify macro when
4457 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
4458
4459 2017-03-07 Alan Modra <amodra@gmail.com>
4460
4461 PR 21224
4462 PR 20519
4463 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
4464 dyn_relocs check.
4465
4466 2017-03-05 Alan Modra <amodra@gmail.com>
4467
4468 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
4469 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
4470 (next_cie_fde_offset): New function.
4471 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
4472 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
4473 four bytes. Align CIEs to four or eight bytes depending on
4474 per_encoding_aligned8. Align FDEs according to their encoding.
4475 Pad last FDE to output section alignment.
4476 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
4477 assertion.
4478 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
4479 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
4480 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
4481
4482 2017-03-02 Martin Bickel <binutils@ineranves.de>
4483
4484 PR ld/21212
4485 * elf.c (rewrite_elf_program_header): Do not issue a warning for
4486 empty segments which have a zero filesz, but a non-zero memsz.
4487
4488 2017-03-02 Alan Modra <amodra@gmail.com>
4489
4490 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
4491
4492 2017-02-28 Alan Modra <amodra@gmail.com>
4493
4494 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
4495 (ppc64_elf_relocate_section): Likewise.
4496
4497 2017-02-28 Alan Modra <amodra@gmail.com>
4498
4499 PR 20995
4500 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
4501 rather than elf32_nios2_hash_table or elf_hash_table.
4502 (create_got_section): Likewise.
4503 (nios2_elf32_finish_dynamic_symbol): Likewise.
4504 (nios2_elf32_adjust_dynamic_symbol): Likewise.
4505 (nios2_elf32_size_dynamic_sections): Likewise.
4506 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
4507 vars. Use htab equivalents directly instead. Don't create
4508 all dynamic sections on needing just the GOT. Use a goto
4509 rather than a fall-through with reloc test. Ensure
4510 htab->dynobj is set when making dynamic sreloc section.
4511 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
4512 equivalent directly instead. Don't segfault on looking for
4513 .dynamic when dynamic sections have not been created. Don't
4514 segfault on .got.plt being discarded.
4515 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
4516 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
4517 fixme and another not so relevant comment.
4518 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
4519 already set, set hash table dynobj on creating .sbss.
4520
4521 2017-02-28 Alan Modra <amodra@gmail.com>
4522
4523 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
4524 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
4525 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
4526 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
4527 (ppc64_elf_relocate_section): Likewise.
4528 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
4529 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
4530 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
4531 * libbfd.h: Regenerate.
4532 * bfd-in2.h: Regenerate.
4533
4534 2017-02-28 Alan Modra <amodra@gmail.com>
4535
4536 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
4537 dynamic .data.rel.ro read-only.
4538 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
4539 rather than section flags when deciding where copy reloc goes.
4540 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
4541 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
4542 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
4543 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
4544 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
4545 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
4546 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
4547 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
4548 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
4549 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
4550 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
4551 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
4552 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
4553 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
4554 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
4555 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
4556 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
4557 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
4558 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
4559
4560 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
4561
4562 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
4563 `jalr $0, $25' instruction encoding.
4564
4565 2017-02-27 Nick Clifton <nickc@redhat.com>
4566
4567 PR ld/21180
4568 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
4569 generating a seg-fault when encountering a symbol that has been
4570 deleted by garbage collection.
4571
4572 2017-02-25 Alan Modra <amodra@gmail.com>
4573
4574 * elf32-arc.c (struct dynamic_sections): Delete.
4575 (enum dyn_section_types): Delete.
4576 (dyn_section_names): Delete.
4577 (arc_create_dynamic_sections): Delete.
4578 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
4579 segfault on discarded .rela.plt section.
4580 (elf_arc_size_dynamic_sections): Formatting. Don't call
4581 arc_create_dynamic_sections. Don't allocate memory for sections
4582 handled by the generic linker. Correct code finding relocs in
4583 read-only sections. Set SEC_EXCLUDE on zero size .got,
4584 .got.plt, and .dynbss sections. Do set .interp for pies.
4585
4586 2017-02-24 Andrew Waterman <andrew@sifive.com>
4587
4588 * elfnn-riscv.c (GP_NAME): New macro.
4589 (riscv_global_pointer_value): Use it.
4590 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
4591 output section, consider only that section's alignment.
4592
4593 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
4594
4595 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
4596 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
4597 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
4598 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
4599
4600 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
4601
4602 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
4603 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
4604 or misaligned.
4605
4606 2017-02-23 Alan Modra <amodra@gmail.com>
4607
4608 PR 20744
4609 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
4610 16D relocations.
4611 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
4612 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
4613 relocs.
4614
4615 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
4616
4617 PR ld/20828
4618 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
4619 processing ahead of the call to `elf_gc_sweep_symbol'.
4620
4621 2017-02-22 Nick Clifton <nickc@redhat.com>
4622
4623 PR binutils/21193
4624 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
4625 created section 4-byte alignment.
4626
4627 2017-02-22 Alan Modra <amodra@gmail.com>
4628
4629 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
4630 on .got or .plt output section being discarded by script.
4631 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
4632 vxworks splt temp.
4633
4634 2017-02-21 Alan Modra <amodra@gmail.com>
4635
4636 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
4637 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
4638
4639 2017-02-20 Alan Modra <amodra@gmail.com>
4640
4641 PR 21181
4642 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
4643 if DT_RELSZ/DT_RELASZ is zero.
4644
4645 2017-02-17 Nick Clifton <nickc@redhat.com>
4646
4647 * compress.c (bfd_get_full_section_contents): Remember to reduce
4648 compressed size by the sizeof the compression header when
4649 decompressing the contents.
4650
4651 2017-02-17 Pedro Alves <palves@redhat.com>
4652
4653 * srec.c (Chunk): Rename to ...
4654 (_bfd_srec_len): ... this.
4655 (S3Forced): Rename to ...
4656 (_bfd_srec_forceS3): ... this.
4657 * objcopy.c: Adjust all references.
4658
4659 2017-02-17 Pedro Alves <palves@redhat.com>
4660
4661 * archive.c (bsd_write_armap): Rename to ...
4662 (_bfd_bsd_write_armap): ... this.
4663 (coff_write_armap): Rename to ...
4664 (_bfd_coff_write_armap): ... this.
4665 * libbfd-in.h (bsd_write_armap): Rename to ...
4666 (_bfd_bsd_write_armap): ... this.
4667 (coff_write_armap): Rename to ...
4668 (_bfd_coff_write_armap): ... this.
4669 * aout-target.h, aout-tic30.c: Adjust all users.
4670 * libbfd.h: Regenerate.
4671
4672 2017-02-17 Pedro Alves <palves@redhat.com>
4673
4674 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
4675 (warn_deprecated): Rename to ...
4676 (_bfd_warn_deprecated): ... this.
4677 * libbfd.c (warn_deprecated): Rename to ...
4678 (_bfd_warn_deprecated): ... this.
4679 * bfd-in2.h: Regenerate.
4680
4681 2017-02-17 Pedro Alves <palves@redhat.com>
4682
4683 * bfdio.c (real_ftell): Rename to ...
4684 (_bfd_real_ftell): ... this.
4685 (real_fseek): Rename to ...
4686 (_bfd_real_fseek): ... this.
4687 (real_fopen): Rename to ...
4688 (_bfd_real_fopen): ... this.
4689 * libbfd-in.h (real_ftell): Rename to ...
4690 (_bfd_real_ftell): ... this.
4691 (real_fseek): Rename to ...
4692 (_bfd_real_fseek): ... this.
4693 (real_fopen): Rename to ...
4694 (_bfd_real_fopen): ... this.
4695 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
4696 * libbfd.h: Regenerate.
4697
4698 2017-02-17 Pedro Alves <palves@redhat.com>
4699
4700 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
4701 * libbfd.c (read_unsigned_leb128): Rename to ...
4702 (_bfd_read_unsigned_leb128): ... this.
4703 (read_signed_leb128): Rename to ...
4704 (_bfd_read_signed_leb128): ... this.
4705 (safe_read_leb128): Rename to ...
4706 (_bfd_safe_read_leb128): ... this.
4707 * libbfd-in.h (read_unsigned_leb128): Rename to ...
4708 (_bfd_read_unsigned_leb128): ... this.
4709 (read_signed_leb128): Rename to ...
4710 (_bfd_read_signed_leb128): ... this.
4711 (safe_read_leb128): Rename to ...
4712 (_bfd_safe_read_leb128): ... this.
4713 * libbfd.h: Renegerate.
4714
4715 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
4716
4717 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
4718 before trying to fine matching file and line information.
4719
4720 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
4721
4722 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
4723 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
4724 not match current bfd, then reload debug information. Record bfd
4725 we're loading debug info for in the stash. If we have debug
4726 informatin in the cache then perform section placement before
4727 returning.
4728
4729 2017-02-16 Alan Modra <amodra@gmail.com>
4730
4731 PR 21000
4732 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
4733 * elfxx-target.h (elf_backend_no_page_alias): Define.
4734 (elfNN_bed): Init new field.
4735 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
4736 ensure PT_LOAD segment starts on a new page.
4737 * elf32-hppa.c (elf_backend_no_page_alias): Define.
4738
4739 2017-02-16 Alan Modra <amodra@gmail.com>
4740
4741 PR 21132
4742 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
4743 if pic.
4744
4745 2017-02-16 Jiong Wang <jiong.wang@arm.com>
4746
4747 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
4748 * bfd-in2.h: Regenerated.
4749
4750 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
4751
4752 PR ld/21168
4753 * elf32-i386.c (elf_i386_relocate_section): Allow
4754 "lea foo@GOT, %reg" in PIC.
4755
4756 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
4757
4758 PR ld/20244
4759 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
4760 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
4761 error against local IFUNC symbol without a base register for
4762 PIC.
4763
4764 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
4765
4766 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
4767 `%P: %H:' with `info->callbacks->einfo'.
4768 (ppc_elf_relocate_section): Likewise.
4769 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
4770 (ppc64_elf_edit_toc): Likewise.
4771 (ppc64_elf_relocate_section): Likewise.
4772
4773 2017-02-14 Alan Modra <amodra@gmail.com>
4774
4775 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
4776 --gc-keep-exported, and test versioned field of sym rather than
4777 looking for @ in name.
4778
4779 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
4780
4781 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
4782 __global_pointer$.
4783
4784 2017-02-13 Nick Clifton <nickc@redhat.com>
4785
4786 PR binutils/21151
4787 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
4788 unit length field.
4789
4790 2017-02-07 Andrew Waterman <andrew@sifive.com>
4791
4792 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
4793 entry size if PLT header is written.
4794
4795 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
4796
4797 Fix sparc64 dynamic relocation processing to use the dynamic
4798 symbol count.
4799 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
4800 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
4801 should be used.
4802
4803 2017-02-03 Nick Clifton <nickc@redhat.com>
4804
4805 PR 21096
4806 * coffcode.h (coff_write_object_contents): Enlarge size of
4807 s_name_buf in order to avoid compile time warning about possible
4808 integer truncation.
4809 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
4810 32-bits of insn value before printing into buffer.
4811
4812 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4813
4814 * elfxx-mips.c (mips_elf_hash_sort_data): Add
4815 `max_local_dynindx'.
4816 (mips_elf_sort_hash_table): Handle it.
4817 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
4818 symbols bump up `max_local_dynindx' rather than
4819 `max_non_got_dynindx'.
4820
4821 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4822
4823 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
4824 `min_got_dynindx', `max_unref_got_dynindx' and
4825 `max_non_got_dynindx' members to the `bfd_size_type' data type.
4826 (mips_elf_sort_hash_table): Adjust accordingly.
4827
4828 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4829
4830 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
4831 to access the hash table.
4832
4833 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4834
4835 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
4836 non-NULL `htab' to the beginning.
4837
4838 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4839
4840 * elflink.c (elf_gc_sweep): Wrap overlong line.
4841
4842 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
4843
4844 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
4845 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
4846 * elfxx-mips.c (mips_elf_link_hash_table): Add
4847 `ignore_branch_isa' member.
4848 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
4849 in branch relocation calculation as an error if
4850 `ignore_branch_isa' has been set.
4851 (_bfd_mips_elf_insn32): Rename to...
4852 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
4853 parameter to `insn32' and add an `ignore_branch_isa' parameter.
4854 Handle the new parameter.
4855
4856 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
4857
4858 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
4859 local variable dynobj.
4860
4861 PR ld/20995
4862 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
4863 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
4864 executable from read-only sections into sdynrelro.
4865 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
4866 dynamic relocs in sdynrelro.
4867 (elf_backend_want_dynrelro): Define.
4868
4869 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4870
4871 * config.bfd (*-*-rtemsaout*): Mark as removed.
4872
4873 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4874
4875 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
4876 (arm-*-rtems*): Move to (arm*-*-eabi*).
4877 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
4878 (m68-*-rtems*): Move to (m68*-*-elf*).
4879
4880 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4881
4882 * config.bfd (*-*-rtemscoff*): Mark as removed.
4883
4884 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
4885
4886 PR ld/20828
4887 * elflink.c (bfd_elf_record_link_assignment): Revert last
4888 change and don't ever clear `forced_local'. Set `mark'
4889 unconditionally.
4890 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
4891 file.
4892 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
4893 (bfd_elf_size_dynamic_sections): ... here.
4894 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
4895 and set `mark' instead in `__tls_get_addr_opt' processing.
4896 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
4897
4898 2017-01-24 Alan Modra <amodra@gmail.com>
4899
4900 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
4901 where dynamic relocs are preferable. Allow ifunc too.
4902 (ensure_undefweak_dynamic): New function.
4903 (allocate_dynrelocs): Use it here. Move plt handling last and
4904 don't make symbols dynamic, simplifying loop. Only make undef
4905 weak symbols with GOT entries dynamic. Correct condition
4906 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
4907 comments. Remove goto.
4908 (ppc_elf_relocate_section): Correct test for using dynamic
4909 symbol on GOT relocs. Rearrange test for emitting GOT relocs
4910 to suit. Set up explicit tls_index entries and implicit GOT
4911 tls_index entries resolvable at link time for
4912 __tls_get_addr_opt. Simplify test to clear mem for prelink.
4913 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
4914 (ensure_undefweak_dynamic): New function.
4915 (allocate_dynrelocs): Use it here. Only make undef weak symbols
4916 with GOT entries dynamic. Remove unnecessary test of
4917 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
4918 (ppc64_elf_relocate_section): Correct test for using dynamic
4919 symbol on GOT relocs. Rearrange test for emitting GOT relocs
4920 to suit. Set up explicit tls_index entries and implicit GOT
4921 tls_index entries resolvable at link time for __tls_get_addr_opt.
4922 Simplify expression to clear mem for prelink.
4923
4924 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
4925
4926 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
4927
4928 2017-01-20 Jiong Wang <jiong.wang@arm.com>
4929
4930 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
4931 (elf_backend_hash_symbol): Define.
4932
4933 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
4934
4935 PR ld/20828
4936 * elflink.c (bfd_elf_record_link_assignment): Clear any
4937 `forced_local' marking for DSO symbols that are not being
4938 provided.
4939
4940 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
4941
4942 * elfnn-riscv.c (riscv_elf_object_p): New function.
4943
4944 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
4945
4946 PR ld/21038
4947 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
4948 plt_bnd_eh_frame.
4949 (elf_x86_64_check_relocs): Create .eh_frame section for the
4950 .plt.bnd section.
4951 (elf_x86_64_size_dynamic_sections): Allocate and initialize
4952 .eh_frame section for the .plt.bnd section.
4953 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
4954 for the .plt.bnd section.
4955
4956 2017-01-12 Nick Clifton <nickc@redhat.com>
4957
4958 PR binutils/20876
4959 * opncls.c (find_separate_debug_file): Add include_dirs
4960 parameter. Only include the directory part of the bfd's filename
4961 in search paths if include_dirs is true. Add a couple of extra
4962 locations for looking for debug files.
4963 ( bfd_follow_gnu_debuglink): Update invocation of
4964 find_separate_debug_file.
4965 (bfd_follow_gnu_debugaltlink): Likewise.
4966 (get_build_id): New function: Finds the build-id of the given bfd.
4967 (get_build_id_name): New function: Computes the name of the
4968 separate debug info file for a bfd, based upon its build-id.
4969 (check_build_id_file): New function: Checks to see if a separate
4970 debug info file exists at the given location, and that its
4971 build-id matches that of the original bfd.
4972 (bfd_follow_build_id_debuglink): New function: Finds a separate
4973 debug info file for a given bfd by using the build-id method.
4974 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
4975 method of locating a separate debug info file before using the
4976 debuglink method.
4977 * bfd-in2.h: Regenerate.
4978
4979 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
4980
4981 PR ld/21038
4982 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
4983 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
4984 elf_x86_64_eh_frame_plt_got.
4985 (elf_x86_64_size_dynamic_sections): Get unwind info from
4986 elf_x86_64_bnd_arch_bed for the BND PLT.
4987
4988 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
4989
4990 * config.bfd: Add entries for i686-redox and x86_64-redox.
4991
4992 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4993
4994 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
4995 to 4 bytes.
4996 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
4997 .eh_frame section to 4 bytes for x32.
4998 (elf_x86_64_check_relocs): Likewise.
4999
5000 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
5001
5002 PR ld/20830
5003 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
5004 (PLT_GOT_FDE_LENGTH): Likewise.
5005 (elf_i386_plt_layout): Add eh_frame_plt_got and
5006 eh_frame_plt_got_size.
5007 (elf_i386_plt): Updated.
5008 (elf_i386_link_hash_table): Add plt_got_eh_frame.
5009 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
5010 (elf_i386_size_dynamic_sections): Allocate and initialize
5011 .eh_frame section for .plt.got.
5012 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
5013 .plt.got.
5014 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
5015 eh_frame_plt_got_size.
5016 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
5017 (PLT_GOT_FDE_LENGTH): Likewise.
5018 (elf_x86_64_backend_data): Add eh_frame_plt_got and
5019 eh_frame_plt_got_size.
5020 (elf_x86_64_arch_bed): Updated.
5021 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
5022 eh_frame_plt_got_size.
5023 (elf_x86_64_nacl_arch_bed): Likewise.
5024 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
5025 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
5026 (elf_x86_64_size_dynamic_sections): Allocate and initialize
5027 .eh_frame section for .plt.got.
5028 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
5029 for .plt.got.
5030
5031 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
5032
5033 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
5034 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
5035
5036 2017-01-09 Nick Clifton <nickc@redhat.com>
5037
5038 * dwarf2.c (lookup_address_in_function_table): Return early if
5039 there are no functions in the given comp unit, or if the high
5040 address of the last function in the comp unit is less than the
5041 desired address.
5042
5043 2017-01-09 Nick Clifton <nickc@redhat.com>
5044
5045 PR binutils/21013
5046 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
5047 message if there are too many symbols to load.
5048
5049 2017-01-04 James Clarke <jrtc27@jrtc27.com>
5050
5051 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
5052 if relocs are cached.
5053
5054 2017-01-03 Rich Felker <bugdal@aerifal.cx>
5055
5056 PR ld/21017
5057 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
5058 for R_MICROBLAZE_GOTOFF_64.
5059
5060 2017-01-03 Nick Clifton <nickc@redhat.com>
5061
5062 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
5063 warning about using a possibly uninitialised variable.
5064
5065 2017-01-02 Alan Modra <amodra@gmail.com>
5066
5067 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
5068 (allocate_plt_static, allocate_dynrelocs): Use it.
5069
5070 2017-01-02 Alan Modra <amodra@gmail.com>
5071
5072 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
5073 .PARISC.unwind section.
5074
5075 2017-01-02 Alan Modra <amodra@gmail.com>
5076
5077 PR ld/20989
5078 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
5079 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
5080 indirect to GOT pointer relative code edit.
5081
5082 2017-01-02 Alan Modra <amodra@gmail.com>
5083
5084 Update year range in copyright notice of all files.
5085
5086 For older changes see ChangeLog-2016
5087 \f
5088 Copyright (C) 2017 Free Software Foundation, Inc.
5089
5090 Copying and distribution of this file, with or without modification,
5091 are permitted in any medium without royalty provided the copyright
5092 notice and this notice are preserved.
5093
5094 Local Variables:
5095 mode: change-log
5096 left-margin: 8
5097 fill-column: 74
5098 version-control: never
5099 End: