1 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
3 * elf32-i386.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
4 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Moved to ...
5 * elfxx-x86.h (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
6 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Here.
7 * elf64-x86-64.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
8 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Removed.
10 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
12 * elf32-i386.c (elf_i386_allocate_dynrelocs): Removed.
13 (elf_i386_allocate_local_dynrelocs): Likewise.
14 (elf_i386_size_dynamic_sections): Replace
15 elf_i386_allocate_dynrelocs/elf_i386_allocate_local_dynrelocs
16 with _bfd_x86_elf_allocate_dynrelocs and
17 _bfd_x86_elf_allocate_local_dynrelocs.
18 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Removed.
19 (elf_x86_64_allocate_local_dynrelocs): Likewise.
20 (elf_x86_64_size_dynamic_sections): Replace
21 elf_x86_64_allocate_dynrelocs/elf_x86_64_allocate_local_dynrelocs
22 with _bfd_x86_elf_allocate_dynrelocs and
23 _bfd_x86_elf_allocate_local_dynrelocs.
24 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): New function.
25 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
26 * elfxx-x86.h (_bfd_x86_elf_allocate_dynrelocs): New prototype.
27 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
29 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
31 * elf32-i386.c (is_i386_elf): Removed.
32 (elf_i386_check_relocs): Replace is_i386_elf with is_x86_elf.
33 (elf_i386_size_dynamic_sections): Likewise.
34 (elf_i386_relocate_section): Likewise.
35 * elf64-x86-64.c (is_x86_64_elf): Removed.
36 (elf_x86_64_check_relocs): Replace is_x86_64_elf with
38 (elf_x86_64_size_dynamic_sections): Likewise.
39 (elf_x86_64_relocate_section): Likewise.
40 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
42 * elfxx-x86.h (elf_x86_link_hash_table): Add target_id.
45 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
47 * elf32-i386.c (elf_i386_compute_jump_table_size): Removed.
48 (elf_i386_allocate_dynrelocs): Replace
49 elf_i386_compute_jump_table_size with
50 elf_x86_compute_jump_table_size.
51 (elf_i386_size_dynamic_sections): Likewise.
52 * elf64-x86-64.c (elf_x86_64_compute_jump_table_size): Removed.
53 (elf_x86_64_allocate_dynrelocs): Replace
54 elf_x86_64_compute_jump_table_size with
55 elf_x86_compute_jump_table_size.
56 (elf_x86_64_size_dynamic_sections): Likewise.
57 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
59 * elfxx-x86.h (elf_x86_link_hash_table): Add got_entry_size.
60 (elf_x86_compute_jump_table_size): New.
62 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
64 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
66 (_bfd_x86_elf_adjust_dynamic_symbol): Use sizeof_reloc.
67 * elfxx-x86.h (elf_x86_link_hash_table): Add sizeof_reloc.
69 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
71 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check VxWorks
72 with htab->is_vxworks.
73 (elf_i386_size_dynamic_sections): Likewise.
74 (elf_i386_relocate_section): Likewise.
75 (elf_i386_finish_dynamic_symbol): Likewise.
76 (elf_i386_finish_dynamic_sections): Likewise.
78 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
80 * elf32-i386.c (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
81 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
82 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Moved to ...
83 * elfxx-x86.h (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
84 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
85 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Here.
86 * elf64-x86-64.c (GOT_TLS_IE, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
87 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Removed.
89 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
92 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Check
93 ELF_COMMON_DEF_P for common symbols.
95 2017-09-02 Alan Modra <amodra@gmail.com>
97 * elf-eh-frame.c (offset_adjust): Avoid false positive gcc warning.
98 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Likewise.
99 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
101 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
103 * elf32-i386.c (elf_i386_gc_mark_hook): Removed.
104 (elf_backend_gc_mark_hook): Likewise.
105 * elf64-x86-64.c (elf_x86_64_gc_mark_hook): Likewise.
106 (elf_backend_gc_mark_hook): Likewise.
107 * elfxx-x86.c (_bfd_x86_elf_gc_mark_hook): New function.
108 * elfxx-x86.h (_bfd_x86_elf_gc_mark_hook): New.
109 (elf_backend_gc_mark_hook): Likewise.
111 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
113 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Removed.
114 (elf_backend_adjust_dynamic_symbol): Likewise.
115 * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.
116 (elf_backend_adjust_dynamic_symbol): Likewise.
117 * elfxx-x86.c (_bfd_x86_elf_adjust_dynamic_symbol): New function.
118 (_bfd_x86_elf_link_setup_gnu_properties): Copy is_vxworks.
119 * elfxx-x86.h (elf_x86_link_hash_table): Add is_vxworks.
120 (_bfd_x86_elf_adjust_dynamic_symbol): New.
121 (elf_backend_adjust_dynamic_symbol): Likewise.
123 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
125 * elfxx-x86.h (elf_x86_plt_layout_table): Fix a typo in
128 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
130 * elf32-i386.c (elf_i386_mkobject): Removed.
131 (bfd_elf32_mkobject): Likewise.
132 * elf64-x86-64.c (elf_x86_64_mkobject): Likewise.
133 (bfd_elf64_mkobject): Likewise.
134 (bfd_elf32_mkobject): Likewise.
135 * elfxx-x86.c (_bfd_x86_elf_mkobject): New function.
136 * elfxx-x86.h (_bfd_x86_elf_mkobject): New.
137 (bfd_elf64_mkobject): Likewise.
138 (bfd_elf32_mkobject): Likewise.
140 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
142 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Updated.
143 Call _bfd_x86_elf_link_setup_gnu_properties.
144 * elf64-x86-64.c (elf_x86_lazy_plt_layout): Initialize
145 pic_plt0_entry and pic_plt_entry fields with the non-PIC PLT
147 (elf_x86_64_non_lazy_plt): Likewise.
148 (elf_x86_64_lazy_bnd_plt): Likewise.
149 (elf_x86_64_non_lazy_bnd_plt): Likewise.
150 (elf_x86_64_lazy_ibt_plt): Likewise.
151 (elf_x32_lazy_ibt_plt): Likewise.
152 (elf_x86_64_non_lazy_ibt_plt): Likewise.
153 (elf_x32_non_lazy_ibt_plt): Likewise.
154 (elf_x86_64_nacl_plt): Likewise.
155 (elf_x86_64_link_setup_gnu_properties): Updated. Call
156 _bfd_x86_elf_link_setup_gnu_properties.
157 * elfxx-x86.c: Include elf-vxworks.h".
158 (_bfd_x86_elf_link_setup_gnu_properties): New function.
159 * elfxx-x86.h (elf_x86_lazy_plt_layout): Remove "for i386 only"
160 comments for pic_plt0_entry and pic_plt_entry.
161 (elf_x86_non_lazy_plt_layout): Likewise.
162 (elf_x86_plt_layout_table): New.
163 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
165 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
168 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Create
169 .eh_frame section for the second PLT.
170 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Correct
171 alignment of .eh_frame section for the second PLT.
173 2017-09-01 Nick Clifton <nickc@redhat.com>
176 * dwarf2.c (decode_line_info): Fix test for an overlong line info
179 2017-09-01 Nick Clifton <nickc@redhat.com>
182 * elf-attrs.c (_bfd_elf_parse_attributes): Ensure that the
183 attribute buffer is NUL terminated.
185 2017-08-31 Nick Clifton <nickc@redhat.com>
188 * dwarf2.c (read_section): If necessary add a terminating NUL byte
189 to dwarf string sections.
191 2017-08-31 Alan Modra <amodra@gmail.com>
193 * po/SRC-POTFILES.in: Regenerate.
195 2017-08-31 Alan Modra <amodra@gmail.com>
197 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Don't exit early
198 for a section containing just a terminator. Allow multiple
199 terminators at end of section.
200 * elflink.c (bfd_elf_discard_info): Iterate over .eh_frame
201 sections when not adding alignment. Assert on terminator in
204 2017-08-31 Alan Modra <amodra@gmail.com>
208 * elflink.c (bfd_elf_discard_info): Don't pad embedded zero
211 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
213 * configure.ac (bfd_backends): Add elf64.lo together with
214 elfxx-x86.lo for 64-bit BFD.
215 * configure: Regenerated.
217 2017-08-31 James Bowman <james.bowman@ftdichip.com>
219 * elf32-ft32.c (ft32_elf_howto_table): Use complain_overflow_dont
222 2017-08-31 Alan Modra <amodra@gmail.com>
225 * opncls.c (bfd_close_all_done): Don't call bfd_cache_close
226 before _close_and_cleanup. Call iovec->bclose after.
227 (bfd_close): Remove code common to, and call, bfd_close_all_done.
229 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
231 * elf32-i386.c (elf_i386_plt_type): Removed.
232 (elf_i386_plt): Likewise.
233 (elf_i386_get_synthetic_symtab): Updated. Call
234 _bfd_x86_elf_get_synthetic_symtab.
235 * elf64-x86-64.c (elf_x86_64_plt_type): Removed.
236 (elf_x86_64_plt): Likewise.
237 (elf_x86_64_get_synthetic_symtab): Updated. Call
238 _bfd_x86_elf_get_synthetic_symtab.
239 * elfxx-x86.c (elf_i386_get_plt_got_vma): New function.
240 (elf_x86_64_get_plt_got_vma): Likewise.
241 (elf_i386_valid_plt_reloc_p): Likewise.
242 (elf_x86_64_valid_plt_reloc_p): Likewise.
243 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
244 * elfxx-x86.h (elf_x86_plt_type): New.
245 (elf_x86_plt): Likewise.
246 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
248 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
250 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Check
251 target_id instead of elf_machine_code.
253 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
255 * elf32-i386.c (ELF_DYNAMIC_INTERPRETER): Removed.
256 (elf_i386_lazy_plt_layout): Likewise.
257 (elf_i386_non_lazy_plt_layout): Likewise.
258 (elf_i386_plt_layout): Likewise.
259 (elf_i386_link_hash_table): Likewise.
260 (elf_i386_next_tls_desc_index): Likewise.
261 (elf_i386_srelplt2): Likewise.
262 (elf_i386_plt): Likewise.
263 (elf_i386_lazy_plt): Likewise.
264 (elf_i386_non_lazy_plt): Likewise.
265 (elf_i386_link_hash_table_create): Likewise.
266 (bfd_elf32_bfd_link_hash_table_create): Likewise.
267 (elf_i386_lazy_plt): Updated.
268 (elf_i386_non_lazy_plt): Likewise.
269 (elf_i386_lazy_ibt_plt): Likewise.
270 (elf_i386_non_lazy_ibt_plt): Likewise.
271 (elf_i386_allocate_dynrelocs): Likewise.
272 (elf_i386_size_dynamic_sections): Likewise.
273 (elf_i386_relocate_section): Likewise.
274 (elf_i386_finish_dynamic_symbol): Likewise.
275 (elf_i386_finish_dynamic_sections): Likewise.
276 (elf_i386_get_synthetic_symtab): Likewise.
277 (elf_i386_link_setup_gnu_properties): Likewise.
278 (elf_i386_nacl_plt): Likewise.
279 * elf64-x86-64.c (ABI_64_P): Removed.
280 (ELF64_DYNAMIC_INTERPRETER): Likewise.
281 (ELF32_DYNAMIC_INTERPRETER): Likewise.
282 (elf_x86_64_lazy_plt_layout): Likewise.
283 (elf_x86_64_non_lazy_plt_layout): Likewise.
284 (elf_x86_64_plt_layout): Likewise.
285 (elf_x86_64_link_hash_table): Likewise.
286 (elf_x86_64_plt): Likewise.
287 (elf_x86_64_lazy_plt): Likewise.
288 (elf_x86_64_non_lazy_plt): Likewise.
289 (elf_x86_64_link_hash_table_create): Likewise.
290 (bfd_elf64_bfd_link_hash_table_create): Likewise.
291 (bfd_elf32_bfd_link_hash_table_create): Likewise.
292 (elf_x86_64_lazy_plt): Updated.
293 (elf_x86_64_non_lazy_plt): Likewise.
294 (elf_x86_64_lazy_bnd_plt): Likewise.
295 (elf_x86_64_non_lazy_bnd_plt): Likewise.
296 (elf_x86_64_lazy_ibt_plt): Likewise.
297 (elf_x32_lazy_ibt_plt): Likewise.
298 (elf_x86_64_non_lazy_ibt_plt): Likewise.
299 (elf_x32_non_lazy_ibt_plt): Likewise.
300 (elf_x86_64_allocate_dynrelocs): Likewise.
301 (elf_x86_64_size_dynamic_sections): Likewise.
302 (elf_x86_64_relocate_section): Likewise.
303 (elf_x86_64_finish_dynamic_symbol): Likewise.
304 (elf_x86_64_finish_dynamic_sections): Likewise.
305 (elf_x86_64_get_synthetic_symtab): Likewise.
306 (elf_x86_64_link_setup_gnu_properties): Likewise.
307 (elf_x86_64_nacl_plt): Likewise.
308 * elfxx-x86.c: Include "objalloc.h", "elf/i386.h" and
310 (ELF32_DYNAMIC_INTERPRETER): New.
311 (ELF64_DYNAMIC_INTERPRETER): Likewise.
312 (ELFX32_DYNAMIC_INTERPRETER): Likewise.
313 (_bfd_x86_elf_link_hash_table_create): Likewise.
314 (_bfd_x86_elf_link_hash_table_free): Renamed to ...
315 (elf_x86_link_hash_table_free): This. Make it static.
316 * elfxx-x86.h: Don't include "objalloc.h".
318 (elf_x86_lazy_plt_layout): Likewise.
319 (elf_x86_non_lazy_plt_layout): Likewise.
320 (elf_x86_plt_layout): Likewise.
321 (_bfd_x86_elf_link_hash_table_create): Likewise.
322 (bfd_elf64_bfd_link_hash_table_create): Likewise.
323 (bfd_elf32_bfd_link_hash_table_create): Likewise.
324 (elf_x86_link_hash_table): Add plt, lazy_plt, non_lazy_plt,
325 srelplt2 and next_tls_desc_index.
326 (_bfd_x86_elf_link_hash_table_free): Removed.
328 2017-08-30 Maciej W. Rozycki <macro@imgtec.com>
330 * elfxx-mips.c (mips_elf_perform_relocation): Correct microMIPS
331 branch offset interpretation.
333 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
336 * opncls.c (bfd_close_all_done): Call _close_and_cleanup.
338 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
340 * elf64-x86-64.c (elf_x86_64_next_tls_desc_index): Removed.
341 (elf_x86_64_srelplt2): Likewise.
343 2017-08-30 Alan Modra <amodra@gmail.com>
345 * elf64-ppc.c (struct ppc_link_hash_table): Add do_tls_opt.
346 (ppc64_elf_tls_optimize): Set it.
347 (ppc64_elf_relocate_section): Nop addis on TPREL16_HA, and convert
348 insn on TPREL16_LO and TPREL16_LO_DS relocs to use r13 when
349 addis would add zero.
350 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add do_tls_opt.
351 (ppc_elf_tls_optimize): Set it.
352 (ppc_elf_relocate_section): Nop addis on TPREL16_HA, and convert
353 insn on TPREL16_LO relocs to use r2 when addis would add zero.
355 2017-08-30 Alan Modra <amodra@gmail.com>
357 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing
358 __tls_get_addr call sequences to LE, don't move the addi down
359 to the nop. Replace the bl with addi and leave the nop alone.
361 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
363 * elf32-i386.c (elf_i386_pie_finish_undefweak_symbol):
365 * elf64-x86-64.c (elf_x86_64_finish_local_dynamic_symbol):
367 (elf_x86_64_pie_finish_undefweak_symbol): Likewise.
369 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
371 * Makefile.am (BFD32_BACKENDS): Add elfxx-x86.lo.
372 (BFD64_BACKENDS): Likewise.
373 (BFD32_BACKENDS_CFILES): Add elfxx-x86.c.
374 (BFD64_BACKENDS_CFILES): Likewise.
375 * Makefile.in: Regenerated.
376 * configure.ac (bfd_backends): Add elfxx-x86.lo together with
377 elf32-i386.lo and elf64-x86-64.lo.
378 * configure: Regenerated.
379 * elf32-i386.c: Include "elfxx-x86.h" instead of "sysdep.h",
380 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
381 "objalloc.h" and "hashtab.h".
382 (ELIMINATE_COPY_RELOCS): Removed.
383 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
384 (SYMBOL_NO_COPYRELOC): Likewise.
385 (elf_i386_link_hash_entry): Likewise.
386 (GOT_UNKNOWN): Likewise.
387 (GOT_NORMAL): Likewise.
388 (GOT_TLS_GD): Likewise.
389 (elf_i386_hash_entry): Likewise.
390 (elf_i386_obj_tdata): Likewise.
391 (elf_i386_tdata): Likewise.
392 (elf_i386_local_got_tls_type): Likewise.
393 (elf_i386_local_tlsdesc_gotent): Likewise.
394 (elf_i386_hash_table): Likewise.
395 (elf_i386_link_hash_newfunc): Likewise.
396 (elf_i386_local_htab_hash): Likewise.
397 (elf_i386_local_htab_eq): Likewise.
398 (elf_i386_get_local_sym_hash): Likewise.
399 (elf_i386_link_hash_table_free): Likewise.
400 (elf_i386_copy_indirect_symbol): Likewise.
401 (elf_i386_fixup_symbol): Likewise.
402 (elf_i386_readonly_dynrelocs): Likewise.
403 (elf_i386_always_size_sections): Likewise.
404 (elf_i386_set_tls_module_base): Likewise.
405 (elf_i386_dtpoff_base): Likewise.
406 (compare_relocs): Likewise.
407 (elf_i386_hash_symbol): Likewise.
408 (elf_i386_parse_gnu_properties): Likewise.
409 (elf_i386_merge_gnu_properties): Likewise.
410 (elf_i386_link_check_relocs): Likewise.
411 (elf_i386_merge_symbol_attribute): Likewise.
412 (bfd_elf32_bfd_link_check_relocs): Likewise.
413 (elf_backend_copy_indirect_symbol): Likewise.
414 (elf_backend_always_size_sections): Likewise.
415 (elf_backend_omit_section_dynsym): Likewise.
416 (elf_backend_hash_symbol): Likewise.
417 (elf_backend_fixup_symbol): Likewise.
418 (elf_backend_parse_gnu_properties): Likewise.
419 (elf_backend_merge_gnu_properties): Likewise.
420 (elf_backend_merge_symbol_attribute): Likewise.
421 (elf_i386_mkobject): Updated.
422 (elf_i386_link_hash_table_create): Likewise.
423 (elf_i386_check_tls_transition): Likewise.
424 (elf_i386_tls_transition): Likewise.
425 (elf_i386_convert_load_reloc): Likewise.
426 (elf_i386_check_relocs): Likewise.
427 (elf_i386_adjust_dynamic_symbol): Likewise.
428 (elf_i386_allocate_dynrelocs): Likewise.
429 (elf_i386_convert_load): Likewise.
430 (elf_i386_size_dynamic_sections): Likewise.
431 (elf_i386_relocate_section): Likewise.
432 (elf_i386_finish_dynamic_symbol ): Likewise.
433 (elf_i386_finish_dynamic_sections): Likewise.
434 (elf_i386_output_arch_local_syms): Likewise.
435 (elf_i386_get_synthetic_symtab): Likewise.
436 (elf_i386_link_setup_gnu_properties): Likewise.
437 (elf_i386_link_hash_table): Use elf_x86_link_hash_table, instead
438 of elf_link_hash_table, as base.
439 (elf_i386_next_tls_desc_index): New.
440 (elf_i386_srelplt2): Likewise.
441 (elf_i386_plt): Likewise.
442 (elf_i386_lazy_plt): Likewise.
443 (elf_i386_non_lazy_plt): Likewise.
444 * elf32-x86-64.c: Include "elfxx-x86.h" instead of "sysdep.h",
445 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
446 "objalloc.h" and "hashtab.h".
447 (ELIMINATE_COPY_RELOCS): Removed.
448 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
449 (SYMBOL_NO_COPYRELOC): Likewise.
450 (elf_x86_64_link_hash_entry): Likewise.
451 (GOT_UNKNOWN): Likewise.
452 (GOT_NORMAL): Likewise.
453 (GOT_TLS_GD): Likewise.
454 (elf_x86_64_hash_entry): Likewise.
455 (elf_x86_64_obj_tdata): Likewise.
456 (elf_x86_64_tdata): Likewise.
457 (elf_x86_64_local_got_tls_type): Likewise.
458 (elf_x86_64_local_tlsdesc_gotent): Likewise.
459 (elf_x86_64_hash_table): Likewise.
460 (elf_x86_64_link_hash_newfunc): Likewise.
461 (elf_x86_64_local_htab_hash): Likewise.
462 (elf_x86_64_local_htab_eq): Likewise.
463 (elf_x86_64_get_local_sym_hash): Likewise.
464 (elf_x86_64_link_hash_table_free): Likewise.
465 (elf_x86_64_copy_indirect_symbol): Likewise.
466 (elf_x86_64_fixup_symbol): Likewise.
467 (elf_x86_64_readonly_dynrelocs): Likewise.
468 (elf_x86_64_always_size_sections): Likewise.
469 (elf_x86_64_set_tls_module_base): Likewise.
470 (elf_x86_64_dtpoff_base): Likewise.
471 (compare_relocs): Likewise.
472 (elf_x86_64_merge_symbol_attribute): Likewise.
473 (elf_x86_64_hash_symbol): Likewise.
474 (elf_x86_64_parse_gnu_properties): Likewise.
475 (elf_x86_64_merge_gnu_properties): Likewise.
476 (elf_x86_64_link_check_relocs): Likewise.
477 (elf_backend_copy_indirect_symbol): Likewise.
478 (elf_backend_always_size_sections): Likewise.
479 (bfd_elf64_bfd_link_check_relocs): Likewise.
480 (elf_backend_merge_symbol_attribute): Likewise.
481 (elf_backend_hash_symbol): Likewise.
482 (elf_backend_omit_section_dynsym): Likewise.
483 (elf_backend_fixup_symbol): Likewise.
484 (elf_backend_parse_gnu_properties): Likewise.
485 (elf_backend_merge_gnu_properties): Likewise.
486 (bfd_elf32_bfd_link_check_relocs): Likewise.
487 (elf_x86_64_mkobject): Updated.
488 (elf_x86_64_link_hash_table_create): Likewise.
489 (elf_x86_64_check_tls_transition): Likewise.
490 (elf_x86_64_tls_transition): Likewise.
491 (elf_x86_64_convert_load_reloc): Likewise.
492 (elf_x86_64_check_relocs): Likewise.
493 (elf_x86_64_adjust_dynamic_symbol): Likewise.
494 (elf_x86_64_allocate_dynrelocs): Likewise.
495 (elf_x86_64_convert_load): Likewise.
496 (elf_x86_64_size_dynamic_sections): Likewise.
497 (elf_x86_64_relocate_section): Likewise.
498 (elf_x86_64_finish_dynamic_symbol ): Likewise.
499 (elf_x86_64_finish_dynamic_sections): Likewise.
500 (elf_x86_64_output_arch_local_syms): Likewise.
501 (elf_x86_64_get_synthetic_symtab): Likewise.
502 (elf_x86_64_link_setup_gnu_properties): Likewise.
503 (elf_x86_64_link_hash_table): Use elf_x86_link_hash_table,
504 instead of elf_link_hash_table, as base.
505 (elf_x86_64_next_tls_desc_index): New.
506 (elf_x86_64_srelplt2): Likewise.
507 (elf_x86_64_plt): Likewise.
508 (elf_x86_64_lazy_plt): Likewise.
509 (elf_x86_64_non_lazy_plt): Likewise.
510 * elfxx-x86.c: New file.
511 * elfxx-x86.h: Likewise.
513 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
515 * elf32-i386.c (elf_i386_get_synthetic_symtab): Simplify bad
517 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
519 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
521 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check valid PLT
522 sections before checking dynamic relocations and free invalid
523 PLT section contents.
524 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
526 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
528 * elf-bfd.h (_bfd_elf_ifunc_get_synthetic_symtab): Removed.
529 * elf-ifunc.c (_bfd_elf_ifunc_get_synthetic_symtab): Likewise.
531 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
534 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check for valid
536 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
538 2017-08-27 H.J. Lu <hongjiu.lu@intel.com>
540 * elf32-i386.c (elf_i386_link_hash_newfunc): Initialize
542 * elf64-x86-64.c (elf_x86_64_link_hash_newfunc): Likewise.
544 2017-08-26 H.J. Lu <hongjiu.lu@intel.com>
547 * elf-bfd.h (elf_obj_tdata): Use ENUM_BITFIELD on object_id,
548 dyn_lib_class and has_gnu_symbols. Change bad_symtab to bitfield.
549 Add a has_no_copy_on_protected bitfield.
550 (elf_has_no_copy_on_protected): New.
551 * elf-properties.c (_bfd_elf_parse_gnu_properties): Set
552 elf_has_no_copy_on_protected for GNU_PROPERTY_NO_COPY_ON_PROTECTED.
553 (elf_merge_gnu_property_list): Likewise.
554 (_bfd_elf_link_setup_gnu_properties): Set extern_protected_data
555 to FALSE for elf_has_no_copy_on_protected.
556 * elf32-i386.c (SYMBOL_NO_COPYRELOC): New.
557 (elf_i386_link_hash_entry): Add def_protected.
558 (elf_i386_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
559 when checking info->nocopyreloc.
560 (elf_i386_link_setup_gnu_properties): Don't set
561 extern_protected_data here.
562 (elf_i386_merge_symbol_attribute): New function.
563 (elf_backend_merge_symbol_attribute): New.
564 * elf64-x86-64.c (SYMBOL_NO_COPYRELOC): New.
565 (elf_x86_64_link_hash_entry): Add def_protected.
566 (elf_x86_64_need_pic): Report protected symbol for def_protected.
567 (elf_x86_64_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
568 when checking info->nocopyreloc.
569 (elf_x86_64_relocate_section): Also check for R_X86_64_PC32
570 relocation run-time overflow and unresolvable R_X86_64_32S
571 relocation against protected data symbol defined in shared object
572 with GNU_PROPERTY_NO_COPY_ON_PROTECTED.
573 (elf_x86_64_link_setup_gnu_properties): Don't set
574 extern_protected_data here.
575 (elf_x86_64_merge_symbol_attribute): New function.
576 (elf_backend_merge_symbol_attribute): New.
578 2017-08-26 Alan Modra <amodra@gmail.com>
580 * elf32-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
581 (ppc_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
582 (ppc_elf_relocate_section): Comment fix.
583 * elf64-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
584 (ppc64_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
585 Support dynamic relocs for TPREL16 when non-pic too.
586 (dec_dynrel_count): Adjust TPREL16 handling as per check_relocs.
587 (ppc64_elf_relocate_section): Support dynamic relocs for TPREL16
590 2017-08-25 H.J. Lu <hongjiu.lu@intel.com>
592 * elf32-i386.c (elf_i386_link_hash_entry): Remove redundant
593 "symbol" in comments.
594 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Likewise.
596 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
599 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for
600 R_X86_64_PC32 relocation run-time overflow and unresolvable
601 R_X86_64_32S relocation with -z nocopyreloc.
603 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
605 * elf32-i386.c (elf_i386_check_relocs): Revert the last change.
606 Undefined symbols may not have a type.
607 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
609 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
611 * elf64-x86-64.c (elf_x86_64_need_pic): Add an argument for
612 bfd_link_info. Report shared, PIE or PDE object based on
614 (elf_x86_64_check_relocs): Update elf_x86_64_need_pic call.
615 (elf_x86_64_relocate_section): Likewise.
617 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
619 * elf32-i386.c (elf_i386_check_relocs): Increment PLT count only
620 for function symbols.
621 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
623 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
625 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set
626 extern_protected_data to FALSE if GNU_PROPERTY_NO_COPY_ON_PROTECTED
627 is set on any input relocatable file.
628 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
630 2017-08-23 Alan Modra <amodra@gmail.com>
633 * elf64-ppc.c (ensure_undef_dynamic): Rename from
634 ensure_undefweak_dynamic. Handle undefined too.
635 * elf32-ppc.c (ensure_undef_dynamic): Likewise.
636 * elf32-hppa.c (ensure_undef_dynamic): Likewise.
637 (allocate_dynrelocs): Discard undefined non-default visibility
638 relocs first. Make undefined syms dynamic. Tidy goto.
640 2017-08-21 Alan Modra <amodra@gmail.com>
641 H.J. Lu <hongjiu.lu@intel.com>
644 * elf-bfd.h (SYMBOLIC_BIND): Return TRUE for __start/__stop symbols.
645 * elflink.c (bfd_elf_define_start_stop): Rewrite.
647 2017-08-21 Hans-Peter Nilsson <hp@bitrange.com>
650 * elf64-mmix.c (mmix_elf_relax_section): Correct handling of
651 undefined weak symbols.
653 2017-08-18 Nick Clifton <nickc@redhat.com>
656 * tekhex.c (getsym): Fix check for source pointer walking off the
657 end of the input buffer.
659 2017-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
662 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Skip IFUNC
663 relocations in debug sections, change abort to _bfd_error_handler.
665 2017-08-14 Nick Clifton <nickc@redhat.com>
668 * elf.c (setup_group): Check for an empty or very small group
670 * po/bfd.pot: Regenerate.
672 2017-08-14 Alan Modra <amodra@gmail.com>
675 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't add
676 alignment padding here.
677 * elflink.c (bfd_elf_discard_info): Add .eh_frame padding here
678 in a reverse pass over sections.
680 2017-08-11 H.J. Lu <hongjiu.lu@intel.com>
683 * elf32-i386.c (elf_i386_get_synthetic_symtab): Allocate space
684 for @plt suffixes first.
685 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
687 2017-08-08 Nick Clifton <nickc@redhat.com>
690 * elf-attrs.c (_bfd_elf_parse_attributes): Complain about very
691 small section lengths.
692 * elf.c (_bfd_elf_setup_sections): Skip empty entries in the group
694 (elfcore_grok_freebsd_prstatus): Add checks to make sure that
695 there is enough data present in the note.
697 2017-08-08 Alan Modra <amodra@gmail.com>
700 * elf32-microblaze.c (microblaze_elf_check_relocs): Don't bump
701 got.refcount for GOTOFF relocs, just create .got section.
703 2017-08-07 H.J. Lu <hongjiu.lu@intel.com>
705 * elflink.c (elf_link_add_object_symbols): Move common symbol
706 check after bed->common_definition.
708 2017-08-07 Alan Modra <amodra@gmail.com>
711 * elflink.c (bfd_elf_final_link): Don't segfault when sections
712 needed to define various dynamic tags have been discarded.
714 2017-08-07 Nick Clifton <nickc@redhat.com>
717 * elf32-i386.c (elf_i386_link_setup_gnu_properties): If the dynobj
718 has not been set then use the bfd returned by
719 _bfd_elf_link_setup_gnu_properties. If that is null then search
720 through all the input bfds selecting the first normal, ELF format
722 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
724 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
726 * elf32-i386.c (elf_i386_link_hash_entry): Change tls_get_addr
728 (elf_i386_link_hash_newfunc): Initialize tls_get_addr to 0.
729 (elf_i386_check_tls_transition): Check tls_get_addr directly.
730 (elf_i386_convert_load_reloc): Update tls_get_addr check.
731 (elf_i386_link_check_relocs): New function.
732 (bfd_elf32_bfd_link_check_relocs): New.
733 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Change tls_get_addr
735 (elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 0.
736 (elf_x86_64_check_tls_transition): Check tls_get_addr directly.
737 (elf_x86_64_convert_load_reloc): Update tls_get_addr check.
738 (elf_x86_64_link_check_relocs): New function.
739 (bfd_elf64_bfd_link_check_relocs): New.
740 (bfd_elf32_bfd_link_check_relocs): Likewise.
742 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
745 * elflink.c (elf_link_add_object_symbols): Treat common symbol
746 as undefined for --no-define-common.
748 2017-08-05 Alan Modra <amodra@gmail.com>
750 * elf32-hppa.c (elf32_hppa_set_gp): Don't require an
751 hppa_link_hash_table.
753 2017-08-02 Max Filippov <jcmvbkbc@gmail.com>
755 * xtensa-isa.c (xtensa_isa_init): Don't update lookup table
756 entries for sysregs with negative indices.
758 2017-08-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
760 * elf32-s390.c (elf_s390_finish_dynamic_sections): Skip if it
761 isn't the S/390 specific elf data.
762 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
764 2017-07-31 Kuan-Lin Chen <rufus@andestech.com>
766 * elfxx-riscv.c (riscv_elf_add_sub_reloc): New function.
767 * (howto_table) [R_RISCV_ADD8]: Use riscv_elf_add_sub_reloc.
768 [R_RISCV_ADD16]: Likewise.
769 [R_RISCV_ADD32]: Likewise.
770 [R_RISCV_ADD64]: Likewise.
771 [R_RISCV_SUB6]: Likewise.
772 [R_RISCV_SUB8]: Likewise.
773 [R_RISCV_SUB16]: Likewise.
774 [R_RISCV_SUB32]: Likewise.
775 [R_RISCV_SUB64]: Likewise.
777 2017-07-31 Alan Modra <amodra@gmail.com>
779 * elf64-ppc.c (ppc64_elf_tls_setup): Warn on --plt-localentry
780 without ld.so checks.
782 2017-07-29 Alan Modra <amodra@gmail.com>
785 * elf64-ppc.c (struct ppc_link_hash_entry): Add non_zero_localentry.
786 (ppc64_elf_merge_symbol): Set non_zero_localentry.
787 (is_elfv2_localentry0): Test non_zero_localentry.
788 (ppc64_elf_tls_setup): Default to --no-plt-localentry.
790 2017-07-28 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
792 * elf32-s390.c (elf_s390_finish_dynamic_sections): Add NULL
793 pointer check for htab->elf.irelplt.
794 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
796 2017-07-27 Nick Clifton <nickc@redhat.com>
799 * mach-o.c (bfd_mach_o_read_symtab_strtab): Fail if the symtab
801 * nlmcode.h (nlm_swap_auxiliary_headers_in): Replace assertion
803 * section.c (bfd_make_section_with_flags): Fail if the name or bfd
805 * vms-alpha.c (bfd_make_section_with_flags): Correct computation
807 (evax_bfd_print_emh): Check for invalid string lengths.
809 2017-07-25 Nick Clifton <nickc@redhat.com>
811 * po/fr.po: Updated French translation.
813 2017-07-25 Benjamin Green <bengreen5mx@gmail.com>
816 * elf32-msp430.c (msp430_elf_relax_section): Allow conversion of
817 16-bit absolute branches into 10-bit pc-relative branches on the
818 MSP430 as well as the MSP430X.
820 2017-07-25 Alan Modra <amodra@gmail.com>
822 * elf64-ppc.c (struct map_stub): Add tls_get_addr_opt_bctrl.
823 (stub_eh_frame_size): New function.
824 (ppc_size_one_stub): Set group tls_get_addr_opt_bctrl.
825 (group_sections): Init group tls_get_addr_opt_bctrl.
826 (ppc64_elf_size_stubs): Update sizing and initialization of
827 .eh_frame. Iteration over stubs via group list.
828 (ppc64_elf_build_stubs): Iterate over stubs via group list.
829 (ppc64_elf_finish_dynamic_sections): Update finalization of
832 2017-07-24 Nick Clifton <nickc@redhat.com>
835 * mach-o.c (bfd_mach_o_canonicalize_relocs): Pass the base address
836 of the relocs to the canonicalize_one_reloc routine.
837 * mach-o.h (struct bfd_mach_o_backend_data): Update the prototype
838 for the _bfd_mach_o_canonicalize_one_reloc field.
839 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add
840 res_base parameter. Use to check for corrupt pair relocs.
841 * mach-o-aarch64.c (bfd_mach_o_arm64_canonicalize_one_reloc):
843 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc):
845 * mach-o-x86-64.c (bfd_mach_o_x86_64_canonicalize_one_reloc):
848 * vms-alpha.c (_bfd_vms_slurp_eihd): Make sure that there is
849 enough data in the record before attempting to parse it.
850 (_bfd_vms_slurp_eeom): Likewise.
852 (_bfd_vms_slurp_egsd): Check for an invalid section index.
853 (image_set_ptr): Likewise.
854 (alpha_vms_slurp_relocs): Likewise.
856 (alpha_vms_object_p): Check for a truncated record.
858 2017-07-24 Nick Clifton <nickc@redhat.com>
861 * reloc.c (_bfd_unrecognized_reloc): New function. Reports
862 an unrecognized reloc and sets the bfd_error value.
863 * libbfd.h: Regenerate.
864 * elf32-arm.c (elf32_arm_final_link_relocate): Use the new
866 * elf32-i386.c (elf_i386_relocate_section): Likewise.
867 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
868 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
869 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.
870 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
872 2017-07-23 Alan Modra <amodra@gmail.com>
874 * elf64-ppc.c (ppc64_elf_size_stubs): Correct advance to
877 2017-07-19 Szabolcs Nagy <szabolcs.nagy@arm.com>
880 * elfnn-aarch64.c (elfNN_aarch64_reloc_type_class): Return
881 reloc_class_ifunc for ifunc symbols.
883 2017-07-19 Nick Clifton <nickc@redhat.com>
886 * archive.c (bfd_generic_archive_p): If the bfd does not have the
887 correct magic bytes at the start, set the error to wrong format
888 and clear the format selector before returning NULL.
890 2017-07-19 Nick Clifton <nickc@redhat.com>
893 * coff-rs6000.c (_bfd_strntol): New function.
894 (_bfd_strntoll): New function.
895 (GET_VALUE_IN_FIELD): New macro.
896 (EQ_VALUE_IN_FIELD): new macro.
897 (_bfd_xcoff_slurp_armap): Use new macros.
898 (_bfd_xcoff_archive_p): Likewise.
899 (_bfd_xcoff_read_ar_hdr): Likewise.
900 (_bfd_xcoff_openr_next_archived_file): Likewise.
901 (_bfd_xcoff_stat_arch_elt): Likewise.
902 * coff64-rs6000.c (_bfd_strntol): New function.
903 (_bfd_strntoll): New function.
904 (GET_VALUE_IN_FIELD): New macro.
905 (xcoff64_slurp_armap): Use new macros.
907 2017-07-19 Claudiu Zissulescu <claziss@synopsys.com>
908 John Eric Martin <John.Martin@emmicro-us.com>
910 * bfd-in2.h: Regenerate.
911 * libbfd.h: Regenerate.
912 * elf32-arc.c (JLI): Define.
913 * reloc.c: Add JLI relocations.
915 2017-07-18 Nick Clifton <nickc@redhat.com>
918 * coff-sh.c: Fix spelling typos.
919 * compress.c: Likewise.
920 * cpu-pdp11.c: Likewise.
921 * ecofflink.c: Likewise.
922 * elf-m10300.c: Likewise.
924 * elf32-arm.c: Likewise.
925 * elf32-m68k.c: Likewise.
926 * elf32-nds32.c: Likewise.
927 * elf32-ppc.c: Likewise.
928 * elf32-sh.c: Likewise.
929 * elf32-v850.c: Likewise.
930 * elf64-ppc.c: Likewise.
931 * elf64-x86-64.c: Likewise.
932 * elflink.c: Likewise.
933 * elfnn-aarch64.c: Likewise.
934 * elfxx-mips.c: Likewise.
937 * vms-alpha.c: Likewise.
938 * xcofflink.c: Likewise.
940 2017-07-18 Nick Clifton <nickc@redhat.com>
943 * coffcode.h (handle_COMDAT): Replace abort with an error message
946 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
949 * elf64-x86-64.c (elf_x86_64_relocate_section): Limit PIC check
952 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
954 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
956 2017-07-16 Alan Modra <amodra@gmail.com>
958 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimize
959 __tls_index GOT entries when using __tls_get_addr_opt stub.
960 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
962 2017-07-12 Alan Modra <amodra@gmail.com>
964 * po/es.po: Update from translationproject.org/latest/bfd/.
965 * po/fi.po: Likewise.
966 * po/fr.po: Likewise.
967 * po/id.po: Likewise.
968 * po/ja.po: Likewise.
969 * po/ro.po: Likewise.
970 * po/ru.po: Likewise.
971 * po/sr.po: Likewise.
972 * po/sv.po: Likewise.
973 * po/tr.po: Likewise.
974 * po/uk.po: Likewise.
975 * po/vi.po: Likewise.
976 * po/zh_CN.po: Likewise.
977 * po/hr.po: New file from translationproject.org.
978 * configure.ac (ALL_LINGUAS): Add hr. Sort.
979 * configure: Regenerate.
981 2017-07-12 Nick Clifton <nickc@redhat.com>
983 Fix compile time warnings using gcc 7.1.1.
984 * elf32-xtensa.c (elf_xtensa_get_plt_section): Increase length of
986 (elf_xtensa_get_gotplt_section): Increase length of got_name
988 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add a
989 default return of FALSE.
990 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc): Add a
991 default return of FALSE.
993 2017-07-12 Alan Modra <amodra@gmail.com>
995 * binary.c (binary_set_section_contents): Don't print filepos in
997 (coff_write_object_contents): Cast size_t for error message.
998 (coff_slurp_line_table): Don't use bfd_vma symndx.
999 (coff_slurp_reloc_table): Remove unneeded cast.
1000 * dwarf2.c (read_section): Cast bfd_int64_t to long long for
1002 (find_abstract_instance_name): Likewise.
1003 * elf32-arm.c (arm_type_of_stub): Correct error arg order.
1004 (bfd_elf32_arm_stm32l4xx_erratum_scan): Don't cast error arg.
1005 (elf32_arm_check_relocs): Make r_symndx an int.
1006 * elf32-cris.c (cris_elf_check_relocs): Delete extraneous %s in
1008 * elf32-metag.c (elf_metag_relocate_section): Delete extra error
1010 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Rewrite bogus
1012 * elf32-i386.c (elf_i386_check_relocs): Make r_symndx an int.
1013 * elf32-s390.c (elf_s390_check_relocs): Likewise.
1014 * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
1015 * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
1016 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
1017 * elf64-s390.c (elf_s390_check_relocs): Likewise.
1018 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1019 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
1020 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
1021 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
1022 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
1023 * elf64-mmix.c (_bfd_mmix_after_linker_allocation): Cast size_t args
1024 and use %lu for error message.
1025 * elflink.c (elf_link_adjust_relocs): Delete extra error message arg.
1026 * mmo.c (mmo_scan): Make stab_loc a file_ptr. Cast expression for
1029 * elf32-arm.c (elf32_arm_tls_relax): Correct format string and args
1031 (elf32_arm_final_link_relocate): Likewise.
1032 * coff-arm.c (bfd_arm_process_before_allocation): Likewise.
1033 * coffcode.h (styp_to_sec_flags): Likewise.
1034 * cofflink.c (_bfd_coff_write_global_sym): Likewise.
1035 * ecoff.c (_bfd_ecoff_slurp_symbol_table): Likewise.
1036 * elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise.
1037 * elf32-bfin.c (bfinfdpic_check_relocs): Likewise.
1038 (elf32_bfin_merge_private_bfd_data): Likewise.
1039 * elf32-cris.c (cris_elf_relocate_section): Likewise.
1040 * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
1041 * elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise.
1042 (i370_elf_relocate_section): Likewise.
1043 * elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise.
1044 * elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise.
1045 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
1046 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
1047 * elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise.
1048 * elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise.
1049 * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
1050 * elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise.
1051 (_bfd_mips_elf_merge_private_bfd_data): Likewise.
1052 * ieee.c (ieee_write_id, read_id): Likewise.
1053 * mach-o.c (bfd_mach_o_write_contents): Likewise.
1054 (bfd_mach_o_layout_commands, bfd_mach_o_read_section_32): Likewise.
1055 (bfd_mach_o_read_section_64, bfd_mach_o_read_symtab_symbol): Likewise.
1056 (bfd_mach_o_read_command, bfd_mach_o_header_p): Likewise.
1057 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Likewise.
1058 * stabs.c (_bfd_link_section_stabs): Likewise.
1060 * coff-arm.c (coff_arm_relocate_section): Use L modifier in error
1062 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
1063 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
1064 * coff-rs6000.c (xcoff_reloc_type_toc): Likewise.
1065 * coff-sh.c (sh_relax_section): Likewise.
1066 (sh_relax_delete_bytes, sh_swap_insns): Likewise.
1067 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
1068 * coffcode.h (coff_slurp_reloc_table): Likewise.
1069 * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
1070 (_bfd_coff_read_string_table): Likewise.
1071 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
1072 * compress.c (bfd_get_full_section_contents): Likewise.
1073 * dwarf2.c (read_formatted_entries, decode_line_info): Likewise.
1074 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
1075 * elf.c (bfd_elf_string_from_elf_section): Likewise.
1076 * elf32-arc.c (arc_special_overflow_checks): Likewise.
1077 * elf32-arm.c (elf32_arm_tls_relax): Likewise.
1078 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Likewise.
1079 (elf32_arm_write_section): Likewise.
1080 * elf32-bfin.c (bfin_relocate_section): Likewise.
1081 (bfinfdpic_relocate_section): Likewise.
1082 * elf32-hppa.c (hppa_build_one_stub): Likewise.
1083 (final_link_relocate, elf32_hppa_relocate_section): Likewise.
1084 * elf32-i386.c (elf_i386_tls_transition): Likewise.
1085 (elf_i386_relocate_section): Likewise.
1086 * elf32-ip2k.c (ip2k_final_link_relocate): Likewise.
1087 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
1088 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
1089 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1090 * elf32-metag.c (elf_metag_relocate_section): Likewise.
1091 * elf32-nds32.c (unrecognized_reloc_msg): Likewise.
1092 (nds32_elf_relax_longcall1, nds32_elf_relax_longcall2): Likewise.
1093 (nds32_elf_relax_longcall3, nds32_elf_relax_longjump1): Likewise.
1094 (nds32_elf_relax_longjump2, nds32_elf_relax_longjump3): Likewise.
1095 (nds32_elf_relax_longcall4, nds32_elf_relax_longcall5): Likewise.
1096 (nds32_elf_relax_longcall6, nds32_elf_relax_longjump4): Likewise.
1097 (nds32_elf_relax_longjump5, nds32_elf_relax_longjump6): Likewise.
1098 (nds32_elf_relax_longjump7, nds32_elf_relax_loadstore): Likewise.
1099 (nds32_elf_relax_ptr, nds32_elf_ex9_build_hash_table): Likewise.
1100 * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
1101 * elf32-rx.c (UNSAFE_FOR_PID): Likewise.
1102 * elf32-s390.c (invalid_tls_insn, elf_s390_relocate_section): Likewise.
1103 * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
1104 * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
1105 * elf32-sh.c (sh_elf_relax_section): Likewise.
1106 (sh_elf_relax_delete_bytes, sh_elf_swap_insns): Likewise.
1107 (sh_elf_relocate_section): Likewise.
1108 * elf32-sh64.c (shmedia_prepare_reloc): Likewise.
1109 * elf32-spu.c (spu_elf_relocate_section): Likewise.
1110 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
1111 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
1112 * elf32-v850.c (v850_elf_relax_section): Likewise.
1113 * elf32-vax.c (elf_vax_check_relocs): Likewise.
1114 (elf_vax_relocate_section): Likewise.
1115 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
1116 (extend_ebb_bounds_forward, extend_ebb_bounds_backward): Likewise.
1117 (compute_text_actions, compute_ebb_proposed_actions): Likewise.
1118 (do_fix_for_relocatable_link): Likewise.
1119 * elf64-alpha.c (elf64_alpha_relax_got_load): Likewise.
1120 (elf64_alpha_relax_with_lituse): Likewise.
1121 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Likewise.
1122 (elf_hppa_final_link_relocate): Likewise.
1123 * elf64-ia64-vms.c (elf64_ia64_relax_section): Likewise.
1124 (elf64_ia64_choose_gp, elf64_ia64_relocate_section): Likewise.
1125 (elf64_vms_link_add_object_symbols): Likewise.
1126 * elf64-mmix.c (mmix_elf_perform_relocation): Likewise.
1127 (mmix_final_link_relocate): Likewise.
1128 * elf64-s390.c (invalid_tls_insn): Likewise.
1129 (elf_s390_relocate_section): Likewise.
1130 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
1131 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
1132 (elf_x86_64_relocate_section): Likewise.
1133 * elfcode.h (elf_slurp_symbol_table): Likewise.
1134 * elfcore.h (elf_core_file_p): Likewise.
1135 * elflink.c (elf_link_read_relocs_from_section): Likewise.
1136 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
1137 (elfNN_aarch64_relocate_section): Likewise.
1138 * elfnn-ia64.c (elfNN_ia64_relax_section): Likewise.
1139 (elfNN_ia64_choose_gp, elfNN_ia64_relocate_section): Likewise.
1140 * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
1141 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
1142 (_bfd_mips_elf_relocate_section): Likewise.
1143 (_bfd_mips_elf_finish_dynamic_symbol, mips_finish_exec_plt): Likewise.
1144 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
1145 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
1146 * ieee.c (ieee_slurp_external_symbols): Likewise.
1147 * ihex.c (ihex_write_object_content): Likewise.
1148 * mach-o.c (bfd_mach_o_build_exec_seg_command): Likewise.
1149 * merge.c (_bfd_merged_section_offset): Likewise.
1150 * mmo.c (mmo_write_loc_chunk): Likewise.
1151 (mmo_write_object_contents): Likewise.
1152 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Likewise.
1153 * stabs.c (_bfd_link_section_stabs): Likewise.
1154 * xcofflink.c (xcoff_link_add_symbols, xcoff_find_tc0): Likewise.
1156 2017-07-11 Alan Modra <amodra@gmail.com>
1158 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo.
1160 2017-07-11 Alan Modra <amodra@gmail.com>
1162 * elf32-ppc.c (ppc_elf_relocate_section): Emit "unexpected
1163 instruction" error using _bfd_error_handler, not einfo.
1165 2017-07-10 Nick Clifton <nickc@redhat.com>
1167 * coffcode.h (coff_slurp_symbol_table): Do not include an entry
1168 for C_AIX_WEAKEXT if it has the same value as C_WEAKEXT.
1170 2017-07-07 John Baldwin <jhb@FreeBSD.org>
1172 * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PTLWPINFO.
1174 2017-07-07 Alan Modra <amodra@gmail.com>
1176 * coffcode.h (coff_slurp_symbol_table): Handle C_AIX_WEAKEXT.
1178 2017-07-07 Alan Modra <amodra@gmail.com>
1180 * bfd.c (_doprnt): Replace "L" with "ll" when printing bfd_vma
1181 as long long. Move code replacing "ll" with "I64", and simplify.
1183 2017-07-06 H.J. Lu <hongjiu.lu@intel.com>
1185 * bfd.c (_doprnt): Convert 'L' to 'l' when setting wide_width
1188 2017-07-05 H.J. Lu <hongjiu.lu@intel.com>
1190 * dwarf2.c (line_info_add_include_dir_stub): Replace time with
1192 (line_info_add_file_name): Likewise.
1193 (decode_line_info): Likewise.
1195 2017-07-04 Tristan Gingold <gingold@adacore.com>
1197 * version.m4: Bump version to 2.29.51
1198 * configure: Regenerate.
1200 2017-07-04 Jiong Wang <jiong.wang@arm.com>
1202 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Remove the
1203 sanity check at the head of this function.
1205 2017-07-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1207 * dwarf2.c (struct dwarf2_debug): Add fields dwarf_line_str_buffer and
1208 dwarf_line_str_size.
1209 (struct attr_abbrev): Add field implicit_const.
1210 (dwarf_debug_sections): Add .debug_line_str.
1211 (enum dwarf_debug_section_enum): Add debug_line_str and debug_max.
1212 (dwarf_debug_section_assert): Add static assertion.
1213 (read_indirect_line_string): New.
1214 (read_abbrevs): Support DW_FORM_implicit_const.
1215 (is_str_attr): Support DW_FORM_line_strp.
1216 (read_attribute_value): Support DW_FORM_line_strp and
1217 DW_FORM_implicit_const.
1218 (read_attribute): Support DW_FORM_implicit_const.
1219 (line_info_add_include_dir, line_info_add_include_dir_stub):
1220 (line_info_add_file_name, read_formatted_entries): New.
1221 (decode_line_info, parse_comp_unit): Support DWARF 5.
1222 (_bfd_dwarf2_cleanup_debug_info): Free dwarf_line_str_buffer.
1224 2017-07-03 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
1226 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove the
1227 abort statement that was put for symbols that are not dynamic.
1229 2017-07-03 Tristan Gingold <gingold@adacore.com>
1231 * po/bfd.pot: Regenerate
1233 2017-07-03 Alan Modra <amodra@gmail.com>
1235 * bfd.c (_doprnt): Rewrite "ll" and "L" modifiers to "I64" for
1236 __MSVCRT__. Support "L" modifier for bfd_vma. Formatting.
1237 * elf.c (setup_group): Use "Lx" to print sh_size.
1238 (_bfd_elf_setup_sections): Remove unnecessary cast and print
1239 unknown section type in hex.
1240 (copy_special_section_fields): Style fix.
1241 (bfd_section_from_shdr): Correct format for sh_link. Use a
1242 common error message for all the variants of unrecognized
1244 (assign_file_positions_for_load_sections): Use "Lx" for lma
1245 adjust error message.
1246 (assign_file_positions_for_non_load_sections): Formatting.
1247 (rewrite_elf_program_header): Formatting. Use "Lx" for
1248 bfd_vma values in error messages.
1249 * elfcode.h (elf_slurp_reloc_table_from_section): Cast
1250 ELF_R_SYM value to type expected by format.
1251 * elflink.c (elf_link_read_relocs_from_section): Use "Lx"
1253 (elf_link_add_object_symbols): Use "Lu" for symbol sizes.
1254 (elf_link_input_bfd): Use "Lx" for r_info.
1255 (bfd_elf_gc_record_vtinherit): Use "Lx" for offset.
1257 2017-07-03 Alan Modra <amodra@gmail.com>
1259 * bfd.c (bfd_scan_vma): Don't use long long unless HAVE_LONG_LONG.
1260 * coff-rs6000.c (FMT20): Handle hosts with 64-bit long and
1261 Microsoft C library variant of long long format specifier.
1262 (PRINT20): Cast value to bfd_uint64_t not long long.
1263 * coffcode.h (coff_print_aux): Use BFD_VMA_FMT.
1264 * coff-x86_64.c (coff_amd64_reloc): Use bfd_uint64_t rather than
1265 long long. Don't cast to bfd_vma.
1266 * elf32-score.c (score3_bfd_getl48): Likewise.
1267 * vms-alpha.c (_bfd_vms_slurp_eisd): Likewise.
1269 2017-07-03 Alan Modra <amodra@gmail.com>
1271 * elf.c (_bfd_elf_print_private_bfd_data): Use BFD_VMA_FMT to
1273 (bfd_elf_print_symbol): Don't cast symbol->flags.
1274 (_bfd_elf_symbol_from_bfd_symbol): Likewise.
1275 * elf32-ppc.c (ppc_elf_begin_write_processing): Correct
1276 _bfd_error_handler argument order.
1277 (ppc_elf_merge_private_bfd_data): Don't cast flags.
1279 2017-07-03 Alan Modra <amodra@gmail.com>
1281 * configure.ac: Invoke AC_CHECK_TYPES for long long. Invoke
1282 AC_TYPE_LONG_DOUBLE.
1283 * configure: Regenerate.
1284 * config.in: Regenerate.
1286 2017-06-29 Andrew Waterman <andrew@sifive.com>
1288 * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Fix TLS copy
1291 2017-06-29 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
1293 * elfxx-sparc.c (allocate_dynrelocs): Don't make a symbol dynamic
1294 unless it is undefined weak.
1295 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Set the flag
1296 relative_reloc to direct non-dynamic symbols to R_SPARC_RELATIVE
1298 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): If symbol
1299 is not dynamic in PIC, abort.
1301 2017-06-29 Jiong Wang <jiong.wang@arm.com>
1304 * elfnn-aarch64.c (elfNN_aarch64_allocate_dynrelocs): Only make
1305 undefined weak symbols into dynamic.
1306 (elfNN_aarch64_final_link_relocate): Generate runtime RELATIVE
1307 relocation for non-dynamic symbols.
1308 (elfNN_aarch64_finish_dynamic_symbol): Add sanity check.
1310 2017-06-29 Jiong Wang <jiong.wang@arm.com>
1312 * elfnn-aarch64.c (aarch64_relocation_aginst_gp_p): New function.
1313 (elfNN_aarch64_final_link_relocate): Delete duplicated code for
1314 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15, BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
1315 BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
1316 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Optimize the
1319 2017-06-29 Andreas Arnez <arnez@linux.vnet.ibm.com>
1321 * elf-bfd.h (elfcore_write_s390_gs_cb): Add prototype.
1322 (elfcore_write_s390_gs_bc): Likewise.
1323 * elf.c (elfcore_grok_s390_gs_cb): New function.
1324 (elfcore_grok_s390_gs_bc): New function.
1325 (elfcore_grok_note): Call them.
1326 (elfcore_write_s390_gs_cb): New function.
1327 (elfcore_write_s390_gs_bc): New function.
1328 (elfcore_write_register_note): Call them.
1330 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
1332 * libbfd.c (_bfd_generic_get_section_contents): Don't call
1333 bfd_get_file_size. Check archive element size.
1334 (_bfd_generic_get_section_contents_in_window): Likewise.
1336 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
1338 * bfd-in2.h: Regenerated.
1339 * bfdio.c (bfd_get_size): Change return type to ufile_ptr.
1340 (bfd_get_file_size): Likewise.
1342 2017-06-28 Maciej W. Rozycki <macro@imgtec.com>
1343 Matthew Fortune <matthew.fortune@imgtec.com>
1345 * archures.c (bfd_mach_mips_interaptiv_mr2): New macro.
1346 * cpu-mips.c (I_interaptiv_mr2): New enum value.
1347 (arch_info_struct): Add "mips:interaptiv-mr2" entry.
1348 * elfxx-mips.c (_bfd_elf_mips_mach) <E_MIPS_MACH_IAMR2>: New
1350 (mips_set_isa_flags) <bfd_mach_mips_interaptiv_mr2>: Likewise.
1351 (bfd_mips_isa_ext) <bfd_mach_mips_interaptiv_mr2>: Likewise.
1352 (print_mips_isa_ext) <AFL_EXT_INTERAPTIV_MR2>: Likewise.
1353 (mips_mach_extensions): Add `bfd_mach_mipsisa32r3' and
1354 `bfd_mach_mips_interaptiv_mr2' entries.
1355 * bfd-in2.h: Regenerate.
1357 2017-06-27 Nick Clifton <nickc@redhat.com>
1359 * tekhex.c (pass_over): Revert accidental conversion of a local
1360 array to a static array.
1362 2017-06-27 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
1365 * elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Adjust
1366 reloc addend if necessary. Adjust diff only if
1367 shrinked_insn_address < end_address.
1369 2017-06-27 Alan Modra <amodra@gmail.com>
1372 * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
1373 (_bfd_generic_get_section_contents_in_window): Likewise.
1375 2017-06-26 Kuan-Lin Chen <rufus@andestech.com>
1377 * elfnn-riscv.c (perform_relocation): Support the new
1378 R_RISCV_32_PCREL relocation.
1379 (riscv_elf_relocate_section): Likewise.
1380 * elfxx-riscv.c (howto_table): Likewise.
1381 (riscv_reloc_map): Likewise.
1382 * bfd-in2.h (BFD_RELOC_RISCV_32_PCREL): New relocation.
1383 * libbfd.h: Regenerate.
1385 2017-06-27 Alan Modra <amodra@gmail.com>
1388 * libbfd.c (_bfd_generic_get_section_contents): Delete abort.
1389 Use unsigned file pointer type, and remove cast.
1390 * libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise.
1391 Add "count", not "sz".
1393 2017-06-26 Pedro Alves <palves@redhat.com>
1396 * libbfd.c (_bfd_generic_get_section_contents): Add "count", not
1399 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
1402 * libbfd.c (_bfd_generic_get_section_contents_in_window): Add
1405 2017-06-26 Maciej W. Rozycki <macro@imgtec.com>
1407 * cpu-mips.c (arch_info_struct): Mark the 4010 32-bit.
1408 * elfxx-mips.c (mips_set_isa_flags) <bfd_mach_mips4010>: Set
1409 E_MIPS_ARCH_2 rather than E_MIPS_ARCH_3 in `e_flags'.
1410 (mips_mach_extensions): Mark `bfd_mach_mips4010' as extending
1411 `bfd_mach_mips6000' rather than `bfd_mach_mips4000'.
1413 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
1416 * compress.c (bfd_get_full_section_contents): Don't check the
1418 * libbfd.c (_bfd_generic_get_section_contents): Check for and
1419 reject a section whose size + offset is greater than the size
1421 (_bfd_generic_get_section_contents_in_window): Likewise.
1423 2017-06-26 Nick Clifton <nickc@redhat.com>
1426 * tekhex.c (getvalue): Check for the source pointer exceeding the
1427 end pointer before the first byte is read.
1429 2017-06-26 Nick Clifton <nickc@redhat.com>
1432 * opncls.c (get_build_id): Check that the section is big enough
1433 to contain the whole note.
1434 * compress.c (bfd_get_full_section_contents): Check for and reject
1435 a section whose size is greater than the size of the entire file.
1436 * elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not
1437 contain a notes section.
1439 2017-06-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1441 * elf64-s390.c (elf_s390_additional_program_headers): Add NULL
1443 (elf_s390_modify_segment_map): Likewise.
1444 (bfd_elf_s390_set_options): Lisewise.
1446 2017-06-26 Alan Modra <amodra@gmail.com>
1448 * elflink.c (_bfd_elf_link_create_dynstrtab): Don't make dynobj
1450 (_bfd_elf_size_group_sections): Skip --just-syms bfds.
1451 (bfd_elf_size_dynamic_sections): Ignore .note.GNU-stack and
1452 .preinit_array on --just-syms bfds.
1453 (_bfd_elf_gc_mark_extra_sections): Skip --just-syms bfds.
1454 (elf_gc_sweep, bfd_elf_parse_eh_frame_entries): Likewise.
1455 (bfd_elf_gc_sections, bfd_elf_discard_info): Likewise.
1457 2017-06-25 Sergei Trofimovich <slyfox@gentoo.org>
1459 * elf.c (find_link): Bounds check "hint".
1461 2017-06-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
1463 * elf32-arm.c (using_thumb_only): Update list of architectures in
1464 BFD_ASSERT for which the logic is valid.
1465 (using_thumb2_bl): Likewise.
1466 (using_thumb2): Likewise and return true for ARMv8-R.
1467 (arch_has_arm_nop): Likewise.
1468 (tag_cpu_arch_combine): New v8r table for ARMv8-R Tag_CPU_arch
1469 merging logic. Update commentis for value 15 of v8m_baseline,
1470 v8m_mainline and v4t_plus_v6_m arrays. Use v8r array to decide
1471 merging of value 15 of Tag_CPU_arch.
1473 2017-06-23 Jiong Wang <jiong.wang@arm.com>
1475 * reloc.c (BFD_RELOC_AARCH64_ADR_GOTPAGE): Rename to
1476 BFD_RELOC_AARCH64_ADR_GOT_PAGE
1477 * bfd-in2.h: Regenerate.
1479 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1481 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Move
1482 the error_alignment label forward. Properly align program
1483 property note section.
1485 2017-06-22 Eric Christopher <echristo@gmail.com>
1487 * elf32-arm.c (elf32_arm_final_link_relocate): Use labs rather than
1488 abs to fix a truncation warning.
1490 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1492 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Resolve
1493 local undefined weak symbol to 0.
1494 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Likewise.
1496 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1498 * elf32-i386.c (elf_i386_merge_gnu_properties): If info->shstk
1499 is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
1500 (elf_i386_link_setup_gnu_properties): If info->shstk is set,
1501 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
1502 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): If
1503 info->shstk is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
1504 (elf_x86_64_link_setup_gnu_properties): If info->shstk is set,
1505 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
1507 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1509 * elf32-i386.c (elf_i386_lazy_ibt_plt0_entry): New.
1510 (elf_i386_lazy_ibt_plt_entry): Likewise.
1511 (elf_i386_pic_lazy_ibt_plt0_entry): Likewise.
1512 (elf_i386_non_lazy_ibt_plt_entry): Likewise.
1513 (elf_i386_pic_non_lazy_ibt_plt_entry): Likewise.
1514 (elf_i386_eh_frame_lazy_ibt_plt): Likewise.
1515 (elf_i386_lazy_plt_layout): Likewise.
1516 (elf_i386_non_lazy_plt_layout): Likewise.
1517 (elf_i386_link_hash_entry): Add plt_second.
1518 (elf_i386_link_hash_table): Add plt_second and
1519 plt_second_eh_frame.
1520 (elf_i386_allocate_dynrelocs): Use the second PLT if needed.
1521 (elf_i386_size_dynamic_sections): Use .plt.got unwind info for
1522 the second PLT. Check the second PLT.
1523 (elf_i386_relocate_section): Use the second PLT to resolve
1524 PLT reference if needed.
1525 (elf_i386_finish_dynamic_symbol): Fill and use the second PLT if
1527 (elf_i386_finish_dynamic_sections): Set sh_entsize on the
1528 second PLT. Generate unwind info for the second PLT.
1529 (elf_i386_plt_type): Add plt_second.
1530 (elf_i386_get_synthetic_symtab): Support the second PLT.
1531 (elf_i386_parse_gnu_properties): Support
1532 GNU_PROPERTY_X86_FEATURE_1_AND.
1533 (elf_i386_merge_gnu_properties): Support
1534 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
1535 on GNU_PROPERTY_X86_FEATURE_1_IBT
1536 (elf_i386_link_setup_gnu_properties): If info->ibt is set,
1537 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
1538 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
1539 is set on all relocatable inputs.
1540 * elf64-x86-64.c (elf_x86_64_lazy_ibt_plt_entry): New.
1541 (elf_x32_lazy_ibt_plt_entry): Likewise.
1542 (elf_x86_64_non_lazy_ibt_plt_entry): Likewise.
1543 (elf_x32_non_lazy_ibt_plt_entry): Likewise.
1544 (elf_x86_64_eh_frame_lazy_ibt_plt): Likewise.
1545 (elf_x32_eh_frame_lazy_ibt_plt): Likewise.
1546 (elf_x86_64_lazy_ibt_plt): Likewise.
1547 (elf_x32_lazy_ibt_plt): Likewise.
1548 (elf_x86_64_non_lazy_ibt_plt): Likewise.
1549 (elf_x32_non_lazy_ibt_plt): Likewise.
1550 (elf_x86_64_get_synthetic_symtab): Support the second PLT.
1551 (elf_x86_64_parse_gnu_properties): Support
1552 GNU_PROPERTY_X86_FEATURE_1_AND.
1553 (elf_x86_64_merge_gnu_properties): Support
1554 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
1555 on GNU_PROPERTY_X86_FEATURE_1_IBT
1556 (elf_x86_64_link_setup_gnu_properties): If info->ibt is set,
1557 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
1558 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
1559 is set on all relocatable inputs.
1561 2017-06-22 Nick Clifton <nickc@redhat.com>
1564 * som.c (setup_sections): NUL terminate the space_strings buffer.
1565 Check that the space.name field does not index beyond the end of
1566 the space_strings buffer.
1568 2017-06-21 Nick Clifton <nickc@redhat.com>
1571 * coff-sh.c (sh_reloc): Check for an out of range reloc.
1573 2017-06-21 Nick Clifton <nickc@redhat.com>
1576 * vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as
1577 type of the size parameter.
1578 (_bfd_vms_save_counted_string): Add second parameter - the maximum
1579 length of the counted string.
1580 * vms.h (_bfd_vms_save_sized_string): Update prototype.
1581 (_bfd_vms_save_counted_string): Likewise.
1582 * vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to
1583 _bfd_vms_save_counted_string.
1584 (_bfd_vms_slurp_ehdr): Likewise.
1585 (_bfd_vms_slurp_egsd): Likewise.
1586 (Parse_module): Likewise.
1588 2017-06-21 Alan Modra <amodra@gmail.com>
1590 * elf64-ppc.c (ppc64_elf_size_stubs): Test for localentry:0 plt
1591 calls before tocsave calls.
1592 (ppc64_elf_relocate_section): Allow localentry:0 plt calls without
1595 2017-06-21 Nick Clifton <nickc@redhat.com>
1598 * reloc.c (bfd_generic_get_relocated_section_contents): Fail if
1599 bfd_get_full_section_contents returns no contents.
1601 2017-06-21 Nick Clifton <nickc@redhat.com>
1604 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized
1607 2017-06-21 Nick Clifton <nickc@redhat.com>
1610 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section
1612 (image_set_ptr): Likewise.
1613 (alpha_vms_fix_sec_rel): Likewise.
1614 (alpha_vms_slurp_relocs): Likewise.
1616 2017-06-21 Nick Clifton <nickc@redhat.com>
1619 * ieee.c (ieee_slurp_sections): Check for a NULL return from
1621 (ieee_archive_p): Likewise.
1622 (ieee_object_p): Likewise.
1624 2017-06-21 Nick Clifton <nickc@redhat.com>
1627 * elf.c (setup_group): Zero the group section pointer list after
1628 allocation so that loops can be caught. Check for NULL pointers
1629 when processing a group list.
1631 2017-06-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1633 * elf-s390.h: New file.
1634 * elf64-s390.c (struct elf_s390_link_hash_table): Add params
1636 (elf_s390_additional_program_headers): New function.
1637 (elf_s390_modify_segment_map): New function.
1638 (bfd_elf_s390_set_options): New function.
1639 (elf_backend_additional_program_headers)
1640 (elf_backend_modify_segment_map): Add macro definitions.
1642 2017-06-19 H.J. Lu <hongjiu.lu@intel.com>
1645 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
1646 the DYNAMIC bit instead of bfd_count_sections.
1648 2017-06-19 Nick Clifton <nickc@redhat.com>
1651 * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record
1653 (evax_bfd_print_eeom): Likewise.
1654 (evax_bfd_print_egsd): Check for an overlarge record length.
1655 (evax_bfd_print_etir): Likewise.
1657 2017-06-19 Nick Clifton <nickc@redhat.com>
1660 * libieee.h (struct common_header_type): Add end_p field.
1661 * ieee.c (this_byte_and_next): Do not advance input_p beyond
1663 (read_id): Check for a length that exceeds the remaining bytes in
1665 (ieee_seek): Initialise end_p.
1666 (ieee_archive_p): Likewise.
1667 (ieee_object_p): Likewise.
1669 2017-06-19 Nick Clifton <nickc@redhat.com>
1672 * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset
1673 before reading the EIHS structure entries.
1675 2017-06-19 Nick Clifton <nickc@redhat.com>
1678 * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for
1679 gsd_size. Check that there are enough bytes remaining to read the
1680 type and size of the next egsd. Check that the size of the egsd
1681 does not exceed the size of the record.
1683 2017-06-19 Alan Modra <amodra@gmail.com>
1685 * config.bfd: Correct targ_underscore for cris.
1687 2017-06-18 Alan Modra <amodra@gmail.com>
1689 * config.bfd: Correct targ_underscore for epiphany, ip2k,
1690 m32c, mn10200, pru, rl78, rx, crisv32 and v850.
1692 2017-06-16 Nick Clifton <nickc@redhat.com>
1694 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
1695 bucketlist is empty because there are no symbols to add to the
1698 2017-06-16 Alan Modra <amodra@gmail.com>
1704 * targets.c (struct bfd_target): Add _bfd_define_start_stop.
1705 (BFD_JUMP_TABLE_LINK): Likewise.
1706 * elf-bfd.h (bfd_elf_define_start_stop): Declare.
1707 * elflink.c (_bfd_elf_gc_mark_rsec): Update comment.
1708 (bfd_elf_define_start_stop): New function.
1709 * linker.c (bfd_generic_define_start_stop): New function.
1710 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init
1712 * aout-adobe.c (aout_32_bfd_define_start_stop): Define.
1713 * aout-target.h (MY_bfd_define_start_stop): Define.
1714 * aout-tic30.c (MY_bfd_define_start_stop): Define.
1715 * binary.c (binary_bfd_define_start_stop): Define.
1716 * bout.c (b_out_bfd_define_start_stop): Define.
1717 * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define.
1718 * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define.
1719 * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define.
1720 * coffcode.h (coff_bfd_define_start_stop): Define.
1721 * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define.
1722 * i386msdos.c (msdos_bfd_define_start_stop): Define.
1723 * i386os9k.c (os9k_bfd_define_start_stop): Define.
1724 * ieee.c (ieee_bfd_define_start_stop): Define.
1725 * ihex.c (ihex_bfd_define_start_stop): Define.
1726 * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define.
1727 * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define.
1728 * mmo.c (mmo_bfd_define_start_stop): Define.
1729 * nlm-target.h (nlm_bfd_define_start_stop): Define.
1730 * oasys.c (oasys_bfd_define_start_stop): Define.
1731 * pef.c (bfd_pef_bfd_define_start_stop): Define.
1732 * plugin.c (bfd_plugin_bfd_define_start_stop): Define.
1733 * ppcboot.c (ppcboot_bfd_define_start_stop): Define.
1734 * som.c (som_bfd_define_start_stop): Define.
1735 * srec.c (srec_bfd_define_start_stop): Define.
1736 * tekhex.c (tekhex_bfd_define_start_stop): Define.
1737 * versados.c (versados_bfd_define_start_stop): Define.
1738 * vms-alpha.c (vms_bfd_define_start_stop): Define.
1739 (alpha_vms_bfd_define_start_stop): Define.
1740 * xsym.c (bfd_sym_bfd_define_start_stop): Define.
1741 * bfd-in2.h: Regenerate.
1742 * libbfd.h: Regenerate.
1744 2017-06-16 Jiong Wang <jiong.wang@arm.com>
1746 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
1747 SYMBOL_REFERENCES_LOCAL.
1749 2017-06-15 Jiong Wang <jiong.wang@arm.com>
1752 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
1753 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
1754 runtime for if there needs copy relocation elimination.
1755 (need_copy_relocation_p): New function. Return true for symbol with
1756 pc-relative references and if it's against read-only sections.
1757 (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
1758 (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
1759 that are related with accessing external objects.
1760 (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change
1761 in elfNN_aarch64_check_relocs.
1763 2017-06-15 Nick Clifton <nickc@redhat.com>
1766 * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
1769 (ieee_archive_p): Likewise.
1771 2017-06-15 Nick Clifton <nickc@redhat.com>
1774 * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
1776 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
1778 * elf32-xtensa.c (elf_xtensa_be_plt_entry,
1779 elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays,
1780 keep both windowed and call0 ABI PLT definitions.
1781 (elf_xtensa_create_plt_entry): Use selected ABI to choose upper
1782 elf_xtensa_*_plt_entry endex.
1783 (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size.
1785 2017-06-14 Nick Clifton <nickc@redhat.com>
1788 * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
1791 2017-06-14 Nick Clifton <nickc@redhat.com>
1794 * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
1795 maximum value for the ascic pointer. Check that name processing
1796 does not read beyond this value.
1797 (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
1800 2017-06-14 Nick Clifton <nickc@redhat.com>
1803 * versados.c (versados_mkobject): Zero the allocated tdata structure.
1804 (process_otr): Check for an invalid offset in the otr structure.
1806 2017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
1808 * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
1810 2017-06-13 H.J. Lu <hongjiu.lu@intel.com>
1816 * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
1817 vtable field to a union.
1818 (_bfd_elf_is_start_stop): Removed.
1819 * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
1820 __start_SECNAME and __stop_SECNAME symbols.
1821 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
1822 * elflink.c (_bfd_elf_is_start_stop): Removed.
1823 (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
1824 _bfd_elf_is_start_stop.
1825 (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
1826 __stop_SECNAME symbols. Updated.
1827 (elf_gc_smash_unused_vtentry_relocs): Likewise.
1828 (bfd_elf_gc_record_vtinherit): Likewise.
1829 (bfd_elf_gc_record_vtentry): Likewise.
1831 2017-06-13 Nick Clifton <nickc@redhat.com>
1834 * elflink.c (elf_link_adjust_relocs): Generate an error when
1835 encountering a reloc against a symbol removed by garbage
1838 2017-06-12 H.J. Lu <hongjiu.lu@intel.com>
1840 * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
1841 to merge_gnu_properties.
1842 * elf-properties.c (elf_merge_gnu_properties): Add struct
1843 bfd_link_info * and pass it to merge_gnu_properties.
1844 (elf_merge_gnu_property_list): Add struct bfd_link_info *
1845 and pass it to elf_merge_gnu_properties.
1846 (_bfd_elf_link_setup_gnu_properties): Pass info to
1847 elf_merge_gnu_property_list.
1848 * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
1850 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
1852 2017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
1855 * binary.c (binary_set_section_contents): Scale lma by octets
1856 per byte to set filepos.
1858 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1860 * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
1863 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1865 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
1868 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1870 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
1871 patched section contents for TLS IE reloc.
1872 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
1874 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1876 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
1877 RELOC_FOR_GLOBAL_SYMBOL macro.
1879 2018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1881 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
1884 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1886 * config/tc-arc.c (md_undefined_symbol): Changed.
1887 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
1889 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1891 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
1894 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1896 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
1897 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
1899 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1901 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
1904 2017-06-08 Richard Earnshaw <rearnsha@arm.com>
1906 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
1907 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
1908 is non-zero. Add clarifying comments.
1910 2017-06-08 H.J. Lu <hongjiu.lu@intel.com>
1912 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
1913 name. Use local IFUNC symbol name string to report unsupported
1914 non-PIC call to IFUNC function.
1915 (elf_i386_relocate_section): Dump local IFUNC name with minfo
1916 when generating R_386_IRELATIVE relocation.
1917 (elf_i386_finish_dynamic_symbol): Likewise.
1918 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
1920 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
1921 when generating R_X86_64_IRELATIVE relocation.
1922 (elf_x86_64_finish_dynamic_symbol): Likewise.
1924 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
1926 * elf.c (setup_group): Make sure BFD sections are created for all
1927 group sections in the input file when processing SHF_GROUP
1929 (bfd_section_from_shdr): Avoid duplicating logic already
1930 implemented in `setup_group'.
1932 2017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
1935 * peXXigen.c (pe_print_idata): Use the address of the first thunk
1936 if the hint address is zero.
1938 2017-06-06 James Clarke <jrtc27@jrtc27.com>
1941 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
1942 ELF_COMMON_DEF_P for common symbols.
1944 2017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
1946 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
1947 SEC_GROUP sections as SEC_EXCLUDE.
1948 (bfd_elf_set_group_contents): Replace use of abort with an assert.
1949 (assign_section_numbers): Use resolve_section_groups flag instead
1950 of relocatable link type.
1951 (_bfd_elf_init_private_section_data): Use resolve_section_groups
1952 flag instead of checking the final_link flag for part of the
1953 checks in here. Fix white space as a result.
1954 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
1955 instead of relocatable link type.
1956 (bfd_elf_final_link): Likewise.
1958 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
1960 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
1962 * elf32-score.c (score_elf_final_link_relocate): Likewise.
1963 (s3_bfd_score_elf_check_relocs): Likewise.
1964 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
1965 (score_elf_final_link_relocate): Likewise.
1966 (s7_bfd_score_elf_check_relocs): Likewise.
1968 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
1970 * elflink.c (init_reloc_cookie_rels): Remove unused variable
1973 2017-06-06 Maciej W. Rozycki <macro@imgtec.com>
1975 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
1976 from `reloc_count' rather than decrementing it.
1977 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
1978 `reloc_count' by `int_rels_per_ext_rel'.
1979 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
1980 `reloc_count' by `int_rels_per_ext_rel' for last relocation
1981 entry determination.
1982 (s3_bfd_score_elf_check_relocs): Likewise.
1983 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
1984 (s7_bfd_score_elf_relocate_section): Likewise.
1985 (s7_bfd_score_elf_check_relocs): Likewise.
1986 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
1987 prototype and function.
1988 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
1989 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
1990 triple rather than once the sum of REL and RELA relocation entry
1992 (bfd_elf64_get_reloc_upper_bound): Remove macro.
1993 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
1994 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
1995 storage allocation size determination.
1996 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
1997 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
1998 by `int_rels_per_ext_rel' for last relocation entry
2000 (bfd_elf_final_link): Do not multiply `reloc_count' by
2001 `int_rels_per_ext_rel' for internal relocation storage
2002 allocation size determination.
2003 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
2004 `int_rels_per_ext_rel' for last relocation entry determination.
2005 (elf_gc_smash_unused_vtentry_relocs): Likewise.
2006 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
2007 (_bfd_mips_elf_relocate_section): Likewise.
2009 2017-06-05 Alan Modra <amodra@gmail.com>
2012 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
2014 2017-06-01 John Baldwin <jhb@FreeBSD.org>
2016 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
2017 determine structure sizes.
2018 (elfcore_grok_freebsd_prstatus): Likewise.
2020 2017-06-01 Alan Modra <amodra@gmail.com>
2022 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
2023 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
2025 (is_elfv2_localentry0): New function.
2026 (ppc64_elf_tls_setup): Default params->plt_localentry0.
2027 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
2028 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
2029 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
2030 optimized localentry:0 stubs.
2031 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
2032 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
2034 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
2036 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
2038 2017-05-30 Casey Smith <clegg89@gmail.com>
2041 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
2042 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
2044 2017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
2046 * cpu-arc.c (arc_compatible): New function.
2048 2017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
2050 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
2052 2017-05-30 H.J. Lu <hongjiu.lu@intel.com>
2055 * bfdio.c (bfd_get_file_size): New function.
2056 * bfd-in2.h: Regenerated.
2058 2017-05-23 Dilian Palauzov <git-dpa@aegee.org>
2060 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
2063 2017-05-22 H.J. Lu <hongjiu.lu@intel.com>
2065 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
2066 dynobj instead of htab->elf.dynobj.
2068 2017-05-19 Maciej W. Rozycki <macro@imgtec.com>
2070 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
2072 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
2073 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
2074 actual number of internal relocations retrieved. Adjust
2075 function description.
2076 (bfd_elf64_canonicalize_reloc): Remove macro.
2077 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
2079 2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
2081 * archures.c (bfd_mach_sparc_v9m8): Define.
2082 (bfd_mach_sparc_v8plusm8): Likewise.
2083 (bfd_mach_sparc_v9_p): Adjust to M8.
2084 (bfd_mach_sparc_64bit_p): Likewise.
2085 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
2086 bfd_mach_sparc_v8plusm8.
2087 * bfd-in2.h: Regenerated.
2088 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
2090 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
2091 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
2092 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
2094 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
2095 bfd_mach_sparc_v8plusm8.
2097 2017-05-19 Alan Modra <amodra@gmail.com>
2099 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
2100 debug and special sections when no non-note alloc sections in an
2103 2017-05-18 Alan Modra <amodra@gmail.com>
2105 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
2106 * elf-m10300.c: Likewise.
2108 * elf32-arc.c: Likewise.
2109 * elf32-bfin.c: Likewise.
2110 * elf32-m68k.c: Likewise.
2111 * elf32-nds32.c: Likewise.
2112 * elf32-tilepro.c: Likewise.
2113 * elflink.c: Likewise.
2114 * elfnn-aarch64.c: Likewise.
2115 * elfnn-riscv.c: Likewise.
2116 * elfxx-tilegx.c: Likewise.
2117 * mach-o.c: Likewise.
2118 * peXXigen.c: Likewise.
2119 * vms-alpha.c: Likewise.
2120 * vms-lib.c: Likewise.
2122 2017-05-17 H.J. Lu <hongjiu.lu@intel.com>
2125 * elflink.c (elf_gc_mark_debug_section): New function.
2126 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
2127 referenced by kept debug sections.
2129 2017-05-16 Alan Modra <amodra@gmail.com>
2131 * elf-m10300.c: Rename occurrences of non_ir_ref.
2132 * elf32-arm.c: Likewise.
2133 * elf32-bfin.c: Likewise.
2134 * elf32-cr16.c: Likewise.
2135 * elf32-cris.c: Likewise.
2136 * elf32-d10v.c: Likewise.
2137 * elf32-dlx.c: Likewise.
2138 * elf32-fr30.c: Likewise.
2139 * elf32-frv.c: Likewise.
2140 * elf32-hppa.c: Likewise.
2141 * elf32-i370.c: Likewise.
2142 * elf32-i386.c: Likewise.
2143 * elf32-iq2000.c: Likewise.
2144 * elf32-lm32.c: Likewise.
2145 * elf32-m32c.c: Likewise.
2146 * elf32-m32r.c: Likewise.
2147 * elf32-m68hc1x.c: Likewise.
2148 * elf32-m68k.c: Likewise.
2149 * elf32-mcore.c: Likewise.
2150 * elf32-metag.c: Likewise.
2151 * elf32-microblaze.c: Likewise.
2152 * elf32-moxie.c: Likewise.
2153 * elf32-msp430.c: Likewise.
2154 * elf32-mt.c: Likewise.
2155 * elf32-nios2.c: Likewise.
2156 * elf32-or1k.c: Likewise.
2157 * elf32-ppc.c: Likewise.
2158 * elf32-rl78.c: Likewise.
2159 * elf32-s390.c: Likewise.
2160 * elf32-score.c: Likewise.
2161 * elf32-score7.c: Likewise.
2162 * elf32-sh.c: Likewise.
2163 * elf32-tic6x.c: Likewise.
2164 * elf32-tilepro.c: Likewise.
2165 * elf32-v850.c: Likewise.
2166 * elf32-vax.c: Likewise.
2167 * elf32-xstormy16.c: Likewise.
2168 * elf32-xtensa.c: Likewise.
2169 * elf64-alpha.c: Likewise.
2170 * elf64-hppa.c: Likewise.
2171 * elf64-ia64-vms.c: Likewise.
2172 * elf64-mmix.c: Likewise.
2173 * elf64-ppc.c: Likewise.
2174 * elf64-s390.c: Likewise.
2175 * elf64-sh64.c: Likewise.
2176 * elf64-x86-64.c: Likewise.
2177 * elflink.c: Likewise.
2178 * elfnn-aarch64.c: Likewise.
2179 * elfnn-ia64.c: Likewise.
2180 * elfnn-riscv.c: Likewise.
2181 * elfxx-mips.c: Likewise.
2182 * elfxx-sparc.c: Likewise.
2183 * elfxx-tilegx.c: Likewise.
2184 * linker.c: Likewise.
2186 2017-05-16 Alan Modra <amodra@gmail.com>
2188 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
2189 * elflink.c (elf_link_add_object_symbols): Update to use
2191 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
2193 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
2195 2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
2197 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
2199 2017-05-12 H.J. Lu <hongjiu.lu@intel.com>
2201 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
2202 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
2204 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
2206 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
2208 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
2210 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
2211 to plt_second/plt_second_eh_frame.
2212 (elf_x86_64_link_hash_newfunc): Updated.
2213 (elf_x86_64_allocate_dynrelocs): Likewise.
2214 (elf_x86_64_size_dynamic_sections): Likewise.
2215 (elf_x86_64_relocate_section): Likewise.
2216 (elf_x86_64_finish_dynamic_symbol): Likewise.
2217 (elf_x86_64_finish_dynamic_sections): Likewise.
2218 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
2219 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
2221 (elf_backend_setup_gnu_properties): Updated. Create the
2222 .plt.sec section instead of the .plt.sec section.
2224 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
2226 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
2227 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
2228 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
2230 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
2232 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
2233 (bfd_elf64_set_reloc): Define.
2234 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
2236 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
2238 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
2239 (struct bfd_target): New field _bfd_set_reloc.
2240 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
2241 * reloc.c (_bfd_generic_set_reloc): New function.
2242 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
2243 * nlm-target.h (nlm_set_reloc): Likewise.
2244 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
2245 * aout-tic30.c (MY_set_reloc): Likewise.
2246 * aout-target.h (MY_set_reloc): Likewise.
2247 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
2248 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
2249 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
2250 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
2251 * aout-adobe.c (aout_32_set_reloc): Likewise.
2252 * bout.c (b_out_set_reloc): Likewise.
2253 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
2254 * i386os9k.c (aout_32_set_reloc): Likewise.
2255 * ieee.c (ieee_set_reloc): Likewise.
2256 * oasys.c (oasys_set_reloc): Likewise.
2257 * som.c (som_set_reloc): Likewise.
2258 * versados.c (versados_set_reloc): Likewise.
2259 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
2260 _bfd_generic_set_reloc.
2261 (rs6000_xcoff64_aix_vec): LIkewise.
2262 * libbfd.c (_bfd_norelocs_set_reloc): New function.
2263 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
2264 * i386msdos.c (msdos_set_reloc): Define to
2265 _bfd_norelocs_set_reloc.
2266 * elfcode.h (elf_set_reloc): Define.
2267 * bfd-in2.h: Regenerated.
2269 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
2272 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
2273 for IFUNC function address.
2275 2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
2277 * elf32-arc.c (FEATURE_LIST_NAME): Define.
2278 (CONFLICT_LIST): Likewise.
2279 (opcode/arc-attrs.h): Include.
2280 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
2281 (arc_extract_features): New file.
2282 (arc_stralloc): Likewise.
2283 (arc_elf_merge_attributes): Likewise.
2284 (arc_elf_merge_private_bfd_data): Use object attributes.
2285 (bfd_arc_get_mach_from_attributes): New function.
2286 (arc_elf_object_p): Use object attributes.
2287 (arc_elf_final_write_processing): Likewise.
2288 (elf32_arc_obj_attrs_arg_type): New function.
2289 (elf32_arc_obj_attrs_handle_unknown): Likewise.
2290 (elf32_arc_section_from_shdr): Likewise.
2291 (elf_backend_obj_attrs_vendor): Define.
2292 (elf_backend_obj_attrs_section): Likewise.
2293 (elf_backend_obj_attrs_arg_type): Likewise.
2294 (elf_backend_obj_attrs_section_type): Likewise.
2295 (elf_backend_obj_attrs_handle_unknown): Likewise.
2296 (elf_backend_section_from_shdr): Likewise.
2298 2017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
2301 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
2302 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
2303 and the destination is a Thumb symbol.
2305 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2307 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
2308 initializer to silence GCC 4.2.
2309 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
2311 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2313 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
2314 (LAZY_PLT_ENTRY_SIZE): This.
2315 (NON_LAZY_PLT_ENTRY_SIZE): New.
2316 (elf_x86_64_plt0_entry): Renamed to ...
2317 (elf_x86_64_lazy_plt0_entry): This.
2318 (elf_x86_64_plt_entry): Renamed to ...
2319 (elf_x86_64_lazy_plt_entry): This.
2320 (elf_x86_64_bnd_plt0_entry): Renamed to ...
2321 (elf_x86_64_lazy_bnd_plt0_entry): This.
2322 (elf_x86_64_legacy_plt_entry): Removed.
2323 (elf_x86_64_bnd_plt_entry): Renamed to ...
2324 (elf_x86_64_lazy_bnd_plt_entry): This.
2325 (elf_x86_64_legacy_plt2_entry): Renamed to ...
2326 (elf_x86_64_non_lazy_plt_entry): This.
2327 (elf_x86_64_bnd_plt2_entry): Renamed to ...
2328 (elf_x86_64_non_lazy_bnd_plt_entry): This.
2329 (elf_x86_64_eh_frame_plt): Renamed to ...
2330 (elf_x86_64_eh_frame_lazy_plt): This.
2331 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
2332 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
2333 (elf_x86_64_eh_frame_plt_got): Renamed to ...
2334 (elf_x86_64_eh_frame_non_lazy_plt): This.
2335 (elf_x86_64_lazy_plt_layout): New.
2336 (elf_x86_64_non_lazy_plt_layout): Likewise.
2337 (elf_x86_64_plt_layout): Likewise.
2338 (elf_x86_64_backend_data): Remove PLT layout information. Add
2339 os for target system.
2340 (GET_PLT_ENTRY_SIZE): Removed.
2341 (elf_x86_64_lazy_plt): New.
2342 (elf_x86_64_non_lazy_plt): Likewise.
2343 (elf_x86_64_lazy_bnd_plt): Likewise.
2344 (elf_x86_64_non_lazy_bnd_plt): Likewise.
2345 (elf_x86-64_arch_bed): Updated.
2346 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
2347 (elf_x86_64_create_dynamic_sections): Removed.
2348 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
2349 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
2350 (elf_x86-64_adjust_dynamic_symbol): Updated.
2351 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
2352 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
2353 size for PLT0 if there is no PLT0. Get plt_entry_size from
2354 non_lazy_plt for non-lazy PLT entries.
2355 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
2356 from non_lazy_plt for non-lazy PLT entries.
2357 (elf_x86-64_relocate_section): Updated. Properly get PLT index
2358 if there is no PLT0.
2359 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
2360 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
2361 entries with non-lazy PLT layout. Don't fill the second and third
2362 slots in the PLT entry if there is no PLT0.
2363 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
2364 if there is no PLT0. Set sh_entsize on the .plt.got section.
2365 (compare_relocs): New.
2366 (elf_x86_64_plt_type): Likewise.
2367 (elf_x86_64_plt): Likewise.
2368 (elf_x86_64_nacl_plt): New. Forward declaration.
2369 (elf_x86_64_get_plt_sym_val): Removed.
2370 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
2371 against all dynamic relocations.
2372 (elf_x86_64_link_setup_gnu_properties): New function.
2373 (elf_backend_create_dynamic_sections): Updated.
2374 (elf_backend_setup_gnu_properties): New.
2375 (elf_x86_64_nacl_plt): New.
2376 (elf_x86_64_nacl_arch_bed): Updated.
2378 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2380 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
2381 (LAZY_PLT_ENTRY_SIZE): This.
2382 (NON_LAZY_PLT_ENTRY_SIZE): New.
2383 (elf_i386_plt0_entry): Renamed to ...
2384 (elf_i386_lazy_plt0_entry): This.
2385 (elf_i386_plt_entry): Renamed to ...
2386 (elf_i386_lazy_plt_entry): This.
2387 (elf_i386_pic_plt0_entry): Renamed to ...
2388 (elf_i386_pic_lazy_plt0_entry): This.
2389 (elf_i386_pic_plt_entry): Renamed to ...
2390 (elf_i386_pic_lazy_plt_entry): This.
2391 (elf_i386_got_plt_entry): Renamed to ...
2392 (elf_i386_non_lazy_plt_entry): This.
2393 (elf_i386_pic_got_plt_entry): Renamed to ...
2394 (elf_i386_pic_non_lazy_plt_entry): This.
2395 (elf_i386_eh_frame_plt): Renamed to ...
2396 (elf_i386_eh_frame_lazy_plt): This.
2397 (elf_i386_eh_frame_plt_got): Renamed to ...
2398 (elf_i386_eh_frame_non_lazy_plt): This.
2399 (elf_i386_plt_layout): Renamed to ...
2400 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
2401 eh_frame_plt_got_size.
2402 (elf_i386_non_lazy_plt_layout): New.
2403 (elf_i386_plt_layout): Likewise.
2404 (elf_i386_non_lazy_plt): Likewise.
2405 (GET_PLT_ENTRY_SIZE): Removed.
2406 (elf_i386_plt): Renamed to ...
2407 (elf_i386_lazy_plt): This.
2408 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
2409 (elf_i386_arch_bed): Updated.
2410 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
2411 (elf_i386_create_dynamic_sections): Removed.
2412 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
2413 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
2414 (elf_i386_adjust_dynamic_symbol): Updated.
2415 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
2416 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
2417 size for PLT0 if there is no PLT0.
2418 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
2419 output section is discarded only if GOT isn't empty.
2420 (elf_i386_relocate_section): Updated. Properly get PLT index
2421 if there is no PLT0.
2422 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
2423 second and third slots in the PLT entry if there is no PLT0.
2424 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
2425 if there is no PLT0. Set sh_entsize on the .plt.got section.
2426 (elf_i386_nacl_plt): Forward declaration.
2427 (elf_i386_get_plt_sym_val): Removed.
2428 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
2429 against all dynamic relocations.
2430 (elf_i386_link_setup_gnu_properties): New function.
2431 (elf_backend_create_dynamic_sections): Updated.
2432 (elf_backend_setup_gnu_properties): New.
2433 (elf_i386_nacl_plt): Updated.
2434 (elf_i386_nacl_arch_bed): Likewise.
2435 (elf_i386_vxworks_arch_bed): Likewise.
2437 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
2439 * elflink.c (elf_output_implib): Remove executable flag from import
2441 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
2442 library is a relocatable object file.
2444 2017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
2447 * elf32-avr.c (avr_should_move_sym): New function.
2448 (avr_should_reduce_sym_size): Likewise.
2449 (avr_should_increase_sym_size): Likewise.
2450 (elf32_avr_relax_delete_bytes): Adjust symbol values
2451 and sizes by calling new functions.
2453 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
2455 * config.bfd (riscv32-*): Enable rv64.
2457 2017-05-02 Alan Modra <amodra@gmail.com>
2460 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
2461 rather than h->root.type == bfd_link_hash_new.
2462 (bfd_elf_record_link_assignment): Similarly, call
2463 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
2465 2017-04-29 Alan Modra <amodra@gmail.com>
2468 * reloc.c (reloc_offset_in_range): New function.
2469 (bfd_perform_relocation, bfd_install_relocation): Use it.
2470 (_bfd_final_link_relocate): Likewise.
2472 2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
2474 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
2475 before using .plt.got.
2476 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
2478 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2480 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
2481 instead of "+=" to update 0.
2483 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2485 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
2486 .plt.got section here.
2487 (elf_i386_check_relocs): Don't create the .plt.got section.
2488 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
2489 the .plt.got and .plt.bnd sections here.
2490 (elf_x86_64_check_relocs): Don't create the .plt.got nor
2493 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2495 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
2497 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
2498 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
2499 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
2500 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
2503 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2505 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
2507 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
2508 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
2509 the first relocatable ELF input with GNU properties.
2511 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2513 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
2514 VxWorks for non-PIC.
2516 2017-04-27 Alan Modra <amodra@gmail.com>
2518 * elf-bfd.h (struct elf_backend_data): Make asection param of
2519 elf_backend_eh_frame_address_size const.
2520 (_bfd_elf_eh_frame_address_size): Likewise.
2521 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
2522 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
2523 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
2524 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
2525 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
2526 (next_cie_fde_offset): Constify params.
2527 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
2529 2017-04-27 Alan Modra <amodra@gmail.com>
2531 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
2532 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
2533 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
2535 (offset_adjust): New function.
2536 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
2537 (adjust_eh_frame_local_symbols): Likewise.
2538 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
2539 after changing anything. Return true if anything changed.
2540 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
2541 _bfd_elf_adjust_eh_frame_global_symbol for globals.
2543 2017-04-27 Alan Modra <amodra@gmail.com>
2545 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
2548 2017-04-27 Alan Modra <amodra@gmail.com>
2550 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
2551 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
2552 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
2553 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
2554 for undef and undefweak dyn_relocs.
2555 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
2556 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
2557 (allocate_got, allocate_dynrelocs): Likewise.
2558 (ppc64_elf_relocate_section): Likewise.
2560 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
2562 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
2563 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
2564 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
2565 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
2567 2017-04-26 Nick Clifton <nickc@redhat.com>
2570 * reloc.c (bfd_perform_relocation): Check for a negative address
2573 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
2576 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
2578 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
2579 (elf_backend_always_renumber_dynsyms): Define.
2580 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
2581 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
2582 * elflink.c (bfd_elf_size_dynamic_sections): Also call
2583 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
2585 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
2587 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
2589 * elflink.c (bfd_elf_size_dynamic_sections): Only call
2590 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
2591 sections have been created.
2593 2017-04-26 Nick Clifton <nickc@redhat.com>
2596 * compress.c (bfd_init_section_compress_status): Check the return
2597 value from bfd_malloc.
2599 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
2601 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
2602 no_finish_dynamic_symbol.
2603 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
2605 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
2606 weak symbol, don't make it dynamic.
2607 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
2608 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
2609 relocation for GOT reference.
2610 (elf_x86_64_finish_dynamic_symbol): Abort if
2611 no_finish_dynamic_symbol isn't 0.
2613 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
2616 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
2617 undefined weak symbol, don't make it dynamic.
2618 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
2619 set no_finish_dynamic_symbol and generate R_386_RELATIVE
2620 relocation for R_386_GOT32.
2622 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
2625 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
2627 2017-04-23 Alan Modra <amodra@gmail.com>
2630 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
2631 * elf.c (lcomm_sym): New.
2632 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
2633 * bfd-in2.h: Regenerate.
2635 2017-04-23 Alan Modra <amodra@gmail.com>
2638 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
2639 parameters and comment.
2640 (_bfd_elf_get_reloc_section): Delete.
2641 (_bfd_elf_plt_get_reloc_section): Declare.
2642 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
2643 New functions. Don't blindly skip over assumed .rel/.rela prefix.
2645 (_bfd_elf_get_reloc_section): ..here. Delete.
2646 (assign_section_numbers): Call elf_get_reloc_section.
2647 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
2648 * elfxx-target.h (elf_backend_get_reloc_section): Update.
2650 2017-04-23 Alan Modra <amodra@gmail.com>
2653 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
2656 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
2659 * elf32-i386.c (elf_i386_link_hash_entry): Add
2660 no_finish_dynamic_symbol.
2661 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
2662 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
2663 symbol, don't make it dynamic in PIE.
2664 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
2665 set no_finish_dynamic_symbol and generate R_386_RELATIVE
2666 relocation for R_386_GOT32
2667 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
2670 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
2674 * elflink.c (elf_link_add_object_symbols): Require
2675 --no-dynamic-linker with -E/--dynamic-list when creating
2678 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
2680 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
2683 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
2685 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
2686 dynamic symbol sorting.
2688 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
2691 * elflink.c (elf_link_add_object_symbols): Preserve
2692 dynamic_ref_after_ir_def when restoring the symbol table for
2693 unneeded dynamic object.
2695 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
2698 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
2699 on on undefined IFUNC symbol in the second PLT.
2701 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
2703 * peXXigen.c (pe_print_reloc): Correct chunk_end.
2705 2017-04-19 Alan Modra <amodra@gmail.com>
2707 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
2708 or make dynamic for info->dynamic_undefined_weak 0 and 1.
2709 * elf32-ppc.c:Formatting.
2710 (ensure_undefweak_dynamic): Don't make dynamic when
2711 info->dynamic_undefined_weak is zero.
2712 (allocate_dynrelocs): Discard undefweak dyn_relocs for
2713 info->dynamic_undefined_weak. Discard undef dyn_relocs when
2714 not default visibility. Discard undef and undefweak
2716 (ppc_elf_relocate_section): Adjust to suit.
2717 * elf64-ppc.c: Formatting.
2718 (ensure_undefweak_dynamic): Don't make dynamic when
2719 info->dynamic_undefined_weak is zero.
2720 (allocate_dynrelocs): Discard undefweak dyn_relocs for
2721 info->dynamic_undefined_weak. Discard them earlier.
2723 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
2726 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
2727 before generating the version definition section.
2729 2017-04-17 Alan Modra <amodra@gmail.com>
2731 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
2732 state when a regular object file defines a symbol with
2733 incompatible type to that defined by an earlier shared lib.
2735 2017-04-13 Alan Modra <amodra@gmail.com>
2737 * coffcode.h: Wrap some overly long _bfd_error_handler args.
2739 * elf32-arm.c: Likewise.
2740 * elf32-i386.c: Likewise.
2741 * elf32-mep.c: Likewise.
2742 * elf64-ia64-vms.c: Likewise.
2743 * elf64-x86-64.c: Likewise.
2744 * elflink.c: Likewise.
2745 * elfnn-ia64.c: Likewise.
2746 * elfxx-mips.c: Likewise.
2748 2017-04-13 Alan Modra <amodra@gmail.com>
2750 * aoutx.h: Use %B and %A in error messages throughout file.
2751 * aout-cris.c: Likewise.
2752 * archive.c: Likewise.
2753 * binary.c: Likewise.
2754 * coff-rs6000.c: Likewise.
2755 * coff-tic4x.c: Likewise.
2756 * coffcode.h: Likewise.
2757 * coffgen.c: Likewise.
2758 * cofflink.c: Likewise.
2759 * coffswap.h: Likewise.
2760 * cpu-arm.c: Likewise.
2761 * elf-eh-frame.c: Likewise.
2762 * elf-m10300.c: Likewise.
2764 * elf32-arc.c: Likewise.
2765 * elf32-arm.c: Likewise.
2766 * elf32-bfin.c: Likewise.
2767 * elf32-frv.c: Likewise.
2768 * elf32-iq2000.c: Likewise.
2769 * elf32-m32c.c: Likewise.
2770 * elf32-microblaze.c: Likewise.
2771 * elf32-nds32.c: Likewise.
2772 * elf32-rl78.c: Likewise.
2773 * elf32-rx.c: Likewise.
2774 * elf32-score.c: Likewise.
2775 * elf32-score7.c: Likewise.
2776 * elf32-sh64.c: Likewise.
2777 * elf32-v850.c: Likewise.
2778 * elf32-vax.c: Likewise.
2779 * elf32-visium.c: Likewise.
2780 * elf64-ia64-vms.c: Likewise.
2781 * elf64-mmix.c: Likewise.
2782 * elf64-sh64.c: Likewise.
2783 * elfcode.h: Likewise.
2784 * elfnn-aarch64.c: Likewise.
2785 * elfnn-ia64.c: Likewise.
2786 * elfxx-mips.c: Likewise.
2787 * hpux-core.c: Likewise.
2790 * linker.c: Likewise.
2791 * merge.c: Likewise.
2793 * oasys.c: Likewise.
2794 * pdp11.c: Likewise.
2795 * peXXigen.c: Likewise.
2796 * rs6000-core.c: Likewise.
2797 * vms-alpha.c: Likewise.
2798 * xcofflink.c: Likewise.
2800 2017-04-13 Alan Modra <amodra@gmail.com>
2802 * bfd.c (PRINT_TYPE): Define.
2803 (_doprnt): New function.
2804 (error_handler_internal): Use _doprnt.
2805 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
2806 calls in their natural order, throughout file.
2807 * coff-mcore.c: Likewise.
2808 * coff-ppc.c: Likewise.
2809 * coff-tic80.c: Likewise.
2810 * cofflink.c: Likewise.
2811 * elf-s390-common.c: Likewise.
2813 * elf32-arm.c: Likewise.
2814 * elf32-i386.c: Likewise.
2815 * elf32-m32r.c: Likewise.
2816 * elf32-msp430.c: Likewise.
2817 * elf32-spu.c: Likewise.
2818 * elf64-ia64-vms.c: Likewise.
2819 * elf64-sparc.c: Likewise.
2820 * elf64-x86-64.c: Likewise.
2821 * elflink.c: Likewise.
2822 * elfnn-aarch64.c: Likewise.
2823 * elfnn-ia64.c: Likewise.
2824 * elfxx-mips.c: Likewise.
2826 2017-04-13 Alan Modra <amodra@gmail.com>
2828 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
2829 branch veneers" error. Fix double space and format message.
2830 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
2831 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
2833 2017-04-13 Alan Modra <amodra@gmail.com>
2835 * bfd-in2.h: Regenerate.
2837 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
2839 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
2840 extra `\n' in warning/error messages.
2841 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
2842 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
2844 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
2846 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
2847 processor-specific properties with generic ELF target vector.
2849 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
2851 * elf32-sparc.c (elf_backend_fixup_symbol): New.
2852 * elf64-sparc.c (elf_backend_fixup_symbol): New.
2853 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
2854 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
2856 (link_hash_newfunc): Initialize has_got_reloc and
2858 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
2860 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
2862 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
2864 (_bfd_sparc_elf_fixup_symbol): New function.
2865 (allocate_dynrelocs): Don't allocate space for dynamic
2866 relocations and discard relocations against resolved undefined
2867 weak symbols in executable. Don't make resolved undefined weak
2868 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
2869 relocation against undefined weak symbols in PIE.
2870 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
2871 relocations against resolved undefined weak symbols in PIE
2872 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
2873 without ynamic PLT/GOT relocations for resolved undefined weak
2875 Don't generate dynamic relocation against resolved undefined
2876 weak symbol in executable.
2877 (pie_finish_undefweak_symbol): New function.
2878 (_bfd_sparc_elf_finish_dynamic_sections): Call
2879 pie_finish_undefweak_symbol on all symbols in PIE.
2880 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
2881 (_bfd_sparc_elf_fixup_symbol): New function.
2883 2017-04-10 Nick Clifton <nickc@redhat.com>
2885 * config.bfd: Remove ns32k from obsolete list.
2887 2017-04-10 Alan Modra <amodra@gmail.com>
2890 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
2891 (special_sections_i): Likewise for .init_array.
2892 (special_sections_p): Likewise for .preinit_array.
2894 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
2898 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
2899 ELF_COMMON_DEF_P for common symbols.
2900 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
2901 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
2902 * elflink.c (_bfd_elf_merge_symbol): Revert commits
2903 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
2904 07492f668d2173da7a2bda3707ff0985e0f460b6.
2906 2017-04-07 Pedro Alves <palves@redhat.com>
2908 * opncls.c (bfd_get_debug_link_info): Rename to...
2909 (bfd_get_debug_link_info_1): ... this. Change type of second
2910 parameter to void pointer. Adjust.
2911 (bfd_get_debug_link_info): Reimplement on top of
2912 bfd_get_debug_link_info_1.
2913 (separate_debug_file_exists, separate_alt_debug_file_exists):
2914 Change type of second parameter to void pointer. Adjust.
2915 (get_func_type, check_func_type): Change type of second parameter
2917 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
2918 the callback functions instead of passing the address of a local.
2919 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
2920 find_separate_debug_file.
2921 (get_alt_debug_link_info_shim): Change type of second parameter to
2922 void pointer. Adjust.
2923 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
2924 find_separate_debug_file.
2925 (get_build_id_name, bfd_boolean check_build_id_file): Change type
2926 of second parameter to void pointer. Adjust.
2927 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
2928 pointer local to find_separate_debug_file.
2930 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
2932 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
2933 external symbols with a definition.
2934 (_bfd_coff_gc_mark_extra_sections): Fix typo.
2936 2017-04-07 Alan Modra <amodra@gmail.com>
2938 * po/SRC-POTFILES.in: Regenerate.
2940 2017-04-05 Alan Modra <amodra@gmail.com>
2942 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
2945 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
2947 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
2948 numbers for DataDirectory entry indicies passed to
2951 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
2953 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
2954 each GNU_MBIND section and align GNU_MBIND section to page size.
2955 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
2956 segment for each GNU_MBIND section.
2957 (_bfd_elf_init_private_section_data): Copy sh_info from input
2958 for GNU_MBIND section.
2960 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
2962 * elfnn-riscv.c (GP_NAME): Delete.
2963 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
2964 (_bfd_riscv_relax_lui): Likewise.
2966 2017-04-04 Nick Clifton <nickc@redhat.com>
2969 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
2971 (bfd_elf_final_link): Only initialize the extended symbol index
2972 section if there are extended symbol tables to list.
2974 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
2976 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
2977 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
2978 * configure.ac (elf): Add elf-properties.lo.
2979 * Makefile.in: Regenerated.
2980 * configure: Likewise.
2981 * elf-bfd.h (elf_property_kind): New.
2982 (elf_property): Likewise.
2983 (elf_property_list): Likewise.
2984 (elf_properties): Likewise.
2985 (_bfd_elf_parse_gnu_properties): Likewise.
2986 (_bfd_elf_get_property): Likewise.
2987 (_bfd_elf_link_setup_gnu_properties): Likewise.
2988 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
2989 and setup_gnu_properties.
2990 (elf_obj_tdata): Add properties.
2991 * elf-properties.c: New file.
2992 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
2993 (elf_i386_merge_gnu_properties): Likewise.
2994 (elf_backend_parse_gnu_properties): Likewise.
2995 (elf_backend_merge_gnu_properties): Likewise.
2996 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
2997 (elf_x86_64_merge_gnu_properties): Likewise.
2998 (elf_backend_parse_gnu_properties): Likewise.
2999 (elf_backend_merge_gnu_properties): Likewise.
3000 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
3001 (elf_backend_parse_gnu_properties): Likewise.
3002 (elf_backend_setup_gnu_properties): Likewise.
3003 (elfNN_bed): Add elf_backend_parse_gnu_properties,
3004 elf_backend_merge_gnu_properties and
3005 elf_backend_setup_gnu_properties.
3007 2017-03-30 Pip Cet <pipcet@gmail.com>
3009 * elf32-wasm32.c: Add relocation code, two relocs.
3010 * reloc.c: Add wasm32 relocations.
3011 * libbfd.h: Regenerate.
3012 * bfd-in2.h: Regenerate.
3013 * bfd/po/bfd.pot: Regenerate.
3015 2017-03-29 Nick Clifton <nickc@redhat.com>
3018 * coff-bfd.h (struct coff_section_data): Add new fields:
3019 saved_bias and bias.
3020 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
3021 computed for PE binaries.
3022 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
3025 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
3028 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
3029 to handle a local symbol with a hash-symbol-entry; without PLT.
3030 Add BFD_ASSERT for an incidental case with GOT entry present.
3031 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
3032 isn't forced-or-set local.
3034 2017-03-27 Pip Cet <pipcet@gmail.com>
3036 * wasm-module.c: New file to support WebAssembly modules.
3037 * wasm-module.h: New file to support WebAssembly modules.
3038 * doc/webassembly.texi: Start documenting wasm-module.c.
3039 * config.bfd: Add wasm_vec.
3040 * targets.c: Likewise.
3041 * configure.ac: Likewise.
3042 * Makefile.am: Add entries for wasm-module.c.
3043 * Makefile.in: Regenerate.
3044 * configure: Regenerate.
3045 * po/SRC-POTFILES.in: Regenerate.
3047 2017-03-27 Pip Cet <pipcet@gmail.com>
3049 * cpu-wasm32.c: New file to support wasm32 architecture.
3050 * elf32-wasm32.c: New file to support wasm32 architecture.
3051 * Makefile.am: Add wasm32 architecture.
3052 * archures.c: Likewise.
3053 * config.bfd: Likewise.
3054 * configure.ac: Likewise.
3055 * targets.c: Likewise.
3056 * Makefile.in: Regenerate.
3057 * bfd-in2.h: Regenerate.
3058 * configure: Regenerate.
3059 * po/SRC-POTFILES.in: Regenerate.
3061 2017-03-20 Alan Modra <amodra@gmail.com>
3064 * elf64-ppc.c (compare_symbols): Stabilize sort.
3066 2017-03-18 Alan Modra <amodra@gmail.com>
3068 * elf64-ppc.c (struct ppc_link_hash_table): Add
3069 local_ifunc_resolver and maybe_local_ifunc_resolver.
3070 (ppc_build_one_stub): Set flags on emitting dynamic
3071 relocation to ifunc.
3072 (ppc64_elf_relocate_section): Likewise.
3073 (ppc64_elf_finish_dynamic_symbol): Likewise.
3074 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
3075 local dynamic relocs to ifuncs.
3076 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
3077 local_ifunc_resolver and maybe_local_ifunc_resolver.
3078 (ppc_elf_relocate_section): Set flag on emitting dynamic
3079 relocation to ifuncs.
3080 (ppc_elf_finish_dynamic_symbol): Likewise.
3081 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
3082 dynamic relocs to ifuncs.
3084 2017-03-13 Nick Clifton <nickc@redhat.com>
3087 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
3088 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
3089 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
3090 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
3091 * bfd-in2.h: Regenerate.
3092 * libbfd.h: Regenerate.
3093 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
3095 (IS_AARCH64_TLSDESC_RELOC): Likewise.
3096 (elfNN_aarch64_howto_table): Likewise.
3097 (aarch64_tls_transition_without_check): Likewise.
3098 (aarch64_reloc_got_type): Likewise.
3099 (elfNN_aarch64_final_link_relocate): Likewise.
3100 (elfNN_aarch64_tls_relax): Likewise.
3101 (elfNN_aarch64_relocate_section): Likewise.
3102 (elfNN_aarch64_gc_sweep_hook): Likewise.
3103 (elfNN_aarch64_check_relocs): Likewise.
3104 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
3105 (_bfd_aarch64_elf_resolve_relocation): Likewise.
3107 2017-03-11 Alan Modra <amodra@gmail.com>
3109 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
3110 parameter is in fact used. Whitespace fixes.
3111 * elf64-ppc.c: Likewise.
3113 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
3115 * rs6000-core.c (CORE_NEW): Simplify macro when
3116 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
3118 2017-03-07 Alan Modra <amodra@gmail.com>
3122 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
3125 2017-03-05 Alan Modra <amodra@gmail.com>
3127 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
3128 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
3129 (next_cie_fde_offset): New function.
3130 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
3131 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
3132 four bytes. Align CIEs to four or eight bytes depending on
3133 per_encoding_aligned8. Align FDEs according to their encoding.
3134 Pad last FDE to output section alignment.
3135 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
3137 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
3138 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
3139 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
3141 2017-03-02 Martin Bickel <binutils@ineranves.de>
3144 * elf.c (rewrite_elf_program_header): Do not issue a warning for
3145 empty segments which have a zero filesz, but a non-zero memsz.
3147 2017-03-02 Alan Modra <amodra@gmail.com>
3149 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
3151 2017-02-28 Alan Modra <amodra@gmail.com>
3153 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
3154 (ppc64_elf_relocate_section): Likewise.
3156 2017-02-28 Alan Modra <amodra@gmail.com>
3159 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
3160 rather than elf32_nios2_hash_table or elf_hash_table.
3161 (create_got_section): Likewise.
3162 (nios2_elf32_finish_dynamic_symbol): Likewise.
3163 (nios2_elf32_adjust_dynamic_symbol): Likewise.
3164 (nios2_elf32_size_dynamic_sections): Likewise.
3165 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
3166 vars. Use htab equivalents directly instead. Don't create
3167 all dynamic sections on needing just the GOT. Use a goto
3168 rather than a fall-through with reloc test. Ensure
3169 htab->dynobj is set when making dynamic sreloc section.
3170 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
3171 equivalent directly instead. Don't segfault on looking for
3172 .dynamic when dynamic sections have not been created. Don't
3173 segfault on .got.plt being discarded.
3174 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
3175 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
3176 fixme and another not so relevant comment.
3177 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
3178 already set, set hash table dynobj on creating .sbss.
3180 2017-02-28 Alan Modra <amodra@gmail.com>
3182 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
3183 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
3184 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
3185 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
3186 (ppc64_elf_relocate_section): Likewise.
3187 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
3188 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
3189 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
3190 * libbfd.h: Regenerate.
3191 * bfd-in2.h: Regenerate.
3193 2017-02-28 Alan Modra <amodra@gmail.com>
3195 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
3196 dynamic .data.rel.ro read-only.
3197 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
3198 rather than section flags when deciding where copy reloc goes.
3199 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
3200 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
3201 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
3202 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
3203 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
3204 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
3205 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
3206 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
3207 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3208 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
3209 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
3210 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
3211 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3212 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
3213 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
3214 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
3215 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
3216 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
3217 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
3219 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
3221 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
3222 `jalr $0, $25' instruction encoding.
3224 2017-02-27 Nick Clifton <nickc@redhat.com>
3227 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
3228 generating a seg-fault when encountering a symbol that has been
3229 deleted by garbage collection.
3231 2017-02-25 Alan Modra <amodra@gmail.com>
3233 * elf32-arc.c (struct dynamic_sections): Delete.
3234 (enum dyn_section_types): Delete.
3235 (dyn_section_names): Delete.
3236 (arc_create_dynamic_sections): Delete.
3237 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
3238 segfault on discarded .rela.plt section.
3239 (elf_arc_size_dynamic_sections): Formatting. Don't call
3240 arc_create_dynamic_sections. Don't allocate memory for sections
3241 handled by the generic linker. Correct code finding relocs in
3242 read-only sections. Set SEC_EXCLUDE on zero size .got,
3243 .got.plt, and .dynbss sections. Do set .interp for pies.
3245 2017-02-24 Andrew Waterman <andrew@sifive.com>
3247 * elfnn-riscv.c (GP_NAME): New macro.
3248 (riscv_global_pointer_value): Use it.
3249 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
3250 output section, consider only that section's alignment.
3252 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
3254 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
3255 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
3256 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
3257 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
3259 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
3261 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
3262 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
3265 2017-02-23 Alan Modra <amodra@gmail.com>
3268 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
3270 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
3271 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
3274 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
3277 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
3278 processing ahead of the call to `elf_gc_sweep_symbol'.
3280 2017-02-22 Nick Clifton <nickc@redhat.com>
3283 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
3284 created section 4-byte alignment.
3286 2017-02-22 Alan Modra <amodra@gmail.com>
3288 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
3289 on .got or .plt output section being discarded by script.
3290 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
3293 2017-02-21 Alan Modra <amodra@gmail.com>
3295 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
3296 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
3298 2017-02-20 Alan Modra <amodra@gmail.com>
3301 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
3302 if DT_RELSZ/DT_RELASZ is zero.
3304 2017-02-17 Nick Clifton <nickc@redhat.com>
3306 * compress.c (bfd_get_full_section_contents): Remember to reduce
3307 compressed size by the sizeof the compression header when
3308 decompressing the contents.
3310 2017-02-17 Pedro Alves <palves@redhat.com>
3312 * srec.c (Chunk): Rename to ...
3313 (_bfd_srec_len): ... this.
3314 (S3Forced): Rename to ...
3315 (_bfd_srec_forceS3): ... this.
3316 * objcopy.c: Adjust all references.
3318 2017-02-17 Pedro Alves <palves@redhat.com>
3320 * archive.c (bsd_write_armap): Rename to ...
3321 (_bfd_bsd_write_armap): ... this.
3322 (coff_write_armap): Rename to ...
3323 (_bfd_coff_write_armap): ... this.
3324 * libbfd-in.h (bsd_write_armap): Rename to ...
3325 (_bfd_bsd_write_armap): ... this.
3326 (coff_write_armap): Rename to ...
3327 (_bfd_coff_write_armap): ... this.
3328 * aout-target.h, aout-tic30.c: Adjust all users.
3329 * libbfd.h: Regenerate.
3331 2017-02-17 Pedro Alves <palves@redhat.com>
3333 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
3334 (warn_deprecated): Rename to ...
3335 (_bfd_warn_deprecated): ... this.
3336 * libbfd.c (warn_deprecated): Rename to ...
3337 (_bfd_warn_deprecated): ... this.
3338 * bfd-in2.h: Regenerate.
3340 2017-02-17 Pedro Alves <palves@redhat.com>
3342 * bfdio.c (real_ftell): Rename to ...
3343 (_bfd_real_ftell): ... this.
3344 (real_fseek): Rename to ...
3345 (_bfd_real_fseek): ... this.
3346 (real_fopen): Rename to ...
3347 (_bfd_real_fopen): ... this.
3348 * libbfd-in.h (real_ftell): Rename to ...
3349 (_bfd_real_ftell): ... this.
3350 (real_fseek): Rename to ...
3351 (_bfd_real_fseek): ... this.
3352 (real_fopen): Rename to ...
3353 (_bfd_real_fopen): ... this.
3354 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
3355 * libbfd.h: Regenerate.
3357 2017-02-17 Pedro Alves <palves@redhat.com>
3359 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
3360 * libbfd.c (read_unsigned_leb128): Rename to ...
3361 (_bfd_read_unsigned_leb128): ... this.
3362 (read_signed_leb128): Rename to ...
3363 (_bfd_read_signed_leb128): ... this.
3364 (safe_read_leb128): Rename to ...
3365 (_bfd_safe_read_leb128): ... this.
3366 * libbfd-in.h (read_unsigned_leb128): Rename to ...
3367 (_bfd_read_unsigned_leb128): ... this.
3368 (read_signed_leb128): Rename to ...
3369 (_bfd_read_signed_leb128): ... this.
3370 (safe_read_leb128): Rename to ...
3371 (_bfd_safe_read_leb128): ... this.
3372 * libbfd.h: Renegerate.
3374 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
3376 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
3377 before trying to fine matching file and line information.
3379 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
3381 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
3382 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
3383 not match current bfd, then reload debug information. Record bfd
3384 we're loading debug info for in the stash. If we have debug
3385 informatin in the cache then perform section placement before
3388 2017-02-16 Alan Modra <amodra@gmail.com>
3391 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
3392 * elfxx-target.h (elf_backend_no_page_alias): Define.
3393 (elfNN_bed): Init new field.
3394 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
3395 ensure PT_LOAD segment starts on a new page.
3396 * elf32-hppa.c (elf_backend_no_page_alias): Define.
3398 2017-02-16 Alan Modra <amodra@gmail.com>
3401 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
3404 2017-02-16 Jiong Wang <jiong.wang@arm.com>
3406 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
3407 * bfd-in2.h: Regenerated.
3409 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
3412 * elf32-i386.c (elf_i386_relocate_section): Allow
3413 "lea foo@GOT, %reg" in PIC.
3415 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
3418 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
3419 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
3420 error against local IFUNC symbol without a base register for
3423 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
3425 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
3426 `%P: %H:' with `info->callbacks->einfo'.
3427 (ppc_elf_relocate_section): Likewise.
3428 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
3429 (ppc64_elf_edit_toc): Likewise.
3430 (ppc64_elf_relocate_section): Likewise.
3432 2017-02-14 Alan Modra <amodra@gmail.com>
3434 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
3435 --gc-keep-exported, and test versioned field of sym rather than
3436 looking for @ in name.
3438 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
3440 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
3443 2017-02-13 Nick Clifton <nickc@redhat.com>
3446 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
3449 2017-02-07 Andrew Waterman <andrew@sifive.com>
3451 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
3452 entry size if PLT header is written.
3454 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
3456 Fix sparc64 dynamic relocation processing to use the dynamic
3458 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
3459 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
3462 2017-02-03 Nick Clifton <nickc@redhat.com>
3465 * coffcode.h (coff_write_object_contents): Enlarge size of
3466 s_name_buf in order to avoid compile time warning about possible
3468 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
3469 32-bits of insn value before printing into buffer.
3471 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3473 * elfxx-mips.c (mips_elf_hash_sort_data): Add
3474 `max_local_dynindx'.
3475 (mips_elf_sort_hash_table): Handle it.
3476 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
3477 symbols bump up `max_local_dynindx' rather than
3478 `max_non_got_dynindx'.
3480 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3482 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
3483 `min_got_dynindx', `max_unref_got_dynindx' and
3484 `max_non_got_dynindx' members to the `bfd_size_type' data type.
3485 (mips_elf_sort_hash_table): Adjust accordingly.
3487 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3489 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
3490 to access the hash table.
3492 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3494 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
3495 non-NULL `htab' to the beginning.
3497 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3499 * elflink.c (elf_gc_sweep): Wrap overlong line.
3501 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
3503 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
3504 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
3505 * elfxx-mips.c (mips_elf_link_hash_table): Add
3506 `ignore_branch_isa' member.
3507 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
3508 in branch relocation calculation as an error if
3509 `ignore_branch_isa' has been set.
3510 (_bfd_mips_elf_insn32): Rename to...
3511 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
3512 parameter to `insn32' and add an `ignore_branch_isa' parameter.
3513 Handle the new parameter.
3515 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
3517 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
3518 local variable dynobj.
3521 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
3522 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
3523 executable from read-only sections into sdynrelro.
3524 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
3525 dynamic relocs in sdynrelro.
3526 (elf_backend_want_dynrelro): Define.
3528 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
3530 * config.bfd (*-*-rtemsaout*): Mark as removed.
3532 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
3534 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
3535 (arm-*-rtems*): Move to (arm*-*-eabi*).
3536 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
3537 (m68-*-rtems*): Move to (m68*-*-elf*).
3539 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
3541 * config.bfd (*-*-rtemscoff*): Mark as removed.
3543 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
3546 * elflink.c (bfd_elf_record_link_assignment): Revert last
3547 change and don't ever clear `forced_local'. Set `mark'
3549 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
3551 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
3552 (bfd_elf_size_dynamic_sections): ... here.
3553 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
3554 and set `mark' instead in `__tls_get_addr_opt' processing.
3555 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
3557 2017-01-24 Alan Modra <amodra@gmail.com>
3559 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
3560 where dynamic relocs are preferable. Allow ifunc too.
3561 (ensure_undefweak_dynamic): New function.
3562 (allocate_dynrelocs): Use it here. Move plt handling last and
3563 don't make symbols dynamic, simplifying loop. Only make undef
3564 weak symbols with GOT entries dynamic. Correct condition
3565 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
3566 comments. Remove goto.
3567 (ppc_elf_relocate_section): Correct test for using dynamic
3568 symbol on GOT relocs. Rearrange test for emitting GOT relocs
3569 to suit. Set up explicit tls_index entries and implicit GOT
3570 tls_index entries resolvable at link time for
3571 __tls_get_addr_opt. Simplify test to clear mem for prelink.
3572 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
3573 (ensure_undefweak_dynamic): New function.
3574 (allocate_dynrelocs): Use it here. Only make undef weak symbols
3575 with GOT entries dynamic. Remove unnecessary test of
3576 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
3577 (ppc64_elf_relocate_section): Correct test for using dynamic
3578 symbol on GOT relocs. Rearrange test for emitting GOT relocs
3579 to suit. Set up explicit tls_index entries and implicit GOT
3580 tls_index entries resolvable at link time for __tls_get_addr_opt.
3581 Simplify expression to clear mem for prelink.
3583 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
3585 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
3587 2017-01-20 Jiong Wang <jiong.wang@arm.com>
3589 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
3590 (elf_backend_hash_symbol): Define.
3592 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
3595 * elflink.c (bfd_elf_record_link_assignment): Clear any
3596 `forced_local' marking for DSO symbols that are not being
3599 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
3601 * elfnn-riscv.c (riscv_elf_object_p): New function.
3603 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
3606 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
3608 (elf_x86_64_check_relocs): Create .eh_frame section for the
3610 (elf_x86_64_size_dynamic_sections): Allocate and initialize
3611 .eh_frame section for the .plt.bnd section.
3612 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
3613 for the .plt.bnd section.
3615 2017-01-12 Nick Clifton <nickc@redhat.com>
3618 * opncls.c (find_separate_debug_file): Add include_dirs
3619 parameter. Only include the directory part of the bfd's filename
3620 in search paths if include_dirs is true. Add a couple of extra
3621 locations for looking for debug files.
3622 ( bfd_follow_gnu_debuglink): Update invocation of
3623 find_separate_debug_file.
3624 (bfd_follow_gnu_debugaltlink): Likewise.
3625 (get_build_id): New function: Finds the build-id of the given bfd.
3626 (get_build_id_name): New function: Computes the name of the
3627 separate debug info file for a bfd, based upon its build-id.
3628 (check_build_id_file): New function: Checks to see if a separate
3629 debug info file exists at the given location, and that its
3630 build-id matches that of the original bfd.
3631 (bfd_follow_build_id_debuglink): New function: Finds a separate
3632 debug info file for a given bfd by using the build-id method.
3633 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
3634 method of locating a separate debug info file before using the
3636 * bfd-in2.h: Regenerate.
3638 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
3641 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
3642 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
3643 elf_x86_64_eh_frame_plt_got.
3644 (elf_x86_64_size_dynamic_sections): Get unwind info from
3645 elf_x86_64_bnd_arch_bed for the BND PLT.
3647 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
3649 * config.bfd: Add entries for i686-redox and x86_64-redox.
3651 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
3653 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
3655 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
3656 .eh_frame section to 4 bytes for x32.
3657 (elf_x86_64_check_relocs): Likewise.
3659 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
3662 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
3663 (PLT_GOT_FDE_LENGTH): Likewise.
3664 (elf_i386_plt_layout): Add eh_frame_plt_got and
3665 eh_frame_plt_got_size.
3666 (elf_i386_plt): Updated.
3667 (elf_i386_link_hash_table): Add plt_got_eh_frame.
3668 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
3669 (elf_i386_size_dynamic_sections): Allocate and initialize
3670 .eh_frame section for .plt.got.
3671 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
3673 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
3674 eh_frame_plt_got_size.
3675 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
3676 (PLT_GOT_FDE_LENGTH): Likewise.
3677 (elf_x86_64_backend_data): Add eh_frame_plt_got and
3678 eh_frame_plt_got_size.
3679 (elf_x86_64_arch_bed): Updated.
3680 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
3681 eh_frame_plt_got_size.
3682 (elf_x86_64_nacl_arch_bed): Likewise.
3683 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
3684 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
3685 (elf_x86_64_size_dynamic_sections): Allocate and initialize
3686 .eh_frame section for .plt.got.
3687 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
3690 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
3692 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
3693 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
3695 2017-01-09 Nick Clifton <nickc@redhat.com>
3697 * dwarf2.c (lookup_address_in_function_table): Return early if
3698 there are no functions in the given comp unit, or if the high
3699 address of the last function in the comp unit is less than the
3702 2017-01-09 Nick Clifton <nickc@redhat.com>
3705 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
3706 message if there are too many symbols to load.
3708 2017-01-04 James Clarke <jrtc27@jrtc27.com>
3710 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
3711 if relocs are cached.
3713 2017-01-03 Rich Felker <bugdal@aerifal.cx>
3716 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
3717 for R_MICROBLAZE_GOTOFF_64.
3719 2017-01-03 Nick Clifton <nickc@redhat.com>
3721 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
3722 warning about using a possibly uninitialised variable.
3724 2017-01-02 Alan Modra <amodra@gmail.com>
3726 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
3727 (allocate_plt_static, allocate_dynrelocs): Use it.
3729 2017-01-02 Alan Modra <amodra@gmail.com>
3731 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
3732 .PARISC.unwind section.
3734 2017-01-02 Alan Modra <amodra@gmail.com>
3737 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
3738 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
3739 indirect to GOT pointer relative code edit.
3741 2017-01-02 Alan Modra <amodra@gmail.com>
3743 Update year range in copyright notice of all files.
3745 For older changes see ChangeLog-2016
3747 Copyright (C) 2017 Free Software Foundation, Inc.
3749 Copying and distribution of this file, with or without modification,
3750 are permitted in any medium without royalty provided the copyright
3751 notice and this notice are preserved.
3757 version-control: never