1 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
3 * elf32-i386.c (is_i386_elf): Removed.
4 (elf_i386_check_relocs): Replace is_i386_elf with is_x86_elf.
5 (elf_i386_size_dynamic_sections): Likewise.
6 (elf_i386_relocate_section): Likewise.
7 * elf64-x86-64.c (is_x86_64_elf): Removed.
8 (elf_x86_64_check_relocs): Replace is_x86_64_elf with
10 (elf_x86_64_size_dynamic_sections): Likewise.
11 (elf_x86_64_relocate_section): Likewise.
12 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
14 * elfxx-x86.h (elf_x86_link_hash_table): Add target_id.
17 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
19 * elf32-i386.c (elf_i386_compute_jump_table_size): Removed.
20 (elf_i386_allocate_dynrelocs): Replace
21 elf_i386_compute_jump_table_size with
22 elf_x86_compute_jump_table_size.
23 (elf_i386_size_dynamic_sections): Likewise.
24 * elf64-x86-64.c (elf_x86_64_compute_jump_table_size): Removed.
25 (elf_x86_64_allocate_dynrelocs): Replace
26 elf_x86_64_compute_jump_table_size with
27 elf_x86_compute_jump_table_size.
28 (elf_x86_64_size_dynamic_sections): Likewise.
29 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
31 * elfxx-x86.h (elf_x86_link_hash_table): Add got_entry_size.
32 (elf_x86_compute_jump_table_size): New.
34 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
36 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
38 (_bfd_x86_elf_adjust_dynamic_symbol): Use sizeof_reloc.
39 * elfxx-x86.h (elf_x86_link_hash_table): Add sizeof_reloc.
41 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
43 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check VxWorks
44 with htab->is_vxworks.
45 (elf_i386_size_dynamic_sections): Likewise.
46 (elf_i386_relocate_section): Likewise.
47 (elf_i386_finish_dynamic_symbol): Likewise.
48 (elf_i386_finish_dynamic_sections): Likewise.
50 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
52 * elf32-i386.c (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
53 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
54 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Moved to ...
55 * elfxx-x86.h (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
56 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
57 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Here.
58 * elf64-x86-64.c (GOT_TLS_IE, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
59 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Removed.
61 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
64 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Check
65 ELF_COMMON_DEF_P for common symbols.
67 2017-09-02 Alan Modra <amodra@gmail.com>
69 * elf-eh-frame.c (offset_adjust): Avoid false positive gcc warning.
70 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Likewise.
71 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
73 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
75 * elf32-i386.c (elf_i386_gc_mark_hook): Removed.
76 (elf_backend_gc_mark_hook): Likewise.
77 * elf64-x86-64.c (elf_x86_64_gc_mark_hook): Likewise.
78 (elf_backend_gc_mark_hook): Likewise.
79 * elfxx-x86.c (_bfd_x86_elf_gc_mark_hook): New function.
80 * elfxx-x86.h (_bfd_x86_elf_gc_mark_hook): New.
81 (elf_backend_gc_mark_hook): Likewise.
83 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
85 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Removed.
86 (elf_backend_adjust_dynamic_symbol): Likewise.
87 * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.
88 (elf_backend_adjust_dynamic_symbol): Likewise.
89 * elfxx-x86.c (_bfd_x86_elf_adjust_dynamic_symbol): New function.
90 (_bfd_x86_elf_link_setup_gnu_properties): Copy is_vxworks.
91 * elfxx-x86.h (elf_x86_link_hash_table): Add is_vxworks.
92 (_bfd_x86_elf_adjust_dynamic_symbol): New.
93 (elf_backend_adjust_dynamic_symbol): Likewise.
95 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
97 * elfxx-x86.h (elf_x86_plt_layout_table): Fix a typo in
100 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
102 * elf32-i386.c (elf_i386_mkobject): Removed.
103 (bfd_elf32_mkobject): Likewise.
104 * elf64-x86-64.c (elf_x86_64_mkobject): Likewise.
105 (bfd_elf64_mkobject): Likewise.
106 (bfd_elf32_mkobject): Likewise.
107 * elfxx-x86.c (_bfd_x86_elf_mkobject): New function.
108 * elfxx-x86.h (_bfd_x86_elf_mkobject): New.
109 (bfd_elf64_mkobject): Likewise.
110 (bfd_elf32_mkobject): Likewise.
112 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
114 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Updated.
115 Call _bfd_x86_elf_link_setup_gnu_properties.
116 * elf64-x86-64.c (elf_x86_lazy_plt_layout): Initialize
117 pic_plt0_entry and pic_plt_entry fields with the non-PIC PLT
119 (elf_x86_64_non_lazy_plt): Likewise.
120 (elf_x86_64_lazy_bnd_plt): Likewise.
121 (elf_x86_64_non_lazy_bnd_plt): Likewise.
122 (elf_x86_64_lazy_ibt_plt): Likewise.
123 (elf_x32_lazy_ibt_plt): Likewise.
124 (elf_x86_64_non_lazy_ibt_plt): Likewise.
125 (elf_x32_non_lazy_ibt_plt): Likewise.
126 (elf_x86_64_nacl_plt): Likewise.
127 (elf_x86_64_link_setup_gnu_properties): Updated. Call
128 _bfd_x86_elf_link_setup_gnu_properties.
129 * elfxx-x86.c: Include elf-vxworks.h".
130 (_bfd_x86_elf_link_setup_gnu_properties): New function.
131 * elfxx-x86.h (elf_x86_lazy_plt_layout): Remove "for i386 only"
132 comments for pic_plt0_entry and pic_plt_entry.
133 (elf_x86_non_lazy_plt_layout): Likewise.
134 (elf_x86_plt_layout_table): New.
135 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
137 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
140 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Create
141 .eh_frame section for the second PLT.
142 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Correct
143 alignment of .eh_frame section for the second PLT.
145 2017-09-01 Nick Clifton <nickc@redhat.com>
148 * dwarf2.c (decode_line_info): Fix test for an overlong line info
151 2017-09-01 Nick Clifton <nickc@redhat.com>
154 * elf-attrs.c (_bfd_elf_parse_attributes): Ensure that the
155 attribute buffer is NUL terminated.
157 2017-08-31 Nick Clifton <nickc@redhat.com>
160 * dwarf2.c (read_section): If necessary add a terminating NUL byte
161 to dwarf string sections.
163 2017-08-31 Alan Modra <amodra@gmail.com>
165 * po/SRC-POTFILES.in: Regenerate.
167 2017-08-31 Alan Modra <amodra@gmail.com>
169 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Don't exit early
170 for a section containing just a terminator. Allow multiple
171 terminators at end of section.
172 * elflink.c (bfd_elf_discard_info): Iterate over .eh_frame
173 sections when not adding alignment. Assert on terminator in
176 2017-08-31 Alan Modra <amodra@gmail.com>
180 * elflink.c (bfd_elf_discard_info): Don't pad embedded zero
183 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
185 * configure.ac (bfd_backends): Add elf64.lo together with
186 elfxx-x86.lo for 64-bit BFD.
187 * configure: Regenerated.
189 2017-08-31 James Bowman <james.bowman@ftdichip.com>
191 * elf32-ft32.c (ft32_elf_howto_table): Use complain_overflow_dont
194 2017-08-31 Alan Modra <amodra@gmail.com>
197 * opncls.c (bfd_close_all_done): Don't call bfd_cache_close
198 before _close_and_cleanup. Call iovec->bclose after.
199 (bfd_close): Remove code common to, and call, bfd_close_all_done.
201 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
203 * elf32-i386.c (elf_i386_plt_type): Removed.
204 (elf_i386_plt): Likewise.
205 (elf_i386_get_synthetic_symtab): Updated. Call
206 _bfd_x86_elf_get_synthetic_symtab.
207 * elf64-x86-64.c (elf_x86_64_plt_type): Removed.
208 (elf_x86_64_plt): Likewise.
209 (elf_x86_64_get_synthetic_symtab): Updated. Call
210 _bfd_x86_elf_get_synthetic_symtab.
211 * elfxx-x86.c (elf_i386_get_plt_got_vma): New function.
212 (elf_x86_64_get_plt_got_vma): Likewise.
213 (elf_i386_valid_plt_reloc_p): Likewise.
214 (elf_x86_64_valid_plt_reloc_p): Likewise.
215 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
216 * elfxx-x86.h (elf_x86_plt_type): New.
217 (elf_x86_plt): Likewise.
218 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
220 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
222 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Check
223 target_id instead of elf_machine_code.
225 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
227 * elf32-i386.c (ELF_DYNAMIC_INTERPRETER): Removed.
228 (elf_i386_lazy_plt_layout): Likewise.
229 (elf_i386_non_lazy_plt_layout): Likewise.
230 (elf_i386_plt_layout): Likewise.
231 (elf_i386_link_hash_table): Likewise.
232 (elf_i386_next_tls_desc_index): Likewise.
233 (elf_i386_srelplt2): Likewise.
234 (elf_i386_plt): Likewise.
235 (elf_i386_lazy_plt): Likewise.
236 (elf_i386_non_lazy_plt): Likewise.
237 (elf_i386_link_hash_table_create): Likewise.
238 (bfd_elf32_bfd_link_hash_table_create): Likewise.
239 (elf_i386_lazy_plt): Updated.
240 (elf_i386_non_lazy_plt): Likewise.
241 (elf_i386_lazy_ibt_plt): Likewise.
242 (elf_i386_non_lazy_ibt_plt): Likewise.
243 (elf_i386_allocate_dynrelocs): Likewise.
244 (elf_i386_size_dynamic_sections): Likewise.
245 (elf_i386_relocate_section): Likewise.
246 (elf_i386_finish_dynamic_symbol): Likewise.
247 (elf_i386_finish_dynamic_sections): Likewise.
248 (elf_i386_get_synthetic_symtab): Likewise.
249 (elf_i386_link_setup_gnu_properties): Likewise.
250 (elf_i386_nacl_plt): Likewise.
251 * elf64-x86-64.c (ABI_64_P): Removed.
252 (ELF64_DYNAMIC_INTERPRETER): Likewise.
253 (ELF32_DYNAMIC_INTERPRETER): Likewise.
254 (elf_x86_64_lazy_plt_layout): Likewise.
255 (elf_x86_64_non_lazy_plt_layout): Likewise.
256 (elf_x86_64_plt_layout): Likewise.
257 (elf_x86_64_link_hash_table): Likewise.
258 (elf_x86_64_plt): Likewise.
259 (elf_x86_64_lazy_plt): Likewise.
260 (elf_x86_64_non_lazy_plt): Likewise.
261 (elf_x86_64_link_hash_table_create): Likewise.
262 (bfd_elf64_bfd_link_hash_table_create): Likewise.
263 (bfd_elf32_bfd_link_hash_table_create): Likewise.
264 (elf_x86_64_lazy_plt): Updated.
265 (elf_x86_64_non_lazy_plt): Likewise.
266 (elf_x86_64_lazy_bnd_plt): Likewise.
267 (elf_x86_64_non_lazy_bnd_plt): Likewise.
268 (elf_x86_64_lazy_ibt_plt): Likewise.
269 (elf_x32_lazy_ibt_plt): Likewise.
270 (elf_x86_64_non_lazy_ibt_plt): Likewise.
271 (elf_x32_non_lazy_ibt_plt): Likewise.
272 (elf_x86_64_allocate_dynrelocs): Likewise.
273 (elf_x86_64_size_dynamic_sections): Likewise.
274 (elf_x86_64_relocate_section): Likewise.
275 (elf_x86_64_finish_dynamic_symbol): Likewise.
276 (elf_x86_64_finish_dynamic_sections): Likewise.
277 (elf_x86_64_get_synthetic_symtab): Likewise.
278 (elf_x86_64_link_setup_gnu_properties): Likewise.
279 (elf_x86_64_nacl_plt): Likewise.
280 * elfxx-x86.c: Include "objalloc.h", "elf/i386.h" and
282 (ELF32_DYNAMIC_INTERPRETER): New.
283 (ELF64_DYNAMIC_INTERPRETER): Likewise.
284 (ELFX32_DYNAMIC_INTERPRETER): Likewise.
285 (_bfd_x86_elf_link_hash_table_create): Likewise.
286 (_bfd_x86_elf_link_hash_table_free): Renamed to ...
287 (elf_x86_link_hash_table_free): This. Make it static.
288 * elfxx-x86.h: Don't include "objalloc.h".
290 (elf_x86_lazy_plt_layout): Likewise.
291 (elf_x86_non_lazy_plt_layout): Likewise.
292 (elf_x86_plt_layout): Likewise.
293 (_bfd_x86_elf_link_hash_table_create): Likewise.
294 (bfd_elf64_bfd_link_hash_table_create): Likewise.
295 (bfd_elf32_bfd_link_hash_table_create): Likewise.
296 (elf_x86_link_hash_table): Add plt, lazy_plt, non_lazy_plt,
297 srelplt2 and next_tls_desc_index.
298 (_bfd_x86_elf_link_hash_table_free): Removed.
300 2017-08-30 Maciej W. Rozycki <macro@imgtec.com>
302 * elfxx-mips.c (mips_elf_perform_relocation): Correct microMIPS
303 branch offset interpretation.
305 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
308 * opncls.c (bfd_close_all_done): Call _close_and_cleanup.
310 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
312 * elf64-x86-64.c (elf_x86_64_next_tls_desc_index): Removed.
313 (elf_x86_64_srelplt2): Likewise.
315 2017-08-30 Alan Modra <amodra@gmail.com>
317 * elf64-ppc.c (struct ppc_link_hash_table): Add do_tls_opt.
318 (ppc64_elf_tls_optimize): Set it.
319 (ppc64_elf_relocate_section): Nop addis on TPREL16_HA, and convert
320 insn on TPREL16_LO and TPREL16_LO_DS relocs to use r13 when
321 addis would add zero.
322 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add do_tls_opt.
323 (ppc_elf_tls_optimize): Set it.
324 (ppc_elf_relocate_section): Nop addis on TPREL16_HA, and convert
325 insn on TPREL16_LO relocs to use r2 when addis would add zero.
327 2017-08-30 Alan Modra <amodra@gmail.com>
329 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing
330 __tls_get_addr call sequences to LE, don't move the addi down
331 to the nop. Replace the bl with addi and leave the nop alone.
333 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
335 * elf32-i386.c (elf_i386_pie_finish_undefweak_symbol):
337 * elf64-x86-64.c (elf_x86_64_finish_local_dynamic_symbol):
339 (elf_x86_64_pie_finish_undefweak_symbol): Likewise.
341 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
343 * Makefile.am (BFD32_BACKENDS): Add elfxx-x86.lo.
344 (BFD64_BACKENDS): Likewise.
345 (BFD32_BACKENDS_CFILES): Add elfxx-x86.c.
346 (BFD64_BACKENDS_CFILES): Likewise.
347 * Makefile.in: Regenerated.
348 * configure.ac (bfd_backends): Add elfxx-x86.lo together with
349 elf32-i386.lo and elf64-x86-64.lo.
350 * configure: Regenerated.
351 * elf32-i386.c: Include "elfxx-x86.h" instead of "sysdep.h",
352 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
353 "objalloc.h" and "hashtab.h".
354 (ELIMINATE_COPY_RELOCS): Removed.
355 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
356 (SYMBOL_NO_COPYRELOC): Likewise.
357 (elf_i386_link_hash_entry): Likewise.
358 (GOT_UNKNOWN): Likewise.
359 (GOT_NORMAL): Likewise.
360 (GOT_TLS_GD): Likewise.
361 (elf_i386_hash_entry): Likewise.
362 (elf_i386_obj_tdata): Likewise.
363 (elf_i386_tdata): Likewise.
364 (elf_i386_local_got_tls_type): Likewise.
365 (elf_i386_local_tlsdesc_gotent): Likewise.
366 (elf_i386_hash_table): Likewise.
367 (elf_i386_link_hash_newfunc): Likewise.
368 (elf_i386_local_htab_hash): Likewise.
369 (elf_i386_local_htab_eq): Likewise.
370 (elf_i386_get_local_sym_hash): Likewise.
371 (elf_i386_link_hash_table_free): Likewise.
372 (elf_i386_copy_indirect_symbol): Likewise.
373 (elf_i386_fixup_symbol): Likewise.
374 (elf_i386_readonly_dynrelocs): Likewise.
375 (elf_i386_always_size_sections): Likewise.
376 (elf_i386_set_tls_module_base): Likewise.
377 (elf_i386_dtpoff_base): Likewise.
378 (compare_relocs): Likewise.
379 (elf_i386_hash_symbol): Likewise.
380 (elf_i386_parse_gnu_properties): Likewise.
381 (elf_i386_merge_gnu_properties): Likewise.
382 (elf_i386_link_check_relocs): Likewise.
383 (elf_i386_merge_symbol_attribute): Likewise.
384 (bfd_elf32_bfd_link_check_relocs): Likewise.
385 (elf_backend_copy_indirect_symbol): Likewise.
386 (elf_backend_always_size_sections): Likewise.
387 (elf_backend_omit_section_dynsym): Likewise.
388 (elf_backend_hash_symbol): Likewise.
389 (elf_backend_fixup_symbol): Likewise.
390 (elf_backend_parse_gnu_properties): Likewise.
391 (elf_backend_merge_gnu_properties): Likewise.
392 (elf_backend_merge_symbol_attribute): Likewise.
393 (elf_i386_mkobject): Updated.
394 (elf_i386_link_hash_table_create): Likewise.
395 (elf_i386_check_tls_transition): Likewise.
396 (elf_i386_tls_transition): Likewise.
397 (elf_i386_convert_load_reloc): Likewise.
398 (elf_i386_check_relocs): Likewise.
399 (elf_i386_adjust_dynamic_symbol): Likewise.
400 (elf_i386_allocate_dynrelocs): Likewise.
401 (elf_i386_convert_load): Likewise.
402 (elf_i386_size_dynamic_sections): Likewise.
403 (elf_i386_relocate_section): Likewise.
404 (elf_i386_finish_dynamic_symbol ): Likewise.
405 (elf_i386_finish_dynamic_sections): Likewise.
406 (elf_i386_output_arch_local_syms): Likewise.
407 (elf_i386_get_synthetic_symtab): Likewise.
408 (elf_i386_link_setup_gnu_properties): Likewise.
409 (elf_i386_link_hash_table): Use elf_x86_link_hash_table, instead
410 of elf_link_hash_table, as base.
411 (elf_i386_next_tls_desc_index): New.
412 (elf_i386_srelplt2): Likewise.
413 (elf_i386_plt): Likewise.
414 (elf_i386_lazy_plt): Likewise.
415 (elf_i386_non_lazy_plt): Likewise.
416 * elf32-x86-64.c: Include "elfxx-x86.h" instead of "sysdep.h",
417 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
418 "objalloc.h" and "hashtab.h".
419 (ELIMINATE_COPY_RELOCS): Removed.
420 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
421 (SYMBOL_NO_COPYRELOC): Likewise.
422 (elf_x86_64_link_hash_entry): Likewise.
423 (GOT_UNKNOWN): Likewise.
424 (GOT_NORMAL): Likewise.
425 (GOT_TLS_GD): Likewise.
426 (elf_x86_64_hash_entry): Likewise.
427 (elf_x86_64_obj_tdata): Likewise.
428 (elf_x86_64_tdata): Likewise.
429 (elf_x86_64_local_got_tls_type): Likewise.
430 (elf_x86_64_local_tlsdesc_gotent): Likewise.
431 (elf_x86_64_hash_table): Likewise.
432 (elf_x86_64_link_hash_newfunc): Likewise.
433 (elf_x86_64_local_htab_hash): Likewise.
434 (elf_x86_64_local_htab_eq): Likewise.
435 (elf_x86_64_get_local_sym_hash): Likewise.
436 (elf_x86_64_link_hash_table_free): Likewise.
437 (elf_x86_64_copy_indirect_symbol): Likewise.
438 (elf_x86_64_fixup_symbol): Likewise.
439 (elf_x86_64_readonly_dynrelocs): Likewise.
440 (elf_x86_64_always_size_sections): Likewise.
441 (elf_x86_64_set_tls_module_base): Likewise.
442 (elf_x86_64_dtpoff_base): Likewise.
443 (compare_relocs): Likewise.
444 (elf_x86_64_merge_symbol_attribute): Likewise.
445 (elf_x86_64_hash_symbol): Likewise.
446 (elf_x86_64_parse_gnu_properties): Likewise.
447 (elf_x86_64_merge_gnu_properties): Likewise.
448 (elf_x86_64_link_check_relocs): Likewise.
449 (elf_backend_copy_indirect_symbol): Likewise.
450 (elf_backend_always_size_sections): Likewise.
451 (bfd_elf64_bfd_link_check_relocs): Likewise.
452 (elf_backend_merge_symbol_attribute): Likewise.
453 (elf_backend_hash_symbol): Likewise.
454 (elf_backend_omit_section_dynsym): Likewise.
455 (elf_backend_fixup_symbol): Likewise.
456 (elf_backend_parse_gnu_properties): Likewise.
457 (elf_backend_merge_gnu_properties): Likewise.
458 (bfd_elf32_bfd_link_check_relocs): Likewise.
459 (elf_x86_64_mkobject): Updated.
460 (elf_x86_64_link_hash_table_create): Likewise.
461 (elf_x86_64_check_tls_transition): Likewise.
462 (elf_x86_64_tls_transition): Likewise.
463 (elf_x86_64_convert_load_reloc): Likewise.
464 (elf_x86_64_check_relocs): Likewise.
465 (elf_x86_64_adjust_dynamic_symbol): Likewise.
466 (elf_x86_64_allocate_dynrelocs): Likewise.
467 (elf_x86_64_convert_load): Likewise.
468 (elf_x86_64_size_dynamic_sections): Likewise.
469 (elf_x86_64_relocate_section): Likewise.
470 (elf_x86_64_finish_dynamic_symbol ): Likewise.
471 (elf_x86_64_finish_dynamic_sections): Likewise.
472 (elf_x86_64_output_arch_local_syms): Likewise.
473 (elf_x86_64_get_synthetic_symtab): Likewise.
474 (elf_x86_64_link_setup_gnu_properties): Likewise.
475 (elf_x86_64_link_hash_table): Use elf_x86_link_hash_table,
476 instead of elf_link_hash_table, as base.
477 (elf_x86_64_next_tls_desc_index): New.
478 (elf_x86_64_srelplt2): Likewise.
479 (elf_x86_64_plt): Likewise.
480 (elf_x86_64_lazy_plt): Likewise.
481 (elf_x86_64_non_lazy_plt): Likewise.
482 * elfxx-x86.c: New file.
483 * elfxx-x86.h: Likewise.
485 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
487 * elf32-i386.c (elf_i386_get_synthetic_symtab): Simplify bad
489 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
491 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
493 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check valid PLT
494 sections before checking dynamic relocations and free invalid
495 PLT section contents.
496 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
498 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
500 * elf-bfd.h (_bfd_elf_ifunc_get_synthetic_symtab): Removed.
501 * elf-ifunc.c (_bfd_elf_ifunc_get_synthetic_symtab): Likewise.
503 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
506 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check for valid
508 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
510 2017-08-27 H.J. Lu <hongjiu.lu@intel.com>
512 * elf32-i386.c (elf_i386_link_hash_newfunc): Initialize
514 * elf64-x86-64.c (elf_x86_64_link_hash_newfunc): Likewise.
516 2017-08-26 H.J. Lu <hongjiu.lu@intel.com>
519 * elf-bfd.h (elf_obj_tdata): Use ENUM_BITFIELD on object_id,
520 dyn_lib_class and has_gnu_symbols. Change bad_symtab to bitfield.
521 Add a has_no_copy_on_protected bitfield.
522 (elf_has_no_copy_on_protected): New.
523 * elf-properties.c (_bfd_elf_parse_gnu_properties): Set
524 elf_has_no_copy_on_protected for GNU_PROPERTY_NO_COPY_ON_PROTECTED.
525 (elf_merge_gnu_property_list): Likewise.
526 (_bfd_elf_link_setup_gnu_properties): Set extern_protected_data
527 to FALSE for elf_has_no_copy_on_protected.
528 * elf32-i386.c (SYMBOL_NO_COPYRELOC): New.
529 (elf_i386_link_hash_entry): Add def_protected.
530 (elf_i386_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
531 when checking info->nocopyreloc.
532 (elf_i386_link_setup_gnu_properties): Don't set
533 extern_protected_data here.
534 (elf_i386_merge_symbol_attribute): New function.
535 (elf_backend_merge_symbol_attribute): New.
536 * elf64-x86-64.c (SYMBOL_NO_COPYRELOC): New.
537 (elf_x86_64_link_hash_entry): Add def_protected.
538 (elf_x86_64_need_pic): Report protected symbol for def_protected.
539 (elf_x86_64_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
540 when checking info->nocopyreloc.
541 (elf_x86_64_relocate_section): Also check for R_X86_64_PC32
542 relocation run-time overflow and unresolvable R_X86_64_32S
543 relocation against protected data symbol defined in shared object
544 with GNU_PROPERTY_NO_COPY_ON_PROTECTED.
545 (elf_x86_64_link_setup_gnu_properties): Don't set
546 extern_protected_data here.
547 (elf_x86_64_merge_symbol_attribute): New function.
548 (elf_backend_merge_symbol_attribute): New.
550 2017-08-26 Alan Modra <amodra@gmail.com>
552 * elf32-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
553 (ppc_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
554 (ppc_elf_relocate_section): Comment fix.
555 * elf64-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
556 (ppc64_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
557 Support dynamic relocs for TPREL16 when non-pic too.
558 (dec_dynrel_count): Adjust TPREL16 handling as per check_relocs.
559 (ppc64_elf_relocate_section): Support dynamic relocs for TPREL16
562 2017-08-25 H.J. Lu <hongjiu.lu@intel.com>
564 * elf32-i386.c (elf_i386_link_hash_entry): Remove redundant
565 "symbol" in comments.
566 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Likewise.
568 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
571 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for
572 R_X86_64_PC32 relocation run-time overflow and unresolvable
573 R_X86_64_32S relocation with -z nocopyreloc.
575 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
577 * elf32-i386.c (elf_i386_check_relocs): Revert the last change.
578 Undefined symbols may not have a type.
579 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
581 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
583 * elf64-x86-64.c (elf_x86_64_need_pic): Add an argument for
584 bfd_link_info. Report shared, PIE or PDE object based on
586 (elf_x86_64_check_relocs): Update elf_x86_64_need_pic call.
587 (elf_x86_64_relocate_section): Likewise.
589 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
591 * elf32-i386.c (elf_i386_check_relocs): Increment PLT count only
592 for function symbols.
593 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
595 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
597 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set
598 extern_protected_data to FALSE if GNU_PROPERTY_NO_COPY_ON_PROTECTED
599 is set on any input relocatable file.
600 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
602 2017-08-23 Alan Modra <amodra@gmail.com>
605 * elf64-ppc.c (ensure_undef_dynamic): Rename from
606 ensure_undefweak_dynamic. Handle undefined too.
607 * elf32-ppc.c (ensure_undef_dynamic): Likewise.
608 * elf32-hppa.c (ensure_undef_dynamic): Likewise.
609 (allocate_dynrelocs): Discard undefined non-default visibility
610 relocs first. Make undefined syms dynamic. Tidy goto.
612 2017-08-21 Alan Modra <amodra@gmail.com>
613 H.J. Lu <hongjiu.lu@intel.com>
616 * elf-bfd.h (SYMBOLIC_BIND): Return TRUE for __start/__stop symbols.
617 * elflink.c (bfd_elf_define_start_stop): Rewrite.
619 2017-08-21 Hans-Peter Nilsson <hp@bitrange.com>
622 * elf64-mmix.c (mmix_elf_relax_section): Correct handling of
623 undefined weak symbols.
625 2017-08-18 Nick Clifton <nickc@redhat.com>
628 * tekhex.c (getsym): Fix check for source pointer walking off the
629 end of the input buffer.
631 2017-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
634 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Skip IFUNC
635 relocations in debug sections, change abort to _bfd_error_handler.
637 2017-08-14 Nick Clifton <nickc@redhat.com>
640 * elf.c (setup_group): Check for an empty or very small group
642 * po/bfd.pot: Regenerate.
644 2017-08-14 Alan Modra <amodra@gmail.com>
647 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't add
648 alignment padding here.
649 * elflink.c (bfd_elf_discard_info): Add .eh_frame padding here
650 in a reverse pass over sections.
652 2017-08-11 H.J. Lu <hongjiu.lu@intel.com>
655 * elf32-i386.c (elf_i386_get_synthetic_symtab): Allocate space
656 for @plt suffixes first.
657 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
659 2017-08-08 Nick Clifton <nickc@redhat.com>
662 * elf-attrs.c (_bfd_elf_parse_attributes): Complain about very
663 small section lengths.
664 * elf.c (_bfd_elf_setup_sections): Skip empty entries in the group
666 (elfcore_grok_freebsd_prstatus): Add checks to make sure that
667 there is enough data present in the note.
669 2017-08-08 Alan Modra <amodra@gmail.com>
672 * elf32-microblaze.c (microblaze_elf_check_relocs): Don't bump
673 got.refcount for GOTOFF relocs, just create .got section.
675 2017-08-07 H.J. Lu <hongjiu.lu@intel.com>
677 * elflink.c (elf_link_add_object_symbols): Move common symbol
678 check after bed->common_definition.
680 2017-08-07 Alan Modra <amodra@gmail.com>
683 * elflink.c (bfd_elf_final_link): Don't segfault when sections
684 needed to define various dynamic tags have been discarded.
686 2017-08-07 Nick Clifton <nickc@redhat.com>
689 * elf32-i386.c (elf_i386_link_setup_gnu_properties): If the dynobj
690 has not been set then use the bfd returned by
691 _bfd_elf_link_setup_gnu_properties. If that is null then search
692 through all the input bfds selecting the first normal, ELF format
694 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
696 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
698 * elf32-i386.c (elf_i386_link_hash_entry): Change tls_get_addr
700 (elf_i386_link_hash_newfunc): Initialize tls_get_addr to 0.
701 (elf_i386_check_tls_transition): Check tls_get_addr directly.
702 (elf_i386_convert_load_reloc): Update tls_get_addr check.
703 (elf_i386_link_check_relocs): New function.
704 (bfd_elf32_bfd_link_check_relocs): New.
705 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Change tls_get_addr
707 (elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 0.
708 (elf_x86_64_check_tls_transition): Check tls_get_addr directly.
709 (elf_x86_64_convert_load_reloc): Update tls_get_addr check.
710 (elf_x86_64_link_check_relocs): New function.
711 (bfd_elf64_bfd_link_check_relocs): New.
712 (bfd_elf32_bfd_link_check_relocs): Likewise.
714 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
717 * elflink.c (elf_link_add_object_symbols): Treat common symbol
718 as undefined for --no-define-common.
720 2017-08-05 Alan Modra <amodra@gmail.com>
722 * elf32-hppa.c (elf32_hppa_set_gp): Don't require an
723 hppa_link_hash_table.
725 2017-08-02 Max Filippov <jcmvbkbc@gmail.com>
727 * xtensa-isa.c (xtensa_isa_init): Don't update lookup table
728 entries for sysregs with negative indices.
730 2017-08-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
732 * elf32-s390.c (elf_s390_finish_dynamic_sections): Skip if it
733 isn't the S/390 specific elf data.
734 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
736 2017-07-31 Kuan-Lin Chen <rufus@andestech.com>
738 * elfxx-riscv.c (riscv_elf_add_sub_reloc): New function.
739 * (howto_table) [R_RISCV_ADD8]: Use riscv_elf_add_sub_reloc.
740 [R_RISCV_ADD16]: Likewise.
741 [R_RISCV_ADD32]: Likewise.
742 [R_RISCV_ADD64]: Likewise.
743 [R_RISCV_SUB6]: Likewise.
744 [R_RISCV_SUB8]: Likewise.
745 [R_RISCV_SUB16]: Likewise.
746 [R_RISCV_SUB32]: Likewise.
747 [R_RISCV_SUB64]: Likewise.
749 2017-07-31 Alan Modra <amodra@gmail.com>
751 * elf64-ppc.c (ppc64_elf_tls_setup): Warn on --plt-localentry
752 without ld.so checks.
754 2017-07-29 Alan Modra <amodra@gmail.com>
757 * elf64-ppc.c (struct ppc_link_hash_entry): Add non_zero_localentry.
758 (ppc64_elf_merge_symbol): Set non_zero_localentry.
759 (is_elfv2_localentry0): Test non_zero_localentry.
760 (ppc64_elf_tls_setup): Default to --no-plt-localentry.
762 2017-07-28 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
764 * elf32-s390.c (elf_s390_finish_dynamic_sections): Add NULL
765 pointer check for htab->elf.irelplt.
766 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
768 2017-07-27 Nick Clifton <nickc@redhat.com>
771 * mach-o.c (bfd_mach_o_read_symtab_strtab): Fail if the symtab
773 * nlmcode.h (nlm_swap_auxiliary_headers_in): Replace assertion
775 * section.c (bfd_make_section_with_flags): Fail if the name or bfd
777 * vms-alpha.c (bfd_make_section_with_flags): Correct computation
779 (evax_bfd_print_emh): Check for invalid string lengths.
781 2017-07-25 Nick Clifton <nickc@redhat.com>
783 * po/fr.po: Updated French translation.
785 2017-07-25 Benjamin Green <bengreen5mx@gmail.com>
788 * elf32-msp430.c (msp430_elf_relax_section): Allow conversion of
789 16-bit absolute branches into 10-bit pc-relative branches on the
790 MSP430 as well as the MSP430X.
792 2017-07-25 Alan Modra <amodra@gmail.com>
794 * elf64-ppc.c (struct map_stub): Add tls_get_addr_opt_bctrl.
795 (stub_eh_frame_size): New function.
796 (ppc_size_one_stub): Set group tls_get_addr_opt_bctrl.
797 (group_sections): Init group tls_get_addr_opt_bctrl.
798 (ppc64_elf_size_stubs): Update sizing and initialization of
799 .eh_frame. Iteration over stubs via group list.
800 (ppc64_elf_build_stubs): Iterate over stubs via group list.
801 (ppc64_elf_finish_dynamic_sections): Update finalization of
804 2017-07-24 Nick Clifton <nickc@redhat.com>
807 * mach-o.c (bfd_mach_o_canonicalize_relocs): Pass the base address
808 of the relocs to the canonicalize_one_reloc routine.
809 * mach-o.h (struct bfd_mach_o_backend_data): Update the prototype
810 for the _bfd_mach_o_canonicalize_one_reloc field.
811 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add
812 res_base parameter. Use to check for corrupt pair relocs.
813 * mach-o-aarch64.c (bfd_mach_o_arm64_canonicalize_one_reloc):
815 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc):
817 * mach-o-x86-64.c (bfd_mach_o_x86_64_canonicalize_one_reloc):
820 * vms-alpha.c (_bfd_vms_slurp_eihd): Make sure that there is
821 enough data in the record before attempting to parse it.
822 (_bfd_vms_slurp_eeom): Likewise.
824 (_bfd_vms_slurp_egsd): Check for an invalid section index.
825 (image_set_ptr): Likewise.
826 (alpha_vms_slurp_relocs): Likewise.
828 (alpha_vms_object_p): Check for a truncated record.
830 2017-07-24 Nick Clifton <nickc@redhat.com>
833 * reloc.c (_bfd_unrecognized_reloc): New function. Reports
834 an unrecognized reloc and sets the bfd_error value.
835 * libbfd.h: Regenerate.
836 * elf32-arm.c (elf32_arm_final_link_relocate): Use the new
838 * elf32-i386.c (elf_i386_relocate_section): Likewise.
839 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
840 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
841 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.
842 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
844 2017-07-23 Alan Modra <amodra@gmail.com>
846 * elf64-ppc.c (ppc64_elf_size_stubs): Correct advance to
849 2017-07-19 Szabolcs Nagy <szabolcs.nagy@arm.com>
852 * elfnn-aarch64.c (elfNN_aarch64_reloc_type_class): Return
853 reloc_class_ifunc for ifunc symbols.
855 2017-07-19 Nick Clifton <nickc@redhat.com>
858 * archive.c (bfd_generic_archive_p): If the bfd does not have the
859 correct magic bytes at the start, set the error to wrong format
860 and clear the format selector before returning NULL.
862 2017-07-19 Nick Clifton <nickc@redhat.com>
865 * coff-rs6000.c (_bfd_strntol): New function.
866 (_bfd_strntoll): New function.
867 (GET_VALUE_IN_FIELD): New macro.
868 (EQ_VALUE_IN_FIELD): new macro.
869 (_bfd_xcoff_slurp_armap): Use new macros.
870 (_bfd_xcoff_archive_p): Likewise.
871 (_bfd_xcoff_read_ar_hdr): Likewise.
872 (_bfd_xcoff_openr_next_archived_file): Likewise.
873 (_bfd_xcoff_stat_arch_elt): Likewise.
874 * coff64-rs6000.c (_bfd_strntol): New function.
875 (_bfd_strntoll): New function.
876 (GET_VALUE_IN_FIELD): New macro.
877 (xcoff64_slurp_armap): Use new macros.
879 2017-07-19 Claudiu Zissulescu <claziss@synopsys.com>
880 John Eric Martin <John.Martin@emmicro-us.com>
882 * bfd-in2.h: Regenerate.
883 * libbfd.h: Regenerate.
884 * elf32-arc.c (JLI): Define.
885 * reloc.c: Add JLI relocations.
887 2017-07-18 Nick Clifton <nickc@redhat.com>
890 * coff-sh.c: Fix spelling typos.
891 * compress.c: Likewise.
892 * cpu-pdp11.c: Likewise.
893 * ecofflink.c: Likewise.
894 * elf-m10300.c: Likewise.
896 * elf32-arm.c: Likewise.
897 * elf32-m68k.c: Likewise.
898 * elf32-nds32.c: Likewise.
899 * elf32-ppc.c: Likewise.
900 * elf32-sh.c: Likewise.
901 * elf32-v850.c: Likewise.
902 * elf64-ppc.c: Likewise.
903 * elf64-x86-64.c: Likewise.
904 * elflink.c: Likewise.
905 * elfnn-aarch64.c: Likewise.
906 * elfxx-mips.c: Likewise.
909 * vms-alpha.c: Likewise.
910 * xcofflink.c: Likewise.
912 2017-07-18 Nick Clifton <nickc@redhat.com>
915 * coffcode.h (handle_COMDAT): Replace abort with an error message
918 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
921 * elf64-x86-64.c (elf_x86_64_relocate_section): Limit PIC check
924 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
926 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
928 2017-07-16 Alan Modra <amodra@gmail.com>
930 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimize
931 __tls_index GOT entries when using __tls_get_addr_opt stub.
932 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
934 2017-07-12 Alan Modra <amodra@gmail.com>
936 * po/es.po: Update from translationproject.org/latest/bfd/.
937 * po/fi.po: Likewise.
938 * po/fr.po: Likewise.
939 * po/id.po: Likewise.
940 * po/ja.po: Likewise.
941 * po/ro.po: Likewise.
942 * po/ru.po: Likewise.
943 * po/sr.po: Likewise.
944 * po/sv.po: Likewise.
945 * po/tr.po: Likewise.
946 * po/uk.po: Likewise.
947 * po/vi.po: Likewise.
948 * po/zh_CN.po: Likewise.
949 * po/hr.po: New file from translationproject.org.
950 * configure.ac (ALL_LINGUAS): Add hr. Sort.
951 * configure: Regenerate.
953 2017-07-12 Nick Clifton <nickc@redhat.com>
955 Fix compile time warnings using gcc 7.1.1.
956 * elf32-xtensa.c (elf_xtensa_get_plt_section): Increase length of
958 (elf_xtensa_get_gotplt_section): Increase length of got_name
960 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add a
961 default return of FALSE.
962 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc): Add a
963 default return of FALSE.
965 2017-07-12 Alan Modra <amodra@gmail.com>
967 * binary.c (binary_set_section_contents): Don't print filepos in
969 (coff_write_object_contents): Cast size_t for error message.
970 (coff_slurp_line_table): Don't use bfd_vma symndx.
971 (coff_slurp_reloc_table): Remove unneeded cast.
972 * dwarf2.c (read_section): Cast bfd_int64_t to long long for
974 (find_abstract_instance_name): Likewise.
975 * elf32-arm.c (arm_type_of_stub): Correct error arg order.
976 (bfd_elf32_arm_stm32l4xx_erratum_scan): Don't cast error arg.
977 (elf32_arm_check_relocs): Make r_symndx an int.
978 * elf32-cris.c (cris_elf_check_relocs): Delete extraneous %s in
980 * elf32-metag.c (elf_metag_relocate_section): Delete extra error
982 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Rewrite bogus
984 * elf32-i386.c (elf_i386_check_relocs): Make r_symndx an int.
985 * elf32-s390.c (elf_s390_check_relocs): Likewise.
986 * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
987 * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
988 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
989 * elf64-s390.c (elf_s390_check_relocs): Likewise.
990 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
991 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
992 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
993 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
994 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
995 * elf64-mmix.c (_bfd_mmix_after_linker_allocation): Cast size_t args
996 and use %lu for error message.
997 * elflink.c (elf_link_adjust_relocs): Delete extra error message arg.
998 * mmo.c (mmo_scan): Make stab_loc a file_ptr. Cast expression for
1001 * elf32-arm.c (elf32_arm_tls_relax): Correct format string and args
1003 (elf32_arm_final_link_relocate): Likewise.
1004 * coff-arm.c (bfd_arm_process_before_allocation): Likewise.
1005 * coffcode.h (styp_to_sec_flags): Likewise.
1006 * cofflink.c (_bfd_coff_write_global_sym): Likewise.
1007 * ecoff.c (_bfd_ecoff_slurp_symbol_table): Likewise.
1008 * elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise.
1009 * elf32-bfin.c (bfinfdpic_check_relocs): Likewise.
1010 (elf32_bfin_merge_private_bfd_data): Likewise.
1011 * elf32-cris.c (cris_elf_relocate_section): Likewise.
1012 * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
1013 * elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise.
1014 (i370_elf_relocate_section): Likewise.
1015 * elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise.
1016 * elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise.
1017 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
1018 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
1019 * elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise.
1020 * elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise.
1021 * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
1022 * elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise.
1023 (_bfd_mips_elf_merge_private_bfd_data): Likewise.
1024 * ieee.c (ieee_write_id, read_id): Likewise.
1025 * mach-o.c (bfd_mach_o_write_contents): Likewise.
1026 (bfd_mach_o_layout_commands, bfd_mach_o_read_section_32): Likewise.
1027 (bfd_mach_o_read_section_64, bfd_mach_o_read_symtab_symbol): Likewise.
1028 (bfd_mach_o_read_command, bfd_mach_o_header_p): Likewise.
1029 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Likewise.
1030 * stabs.c (_bfd_link_section_stabs): Likewise.
1032 * coff-arm.c (coff_arm_relocate_section): Use L modifier in error
1034 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
1035 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
1036 * coff-rs6000.c (xcoff_reloc_type_toc): Likewise.
1037 * coff-sh.c (sh_relax_section): Likewise.
1038 (sh_relax_delete_bytes, sh_swap_insns): Likewise.
1039 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
1040 * coffcode.h (coff_slurp_reloc_table): Likewise.
1041 * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
1042 (_bfd_coff_read_string_table): Likewise.
1043 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
1044 * compress.c (bfd_get_full_section_contents): Likewise.
1045 * dwarf2.c (read_formatted_entries, decode_line_info): Likewise.
1046 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
1047 * elf.c (bfd_elf_string_from_elf_section): Likewise.
1048 * elf32-arc.c (arc_special_overflow_checks): Likewise.
1049 * elf32-arm.c (elf32_arm_tls_relax): Likewise.
1050 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Likewise.
1051 (elf32_arm_write_section): Likewise.
1052 * elf32-bfin.c (bfin_relocate_section): Likewise.
1053 (bfinfdpic_relocate_section): Likewise.
1054 * elf32-hppa.c (hppa_build_one_stub): Likewise.
1055 (final_link_relocate, elf32_hppa_relocate_section): Likewise.
1056 * elf32-i386.c (elf_i386_tls_transition): Likewise.
1057 (elf_i386_relocate_section): Likewise.
1058 * elf32-ip2k.c (ip2k_final_link_relocate): Likewise.
1059 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
1060 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
1061 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1062 * elf32-metag.c (elf_metag_relocate_section): Likewise.
1063 * elf32-nds32.c (unrecognized_reloc_msg): Likewise.
1064 (nds32_elf_relax_longcall1, nds32_elf_relax_longcall2): Likewise.
1065 (nds32_elf_relax_longcall3, nds32_elf_relax_longjump1): Likewise.
1066 (nds32_elf_relax_longjump2, nds32_elf_relax_longjump3): Likewise.
1067 (nds32_elf_relax_longcall4, nds32_elf_relax_longcall5): Likewise.
1068 (nds32_elf_relax_longcall6, nds32_elf_relax_longjump4): Likewise.
1069 (nds32_elf_relax_longjump5, nds32_elf_relax_longjump6): Likewise.
1070 (nds32_elf_relax_longjump7, nds32_elf_relax_loadstore): Likewise.
1071 (nds32_elf_relax_ptr, nds32_elf_ex9_build_hash_table): Likewise.
1072 * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
1073 * elf32-rx.c (UNSAFE_FOR_PID): Likewise.
1074 * elf32-s390.c (invalid_tls_insn, elf_s390_relocate_section): Likewise.
1075 * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
1076 * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
1077 * elf32-sh.c (sh_elf_relax_section): Likewise.
1078 (sh_elf_relax_delete_bytes, sh_elf_swap_insns): Likewise.
1079 (sh_elf_relocate_section): Likewise.
1080 * elf32-sh64.c (shmedia_prepare_reloc): Likewise.
1081 * elf32-spu.c (spu_elf_relocate_section): Likewise.
1082 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
1083 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
1084 * elf32-v850.c (v850_elf_relax_section): Likewise.
1085 * elf32-vax.c (elf_vax_check_relocs): Likewise.
1086 (elf_vax_relocate_section): Likewise.
1087 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
1088 (extend_ebb_bounds_forward, extend_ebb_bounds_backward): Likewise.
1089 (compute_text_actions, compute_ebb_proposed_actions): Likewise.
1090 (do_fix_for_relocatable_link): Likewise.
1091 * elf64-alpha.c (elf64_alpha_relax_got_load): Likewise.
1092 (elf64_alpha_relax_with_lituse): Likewise.
1093 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Likewise.
1094 (elf_hppa_final_link_relocate): Likewise.
1095 * elf64-ia64-vms.c (elf64_ia64_relax_section): Likewise.
1096 (elf64_ia64_choose_gp, elf64_ia64_relocate_section): Likewise.
1097 (elf64_vms_link_add_object_symbols): Likewise.
1098 * elf64-mmix.c (mmix_elf_perform_relocation): Likewise.
1099 (mmix_final_link_relocate): Likewise.
1100 * elf64-s390.c (invalid_tls_insn): Likewise.
1101 (elf_s390_relocate_section): Likewise.
1102 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
1103 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
1104 (elf_x86_64_relocate_section): Likewise.
1105 * elfcode.h (elf_slurp_symbol_table): Likewise.
1106 * elfcore.h (elf_core_file_p): Likewise.
1107 * elflink.c (elf_link_read_relocs_from_section): Likewise.
1108 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
1109 (elfNN_aarch64_relocate_section): Likewise.
1110 * elfnn-ia64.c (elfNN_ia64_relax_section): Likewise.
1111 (elfNN_ia64_choose_gp, elfNN_ia64_relocate_section): Likewise.
1112 * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
1113 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
1114 (_bfd_mips_elf_relocate_section): Likewise.
1115 (_bfd_mips_elf_finish_dynamic_symbol, mips_finish_exec_plt): Likewise.
1116 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
1117 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
1118 * ieee.c (ieee_slurp_external_symbols): Likewise.
1119 * ihex.c (ihex_write_object_content): Likewise.
1120 * mach-o.c (bfd_mach_o_build_exec_seg_command): Likewise.
1121 * merge.c (_bfd_merged_section_offset): Likewise.
1122 * mmo.c (mmo_write_loc_chunk): Likewise.
1123 (mmo_write_object_contents): Likewise.
1124 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Likewise.
1125 * stabs.c (_bfd_link_section_stabs): Likewise.
1126 * xcofflink.c (xcoff_link_add_symbols, xcoff_find_tc0): Likewise.
1128 2017-07-11 Alan Modra <amodra@gmail.com>
1130 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo.
1132 2017-07-11 Alan Modra <amodra@gmail.com>
1134 * elf32-ppc.c (ppc_elf_relocate_section): Emit "unexpected
1135 instruction" error using _bfd_error_handler, not einfo.
1137 2017-07-10 Nick Clifton <nickc@redhat.com>
1139 * coffcode.h (coff_slurp_symbol_table): Do not include an entry
1140 for C_AIX_WEAKEXT if it has the same value as C_WEAKEXT.
1142 2017-07-07 John Baldwin <jhb@FreeBSD.org>
1144 * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PTLWPINFO.
1146 2017-07-07 Alan Modra <amodra@gmail.com>
1148 * coffcode.h (coff_slurp_symbol_table): Handle C_AIX_WEAKEXT.
1150 2017-07-07 Alan Modra <amodra@gmail.com>
1152 * bfd.c (_doprnt): Replace "L" with "ll" when printing bfd_vma
1153 as long long. Move code replacing "ll" with "I64", and simplify.
1155 2017-07-06 H.J. Lu <hongjiu.lu@intel.com>
1157 * bfd.c (_doprnt): Convert 'L' to 'l' when setting wide_width
1160 2017-07-05 H.J. Lu <hongjiu.lu@intel.com>
1162 * dwarf2.c (line_info_add_include_dir_stub): Replace time with
1164 (line_info_add_file_name): Likewise.
1165 (decode_line_info): Likewise.
1167 2017-07-04 Tristan Gingold <gingold@adacore.com>
1169 * version.m4: Bump version to 2.29.51
1170 * configure: Regenerate.
1172 2017-07-04 Jiong Wang <jiong.wang@arm.com>
1174 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Remove the
1175 sanity check at the head of this function.
1177 2017-07-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1179 * dwarf2.c (struct dwarf2_debug): Add fields dwarf_line_str_buffer and
1180 dwarf_line_str_size.
1181 (struct attr_abbrev): Add field implicit_const.
1182 (dwarf_debug_sections): Add .debug_line_str.
1183 (enum dwarf_debug_section_enum): Add debug_line_str and debug_max.
1184 (dwarf_debug_section_assert): Add static assertion.
1185 (read_indirect_line_string): New.
1186 (read_abbrevs): Support DW_FORM_implicit_const.
1187 (is_str_attr): Support DW_FORM_line_strp.
1188 (read_attribute_value): Support DW_FORM_line_strp and
1189 DW_FORM_implicit_const.
1190 (read_attribute): Support DW_FORM_implicit_const.
1191 (line_info_add_include_dir, line_info_add_include_dir_stub):
1192 (line_info_add_file_name, read_formatted_entries): New.
1193 (decode_line_info, parse_comp_unit): Support DWARF 5.
1194 (_bfd_dwarf2_cleanup_debug_info): Free dwarf_line_str_buffer.
1196 2017-07-03 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
1198 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove the
1199 abort statement that was put for symbols that are not dynamic.
1201 2017-07-03 Tristan Gingold <gingold@adacore.com>
1203 * po/bfd.pot: Regenerate
1205 2017-07-03 Alan Modra <amodra@gmail.com>
1207 * bfd.c (_doprnt): Rewrite "ll" and "L" modifiers to "I64" for
1208 __MSVCRT__. Support "L" modifier for bfd_vma. Formatting.
1209 * elf.c (setup_group): Use "Lx" to print sh_size.
1210 (_bfd_elf_setup_sections): Remove unnecessary cast and print
1211 unknown section type in hex.
1212 (copy_special_section_fields): Style fix.
1213 (bfd_section_from_shdr): Correct format for sh_link. Use a
1214 common error message for all the variants of unrecognized
1216 (assign_file_positions_for_load_sections): Use "Lx" for lma
1217 adjust error message.
1218 (assign_file_positions_for_non_load_sections): Formatting.
1219 (rewrite_elf_program_header): Formatting. Use "Lx" for
1220 bfd_vma values in error messages.
1221 * elfcode.h (elf_slurp_reloc_table_from_section): Cast
1222 ELF_R_SYM value to type expected by format.
1223 * elflink.c (elf_link_read_relocs_from_section): Use "Lx"
1225 (elf_link_add_object_symbols): Use "Lu" for symbol sizes.
1226 (elf_link_input_bfd): Use "Lx" for r_info.
1227 (bfd_elf_gc_record_vtinherit): Use "Lx" for offset.
1229 2017-07-03 Alan Modra <amodra@gmail.com>
1231 * bfd.c (bfd_scan_vma): Don't use long long unless HAVE_LONG_LONG.
1232 * coff-rs6000.c (FMT20): Handle hosts with 64-bit long and
1233 Microsoft C library variant of long long format specifier.
1234 (PRINT20): Cast value to bfd_uint64_t not long long.
1235 * coffcode.h (coff_print_aux): Use BFD_VMA_FMT.
1236 * coff-x86_64.c (coff_amd64_reloc): Use bfd_uint64_t rather than
1237 long long. Don't cast to bfd_vma.
1238 * elf32-score.c (score3_bfd_getl48): Likewise.
1239 * vms-alpha.c (_bfd_vms_slurp_eisd): Likewise.
1241 2017-07-03 Alan Modra <amodra@gmail.com>
1243 * elf.c (_bfd_elf_print_private_bfd_data): Use BFD_VMA_FMT to
1245 (bfd_elf_print_symbol): Don't cast symbol->flags.
1246 (_bfd_elf_symbol_from_bfd_symbol): Likewise.
1247 * elf32-ppc.c (ppc_elf_begin_write_processing): Correct
1248 _bfd_error_handler argument order.
1249 (ppc_elf_merge_private_bfd_data): Don't cast flags.
1251 2017-07-03 Alan Modra <amodra@gmail.com>
1253 * configure.ac: Invoke AC_CHECK_TYPES for long long. Invoke
1254 AC_TYPE_LONG_DOUBLE.
1255 * configure: Regenerate.
1256 * config.in: Regenerate.
1258 2017-06-29 Andrew Waterman <andrew@sifive.com>
1260 * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Fix TLS copy
1263 2017-06-29 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
1265 * elfxx-sparc.c (allocate_dynrelocs): Don't make a symbol dynamic
1266 unless it is undefined weak.
1267 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Set the flag
1268 relative_reloc to direct non-dynamic symbols to R_SPARC_RELATIVE
1270 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): If symbol
1271 is not dynamic in PIC, abort.
1273 2017-06-29 Jiong Wang <jiong.wang@arm.com>
1276 * elfnn-aarch64.c (elfNN_aarch64_allocate_dynrelocs): Only make
1277 undefined weak symbols into dynamic.
1278 (elfNN_aarch64_final_link_relocate): Generate runtime RELATIVE
1279 relocation for non-dynamic symbols.
1280 (elfNN_aarch64_finish_dynamic_symbol): Add sanity check.
1282 2017-06-29 Jiong Wang <jiong.wang@arm.com>
1284 * elfnn-aarch64.c (aarch64_relocation_aginst_gp_p): New function.
1285 (elfNN_aarch64_final_link_relocate): Delete duplicated code for
1286 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15, BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
1287 BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
1288 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Optimize the
1291 2017-06-29 Andreas Arnez <arnez@linux.vnet.ibm.com>
1293 * elf-bfd.h (elfcore_write_s390_gs_cb): Add prototype.
1294 (elfcore_write_s390_gs_bc): Likewise.
1295 * elf.c (elfcore_grok_s390_gs_cb): New function.
1296 (elfcore_grok_s390_gs_bc): New function.
1297 (elfcore_grok_note): Call them.
1298 (elfcore_write_s390_gs_cb): New function.
1299 (elfcore_write_s390_gs_bc): New function.
1300 (elfcore_write_register_note): Call them.
1302 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
1304 * libbfd.c (_bfd_generic_get_section_contents): Don't call
1305 bfd_get_file_size. Check archive element size.
1306 (_bfd_generic_get_section_contents_in_window): Likewise.
1308 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
1310 * bfd-in2.h: Regenerated.
1311 * bfdio.c (bfd_get_size): Change return type to ufile_ptr.
1312 (bfd_get_file_size): Likewise.
1314 2017-06-28 Maciej W. Rozycki <macro@imgtec.com>
1315 Matthew Fortune <matthew.fortune@imgtec.com>
1317 * archures.c (bfd_mach_mips_interaptiv_mr2): New macro.
1318 * cpu-mips.c (I_interaptiv_mr2): New enum value.
1319 (arch_info_struct): Add "mips:interaptiv-mr2" entry.
1320 * elfxx-mips.c (_bfd_elf_mips_mach) <E_MIPS_MACH_IAMR2>: New
1322 (mips_set_isa_flags) <bfd_mach_mips_interaptiv_mr2>: Likewise.
1323 (bfd_mips_isa_ext) <bfd_mach_mips_interaptiv_mr2>: Likewise.
1324 (print_mips_isa_ext) <AFL_EXT_INTERAPTIV_MR2>: Likewise.
1325 (mips_mach_extensions): Add `bfd_mach_mipsisa32r3' and
1326 `bfd_mach_mips_interaptiv_mr2' entries.
1327 * bfd-in2.h: Regenerate.
1329 2017-06-27 Nick Clifton <nickc@redhat.com>
1331 * tekhex.c (pass_over): Revert accidental conversion of a local
1332 array to a static array.
1334 2017-06-27 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
1337 * elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Adjust
1338 reloc addend if necessary. Adjust diff only if
1339 shrinked_insn_address < end_address.
1341 2017-06-27 Alan Modra <amodra@gmail.com>
1344 * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
1345 (_bfd_generic_get_section_contents_in_window): Likewise.
1347 2017-06-26 Kuan-Lin Chen <rufus@andestech.com>
1349 * elfnn-riscv.c (perform_relocation): Support the new
1350 R_RISCV_32_PCREL relocation.
1351 (riscv_elf_relocate_section): Likewise.
1352 * elfxx-riscv.c (howto_table): Likewise.
1353 (riscv_reloc_map): Likewise.
1354 * bfd-in2.h (BFD_RELOC_RISCV_32_PCREL): New relocation.
1355 * libbfd.h: Regenerate.
1357 2017-06-27 Alan Modra <amodra@gmail.com>
1360 * libbfd.c (_bfd_generic_get_section_contents): Delete abort.
1361 Use unsigned file pointer type, and remove cast.
1362 * libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise.
1363 Add "count", not "sz".
1365 2017-06-26 Pedro Alves <palves@redhat.com>
1368 * libbfd.c (_bfd_generic_get_section_contents): Add "count", not
1371 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
1374 * libbfd.c (_bfd_generic_get_section_contents_in_window): Add
1377 2017-06-26 Maciej W. Rozycki <macro@imgtec.com>
1379 * cpu-mips.c (arch_info_struct): Mark the 4010 32-bit.
1380 * elfxx-mips.c (mips_set_isa_flags) <bfd_mach_mips4010>: Set
1381 E_MIPS_ARCH_2 rather than E_MIPS_ARCH_3 in `e_flags'.
1382 (mips_mach_extensions): Mark `bfd_mach_mips4010' as extending
1383 `bfd_mach_mips6000' rather than `bfd_mach_mips4000'.
1385 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
1388 * compress.c (bfd_get_full_section_contents): Don't check the
1390 * libbfd.c (_bfd_generic_get_section_contents): Check for and
1391 reject a section whose size + offset is greater than the size
1393 (_bfd_generic_get_section_contents_in_window): Likewise.
1395 2017-06-26 Nick Clifton <nickc@redhat.com>
1398 * tekhex.c (getvalue): Check for the source pointer exceeding the
1399 end pointer before the first byte is read.
1401 2017-06-26 Nick Clifton <nickc@redhat.com>
1404 * opncls.c (get_build_id): Check that the section is big enough
1405 to contain the whole note.
1406 * compress.c (bfd_get_full_section_contents): Check for and reject
1407 a section whose size is greater than the size of the entire file.
1408 * elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not
1409 contain a notes section.
1411 2017-06-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1413 * elf64-s390.c (elf_s390_additional_program_headers): Add NULL
1415 (elf_s390_modify_segment_map): Likewise.
1416 (bfd_elf_s390_set_options): Lisewise.
1418 2017-06-26 Alan Modra <amodra@gmail.com>
1420 * elflink.c (_bfd_elf_link_create_dynstrtab): Don't make dynobj
1422 (_bfd_elf_size_group_sections): Skip --just-syms bfds.
1423 (bfd_elf_size_dynamic_sections): Ignore .note.GNU-stack and
1424 .preinit_array on --just-syms bfds.
1425 (_bfd_elf_gc_mark_extra_sections): Skip --just-syms bfds.
1426 (elf_gc_sweep, bfd_elf_parse_eh_frame_entries): Likewise.
1427 (bfd_elf_gc_sections, bfd_elf_discard_info): Likewise.
1429 2017-06-25 Sergei Trofimovich <slyfox@gentoo.org>
1431 * elf.c (find_link): Bounds check "hint".
1433 2017-06-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
1435 * elf32-arm.c (using_thumb_only): Update list of architectures in
1436 BFD_ASSERT for which the logic is valid.
1437 (using_thumb2_bl): Likewise.
1438 (using_thumb2): Likewise and return true for ARMv8-R.
1439 (arch_has_arm_nop): Likewise.
1440 (tag_cpu_arch_combine): New v8r table for ARMv8-R Tag_CPU_arch
1441 merging logic. Update commentis for value 15 of v8m_baseline,
1442 v8m_mainline and v4t_plus_v6_m arrays. Use v8r array to decide
1443 merging of value 15 of Tag_CPU_arch.
1445 2017-06-23 Jiong Wang <jiong.wang@arm.com>
1447 * reloc.c (BFD_RELOC_AARCH64_ADR_GOTPAGE): Rename to
1448 BFD_RELOC_AARCH64_ADR_GOT_PAGE
1449 * bfd-in2.h: Regenerate.
1451 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1453 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Move
1454 the error_alignment label forward. Properly align program
1455 property note section.
1457 2017-06-22 Eric Christopher <echristo@gmail.com>
1459 * elf32-arm.c (elf32_arm_final_link_relocate): Use labs rather than
1460 abs to fix a truncation warning.
1462 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1464 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Resolve
1465 local undefined weak symbol to 0.
1466 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Likewise.
1468 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1470 * elf32-i386.c (elf_i386_merge_gnu_properties): If info->shstk
1471 is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
1472 (elf_i386_link_setup_gnu_properties): If info->shstk is set,
1473 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
1474 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): If
1475 info->shstk is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
1476 (elf_x86_64_link_setup_gnu_properties): If info->shstk is set,
1477 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
1479 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1481 * elf32-i386.c (elf_i386_lazy_ibt_plt0_entry): New.
1482 (elf_i386_lazy_ibt_plt_entry): Likewise.
1483 (elf_i386_pic_lazy_ibt_plt0_entry): Likewise.
1484 (elf_i386_non_lazy_ibt_plt_entry): Likewise.
1485 (elf_i386_pic_non_lazy_ibt_plt_entry): Likewise.
1486 (elf_i386_eh_frame_lazy_ibt_plt): Likewise.
1487 (elf_i386_lazy_plt_layout): Likewise.
1488 (elf_i386_non_lazy_plt_layout): Likewise.
1489 (elf_i386_link_hash_entry): Add plt_second.
1490 (elf_i386_link_hash_table): Add plt_second and
1491 plt_second_eh_frame.
1492 (elf_i386_allocate_dynrelocs): Use the second PLT if needed.
1493 (elf_i386_size_dynamic_sections): Use .plt.got unwind info for
1494 the second PLT. Check the second PLT.
1495 (elf_i386_relocate_section): Use the second PLT to resolve
1496 PLT reference if needed.
1497 (elf_i386_finish_dynamic_symbol): Fill and use the second PLT if
1499 (elf_i386_finish_dynamic_sections): Set sh_entsize on the
1500 second PLT. Generate unwind info for the second PLT.
1501 (elf_i386_plt_type): Add plt_second.
1502 (elf_i386_get_synthetic_symtab): Support the second PLT.
1503 (elf_i386_parse_gnu_properties): Support
1504 GNU_PROPERTY_X86_FEATURE_1_AND.
1505 (elf_i386_merge_gnu_properties): Support
1506 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
1507 on GNU_PROPERTY_X86_FEATURE_1_IBT
1508 (elf_i386_link_setup_gnu_properties): If info->ibt is set,
1509 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
1510 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
1511 is set on all relocatable inputs.
1512 * elf64-x86-64.c (elf_x86_64_lazy_ibt_plt_entry): New.
1513 (elf_x32_lazy_ibt_plt_entry): Likewise.
1514 (elf_x86_64_non_lazy_ibt_plt_entry): Likewise.
1515 (elf_x32_non_lazy_ibt_plt_entry): Likewise.
1516 (elf_x86_64_eh_frame_lazy_ibt_plt): Likewise.
1517 (elf_x32_eh_frame_lazy_ibt_plt): Likewise.
1518 (elf_x86_64_lazy_ibt_plt): Likewise.
1519 (elf_x32_lazy_ibt_plt): Likewise.
1520 (elf_x86_64_non_lazy_ibt_plt): Likewise.
1521 (elf_x32_non_lazy_ibt_plt): Likewise.
1522 (elf_x86_64_get_synthetic_symtab): Support the second PLT.
1523 (elf_x86_64_parse_gnu_properties): Support
1524 GNU_PROPERTY_X86_FEATURE_1_AND.
1525 (elf_x86_64_merge_gnu_properties): Support
1526 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
1527 on GNU_PROPERTY_X86_FEATURE_1_IBT
1528 (elf_x86_64_link_setup_gnu_properties): If info->ibt is set,
1529 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
1530 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
1531 is set on all relocatable inputs.
1533 2017-06-22 Nick Clifton <nickc@redhat.com>
1536 * som.c (setup_sections): NUL terminate the space_strings buffer.
1537 Check that the space.name field does not index beyond the end of
1538 the space_strings buffer.
1540 2017-06-21 Nick Clifton <nickc@redhat.com>
1543 * coff-sh.c (sh_reloc): Check for an out of range reloc.
1545 2017-06-21 Nick Clifton <nickc@redhat.com>
1548 * vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as
1549 type of the size parameter.
1550 (_bfd_vms_save_counted_string): Add second parameter - the maximum
1551 length of the counted string.
1552 * vms.h (_bfd_vms_save_sized_string): Update prototype.
1553 (_bfd_vms_save_counted_string): Likewise.
1554 * vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to
1555 _bfd_vms_save_counted_string.
1556 (_bfd_vms_slurp_ehdr): Likewise.
1557 (_bfd_vms_slurp_egsd): Likewise.
1558 (Parse_module): Likewise.
1560 2017-06-21 Alan Modra <amodra@gmail.com>
1562 * elf64-ppc.c (ppc64_elf_size_stubs): Test for localentry:0 plt
1563 calls before tocsave calls.
1564 (ppc64_elf_relocate_section): Allow localentry:0 plt calls without
1567 2017-06-21 Nick Clifton <nickc@redhat.com>
1570 * reloc.c (bfd_generic_get_relocated_section_contents): Fail if
1571 bfd_get_full_section_contents returns no contents.
1573 2017-06-21 Nick Clifton <nickc@redhat.com>
1576 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized
1579 2017-06-21 Nick Clifton <nickc@redhat.com>
1582 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section
1584 (image_set_ptr): Likewise.
1585 (alpha_vms_fix_sec_rel): Likewise.
1586 (alpha_vms_slurp_relocs): Likewise.
1588 2017-06-21 Nick Clifton <nickc@redhat.com>
1591 * ieee.c (ieee_slurp_sections): Check for a NULL return from
1593 (ieee_archive_p): Likewise.
1594 (ieee_object_p): Likewise.
1596 2017-06-21 Nick Clifton <nickc@redhat.com>
1599 * elf.c (setup_group): Zero the group section pointer list after
1600 allocation so that loops can be caught. Check for NULL pointers
1601 when processing a group list.
1603 2017-06-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1605 * elf-s390.h: New file.
1606 * elf64-s390.c (struct elf_s390_link_hash_table): Add params
1608 (elf_s390_additional_program_headers): New function.
1609 (elf_s390_modify_segment_map): New function.
1610 (bfd_elf_s390_set_options): New function.
1611 (elf_backend_additional_program_headers)
1612 (elf_backend_modify_segment_map): Add macro definitions.
1614 2017-06-19 H.J. Lu <hongjiu.lu@intel.com>
1617 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
1618 the DYNAMIC bit instead of bfd_count_sections.
1620 2017-06-19 Nick Clifton <nickc@redhat.com>
1623 * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record
1625 (evax_bfd_print_eeom): Likewise.
1626 (evax_bfd_print_egsd): Check for an overlarge record length.
1627 (evax_bfd_print_etir): Likewise.
1629 2017-06-19 Nick Clifton <nickc@redhat.com>
1632 * libieee.h (struct common_header_type): Add end_p field.
1633 * ieee.c (this_byte_and_next): Do not advance input_p beyond
1635 (read_id): Check for a length that exceeds the remaining bytes in
1637 (ieee_seek): Initialise end_p.
1638 (ieee_archive_p): Likewise.
1639 (ieee_object_p): Likewise.
1641 2017-06-19 Nick Clifton <nickc@redhat.com>
1644 * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset
1645 before reading the EIHS structure entries.
1647 2017-06-19 Nick Clifton <nickc@redhat.com>
1650 * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for
1651 gsd_size. Check that there are enough bytes remaining to read the
1652 type and size of the next egsd. Check that the size of the egsd
1653 does not exceed the size of the record.
1655 2017-06-19 Alan Modra <amodra@gmail.com>
1657 * config.bfd: Correct targ_underscore for cris.
1659 2017-06-18 Alan Modra <amodra@gmail.com>
1661 * config.bfd: Correct targ_underscore for epiphany, ip2k,
1662 m32c, mn10200, pru, rl78, rx, crisv32 and v850.
1664 2017-06-16 Nick Clifton <nickc@redhat.com>
1666 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
1667 bucketlist is empty because there are no symbols to add to the
1670 2017-06-16 Alan Modra <amodra@gmail.com>
1676 * targets.c (struct bfd_target): Add _bfd_define_start_stop.
1677 (BFD_JUMP_TABLE_LINK): Likewise.
1678 * elf-bfd.h (bfd_elf_define_start_stop): Declare.
1679 * elflink.c (_bfd_elf_gc_mark_rsec): Update comment.
1680 (bfd_elf_define_start_stop): New function.
1681 * linker.c (bfd_generic_define_start_stop): New function.
1682 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init
1684 * aout-adobe.c (aout_32_bfd_define_start_stop): Define.
1685 * aout-target.h (MY_bfd_define_start_stop): Define.
1686 * aout-tic30.c (MY_bfd_define_start_stop): Define.
1687 * binary.c (binary_bfd_define_start_stop): Define.
1688 * bout.c (b_out_bfd_define_start_stop): Define.
1689 * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define.
1690 * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define.
1691 * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define.
1692 * coffcode.h (coff_bfd_define_start_stop): Define.
1693 * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define.
1694 * i386msdos.c (msdos_bfd_define_start_stop): Define.
1695 * i386os9k.c (os9k_bfd_define_start_stop): Define.
1696 * ieee.c (ieee_bfd_define_start_stop): Define.
1697 * ihex.c (ihex_bfd_define_start_stop): Define.
1698 * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define.
1699 * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define.
1700 * mmo.c (mmo_bfd_define_start_stop): Define.
1701 * nlm-target.h (nlm_bfd_define_start_stop): Define.
1702 * oasys.c (oasys_bfd_define_start_stop): Define.
1703 * pef.c (bfd_pef_bfd_define_start_stop): Define.
1704 * plugin.c (bfd_plugin_bfd_define_start_stop): Define.
1705 * ppcboot.c (ppcboot_bfd_define_start_stop): Define.
1706 * som.c (som_bfd_define_start_stop): Define.
1707 * srec.c (srec_bfd_define_start_stop): Define.
1708 * tekhex.c (tekhex_bfd_define_start_stop): Define.
1709 * versados.c (versados_bfd_define_start_stop): Define.
1710 * vms-alpha.c (vms_bfd_define_start_stop): Define.
1711 (alpha_vms_bfd_define_start_stop): Define.
1712 * xsym.c (bfd_sym_bfd_define_start_stop): Define.
1713 * bfd-in2.h: Regenerate.
1714 * libbfd.h: Regenerate.
1716 2017-06-16 Jiong Wang <jiong.wang@arm.com>
1718 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
1719 SYMBOL_REFERENCES_LOCAL.
1721 2017-06-15 Jiong Wang <jiong.wang@arm.com>
1724 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
1725 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
1726 runtime for if there needs copy relocation elimination.
1727 (need_copy_relocation_p): New function. Return true for symbol with
1728 pc-relative references and if it's against read-only sections.
1729 (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
1730 (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
1731 that are related with accessing external objects.
1732 (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change
1733 in elfNN_aarch64_check_relocs.
1735 2017-06-15 Nick Clifton <nickc@redhat.com>
1738 * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
1741 (ieee_archive_p): Likewise.
1743 2017-06-15 Nick Clifton <nickc@redhat.com>
1746 * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
1748 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
1750 * elf32-xtensa.c (elf_xtensa_be_plt_entry,
1751 elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays,
1752 keep both windowed and call0 ABI PLT definitions.
1753 (elf_xtensa_create_plt_entry): Use selected ABI to choose upper
1754 elf_xtensa_*_plt_entry endex.
1755 (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size.
1757 2017-06-14 Nick Clifton <nickc@redhat.com>
1760 * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
1763 2017-06-14 Nick Clifton <nickc@redhat.com>
1766 * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
1767 maximum value for the ascic pointer. Check that name processing
1768 does not read beyond this value.
1769 (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
1772 2017-06-14 Nick Clifton <nickc@redhat.com>
1775 * versados.c (versados_mkobject): Zero the allocated tdata structure.
1776 (process_otr): Check for an invalid offset in the otr structure.
1778 2017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
1780 * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
1782 2017-06-13 H.J. Lu <hongjiu.lu@intel.com>
1788 * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
1789 vtable field to a union.
1790 (_bfd_elf_is_start_stop): Removed.
1791 * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
1792 __start_SECNAME and __stop_SECNAME symbols.
1793 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
1794 * elflink.c (_bfd_elf_is_start_stop): Removed.
1795 (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
1796 _bfd_elf_is_start_stop.
1797 (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
1798 __stop_SECNAME symbols. Updated.
1799 (elf_gc_smash_unused_vtentry_relocs): Likewise.
1800 (bfd_elf_gc_record_vtinherit): Likewise.
1801 (bfd_elf_gc_record_vtentry): Likewise.
1803 2017-06-13 Nick Clifton <nickc@redhat.com>
1806 * elflink.c (elf_link_adjust_relocs): Generate an error when
1807 encountering a reloc against a symbol removed by garbage
1810 2017-06-12 H.J. Lu <hongjiu.lu@intel.com>
1812 * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
1813 to merge_gnu_properties.
1814 * elf-properties.c (elf_merge_gnu_properties): Add struct
1815 bfd_link_info * and pass it to merge_gnu_properties.
1816 (elf_merge_gnu_property_list): Add struct bfd_link_info *
1817 and pass it to elf_merge_gnu_properties.
1818 (_bfd_elf_link_setup_gnu_properties): Pass info to
1819 elf_merge_gnu_property_list.
1820 * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
1822 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
1824 2017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
1827 * binary.c (binary_set_section_contents): Scale lma by octets
1828 per byte to set filepos.
1830 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1832 * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
1835 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1837 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
1840 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1842 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
1843 patched section contents for TLS IE reloc.
1844 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
1846 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1848 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
1849 RELOC_FOR_GLOBAL_SYMBOL macro.
1851 2018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1853 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
1856 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1858 * config/tc-arc.c (md_undefined_symbol): Changed.
1859 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
1861 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1863 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
1866 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1868 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
1869 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
1871 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1873 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
1876 2017-06-08 Richard Earnshaw <rearnsha@arm.com>
1878 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
1879 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
1880 is non-zero. Add clarifying comments.
1882 2017-06-08 H.J. Lu <hongjiu.lu@intel.com>
1884 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
1885 name. Use local IFUNC symbol name string to report unsupported
1886 non-PIC call to IFUNC function.
1887 (elf_i386_relocate_section): Dump local IFUNC name with minfo
1888 when generating R_386_IRELATIVE relocation.
1889 (elf_i386_finish_dynamic_symbol): Likewise.
1890 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
1892 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
1893 when generating R_X86_64_IRELATIVE relocation.
1894 (elf_x86_64_finish_dynamic_symbol): Likewise.
1896 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
1898 * elf.c (setup_group): Make sure BFD sections are created for all
1899 group sections in the input file when processing SHF_GROUP
1901 (bfd_section_from_shdr): Avoid duplicating logic already
1902 implemented in `setup_group'.
1904 2017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
1907 * peXXigen.c (pe_print_idata): Use the address of the first thunk
1908 if the hint address is zero.
1910 2017-06-06 James Clarke <jrtc27@jrtc27.com>
1913 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
1914 ELF_COMMON_DEF_P for common symbols.
1916 2017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
1918 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
1919 SEC_GROUP sections as SEC_EXCLUDE.
1920 (bfd_elf_set_group_contents): Replace use of abort with an assert.
1921 (assign_section_numbers): Use resolve_section_groups flag instead
1922 of relocatable link type.
1923 (_bfd_elf_init_private_section_data): Use resolve_section_groups
1924 flag instead of checking the final_link flag for part of the
1925 checks in here. Fix white space as a result.
1926 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
1927 instead of relocatable link type.
1928 (bfd_elf_final_link): Likewise.
1930 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
1932 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
1934 * elf32-score.c (score_elf_final_link_relocate): Likewise.
1935 (s3_bfd_score_elf_check_relocs): Likewise.
1936 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
1937 (score_elf_final_link_relocate): Likewise.
1938 (s7_bfd_score_elf_check_relocs): Likewise.
1940 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
1942 * elflink.c (init_reloc_cookie_rels): Remove unused variable
1945 2017-06-06 Maciej W. Rozycki <macro@imgtec.com>
1947 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
1948 from `reloc_count' rather than decrementing it.
1949 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
1950 `reloc_count' by `int_rels_per_ext_rel'.
1951 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
1952 `reloc_count' by `int_rels_per_ext_rel' for last relocation
1953 entry determination.
1954 (s3_bfd_score_elf_check_relocs): Likewise.
1955 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
1956 (s7_bfd_score_elf_relocate_section): Likewise.
1957 (s7_bfd_score_elf_check_relocs): Likewise.
1958 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
1959 prototype and function.
1960 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
1961 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
1962 triple rather than once the sum of REL and RELA relocation entry
1964 (bfd_elf64_get_reloc_upper_bound): Remove macro.
1965 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
1966 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
1967 storage allocation size determination.
1968 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
1969 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
1970 by `int_rels_per_ext_rel' for last relocation entry
1972 (bfd_elf_final_link): Do not multiply `reloc_count' by
1973 `int_rels_per_ext_rel' for internal relocation storage
1974 allocation size determination.
1975 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
1976 `int_rels_per_ext_rel' for last relocation entry determination.
1977 (elf_gc_smash_unused_vtentry_relocs): Likewise.
1978 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
1979 (_bfd_mips_elf_relocate_section): Likewise.
1981 2017-06-05 Alan Modra <amodra@gmail.com>
1984 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
1986 2017-06-01 John Baldwin <jhb@FreeBSD.org>
1988 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
1989 determine structure sizes.
1990 (elfcore_grok_freebsd_prstatus): Likewise.
1992 2017-06-01 Alan Modra <amodra@gmail.com>
1994 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
1995 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
1997 (is_elfv2_localentry0): New function.
1998 (ppc64_elf_tls_setup): Default params->plt_localentry0.
1999 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
2000 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
2001 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
2002 optimized localentry:0 stubs.
2003 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
2004 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
2006 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
2008 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
2010 2017-05-30 Casey Smith <clegg89@gmail.com>
2013 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
2014 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
2016 2017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
2018 * cpu-arc.c (arc_compatible): New function.
2020 2017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
2022 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
2024 2017-05-30 H.J. Lu <hongjiu.lu@intel.com>
2027 * bfdio.c (bfd_get_file_size): New function.
2028 * bfd-in2.h: Regenerated.
2030 2017-05-23 Dilian Palauzov <git-dpa@aegee.org>
2032 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
2035 2017-05-22 H.J. Lu <hongjiu.lu@intel.com>
2037 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
2038 dynobj instead of htab->elf.dynobj.
2040 2017-05-19 Maciej W. Rozycki <macro@imgtec.com>
2042 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
2044 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
2045 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
2046 actual number of internal relocations retrieved. Adjust
2047 function description.
2048 (bfd_elf64_canonicalize_reloc): Remove macro.
2049 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
2051 2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
2053 * archures.c (bfd_mach_sparc_v9m8): Define.
2054 (bfd_mach_sparc_v8plusm8): Likewise.
2055 (bfd_mach_sparc_v9_p): Adjust to M8.
2056 (bfd_mach_sparc_64bit_p): Likewise.
2057 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
2058 bfd_mach_sparc_v8plusm8.
2059 * bfd-in2.h: Regenerated.
2060 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
2062 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
2063 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
2064 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
2066 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
2067 bfd_mach_sparc_v8plusm8.
2069 2017-05-19 Alan Modra <amodra@gmail.com>
2071 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
2072 debug and special sections when no non-note alloc sections in an
2075 2017-05-18 Alan Modra <amodra@gmail.com>
2077 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
2078 * elf-m10300.c: Likewise.
2080 * elf32-arc.c: Likewise.
2081 * elf32-bfin.c: Likewise.
2082 * elf32-m68k.c: Likewise.
2083 * elf32-nds32.c: Likewise.
2084 * elf32-tilepro.c: Likewise.
2085 * elflink.c: Likewise.
2086 * elfnn-aarch64.c: Likewise.
2087 * elfnn-riscv.c: Likewise.
2088 * elfxx-tilegx.c: Likewise.
2089 * mach-o.c: Likewise.
2090 * peXXigen.c: Likewise.
2091 * vms-alpha.c: Likewise.
2092 * vms-lib.c: Likewise.
2094 2017-05-17 H.J. Lu <hongjiu.lu@intel.com>
2097 * elflink.c (elf_gc_mark_debug_section): New function.
2098 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
2099 referenced by kept debug sections.
2101 2017-05-16 Alan Modra <amodra@gmail.com>
2103 * elf-m10300.c: Rename occurrences of non_ir_ref.
2104 * elf32-arm.c: Likewise.
2105 * elf32-bfin.c: Likewise.
2106 * elf32-cr16.c: Likewise.
2107 * elf32-cris.c: Likewise.
2108 * elf32-d10v.c: Likewise.
2109 * elf32-dlx.c: Likewise.
2110 * elf32-fr30.c: Likewise.
2111 * elf32-frv.c: Likewise.
2112 * elf32-hppa.c: Likewise.
2113 * elf32-i370.c: Likewise.
2114 * elf32-i386.c: Likewise.
2115 * elf32-iq2000.c: Likewise.
2116 * elf32-lm32.c: Likewise.
2117 * elf32-m32c.c: Likewise.
2118 * elf32-m32r.c: Likewise.
2119 * elf32-m68hc1x.c: Likewise.
2120 * elf32-m68k.c: Likewise.
2121 * elf32-mcore.c: Likewise.
2122 * elf32-metag.c: Likewise.
2123 * elf32-microblaze.c: Likewise.
2124 * elf32-moxie.c: Likewise.
2125 * elf32-msp430.c: Likewise.
2126 * elf32-mt.c: Likewise.
2127 * elf32-nios2.c: Likewise.
2128 * elf32-or1k.c: Likewise.
2129 * elf32-ppc.c: Likewise.
2130 * elf32-rl78.c: Likewise.
2131 * elf32-s390.c: Likewise.
2132 * elf32-score.c: Likewise.
2133 * elf32-score7.c: Likewise.
2134 * elf32-sh.c: Likewise.
2135 * elf32-tic6x.c: Likewise.
2136 * elf32-tilepro.c: Likewise.
2137 * elf32-v850.c: Likewise.
2138 * elf32-vax.c: Likewise.
2139 * elf32-xstormy16.c: Likewise.
2140 * elf32-xtensa.c: Likewise.
2141 * elf64-alpha.c: Likewise.
2142 * elf64-hppa.c: Likewise.
2143 * elf64-ia64-vms.c: Likewise.
2144 * elf64-mmix.c: Likewise.
2145 * elf64-ppc.c: Likewise.
2146 * elf64-s390.c: Likewise.
2147 * elf64-sh64.c: Likewise.
2148 * elf64-x86-64.c: Likewise.
2149 * elflink.c: Likewise.
2150 * elfnn-aarch64.c: Likewise.
2151 * elfnn-ia64.c: Likewise.
2152 * elfnn-riscv.c: Likewise.
2153 * elfxx-mips.c: Likewise.
2154 * elfxx-sparc.c: Likewise.
2155 * elfxx-tilegx.c: Likewise.
2156 * linker.c: Likewise.
2158 2017-05-16 Alan Modra <amodra@gmail.com>
2160 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
2161 * elflink.c (elf_link_add_object_symbols): Update to use
2163 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
2165 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
2167 2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
2169 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
2171 2017-05-12 H.J. Lu <hongjiu.lu@intel.com>
2173 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
2174 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
2176 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
2178 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
2180 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
2182 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
2183 to plt_second/plt_second_eh_frame.
2184 (elf_x86_64_link_hash_newfunc): Updated.
2185 (elf_x86_64_allocate_dynrelocs): Likewise.
2186 (elf_x86_64_size_dynamic_sections): Likewise.
2187 (elf_x86_64_relocate_section): Likewise.
2188 (elf_x86_64_finish_dynamic_symbol): Likewise.
2189 (elf_x86_64_finish_dynamic_sections): Likewise.
2190 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
2191 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
2193 (elf_backend_setup_gnu_properties): Updated. Create the
2194 .plt.sec section instead of the .plt.sec section.
2196 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
2198 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
2199 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
2200 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
2202 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
2204 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
2205 (bfd_elf64_set_reloc): Define.
2206 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
2208 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
2210 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
2211 (struct bfd_target): New field _bfd_set_reloc.
2212 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
2213 * reloc.c (_bfd_generic_set_reloc): New function.
2214 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
2215 * nlm-target.h (nlm_set_reloc): Likewise.
2216 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
2217 * aout-tic30.c (MY_set_reloc): Likewise.
2218 * aout-target.h (MY_set_reloc): Likewise.
2219 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
2220 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
2221 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
2222 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
2223 * aout-adobe.c (aout_32_set_reloc): Likewise.
2224 * bout.c (b_out_set_reloc): Likewise.
2225 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
2226 * i386os9k.c (aout_32_set_reloc): Likewise.
2227 * ieee.c (ieee_set_reloc): Likewise.
2228 * oasys.c (oasys_set_reloc): Likewise.
2229 * som.c (som_set_reloc): Likewise.
2230 * versados.c (versados_set_reloc): Likewise.
2231 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
2232 _bfd_generic_set_reloc.
2233 (rs6000_xcoff64_aix_vec): LIkewise.
2234 * libbfd.c (_bfd_norelocs_set_reloc): New function.
2235 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
2236 * i386msdos.c (msdos_set_reloc): Define to
2237 _bfd_norelocs_set_reloc.
2238 * elfcode.h (elf_set_reloc): Define.
2239 * bfd-in2.h: Regenerated.
2241 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
2244 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
2245 for IFUNC function address.
2247 2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
2249 * elf32-arc.c (FEATURE_LIST_NAME): Define.
2250 (CONFLICT_LIST): Likewise.
2251 (opcode/arc-attrs.h): Include.
2252 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
2253 (arc_extract_features): New file.
2254 (arc_stralloc): Likewise.
2255 (arc_elf_merge_attributes): Likewise.
2256 (arc_elf_merge_private_bfd_data): Use object attributes.
2257 (bfd_arc_get_mach_from_attributes): New function.
2258 (arc_elf_object_p): Use object attributes.
2259 (arc_elf_final_write_processing): Likewise.
2260 (elf32_arc_obj_attrs_arg_type): New function.
2261 (elf32_arc_obj_attrs_handle_unknown): Likewise.
2262 (elf32_arc_section_from_shdr): Likewise.
2263 (elf_backend_obj_attrs_vendor): Define.
2264 (elf_backend_obj_attrs_section): Likewise.
2265 (elf_backend_obj_attrs_arg_type): Likewise.
2266 (elf_backend_obj_attrs_section_type): Likewise.
2267 (elf_backend_obj_attrs_handle_unknown): Likewise.
2268 (elf_backend_section_from_shdr): Likewise.
2270 2017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
2273 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
2274 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
2275 and the destination is a Thumb symbol.
2277 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2279 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
2280 initializer to silence GCC 4.2.
2281 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
2283 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2285 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
2286 (LAZY_PLT_ENTRY_SIZE): This.
2287 (NON_LAZY_PLT_ENTRY_SIZE): New.
2288 (elf_x86_64_plt0_entry): Renamed to ...
2289 (elf_x86_64_lazy_plt0_entry): This.
2290 (elf_x86_64_plt_entry): Renamed to ...
2291 (elf_x86_64_lazy_plt_entry): This.
2292 (elf_x86_64_bnd_plt0_entry): Renamed to ...
2293 (elf_x86_64_lazy_bnd_plt0_entry): This.
2294 (elf_x86_64_legacy_plt_entry): Removed.
2295 (elf_x86_64_bnd_plt_entry): Renamed to ...
2296 (elf_x86_64_lazy_bnd_plt_entry): This.
2297 (elf_x86_64_legacy_plt2_entry): Renamed to ...
2298 (elf_x86_64_non_lazy_plt_entry): This.
2299 (elf_x86_64_bnd_plt2_entry): Renamed to ...
2300 (elf_x86_64_non_lazy_bnd_plt_entry): This.
2301 (elf_x86_64_eh_frame_plt): Renamed to ...
2302 (elf_x86_64_eh_frame_lazy_plt): This.
2303 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
2304 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
2305 (elf_x86_64_eh_frame_plt_got): Renamed to ...
2306 (elf_x86_64_eh_frame_non_lazy_plt): This.
2307 (elf_x86_64_lazy_plt_layout): New.
2308 (elf_x86_64_non_lazy_plt_layout): Likewise.
2309 (elf_x86_64_plt_layout): Likewise.
2310 (elf_x86_64_backend_data): Remove PLT layout information. Add
2311 os for target system.
2312 (GET_PLT_ENTRY_SIZE): Removed.
2313 (elf_x86_64_lazy_plt): New.
2314 (elf_x86_64_non_lazy_plt): Likewise.
2315 (elf_x86_64_lazy_bnd_plt): Likewise.
2316 (elf_x86_64_non_lazy_bnd_plt): Likewise.
2317 (elf_x86-64_arch_bed): Updated.
2318 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
2319 (elf_x86_64_create_dynamic_sections): Removed.
2320 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
2321 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
2322 (elf_x86-64_adjust_dynamic_symbol): Updated.
2323 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
2324 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
2325 size for PLT0 if there is no PLT0. Get plt_entry_size from
2326 non_lazy_plt for non-lazy PLT entries.
2327 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
2328 from non_lazy_plt for non-lazy PLT entries.
2329 (elf_x86-64_relocate_section): Updated. Properly get PLT index
2330 if there is no PLT0.
2331 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
2332 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
2333 entries with non-lazy PLT layout. Don't fill the second and third
2334 slots in the PLT entry if there is no PLT0.
2335 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
2336 if there is no PLT0. Set sh_entsize on the .plt.got section.
2337 (compare_relocs): New.
2338 (elf_x86_64_plt_type): Likewise.
2339 (elf_x86_64_plt): Likewise.
2340 (elf_x86_64_nacl_plt): New. Forward declaration.
2341 (elf_x86_64_get_plt_sym_val): Removed.
2342 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
2343 against all dynamic relocations.
2344 (elf_x86_64_link_setup_gnu_properties): New function.
2345 (elf_backend_create_dynamic_sections): Updated.
2346 (elf_backend_setup_gnu_properties): New.
2347 (elf_x86_64_nacl_plt): New.
2348 (elf_x86_64_nacl_arch_bed): Updated.
2350 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2352 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
2353 (LAZY_PLT_ENTRY_SIZE): This.
2354 (NON_LAZY_PLT_ENTRY_SIZE): New.
2355 (elf_i386_plt0_entry): Renamed to ...
2356 (elf_i386_lazy_plt0_entry): This.
2357 (elf_i386_plt_entry): Renamed to ...
2358 (elf_i386_lazy_plt_entry): This.
2359 (elf_i386_pic_plt0_entry): Renamed to ...
2360 (elf_i386_pic_lazy_plt0_entry): This.
2361 (elf_i386_pic_plt_entry): Renamed to ...
2362 (elf_i386_pic_lazy_plt_entry): This.
2363 (elf_i386_got_plt_entry): Renamed to ...
2364 (elf_i386_non_lazy_plt_entry): This.
2365 (elf_i386_pic_got_plt_entry): Renamed to ...
2366 (elf_i386_pic_non_lazy_plt_entry): This.
2367 (elf_i386_eh_frame_plt): Renamed to ...
2368 (elf_i386_eh_frame_lazy_plt): This.
2369 (elf_i386_eh_frame_plt_got): Renamed to ...
2370 (elf_i386_eh_frame_non_lazy_plt): This.
2371 (elf_i386_plt_layout): Renamed to ...
2372 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
2373 eh_frame_plt_got_size.
2374 (elf_i386_non_lazy_plt_layout): New.
2375 (elf_i386_plt_layout): Likewise.
2376 (elf_i386_non_lazy_plt): Likewise.
2377 (GET_PLT_ENTRY_SIZE): Removed.
2378 (elf_i386_plt): Renamed to ...
2379 (elf_i386_lazy_plt): This.
2380 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
2381 (elf_i386_arch_bed): Updated.
2382 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
2383 (elf_i386_create_dynamic_sections): Removed.
2384 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
2385 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
2386 (elf_i386_adjust_dynamic_symbol): Updated.
2387 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
2388 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
2389 size for PLT0 if there is no PLT0.
2390 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
2391 output section is discarded only if GOT isn't empty.
2392 (elf_i386_relocate_section): Updated. Properly get PLT index
2393 if there is no PLT0.
2394 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
2395 second and third slots in the PLT entry if there is no PLT0.
2396 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
2397 if there is no PLT0. Set sh_entsize on the .plt.got section.
2398 (elf_i386_nacl_plt): Forward declaration.
2399 (elf_i386_get_plt_sym_val): Removed.
2400 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
2401 against all dynamic relocations.
2402 (elf_i386_link_setup_gnu_properties): New function.
2403 (elf_backend_create_dynamic_sections): Updated.
2404 (elf_backend_setup_gnu_properties): New.
2405 (elf_i386_nacl_plt): Updated.
2406 (elf_i386_nacl_arch_bed): Likewise.
2407 (elf_i386_vxworks_arch_bed): Likewise.
2409 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
2411 * elflink.c (elf_output_implib): Remove executable flag from import
2413 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
2414 library is a relocatable object file.
2416 2017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
2419 * elf32-avr.c (avr_should_move_sym): New function.
2420 (avr_should_reduce_sym_size): Likewise.
2421 (avr_should_increase_sym_size): Likewise.
2422 (elf32_avr_relax_delete_bytes): Adjust symbol values
2423 and sizes by calling new functions.
2425 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
2427 * config.bfd (riscv32-*): Enable rv64.
2429 2017-05-02 Alan Modra <amodra@gmail.com>
2432 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
2433 rather than h->root.type == bfd_link_hash_new.
2434 (bfd_elf_record_link_assignment): Similarly, call
2435 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
2437 2017-04-29 Alan Modra <amodra@gmail.com>
2440 * reloc.c (reloc_offset_in_range): New function.
2441 (bfd_perform_relocation, bfd_install_relocation): Use it.
2442 (_bfd_final_link_relocate): Likewise.
2444 2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
2446 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
2447 before using .plt.got.
2448 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
2450 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2452 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
2453 instead of "+=" to update 0.
2455 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2457 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
2458 .plt.got section here.
2459 (elf_i386_check_relocs): Don't create the .plt.got section.
2460 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
2461 the .plt.got and .plt.bnd sections here.
2462 (elf_x86_64_check_relocs): Don't create the .plt.got nor
2465 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2467 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
2469 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
2470 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
2471 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
2472 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
2475 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2477 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
2479 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
2480 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
2481 the first relocatable ELF input with GNU properties.
2483 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2485 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
2486 VxWorks for non-PIC.
2488 2017-04-27 Alan Modra <amodra@gmail.com>
2490 * elf-bfd.h (struct elf_backend_data): Make asection param of
2491 elf_backend_eh_frame_address_size const.
2492 (_bfd_elf_eh_frame_address_size): Likewise.
2493 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
2494 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
2495 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
2496 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
2497 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
2498 (next_cie_fde_offset): Constify params.
2499 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
2501 2017-04-27 Alan Modra <amodra@gmail.com>
2503 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
2504 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
2505 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
2507 (offset_adjust): New function.
2508 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
2509 (adjust_eh_frame_local_symbols): Likewise.
2510 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
2511 after changing anything. Return true if anything changed.
2512 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
2513 _bfd_elf_adjust_eh_frame_global_symbol for globals.
2515 2017-04-27 Alan Modra <amodra@gmail.com>
2517 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
2520 2017-04-27 Alan Modra <amodra@gmail.com>
2522 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
2523 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
2524 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
2525 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
2526 for undef and undefweak dyn_relocs.
2527 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
2528 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
2529 (allocate_got, allocate_dynrelocs): Likewise.
2530 (ppc64_elf_relocate_section): Likewise.
2532 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
2534 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
2535 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
2536 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
2537 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
2539 2017-04-26 Nick Clifton <nickc@redhat.com>
2542 * reloc.c (bfd_perform_relocation): Check for a negative address
2545 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
2548 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
2550 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
2551 (elf_backend_always_renumber_dynsyms): Define.
2552 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
2553 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
2554 * elflink.c (bfd_elf_size_dynamic_sections): Also call
2555 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
2557 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
2559 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
2561 * elflink.c (bfd_elf_size_dynamic_sections): Only call
2562 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
2563 sections have been created.
2565 2017-04-26 Nick Clifton <nickc@redhat.com>
2568 * compress.c (bfd_init_section_compress_status): Check the return
2569 value from bfd_malloc.
2571 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
2573 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
2574 no_finish_dynamic_symbol.
2575 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
2577 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
2578 weak symbol, don't make it dynamic.
2579 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
2580 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
2581 relocation for GOT reference.
2582 (elf_x86_64_finish_dynamic_symbol): Abort if
2583 no_finish_dynamic_symbol isn't 0.
2585 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
2588 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
2589 undefined weak symbol, don't make it dynamic.
2590 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
2591 set no_finish_dynamic_symbol and generate R_386_RELATIVE
2592 relocation for R_386_GOT32.
2594 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
2597 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
2599 2017-04-23 Alan Modra <amodra@gmail.com>
2602 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
2603 * elf.c (lcomm_sym): New.
2604 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
2605 * bfd-in2.h: Regenerate.
2607 2017-04-23 Alan Modra <amodra@gmail.com>
2610 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
2611 parameters and comment.
2612 (_bfd_elf_get_reloc_section): Delete.
2613 (_bfd_elf_plt_get_reloc_section): Declare.
2614 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
2615 New functions. Don't blindly skip over assumed .rel/.rela prefix.
2617 (_bfd_elf_get_reloc_section): ..here. Delete.
2618 (assign_section_numbers): Call elf_get_reloc_section.
2619 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
2620 * elfxx-target.h (elf_backend_get_reloc_section): Update.
2622 2017-04-23 Alan Modra <amodra@gmail.com>
2625 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
2628 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
2631 * elf32-i386.c (elf_i386_link_hash_entry): Add
2632 no_finish_dynamic_symbol.
2633 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
2634 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
2635 symbol, don't make it dynamic in PIE.
2636 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
2637 set no_finish_dynamic_symbol and generate R_386_RELATIVE
2638 relocation for R_386_GOT32
2639 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
2642 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
2646 * elflink.c (elf_link_add_object_symbols): Require
2647 --no-dynamic-linker with -E/--dynamic-list when creating
2650 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
2652 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
2655 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
2657 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
2658 dynamic symbol sorting.
2660 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
2663 * elflink.c (elf_link_add_object_symbols): Preserve
2664 dynamic_ref_after_ir_def when restoring the symbol table for
2665 unneeded dynamic object.
2667 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
2670 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
2671 on on undefined IFUNC symbol in the second PLT.
2673 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
2675 * peXXigen.c (pe_print_reloc): Correct chunk_end.
2677 2017-04-19 Alan Modra <amodra@gmail.com>
2679 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
2680 or make dynamic for info->dynamic_undefined_weak 0 and 1.
2681 * elf32-ppc.c:Formatting.
2682 (ensure_undefweak_dynamic): Don't make dynamic when
2683 info->dynamic_undefined_weak is zero.
2684 (allocate_dynrelocs): Discard undefweak dyn_relocs for
2685 info->dynamic_undefined_weak. Discard undef dyn_relocs when
2686 not default visibility. Discard undef and undefweak
2688 (ppc_elf_relocate_section): Adjust to suit.
2689 * elf64-ppc.c: Formatting.
2690 (ensure_undefweak_dynamic): Don't make dynamic when
2691 info->dynamic_undefined_weak is zero.
2692 (allocate_dynrelocs): Discard undefweak dyn_relocs for
2693 info->dynamic_undefined_weak. Discard them earlier.
2695 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
2698 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
2699 before generating the version definition section.
2701 2017-04-17 Alan Modra <amodra@gmail.com>
2703 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
2704 state when a regular object file defines a symbol with
2705 incompatible type to that defined by an earlier shared lib.
2707 2017-04-13 Alan Modra <amodra@gmail.com>
2709 * coffcode.h: Wrap some overly long _bfd_error_handler args.
2711 * elf32-arm.c: Likewise.
2712 * elf32-i386.c: Likewise.
2713 * elf32-mep.c: Likewise.
2714 * elf64-ia64-vms.c: Likewise.
2715 * elf64-x86-64.c: Likewise.
2716 * elflink.c: Likewise.
2717 * elfnn-ia64.c: Likewise.
2718 * elfxx-mips.c: Likewise.
2720 2017-04-13 Alan Modra <amodra@gmail.com>
2722 * aoutx.h: Use %B and %A in error messages throughout file.
2723 * aout-cris.c: Likewise.
2724 * archive.c: Likewise.
2725 * binary.c: Likewise.
2726 * coff-rs6000.c: Likewise.
2727 * coff-tic4x.c: Likewise.
2728 * coffcode.h: Likewise.
2729 * coffgen.c: Likewise.
2730 * cofflink.c: Likewise.
2731 * coffswap.h: Likewise.
2732 * cpu-arm.c: Likewise.
2733 * elf-eh-frame.c: Likewise.
2734 * elf-m10300.c: Likewise.
2736 * elf32-arc.c: Likewise.
2737 * elf32-arm.c: Likewise.
2738 * elf32-bfin.c: Likewise.
2739 * elf32-frv.c: Likewise.
2740 * elf32-iq2000.c: Likewise.
2741 * elf32-m32c.c: Likewise.
2742 * elf32-microblaze.c: Likewise.
2743 * elf32-nds32.c: Likewise.
2744 * elf32-rl78.c: Likewise.
2745 * elf32-rx.c: Likewise.
2746 * elf32-score.c: Likewise.
2747 * elf32-score7.c: Likewise.
2748 * elf32-sh64.c: Likewise.
2749 * elf32-v850.c: Likewise.
2750 * elf32-vax.c: Likewise.
2751 * elf32-visium.c: Likewise.
2752 * elf64-ia64-vms.c: Likewise.
2753 * elf64-mmix.c: Likewise.
2754 * elf64-sh64.c: Likewise.
2755 * elfcode.h: Likewise.
2756 * elfnn-aarch64.c: Likewise.
2757 * elfnn-ia64.c: Likewise.
2758 * elfxx-mips.c: Likewise.
2759 * hpux-core.c: Likewise.
2762 * linker.c: Likewise.
2763 * merge.c: Likewise.
2765 * oasys.c: Likewise.
2766 * pdp11.c: Likewise.
2767 * peXXigen.c: Likewise.
2768 * rs6000-core.c: Likewise.
2769 * vms-alpha.c: Likewise.
2770 * xcofflink.c: Likewise.
2772 2017-04-13 Alan Modra <amodra@gmail.com>
2774 * bfd.c (PRINT_TYPE): Define.
2775 (_doprnt): New function.
2776 (error_handler_internal): Use _doprnt.
2777 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
2778 calls in their natural order, throughout file.
2779 * coff-mcore.c: Likewise.
2780 * coff-ppc.c: Likewise.
2781 * coff-tic80.c: Likewise.
2782 * cofflink.c: Likewise.
2783 * elf-s390-common.c: Likewise.
2785 * elf32-arm.c: Likewise.
2786 * elf32-i386.c: Likewise.
2787 * elf32-m32r.c: Likewise.
2788 * elf32-msp430.c: Likewise.
2789 * elf32-spu.c: Likewise.
2790 * elf64-ia64-vms.c: Likewise.
2791 * elf64-sparc.c: Likewise.
2792 * elf64-x86-64.c: Likewise.
2793 * elflink.c: Likewise.
2794 * elfnn-aarch64.c: Likewise.
2795 * elfnn-ia64.c: Likewise.
2796 * elfxx-mips.c: Likewise.
2798 2017-04-13 Alan Modra <amodra@gmail.com>
2800 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
2801 branch veneers" error. Fix double space and format message.
2802 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
2803 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
2805 2017-04-13 Alan Modra <amodra@gmail.com>
2807 * bfd-in2.h: Regenerate.
2809 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
2811 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
2812 extra `\n' in warning/error messages.
2813 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
2814 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
2816 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
2818 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
2819 processor-specific properties with generic ELF target vector.
2821 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
2823 * elf32-sparc.c (elf_backend_fixup_symbol): New.
2824 * elf64-sparc.c (elf_backend_fixup_symbol): New.
2825 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
2826 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
2828 (link_hash_newfunc): Initialize has_got_reloc and
2830 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
2832 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
2834 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
2836 (_bfd_sparc_elf_fixup_symbol): New function.
2837 (allocate_dynrelocs): Don't allocate space for dynamic
2838 relocations and discard relocations against resolved undefined
2839 weak symbols in executable. Don't make resolved undefined weak
2840 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
2841 relocation against undefined weak symbols in PIE.
2842 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
2843 relocations against resolved undefined weak symbols in PIE
2844 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
2845 without ynamic PLT/GOT relocations for resolved undefined weak
2847 Don't generate dynamic relocation against resolved undefined
2848 weak symbol in executable.
2849 (pie_finish_undefweak_symbol): New function.
2850 (_bfd_sparc_elf_finish_dynamic_sections): Call
2851 pie_finish_undefweak_symbol on all symbols in PIE.
2852 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
2853 (_bfd_sparc_elf_fixup_symbol): New function.
2855 2017-04-10 Nick Clifton <nickc@redhat.com>
2857 * config.bfd: Remove ns32k from obsolete list.
2859 2017-04-10 Alan Modra <amodra@gmail.com>
2862 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
2863 (special_sections_i): Likewise for .init_array.
2864 (special_sections_p): Likewise for .preinit_array.
2866 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
2870 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
2871 ELF_COMMON_DEF_P for common symbols.
2872 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
2873 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
2874 * elflink.c (_bfd_elf_merge_symbol): Revert commits
2875 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
2876 07492f668d2173da7a2bda3707ff0985e0f460b6.
2878 2017-04-07 Pedro Alves <palves@redhat.com>
2880 * opncls.c (bfd_get_debug_link_info): Rename to...
2881 (bfd_get_debug_link_info_1): ... this. Change type of second
2882 parameter to void pointer. Adjust.
2883 (bfd_get_debug_link_info): Reimplement on top of
2884 bfd_get_debug_link_info_1.
2885 (separate_debug_file_exists, separate_alt_debug_file_exists):
2886 Change type of second parameter to void pointer. Adjust.
2887 (get_func_type, check_func_type): Change type of second parameter
2889 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
2890 the callback functions instead of passing the address of a local.
2891 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
2892 find_separate_debug_file.
2893 (get_alt_debug_link_info_shim): Change type of second parameter to
2894 void pointer. Adjust.
2895 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
2896 find_separate_debug_file.
2897 (get_build_id_name, bfd_boolean check_build_id_file): Change type
2898 of second parameter to void pointer. Adjust.
2899 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
2900 pointer local to find_separate_debug_file.
2902 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
2904 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
2905 external symbols with a definition.
2906 (_bfd_coff_gc_mark_extra_sections): Fix typo.
2908 2017-04-07 Alan Modra <amodra@gmail.com>
2910 * po/SRC-POTFILES.in: Regenerate.
2912 2017-04-05 Alan Modra <amodra@gmail.com>
2914 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
2917 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
2919 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
2920 numbers for DataDirectory entry indicies passed to
2923 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
2925 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
2926 each GNU_MBIND section and align GNU_MBIND section to page size.
2927 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
2928 segment for each GNU_MBIND section.
2929 (_bfd_elf_init_private_section_data): Copy sh_info from input
2930 for GNU_MBIND section.
2932 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
2934 * elfnn-riscv.c (GP_NAME): Delete.
2935 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
2936 (_bfd_riscv_relax_lui): Likewise.
2938 2017-04-04 Nick Clifton <nickc@redhat.com>
2941 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
2943 (bfd_elf_final_link): Only initialize the extended symbol index
2944 section if there are extended symbol tables to list.
2946 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
2948 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
2949 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
2950 * configure.ac (elf): Add elf-properties.lo.
2951 * Makefile.in: Regenerated.
2952 * configure: Likewise.
2953 * elf-bfd.h (elf_property_kind): New.
2954 (elf_property): Likewise.
2955 (elf_property_list): Likewise.
2956 (elf_properties): Likewise.
2957 (_bfd_elf_parse_gnu_properties): Likewise.
2958 (_bfd_elf_get_property): Likewise.
2959 (_bfd_elf_link_setup_gnu_properties): Likewise.
2960 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
2961 and setup_gnu_properties.
2962 (elf_obj_tdata): Add properties.
2963 * elf-properties.c: New file.
2964 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
2965 (elf_i386_merge_gnu_properties): Likewise.
2966 (elf_backend_parse_gnu_properties): Likewise.
2967 (elf_backend_merge_gnu_properties): Likewise.
2968 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
2969 (elf_x86_64_merge_gnu_properties): Likewise.
2970 (elf_backend_parse_gnu_properties): Likewise.
2971 (elf_backend_merge_gnu_properties): Likewise.
2972 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
2973 (elf_backend_parse_gnu_properties): Likewise.
2974 (elf_backend_setup_gnu_properties): Likewise.
2975 (elfNN_bed): Add elf_backend_parse_gnu_properties,
2976 elf_backend_merge_gnu_properties and
2977 elf_backend_setup_gnu_properties.
2979 2017-03-30 Pip Cet <pipcet@gmail.com>
2981 * elf32-wasm32.c: Add relocation code, two relocs.
2982 * reloc.c: Add wasm32 relocations.
2983 * libbfd.h: Regenerate.
2984 * bfd-in2.h: Regenerate.
2985 * bfd/po/bfd.pot: Regenerate.
2987 2017-03-29 Nick Clifton <nickc@redhat.com>
2990 * coff-bfd.h (struct coff_section_data): Add new fields:
2991 saved_bias and bias.
2992 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
2993 computed for PE binaries.
2994 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
2997 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
3000 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
3001 to handle a local symbol with a hash-symbol-entry; without PLT.
3002 Add BFD_ASSERT for an incidental case with GOT entry present.
3003 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
3004 isn't forced-or-set local.
3006 2017-03-27 Pip Cet <pipcet@gmail.com>
3008 * wasm-module.c: New file to support WebAssembly modules.
3009 * wasm-module.h: New file to support WebAssembly modules.
3010 * doc/webassembly.texi: Start documenting wasm-module.c.
3011 * config.bfd: Add wasm_vec.
3012 * targets.c: Likewise.
3013 * configure.ac: Likewise.
3014 * Makefile.am: Add entries for wasm-module.c.
3015 * Makefile.in: Regenerate.
3016 * configure: Regenerate.
3017 * po/SRC-POTFILES.in: Regenerate.
3019 2017-03-27 Pip Cet <pipcet@gmail.com>
3021 * cpu-wasm32.c: New file to support wasm32 architecture.
3022 * elf32-wasm32.c: New file to support wasm32 architecture.
3023 * Makefile.am: Add wasm32 architecture.
3024 * archures.c: Likewise.
3025 * config.bfd: Likewise.
3026 * configure.ac: Likewise.
3027 * targets.c: Likewise.
3028 * Makefile.in: Regenerate.
3029 * bfd-in2.h: Regenerate.
3030 * configure: Regenerate.
3031 * po/SRC-POTFILES.in: Regenerate.
3033 2017-03-20 Alan Modra <amodra@gmail.com>
3036 * elf64-ppc.c (compare_symbols): Stabilize sort.
3038 2017-03-18 Alan Modra <amodra@gmail.com>
3040 * elf64-ppc.c (struct ppc_link_hash_table): Add
3041 local_ifunc_resolver and maybe_local_ifunc_resolver.
3042 (ppc_build_one_stub): Set flags on emitting dynamic
3043 relocation to ifunc.
3044 (ppc64_elf_relocate_section): Likewise.
3045 (ppc64_elf_finish_dynamic_symbol): Likewise.
3046 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
3047 local dynamic relocs to ifuncs.
3048 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
3049 local_ifunc_resolver and maybe_local_ifunc_resolver.
3050 (ppc_elf_relocate_section): Set flag on emitting dynamic
3051 relocation to ifuncs.
3052 (ppc_elf_finish_dynamic_symbol): Likewise.
3053 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
3054 dynamic relocs to ifuncs.
3056 2017-03-13 Nick Clifton <nickc@redhat.com>
3059 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
3060 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
3061 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
3062 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
3063 * bfd-in2.h: Regenerate.
3064 * libbfd.h: Regenerate.
3065 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
3067 (IS_AARCH64_TLSDESC_RELOC): Likewise.
3068 (elfNN_aarch64_howto_table): Likewise.
3069 (aarch64_tls_transition_without_check): Likewise.
3070 (aarch64_reloc_got_type): Likewise.
3071 (elfNN_aarch64_final_link_relocate): Likewise.
3072 (elfNN_aarch64_tls_relax): Likewise.
3073 (elfNN_aarch64_relocate_section): Likewise.
3074 (elfNN_aarch64_gc_sweep_hook): Likewise.
3075 (elfNN_aarch64_check_relocs): Likewise.
3076 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
3077 (_bfd_aarch64_elf_resolve_relocation): Likewise.
3079 2017-03-11 Alan Modra <amodra@gmail.com>
3081 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
3082 parameter is in fact used. Whitespace fixes.
3083 * elf64-ppc.c: Likewise.
3085 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
3087 * rs6000-core.c (CORE_NEW): Simplify macro when
3088 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
3090 2017-03-07 Alan Modra <amodra@gmail.com>
3094 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
3097 2017-03-05 Alan Modra <amodra@gmail.com>
3099 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
3100 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
3101 (next_cie_fde_offset): New function.
3102 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
3103 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
3104 four bytes. Align CIEs to four or eight bytes depending on
3105 per_encoding_aligned8. Align FDEs according to their encoding.
3106 Pad last FDE to output section alignment.
3107 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
3109 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
3110 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
3111 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
3113 2017-03-02 Martin Bickel <binutils@ineranves.de>
3116 * elf.c (rewrite_elf_program_header): Do not issue a warning for
3117 empty segments which have a zero filesz, but a non-zero memsz.
3119 2017-03-02 Alan Modra <amodra@gmail.com>
3121 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
3123 2017-02-28 Alan Modra <amodra@gmail.com>
3125 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
3126 (ppc64_elf_relocate_section): Likewise.
3128 2017-02-28 Alan Modra <amodra@gmail.com>
3131 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
3132 rather than elf32_nios2_hash_table or elf_hash_table.
3133 (create_got_section): Likewise.
3134 (nios2_elf32_finish_dynamic_symbol): Likewise.
3135 (nios2_elf32_adjust_dynamic_symbol): Likewise.
3136 (nios2_elf32_size_dynamic_sections): Likewise.
3137 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
3138 vars. Use htab equivalents directly instead. Don't create
3139 all dynamic sections on needing just the GOT. Use a goto
3140 rather than a fall-through with reloc test. Ensure
3141 htab->dynobj is set when making dynamic sreloc section.
3142 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
3143 equivalent directly instead. Don't segfault on looking for
3144 .dynamic when dynamic sections have not been created. Don't
3145 segfault on .got.plt being discarded.
3146 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
3147 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
3148 fixme and another not so relevant comment.
3149 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
3150 already set, set hash table dynobj on creating .sbss.
3152 2017-02-28 Alan Modra <amodra@gmail.com>
3154 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
3155 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
3156 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
3157 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
3158 (ppc64_elf_relocate_section): Likewise.
3159 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
3160 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
3161 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
3162 * libbfd.h: Regenerate.
3163 * bfd-in2.h: Regenerate.
3165 2017-02-28 Alan Modra <amodra@gmail.com>
3167 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
3168 dynamic .data.rel.ro read-only.
3169 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
3170 rather than section flags when deciding where copy reloc goes.
3171 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
3172 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
3173 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
3174 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
3175 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
3176 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
3177 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
3178 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
3179 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3180 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
3181 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
3182 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
3183 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3184 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
3185 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
3186 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
3187 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
3188 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
3189 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
3191 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
3193 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
3194 `jalr $0, $25' instruction encoding.
3196 2017-02-27 Nick Clifton <nickc@redhat.com>
3199 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
3200 generating a seg-fault when encountering a symbol that has been
3201 deleted by garbage collection.
3203 2017-02-25 Alan Modra <amodra@gmail.com>
3205 * elf32-arc.c (struct dynamic_sections): Delete.
3206 (enum dyn_section_types): Delete.
3207 (dyn_section_names): Delete.
3208 (arc_create_dynamic_sections): Delete.
3209 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
3210 segfault on discarded .rela.plt section.
3211 (elf_arc_size_dynamic_sections): Formatting. Don't call
3212 arc_create_dynamic_sections. Don't allocate memory for sections
3213 handled by the generic linker. Correct code finding relocs in
3214 read-only sections. Set SEC_EXCLUDE on zero size .got,
3215 .got.plt, and .dynbss sections. Do set .interp for pies.
3217 2017-02-24 Andrew Waterman <andrew@sifive.com>
3219 * elfnn-riscv.c (GP_NAME): New macro.
3220 (riscv_global_pointer_value): Use it.
3221 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
3222 output section, consider only that section's alignment.
3224 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
3226 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
3227 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
3228 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
3229 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
3231 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
3233 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
3234 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
3237 2017-02-23 Alan Modra <amodra@gmail.com>
3240 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
3242 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
3243 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
3246 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
3249 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
3250 processing ahead of the call to `elf_gc_sweep_symbol'.
3252 2017-02-22 Nick Clifton <nickc@redhat.com>
3255 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
3256 created section 4-byte alignment.
3258 2017-02-22 Alan Modra <amodra@gmail.com>
3260 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
3261 on .got or .plt output section being discarded by script.
3262 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
3265 2017-02-21 Alan Modra <amodra@gmail.com>
3267 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
3268 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
3270 2017-02-20 Alan Modra <amodra@gmail.com>
3273 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
3274 if DT_RELSZ/DT_RELASZ is zero.
3276 2017-02-17 Nick Clifton <nickc@redhat.com>
3278 * compress.c (bfd_get_full_section_contents): Remember to reduce
3279 compressed size by the sizeof the compression header when
3280 decompressing the contents.
3282 2017-02-17 Pedro Alves <palves@redhat.com>
3284 * srec.c (Chunk): Rename to ...
3285 (_bfd_srec_len): ... this.
3286 (S3Forced): Rename to ...
3287 (_bfd_srec_forceS3): ... this.
3288 * objcopy.c: Adjust all references.
3290 2017-02-17 Pedro Alves <palves@redhat.com>
3292 * archive.c (bsd_write_armap): Rename to ...
3293 (_bfd_bsd_write_armap): ... this.
3294 (coff_write_armap): Rename to ...
3295 (_bfd_coff_write_armap): ... this.
3296 * libbfd-in.h (bsd_write_armap): Rename to ...
3297 (_bfd_bsd_write_armap): ... this.
3298 (coff_write_armap): Rename to ...
3299 (_bfd_coff_write_armap): ... this.
3300 * aout-target.h, aout-tic30.c: Adjust all users.
3301 * libbfd.h: Regenerate.
3303 2017-02-17 Pedro Alves <palves@redhat.com>
3305 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
3306 (warn_deprecated): Rename to ...
3307 (_bfd_warn_deprecated): ... this.
3308 * libbfd.c (warn_deprecated): Rename to ...
3309 (_bfd_warn_deprecated): ... this.
3310 * bfd-in2.h: Regenerate.
3312 2017-02-17 Pedro Alves <palves@redhat.com>
3314 * bfdio.c (real_ftell): Rename to ...
3315 (_bfd_real_ftell): ... this.
3316 (real_fseek): Rename to ...
3317 (_bfd_real_fseek): ... this.
3318 (real_fopen): Rename to ...
3319 (_bfd_real_fopen): ... this.
3320 * libbfd-in.h (real_ftell): Rename to ...
3321 (_bfd_real_ftell): ... this.
3322 (real_fseek): Rename to ...
3323 (_bfd_real_fseek): ... this.
3324 (real_fopen): Rename to ...
3325 (_bfd_real_fopen): ... this.
3326 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
3327 * libbfd.h: Regenerate.
3329 2017-02-17 Pedro Alves <palves@redhat.com>
3331 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
3332 * libbfd.c (read_unsigned_leb128): Rename to ...
3333 (_bfd_read_unsigned_leb128): ... this.
3334 (read_signed_leb128): Rename to ...
3335 (_bfd_read_signed_leb128): ... this.
3336 (safe_read_leb128): Rename to ...
3337 (_bfd_safe_read_leb128): ... this.
3338 * libbfd-in.h (read_unsigned_leb128): Rename to ...
3339 (_bfd_read_unsigned_leb128): ... this.
3340 (read_signed_leb128): Rename to ...
3341 (_bfd_read_signed_leb128): ... this.
3342 (safe_read_leb128): Rename to ...
3343 (_bfd_safe_read_leb128): ... this.
3344 * libbfd.h: Renegerate.
3346 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
3348 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
3349 before trying to fine matching file and line information.
3351 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
3353 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
3354 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
3355 not match current bfd, then reload debug information. Record bfd
3356 we're loading debug info for in the stash. If we have debug
3357 informatin in the cache then perform section placement before
3360 2017-02-16 Alan Modra <amodra@gmail.com>
3363 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
3364 * elfxx-target.h (elf_backend_no_page_alias): Define.
3365 (elfNN_bed): Init new field.
3366 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
3367 ensure PT_LOAD segment starts on a new page.
3368 * elf32-hppa.c (elf_backend_no_page_alias): Define.
3370 2017-02-16 Alan Modra <amodra@gmail.com>
3373 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
3376 2017-02-16 Jiong Wang <jiong.wang@arm.com>
3378 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
3379 * bfd-in2.h: Regenerated.
3381 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
3384 * elf32-i386.c (elf_i386_relocate_section): Allow
3385 "lea foo@GOT, %reg" in PIC.
3387 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
3390 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
3391 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
3392 error against local IFUNC symbol without a base register for
3395 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
3397 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
3398 `%P: %H:' with `info->callbacks->einfo'.
3399 (ppc_elf_relocate_section): Likewise.
3400 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
3401 (ppc64_elf_edit_toc): Likewise.
3402 (ppc64_elf_relocate_section): Likewise.
3404 2017-02-14 Alan Modra <amodra@gmail.com>
3406 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
3407 --gc-keep-exported, and test versioned field of sym rather than
3408 looking for @ in name.
3410 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
3412 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
3415 2017-02-13 Nick Clifton <nickc@redhat.com>
3418 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
3421 2017-02-07 Andrew Waterman <andrew@sifive.com>
3423 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
3424 entry size if PLT header is written.
3426 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
3428 Fix sparc64 dynamic relocation processing to use the dynamic
3430 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
3431 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
3434 2017-02-03 Nick Clifton <nickc@redhat.com>
3437 * coffcode.h (coff_write_object_contents): Enlarge size of
3438 s_name_buf in order to avoid compile time warning about possible
3440 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
3441 32-bits of insn value before printing into buffer.
3443 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3445 * elfxx-mips.c (mips_elf_hash_sort_data): Add
3446 `max_local_dynindx'.
3447 (mips_elf_sort_hash_table): Handle it.
3448 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
3449 symbols bump up `max_local_dynindx' rather than
3450 `max_non_got_dynindx'.
3452 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3454 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
3455 `min_got_dynindx', `max_unref_got_dynindx' and
3456 `max_non_got_dynindx' members to the `bfd_size_type' data type.
3457 (mips_elf_sort_hash_table): Adjust accordingly.
3459 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3461 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
3462 to access the hash table.
3464 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3466 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
3467 non-NULL `htab' to the beginning.
3469 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3471 * elflink.c (elf_gc_sweep): Wrap overlong line.
3473 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
3475 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
3476 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
3477 * elfxx-mips.c (mips_elf_link_hash_table): Add
3478 `ignore_branch_isa' member.
3479 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
3480 in branch relocation calculation as an error if
3481 `ignore_branch_isa' has been set.
3482 (_bfd_mips_elf_insn32): Rename to...
3483 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
3484 parameter to `insn32' and add an `ignore_branch_isa' parameter.
3485 Handle the new parameter.
3487 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
3489 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
3490 local variable dynobj.
3493 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
3494 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
3495 executable from read-only sections into sdynrelro.
3496 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
3497 dynamic relocs in sdynrelro.
3498 (elf_backend_want_dynrelro): Define.
3500 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
3502 * config.bfd (*-*-rtemsaout*): Mark as removed.
3504 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
3506 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
3507 (arm-*-rtems*): Move to (arm*-*-eabi*).
3508 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
3509 (m68-*-rtems*): Move to (m68*-*-elf*).
3511 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
3513 * config.bfd (*-*-rtemscoff*): Mark as removed.
3515 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
3518 * elflink.c (bfd_elf_record_link_assignment): Revert last
3519 change and don't ever clear `forced_local'. Set `mark'
3521 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
3523 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
3524 (bfd_elf_size_dynamic_sections): ... here.
3525 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
3526 and set `mark' instead in `__tls_get_addr_opt' processing.
3527 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
3529 2017-01-24 Alan Modra <amodra@gmail.com>
3531 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
3532 where dynamic relocs are preferable. Allow ifunc too.
3533 (ensure_undefweak_dynamic): New function.
3534 (allocate_dynrelocs): Use it here. Move plt handling last and
3535 don't make symbols dynamic, simplifying loop. Only make undef
3536 weak symbols with GOT entries dynamic. Correct condition
3537 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
3538 comments. Remove goto.
3539 (ppc_elf_relocate_section): Correct test for using dynamic
3540 symbol on GOT relocs. Rearrange test for emitting GOT relocs
3541 to suit. Set up explicit tls_index entries and implicit GOT
3542 tls_index entries resolvable at link time for
3543 __tls_get_addr_opt. Simplify test to clear mem for prelink.
3544 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
3545 (ensure_undefweak_dynamic): New function.
3546 (allocate_dynrelocs): Use it here. Only make undef weak symbols
3547 with GOT entries dynamic. Remove unnecessary test of
3548 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
3549 (ppc64_elf_relocate_section): Correct test for using dynamic
3550 symbol on GOT relocs. Rearrange test for emitting GOT relocs
3551 to suit. Set up explicit tls_index entries and implicit GOT
3552 tls_index entries resolvable at link time for __tls_get_addr_opt.
3553 Simplify expression to clear mem for prelink.
3555 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
3557 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
3559 2017-01-20 Jiong Wang <jiong.wang@arm.com>
3561 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
3562 (elf_backend_hash_symbol): Define.
3564 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
3567 * elflink.c (bfd_elf_record_link_assignment): Clear any
3568 `forced_local' marking for DSO symbols that are not being
3571 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
3573 * elfnn-riscv.c (riscv_elf_object_p): New function.
3575 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
3578 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
3580 (elf_x86_64_check_relocs): Create .eh_frame section for the
3582 (elf_x86_64_size_dynamic_sections): Allocate and initialize
3583 .eh_frame section for the .plt.bnd section.
3584 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
3585 for the .plt.bnd section.
3587 2017-01-12 Nick Clifton <nickc@redhat.com>
3590 * opncls.c (find_separate_debug_file): Add include_dirs
3591 parameter. Only include the directory part of the bfd's filename
3592 in search paths if include_dirs is true. Add a couple of extra
3593 locations for looking for debug files.
3594 ( bfd_follow_gnu_debuglink): Update invocation of
3595 find_separate_debug_file.
3596 (bfd_follow_gnu_debugaltlink): Likewise.
3597 (get_build_id): New function: Finds the build-id of the given bfd.
3598 (get_build_id_name): New function: Computes the name of the
3599 separate debug info file for a bfd, based upon its build-id.
3600 (check_build_id_file): New function: Checks to see if a separate
3601 debug info file exists at the given location, and that its
3602 build-id matches that of the original bfd.
3603 (bfd_follow_build_id_debuglink): New function: Finds a separate
3604 debug info file for a given bfd by using the build-id method.
3605 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
3606 method of locating a separate debug info file before using the
3608 * bfd-in2.h: Regenerate.
3610 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
3613 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
3614 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
3615 elf_x86_64_eh_frame_plt_got.
3616 (elf_x86_64_size_dynamic_sections): Get unwind info from
3617 elf_x86_64_bnd_arch_bed for the BND PLT.
3619 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
3621 * config.bfd: Add entries for i686-redox and x86_64-redox.
3623 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
3625 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
3627 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
3628 .eh_frame section to 4 bytes for x32.
3629 (elf_x86_64_check_relocs): Likewise.
3631 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
3634 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
3635 (PLT_GOT_FDE_LENGTH): Likewise.
3636 (elf_i386_plt_layout): Add eh_frame_plt_got and
3637 eh_frame_plt_got_size.
3638 (elf_i386_plt): Updated.
3639 (elf_i386_link_hash_table): Add plt_got_eh_frame.
3640 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
3641 (elf_i386_size_dynamic_sections): Allocate and initialize
3642 .eh_frame section for .plt.got.
3643 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
3645 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
3646 eh_frame_plt_got_size.
3647 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
3648 (PLT_GOT_FDE_LENGTH): Likewise.
3649 (elf_x86_64_backend_data): Add eh_frame_plt_got and
3650 eh_frame_plt_got_size.
3651 (elf_x86_64_arch_bed): Updated.
3652 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
3653 eh_frame_plt_got_size.
3654 (elf_x86_64_nacl_arch_bed): Likewise.
3655 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
3656 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
3657 (elf_x86_64_size_dynamic_sections): Allocate and initialize
3658 .eh_frame section for .plt.got.
3659 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
3662 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
3664 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
3665 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
3667 2017-01-09 Nick Clifton <nickc@redhat.com>
3669 * dwarf2.c (lookup_address_in_function_table): Return early if
3670 there are no functions in the given comp unit, or if the high
3671 address of the last function in the comp unit is less than the
3674 2017-01-09 Nick Clifton <nickc@redhat.com>
3677 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
3678 message if there are too many symbols to load.
3680 2017-01-04 James Clarke <jrtc27@jrtc27.com>
3682 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
3683 if relocs are cached.
3685 2017-01-03 Rich Felker <bugdal@aerifal.cx>
3688 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
3689 for R_MICROBLAZE_GOTOFF_64.
3691 2017-01-03 Nick Clifton <nickc@redhat.com>
3693 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
3694 warning about using a possibly uninitialised variable.
3696 2017-01-02 Alan Modra <amodra@gmail.com>
3698 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
3699 (allocate_plt_static, allocate_dynrelocs): Use it.
3701 2017-01-02 Alan Modra <amodra@gmail.com>
3703 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
3704 .PARISC.unwind section.
3706 2017-01-02 Alan Modra <amodra@gmail.com>
3709 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
3710 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
3711 indirect to GOT pointer relative code edit.
3713 2017-01-02 Alan Modra <amodra@gmail.com>
3715 Update year range in copyright notice of all files.
3717 For older changes see ChangeLog-2016
3719 Copyright (C) 2017 Free Software Foundation, Inc.
3721 Copying and distribution of this file, with or without modification,
3722 are permitted in any medium without royalty provided the copyright
3723 notice and this notice are preserved.
3729 version-control: never