1 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
3 * elfxx-x86.h (elf_x86_link_hash_table): Rearrange fields and
6 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
8 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
9 sgotplt_jump_table_size with elf_x86_compute_jump_table_size.
11 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
13 * elf32-i386.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
14 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Moved to ...
15 * elfxx-x86.h (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
16 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Here.
17 * elf64-x86-64.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
18 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Removed.
20 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
22 * elf32-i386.c (elf_i386_allocate_dynrelocs): Removed.
23 (elf_i386_allocate_local_dynrelocs): Likewise.
24 (elf_i386_size_dynamic_sections): Replace
25 elf_i386_allocate_dynrelocs/elf_i386_allocate_local_dynrelocs
26 with _bfd_x86_elf_allocate_dynrelocs and
27 _bfd_x86_elf_allocate_local_dynrelocs.
28 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Removed.
29 (elf_x86_64_allocate_local_dynrelocs): Likewise.
30 (elf_x86_64_size_dynamic_sections): Replace
31 elf_x86_64_allocate_dynrelocs/elf_x86_64_allocate_local_dynrelocs
32 with _bfd_x86_elf_allocate_dynrelocs and
33 _bfd_x86_elf_allocate_local_dynrelocs.
34 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): New function.
35 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
36 * elfxx-x86.h (_bfd_x86_elf_allocate_dynrelocs): New prototype.
37 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
39 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
41 * elf32-i386.c (is_i386_elf): Removed.
42 (elf_i386_check_relocs): Replace is_i386_elf with is_x86_elf.
43 (elf_i386_size_dynamic_sections): Likewise.
44 (elf_i386_relocate_section): Likewise.
45 * elf64-x86-64.c (is_x86_64_elf): Removed.
46 (elf_x86_64_check_relocs): Replace is_x86_64_elf with
48 (elf_x86_64_size_dynamic_sections): Likewise.
49 (elf_x86_64_relocate_section): Likewise.
50 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
52 * elfxx-x86.h (elf_x86_link_hash_table): Add target_id.
55 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
57 * elf32-i386.c (elf_i386_compute_jump_table_size): Removed.
58 (elf_i386_allocate_dynrelocs): Replace
59 elf_i386_compute_jump_table_size with
60 elf_x86_compute_jump_table_size.
61 (elf_i386_size_dynamic_sections): Likewise.
62 * elf64-x86-64.c (elf_x86_64_compute_jump_table_size): Removed.
63 (elf_x86_64_allocate_dynrelocs): Replace
64 elf_x86_64_compute_jump_table_size with
65 elf_x86_compute_jump_table_size.
66 (elf_x86_64_size_dynamic_sections): Likewise.
67 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
69 * elfxx-x86.h (elf_x86_link_hash_table): Add got_entry_size.
70 (elf_x86_compute_jump_table_size): New.
72 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
74 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
76 (_bfd_x86_elf_adjust_dynamic_symbol): Use sizeof_reloc.
77 * elfxx-x86.h (elf_x86_link_hash_table): Add sizeof_reloc.
79 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
81 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check VxWorks
82 with htab->is_vxworks.
83 (elf_i386_size_dynamic_sections): Likewise.
84 (elf_i386_relocate_section): Likewise.
85 (elf_i386_finish_dynamic_symbol): Likewise.
86 (elf_i386_finish_dynamic_sections): Likewise.
88 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
90 * elf32-i386.c (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
91 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
92 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Moved to ...
93 * elfxx-x86.h (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
94 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
95 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Here.
96 * elf64-x86-64.c (GOT_TLS_IE, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
97 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Removed.
99 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
102 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Check
103 ELF_COMMON_DEF_P for common symbols.
105 2017-09-02 Alan Modra <amodra@gmail.com>
107 * elf-eh-frame.c (offset_adjust): Avoid false positive gcc warning.
108 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Likewise.
109 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
111 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
113 * elf32-i386.c (elf_i386_gc_mark_hook): Removed.
114 (elf_backend_gc_mark_hook): Likewise.
115 * elf64-x86-64.c (elf_x86_64_gc_mark_hook): Likewise.
116 (elf_backend_gc_mark_hook): Likewise.
117 * elfxx-x86.c (_bfd_x86_elf_gc_mark_hook): New function.
118 * elfxx-x86.h (_bfd_x86_elf_gc_mark_hook): New.
119 (elf_backend_gc_mark_hook): Likewise.
121 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
123 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Removed.
124 (elf_backend_adjust_dynamic_symbol): Likewise.
125 * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.
126 (elf_backend_adjust_dynamic_symbol): Likewise.
127 * elfxx-x86.c (_bfd_x86_elf_adjust_dynamic_symbol): New function.
128 (_bfd_x86_elf_link_setup_gnu_properties): Copy is_vxworks.
129 * elfxx-x86.h (elf_x86_link_hash_table): Add is_vxworks.
130 (_bfd_x86_elf_adjust_dynamic_symbol): New.
131 (elf_backend_adjust_dynamic_symbol): Likewise.
133 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
135 * elfxx-x86.h (elf_x86_plt_layout_table): Fix a typo in
138 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
140 * elf32-i386.c (elf_i386_mkobject): Removed.
141 (bfd_elf32_mkobject): Likewise.
142 * elf64-x86-64.c (elf_x86_64_mkobject): Likewise.
143 (bfd_elf64_mkobject): Likewise.
144 (bfd_elf32_mkobject): Likewise.
145 * elfxx-x86.c (_bfd_x86_elf_mkobject): New function.
146 * elfxx-x86.h (_bfd_x86_elf_mkobject): New.
147 (bfd_elf64_mkobject): Likewise.
148 (bfd_elf32_mkobject): Likewise.
150 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
152 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Updated.
153 Call _bfd_x86_elf_link_setup_gnu_properties.
154 * elf64-x86-64.c (elf_x86_lazy_plt_layout): Initialize
155 pic_plt0_entry and pic_plt_entry fields with the non-PIC PLT
157 (elf_x86_64_non_lazy_plt): Likewise.
158 (elf_x86_64_lazy_bnd_plt): Likewise.
159 (elf_x86_64_non_lazy_bnd_plt): Likewise.
160 (elf_x86_64_lazy_ibt_plt): Likewise.
161 (elf_x32_lazy_ibt_plt): Likewise.
162 (elf_x86_64_non_lazy_ibt_plt): Likewise.
163 (elf_x32_non_lazy_ibt_plt): Likewise.
164 (elf_x86_64_nacl_plt): Likewise.
165 (elf_x86_64_link_setup_gnu_properties): Updated. Call
166 _bfd_x86_elf_link_setup_gnu_properties.
167 * elfxx-x86.c: Include elf-vxworks.h".
168 (_bfd_x86_elf_link_setup_gnu_properties): New function.
169 * elfxx-x86.h (elf_x86_lazy_plt_layout): Remove "for i386 only"
170 comments for pic_plt0_entry and pic_plt_entry.
171 (elf_x86_non_lazy_plt_layout): Likewise.
172 (elf_x86_plt_layout_table): New.
173 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
175 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
178 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Create
179 .eh_frame section for the second PLT.
180 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Correct
181 alignment of .eh_frame section for the second PLT.
183 2017-09-01 Nick Clifton <nickc@redhat.com>
186 * dwarf2.c (decode_line_info): Fix test for an overlong line info
189 2017-09-01 Nick Clifton <nickc@redhat.com>
192 * elf-attrs.c (_bfd_elf_parse_attributes): Ensure that the
193 attribute buffer is NUL terminated.
195 2017-08-31 Nick Clifton <nickc@redhat.com>
198 * dwarf2.c (read_section): If necessary add a terminating NUL byte
199 to dwarf string sections.
201 2017-08-31 Alan Modra <amodra@gmail.com>
203 * po/SRC-POTFILES.in: Regenerate.
205 2017-08-31 Alan Modra <amodra@gmail.com>
207 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Don't exit early
208 for a section containing just a terminator. Allow multiple
209 terminators at end of section.
210 * elflink.c (bfd_elf_discard_info): Iterate over .eh_frame
211 sections when not adding alignment. Assert on terminator in
214 2017-08-31 Alan Modra <amodra@gmail.com>
218 * elflink.c (bfd_elf_discard_info): Don't pad embedded zero
221 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
223 * configure.ac (bfd_backends): Add elf64.lo together with
224 elfxx-x86.lo for 64-bit BFD.
225 * configure: Regenerated.
227 2017-08-31 James Bowman <james.bowman@ftdichip.com>
229 * elf32-ft32.c (ft32_elf_howto_table): Use complain_overflow_dont
232 2017-08-31 Alan Modra <amodra@gmail.com>
235 * opncls.c (bfd_close_all_done): Don't call bfd_cache_close
236 before _close_and_cleanup. Call iovec->bclose after.
237 (bfd_close): Remove code common to, and call, bfd_close_all_done.
239 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
241 * elf32-i386.c (elf_i386_plt_type): Removed.
242 (elf_i386_plt): Likewise.
243 (elf_i386_get_synthetic_symtab): Updated. Call
244 _bfd_x86_elf_get_synthetic_symtab.
245 * elf64-x86-64.c (elf_x86_64_plt_type): Removed.
246 (elf_x86_64_plt): Likewise.
247 (elf_x86_64_get_synthetic_symtab): Updated. Call
248 _bfd_x86_elf_get_synthetic_symtab.
249 * elfxx-x86.c (elf_i386_get_plt_got_vma): New function.
250 (elf_x86_64_get_plt_got_vma): Likewise.
251 (elf_i386_valid_plt_reloc_p): Likewise.
252 (elf_x86_64_valid_plt_reloc_p): Likewise.
253 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
254 * elfxx-x86.h (elf_x86_plt_type): New.
255 (elf_x86_plt): Likewise.
256 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
258 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
260 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Check
261 target_id instead of elf_machine_code.
263 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
265 * elf32-i386.c (ELF_DYNAMIC_INTERPRETER): Removed.
266 (elf_i386_lazy_plt_layout): Likewise.
267 (elf_i386_non_lazy_plt_layout): Likewise.
268 (elf_i386_plt_layout): Likewise.
269 (elf_i386_link_hash_table): Likewise.
270 (elf_i386_next_tls_desc_index): Likewise.
271 (elf_i386_srelplt2): Likewise.
272 (elf_i386_plt): Likewise.
273 (elf_i386_lazy_plt): Likewise.
274 (elf_i386_non_lazy_plt): Likewise.
275 (elf_i386_link_hash_table_create): Likewise.
276 (bfd_elf32_bfd_link_hash_table_create): Likewise.
277 (elf_i386_lazy_plt): Updated.
278 (elf_i386_non_lazy_plt): Likewise.
279 (elf_i386_lazy_ibt_plt): Likewise.
280 (elf_i386_non_lazy_ibt_plt): Likewise.
281 (elf_i386_allocate_dynrelocs): Likewise.
282 (elf_i386_size_dynamic_sections): Likewise.
283 (elf_i386_relocate_section): Likewise.
284 (elf_i386_finish_dynamic_symbol): Likewise.
285 (elf_i386_finish_dynamic_sections): Likewise.
286 (elf_i386_get_synthetic_symtab): Likewise.
287 (elf_i386_link_setup_gnu_properties): Likewise.
288 (elf_i386_nacl_plt): Likewise.
289 * elf64-x86-64.c (ABI_64_P): Removed.
290 (ELF64_DYNAMIC_INTERPRETER): Likewise.
291 (ELF32_DYNAMIC_INTERPRETER): Likewise.
292 (elf_x86_64_lazy_plt_layout): Likewise.
293 (elf_x86_64_non_lazy_plt_layout): Likewise.
294 (elf_x86_64_plt_layout): Likewise.
295 (elf_x86_64_link_hash_table): Likewise.
296 (elf_x86_64_plt): Likewise.
297 (elf_x86_64_lazy_plt): Likewise.
298 (elf_x86_64_non_lazy_plt): Likewise.
299 (elf_x86_64_link_hash_table_create): Likewise.
300 (bfd_elf64_bfd_link_hash_table_create): Likewise.
301 (bfd_elf32_bfd_link_hash_table_create): Likewise.
302 (elf_x86_64_lazy_plt): Updated.
303 (elf_x86_64_non_lazy_plt): Likewise.
304 (elf_x86_64_lazy_bnd_plt): Likewise.
305 (elf_x86_64_non_lazy_bnd_plt): Likewise.
306 (elf_x86_64_lazy_ibt_plt): Likewise.
307 (elf_x32_lazy_ibt_plt): Likewise.
308 (elf_x86_64_non_lazy_ibt_plt): Likewise.
309 (elf_x32_non_lazy_ibt_plt): Likewise.
310 (elf_x86_64_allocate_dynrelocs): Likewise.
311 (elf_x86_64_size_dynamic_sections): Likewise.
312 (elf_x86_64_relocate_section): Likewise.
313 (elf_x86_64_finish_dynamic_symbol): Likewise.
314 (elf_x86_64_finish_dynamic_sections): Likewise.
315 (elf_x86_64_get_synthetic_symtab): Likewise.
316 (elf_x86_64_link_setup_gnu_properties): Likewise.
317 (elf_x86_64_nacl_plt): Likewise.
318 * elfxx-x86.c: Include "objalloc.h", "elf/i386.h" and
320 (ELF32_DYNAMIC_INTERPRETER): New.
321 (ELF64_DYNAMIC_INTERPRETER): Likewise.
322 (ELFX32_DYNAMIC_INTERPRETER): Likewise.
323 (_bfd_x86_elf_link_hash_table_create): Likewise.
324 (_bfd_x86_elf_link_hash_table_free): Renamed to ...
325 (elf_x86_link_hash_table_free): This. Make it static.
326 * elfxx-x86.h: Don't include "objalloc.h".
328 (elf_x86_lazy_plt_layout): Likewise.
329 (elf_x86_non_lazy_plt_layout): Likewise.
330 (elf_x86_plt_layout): Likewise.
331 (_bfd_x86_elf_link_hash_table_create): Likewise.
332 (bfd_elf64_bfd_link_hash_table_create): Likewise.
333 (bfd_elf32_bfd_link_hash_table_create): Likewise.
334 (elf_x86_link_hash_table): Add plt, lazy_plt, non_lazy_plt,
335 srelplt2 and next_tls_desc_index.
336 (_bfd_x86_elf_link_hash_table_free): Removed.
338 2017-08-30 Maciej W. Rozycki <macro@imgtec.com>
340 * elfxx-mips.c (mips_elf_perform_relocation): Correct microMIPS
341 branch offset interpretation.
343 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
346 * opncls.c (bfd_close_all_done): Call _close_and_cleanup.
348 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
350 * elf64-x86-64.c (elf_x86_64_next_tls_desc_index): Removed.
351 (elf_x86_64_srelplt2): Likewise.
353 2017-08-30 Alan Modra <amodra@gmail.com>
355 * elf64-ppc.c (struct ppc_link_hash_table): Add do_tls_opt.
356 (ppc64_elf_tls_optimize): Set it.
357 (ppc64_elf_relocate_section): Nop addis on TPREL16_HA, and convert
358 insn on TPREL16_LO and TPREL16_LO_DS relocs to use r13 when
359 addis would add zero.
360 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add do_tls_opt.
361 (ppc_elf_tls_optimize): Set it.
362 (ppc_elf_relocate_section): Nop addis on TPREL16_HA, and convert
363 insn on TPREL16_LO relocs to use r2 when addis would add zero.
365 2017-08-30 Alan Modra <amodra@gmail.com>
367 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing
368 __tls_get_addr call sequences to LE, don't move the addi down
369 to the nop. Replace the bl with addi and leave the nop alone.
371 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
373 * elf32-i386.c (elf_i386_pie_finish_undefweak_symbol):
375 * elf64-x86-64.c (elf_x86_64_finish_local_dynamic_symbol):
377 (elf_x86_64_pie_finish_undefweak_symbol): Likewise.
379 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
381 * Makefile.am (BFD32_BACKENDS): Add elfxx-x86.lo.
382 (BFD64_BACKENDS): Likewise.
383 (BFD32_BACKENDS_CFILES): Add elfxx-x86.c.
384 (BFD64_BACKENDS_CFILES): Likewise.
385 * Makefile.in: Regenerated.
386 * configure.ac (bfd_backends): Add elfxx-x86.lo together with
387 elf32-i386.lo and elf64-x86-64.lo.
388 * configure: Regenerated.
389 * elf32-i386.c: Include "elfxx-x86.h" instead of "sysdep.h",
390 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
391 "objalloc.h" and "hashtab.h".
392 (ELIMINATE_COPY_RELOCS): Removed.
393 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
394 (SYMBOL_NO_COPYRELOC): Likewise.
395 (elf_i386_link_hash_entry): Likewise.
396 (GOT_UNKNOWN): Likewise.
397 (GOT_NORMAL): Likewise.
398 (GOT_TLS_GD): Likewise.
399 (elf_i386_hash_entry): Likewise.
400 (elf_i386_obj_tdata): Likewise.
401 (elf_i386_tdata): Likewise.
402 (elf_i386_local_got_tls_type): Likewise.
403 (elf_i386_local_tlsdesc_gotent): Likewise.
404 (elf_i386_hash_table): Likewise.
405 (elf_i386_link_hash_newfunc): Likewise.
406 (elf_i386_local_htab_hash): Likewise.
407 (elf_i386_local_htab_eq): Likewise.
408 (elf_i386_get_local_sym_hash): Likewise.
409 (elf_i386_link_hash_table_free): Likewise.
410 (elf_i386_copy_indirect_symbol): Likewise.
411 (elf_i386_fixup_symbol): Likewise.
412 (elf_i386_readonly_dynrelocs): Likewise.
413 (elf_i386_always_size_sections): Likewise.
414 (elf_i386_set_tls_module_base): Likewise.
415 (elf_i386_dtpoff_base): Likewise.
416 (compare_relocs): Likewise.
417 (elf_i386_hash_symbol): Likewise.
418 (elf_i386_parse_gnu_properties): Likewise.
419 (elf_i386_merge_gnu_properties): Likewise.
420 (elf_i386_link_check_relocs): Likewise.
421 (elf_i386_merge_symbol_attribute): Likewise.
422 (bfd_elf32_bfd_link_check_relocs): Likewise.
423 (elf_backend_copy_indirect_symbol): Likewise.
424 (elf_backend_always_size_sections): Likewise.
425 (elf_backend_omit_section_dynsym): Likewise.
426 (elf_backend_hash_symbol): Likewise.
427 (elf_backend_fixup_symbol): Likewise.
428 (elf_backend_parse_gnu_properties): Likewise.
429 (elf_backend_merge_gnu_properties): Likewise.
430 (elf_backend_merge_symbol_attribute): Likewise.
431 (elf_i386_mkobject): Updated.
432 (elf_i386_link_hash_table_create): Likewise.
433 (elf_i386_check_tls_transition): Likewise.
434 (elf_i386_tls_transition): Likewise.
435 (elf_i386_convert_load_reloc): Likewise.
436 (elf_i386_check_relocs): Likewise.
437 (elf_i386_adjust_dynamic_symbol): Likewise.
438 (elf_i386_allocate_dynrelocs): Likewise.
439 (elf_i386_convert_load): Likewise.
440 (elf_i386_size_dynamic_sections): Likewise.
441 (elf_i386_relocate_section): Likewise.
442 (elf_i386_finish_dynamic_symbol ): Likewise.
443 (elf_i386_finish_dynamic_sections): Likewise.
444 (elf_i386_output_arch_local_syms): Likewise.
445 (elf_i386_get_synthetic_symtab): Likewise.
446 (elf_i386_link_setup_gnu_properties): Likewise.
447 (elf_i386_link_hash_table): Use elf_x86_link_hash_table, instead
448 of elf_link_hash_table, as base.
449 (elf_i386_next_tls_desc_index): New.
450 (elf_i386_srelplt2): Likewise.
451 (elf_i386_plt): Likewise.
452 (elf_i386_lazy_plt): Likewise.
453 (elf_i386_non_lazy_plt): Likewise.
454 * elf32-x86-64.c: Include "elfxx-x86.h" instead of "sysdep.h",
455 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
456 "objalloc.h" and "hashtab.h".
457 (ELIMINATE_COPY_RELOCS): Removed.
458 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
459 (SYMBOL_NO_COPYRELOC): Likewise.
460 (elf_x86_64_link_hash_entry): Likewise.
461 (GOT_UNKNOWN): Likewise.
462 (GOT_NORMAL): Likewise.
463 (GOT_TLS_GD): Likewise.
464 (elf_x86_64_hash_entry): Likewise.
465 (elf_x86_64_obj_tdata): Likewise.
466 (elf_x86_64_tdata): Likewise.
467 (elf_x86_64_local_got_tls_type): Likewise.
468 (elf_x86_64_local_tlsdesc_gotent): Likewise.
469 (elf_x86_64_hash_table): Likewise.
470 (elf_x86_64_link_hash_newfunc): Likewise.
471 (elf_x86_64_local_htab_hash): Likewise.
472 (elf_x86_64_local_htab_eq): Likewise.
473 (elf_x86_64_get_local_sym_hash): Likewise.
474 (elf_x86_64_link_hash_table_free): Likewise.
475 (elf_x86_64_copy_indirect_symbol): Likewise.
476 (elf_x86_64_fixup_symbol): Likewise.
477 (elf_x86_64_readonly_dynrelocs): Likewise.
478 (elf_x86_64_always_size_sections): Likewise.
479 (elf_x86_64_set_tls_module_base): Likewise.
480 (elf_x86_64_dtpoff_base): Likewise.
481 (compare_relocs): Likewise.
482 (elf_x86_64_merge_symbol_attribute): Likewise.
483 (elf_x86_64_hash_symbol): Likewise.
484 (elf_x86_64_parse_gnu_properties): Likewise.
485 (elf_x86_64_merge_gnu_properties): Likewise.
486 (elf_x86_64_link_check_relocs): Likewise.
487 (elf_backend_copy_indirect_symbol): Likewise.
488 (elf_backend_always_size_sections): Likewise.
489 (bfd_elf64_bfd_link_check_relocs): Likewise.
490 (elf_backend_merge_symbol_attribute): Likewise.
491 (elf_backend_hash_symbol): Likewise.
492 (elf_backend_omit_section_dynsym): Likewise.
493 (elf_backend_fixup_symbol): Likewise.
494 (elf_backend_parse_gnu_properties): Likewise.
495 (elf_backend_merge_gnu_properties): Likewise.
496 (bfd_elf32_bfd_link_check_relocs): Likewise.
497 (elf_x86_64_mkobject): Updated.
498 (elf_x86_64_link_hash_table_create): Likewise.
499 (elf_x86_64_check_tls_transition): Likewise.
500 (elf_x86_64_tls_transition): Likewise.
501 (elf_x86_64_convert_load_reloc): Likewise.
502 (elf_x86_64_check_relocs): Likewise.
503 (elf_x86_64_adjust_dynamic_symbol): Likewise.
504 (elf_x86_64_allocate_dynrelocs): Likewise.
505 (elf_x86_64_convert_load): Likewise.
506 (elf_x86_64_size_dynamic_sections): Likewise.
507 (elf_x86_64_relocate_section): Likewise.
508 (elf_x86_64_finish_dynamic_symbol ): Likewise.
509 (elf_x86_64_finish_dynamic_sections): Likewise.
510 (elf_x86_64_output_arch_local_syms): Likewise.
511 (elf_x86_64_get_synthetic_symtab): Likewise.
512 (elf_x86_64_link_setup_gnu_properties): Likewise.
513 (elf_x86_64_link_hash_table): Use elf_x86_link_hash_table,
514 instead of elf_link_hash_table, as base.
515 (elf_x86_64_next_tls_desc_index): New.
516 (elf_x86_64_srelplt2): Likewise.
517 (elf_x86_64_plt): Likewise.
518 (elf_x86_64_lazy_plt): Likewise.
519 (elf_x86_64_non_lazy_plt): Likewise.
520 * elfxx-x86.c: New file.
521 * elfxx-x86.h: Likewise.
523 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
525 * elf32-i386.c (elf_i386_get_synthetic_symtab): Simplify bad
527 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
529 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
531 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check valid PLT
532 sections before checking dynamic relocations and free invalid
533 PLT section contents.
534 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
536 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
538 * elf-bfd.h (_bfd_elf_ifunc_get_synthetic_symtab): Removed.
539 * elf-ifunc.c (_bfd_elf_ifunc_get_synthetic_symtab): Likewise.
541 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
544 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check for valid
546 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
548 2017-08-27 H.J. Lu <hongjiu.lu@intel.com>
550 * elf32-i386.c (elf_i386_link_hash_newfunc): Initialize
552 * elf64-x86-64.c (elf_x86_64_link_hash_newfunc): Likewise.
554 2017-08-26 H.J. Lu <hongjiu.lu@intel.com>
557 * elf-bfd.h (elf_obj_tdata): Use ENUM_BITFIELD on object_id,
558 dyn_lib_class and has_gnu_symbols. Change bad_symtab to bitfield.
559 Add a has_no_copy_on_protected bitfield.
560 (elf_has_no_copy_on_protected): New.
561 * elf-properties.c (_bfd_elf_parse_gnu_properties): Set
562 elf_has_no_copy_on_protected for GNU_PROPERTY_NO_COPY_ON_PROTECTED.
563 (elf_merge_gnu_property_list): Likewise.
564 (_bfd_elf_link_setup_gnu_properties): Set extern_protected_data
565 to FALSE for elf_has_no_copy_on_protected.
566 * elf32-i386.c (SYMBOL_NO_COPYRELOC): New.
567 (elf_i386_link_hash_entry): Add def_protected.
568 (elf_i386_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
569 when checking info->nocopyreloc.
570 (elf_i386_link_setup_gnu_properties): Don't set
571 extern_protected_data here.
572 (elf_i386_merge_symbol_attribute): New function.
573 (elf_backend_merge_symbol_attribute): New.
574 * elf64-x86-64.c (SYMBOL_NO_COPYRELOC): New.
575 (elf_x86_64_link_hash_entry): Add def_protected.
576 (elf_x86_64_need_pic): Report protected symbol for def_protected.
577 (elf_x86_64_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
578 when checking info->nocopyreloc.
579 (elf_x86_64_relocate_section): Also check for R_X86_64_PC32
580 relocation run-time overflow and unresolvable R_X86_64_32S
581 relocation against protected data symbol defined in shared object
582 with GNU_PROPERTY_NO_COPY_ON_PROTECTED.
583 (elf_x86_64_link_setup_gnu_properties): Don't set
584 extern_protected_data here.
585 (elf_x86_64_merge_symbol_attribute): New function.
586 (elf_backend_merge_symbol_attribute): New.
588 2017-08-26 Alan Modra <amodra@gmail.com>
590 * elf32-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
591 (ppc_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
592 (ppc_elf_relocate_section): Comment fix.
593 * elf64-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
594 (ppc64_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
595 Support dynamic relocs for TPREL16 when non-pic too.
596 (dec_dynrel_count): Adjust TPREL16 handling as per check_relocs.
597 (ppc64_elf_relocate_section): Support dynamic relocs for TPREL16
600 2017-08-25 H.J. Lu <hongjiu.lu@intel.com>
602 * elf32-i386.c (elf_i386_link_hash_entry): Remove redundant
603 "symbol" in comments.
604 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Likewise.
606 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
609 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for
610 R_X86_64_PC32 relocation run-time overflow and unresolvable
611 R_X86_64_32S relocation with -z nocopyreloc.
613 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
615 * elf32-i386.c (elf_i386_check_relocs): Revert the last change.
616 Undefined symbols may not have a type.
617 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
619 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
621 * elf64-x86-64.c (elf_x86_64_need_pic): Add an argument for
622 bfd_link_info. Report shared, PIE or PDE object based on
624 (elf_x86_64_check_relocs): Update elf_x86_64_need_pic call.
625 (elf_x86_64_relocate_section): Likewise.
627 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
629 * elf32-i386.c (elf_i386_check_relocs): Increment PLT count only
630 for function symbols.
631 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
633 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
635 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set
636 extern_protected_data to FALSE if GNU_PROPERTY_NO_COPY_ON_PROTECTED
637 is set on any input relocatable file.
638 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
640 2017-08-23 Alan Modra <amodra@gmail.com>
643 * elf64-ppc.c (ensure_undef_dynamic): Rename from
644 ensure_undefweak_dynamic. Handle undefined too.
645 * elf32-ppc.c (ensure_undef_dynamic): Likewise.
646 * elf32-hppa.c (ensure_undef_dynamic): Likewise.
647 (allocate_dynrelocs): Discard undefined non-default visibility
648 relocs first. Make undefined syms dynamic. Tidy goto.
650 2017-08-21 Alan Modra <amodra@gmail.com>
651 H.J. Lu <hongjiu.lu@intel.com>
654 * elf-bfd.h (SYMBOLIC_BIND): Return TRUE for __start/__stop symbols.
655 * elflink.c (bfd_elf_define_start_stop): Rewrite.
657 2017-08-21 Hans-Peter Nilsson <hp@bitrange.com>
660 * elf64-mmix.c (mmix_elf_relax_section): Correct handling of
661 undefined weak symbols.
663 2017-08-18 Nick Clifton <nickc@redhat.com>
666 * tekhex.c (getsym): Fix check for source pointer walking off the
667 end of the input buffer.
669 2017-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
672 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Skip IFUNC
673 relocations in debug sections, change abort to _bfd_error_handler.
675 2017-08-14 Nick Clifton <nickc@redhat.com>
678 * elf.c (setup_group): Check for an empty or very small group
680 * po/bfd.pot: Regenerate.
682 2017-08-14 Alan Modra <amodra@gmail.com>
685 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't add
686 alignment padding here.
687 * elflink.c (bfd_elf_discard_info): Add .eh_frame padding here
688 in a reverse pass over sections.
690 2017-08-11 H.J. Lu <hongjiu.lu@intel.com>
693 * elf32-i386.c (elf_i386_get_synthetic_symtab): Allocate space
694 for @plt suffixes first.
695 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
697 2017-08-08 Nick Clifton <nickc@redhat.com>
700 * elf-attrs.c (_bfd_elf_parse_attributes): Complain about very
701 small section lengths.
702 * elf.c (_bfd_elf_setup_sections): Skip empty entries in the group
704 (elfcore_grok_freebsd_prstatus): Add checks to make sure that
705 there is enough data present in the note.
707 2017-08-08 Alan Modra <amodra@gmail.com>
710 * elf32-microblaze.c (microblaze_elf_check_relocs): Don't bump
711 got.refcount for GOTOFF relocs, just create .got section.
713 2017-08-07 H.J. Lu <hongjiu.lu@intel.com>
715 * elflink.c (elf_link_add_object_symbols): Move common symbol
716 check after bed->common_definition.
718 2017-08-07 Alan Modra <amodra@gmail.com>
721 * elflink.c (bfd_elf_final_link): Don't segfault when sections
722 needed to define various dynamic tags have been discarded.
724 2017-08-07 Nick Clifton <nickc@redhat.com>
727 * elf32-i386.c (elf_i386_link_setup_gnu_properties): If the dynobj
728 has not been set then use the bfd returned by
729 _bfd_elf_link_setup_gnu_properties. If that is null then search
730 through all the input bfds selecting the first normal, ELF format
732 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
734 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
736 * elf32-i386.c (elf_i386_link_hash_entry): Change tls_get_addr
738 (elf_i386_link_hash_newfunc): Initialize tls_get_addr to 0.
739 (elf_i386_check_tls_transition): Check tls_get_addr directly.
740 (elf_i386_convert_load_reloc): Update tls_get_addr check.
741 (elf_i386_link_check_relocs): New function.
742 (bfd_elf32_bfd_link_check_relocs): New.
743 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Change tls_get_addr
745 (elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 0.
746 (elf_x86_64_check_tls_transition): Check tls_get_addr directly.
747 (elf_x86_64_convert_load_reloc): Update tls_get_addr check.
748 (elf_x86_64_link_check_relocs): New function.
749 (bfd_elf64_bfd_link_check_relocs): New.
750 (bfd_elf32_bfd_link_check_relocs): Likewise.
752 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
755 * elflink.c (elf_link_add_object_symbols): Treat common symbol
756 as undefined for --no-define-common.
758 2017-08-05 Alan Modra <amodra@gmail.com>
760 * elf32-hppa.c (elf32_hppa_set_gp): Don't require an
761 hppa_link_hash_table.
763 2017-08-02 Max Filippov <jcmvbkbc@gmail.com>
765 * xtensa-isa.c (xtensa_isa_init): Don't update lookup table
766 entries for sysregs with negative indices.
768 2017-08-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
770 * elf32-s390.c (elf_s390_finish_dynamic_sections): Skip if it
771 isn't the S/390 specific elf data.
772 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
774 2017-07-31 Kuan-Lin Chen <rufus@andestech.com>
776 * elfxx-riscv.c (riscv_elf_add_sub_reloc): New function.
777 * (howto_table) [R_RISCV_ADD8]: Use riscv_elf_add_sub_reloc.
778 [R_RISCV_ADD16]: Likewise.
779 [R_RISCV_ADD32]: Likewise.
780 [R_RISCV_ADD64]: Likewise.
781 [R_RISCV_SUB6]: Likewise.
782 [R_RISCV_SUB8]: Likewise.
783 [R_RISCV_SUB16]: Likewise.
784 [R_RISCV_SUB32]: Likewise.
785 [R_RISCV_SUB64]: Likewise.
787 2017-07-31 Alan Modra <amodra@gmail.com>
789 * elf64-ppc.c (ppc64_elf_tls_setup): Warn on --plt-localentry
790 without ld.so checks.
792 2017-07-29 Alan Modra <amodra@gmail.com>
795 * elf64-ppc.c (struct ppc_link_hash_entry): Add non_zero_localentry.
796 (ppc64_elf_merge_symbol): Set non_zero_localentry.
797 (is_elfv2_localentry0): Test non_zero_localentry.
798 (ppc64_elf_tls_setup): Default to --no-plt-localentry.
800 2017-07-28 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
802 * elf32-s390.c (elf_s390_finish_dynamic_sections): Add NULL
803 pointer check for htab->elf.irelplt.
804 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
806 2017-07-27 Nick Clifton <nickc@redhat.com>
809 * mach-o.c (bfd_mach_o_read_symtab_strtab): Fail if the symtab
811 * nlmcode.h (nlm_swap_auxiliary_headers_in): Replace assertion
813 * section.c (bfd_make_section_with_flags): Fail if the name or bfd
815 * vms-alpha.c (bfd_make_section_with_flags): Correct computation
817 (evax_bfd_print_emh): Check for invalid string lengths.
819 2017-07-25 Nick Clifton <nickc@redhat.com>
821 * po/fr.po: Updated French translation.
823 2017-07-25 Benjamin Green <bengreen5mx@gmail.com>
826 * elf32-msp430.c (msp430_elf_relax_section): Allow conversion of
827 16-bit absolute branches into 10-bit pc-relative branches on the
828 MSP430 as well as the MSP430X.
830 2017-07-25 Alan Modra <amodra@gmail.com>
832 * elf64-ppc.c (struct map_stub): Add tls_get_addr_opt_bctrl.
833 (stub_eh_frame_size): New function.
834 (ppc_size_one_stub): Set group tls_get_addr_opt_bctrl.
835 (group_sections): Init group tls_get_addr_opt_bctrl.
836 (ppc64_elf_size_stubs): Update sizing and initialization of
837 .eh_frame. Iteration over stubs via group list.
838 (ppc64_elf_build_stubs): Iterate over stubs via group list.
839 (ppc64_elf_finish_dynamic_sections): Update finalization of
842 2017-07-24 Nick Clifton <nickc@redhat.com>
845 * mach-o.c (bfd_mach_o_canonicalize_relocs): Pass the base address
846 of the relocs to the canonicalize_one_reloc routine.
847 * mach-o.h (struct bfd_mach_o_backend_data): Update the prototype
848 for the _bfd_mach_o_canonicalize_one_reloc field.
849 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add
850 res_base parameter. Use to check for corrupt pair relocs.
851 * mach-o-aarch64.c (bfd_mach_o_arm64_canonicalize_one_reloc):
853 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc):
855 * mach-o-x86-64.c (bfd_mach_o_x86_64_canonicalize_one_reloc):
858 * vms-alpha.c (_bfd_vms_slurp_eihd): Make sure that there is
859 enough data in the record before attempting to parse it.
860 (_bfd_vms_slurp_eeom): Likewise.
862 (_bfd_vms_slurp_egsd): Check for an invalid section index.
863 (image_set_ptr): Likewise.
864 (alpha_vms_slurp_relocs): Likewise.
866 (alpha_vms_object_p): Check for a truncated record.
868 2017-07-24 Nick Clifton <nickc@redhat.com>
871 * reloc.c (_bfd_unrecognized_reloc): New function. Reports
872 an unrecognized reloc and sets the bfd_error value.
873 * libbfd.h: Regenerate.
874 * elf32-arm.c (elf32_arm_final_link_relocate): Use the new
876 * elf32-i386.c (elf_i386_relocate_section): Likewise.
877 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
878 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
879 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.
880 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
882 2017-07-23 Alan Modra <amodra@gmail.com>
884 * elf64-ppc.c (ppc64_elf_size_stubs): Correct advance to
887 2017-07-19 Szabolcs Nagy <szabolcs.nagy@arm.com>
890 * elfnn-aarch64.c (elfNN_aarch64_reloc_type_class): Return
891 reloc_class_ifunc for ifunc symbols.
893 2017-07-19 Nick Clifton <nickc@redhat.com>
896 * archive.c (bfd_generic_archive_p): If the bfd does not have the
897 correct magic bytes at the start, set the error to wrong format
898 and clear the format selector before returning NULL.
900 2017-07-19 Nick Clifton <nickc@redhat.com>
903 * coff-rs6000.c (_bfd_strntol): New function.
904 (_bfd_strntoll): New function.
905 (GET_VALUE_IN_FIELD): New macro.
906 (EQ_VALUE_IN_FIELD): new macro.
907 (_bfd_xcoff_slurp_armap): Use new macros.
908 (_bfd_xcoff_archive_p): Likewise.
909 (_bfd_xcoff_read_ar_hdr): Likewise.
910 (_bfd_xcoff_openr_next_archived_file): Likewise.
911 (_bfd_xcoff_stat_arch_elt): Likewise.
912 * coff64-rs6000.c (_bfd_strntol): New function.
913 (_bfd_strntoll): New function.
914 (GET_VALUE_IN_FIELD): New macro.
915 (xcoff64_slurp_armap): Use new macros.
917 2017-07-19 Claudiu Zissulescu <claziss@synopsys.com>
918 John Eric Martin <John.Martin@emmicro-us.com>
920 * bfd-in2.h: Regenerate.
921 * libbfd.h: Regenerate.
922 * elf32-arc.c (JLI): Define.
923 * reloc.c: Add JLI relocations.
925 2017-07-18 Nick Clifton <nickc@redhat.com>
928 * coff-sh.c: Fix spelling typos.
929 * compress.c: Likewise.
930 * cpu-pdp11.c: Likewise.
931 * ecofflink.c: Likewise.
932 * elf-m10300.c: Likewise.
934 * elf32-arm.c: Likewise.
935 * elf32-m68k.c: Likewise.
936 * elf32-nds32.c: Likewise.
937 * elf32-ppc.c: Likewise.
938 * elf32-sh.c: Likewise.
939 * elf32-v850.c: Likewise.
940 * elf64-ppc.c: Likewise.
941 * elf64-x86-64.c: Likewise.
942 * elflink.c: Likewise.
943 * elfnn-aarch64.c: Likewise.
944 * elfxx-mips.c: Likewise.
947 * vms-alpha.c: Likewise.
948 * xcofflink.c: Likewise.
950 2017-07-18 Nick Clifton <nickc@redhat.com>
953 * coffcode.h (handle_COMDAT): Replace abort with an error message
956 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
959 * elf64-x86-64.c (elf_x86_64_relocate_section): Limit PIC check
962 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
964 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
966 2017-07-16 Alan Modra <amodra@gmail.com>
968 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimize
969 __tls_index GOT entries when using __tls_get_addr_opt stub.
970 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
972 2017-07-12 Alan Modra <amodra@gmail.com>
974 * po/es.po: Update from translationproject.org/latest/bfd/.
975 * po/fi.po: Likewise.
976 * po/fr.po: Likewise.
977 * po/id.po: Likewise.
978 * po/ja.po: Likewise.
979 * po/ro.po: Likewise.
980 * po/ru.po: Likewise.
981 * po/sr.po: Likewise.
982 * po/sv.po: Likewise.
983 * po/tr.po: Likewise.
984 * po/uk.po: Likewise.
985 * po/vi.po: Likewise.
986 * po/zh_CN.po: Likewise.
987 * po/hr.po: New file from translationproject.org.
988 * configure.ac (ALL_LINGUAS): Add hr. Sort.
989 * configure: Regenerate.
991 2017-07-12 Nick Clifton <nickc@redhat.com>
993 Fix compile time warnings using gcc 7.1.1.
994 * elf32-xtensa.c (elf_xtensa_get_plt_section): Increase length of
996 (elf_xtensa_get_gotplt_section): Increase length of got_name
998 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add a
999 default return of FALSE.
1000 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc): Add a
1001 default return of FALSE.
1003 2017-07-12 Alan Modra <amodra@gmail.com>
1005 * binary.c (binary_set_section_contents): Don't print filepos in
1007 (coff_write_object_contents): Cast size_t for error message.
1008 (coff_slurp_line_table): Don't use bfd_vma symndx.
1009 (coff_slurp_reloc_table): Remove unneeded cast.
1010 * dwarf2.c (read_section): Cast bfd_int64_t to long long for
1012 (find_abstract_instance_name): Likewise.
1013 * elf32-arm.c (arm_type_of_stub): Correct error arg order.
1014 (bfd_elf32_arm_stm32l4xx_erratum_scan): Don't cast error arg.
1015 (elf32_arm_check_relocs): Make r_symndx an int.
1016 * elf32-cris.c (cris_elf_check_relocs): Delete extraneous %s in
1018 * elf32-metag.c (elf_metag_relocate_section): Delete extra error
1020 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Rewrite bogus
1022 * elf32-i386.c (elf_i386_check_relocs): Make r_symndx an int.
1023 * elf32-s390.c (elf_s390_check_relocs): Likewise.
1024 * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
1025 * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
1026 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
1027 * elf64-s390.c (elf_s390_check_relocs): Likewise.
1028 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1029 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
1030 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
1031 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
1032 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
1033 * elf64-mmix.c (_bfd_mmix_after_linker_allocation): Cast size_t args
1034 and use %lu for error message.
1035 * elflink.c (elf_link_adjust_relocs): Delete extra error message arg.
1036 * mmo.c (mmo_scan): Make stab_loc a file_ptr. Cast expression for
1039 * elf32-arm.c (elf32_arm_tls_relax): Correct format string and args
1041 (elf32_arm_final_link_relocate): Likewise.
1042 * coff-arm.c (bfd_arm_process_before_allocation): Likewise.
1043 * coffcode.h (styp_to_sec_flags): Likewise.
1044 * cofflink.c (_bfd_coff_write_global_sym): Likewise.
1045 * ecoff.c (_bfd_ecoff_slurp_symbol_table): Likewise.
1046 * elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise.
1047 * elf32-bfin.c (bfinfdpic_check_relocs): Likewise.
1048 (elf32_bfin_merge_private_bfd_data): Likewise.
1049 * elf32-cris.c (cris_elf_relocate_section): Likewise.
1050 * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
1051 * elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise.
1052 (i370_elf_relocate_section): Likewise.
1053 * elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise.
1054 * elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise.
1055 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
1056 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
1057 * elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise.
1058 * elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise.
1059 * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
1060 * elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise.
1061 (_bfd_mips_elf_merge_private_bfd_data): Likewise.
1062 * ieee.c (ieee_write_id, read_id): Likewise.
1063 * mach-o.c (bfd_mach_o_write_contents): Likewise.
1064 (bfd_mach_o_layout_commands, bfd_mach_o_read_section_32): Likewise.
1065 (bfd_mach_o_read_section_64, bfd_mach_o_read_symtab_symbol): Likewise.
1066 (bfd_mach_o_read_command, bfd_mach_o_header_p): Likewise.
1067 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Likewise.
1068 * stabs.c (_bfd_link_section_stabs): Likewise.
1070 * coff-arm.c (coff_arm_relocate_section): Use L modifier in error
1072 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
1073 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
1074 * coff-rs6000.c (xcoff_reloc_type_toc): Likewise.
1075 * coff-sh.c (sh_relax_section): Likewise.
1076 (sh_relax_delete_bytes, sh_swap_insns): Likewise.
1077 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
1078 * coffcode.h (coff_slurp_reloc_table): Likewise.
1079 * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
1080 (_bfd_coff_read_string_table): Likewise.
1081 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
1082 * compress.c (bfd_get_full_section_contents): Likewise.
1083 * dwarf2.c (read_formatted_entries, decode_line_info): Likewise.
1084 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
1085 * elf.c (bfd_elf_string_from_elf_section): Likewise.
1086 * elf32-arc.c (arc_special_overflow_checks): Likewise.
1087 * elf32-arm.c (elf32_arm_tls_relax): Likewise.
1088 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Likewise.
1089 (elf32_arm_write_section): Likewise.
1090 * elf32-bfin.c (bfin_relocate_section): Likewise.
1091 (bfinfdpic_relocate_section): Likewise.
1092 * elf32-hppa.c (hppa_build_one_stub): Likewise.
1093 (final_link_relocate, elf32_hppa_relocate_section): Likewise.
1094 * elf32-i386.c (elf_i386_tls_transition): Likewise.
1095 (elf_i386_relocate_section): Likewise.
1096 * elf32-ip2k.c (ip2k_final_link_relocate): Likewise.
1097 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
1098 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
1099 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1100 * elf32-metag.c (elf_metag_relocate_section): Likewise.
1101 * elf32-nds32.c (unrecognized_reloc_msg): Likewise.
1102 (nds32_elf_relax_longcall1, nds32_elf_relax_longcall2): Likewise.
1103 (nds32_elf_relax_longcall3, nds32_elf_relax_longjump1): Likewise.
1104 (nds32_elf_relax_longjump2, nds32_elf_relax_longjump3): Likewise.
1105 (nds32_elf_relax_longcall4, nds32_elf_relax_longcall5): Likewise.
1106 (nds32_elf_relax_longcall6, nds32_elf_relax_longjump4): Likewise.
1107 (nds32_elf_relax_longjump5, nds32_elf_relax_longjump6): Likewise.
1108 (nds32_elf_relax_longjump7, nds32_elf_relax_loadstore): Likewise.
1109 (nds32_elf_relax_ptr, nds32_elf_ex9_build_hash_table): Likewise.
1110 * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
1111 * elf32-rx.c (UNSAFE_FOR_PID): Likewise.
1112 * elf32-s390.c (invalid_tls_insn, elf_s390_relocate_section): Likewise.
1113 * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
1114 * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
1115 * elf32-sh.c (sh_elf_relax_section): Likewise.
1116 (sh_elf_relax_delete_bytes, sh_elf_swap_insns): Likewise.
1117 (sh_elf_relocate_section): Likewise.
1118 * elf32-sh64.c (shmedia_prepare_reloc): Likewise.
1119 * elf32-spu.c (spu_elf_relocate_section): Likewise.
1120 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
1121 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
1122 * elf32-v850.c (v850_elf_relax_section): Likewise.
1123 * elf32-vax.c (elf_vax_check_relocs): Likewise.
1124 (elf_vax_relocate_section): Likewise.
1125 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
1126 (extend_ebb_bounds_forward, extend_ebb_bounds_backward): Likewise.
1127 (compute_text_actions, compute_ebb_proposed_actions): Likewise.
1128 (do_fix_for_relocatable_link): Likewise.
1129 * elf64-alpha.c (elf64_alpha_relax_got_load): Likewise.
1130 (elf64_alpha_relax_with_lituse): Likewise.
1131 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Likewise.
1132 (elf_hppa_final_link_relocate): Likewise.
1133 * elf64-ia64-vms.c (elf64_ia64_relax_section): Likewise.
1134 (elf64_ia64_choose_gp, elf64_ia64_relocate_section): Likewise.
1135 (elf64_vms_link_add_object_symbols): Likewise.
1136 * elf64-mmix.c (mmix_elf_perform_relocation): Likewise.
1137 (mmix_final_link_relocate): Likewise.
1138 * elf64-s390.c (invalid_tls_insn): Likewise.
1139 (elf_s390_relocate_section): Likewise.
1140 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
1141 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
1142 (elf_x86_64_relocate_section): Likewise.
1143 * elfcode.h (elf_slurp_symbol_table): Likewise.
1144 * elfcore.h (elf_core_file_p): Likewise.
1145 * elflink.c (elf_link_read_relocs_from_section): Likewise.
1146 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
1147 (elfNN_aarch64_relocate_section): Likewise.
1148 * elfnn-ia64.c (elfNN_ia64_relax_section): Likewise.
1149 (elfNN_ia64_choose_gp, elfNN_ia64_relocate_section): Likewise.
1150 * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
1151 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
1152 (_bfd_mips_elf_relocate_section): Likewise.
1153 (_bfd_mips_elf_finish_dynamic_symbol, mips_finish_exec_plt): Likewise.
1154 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
1155 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
1156 * ieee.c (ieee_slurp_external_symbols): Likewise.
1157 * ihex.c (ihex_write_object_content): Likewise.
1158 * mach-o.c (bfd_mach_o_build_exec_seg_command): Likewise.
1159 * merge.c (_bfd_merged_section_offset): Likewise.
1160 * mmo.c (mmo_write_loc_chunk): Likewise.
1161 (mmo_write_object_contents): Likewise.
1162 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Likewise.
1163 * stabs.c (_bfd_link_section_stabs): Likewise.
1164 * xcofflink.c (xcoff_link_add_symbols, xcoff_find_tc0): Likewise.
1166 2017-07-11 Alan Modra <amodra@gmail.com>
1168 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo.
1170 2017-07-11 Alan Modra <amodra@gmail.com>
1172 * elf32-ppc.c (ppc_elf_relocate_section): Emit "unexpected
1173 instruction" error using _bfd_error_handler, not einfo.
1175 2017-07-10 Nick Clifton <nickc@redhat.com>
1177 * coffcode.h (coff_slurp_symbol_table): Do not include an entry
1178 for C_AIX_WEAKEXT if it has the same value as C_WEAKEXT.
1180 2017-07-07 John Baldwin <jhb@FreeBSD.org>
1182 * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PTLWPINFO.
1184 2017-07-07 Alan Modra <amodra@gmail.com>
1186 * coffcode.h (coff_slurp_symbol_table): Handle C_AIX_WEAKEXT.
1188 2017-07-07 Alan Modra <amodra@gmail.com>
1190 * bfd.c (_doprnt): Replace "L" with "ll" when printing bfd_vma
1191 as long long. Move code replacing "ll" with "I64", and simplify.
1193 2017-07-06 H.J. Lu <hongjiu.lu@intel.com>
1195 * bfd.c (_doprnt): Convert 'L' to 'l' when setting wide_width
1198 2017-07-05 H.J. Lu <hongjiu.lu@intel.com>
1200 * dwarf2.c (line_info_add_include_dir_stub): Replace time with
1202 (line_info_add_file_name): Likewise.
1203 (decode_line_info): Likewise.
1205 2017-07-04 Tristan Gingold <gingold@adacore.com>
1207 * version.m4: Bump version to 2.29.51
1208 * configure: Regenerate.
1210 2017-07-04 Jiong Wang <jiong.wang@arm.com>
1212 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Remove the
1213 sanity check at the head of this function.
1215 2017-07-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1217 * dwarf2.c (struct dwarf2_debug): Add fields dwarf_line_str_buffer and
1218 dwarf_line_str_size.
1219 (struct attr_abbrev): Add field implicit_const.
1220 (dwarf_debug_sections): Add .debug_line_str.
1221 (enum dwarf_debug_section_enum): Add debug_line_str and debug_max.
1222 (dwarf_debug_section_assert): Add static assertion.
1223 (read_indirect_line_string): New.
1224 (read_abbrevs): Support DW_FORM_implicit_const.
1225 (is_str_attr): Support DW_FORM_line_strp.
1226 (read_attribute_value): Support DW_FORM_line_strp and
1227 DW_FORM_implicit_const.
1228 (read_attribute): Support DW_FORM_implicit_const.
1229 (line_info_add_include_dir, line_info_add_include_dir_stub):
1230 (line_info_add_file_name, read_formatted_entries): New.
1231 (decode_line_info, parse_comp_unit): Support DWARF 5.
1232 (_bfd_dwarf2_cleanup_debug_info): Free dwarf_line_str_buffer.
1234 2017-07-03 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
1236 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove the
1237 abort statement that was put for symbols that are not dynamic.
1239 2017-07-03 Tristan Gingold <gingold@adacore.com>
1241 * po/bfd.pot: Regenerate
1243 2017-07-03 Alan Modra <amodra@gmail.com>
1245 * bfd.c (_doprnt): Rewrite "ll" and "L" modifiers to "I64" for
1246 __MSVCRT__. Support "L" modifier for bfd_vma. Formatting.
1247 * elf.c (setup_group): Use "Lx" to print sh_size.
1248 (_bfd_elf_setup_sections): Remove unnecessary cast and print
1249 unknown section type in hex.
1250 (copy_special_section_fields): Style fix.
1251 (bfd_section_from_shdr): Correct format for sh_link. Use a
1252 common error message for all the variants of unrecognized
1254 (assign_file_positions_for_load_sections): Use "Lx" for lma
1255 adjust error message.
1256 (assign_file_positions_for_non_load_sections): Formatting.
1257 (rewrite_elf_program_header): Formatting. Use "Lx" for
1258 bfd_vma values in error messages.
1259 * elfcode.h (elf_slurp_reloc_table_from_section): Cast
1260 ELF_R_SYM value to type expected by format.
1261 * elflink.c (elf_link_read_relocs_from_section): Use "Lx"
1263 (elf_link_add_object_symbols): Use "Lu" for symbol sizes.
1264 (elf_link_input_bfd): Use "Lx" for r_info.
1265 (bfd_elf_gc_record_vtinherit): Use "Lx" for offset.
1267 2017-07-03 Alan Modra <amodra@gmail.com>
1269 * bfd.c (bfd_scan_vma): Don't use long long unless HAVE_LONG_LONG.
1270 * coff-rs6000.c (FMT20): Handle hosts with 64-bit long and
1271 Microsoft C library variant of long long format specifier.
1272 (PRINT20): Cast value to bfd_uint64_t not long long.
1273 * coffcode.h (coff_print_aux): Use BFD_VMA_FMT.
1274 * coff-x86_64.c (coff_amd64_reloc): Use bfd_uint64_t rather than
1275 long long. Don't cast to bfd_vma.
1276 * elf32-score.c (score3_bfd_getl48): Likewise.
1277 * vms-alpha.c (_bfd_vms_slurp_eisd): Likewise.
1279 2017-07-03 Alan Modra <amodra@gmail.com>
1281 * elf.c (_bfd_elf_print_private_bfd_data): Use BFD_VMA_FMT to
1283 (bfd_elf_print_symbol): Don't cast symbol->flags.
1284 (_bfd_elf_symbol_from_bfd_symbol): Likewise.
1285 * elf32-ppc.c (ppc_elf_begin_write_processing): Correct
1286 _bfd_error_handler argument order.
1287 (ppc_elf_merge_private_bfd_data): Don't cast flags.
1289 2017-07-03 Alan Modra <amodra@gmail.com>
1291 * configure.ac: Invoke AC_CHECK_TYPES for long long. Invoke
1292 AC_TYPE_LONG_DOUBLE.
1293 * configure: Regenerate.
1294 * config.in: Regenerate.
1296 2017-06-29 Andrew Waterman <andrew@sifive.com>
1298 * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Fix TLS copy
1301 2017-06-29 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
1303 * elfxx-sparc.c (allocate_dynrelocs): Don't make a symbol dynamic
1304 unless it is undefined weak.
1305 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Set the flag
1306 relative_reloc to direct non-dynamic symbols to R_SPARC_RELATIVE
1308 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): If symbol
1309 is not dynamic in PIC, abort.
1311 2017-06-29 Jiong Wang <jiong.wang@arm.com>
1314 * elfnn-aarch64.c (elfNN_aarch64_allocate_dynrelocs): Only make
1315 undefined weak symbols into dynamic.
1316 (elfNN_aarch64_final_link_relocate): Generate runtime RELATIVE
1317 relocation for non-dynamic symbols.
1318 (elfNN_aarch64_finish_dynamic_symbol): Add sanity check.
1320 2017-06-29 Jiong Wang <jiong.wang@arm.com>
1322 * elfnn-aarch64.c (aarch64_relocation_aginst_gp_p): New function.
1323 (elfNN_aarch64_final_link_relocate): Delete duplicated code for
1324 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15, BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
1325 BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
1326 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Optimize the
1329 2017-06-29 Andreas Arnez <arnez@linux.vnet.ibm.com>
1331 * elf-bfd.h (elfcore_write_s390_gs_cb): Add prototype.
1332 (elfcore_write_s390_gs_bc): Likewise.
1333 * elf.c (elfcore_grok_s390_gs_cb): New function.
1334 (elfcore_grok_s390_gs_bc): New function.
1335 (elfcore_grok_note): Call them.
1336 (elfcore_write_s390_gs_cb): New function.
1337 (elfcore_write_s390_gs_bc): New function.
1338 (elfcore_write_register_note): Call them.
1340 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
1342 * libbfd.c (_bfd_generic_get_section_contents): Don't call
1343 bfd_get_file_size. Check archive element size.
1344 (_bfd_generic_get_section_contents_in_window): Likewise.
1346 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
1348 * bfd-in2.h: Regenerated.
1349 * bfdio.c (bfd_get_size): Change return type to ufile_ptr.
1350 (bfd_get_file_size): Likewise.
1352 2017-06-28 Maciej W. Rozycki <macro@imgtec.com>
1353 Matthew Fortune <matthew.fortune@imgtec.com>
1355 * archures.c (bfd_mach_mips_interaptiv_mr2): New macro.
1356 * cpu-mips.c (I_interaptiv_mr2): New enum value.
1357 (arch_info_struct): Add "mips:interaptiv-mr2" entry.
1358 * elfxx-mips.c (_bfd_elf_mips_mach) <E_MIPS_MACH_IAMR2>: New
1360 (mips_set_isa_flags) <bfd_mach_mips_interaptiv_mr2>: Likewise.
1361 (bfd_mips_isa_ext) <bfd_mach_mips_interaptiv_mr2>: Likewise.
1362 (print_mips_isa_ext) <AFL_EXT_INTERAPTIV_MR2>: Likewise.
1363 (mips_mach_extensions): Add `bfd_mach_mipsisa32r3' and
1364 `bfd_mach_mips_interaptiv_mr2' entries.
1365 * bfd-in2.h: Regenerate.
1367 2017-06-27 Nick Clifton <nickc@redhat.com>
1369 * tekhex.c (pass_over): Revert accidental conversion of a local
1370 array to a static array.
1372 2017-06-27 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
1375 * elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Adjust
1376 reloc addend if necessary. Adjust diff only if
1377 shrinked_insn_address < end_address.
1379 2017-06-27 Alan Modra <amodra@gmail.com>
1382 * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
1383 (_bfd_generic_get_section_contents_in_window): Likewise.
1385 2017-06-26 Kuan-Lin Chen <rufus@andestech.com>
1387 * elfnn-riscv.c (perform_relocation): Support the new
1388 R_RISCV_32_PCREL relocation.
1389 (riscv_elf_relocate_section): Likewise.
1390 * elfxx-riscv.c (howto_table): Likewise.
1391 (riscv_reloc_map): Likewise.
1392 * bfd-in2.h (BFD_RELOC_RISCV_32_PCREL): New relocation.
1393 * libbfd.h: Regenerate.
1395 2017-06-27 Alan Modra <amodra@gmail.com>
1398 * libbfd.c (_bfd_generic_get_section_contents): Delete abort.
1399 Use unsigned file pointer type, and remove cast.
1400 * libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise.
1401 Add "count", not "sz".
1403 2017-06-26 Pedro Alves <palves@redhat.com>
1406 * libbfd.c (_bfd_generic_get_section_contents): Add "count", not
1409 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
1412 * libbfd.c (_bfd_generic_get_section_contents_in_window): Add
1415 2017-06-26 Maciej W. Rozycki <macro@imgtec.com>
1417 * cpu-mips.c (arch_info_struct): Mark the 4010 32-bit.
1418 * elfxx-mips.c (mips_set_isa_flags) <bfd_mach_mips4010>: Set
1419 E_MIPS_ARCH_2 rather than E_MIPS_ARCH_3 in `e_flags'.
1420 (mips_mach_extensions): Mark `bfd_mach_mips4010' as extending
1421 `bfd_mach_mips6000' rather than `bfd_mach_mips4000'.
1423 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
1426 * compress.c (bfd_get_full_section_contents): Don't check the
1428 * libbfd.c (_bfd_generic_get_section_contents): Check for and
1429 reject a section whose size + offset is greater than the size
1431 (_bfd_generic_get_section_contents_in_window): Likewise.
1433 2017-06-26 Nick Clifton <nickc@redhat.com>
1436 * tekhex.c (getvalue): Check for the source pointer exceeding the
1437 end pointer before the first byte is read.
1439 2017-06-26 Nick Clifton <nickc@redhat.com>
1442 * opncls.c (get_build_id): Check that the section is big enough
1443 to contain the whole note.
1444 * compress.c (bfd_get_full_section_contents): Check for and reject
1445 a section whose size is greater than the size of the entire file.
1446 * elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not
1447 contain a notes section.
1449 2017-06-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1451 * elf64-s390.c (elf_s390_additional_program_headers): Add NULL
1453 (elf_s390_modify_segment_map): Likewise.
1454 (bfd_elf_s390_set_options): Lisewise.
1456 2017-06-26 Alan Modra <amodra@gmail.com>
1458 * elflink.c (_bfd_elf_link_create_dynstrtab): Don't make dynobj
1460 (_bfd_elf_size_group_sections): Skip --just-syms bfds.
1461 (bfd_elf_size_dynamic_sections): Ignore .note.GNU-stack and
1462 .preinit_array on --just-syms bfds.
1463 (_bfd_elf_gc_mark_extra_sections): Skip --just-syms bfds.
1464 (elf_gc_sweep, bfd_elf_parse_eh_frame_entries): Likewise.
1465 (bfd_elf_gc_sections, bfd_elf_discard_info): Likewise.
1467 2017-06-25 Sergei Trofimovich <slyfox@gentoo.org>
1469 * elf.c (find_link): Bounds check "hint".
1471 2017-06-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
1473 * elf32-arm.c (using_thumb_only): Update list of architectures in
1474 BFD_ASSERT for which the logic is valid.
1475 (using_thumb2_bl): Likewise.
1476 (using_thumb2): Likewise and return true for ARMv8-R.
1477 (arch_has_arm_nop): Likewise.
1478 (tag_cpu_arch_combine): New v8r table for ARMv8-R Tag_CPU_arch
1479 merging logic. Update commentis for value 15 of v8m_baseline,
1480 v8m_mainline and v4t_plus_v6_m arrays. Use v8r array to decide
1481 merging of value 15 of Tag_CPU_arch.
1483 2017-06-23 Jiong Wang <jiong.wang@arm.com>
1485 * reloc.c (BFD_RELOC_AARCH64_ADR_GOTPAGE): Rename to
1486 BFD_RELOC_AARCH64_ADR_GOT_PAGE
1487 * bfd-in2.h: Regenerate.
1489 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1491 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Move
1492 the error_alignment label forward. Properly align program
1493 property note section.
1495 2017-06-22 Eric Christopher <echristo@gmail.com>
1497 * elf32-arm.c (elf32_arm_final_link_relocate): Use labs rather than
1498 abs to fix a truncation warning.
1500 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1502 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Resolve
1503 local undefined weak symbol to 0.
1504 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Likewise.
1506 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1508 * elf32-i386.c (elf_i386_merge_gnu_properties): If info->shstk
1509 is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
1510 (elf_i386_link_setup_gnu_properties): If info->shstk is set,
1511 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
1512 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): If
1513 info->shstk is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
1514 (elf_x86_64_link_setup_gnu_properties): If info->shstk is set,
1515 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
1517 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1519 * elf32-i386.c (elf_i386_lazy_ibt_plt0_entry): New.
1520 (elf_i386_lazy_ibt_plt_entry): Likewise.
1521 (elf_i386_pic_lazy_ibt_plt0_entry): Likewise.
1522 (elf_i386_non_lazy_ibt_plt_entry): Likewise.
1523 (elf_i386_pic_non_lazy_ibt_plt_entry): Likewise.
1524 (elf_i386_eh_frame_lazy_ibt_plt): Likewise.
1525 (elf_i386_lazy_plt_layout): Likewise.
1526 (elf_i386_non_lazy_plt_layout): Likewise.
1527 (elf_i386_link_hash_entry): Add plt_second.
1528 (elf_i386_link_hash_table): Add plt_second and
1529 plt_second_eh_frame.
1530 (elf_i386_allocate_dynrelocs): Use the second PLT if needed.
1531 (elf_i386_size_dynamic_sections): Use .plt.got unwind info for
1532 the second PLT. Check the second PLT.
1533 (elf_i386_relocate_section): Use the second PLT to resolve
1534 PLT reference if needed.
1535 (elf_i386_finish_dynamic_symbol): Fill and use the second PLT if
1537 (elf_i386_finish_dynamic_sections): Set sh_entsize on the
1538 second PLT. Generate unwind info for the second PLT.
1539 (elf_i386_plt_type): Add plt_second.
1540 (elf_i386_get_synthetic_symtab): Support the second PLT.
1541 (elf_i386_parse_gnu_properties): Support
1542 GNU_PROPERTY_X86_FEATURE_1_AND.
1543 (elf_i386_merge_gnu_properties): Support
1544 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
1545 on GNU_PROPERTY_X86_FEATURE_1_IBT
1546 (elf_i386_link_setup_gnu_properties): If info->ibt is set,
1547 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
1548 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
1549 is set on all relocatable inputs.
1550 * elf64-x86-64.c (elf_x86_64_lazy_ibt_plt_entry): New.
1551 (elf_x32_lazy_ibt_plt_entry): Likewise.
1552 (elf_x86_64_non_lazy_ibt_plt_entry): Likewise.
1553 (elf_x32_non_lazy_ibt_plt_entry): Likewise.
1554 (elf_x86_64_eh_frame_lazy_ibt_plt): Likewise.
1555 (elf_x32_eh_frame_lazy_ibt_plt): Likewise.
1556 (elf_x86_64_lazy_ibt_plt): Likewise.
1557 (elf_x32_lazy_ibt_plt): Likewise.
1558 (elf_x86_64_non_lazy_ibt_plt): Likewise.
1559 (elf_x32_non_lazy_ibt_plt): Likewise.
1560 (elf_x86_64_get_synthetic_symtab): Support the second PLT.
1561 (elf_x86_64_parse_gnu_properties): Support
1562 GNU_PROPERTY_X86_FEATURE_1_AND.
1563 (elf_x86_64_merge_gnu_properties): Support
1564 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
1565 on GNU_PROPERTY_X86_FEATURE_1_IBT
1566 (elf_x86_64_link_setup_gnu_properties): If info->ibt is set,
1567 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
1568 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
1569 is set on all relocatable inputs.
1571 2017-06-22 Nick Clifton <nickc@redhat.com>
1574 * som.c (setup_sections): NUL terminate the space_strings buffer.
1575 Check that the space.name field does not index beyond the end of
1576 the space_strings buffer.
1578 2017-06-21 Nick Clifton <nickc@redhat.com>
1581 * coff-sh.c (sh_reloc): Check for an out of range reloc.
1583 2017-06-21 Nick Clifton <nickc@redhat.com>
1586 * vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as
1587 type of the size parameter.
1588 (_bfd_vms_save_counted_string): Add second parameter - the maximum
1589 length of the counted string.
1590 * vms.h (_bfd_vms_save_sized_string): Update prototype.
1591 (_bfd_vms_save_counted_string): Likewise.
1592 * vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to
1593 _bfd_vms_save_counted_string.
1594 (_bfd_vms_slurp_ehdr): Likewise.
1595 (_bfd_vms_slurp_egsd): Likewise.
1596 (Parse_module): Likewise.
1598 2017-06-21 Alan Modra <amodra@gmail.com>
1600 * elf64-ppc.c (ppc64_elf_size_stubs): Test for localentry:0 plt
1601 calls before tocsave calls.
1602 (ppc64_elf_relocate_section): Allow localentry:0 plt calls without
1605 2017-06-21 Nick Clifton <nickc@redhat.com>
1608 * reloc.c (bfd_generic_get_relocated_section_contents): Fail if
1609 bfd_get_full_section_contents returns no contents.
1611 2017-06-21 Nick Clifton <nickc@redhat.com>
1614 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized
1617 2017-06-21 Nick Clifton <nickc@redhat.com>
1620 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section
1622 (image_set_ptr): Likewise.
1623 (alpha_vms_fix_sec_rel): Likewise.
1624 (alpha_vms_slurp_relocs): Likewise.
1626 2017-06-21 Nick Clifton <nickc@redhat.com>
1629 * ieee.c (ieee_slurp_sections): Check for a NULL return from
1631 (ieee_archive_p): Likewise.
1632 (ieee_object_p): Likewise.
1634 2017-06-21 Nick Clifton <nickc@redhat.com>
1637 * elf.c (setup_group): Zero the group section pointer list after
1638 allocation so that loops can be caught. Check for NULL pointers
1639 when processing a group list.
1641 2017-06-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1643 * elf-s390.h: New file.
1644 * elf64-s390.c (struct elf_s390_link_hash_table): Add params
1646 (elf_s390_additional_program_headers): New function.
1647 (elf_s390_modify_segment_map): New function.
1648 (bfd_elf_s390_set_options): New function.
1649 (elf_backend_additional_program_headers)
1650 (elf_backend_modify_segment_map): Add macro definitions.
1652 2017-06-19 H.J. Lu <hongjiu.lu@intel.com>
1655 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
1656 the DYNAMIC bit instead of bfd_count_sections.
1658 2017-06-19 Nick Clifton <nickc@redhat.com>
1661 * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record
1663 (evax_bfd_print_eeom): Likewise.
1664 (evax_bfd_print_egsd): Check for an overlarge record length.
1665 (evax_bfd_print_etir): Likewise.
1667 2017-06-19 Nick Clifton <nickc@redhat.com>
1670 * libieee.h (struct common_header_type): Add end_p field.
1671 * ieee.c (this_byte_and_next): Do not advance input_p beyond
1673 (read_id): Check for a length that exceeds the remaining bytes in
1675 (ieee_seek): Initialise end_p.
1676 (ieee_archive_p): Likewise.
1677 (ieee_object_p): Likewise.
1679 2017-06-19 Nick Clifton <nickc@redhat.com>
1682 * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset
1683 before reading the EIHS structure entries.
1685 2017-06-19 Nick Clifton <nickc@redhat.com>
1688 * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for
1689 gsd_size. Check that there are enough bytes remaining to read the
1690 type and size of the next egsd. Check that the size of the egsd
1691 does not exceed the size of the record.
1693 2017-06-19 Alan Modra <amodra@gmail.com>
1695 * config.bfd: Correct targ_underscore for cris.
1697 2017-06-18 Alan Modra <amodra@gmail.com>
1699 * config.bfd: Correct targ_underscore for epiphany, ip2k,
1700 m32c, mn10200, pru, rl78, rx, crisv32 and v850.
1702 2017-06-16 Nick Clifton <nickc@redhat.com>
1704 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
1705 bucketlist is empty because there are no symbols to add to the
1708 2017-06-16 Alan Modra <amodra@gmail.com>
1714 * targets.c (struct bfd_target): Add _bfd_define_start_stop.
1715 (BFD_JUMP_TABLE_LINK): Likewise.
1716 * elf-bfd.h (bfd_elf_define_start_stop): Declare.
1717 * elflink.c (_bfd_elf_gc_mark_rsec): Update comment.
1718 (bfd_elf_define_start_stop): New function.
1719 * linker.c (bfd_generic_define_start_stop): New function.
1720 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init
1722 * aout-adobe.c (aout_32_bfd_define_start_stop): Define.
1723 * aout-target.h (MY_bfd_define_start_stop): Define.
1724 * aout-tic30.c (MY_bfd_define_start_stop): Define.
1725 * binary.c (binary_bfd_define_start_stop): Define.
1726 * bout.c (b_out_bfd_define_start_stop): Define.
1727 * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define.
1728 * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define.
1729 * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define.
1730 * coffcode.h (coff_bfd_define_start_stop): Define.
1731 * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define.
1732 * i386msdos.c (msdos_bfd_define_start_stop): Define.
1733 * i386os9k.c (os9k_bfd_define_start_stop): Define.
1734 * ieee.c (ieee_bfd_define_start_stop): Define.
1735 * ihex.c (ihex_bfd_define_start_stop): Define.
1736 * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define.
1737 * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define.
1738 * mmo.c (mmo_bfd_define_start_stop): Define.
1739 * nlm-target.h (nlm_bfd_define_start_stop): Define.
1740 * oasys.c (oasys_bfd_define_start_stop): Define.
1741 * pef.c (bfd_pef_bfd_define_start_stop): Define.
1742 * plugin.c (bfd_plugin_bfd_define_start_stop): Define.
1743 * ppcboot.c (ppcboot_bfd_define_start_stop): Define.
1744 * som.c (som_bfd_define_start_stop): Define.
1745 * srec.c (srec_bfd_define_start_stop): Define.
1746 * tekhex.c (tekhex_bfd_define_start_stop): Define.
1747 * versados.c (versados_bfd_define_start_stop): Define.
1748 * vms-alpha.c (vms_bfd_define_start_stop): Define.
1749 (alpha_vms_bfd_define_start_stop): Define.
1750 * xsym.c (bfd_sym_bfd_define_start_stop): Define.
1751 * bfd-in2.h: Regenerate.
1752 * libbfd.h: Regenerate.
1754 2017-06-16 Jiong Wang <jiong.wang@arm.com>
1756 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
1757 SYMBOL_REFERENCES_LOCAL.
1759 2017-06-15 Jiong Wang <jiong.wang@arm.com>
1762 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
1763 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
1764 runtime for if there needs copy relocation elimination.
1765 (need_copy_relocation_p): New function. Return true for symbol with
1766 pc-relative references and if it's against read-only sections.
1767 (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
1768 (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
1769 that are related with accessing external objects.
1770 (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change
1771 in elfNN_aarch64_check_relocs.
1773 2017-06-15 Nick Clifton <nickc@redhat.com>
1776 * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
1779 (ieee_archive_p): Likewise.
1781 2017-06-15 Nick Clifton <nickc@redhat.com>
1784 * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
1786 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
1788 * elf32-xtensa.c (elf_xtensa_be_plt_entry,
1789 elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays,
1790 keep both windowed and call0 ABI PLT definitions.
1791 (elf_xtensa_create_plt_entry): Use selected ABI to choose upper
1792 elf_xtensa_*_plt_entry endex.
1793 (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size.
1795 2017-06-14 Nick Clifton <nickc@redhat.com>
1798 * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
1801 2017-06-14 Nick Clifton <nickc@redhat.com>
1804 * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
1805 maximum value for the ascic pointer. Check that name processing
1806 does not read beyond this value.
1807 (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
1810 2017-06-14 Nick Clifton <nickc@redhat.com>
1813 * versados.c (versados_mkobject): Zero the allocated tdata structure.
1814 (process_otr): Check for an invalid offset in the otr structure.
1816 2017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
1818 * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
1820 2017-06-13 H.J. Lu <hongjiu.lu@intel.com>
1826 * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
1827 vtable field to a union.
1828 (_bfd_elf_is_start_stop): Removed.
1829 * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
1830 __start_SECNAME and __stop_SECNAME symbols.
1831 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
1832 * elflink.c (_bfd_elf_is_start_stop): Removed.
1833 (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
1834 _bfd_elf_is_start_stop.
1835 (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
1836 __stop_SECNAME symbols. Updated.
1837 (elf_gc_smash_unused_vtentry_relocs): Likewise.
1838 (bfd_elf_gc_record_vtinherit): Likewise.
1839 (bfd_elf_gc_record_vtentry): Likewise.
1841 2017-06-13 Nick Clifton <nickc@redhat.com>
1844 * elflink.c (elf_link_adjust_relocs): Generate an error when
1845 encountering a reloc against a symbol removed by garbage
1848 2017-06-12 H.J. Lu <hongjiu.lu@intel.com>
1850 * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
1851 to merge_gnu_properties.
1852 * elf-properties.c (elf_merge_gnu_properties): Add struct
1853 bfd_link_info * and pass it to merge_gnu_properties.
1854 (elf_merge_gnu_property_list): Add struct bfd_link_info *
1855 and pass it to elf_merge_gnu_properties.
1856 (_bfd_elf_link_setup_gnu_properties): Pass info to
1857 elf_merge_gnu_property_list.
1858 * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
1860 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
1862 2017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
1865 * binary.c (binary_set_section_contents): Scale lma by octets
1866 per byte to set filepos.
1868 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1870 * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
1873 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1875 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
1878 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1880 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
1881 patched section contents for TLS IE reloc.
1882 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
1884 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1886 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
1887 RELOC_FOR_GLOBAL_SYMBOL macro.
1889 2018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1891 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
1894 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1896 * config/tc-arc.c (md_undefined_symbol): Changed.
1897 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
1899 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1901 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
1904 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1906 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
1907 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
1909 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1911 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
1914 2017-06-08 Richard Earnshaw <rearnsha@arm.com>
1916 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
1917 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
1918 is non-zero. Add clarifying comments.
1920 2017-06-08 H.J. Lu <hongjiu.lu@intel.com>
1922 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
1923 name. Use local IFUNC symbol name string to report unsupported
1924 non-PIC call to IFUNC function.
1925 (elf_i386_relocate_section): Dump local IFUNC name with minfo
1926 when generating R_386_IRELATIVE relocation.
1927 (elf_i386_finish_dynamic_symbol): Likewise.
1928 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
1930 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
1931 when generating R_X86_64_IRELATIVE relocation.
1932 (elf_x86_64_finish_dynamic_symbol): Likewise.
1934 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
1936 * elf.c (setup_group): Make sure BFD sections are created for all
1937 group sections in the input file when processing SHF_GROUP
1939 (bfd_section_from_shdr): Avoid duplicating logic already
1940 implemented in `setup_group'.
1942 2017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
1945 * peXXigen.c (pe_print_idata): Use the address of the first thunk
1946 if the hint address is zero.
1948 2017-06-06 James Clarke <jrtc27@jrtc27.com>
1951 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
1952 ELF_COMMON_DEF_P for common symbols.
1954 2017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
1956 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
1957 SEC_GROUP sections as SEC_EXCLUDE.
1958 (bfd_elf_set_group_contents): Replace use of abort with an assert.
1959 (assign_section_numbers): Use resolve_section_groups flag instead
1960 of relocatable link type.
1961 (_bfd_elf_init_private_section_data): Use resolve_section_groups
1962 flag instead of checking the final_link flag for part of the
1963 checks in here. Fix white space as a result.
1964 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
1965 instead of relocatable link type.
1966 (bfd_elf_final_link): Likewise.
1968 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
1970 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
1972 * elf32-score.c (score_elf_final_link_relocate): Likewise.
1973 (s3_bfd_score_elf_check_relocs): Likewise.
1974 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
1975 (score_elf_final_link_relocate): Likewise.
1976 (s7_bfd_score_elf_check_relocs): Likewise.
1978 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
1980 * elflink.c (init_reloc_cookie_rels): Remove unused variable
1983 2017-06-06 Maciej W. Rozycki <macro@imgtec.com>
1985 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
1986 from `reloc_count' rather than decrementing it.
1987 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
1988 `reloc_count' by `int_rels_per_ext_rel'.
1989 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
1990 `reloc_count' by `int_rels_per_ext_rel' for last relocation
1991 entry determination.
1992 (s3_bfd_score_elf_check_relocs): Likewise.
1993 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
1994 (s7_bfd_score_elf_relocate_section): Likewise.
1995 (s7_bfd_score_elf_check_relocs): Likewise.
1996 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
1997 prototype and function.
1998 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
1999 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
2000 triple rather than once the sum of REL and RELA relocation entry
2002 (bfd_elf64_get_reloc_upper_bound): Remove macro.
2003 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
2004 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
2005 storage allocation size determination.
2006 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
2007 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
2008 by `int_rels_per_ext_rel' for last relocation entry
2010 (bfd_elf_final_link): Do not multiply `reloc_count' by
2011 `int_rels_per_ext_rel' for internal relocation storage
2012 allocation size determination.
2013 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
2014 `int_rels_per_ext_rel' for last relocation entry determination.
2015 (elf_gc_smash_unused_vtentry_relocs): Likewise.
2016 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
2017 (_bfd_mips_elf_relocate_section): Likewise.
2019 2017-06-05 Alan Modra <amodra@gmail.com>
2022 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
2024 2017-06-01 John Baldwin <jhb@FreeBSD.org>
2026 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
2027 determine structure sizes.
2028 (elfcore_grok_freebsd_prstatus): Likewise.
2030 2017-06-01 Alan Modra <amodra@gmail.com>
2032 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
2033 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
2035 (is_elfv2_localentry0): New function.
2036 (ppc64_elf_tls_setup): Default params->plt_localentry0.
2037 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
2038 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
2039 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
2040 optimized localentry:0 stubs.
2041 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
2042 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
2044 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
2046 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
2048 2017-05-30 Casey Smith <clegg89@gmail.com>
2051 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
2052 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
2054 2017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
2056 * cpu-arc.c (arc_compatible): New function.
2058 2017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
2060 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
2062 2017-05-30 H.J. Lu <hongjiu.lu@intel.com>
2065 * bfdio.c (bfd_get_file_size): New function.
2066 * bfd-in2.h: Regenerated.
2068 2017-05-23 Dilian Palauzov <git-dpa@aegee.org>
2070 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
2073 2017-05-22 H.J. Lu <hongjiu.lu@intel.com>
2075 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
2076 dynobj instead of htab->elf.dynobj.
2078 2017-05-19 Maciej W. Rozycki <macro@imgtec.com>
2080 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
2082 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
2083 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
2084 actual number of internal relocations retrieved. Adjust
2085 function description.
2086 (bfd_elf64_canonicalize_reloc): Remove macro.
2087 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
2089 2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
2091 * archures.c (bfd_mach_sparc_v9m8): Define.
2092 (bfd_mach_sparc_v8plusm8): Likewise.
2093 (bfd_mach_sparc_v9_p): Adjust to M8.
2094 (bfd_mach_sparc_64bit_p): Likewise.
2095 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
2096 bfd_mach_sparc_v8plusm8.
2097 * bfd-in2.h: Regenerated.
2098 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
2100 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
2101 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
2102 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
2104 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
2105 bfd_mach_sparc_v8plusm8.
2107 2017-05-19 Alan Modra <amodra@gmail.com>
2109 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
2110 debug and special sections when no non-note alloc sections in an
2113 2017-05-18 Alan Modra <amodra@gmail.com>
2115 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
2116 * elf-m10300.c: Likewise.
2118 * elf32-arc.c: Likewise.
2119 * elf32-bfin.c: Likewise.
2120 * elf32-m68k.c: Likewise.
2121 * elf32-nds32.c: Likewise.
2122 * elf32-tilepro.c: Likewise.
2123 * elflink.c: Likewise.
2124 * elfnn-aarch64.c: Likewise.
2125 * elfnn-riscv.c: Likewise.
2126 * elfxx-tilegx.c: Likewise.
2127 * mach-o.c: Likewise.
2128 * peXXigen.c: Likewise.
2129 * vms-alpha.c: Likewise.
2130 * vms-lib.c: Likewise.
2132 2017-05-17 H.J. Lu <hongjiu.lu@intel.com>
2135 * elflink.c (elf_gc_mark_debug_section): New function.
2136 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
2137 referenced by kept debug sections.
2139 2017-05-16 Alan Modra <amodra@gmail.com>
2141 * elf-m10300.c: Rename occurrences of non_ir_ref.
2142 * elf32-arm.c: Likewise.
2143 * elf32-bfin.c: Likewise.
2144 * elf32-cr16.c: Likewise.
2145 * elf32-cris.c: Likewise.
2146 * elf32-d10v.c: Likewise.
2147 * elf32-dlx.c: Likewise.
2148 * elf32-fr30.c: Likewise.
2149 * elf32-frv.c: Likewise.
2150 * elf32-hppa.c: Likewise.
2151 * elf32-i370.c: Likewise.
2152 * elf32-i386.c: Likewise.
2153 * elf32-iq2000.c: Likewise.
2154 * elf32-lm32.c: Likewise.
2155 * elf32-m32c.c: Likewise.
2156 * elf32-m32r.c: Likewise.
2157 * elf32-m68hc1x.c: Likewise.
2158 * elf32-m68k.c: Likewise.
2159 * elf32-mcore.c: Likewise.
2160 * elf32-metag.c: Likewise.
2161 * elf32-microblaze.c: Likewise.
2162 * elf32-moxie.c: Likewise.
2163 * elf32-msp430.c: Likewise.
2164 * elf32-mt.c: Likewise.
2165 * elf32-nios2.c: Likewise.
2166 * elf32-or1k.c: Likewise.
2167 * elf32-ppc.c: Likewise.
2168 * elf32-rl78.c: Likewise.
2169 * elf32-s390.c: Likewise.
2170 * elf32-score.c: Likewise.
2171 * elf32-score7.c: Likewise.
2172 * elf32-sh.c: Likewise.
2173 * elf32-tic6x.c: Likewise.
2174 * elf32-tilepro.c: Likewise.
2175 * elf32-v850.c: Likewise.
2176 * elf32-vax.c: Likewise.
2177 * elf32-xstormy16.c: Likewise.
2178 * elf32-xtensa.c: Likewise.
2179 * elf64-alpha.c: Likewise.
2180 * elf64-hppa.c: Likewise.
2181 * elf64-ia64-vms.c: Likewise.
2182 * elf64-mmix.c: Likewise.
2183 * elf64-ppc.c: Likewise.
2184 * elf64-s390.c: Likewise.
2185 * elf64-sh64.c: Likewise.
2186 * elf64-x86-64.c: Likewise.
2187 * elflink.c: Likewise.
2188 * elfnn-aarch64.c: Likewise.
2189 * elfnn-ia64.c: Likewise.
2190 * elfnn-riscv.c: Likewise.
2191 * elfxx-mips.c: Likewise.
2192 * elfxx-sparc.c: Likewise.
2193 * elfxx-tilegx.c: Likewise.
2194 * linker.c: Likewise.
2196 2017-05-16 Alan Modra <amodra@gmail.com>
2198 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
2199 * elflink.c (elf_link_add_object_symbols): Update to use
2201 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
2203 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
2205 2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
2207 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
2209 2017-05-12 H.J. Lu <hongjiu.lu@intel.com>
2211 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
2212 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
2214 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
2216 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
2218 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
2220 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
2221 to plt_second/plt_second_eh_frame.
2222 (elf_x86_64_link_hash_newfunc): Updated.
2223 (elf_x86_64_allocate_dynrelocs): Likewise.
2224 (elf_x86_64_size_dynamic_sections): Likewise.
2225 (elf_x86_64_relocate_section): Likewise.
2226 (elf_x86_64_finish_dynamic_symbol): Likewise.
2227 (elf_x86_64_finish_dynamic_sections): Likewise.
2228 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
2229 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
2231 (elf_backend_setup_gnu_properties): Updated. Create the
2232 .plt.sec section instead of the .plt.sec section.
2234 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
2236 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
2237 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
2238 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
2240 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
2242 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
2243 (bfd_elf64_set_reloc): Define.
2244 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
2246 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
2248 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
2249 (struct bfd_target): New field _bfd_set_reloc.
2250 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
2251 * reloc.c (_bfd_generic_set_reloc): New function.
2252 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
2253 * nlm-target.h (nlm_set_reloc): Likewise.
2254 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
2255 * aout-tic30.c (MY_set_reloc): Likewise.
2256 * aout-target.h (MY_set_reloc): Likewise.
2257 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
2258 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
2259 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
2260 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
2261 * aout-adobe.c (aout_32_set_reloc): Likewise.
2262 * bout.c (b_out_set_reloc): Likewise.
2263 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
2264 * i386os9k.c (aout_32_set_reloc): Likewise.
2265 * ieee.c (ieee_set_reloc): Likewise.
2266 * oasys.c (oasys_set_reloc): Likewise.
2267 * som.c (som_set_reloc): Likewise.
2268 * versados.c (versados_set_reloc): Likewise.
2269 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
2270 _bfd_generic_set_reloc.
2271 (rs6000_xcoff64_aix_vec): LIkewise.
2272 * libbfd.c (_bfd_norelocs_set_reloc): New function.
2273 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
2274 * i386msdos.c (msdos_set_reloc): Define to
2275 _bfd_norelocs_set_reloc.
2276 * elfcode.h (elf_set_reloc): Define.
2277 * bfd-in2.h: Regenerated.
2279 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
2282 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
2283 for IFUNC function address.
2285 2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
2287 * elf32-arc.c (FEATURE_LIST_NAME): Define.
2288 (CONFLICT_LIST): Likewise.
2289 (opcode/arc-attrs.h): Include.
2290 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
2291 (arc_extract_features): New file.
2292 (arc_stralloc): Likewise.
2293 (arc_elf_merge_attributes): Likewise.
2294 (arc_elf_merge_private_bfd_data): Use object attributes.
2295 (bfd_arc_get_mach_from_attributes): New function.
2296 (arc_elf_object_p): Use object attributes.
2297 (arc_elf_final_write_processing): Likewise.
2298 (elf32_arc_obj_attrs_arg_type): New function.
2299 (elf32_arc_obj_attrs_handle_unknown): Likewise.
2300 (elf32_arc_section_from_shdr): Likewise.
2301 (elf_backend_obj_attrs_vendor): Define.
2302 (elf_backend_obj_attrs_section): Likewise.
2303 (elf_backend_obj_attrs_arg_type): Likewise.
2304 (elf_backend_obj_attrs_section_type): Likewise.
2305 (elf_backend_obj_attrs_handle_unknown): Likewise.
2306 (elf_backend_section_from_shdr): Likewise.
2308 2017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
2311 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
2312 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
2313 and the destination is a Thumb symbol.
2315 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2317 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
2318 initializer to silence GCC 4.2.
2319 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
2321 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2323 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
2324 (LAZY_PLT_ENTRY_SIZE): This.
2325 (NON_LAZY_PLT_ENTRY_SIZE): New.
2326 (elf_x86_64_plt0_entry): Renamed to ...
2327 (elf_x86_64_lazy_plt0_entry): This.
2328 (elf_x86_64_plt_entry): Renamed to ...
2329 (elf_x86_64_lazy_plt_entry): This.
2330 (elf_x86_64_bnd_plt0_entry): Renamed to ...
2331 (elf_x86_64_lazy_bnd_plt0_entry): This.
2332 (elf_x86_64_legacy_plt_entry): Removed.
2333 (elf_x86_64_bnd_plt_entry): Renamed to ...
2334 (elf_x86_64_lazy_bnd_plt_entry): This.
2335 (elf_x86_64_legacy_plt2_entry): Renamed to ...
2336 (elf_x86_64_non_lazy_plt_entry): This.
2337 (elf_x86_64_bnd_plt2_entry): Renamed to ...
2338 (elf_x86_64_non_lazy_bnd_plt_entry): This.
2339 (elf_x86_64_eh_frame_plt): Renamed to ...
2340 (elf_x86_64_eh_frame_lazy_plt): This.
2341 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
2342 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
2343 (elf_x86_64_eh_frame_plt_got): Renamed to ...
2344 (elf_x86_64_eh_frame_non_lazy_plt): This.
2345 (elf_x86_64_lazy_plt_layout): New.
2346 (elf_x86_64_non_lazy_plt_layout): Likewise.
2347 (elf_x86_64_plt_layout): Likewise.
2348 (elf_x86_64_backend_data): Remove PLT layout information. Add
2349 os for target system.
2350 (GET_PLT_ENTRY_SIZE): Removed.
2351 (elf_x86_64_lazy_plt): New.
2352 (elf_x86_64_non_lazy_plt): Likewise.
2353 (elf_x86_64_lazy_bnd_plt): Likewise.
2354 (elf_x86_64_non_lazy_bnd_plt): Likewise.
2355 (elf_x86-64_arch_bed): Updated.
2356 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
2357 (elf_x86_64_create_dynamic_sections): Removed.
2358 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
2359 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
2360 (elf_x86-64_adjust_dynamic_symbol): Updated.
2361 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
2362 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
2363 size for PLT0 if there is no PLT0. Get plt_entry_size from
2364 non_lazy_plt for non-lazy PLT entries.
2365 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
2366 from non_lazy_plt for non-lazy PLT entries.
2367 (elf_x86-64_relocate_section): Updated. Properly get PLT index
2368 if there is no PLT0.
2369 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
2370 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
2371 entries with non-lazy PLT layout. Don't fill the second and third
2372 slots in the PLT entry if there is no PLT0.
2373 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
2374 if there is no PLT0. Set sh_entsize on the .plt.got section.
2375 (compare_relocs): New.
2376 (elf_x86_64_plt_type): Likewise.
2377 (elf_x86_64_plt): Likewise.
2378 (elf_x86_64_nacl_plt): New. Forward declaration.
2379 (elf_x86_64_get_plt_sym_val): Removed.
2380 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
2381 against all dynamic relocations.
2382 (elf_x86_64_link_setup_gnu_properties): New function.
2383 (elf_backend_create_dynamic_sections): Updated.
2384 (elf_backend_setup_gnu_properties): New.
2385 (elf_x86_64_nacl_plt): New.
2386 (elf_x86_64_nacl_arch_bed): Updated.
2388 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2390 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
2391 (LAZY_PLT_ENTRY_SIZE): This.
2392 (NON_LAZY_PLT_ENTRY_SIZE): New.
2393 (elf_i386_plt0_entry): Renamed to ...
2394 (elf_i386_lazy_plt0_entry): This.
2395 (elf_i386_plt_entry): Renamed to ...
2396 (elf_i386_lazy_plt_entry): This.
2397 (elf_i386_pic_plt0_entry): Renamed to ...
2398 (elf_i386_pic_lazy_plt0_entry): This.
2399 (elf_i386_pic_plt_entry): Renamed to ...
2400 (elf_i386_pic_lazy_plt_entry): This.
2401 (elf_i386_got_plt_entry): Renamed to ...
2402 (elf_i386_non_lazy_plt_entry): This.
2403 (elf_i386_pic_got_plt_entry): Renamed to ...
2404 (elf_i386_pic_non_lazy_plt_entry): This.
2405 (elf_i386_eh_frame_plt): Renamed to ...
2406 (elf_i386_eh_frame_lazy_plt): This.
2407 (elf_i386_eh_frame_plt_got): Renamed to ...
2408 (elf_i386_eh_frame_non_lazy_plt): This.
2409 (elf_i386_plt_layout): Renamed to ...
2410 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
2411 eh_frame_plt_got_size.
2412 (elf_i386_non_lazy_plt_layout): New.
2413 (elf_i386_plt_layout): Likewise.
2414 (elf_i386_non_lazy_plt): Likewise.
2415 (GET_PLT_ENTRY_SIZE): Removed.
2416 (elf_i386_plt): Renamed to ...
2417 (elf_i386_lazy_plt): This.
2418 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
2419 (elf_i386_arch_bed): Updated.
2420 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
2421 (elf_i386_create_dynamic_sections): Removed.
2422 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
2423 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
2424 (elf_i386_adjust_dynamic_symbol): Updated.
2425 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
2426 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
2427 size for PLT0 if there is no PLT0.
2428 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
2429 output section is discarded only if GOT isn't empty.
2430 (elf_i386_relocate_section): Updated. Properly get PLT index
2431 if there is no PLT0.
2432 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
2433 second and third slots in the PLT entry if there is no PLT0.
2434 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
2435 if there is no PLT0. Set sh_entsize on the .plt.got section.
2436 (elf_i386_nacl_plt): Forward declaration.
2437 (elf_i386_get_plt_sym_val): Removed.
2438 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
2439 against all dynamic relocations.
2440 (elf_i386_link_setup_gnu_properties): New function.
2441 (elf_backend_create_dynamic_sections): Updated.
2442 (elf_backend_setup_gnu_properties): New.
2443 (elf_i386_nacl_plt): Updated.
2444 (elf_i386_nacl_arch_bed): Likewise.
2445 (elf_i386_vxworks_arch_bed): Likewise.
2447 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
2449 * elflink.c (elf_output_implib): Remove executable flag from import
2451 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
2452 library is a relocatable object file.
2454 2017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
2457 * elf32-avr.c (avr_should_move_sym): New function.
2458 (avr_should_reduce_sym_size): Likewise.
2459 (avr_should_increase_sym_size): Likewise.
2460 (elf32_avr_relax_delete_bytes): Adjust symbol values
2461 and sizes by calling new functions.
2463 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
2465 * config.bfd (riscv32-*): Enable rv64.
2467 2017-05-02 Alan Modra <amodra@gmail.com>
2470 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
2471 rather than h->root.type == bfd_link_hash_new.
2472 (bfd_elf_record_link_assignment): Similarly, call
2473 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
2475 2017-04-29 Alan Modra <amodra@gmail.com>
2478 * reloc.c (reloc_offset_in_range): New function.
2479 (bfd_perform_relocation, bfd_install_relocation): Use it.
2480 (_bfd_final_link_relocate): Likewise.
2482 2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
2484 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
2485 before using .plt.got.
2486 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
2488 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2490 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
2491 instead of "+=" to update 0.
2493 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2495 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
2496 .plt.got section here.
2497 (elf_i386_check_relocs): Don't create the .plt.got section.
2498 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
2499 the .plt.got and .plt.bnd sections here.
2500 (elf_x86_64_check_relocs): Don't create the .plt.got nor
2503 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2505 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
2507 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
2508 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
2509 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
2510 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
2513 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2515 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
2517 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
2518 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
2519 the first relocatable ELF input with GNU properties.
2521 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2523 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
2524 VxWorks for non-PIC.
2526 2017-04-27 Alan Modra <amodra@gmail.com>
2528 * elf-bfd.h (struct elf_backend_data): Make asection param of
2529 elf_backend_eh_frame_address_size const.
2530 (_bfd_elf_eh_frame_address_size): Likewise.
2531 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
2532 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
2533 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
2534 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
2535 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
2536 (next_cie_fde_offset): Constify params.
2537 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
2539 2017-04-27 Alan Modra <amodra@gmail.com>
2541 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
2542 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
2543 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
2545 (offset_adjust): New function.
2546 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
2547 (adjust_eh_frame_local_symbols): Likewise.
2548 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
2549 after changing anything. Return true if anything changed.
2550 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
2551 _bfd_elf_adjust_eh_frame_global_symbol for globals.
2553 2017-04-27 Alan Modra <amodra@gmail.com>
2555 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
2558 2017-04-27 Alan Modra <amodra@gmail.com>
2560 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
2561 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
2562 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
2563 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
2564 for undef and undefweak dyn_relocs.
2565 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
2566 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
2567 (allocate_got, allocate_dynrelocs): Likewise.
2568 (ppc64_elf_relocate_section): Likewise.
2570 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
2572 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
2573 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
2574 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
2575 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
2577 2017-04-26 Nick Clifton <nickc@redhat.com>
2580 * reloc.c (bfd_perform_relocation): Check for a negative address
2583 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
2586 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
2588 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
2589 (elf_backend_always_renumber_dynsyms): Define.
2590 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
2591 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
2592 * elflink.c (bfd_elf_size_dynamic_sections): Also call
2593 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
2595 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
2597 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
2599 * elflink.c (bfd_elf_size_dynamic_sections): Only call
2600 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
2601 sections have been created.
2603 2017-04-26 Nick Clifton <nickc@redhat.com>
2606 * compress.c (bfd_init_section_compress_status): Check the return
2607 value from bfd_malloc.
2609 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
2611 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
2612 no_finish_dynamic_symbol.
2613 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
2615 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
2616 weak symbol, don't make it dynamic.
2617 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
2618 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
2619 relocation for GOT reference.
2620 (elf_x86_64_finish_dynamic_symbol): Abort if
2621 no_finish_dynamic_symbol isn't 0.
2623 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
2626 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
2627 undefined weak symbol, don't make it dynamic.
2628 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
2629 set no_finish_dynamic_symbol and generate R_386_RELATIVE
2630 relocation for R_386_GOT32.
2632 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
2635 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
2637 2017-04-23 Alan Modra <amodra@gmail.com>
2640 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
2641 * elf.c (lcomm_sym): New.
2642 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
2643 * bfd-in2.h: Regenerate.
2645 2017-04-23 Alan Modra <amodra@gmail.com>
2648 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
2649 parameters and comment.
2650 (_bfd_elf_get_reloc_section): Delete.
2651 (_bfd_elf_plt_get_reloc_section): Declare.
2652 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
2653 New functions. Don't blindly skip over assumed .rel/.rela prefix.
2655 (_bfd_elf_get_reloc_section): ..here. Delete.
2656 (assign_section_numbers): Call elf_get_reloc_section.
2657 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
2658 * elfxx-target.h (elf_backend_get_reloc_section): Update.
2660 2017-04-23 Alan Modra <amodra@gmail.com>
2663 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
2666 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
2669 * elf32-i386.c (elf_i386_link_hash_entry): Add
2670 no_finish_dynamic_symbol.
2671 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
2672 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
2673 symbol, don't make it dynamic in PIE.
2674 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
2675 set no_finish_dynamic_symbol and generate R_386_RELATIVE
2676 relocation for R_386_GOT32
2677 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
2680 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
2684 * elflink.c (elf_link_add_object_symbols): Require
2685 --no-dynamic-linker with -E/--dynamic-list when creating
2688 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
2690 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
2693 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
2695 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
2696 dynamic symbol sorting.
2698 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
2701 * elflink.c (elf_link_add_object_symbols): Preserve
2702 dynamic_ref_after_ir_def when restoring the symbol table for
2703 unneeded dynamic object.
2705 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
2708 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
2709 on on undefined IFUNC symbol in the second PLT.
2711 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
2713 * peXXigen.c (pe_print_reloc): Correct chunk_end.
2715 2017-04-19 Alan Modra <amodra@gmail.com>
2717 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
2718 or make dynamic for info->dynamic_undefined_weak 0 and 1.
2719 * elf32-ppc.c:Formatting.
2720 (ensure_undefweak_dynamic): Don't make dynamic when
2721 info->dynamic_undefined_weak is zero.
2722 (allocate_dynrelocs): Discard undefweak dyn_relocs for
2723 info->dynamic_undefined_weak. Discard undef dyn_relocs when
2724 not default visibility. Discard undef and undefweak
2726 (ppc_elf_relocate_section): Adjust to suit.
2727 * elf64-ppc.c: Formatting.
2728 (ensure_undefweak_dynamic): Don't make dynamic when
2729 info->dynamic_undefined_weak is zero.
2730 (allocate_dynrelocs): Discard undefweak dyn_relocs for
2731 info->dynamic_undefined_weak. Discard them earlier.
2733 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
2736 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
2737 before generating the version definition section.
2739 2017-04-17 Alan Modra <amodra@gmail.com>
2741 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
2742 state when a regular object file defines a symbol with
2743 incompatible type to that defined by an earlier shared lib.
2745 2017-04-13 Alan Modra <amodra@gmail.com>
2747 * coffcode.h: Wrap some overly long _bfd_error_handler args.
2749 * elf32-arm.c: Likewise.
2750 * elf32-i386.c: Likewise.
2751 * elf32-mep.c: Likewise.
2752 * elf64-ia64-vms.c: Likewise.
2753 * elf64-x86-64.c: Likewise.
2754 * elflink.c: Likewise.
2755 * elfnn-ia64.c: Likewise.
2756 * elfxx-mips.c: Likewise.
2758 2017-04-13 Alan Modra <amodra@gmail.com>
2760 * aoutx.h: Use %B and %A in error messages throughout file.
2761 * aout-cris.c: Likewise.
2762 * archive.c: Likewise.
2763 * binary.c: Likewise.
2764 * coff-rs6000.c: Likewise.
2765 * coff-tic4x.c: Likewise.
2766 * coffcode.h: Likewise.
2767 * coffgen.c: Likewise.
2768 * cofflink.c: Likewise.
2769 * coffswap.h: Likewise.
2770 * cpu-arm.c: Likewise.
2771 * elf-eh-frame.c: Likewise.
2772 * elf-m10300.c: Likewise.
2774 * elf32-arc.c: Likewise.
2775 * elf32-arm.c: Likewise.
2776 * elf32-bfin.c: Likewise.
2777 * elf32-frv.c: Likewise.
2778 * elf32-iq2000.c: Likewise.
2779 * elf32-m32c.c: Likewise.
2780 * elf32-microblaze.c: Likewise.
2781 * elf32-nds32.c: Likewise.
2782 * elf32-rl78.c: Likewise.
2783 * elf32-rx.c: Likewise.
2784 * elf32-score.c: Likewise.
2785 * elf32-score7.c: Likewise.
2786 * elf32-sh64.c: Likewise.
2787 * elf32-v850.c: Likewise.
2788 * elf32-vax.c: Likewise.
2789 * elf32-visium.c: Likewise.
2790 * elf64-ia64-vms.c: Likewise.
2791 * elf64-mmix.c: Likewise.
2792 * elf64-sh64.c: Likewise.
2793 * elfcode.h: Likewise.
2794 * elfnn-aarch64.c: Likewise.
2795 * elfnn-ia64.c: Likewise.
2796 * elfxx-mips.c: Likewise.
2797 * hpux-core.c: Likewise.
2800 * linker.c: Likewise.
2801 * merge.c: Likewise.
2803 * oasys.c: Likewise.
2804 * pdp11.c: Likewise.
2805 * peXXigen.c: Likewise.
2806 * rs6000-core.c: Likewise.
2807 * vms-alpha.c: Likewise.
2808 * xcofflink.c: Likewise.
2810 2017-04-13 Alan Modra <amodra@gmail.com>
2812 * bfd.c (PRINT_TYPE): Define.
2813 (_doprnt): New function.
2814 (error_handler_internal): Use _doprnt.
2815 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
2816 calls in their natural order, throughout file.
2817 * coff-mcore.c: Likewise.
2818 * coff-ppc.c: Likewise.
2819 * coff-tic80.c: Likewise.
2820 * cofflink.c: Likewise.
2821 * elf-s390-common.c: Likewise.
2823 * elf32-arm.c: Likewise.
2824 * elf32-i386.c: Likewise.
2825 * elf32-m32r.c: Likewise.
2826 * elf32-msp430.c: Likewise.
2827 * elf32-spu.c: Likewise.
2828 * elf64-ia64-vms.c: Likewise.
2829 * elf64-sparc.c: Likewise.
2830 * elf64-x86-64.c: Likewise.
2831 * elflink.c: Likewise.
2832 * elfnn-aarch64.c: Likewise.
2833 * elfnn-ia64.c: Likewise.
2834 * elfxx-mips.c: Likewise.
2836 2017-04-13 Alan Modra <amodra@gmail.com>
2838 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
2839 branch veneers" error. Fix double space and format message.
2840 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
2841 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
2843 2017-04-13 Alan Modra <amodra@gmail.com>
2845 * bfd-in2.h: Regenerate.
2847 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
2849 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
2850 extra `\n' in warning/error messages.
2851 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
2852 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
2854 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
2856 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
2857 processor-specific properties with generic ELF target vector.
2859 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
2861 * elf32-sparc.c (elf_backend_fixup_symbol): New.
2862 * elf64-sparc.c (elf_backend_fixup_symbol): New.
2863 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
2864 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
2866 (link_hash_newfunc): Initialize has_got_reloc and
2868 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
2870 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
2872 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
2874 (_bfd_sparc_elf_fixup_symbol): New function.
2875 (allocate_dynrelocs): Don't allocate space for dynamic
2876 relocations and discard relocations against resolved undefined
2877 weak symbols in executable. Don't make resolved undefined weak
2878 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
2879 relocation against undefined weak symbols in PIE.
2880 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
2881 relocations against resolved undefined weak symbols in PIE
2882 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
2883 without ynamic PLT/GOT relocations for resolved undefined weak
2885 Don't generate dynamic relocation against resolved undefined
2886 weak symbol in executable.
2887 (pie_finish_undefweak_symbol): New function.
2888 (_bfd_sparc_elf_finish_dynamic_sections): Call
2889 pie_finish_undefweak_symbol on all symbols in PIE.
2890 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
2891 (_bfd_sparc_elf_fixup_symbol): New function.
2893 2017-04-10 Nick Clifton <nickc@redhat.com>
2895 * config.bfd: Remove ns32k from obsolete list.
2897 2017-04-10 Alan Modra <amodra@gmail.com>
2900 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
2901 (special_sections_i): Likewise for .init_array.
2902 (special_sections_p): Likewise for .preinit_array.
2904 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
2908 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
2909 ELF_COMMON_DEF_P for common symbols.
2910 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
2911 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
2912 * elflink.c (_bfd_elf_merge_symbol): Revert commits
2913 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
2914 07492f668d2173da7a2bda3707ff0985e0f460b6.
2916 2017-04-07 Pedro Alves <palves@redhat.com>
2918 * opncls.c (bfd_get_debug_link_info): Rename to...
2919 (bfd_get_debug_link_info_1): ... this. Change type of second
2920 parameter to void pointer. Adjust.
2921 (bfd_get_debug_link_info): Reimplement on top of
2922 bfd_get_debug_link_info_1.
2923 (separate_debug_file_exists, separate_alt_debug_file_exists):
2924 Change type of second parameter to void pointer. Adjust.
2925 (get_func_type, check_func_type): Change type of second parameter
2927 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
2928 the callback functions instead of passing the address of a local.
2929 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
2930 find_separate_debug_file.
2931 (get_alt_debug_link_info_shim): Change type of second parameter to
2932 void pointer. Adjust.
2933 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
2934 find_separate_debug_file.
2935 (get_build_id_name, bfd_boolean check_build_id_file): Change type
2936 of second parameter to void pointer. Adjust.
2937 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
2938 pointer local to find_separate_debug_file.
2940 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
2942 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
2943 external symbols with a definition.
2944 (_bfd_coff_gc_mark_extra_sections): Fix typo.
2946 2017-04-07 Alan Modra <amodra@gmail.com>
2948 * po/SRC-POTFILES.in: Regenerate.
2950 2017-04-05 Alan Modra <amodra@gmail.com>
2952 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
2955 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
2957 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
2958 numbers for DataDirectory entry indicies passed to
2961 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
2963 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
2964 each GNU_MBIND section and align GNU_MBIND section to page size.
2965 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
2966 segment for each GNU_MBIND section.
2967 (_bfd_elf_init_private_section_data): Copy sh_info from input
2968 for GNU_MBIND section.
2970 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
2972 * elfnn-riscv.c (GP_NAME): Delete.
2973 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
2974 (_bfd_riscv_relax_lui): Likewise.
2976 2017-04-04 Nick Clifton <nickc@redhat.com>
2979 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
2981 (bfd_elf_final_link): Only initialize the extended symbol index
2982 section if there are extended symbol tables to list.
2984 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
2986 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
2987 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
2988 * configure.ac (elf): Add elf-properties.lo.
2989 * Makefile.in: Regenerated.
2990 * configure: Likewise.
2991 * elf-bfd.h (elf_property_kind): New.
2992 (elf_property): Likewise.
2993 (elf_property_list): Likewise.
2994 (elf_properties): Likewise.
2995 (_bfd_elf_parse_gnu_properties): Likewise.
2996 (_bfd_elf_get_property): Likewise.
2997 (_bfd_elf_link_setup_gnu_properties): Likewise.
2998 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
2999 and setup_gnu_properties.
3000 (elf_obj_tdata): Add properties.
3001 * elf-properties.c: New file.
3002 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
3003 (elf_i386_merge_gnu_properties): Likewise.
3004 (elf_backend_parse_gnu_properties): Likewise.
3005 (elf_backend_merge_gnu_properties): Likewise.
3006 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3007 (elf_x86_64_merge_gnu_properties): Likewise.
3008 (elf_backend_parse_gnu_properties): Likewise.
3009 (elf_backend_merge_gnu_properties): Likewise.
3010 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
3011 (elf_backend_parse_gnu_properties): Likewise.
3012 (elf_backend_setup_gnu_properties): Likewise.
3013 (elfNN_bed): Add elf_backend_parse_gnu_properties,
3014 elf_backend_merge_gnu_properties and
3015 elf_backend_setup_gnu_properties.
3017 2017-03-30 Pip Cet <pipcet@gmail.com>
3019 * elf32-wasm32.c: Add relocation code, two relocs.
3020 * reloc.c: Add wasm32 relocations.
3021 * libbfd.h: Regenerate.
3022 * bfd-in2.h: Regenerate.
3023 * bfd/po/bfd.pot: Regenerate.
3025 2017-03-29 Nick Clifton <nickc@redhat.com>
3028 * coff-bfd.h (struct coff_section_data): Add new fields:
3029 saved_bias and bias.
3030 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
3031 computed for PE binaries.
3032 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
3035 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
3038 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
3039 to handle a local symbol with a hash-symbol-entry; without PLT.
3040 Add BFD_ASSERT for an incidental case with GOT entry present.
3041 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
3042 isn't forced-or-set local.
3044 2017-03-27 Pip Cet <pipcet@gmail.com>
3046 * wasm-module.c: New file to support WebAssembly modules.
3047 * wasm-module.h: New file to support WebAssembly modules.
3048 * doc/webassembly.texi: Start documenting wasm-module.c.
3049 * config.bfd: Add wasm_vec.
3050 * targets.c: Likewise.
3051 * configure.ac: Likewise.
3052 * Makefile.am: Add entries for wasm-module.c.
3053 * Makefile.in: Regenerate.
3054 * configure: Regenerate.
3055 * po/SRC-POTFILES.in: Regenerate.
3057 2017-03-27 Pip Cet <pipcet@gmail.com>
3059 * cpu-wasm32.c: New file to support wasm32 architecture.
3060 * elf32-wasm32.c: New file to support wasm32 architecture.
3061 * Makefile.am: Add wasm32 architecture.
3062 * archures.c: Likewise.
3063 * config.bfd: Likewise.
3064 * configure.ac: Likewise.
3065 * targets.c: Likewise.
3066 * Makefile.in: Regenerate.
3067 * bfd-in2.h: Regenerate.
3068 * configure: Regenerate.
3069 * po/SRC-POTFILES.in: Regenerate.
3071 2017-03-20 Alan Modra <amodra@gmail.com>
3074 * elf64-ppc.c (compare_symbols): Stabilize sort.
3076 2017-03-18 Alan Modra <amodra@gmail.com>
3078 * elf64-ppc.c (struct ppc_link_hash_table): Add
3079 local_ifunc_resolver and maybe_local_ifunc_resolver.
3080 (ppc_build_one_stub): Set flags on emitting dynamic
3081 relocation to ifunc.
3082 (ppc64_elf_relocate_section): Likewise.
3083 (ppc64_elf_finish_dynamic_symbol): Likewise.
3084 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
3085 local dynamic relocs to ifuncs.
3086 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
3087 local_ifunc_resolver and maybe_local_ifunc_resolver.
3088 (ppc_elf_relocate_section): Set flag on emitting dynamic
3089 relocation to ifuncs.
3090 (ppc_elf_finish_dynamic_symbol): Likewise.
3091 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
3092 dynamic relocs to ifuncs.
3094 2017-03-13 Nick Clifton <nickc@redhat.com>
3097 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
3098 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
3099 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
3100 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
3101 * bfd-in2.h: Regenerate.
3102 * libbfd.h: Regenerate.
3103 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
3105 (IS_AARCH64_TLSDESC_RELOC): Likewise.
3106 (elfNN_aarch64_howto_table): Likewise.
3107 (aarch64_tls_transition_without_check): Likewise.
3108 (aarch64_reloc_got_type): Likewise.
3109 (elfNN_aarch64_final_link_relocate): Likewise.
3110 (elfNN_aarch64_tls_relax): Likewise.
3111 (elfNN_aarch64_relocate_section): Likewise.
3112 (elfNN_aarch64_gc_sweep_hook): Likewise.
3113 (elfNN_aarch64_check_relocs): Likewise.
3114 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
3115 (_bfd_aarch64_elf_resolve_relocation): Likewise.
3117 2017-03-11 Alan Modra <amodra@gmail.com>
3119 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
3120 parameter is in fact used. Whitespace fixes.
3121 * elf64-ppc.c: Likewise.
3123 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
3125 * rs6000-core.c (CORE_NEW): Simplify macro when
3126 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
3128 2017-03-07 Alan Modra <amodra@gmail.com>
3132 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
3135 2017-03-05 Alan Modra <amodra@gmail.com>
3137 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
3138 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
3139 (next_cie_fde_offset): New function.
3140 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
3141 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
3142 four bytes. Align CIEs to four or eight bytes depending on
3143 per_encoding_aligned8. Align FDEs according to their encoding.
3144 Pad last FDE to output section alignment.
3145 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
3147 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
3148 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
3149 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
3151 2017-03-02 Martin Bickel <binutils@ineranves.de>
3154 * elf.c (rewrite_elf_program_header): Do not issue a warning for
3155 empty segments which have a zero filesz, but a non-zero memsz.
3157 2017-03-02 Alan Modra <amodra@gmail.com>
3159 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
3161 2017-02-28 Alan Modra <amodra@gmail.com>
3163 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
3164 (ppc64_elf_relocate_section): Likewise.
3166 2017-02-28 Alan Modra <amodra@gmail.com>
3169 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
3170 rather than elf32_nios2_hash_table or elf_hash_table.
3171 (create_got_section): Likewise.
3172 (nios2_elf32_finish_dynamic_symbol): Likewise.
3173 (nios2_elf32_adjust_dynamic_symbol): Likewise.
3174 (nios2_elf32_size_dynamic_sections): Likewise.
3175 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
3176 vars. Use htab equivalents directly instead. Don't create
3177 all dynamic sections on needing just the GOT. Use a goto
3178 rather than a fall-through with reloc test. Ensure
3179 htab->dynobj is set when making dynamic sreloc section.
3180 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
3181 equivalent directly instead. Don't segfault on looking for
3182 .dynamic when dynamic sections have not been created. Don't
3183 segfault on .got.plt being discarded.
3184 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
3185 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
3186 fixme and another not so relevant comment.
3187 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
3188 already set, set hash table dynobj on creating .sbss.
3190 2017-02-28 Alan Modra <amodra@gmail.com>
3192 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
3193 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
3194 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
3195 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
3196 (ppc64_elf_relocate_section): Likewise.
3197 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
3198 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
3199 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
3200 * libbfd.h: Regenerate.
3201 * bfd-in2.h: Regenerate.
3203 2017-02-28 Alan Modra <amodra@gmail.com>
3205 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
3206 dynamic .data.rel.ro read-only.
3207 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
3208 rather than section flags when deciding where copy reloc goes.
3209 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
3210 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
3211 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
3212 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
3213 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
3214 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
3215 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
3216 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
3217 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3218 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
3219 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
3220 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
3221 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3222 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
3223 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
3224 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
3225 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
3226 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
3227 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
3229 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
3231 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
3232 `jalr $0, $25' instruction encoding.
3234 2017-02-27 Nick Clifton <nickc@redhat.com>
3237 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
3238 generating a seg-fault when encountering a symbol that has been
3239 deleted by garbage collection.
3241 2017-02-25 Alan Modra <amodra@gmail.com>
3243 * elf32-arc.c (struct dynamic_sections): Delete.
3244 (enum dyn_section_types): Delete.
3245 (dyn_section_names): Delete.
3246 (arc_create_dynamic_sections): Delete.
3247 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
3248 segfault on discarded .rela.plt section.
3249 (elf_arc_size_dynamic_sections): Formatting. Don't call
3250 arc_create_dynamic_sections. Don't allocate memory for sections
3251 handled by the generic linker. Correct code finding relocs in
3252 read-only sections. Set SEC_EXCLUDE on zero size .got,
3253 .got.plt, and .dynbss sections. Do set .interp for pies.
3255 2017-02-24 Andrew Waterman <andrew@sifive.com>
3257 * elfnn-riscv.c (GP_NAME): New macro.
3258 (riscv_global_pointer_value): Use it.
3259 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
3260 output section, consider only that section's alignment.
3262 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
3264 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
3265 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
3266 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
3267 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
3269 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
3271 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
3272 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
3275 2017-02-23 Alan Modra <amodra@gmail.com>
3278 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
3280 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
3281 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
3284 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
3287 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
3288 processing ahead of the call to `elf_gc_sweep_symbol'.
3290 2017-02-22 Nick Clifton <nickc@redhat.com>
3293 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
3294 created section 4-byte alignment.
3296 2017-02-22 Alan Modra <amodra@gmail.com>
3298 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
3299 on .got or .plt output section being discarded by script.
3300 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
3303 2017-02-21 Alan Modra <amodra@gmail.com>
3305 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
3306 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
3308 2017-02-20 Alan Modra <amodra@gmail.com>
3311 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
3312 if DT_RELSZ/DT_RELASZ is zero.
3314 2017-02-17 Nick Clifton <nickc@redhat.com>
3316 * compress.c (bfd_get_full_section_contents): Remember to reduce
3317 compressed size by the sizeof the compression header when
3318 decompressing the contents.
3320 2017-02-17 Pedro Alves <palves@redhat.com>
3322 * srec.c (Chunk): Rename to ...
3323 (_bfd_srec_len): ... this.
3324 (S3Forced): Rename to ...
3325 (_bfd_srec_forceS3): ... this.
3326 * objcopy.c: Adjust all references.
3328 2017-02-17 Pedro Alves <palves@redhat.com>
3330 * archive.c (bsd_write_armap): Rename to ...
3331 (_bfd_bsd_write_armap): ... this.
3332 (coff_write_armap): Rename to ...
3333 (_bfd_coff_write_armap): ... this.
3334 * libbfd-in.h (bsd_write_armap): Rename to ...
3335 (_bfd_bsd_write_armap): ... this.
3336 (coff_write_armap): Rename to ...
3337 (_bfd_coff_write_armap): ... this.
3338 * aout-target.h, aout-tic30.c: Adjust all users.
3339 * libbfd.h: Regenerate.
3341 2017-02-17 Pedro Alves <palves@redhat.com>
3343 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
3344 (warn_deprecated): Rename to ...
3345 (_bfd_warn_deprecated): ... this.
3346 * libbfd.c (warn_deprecated): Rename to ...
3347 (_bfd_warn_deprecated): ... this.
3348 * bfd-in2.h: Regenerate.
3350 2017-02-17 Pedro Alves <palves@redhat.com>
3352 * bfdio.c (real_ftell): Rename to ...
3353 (_bfd_real_ftell): ... this.
3354 (real_fseek): Rename to ...
3355 (_bfd_real_fseek): ... this.
3356 (real_fopen): Rename to ...
3357 (_bfd_real_fopen): ... this.
3358 * libbfd-in.h (real_ftell): Rename to ...
3359 (_bfd_real_ftell): ... this.
3360 (real_fseek): Rename to ...
3361 (_bfd_real_fseek): ... this.
3362 (real_fopen): Rename to ...
3363 (_bfd_real_fopen): ... this.
3364 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
3365 * libbfd.h: Regenerate.
3367 2017-02-17 Pedro Alves <palves@redhat.com>
3369 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
3370 * libbfd.c (read_unsigned_leb128): Rename to ...
3371 (_bfd_read_unsigned_leb128): ... this.
3372 (read_signed_leb128): Rename to ...
3373 (_bfd_read_signed_leb128): ... this.
3374 (safe_read_leb128): Rename to ...
3375 (_bfd_safe_read_leb128): ... this.
3376 * libbfd-in.h (read_unsigned_leb128): Rename to ...
3377 (_bfd_read_unsigned_leb128): ... this.
3378 (read_signed_leb128): Rename to ...
3379 (_bfd_read_signed_leb128): ... this.
3380 (safe_read_leb128): Rename to ...
3381 (_bfd_safe_read_leb128): ... this.
3382 * libbfd.h: Renegerate.
3384 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
3386 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
3387 before trying to fine matching file and line information.
3389 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
3391 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
3392 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
3393 not match current bfd, then reload debug information. Record bfd
3394 we're loading debug info for in the stash. If we have debug
3395 informatin in the cache then perform section placement before
3398 2017-02-16 Alan Modra <amodra@gmail.com>
3401 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
3402 * elfxx-target.h (elf_backend_no_page_alias): Define.
3403 (elfNN_bed): Init new field.
3404 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
3405 ensure PT_LOAD segment starts on a new page.
3406 * elf32-hppa.c (elf_backend_no_page_alias): Define.
3408 2017-02-16 Alan Modra <amodra@gmail.com>
3411 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
3414 2017-02-16 Jiong Wang <jiong.wang@arm.com>
3416 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
3417 * bfd-in2.h: Regenerated.
3419 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
3422 * elf32-i386.c (elf_i386_relocate_section): Allow
3423 "lea foo@GOT, %reg" in PIC.
3425 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
3428 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
3429 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
3430 error against local IFUNC symbol without a base register for
3433 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
3435 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
3436 `%P: %H:' with `info->callbacks->einfo'.
3437 (ppc_elf_relocate_section): Likewise.
3438 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
3439 (ppc64_elf_edit_toc): Likewise.
3440 (ppc64_elf_relocate_section): Likewise.
3442 2017-02-14 Alan Modra <amodra@gmail.com>
3444 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
3445 --gc-keep-exported, and test versioned field of sym rather than
3446 looking for @ in name.
3448 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
3450 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
3453 2017-02-13 Nick Clifton <nickc@redhat.com>
3456 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
3459 2017-02-07 Andrew Waterman <andrew@sifive.com>
3461 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
3462 entry size if PLT header is written.
3464 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
3466 Fix sparc64 dynamic relocation processing to use the dynamic
3468 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
3469 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
3472 2017-02-03 Nick Clifton <nickc@redhat.com>
3475 * coffcode.h (coff_write_object_contents): Enlarge size of
3476 s_name_buf in order to avoid compile time warning about possible
3478 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
3479 32-bits of insn value before printing into buffer.
3481 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3483 * elfxx-mips.c (mips_elf_hash_sort_data): Add
3484 `max_local_dynindx'.
3485 (mips_elf_sort_hash_table): Handle it.
3486 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
3487 symbols bump up `max_local_dynindx' rather than
3488 `max_non_got_dynindx'.
3490 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3492 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
3493 `min_got_dynindx', `max_unref_got_dynindx' and
3494 `max_non_got_dynindx' members to the `bfd_size_type' data type.
3495 (mips_elf_sort_hash_table): Adjust accordingly.
3497 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3499 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
3500 to access the hash table.
3502 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3504 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
3505 non-NULL `htab' to the beginning.
3507 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3509 * elflink.c (elf_gc_sweep): Wrap overlong line.
3511 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
3513 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
3514 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
3515 * elfxx-mips.c (mips_elf_link_hash_table): Add
3516 `ignore_branch_isa' member.
3517 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
3518 in branch relocation calculation as an error if
3519 `ignore_branch_isa' has been set.
3520 (_bfd_mips_elf_insn32): Rename to...
3521 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
3522 parameter to `insn32' and add an `ignore_branch_isa' parameter.
3523 Handle the new parameter.
3525 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
3527 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
3528 local variable dynobj.
3531 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
3532 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
3533 executable from read-only sections into sdynrelro.
3534 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
3535 dynamic relocs in sdynrelro.
3536 (elf_backend_want_dynrelro): Define.
3538 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
3540 * config.bfd (*-*-rtemsaout*): Mark as removed.
3542 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
3544 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
3545 (arm-*-rtems*): Move to (arm*-*-eabi*).
3546 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
3547 (m68-*-rtems*): Move to (m68*-*-elf*).
3549 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
3551 * config.bfd (*-*-rtemscoff*): Mark as removed.
3553 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
3556 * elflink.c (bfd_elf_record_link_assignment): Revert last
3557 change and don't ever clear `forced_local'. Set `mark'
3559 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
3561 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
3562 (bfd_elf_size_dynamic_sections): ... here.
3563 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
3564 and set `mark' instead in `__tls_get_addr_opt' processing.
3565 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
3567 2017-01-24 Alan Modra <amodra@gmail.com>
3569 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
3570 where dynamic relocs are preferable. Allow ifunc too.
3571 (ensure_undefweak_dynamic): New function.
3572 (allocate_dynrelocs): Use it here. Move plt handling last and
3573 don't make symbols dynamic, simplifying loop. Only make undef
3574 weak symbols with GOT entries dynamic. Correct condition
3575 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
3576 comments. Remove goto.
3577 (ppc_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
3581 __tls_get_addr_opt. Simplify test to clear mem for prelink.
3582 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
3583 (ensure_undefweak_dynamic): New function.
3584 (allocate_dynrelocs): Use it here. Only make undef weak symbols
3585 with GOT entries dynamic. Remove unnecessary test of
3586 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
3587 (ppc64_elf_relocate_section): Correct test for using dynamic
3588 symbol on GOT relocs. Rearrange test for emitting GOT relocs
3589 to suit. Set up explicit tls_index entries and implicit GOT
3590 tls_index entries resolvable at link time for __tls_get_addr_opt.
3591 Simplify expression to clear mem for prelink.
3593 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
3595 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
3597 2017-01-20 Jiong Wang <jiong.wang@arm.com>
3599 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
3600 (elf_backend_hash_symbol): Define.
3602 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
3605 * elflink.c (bfd_elf_record_link_assignment): Clear any
3606 `forced_local' marking for DSO symbols that are not being
3609 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
3611 * elfnn-riscv.c (riscv_elf_object_p): New function.
3613 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
3616 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
3618 (elf_x86_64_check_relocs): Create .eh_frame section for the
3620 (elf_x86_64_size_dynamic_sections): Allocate and initialize
3621 .eh_frame section for the .plt.bnd section.
3622 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
3623 for the .plt.bnd section.
3625 2017-01-12 Nick Clifton <nickc@redhat.com>
3628 * opncls.c (find_separate_debug_file): Add include_dirs
3629 parameter. Only include the directory part of the bfd's filename
3630 in search paths if include_dirs is true. Add a couple of extra
3631 locations for looking for debug files.
3632 ( bfd_follow_gnu_debuglink): Update invocation of
3633 find_separate_debug_file.
3634 (bfd_follow_gnu_debugaltlink): Likewise.
3635 (get_build_id): New function: Finds the build-id of the given bfd.
3636 (get_build_id_name): New function: Computes the name of the
3637 separate debug info file for a bfd, based upon its build-id.
3638 (check_build_id_file): New function: Checks to see if a separate
3639 debug info file exists at the given location, and that its
3640 build-id matches that of the original bfd.
3641 (bfd_follow_build_id_debuglink): New function: Finds a separate
3642 debug info file for a given bfd by using the build-id method.
3643 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
3644 method of locating a separate debug info file before using the
3646 * bfd-in2.h: Regenerate.
3648 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
3651 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
3652 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
3653 elf_x86_64_eh_frame_plt_got.
3654 (elf_x86_64_size_dynamic_sections): Get unwind info from
3655 elf_x86_64_bnd_arch_bed for the BND PLT.
3657 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
3659 * config.bfd: Add entries for i686-redox and x86_64-redox.
3661 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
3663 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
3665 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
3666 .eh_frame section to 4 bytes for x32.
3667 (elf_x86_64_check_relocs): Likewise.
3669 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
3672 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
3673 (PLT_GOT_FDE_LENGTH): Likewise.
3674 (elf_i386_plt_layout): Add eh_frame_plt_got and
3675 eh_frame_plt_got_size.
3676 (elf_i386_plt): Updated.
3677 (elf_i386_link_hash_table): Add plt_got_eh_frame.
3678 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
3679 (elf_i386_size_dynamic_sections): Allocate and initialize
3680 .eh_frame section for .plt.got.
3681 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
3683 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
3684 eh_frame_plt_got_size.
3685 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
3686 (PLT_GOT_FDE_LENGTH): Likewise.
3687 (elf_x86_64_backend_data): Add eh_frame_plt_got and
3688 eh_frame_plt_got_size.
3689 (elf_x86_64_arch_bed): Updated.
3690 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
3691 eh_frame_plt_got_size.
3692 (elf_x86_64_nacl_arch_bed): Likewise.
3693 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
3694 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
3695 (elf_x86_64_size_dynamic_sections): Allocate and initialize
3696 .eh_frame section for .plt.got.
3697 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
3700 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
3702 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
3703 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
3705 2017-01-09 Nick Clifton <nickc@redhat.com>
3707 * dwarf2.c (lookup_address_in_function_table): Return early if
3708 there are no functions in the given comp unit, or if the high
3709 address of the last function in the comp unit is less than the
3712 2017-01-09 Nick Clifton <nickc@redhat.com>
3715 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
3716 message if there are too many symbols to load.
3718 2017-01-04 James Clarke <jrtc27@jrtc27.com>
3720 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
3721 if relocs are cached.
3723 2017-01-03 Rich Felker <bugdal@aerifal.cx>
3726 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
3727 for R_MICROBLAZE_GOTOFF_64.
3729 2017-01-03 Nick Clifton <nickc@redhat.com>
3731 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
3732 warning about using a possibly uninitialised variable.
3734 2017-01-02 Alan Modra <amodra@gmail.com>
3736 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
3737 (allocate_plt_static, allocate_dynrelocs): Use it.
3739 2017-01-02 Alan Modra <amodra@gmail.com>
3741 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
3742 .PARISC.unwind section.
3744 2017-01-02 Alan Modra <amodra@gmail.com>
3747 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
3748 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
3749 indirect to GOT pointer relative code edit.
3751 2017-01-02 Alan Modra <amodra@gmail.com>
3753 Update year range in copyright notice of all files.
3755 For older changes see ChangeLog-2016
3757 Copyright (C) 2017 Free Software Foundation, Inc.
3759 Copying and distribution of this file, with or without modification,
3760 are permitted in any medium without royalty provided the copyright
3761 notice and this notice are preserved.
3767 version-control: never