1 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
3 * elf32-i386.c (elf_i386_allocate_dynrelocs): Removed.
4 (elf_i386_allocate_local_dynrelocs): Likewise.
5 (elf_i386_size_dynamic_sections): Replace
6 elf_i386_allocate_dynrelocs/elf_i386_allocate_local_dynrelocs
7 with _bfd_x86_elf_allocate_dynrelocs and
8 _bfd_x86_elf_allocate_local_dynrelocs.
9 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Removed.
10 (elf_x86_64_allocate_local_dynrelocs): Likewise.
11 (elf_x86_64_size_dynamic_sections): Replace
12 elf_x86_64_allocate_dynrelocs/elf_x86_64_allocate_local_dynrelocs
13 with _bfd_x86_elf_allocate_dynrelocs and
14 _bfd_x86_elf_allocate_local_dynrelocs.
15 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): New function.
16 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
17 * elfxx-x86.h (_bfd_x86_elf_allocate_dynrelocs): New prototype.
18 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
20 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
22 * elf32-i386.c (is_i386_elf): Removed.
23 (elf_i386_check_relocs): Replace is_i386_elf with is_x86_elf.
24 (elf_i386_size_dynamic_sections): Likewise.
25 (elf_i386_relocate_section): Likewise.
26 * elf64-x86-64.c (is_x86_64_elf): Removed.
27 (elf_x86_64_check_relocs): Replace is_x86_64_elf with
29 (elf_x86_64_size_dynamic_sections): Likewise.
30 (elf_x86_64_relocate_section): Likewise.
31 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
33 * elfxx-x86.h (elf_x86_link_hash_table): Add target_id.
36 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
38 * elf32-i386.c (elf_i386_compute_jump_table_size): Removed.
39 (elf_i386_allocate_dynrelocs): Replace
40 elf_i386_compute_jump_table_size with
41 elf_x86_compute_jump_table_size.
42 (elf_i386_size_dynamic_sections): Likewise.
43 * elf64-x86-64.c (elf_x86_64_compute_jump_table_size): Removed.
44 (elf_x86_64_allocate_dynrelocs): Replace
45 elf_x86_64_compute_jump_table_size with
46 elf_x86_compute_jump_table_size.
47 (elf_x86_64_size_dynamic_sections): Likewise.
48 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
50 * elfxx-x86.h (elf_x86_link_hash_table): Add got_entry_size.
51 (elf_x86_compute_jump_table_size): New.
53 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
55 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
57 (_bfd_x86_elf_adjust_dynamic_symbol): Use sizeof_reloc.
58 * elfxx-x86.h (elf_x86_link_hash_table): Add sizeof_reloc.
60 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
62 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check VxWorks
63 with htab->is_vxworks.
64 (elf_i386_size_dynamic_sections): Likewise.
65 (elf_i386_relocate_section): Likewise.
66 (elf_i386_finish_dynamic_symbol): Likewise.
67 (elf_i386_finish_dynamic_sections): Likewise.
69 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
71 * elf32-i386.c (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
72 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
73 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Moved to ...
74 * elfxx-x86.h (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
75 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
76 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Here.
77 * elf64-x86-64.c (GOT_TLS_IE, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
78 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Removed.
80 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
83 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Check
84 ELF_COMMON_DEF_P for common symbols.
86 2017-09-02 Alan Modra <amodra@gmail.com>
88 * elf-eh-frame.c (offset_adjust): Avoid false positive gcc warning.
89 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Likewise.
90 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
92 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
94 * elf32-i386.c (elf_i386_gc_mark_hook): Removed.
95 (elf_backend_gc_mark_hook): Likewise.
96 * elf64-x86-64.c (elf_x86_64_gc_mark_hook): Likewise.
97 (elf_backend_gc_mark_hook): Likewise.
98 * elfxx-x86.c (_bfd_x86_elf_gc_mark_hook): New function.
99 * elfxx-x86.h (_bfd_x86_elf_gc_mark_hook): New.
100 (elf_backend_gc_mark_hook): Likewise.
102 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
104 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Removed.
105 (elf_backend_adjust_dynamic_symbol): Likewise.
106 * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.
107 (elf_backend_adjust_dynamic_symbol): Likewise.
108 * elfxx-x86.c (_bfd_x86_elf_adjust_dynamic_symbol): New function.
109 (_bfd_x86_elf_link_setup_gnu_properties): Copy is_vxworks.
110 * elfxx-x86.h (elf_x86_link_hash_table): Add is_vxworks.
111 (_bfd_x86_elf_adjust_dynamic_symbol): New.
112 (elf_backend_adjust_dynamic_symbol): Likewise.
114 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
116 * elfxx-x86.h (elf_x86_plt_layout_table): Fix a typo in
119 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
121 * elf32-i386.c (elf_i386_mkobject): Removed.
122 (bfd_elf32_mkobject): Likewise.
123 * elf64-x86-64.c (elf_x86_64_mkobject): Likewise.
124 (bfd_elf64_mkobject): Likewise.
125 (bfd_elf32_mkobject): Likewise.
126 * elfxx-x86.c (_bfd_x86_elf_mkobject): New function.
127 * elfxx-x86.h (_bfd_x86_elf_mkobject): New.
128 (bfd_elf64_mkobject): Likewise.
129 (bfd_elf32_mkobject): Likewise.
131 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
133 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Updated.
134 Call _bfd_x86_elf_link_setup_gnu_properties.
135 * elf64-x86-64.c (elf_x86_lazy_plt_layout): Initialize
136 pic_plt0_entry and pic_plt_entry fields with the non-PIC PLT
138 (elf_x86_64_non_lazy_plt): Likewise.
139 (elf_x86_64_lazy_bnd_plt): Likewise.
140 (elf_x86_64_non_lazy_bnd_plt): Likewise.
141 (elf_x86_64_lazy_ibt_plt): Likewise.
142 (elf_x32_lazy_ibt_plt): Likewise.
143 (elf_x86_64_non_lazy_ibt_plt): Likewise.
144 (elf_x32_non_lazy_ibt_plt): Likewise.
145 (elf_x86_64_nacl_plt): Likewise.
146 (elf_x86_64_link_setup_gnu_properties): Updated. Call
147 _bfd_x86_elf_link_setup_gnu_properties.
148 * elfxx-x86.c: Include elf-vxworks.h".
149 (_bfd_x86_elf_link_setup_gnu_properties): New function.
150 * elfxx-x86.h (elf_x86_lazy_plt_layout): Remove "for i386 only"
151 comments for pic_plt0_entry and pic_plt_entry.
152 (elf_x86_non_lazy_plt_layout): Likewise.
153 (elf_x86_plt_layout_table): New.
154 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
156 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
159 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Create
160 .eh_frame section for the second PLT.
161 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Correct
162 alignment of .eh_frame section for the second PLT.
164 2017-09-01 Nick Clifton <nickc@redhat.com>
167 * dwarf2.c (decode_line_info): Fix test for an overlong line info
170 2017-09-01 Nick Clifton <nickc@redhat.com>
173 * elf-attrs.c (_bfd_elf_parse_attributes): Ensure that the
174 attribute buffer is NUL terminated.
176 2017-08-31 Nick Clifton <nickc@redhat.com>
179 * dwarf2.c (read_section): If necessary add a terminating NUL byte
180 to dwarf string sections.
182 2017-08-31 Alan Modra <amodra@gmail.com>
184 * po/SRC-POTFILES.in: Regenerate.
186 2017-08-31 Alan Modra <amodra@gmail.com>
188 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Don't exit early
189 for a section containing just a terminator. Allow multiple
190 terminators at end of section.
191 * elflink.c (bfd_elf_discard_info): Iterate over .eh_frame
192 sections when not adding alignment. Assert on terminator in
195 2017-08-31 Alan Modra <amodra@gmail.com>
199 * elflink.c (bfd_elf_discard_info): Don't pad embedded zero
202 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
204 * configure.ac (bfd_backends): Add elf64.lo together with
205 elfxx-x86.lo for 64-bit BFD.
206 * configure: Regenerated.
208 2017-08-31 James Bowman <james.bowman@ftdichip.com>
210 * elf32-ft32.c (ft32_elf_howto_table): Use complain_overflow_dont
213 2017-08-31 Alan Modra <amodra@gmail.com>
216 * opncls.c (bfd_close_all_done): Don't call bfd_cache_close
217 before _close_and_cleanup. Call iovec->bclose after.
218 (bfd_close): Remove code common to, and call, bfd_close_all_done.
220 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
222 * elf32-i386.c (elf_i386_plt_type): Removed.
223 (elf_i386_plt): Likewise.
224 (elf_i386_get_synthetic_symtab): Updated. Call
225 _bfd_x86_elf_get_synthetic_symtab.
226 * elf64-x86-64.c (elf_x86_64_plt_type): Removed.
227 (elf_x86_64_plt): Likewise.
228 (elf_x86_64_get_synthetic_symtab): Updated. Call
229 _bfd_x86_elf_get_synthetic_symtab.
230 * elfxx-x86.c (elf_i386_get_plt_got_vma): New function.
231 (elf_x86_64_get_plt_got_vma): Likewise.
232 (elf_i386_valid_plt_reloc_p): Likewise.
233 (elf_x86_64_valid_plt_reloc_p): Likewise.
234 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
235 * elfxx-x86.h (elf_x86_plt_type): New.
236 (elf_x86_plt): Likewise.
237 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
239 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
241 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Check
242 target_id instead of elf_machine_code.
244 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
246 * elf32-i386.c (ELF_DYNAMIC_INTERPRETER): Removed.
247 (elf_i386_lazy_plt_layout): Likewise.
248 (elf_i386_non_lazy_plt_layout): Likewise.
249 (elf_i386_plt_layout): Likewise.
250 (elf_i386_link_hash_table): Likewise.
251 (elf_i386_next_tls_desc_index): Likewise.
252 (elf_i386_srelplt2): Likewise.
253 (elf_i386_plt): Likewise.
254 (elf_i386_lazy_plt): Likewise.
255 (elf_i386_non_lazy_plt): Likewise.
256 (elf_i386_link_hash_table_create): Likewise.
257 (bfd_elf32_bfd_link_hash_table_create): Likewise.
258 (elf_i386_lazy_plt): Updated.
259 (elf_i386_non_lazy_plt): Likewise.
260 (elf_i386_lazy_ibt_plt): Likewise.
261 (elf_i386_non_lazy_ibt_plt): Likewise.
262 (elf_i386_allocate_dynrelocs): Likewise.
263 (elf_i386_size_dynamic_sections): Likewise.
264 (elf_i386_relocate_section): Likewise.
265 (elf_i386_finish_dynamic_symbol): Likewise.
266 (elf_i386_finish_dynamic_sections): Likewise.
267 (elf_i386_get_synthetic_symtab): Likewise.
268 (elf_i386_link_setup_gnu_properties): Likewise.
269 (elf_i386_nacl_plt): Likewise.
270 * elf64-x86-64.c (ABI_64_P): Removed.
271 (ELF64_DYNAMIC_INTERPRETER): Likewise.
272 (ELF32_DYNAMIC_INTERPRETER): Likewise.
273 (elf_x86_64_lazy_plt_layout): Likewise.
274 (elf_x86_64_non_lazy_plt_layout): Likewise.
275 (elf_x86_64_plt_layout): Likewise.
276 (elf_x86_64_link_hash_table): Likewise.
277 (elf_x86_64_plt): Likewise.
278 (elf_x86_64_lazy_plt): Likewise.
279 (elf_x86_64_non_lazy_plt): Likewise.
280 (elf_x86_64_link_hash_table_create): Likewise.
281 (bfd_elf64_bfd_link_hash_table_create): Likewise.
282 (bfd_elf32_bfd_link_hash_table_create): Likewise.
283 (elf_x86_64_lazy_plt): Updated.
284 (elf_x86_64_non_lazy_plt): Likewise.
285 (elf_x86_64_lazy_bnd_plt): Likewise.
286 (elf_x86_64_non_lazy_bnd_plt): Likewise.
287 (elf_x86_64_lazy_ibt_plt): Likewise.
288 (elf_x32_lazy_ibt_plt): Likewise.
289 (elf_x86_64_non_lazy_ibt_plt): Likewise.
290 (elf_x32_non_lazy_ibt_plt): Likewise.
291 (elf_x86_64_allocate_dynrelocs): Likewise.
292 (elf_x86_64_size_dynamic_sections): Likewise.
293 (elf_x86_64_relocate_section): Likewise.
294 (elf_x86_64_finish_dynamic_symbol): Likewise.
295 (elf_x86_64_finish_dynamic_sections): Likewise.
296 (elf_x86_64_get_synthetic_symtab): Likewise.
297 (elf_x86_64_link_setup_gnu_properties): Likewise.
298 (elf_x86_64_nacl_plt): Likewise.
299 * elfxx-x86.c: Include "objalloc.h", "elf/i386.h" and
301 (ELF32_DYNAMIC_INTERPRETER): New.
302 (ELF64_DYNAMIC_INTERPRETER): Likewise.
303 (ELFX32_DYNAMIC_INTERPRETER): Likewise.
304 (_bfd_x86_elf_link_hash_table_create): Likewise.
305 (_bfd_x86_elf_link_hash_table_free): Renamed to ...
306 (elf_x86_link_hash_table_free): This. Make it static.
307 * elfxx-x86.h: Don't include "objalloc.h".
309 (elf_x86_lazy_plt_layout): Likewise.
310 (elf_x86_non_lazy_plt_layout): Likewise.
311 (elf_x86_plt_layout): Likewise.
312 (_bfd_x86_elf_link_hash_table_create): Likewise.
313 (bfd_elf64_bfd_link_hash_table_create): Likewise.
314 (bfd_elf32_bfd_link_hash_table_create): Likewise.
315 (elf_x86_link_hash_table): Add plt, lazy_plt, non_lazy_plt,
316 srelplt2 and next_tls_desc_index.
317 (_bfd_x86_elf_link_hash_table_free): Removed.
319 2017-08-30 Maciej W. Rozycki <macro@imgtec.com>
321 * elfxx-mips.c (mips_elf_perform_relocation): Correct microMIPS
322 branch offset interpretation.
324 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
327 * opncls.c (bfd_close_all_done): Call _close_and_cleanup.
329 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
331 * elf64-x86-64.c (elf_x86_64_next_tls_desc_index): Removed.
332 (elf_x86_64_srelplt2): Likewise.
334 2017-08-30 Alan Modra <amodra@gmail.com>
336 * elf64-ppc.c (struct ppc_link_hash_table): Add do_tls_opt.
337 (ppc64_elf_tls_optimize): Set it.
338 (ppc64_elf_relocate_section): Nop addis on TPREL16_HA, and convert
339 insn on TPREL16_LO and TPREL16_LO_DS relocs to use r13 when
340 addis would add zero.
341 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add do_tls_opt.
342 (ppc_elf_tls_optimize): Set it.
343 (ppc_elf_relocate_section): Nop addis on TPREL16_HA, and convert
344 insn on TPREL16_LO relocs to use r2 when addis would add zero.
346 2017-08-30 Alan Modra <amodra@gmail.com>
348 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing
349 __tls_get_addr call sequences to LE, don't move the addi down
350 to the nop. Replace the bl with addi and leave the nop alone.
352 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
354 * elf32-i386.c (elf_i386_pie_finish_undefweak_symbol):
356 * elf64-x86-64.c (elf_x86_64_finish_local_dynamic_symbol):
358 (elf_x86_64_pie_finish_undefweak_symbol): Likewise.
360 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
362 * Makefile.am (BFD32_BACKENDS): Add elfxx-x86.lo.
363 (BFD64_BACKENDS): Likewise.
364 (BFD32_BACKENDS_CFILES): Add elfxx-x86.c.
365 (BFD64_BACKENDS_CFILES): Likewise.
366 * Makefile.in: Regenerated.
367 * configure.ac (bfd_backends): Add elfxx-x86.lo together with
368 elf32-i386.lo and elf64-x86-64.lo.
369 * configure: Regenerated.
370 * elf32-i386.c: Include "elfxx-x86.h" instead of "sysdep.h",
371 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
372 "objalloc.h" and "hashtab.h".
373 (ELIMINATE_COPY_RELOCS): Removed.
374 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
375 (SYMBOL_NO_COPYRELOC): Likewise.
376 (elf_i386_link_hash_entry): Likewise.
377 (GOT_UNKNOWN): Likewise.
378 (GOT_NORMAL): Likewise.
379 (GOT_TLS_GD): Likewise.
380 (elf_i386_hash_entry): Likewise.
381 (elf_i386_obj_tdata): Likewise.
382 (elf_i386_tdata): Likewise.
383 (elf_i386_local_got_tls_type): Likewise.
384 (elf_i386_local_tlsdesc_gotent): Likewise.
385 (elf_i386_hash_table): Likewise.
386 (elf_i386_link_hash_newfunc): Likewise.
387 (elf_i386_local_htab_hash): Likewise.
388 (elf_i386_local_htab_eq): Likewise.
389 (elf_i386_get_local_sym_hash): Likewise.
390 (elf_i386_link_hash_table_free): Likewise.
391 (elf_i386_copy_indirect_symbol): Likewise.
392 (elf_i386_fixup_symbol): Likewise.
393 (elf_i386_readonly_dynrelocs): Likewise.
394 (elf_i386_always_size_sections): Likewise.
395 (elf_i386_set_tls_module_base): Likewise.
396 (elf_i386_dtpoff_base): Likewise.
397 (compare_relocs): Likewise.
398 (elf_i386_hash_symbol): Likewise.
399 (elf_i386_parse_gnu_properties): Likewise.
400 (elf_i386_merge_gnu_properties): Likewise.
401 (elf_i386_link_check_relocs): Likewise.
402 (elf_i386_merge_symbol_attribute): Likewise.
403 (bfd_elf32_bfd_link_check_relocs): Likewise.
404 (elf_backend_copy_indirect_symbol): Likewise.
405 (elf_backend_always_size_sections): Likewise.
406 (elf_backend_omit_section_dynsym): Likewise.
407 (elf_backend_hash_symbol): Likewise.
408 (elf_backend_fixup_symbol): Likewise.
409 (elf_backend_parse_gnu_properties): Likewise.
410 (elf_backend_merge_gnu_properties): Likewise.
411 (elf_backend_merge_symbol_attribute): Likewise.
412 (elf_i386_mkobject): Updated.
413 (elf_i386_link_hash_table_create): Likewise.
414 (elf_i386_check_tls_transition): Likewise.
415 (elf_i386_tls_transition): Likewise.
416 (elf_i386_convert_load_reloc): Likewise.
417 (elf_i386_check_relocs): Likewise.
418 (elf_i386_adjust_dynamic_symbol): Likewise.
419 (elf_i386_allocate_dynrelocs): Likewise.
420 (elf_i386_convert_load): Likewise.
421 (elf_i386_size_dynamic_sections): Likewise.
422 (elf_i386_relocate_section): Likewise.
423 (elf_i386_finish_dynamic_symbol ): Likewise.
424 (elf_i386_finish_dynamic_sections): Likewise.
425 (elf_i386_output_arch_local_syms): Likewise.
426 (elf_i386_get_synthetic_symtab): Likewise.
427 (elf_i386_link_setup_gnu_properties): Likewise.
428 (elf_i386_link_hash_table): Use elf_x86_link_hash_table, instead
429 of elf_link_hash_table, as base.
430 (elf_i386_next_tls_desc_index): New.
431 (elf_i386_srelplt2): Likewise.
432 (elf_i386_plt): Likewise.
433 (elf_i386_lazy_plt): Likewise.
434 (elf_i386_non_lazy_plt): Likewise.
435 * elf32-x86-64.c: Include "elfxx-x86.h" instead of "sysdep.h",
436 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
437 "objalloc.h" and "hashtab.h".
438 (ELIMINATE_COPY_RELOCS): Removed.
439 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
440 (SYMBOL_NO_COPYRELOC): Likewise.
441 (elf_x86_64_link_hash_entry): Likewise.
442 (GOT_UNKNOWN): Likewise.
443 (GOT_NORMAL): Likewise.
444 (GOT_TLS_GD): Likewise.
445 (elf_x86_64_hash_entry): Likewise.
446 (elf_x86_64_obj_tdata): Likewise.
447 (elf_x86_64_tdata): Likewise.
448 (elf_x86_64_local_got_tls_type): Likewise.
449 (elf_x86_64_local_tlsdesc_gotent): Likewise.
450 (elf_x86_64_hash_table): Likewise.
451 (elf_x86_64_link_hash_newfunc): Likewise.
452 (elf_x86_64_local_htab_hash): Likewise.
453 (elf_x86_64_local_htab_eq): Likewise.
454 (elf_x86_64_get_local_sym_hash): Likewise.
455 (elf_x86_64_link_hash_table_free): Likewise.
456 (elf_x86_64_copy_indirect_symbol): Likewise.
457 (elf_x86_64_fixup_symbol): Likewise.
458 (elf_x86_64_readonly_dynrelocs): Likewise.
459 (elf_x86_64_always_size_sections): Likewise.
460 (elf_x86_64_set_tls_module_base): Likewise.
461 (elf_x86_64_dtpoff_base): Likewise.
462 (compare_relocs): Likewise.
463 (elf_x86_64_merge_symbol_attribute): Likewise.
464 (elf_x86_64_hash_symbol): Likewise.
465 (elf_x86_64_parse_gnu_properties): Likewise.
466 (elf_x86_64_merge_gnu_properties): Likewise.
467 (elf_x86_64_link_check_relocs): Likewise.
468 (elf_backend_copy_indirect_symbol): Likewise.
469 (elf_backend_always_size_sections): Likewise.
470 (bfd_elf64_bfd_link_check_relocs): Likewise.
471 (elf_backend_merge_symbol_attribute): Likewise.
472 (elf_backend_hash_symbol): Likewise.
473 (elf_backend_omit_section_dynsym): Likewise.
474 (elf_backend_fixup_symbol): Likewise.
475 (elf_backend_parse_gnu_properties): Likewise.
476 (elf_backend_merge_gnu_properties): Likewise.
477 (bfd_elf32_bfd_link_check_relocs): Likewise.
478 (elf_x86_64_mkobject): Updated.
479 (elf_x86_64_link_hash_table_create): Likewise.
480 (elf_x86_64_check_tls_transition): Likewise.
481 (elf_x86_64_tls_transition): Likewise.
482 (elf_x86_64_convert_load_reloc): Likewise.
483 (elf_x86_64_check_relocs): Likewise.
484 (elf_x86_64_adjust_dynamic_symbol): Likewise.
485 (elf_x86_64_allocate_dynrelocs): Likewise.
486 (elf_x86_64_convert_load): Likewise.
487 (elf_x86_64_size_dynamic_sections): Likewise.
488 (elf_x86_64_relocate_section): Likewise.
489 (elf_x86_64_finish_dynamic_symbol ): Likewise.
490 (elf_x86_64_finish_dynamic_sections): Likewise.
491 (elf_x86_64_output_arch_local_syms): Likewise.
492 (elf_x86_64_get_synthetic_symtab): Likewise.
493 (elf_x86_64_link_setup_gnu_properties): Likewise.
494 (elf_x86_64_link_hash_table): Use elf_x86_link_hash_table,
495 instead of elf_link_hash_table, as base.
496 (elf_x86_64_next_tls_desc_index): New.
497 (elf_x86_64_srelplt2): Likewise.
498 (elf_x86_64_plt): Likewise.
499 (elf_x86_64_lazy_plt): Likewise.
500 (elf_x86_64_non_lazy_plt): Likewise.
501 * elfxx-x86.c: New file.
502 * elfxx-x86.h: Likewise.
504 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
506 * elf32-i386.c (elf_i386_get_synthetic_symtab): Simplify bad
508 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
510 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
512 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check valid PLT
513 sections before checking dynamic relocations and free invalid
514 PLT section contents.
515 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
517 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
519 * elf-bfd.h (_bfd_elf_ifunc_get_synthetic_symtab): Removed.
520 * elf-ifunc.c (_bfd_elf_ifunc_get_synthetic_symtab): Likewise.
522 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
525 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check for valid
527 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
529 2017-08-27 H.J. Lu <hongjiu.lu@intel.com>
531 * elf32-i386.c (elf_i386_link_hash_newfunc): Initialize
533 * elf64-x86-64.c (elf_x86_64_link_hash_newfunc): Likewise.
535 2017-08-26 H.J. Lu <hongjiu.lu@intel.com>
538 * elf-bfd.h (elf_obj_tdata): Use ENUM_BITFIELD on object_id,
539 dyn_lib_class and has_gnu_symbols. Change bad_symtab to bitfield.
540 Add a has_no_copy_on_protected bitfield.
541 (elf_has_no_copy_on_protected): New.
542 * elf-properties.c (_bfd_elf_parse_gnu_properties): Set
543 elf_has_no_copy_on_protected for GNU_PROPERTY_NO_COPY_ON_PROTECTED.
544 (elf_merge_gnu_property_list): Likewise.
545 (_bfd_elf_link_setup_gnu_properties): Set extern_protected_data
546 to FALSE for elf_has_no_copy_on_protected.
547 * elf32-i386.c (SYMBOL_NO_COPYRELOC): New.
548 (elf_i386_link_hash_entry): Add def_protected.
549 (elf_i386_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
550 when checking info->nocopyreloc.
551 (elf_i386_link_setup_gnu_properties): Don't set
552 extern_protected_data here.
553 (elf_i386_merge_symbol_attribute): New function.
554 (elf_backend_merge_symbol_attribute): New.
555 * elf64-x86-64.c (SYMBOL_NO_COPYRELOC): New.
556 (elf_x86_64_link_hash_entry): Add def_protected.
557 (elf_x86_64_need_pic): Report protected symbol for def_protected.
558 (elf_x86_64_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
559 when checking info->nocopyreloc.
560 (elf_x86_64_relocate_section): Also check for R_X86_64_PC32
561 relocation run-time overflow and unresolvable R_X86_64_32S
562 relocation against protected data symbol defined in shared object
563 with GNU_PROPERTY_NO_COPY_ON_PROTECTED.
564 (elf_x86_64_link_setup_gnu_properties): Don't set
565 extern_protected_data here.
566 (elf_x86_64_merge_symbol_attribute): New function.
567 (elf_backend_merge_symbol_attribute): New.
569 2017-08-26 Alan Modra <amodra@gmail.com>
571 * elf32-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
572 (ppc_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
573 (ppc_elf_relocate_section): Comment fix.
574 * elf64-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
575 (ppc64_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
576 Support dynamic relocs for TPREL16 when non-pic too.
577 (dec_dynrel_count): Adjust TPREL16 handling as per check_relocs.
578 (ppc64_elf_relocate_section): Support dynamic relocs for TPREL16
581 2017-08-25 H.J. Lu <hongjiu.lu@intel.com>
583 * elf32-i386.c (elf_i386_link_hash_entry): Remove redundant
584 "symbol" in comments.
585 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Likewise.
587 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
590 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for
591 R_X86_64_PC32 relocation run-time overflow and unresolvable
592 R_X86_64_32S relocation with -z nocopyreloc.
594 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
596 * elf32-i386.c (elf_i386_check_relocs): Revert the last change.
597 Undefined symbols may not have a type.
598 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
600 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
602 * elf64-x86-64.c (elf_x86_64_need_pic): Add an argument for
603 bfd_link_info. Report shared, PIE or PDE object based on
605 (elf_x86_64_check_relocs): Update elf_x86_64_need_pic call.
606 (elf_x86_64_relocate_section): Likewise.
608 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
610 * elf32-i386.c (elf_i386_check_relocs): Increment PLT count only
611 for function symbols.
612 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
614 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
616 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set
617 extern_protected_data to FALSE if GNU_PROPERTY_NO_COPY_ON_PROTECTED
618 is set on any input relocatable file.
619 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
621 2017-08-23 Alan Modra <amodra@gmail.com>
624 * elf64-ppc.c (ensure_undef_dynamic): Rename from
625 ensure_undefweak_dynamic. Handle undefined too.
626 * elf32-ppc.c (ensure_undef_dynamic): Likewise.
627 * elf32-hppa.c (ensure_undef_dynamic): Likewise.
628 (allocate_dynrelocs): Discard undefined non-default visibility
629 relocs first. Make undefined syms dynamic. Tidy goto.
631 2017-08-21 Alan Modra <amodra@gmail.com>
632 H.J. Lu <hongjiu.lu@intel.com>
635 * elf-bfd.h (SYMBOLIC_BIND): Return TRUE for __start/__stop symbols.
636 * elflink.c (bfd_elf_define_start_stop): Rewrite.
638 2017-08-21 Hans-Peter Nilsson <hp@bitrange.com>
641 * elf64-mmix.c (mmix_elf_relax_section): Correct handling of
642 undefined weak symbols.
644 2017-08-18 Nick Clifton <nickc@redhat.com>
647 * tekhex.c (getsym): Fix check for source pointer walking off the
648 end of the input buffer.
650 2017-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
653 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Skip IFUNC
654 relocations in debug sections, change abort to _bfd_error_handler.
656 2017-08-14 Nick Clifton <nickc@redhat.com>
659 * elf.c (setup_group): Check for an empty or very small group
661 * po/bfd.pot: Regenerate.
663 2017-08-14 Alan Modra <amodra@gmail.com>
666 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't add
667 alignment padding here.
668 * elflink.c (bfd_elf_discard_info): Add .eh_frame padding here
669 in a reverse pass over sections.
671 2017-08-11 H.J. Lu <hongjiu.lu@intel.com>
674 * elf32-i386.c (elf_i386_get_synthetic_symtab): Allocate space
675 for @plt suffixes first.
676 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
678 2017-08-08 Nick Clifton <nickc@redhat.com>
681 * elf-attrs.c (_bfd_elf_parse_attributes): Complain about very
682 small section lengths.
683 * elf.c (_bfd_elf_setup_sections): Skip empty entries in the group
685 (elfcore_grok_freebsd_prstatus): Add checks to make sure that
686 there is enough data present in the note.
688 2017-08-08 Alan Modra <amodra@gmail.com>
691 * elf32-microblaze.c (microblaze_elf_check_relocs): Don't bump
692 got.refcount for GOTOFF relocs, just create .got section.
694 2017-08-07 H.J. Lu <hongjiu.lu@intel.com>
696 * elflink.c (elf_link_add_object_symbols): Move common symbol
697 check after bed->common_definition.
699 2017-08-07 Alan Modra <amodra@gmail.com>
702 * elflink.c (bfd_elf_final_link): Don't segfault when sections
703 needed to define various dynamic tags have been discarded.
705 2017-08-07 Nick Clifton <nickc@redhat.com>
708 * elf32-i386.c (elf_i386_link_setup_gnu_properties): If the dynobj
709 has not been set then use the bfd returned by
710 _bfd_elf_link_setup_gnu_properties. If that is null then search
711 through all the input bfds selecting the first normal, ELF format
713 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
715 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
717 * elf32-i386.c (elf_i386_link_hash_entry): Change tls_get_addr
719 (elf_i386_link_hash_newfunc): Initialize tls_get_addr to 0.
720 (elf_i386_check_tls_transition): Check tls_get_addr directly.
721 (elf_i386_convert_load_reloc): Update tls_get_addr check.
722 (elf_i386_link_check_relocs): New function.
723 (bfd_elf32_bfd_link_check_relocs): New.
724 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Change tls_get_addr
726 (elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 0.
727 (elf_x86_64_check_tls_transition): Check tls_get_addr directly.
728 (elf_x86_64_convert_load_reloc): Update tls_get_addr check.
729 (elf_x86_64_link_check_relocs): New function.
730 (bfd_elf64_bfd_link_check_relocs): New.
731 (bfd_elf32_bfd_link_check_relocs): Likewise.
733 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
736 * elflink.c (elf_link_add_object_symbols): Treat common symbol
737 as undefined for --no-define-common.
739 2017-08-05 Alan Modra <amodra@gmail.com>
741 * elf32-hppa.c (elf32_hppa_set_gp): Don't require an
742 hppa_link_hash_table.
744 2017-08-02 Max Filippov <jcmvbkbc@gmail.com>
746 * xtensa-isa.c (xtensa_isa_init): Don't update lookup table
747 entries for sysregs with negative indices.
749 2017-08-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
751 * elf32-s390.c (elf_s390_finish_dynamic_sections): Skip if it
752 isn't the S/390 specific elf data.
753 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
755 2017-07-31 Kuan-Lin Chen <rufus@andestech.com>
757 * elfxx-riscv.c (riscv_elf_add_sub_reloc): New function.
758 * (howto_table) [R_RISCV_ADD8]: Use riscv_elf_add_sub_reloc.
759 [R_RISCV_ADD16]: Likewise.
760 [R_RISCV_ADD32]: Likewise.
761 [R_RISCV_ADD64]: Likewise.
762 [R_RISCV_SUB6]: Likewise.
763 [R_RISCV_SUB8]: Likewise.
764 [R_RISCV_SUB16]: Likewise.
765 [R_RISCV_SUB32]: Likewise.
766 [R_RISCV_SUB64]: Likewise.
768 2017-07-31 Alan Modra <amodra@gmail.com>
770 * elf64-ppc.c (ppc64_elf_tls_setup): Warn on --plt-localentry
771 without ld.so checks.
773 2017-07-29 Alan Modra <amodra@gmail.com>
776 * elf64-ppc.c (struct ppc_link_hash_entry): Add non_zero_localentry.
777 (ppc64_elf_merge_symbol): Set non_zero_localentry.
778 (is_elfv2_localentry0): Test non_zero_localentry.
779 (ppc64_elf_tls_setup): Default to --no-plt-localentry.
781 2017-07-28 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
783 * elf32-s390.c (elf_s390_finish_dynamic_sections): Add NULL
784 pointer check for htab->elf.irelplt.
785 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
787 2017-07-27 Nick Clifton <nickc@redhat.com>
790 * mach-o.c (bfd_mach_o_read_symtab_strtab): Fail if the symtab
792 * nlmcode.h (nlm_swap_auxiliary_headers_in): Replace assertion
794 * section.c (bfd_make_section_with_flags): Fail if the name or bfd
796 * vms-alpha.c (bfd_make_section_with_flags): Correct computation
798 (evax_bfd_print_emh): Check for invalid string lengths.
800 2017-07-25 Nick Clifton <nickc@redhat.com>
802 * po/fr.po: Updated French translation.
804 2017-07-25 Benjamin Green <bengreen5mx@gmail.com>
807 * elf32-msp430.c (msp430_elf_relax_section): Allow conversion of
808 16-bit absolute branches into 10-bit pc-relative branches on the
809 MSP430 as well as the MSP430X.
811 2017-07-25 Alan Modra <amodra@gmail.com>
813 * elf64-ppc.c (struct map_stub): Add tls_get_addr_opt_bctrl.
814 (stub_eh_frame_size): New function.
815 (ppc_size_one_stub): Set group tls_get_addr_opt_bctrl.
816 (group_sections): Init group tls_get_addr_opt_bctrl.
817 (ppc64_elf_size_stubs): Update sizing and initialization of
818 .eh_frame. Iteration over stubs via group list.
819 (ppc64_elf_build_stubs): Iterate over stubs via group list.
820 (ppc64_elf_finish_dynamic_sections): Update finalization of
823 2017-07-24 Nick Clifton <nickc@redhat.com>
826 * mach-o.c (bfd_mach_o_canonicalize_relocs): Pass the base address
827 of the relocs to the canonicalize_one_reloc routine.
828 * mach-o.h (struct bfd_mach_o_backend_data): Update the prototype
829 for the _bfd_mach_o_canonicalize_one_reloc field.
830 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add
831 res_base parameter. Use to check for corrupt pair relocs.
832 * mach-o-aarch64.c (bfd_mach_o_arm64_canonicalize_one_reloc):
834 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc):
836 * mach-o-x86-64.c (bfd_mach_o_x86_64_canonicalize_one_reloc):
839 * vms-alpha.c (_bfd_vms_slurp_eihd): Make sure that there is
840 enough data in the record before attempting to parse it.
841 (_bfd_vms_slurp_eeom): Likewise.
843 (_bfd_vms_slurp_egsd): Check for an invalid section index.
844 (image_set_ptr): Likewise.
845 (alpha_vms_slurp_relocs): Likewise.
847 (alpha_vms_object_p): Check for a truncated record.
849 2017-07-24 Nick Clifton <nickc@redhat.com>
852 * reloc.c (_bfd_unrecognized_reloc): New function. Reports
853 an unrecognized reloc and sets the bfd_error value.
854 * libbfd.h: Regenerate.
855 * elf32-arm.c (elf32_arm_final_link_relocate): Use the new
857 * elf32-i386.c (elf_i386_relocate_section): Likewise.
858 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
859 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
860 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.
861 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
863 2017-07-23 Alan Modra <amodra@gmail.com>
865 * elf64-ppc.c (ppc64_elf_size_stubs): Correct advance to
868 2017-07-19 Szabolcs Nagy <szabolcs.nagy@arm.com>
871 * elfnn-aarch64.c (elfNN_aarch64_reloc_type_class): Return
872 reloc_class_ifunc for ifunc symbols.
874 2017-07-19 Nick Clifton <nickc@redhat.com>
877 * archive.c (bfd_generic_archive_p): If the bfd does not have the
878 correct magic bytes at the start, set the error to wrong format
879 and clear the format selector before returning NULL.
881 2017-07-19 Nick Clifton <nickc@redhat.com>
884 * coff-rs6000.c (_bfd_strntol): New function.
885 (_bfd_strntoll): New function.
886 (GET_VALUE_IN_FIELD): New macro.
887 (EQ_VALUE_IN_FIELD): new macro.
888 (_bfd_xcoff_slurp_armap): Use new macros.
889 (_bfd_xcoff_archive_p): Likewise.
890 (_bfd_xcoff_read_ar_hdr): Likewise.
891 (_bfd_xcoff_openr_next_archived_file): Likewise.
892 (_bfd_xcoff_stat_arch_elt): Likewise.
893 * coff64-rs6000.c (_bfd_strntol): New function.
894 (_bfd_strntoll): New function.
895 (GET_VALUE_IN_FIELD): New macro.
896 (xcoff64_slurp_armap): Use new macros.
898 2017-07-19 Claudiu Zissulescu <claziss@synopsys.com>
899 John Eric Martin <John.Martin@emmicro-us.com>
901 * bfd-in2.h: Regenerate.
902 * libbfd.h: Regenerate.
903 * elf32-arc.c (JLI): Define.
904 * reloc.c: Add JLI relocations.
906 2017-07-18 Nick Clifton <nickc@redhat.com>
909 * coff-sh.c: Fix spelling typos.
910 * compress.c: Likewise.
911 * cpu-pdp11.c: Likewise.
912 * ecofflink.c: Likewise.
913 * elf-m10300.c: Likewise.
915 * elf32-arm.c: Likewise.
916 * elf32-m68k.c: Likewise.
917 * elf32-nds32.c: Likewise.
918 * elf32-ppc.c: Likewise.
919 * elf32-sh.c: Likewise.
920 * elf32-v850.c: Likewise.
921 * elf64-ppc.c: Likewise.
922 * elf64-x86-64.c: Likewise.
923 * elflink.c: Likewise.
924 * elfnn-aarch64.c: Likewise.
925 * elfxx-mips.c: Likewise.
928 * vms-alpha.c: Likewise.
929 * xcofflink.c: Likewise.
931 2017-07-18 Nick Clifton <nickc@redhat.com>
934 * coffcode.h (handle_COMDAT): Replace abort with an error message
937 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
940 * elf64-x86-64.c (elf_x86_64_relocate_section): Limit PIC check
943 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
945 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
947 2017-07-16 Alan Modra <amodra@gmail.com>
949 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimize
950 __tls_index GOT entries when using __tls_get_addr_opt stub.
951 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
953 2017-07-12 Alan Modra <amodra@gmail.com>
955 * po/es.po: Update from translationproject.org/latest/bfd/.
956 * po/fi.po: Likewise.
957 * po/fr.po: Likewise.
958 * po/id.po: Likewise.
959 * po/ja.po: Likewise.
960 * po/ro.po: Likewise.
961 * po/ru.po: Likewise.
962 * po/sr.po: Likewise.
963 * po/sv.po: Likewise.
964 * po/tr.po: Likewise.
965 * po/uk.po: Likewise.
966 * po/vi.po: Likewise.
967 * po/zh_CN.po: Likewise.
968 * po/hr.po: New file from translationproject.org.
969 * configure.ac (ALL_LINGUAS): Add hr. Sort.
970 * configure: Regenerate.
972 2017-07-12 Nick Clifton <nickc@redhat.com>
974 Fix compile time warnings using gcc 7.1.1.
975 * elf32-xtensa.c (elf_xtensa_get_plt_section): Increase length of
977 (elf_xtensa_get_gotplt_section): Increase length of got_name
979 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add a
980 default return of FALSE.
981 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc): Add a
982 default return of FALSE.
984 2017-07-12 Alan Modra <amodra@gmail.com>
986 * binary.c (binary_set_section_contents): Don't print filepos in
988 (coff_write_object_contents): Cast size_t for error message.
989 (coff_slurp_line_table): Don't use bfd_vma symndx.
990 (coff_slurp_reloc_table): Remove unneeded cast.
991 * dwarf2.c (read_section): Cast bfd_int64_t to long long for
993 (find_abstract_instance_name): Likewise.
994 * elf32-arm.c (arm_type_of_stub): Correct error arg order.
995 (bfd_elf32_arm_stm32l4xx_erratum_scan): Don't cast error arg.
996 (elf32_arm_check_relocs): Make r_symndx an int.
997 * elf32-cris.c (cris_elf_check_relocs): Delete extraneous %s in
999 * elf32-metag.c (elf_metag_relocate_section): Delete extra error
1001 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Rewrite bogus
1003 * elf32-i386.c (elf_i386_check_relocs): Make r_symndx an int.
1004 * elf32-s390.c (elf_s390_check_relocs): Likewise.
1005 * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
1006 * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
1007 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
1008 * elf64-s390.c (elf_s390_check_relocs): Likewise.
1009 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1010 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
1011 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
1012 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
1013 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
1014 * elf64-mmix.c (_bfd_mmix_after_linker_allocation): Cast size_t args
1015 and use %lu for error message.
1016 * elflink.c (elf_link_adjust_relocs): Delete extra error message arg.
1017 * mmo.c (mmo_scan): Make stab_loc a file_ptr. Cast expression for
1020 * elf32-arm.c (elf32_arm_tls_relax): Correct format string and args
1022 (elf32_arm_final_link_relocate): Likewise.
1023 * coff-arm.c (bfd_arm_process_before_allocation): Likewise.
1024 * coffcode.h (styp_to_sec_flags): Likewise.
1025 * cofflink.c (_bfd_coff_write_global_sym): Likewise.
1026 * ecoff.c (_bfd_ecoff_slurp_symbol_table): Likewise.
1027 * elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise.
1028 * elf32-bfin.c (bfinfdpic_check_relocs): Likewise.
1029 (elf32_bfin_merge_private_bfd_data): Likewise.
1030 * elf32-cris.c (cris_elf_relocate_section): Likewise.
1031 * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
1032 * elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise.
1033 (i370_elf_relocate_section): Likewise.
1034 * elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise.
1035 * elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise.
1036 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
1037 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
1038 * elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise.
1039 * elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise.
1040 * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
1041 * elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise.
1042 (_bfd_mips_elf_merge_private_bfd_data): Likewise.
1043 * ieee.c (ieee_write_id, read_id): Likewise.
1044 * mach-o.c (bfd_mach_o_write_contents): Likewise.
1045 (bfd_mach_o_layout_commands, bfd_mach_o_read_section_32): Likewise.
1046 (bfd_mach_o_read_section_64, bfd_mach_o_read_symtab_symbol): Likewise.
1047 (bfd_mach_o_read_command, bfd_mach_o_header_p): Likewise.
1048 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Likewise.
1049 * stabs.c (_bfd_link_section_stabs): Likewise.
1051 * coff-arm.c (coff_arm_relocate_section): Use L modifier in error
1053 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
1054 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
1055 * coff-rs6000.c (xcoff_reloc_type_toc): Likewise.
1056 * coff-sh.c (sh_relax_section): Likewise.
1057 (sh_relax_delete_bytes, sh_swap_insns): Likewise.
1058 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
1059 * coffcode.h (coff_slurp_reloc_table): Likewise.
1060 * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
1061 (_bfd_coff_read_string_table): Likewise.
1062 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
1063 * compress.c (bfd_get_full_section_contents): Likewise.
1064 * dwarf2.c (read_formatted_entries, decode_line_info): Likewise.
1065 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
1066 * elf.c (bfd_elf_string_from_elf_section): Likewise.
1067 * elf32-arc.c (arc_special_overflow_checks): Likewise.
1068 * elf32-arm.c (elf32_arm_tls_relax): Likewise.
1069 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Likewise.
1070 (elf32_arm_write_section): Likewise.
1071 * elf32-bfin.c (bfin_relocate_section): Likewise.
1072 (bfinfdpic_relocate_section): Likewise.
1073 * elf32-hppa.c (hppa_build_one_stub): Likewise.
1074 (final_link_relocate, elf32_hppa_relocate_section): Likewise.
1075 * elf32-i386.c (elf_i386_tls_transition): Likewise.
1076 (elf_i386_relocate_section): Likewise.
1077 * elf32-ip2k.c (ip2k_final_link_relocate): Likewise.
1078 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
1079 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
1080 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1081 * elf32-metag.c (elf_metag_relocate_section): Likewise.
1082 * elf32-nds32.c (unrecognized_reloc_msg): Likewise.
1083 (nds32_elf_relax_longcall1, nds32_elf_relax_longcall2): Likewise.
1084 (nds32_elf_relax_longcall3, nds32_elf_relax_longjump1): Likewise.
1085 (nds32_elf_relax_longjump2, nds32_elf_relax_longjump3): Likewise.
1086 (nds32_elf_relax_longcall4, nds32_elf_relax_longcall5): Likewise.
1087 (nds32_elf_relax_longcall6, nds32_elf_relax_longjump4): Likewise.
1088 (nds32_elf_relax_longjump5, nds32_elf_relax_longjump6): Likewise.
1089 (nds32_elf_relax_longjump7, nds32_elf_relax_loadstore): Likewise.
1090 (nds32_elf_relax_ptr, nds32_elf_ex9_build_hash_table): Likewise.
1091 * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
1092 * elf32-rx.c (UNSAFE_FOR_PID): Likewise.
1093 * elf32-s390.c (invalid_tls_insn, elf_s390_relocate_section): Likewise.
1094 * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
1095 * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
1096 * elf32-sh.c (sh_elf_relax_section): Likewise.
1097 (sh_elf_relax_delete_bytes, sh_elf_swap_insns): Likewise.
1098 (sh_elf_relocate_section): Likewise.
1099 * elf32-sh64.c (shmedia_prepare_reloc): Likewise.
1100 * elf32-spu.c (spu_elf_relocate_section): Likewise.
1101 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
1102 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
1103 * elf32-v850.c (v850_elf_relax_section): Likewise.
1104 * elf32-vax.c (elf_vax_check_relocs): Likewise.
1105 (elf_vax_relocate_section): Likewise.
1106 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
1107 (extend_ebb_bounds_forward, extend_ebb_bounds_backward): Likewise.
1108 (compute_text_actions, compute_ebb_proposed_actions): Likewise.
1109 (do_fix_for_relocatable_link): Likewise.
1110 * elf64-alpha.c (elf64_alpha_relax_got_load): Likewise.
1111 (elf64_alpha_relax_with_lituse): Likewise.
1112 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Likewise.
1113 (elf_hppa_final_link_relocate): Likewise.
1114 * elf64-ia64-vms.c (elf64_ia64_relax_section): Likewise.
1115 (elf64_ia64_choose_gp, elf64_ia64_relocate_section): Likewise.
1116 (elf64_vms_link_add_object_symbols): Likewise.
1117 * elf64-mmix.c (mmix_elf_perform_relocation): Likewise.
1118 (mmix_final_link_relocate): Likewise.
1119 * elf64-s390.c (invalid_tls_insn): Likewise.
1120 (elf_s390_relocate_section): Likewise.
1121 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
1122 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
1123 (elf_x86_64_relocate_section): Likewise.
1124 * elfcode.h (elf_slurp_symbol_table): Likewise.
1125 * elfcore.h (elf_core_file_p): Likewise.
1126 * elflink.c (elf_link_read_relocs_from_section): Likewise.
1127 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
1128 (elfNN_aarch64_relocate_section): Likewise.
1129 * elfnn-ia64.c (elfNN_ia64_relax_section): Likewise.
1130 (elfNN_ia64_choose_gp, elfNN_ia64_relocate_section): Likewise.
1131 * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
1132 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
1133 (_bfd_mips_elf_relocate_section): Likewise.
1134 (_bfd_mips_elf_finish_dynamic_symbol, mips_finish_exec_plt): Likewise.
1135 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
1136 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
1137 * ieee.c (ieee_slurp_external_symbols): Likewise.
1138 * ihex.c (ihex_write_object_content): Likewise.
1139 * mach-o.c (bfd_mach_o_build_exec_seg_command): Likewise.
1140 * merge.c (_bfd_merged_section_offset): Likewise.
1141 * mmo.c (mmo_write_loc_chunk): Likewise.
1142 (mmo_write_object_contents): Likewise.
1143 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Likewise.
1144 * stabs.c (_bfd_link_section_stabs): Likewise.
1145 * xcofflink.c (xcoff_link_add_symbols, xcoff_find_tc0): Likewise.
1147 2017-07-11 Alan Modra <amodra@gmail.com>
1149 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo.
1151 2017-07-11 Alan Modra <amodra@gmail.com>
1153 * elf32-ppc.c (ppc_elf_relocate_section): Emit "unexpected
1154 instruction" error using _bfd_error_handler, not einfo.
1156 2017-07-10 Nick Clifton <nickc@redhat.com>
1158 * coffcode.h (coff_slurp_symbol_table): Do not include an entry
1159 for C_AIX_WEAKEXT if it has the same value as C_WEAKEXT.
1161 2017-07-07 John Baldwin <jhb@FreeBSD.org>
1163 * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PTLWPINFO.
1165 2017-07-07 Alan Modra <amodra@gmail.com>
1167 * coffcode.h (coff_slurp_symbol_table): Handle C_AIX_WEAKEXT.
1169 2017-07-07 Alan Modra <amodra@gmail.com>
1171 * bfd.c (_doprnt): Replace "L" with "ll" when printing bfd_vma
1172 as long long. Move code replacing "ll" with "I64", and simplify.
1174 2017-07-06 H.J. Lu <hongjiu.lu@intel.com>
1176 * bfd.c (_doprnt): Convert 'L' to 'l' when setting wide_width
1179 2017-07-05 H.J. Lu <hongjiu.lu@intel.com>
1181 * dwarf2.c (line_info_add_include_dir_stub): Replace time with
1183 (line_info_add_file_name): Likewise.
1184 (decode_line_info): Likewise.
1186 2017-07-04 Tristan Gingold <gingold@adacore.com>
1188 * version.m4: Bump version to 2.29.51
1189 * configure: Regenerate.
1191 2017-07-04 Jiong Wang <jiong.wang@arm.com>
1193 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Remove the
1194 sanity check at the head of this function.
1196 2017-07-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1198 * dwarf2.c (struct dwarf2_debug): Add fields dwarf_line_str_buffer and
1199 dwarf_line_str_size.
1200 (struct attr_abbrev): Add field implicit_const.
1201 (dwarf_debug_sections): Add .debug_line_str.
1202 (enum dwarf_debug_section_enum): Add debug_line_str and debug_max.
1203 (dwarf_debug_section_assert): Add static assertion.
1204 (read_indirect_line_string): New.
1205 (read_abbrevs): Support DW_FORM_implicit_const.
1206 (is_str_attr): Support DW_FORM_line_strp.
1207 (read_attribute_value): Support DW_FORM_line_strp and
1208 DW_FORM_implicit_const.
1209 (read_attribute): Support DW_FORM_implicit_const.
1210 (line_info_add_include_dir, line_info_add_include_dir_stub):
1211 (line_info_add_file_name, read_formatted_entries): New.
1212 (decode_line_info, parse_comp_unit): Support DWARF 5.
1213 (_bfd_dwarf2_cleanup_debug_info): Free dwarf_line_str_buffer.
1215 2017-07-03 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
1217 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove the
1218 abort statement that was put for symbols that are not dynamic.
1220 2017-07-03 Tristan Gingold <gingold@adacore.com>
1222 * po/bfd.pot: Regenerate
1224 2017-07-03 Alan Modra <amodra@gmail.com>
1226 * bfd.c (_doprnt): Rewrite "ll" and "L" modifiers to "I64" for
1227 __MSVCRT__. Support "L" modifier for bfd_vma. Formatting.
1228 * elf.c (setup_group): Use "Lx" to print sh_size.
1229 (_bfd_elf_setup_sections): Remove unnecessary cast and print
1230 unknown section type in hex.
1231 (copy_special_section_fields): Style fix.
1232 (bfd_section_from_shdr): Correct format for sh_link. Use a
1233 common error message for all the variants of unrecognized
1235 (assign_file_positions_for_load_sections): Use "Lx" for lma
1236 adjust error message.
1237 (assign_file_positions_for_non_load_sections): Formatting.
1238 (rewrite_elf_program_header): Formatting. Use "Lx" for
1239 bfd_vma values in error messages.
1240 * elfcode.h (elf_slurp_reloc_table_from_section): Cast
1241 ELF_R_SYM value to type expected by format.
1242 * elflink.c (elf_link_read_relocs_from_section): Use "Lx"
1244 (elf_link_add_object_symbols): Use "Lu" for symbol sizes.
1245 (elf_link_input_bfd): Use "Lx" for r_info.
1246 (bfd_elf_gc_record_vtinherit): Use "Lx" for offset.
1248 2017-07-03 Alan Modra <amodra@gmail.com>
1250 * bfd.c (bfd_scan_vma): Don't use long long unless HAVE_LONG_LONG.
1251 * coff-rs6000.c (FMT20): Handle hosts with 64-bit long and
1252 Microsoft C library variant of long long format specifier.
1253 (PRINT20): Cast value to bfd_uint64_t not long long.
1254 * coffcode.h (coff_print_aux): Use BFD_VMA_FMT.
1255 * coff-x86_64.c (coff_amd64_reloc): Use bfd_uint64_t rather than
1256 long long. Don't cast to bfd_vma.
1257 * elf32-score.c (score3_bfd_getl48): Likewise.
1258 * vms-alpha.c (_bfd_vms_slurp_eisd): Likewise.
1260 2017-07-03 Alan Modra <amodra@gmail.com>
1262 * elf.c (_bfd_elf_print_private_bfd_data): Use BFD_VMA_FMT to
1264 (bfd_elf_print_symbol): Don't cast symbol->flags.
1265 (_bfd_elf_symbol_from_bfd_symbol): Likewise.
1266 * elf32-ppc.c (ppc_elf_begin_write_processing): Correct
1267 _bfd_error_handler argument order.
1268 (ppc_elf_merge_private_bfd_data): Don't cast flags.
1270 2017-07-03 Alan Modra <amodra@gmail.com>
1272 * configure.ac: Invoke AC_CHECK_TYPES for long long. Invoke
1273 AC_TYPE_LONG_DOUBLE.
1274 * configure: Regenerate.
1275 * config.in: Regenerate.
1277 2017-06-29 Andrew Waterman <andrew@sifive.com>
1279 * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Fix TLS copy
1282 2017-06-29 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
1284 * elfxx-sparc.c (allocate_dynrelocs): Don't make a symbol dynamic
1285 unless it is undefined weak.
1286 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Set the flag
1287 relative_reloc to direct non-dynamic symbols to R_SPARC_RELATIVE
1289 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): If symbol
1290 is not dynamic in PIC, abort.
1292 2017-06-29 Jiong Wang <jiong.wang@arm.com>
1295 * elfnn-aarch64.c (elfNN_aarch64_allocate_dynrelocs): Only make
1296 undefined weak symbols into dynamic.
1297 (elfNN_aarch64_final_link_relocate): Generate runtime RELATIVE
1298 relocation for non-dynamic symbols.
1299 (elfNN_aarch64_finish_dynamic_symbol): Add sanity check.
1301 2017-06-29 Jiong Wang <jiong.wang@arm.com>
1303 * elfnn-aarch64.c (aarch64_relocation_aginst_gp_p): New function.
1304 (elfNN_aarch64_final_link_relocate): Delete duplicated code for
1305 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15, BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
1306 BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
1307 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Optimize the
1310 2017-06-29 Andreas Arnez <arnez@linux.vnet.ibm.com>
1312 * elf-bfd.h (elfcore_write_s390_gs_cb): Add prototype.
1313 (elfcore_write_s390_gs_bc): Likewise.
1314 * elf.c (elfcore_grok_s390_gs_cb): New function.
1315 (elfcore_grok_s390_gs_bc): New function.
1316 (elfcore_grok_note): Call them.
1317 (elfcore_write_s390_gs_cb): New function.
1318 (elfcore_write_s390_gs_bc): New function.
1319 (elfcore_write_register_note): Call them.
1321 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
1323 * libbfd.c (_bfd_generic_get_section_contents): Don't call
1324 bfd_get_file_size. Check archive element size.
1325 (_bfd_generic_get_section_contents_in_window): Likewise.
1327 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
1329 * bfd-in2.h: Regenerated.
1330 * bfdio.c (bfd_get_size): Change return type to ufile_ptr.
1331 (bfd_get_file_size): Likewise.
1333 2017-06-28 Maciej W. Rozycki <macro@imgtec.com>
1334 Matthew Fortune <matthew.fortune@imgtec.com>
1336 * archures.c (bfd_mach_mips_interaptiv_mr2): New macro.
1337 * cpu-mips.c (I_interaptiv_mr2): New enum value.
1338 (arch_info_struct): Add "mips:interaptiv-mr2" entry.
1339 * elfxx-mips.c (_bfd_elf_mips_mach) <E_MIPS_MACH_IAMR2>: New
1341 (mips_set_isa_flags) <bfd_mach_mips_interaptiv_mr2>: Likewise.
1342 (bfd_mips_isa_ext) <bfd_mach_mips_interaptiv_mr2>: Likewise.
1343 (print_mips_isa_ext) <AFL_EXT_INTERAPTIV_MR2>: Likewise.
1344 (mips_mach_extensions): Add `bfd_mach_mipsisa32r3' and
1345 `bfd_mach_mips_interaptiv_mr2' entries.
1346 * bfd-in2.h: Regenerate.
1348 2017-06-27 Nick Clifton <nickc@redhat.com>
1350 * tekhex.c (pass_over): Revert accidental conversion of a local
1351 array to a static array.
1353 2017-06-27 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
1356 * elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Adjust
1357 reloc addend if necessary. Adjust diff only if
1358 shrinked_insn_address < end_address.
1360 2017-06-27 Alan Modra <amodra@gmail.com>
1363 * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
1364 (_bfd_generic_get_section_contents_in_window): Likewise.
1366 2017-06-26 Kuan-Lin Chen <rufus@andestech.com>
1368 * elfnn-riscv.c (perform_relocation): Support the new
1369 R_RISCV_32_PCREL relocation.
1370 (riscv_elf_relocate_section): Likewise.
1371 * elfxx-riscv.c (howto_table): Likewise.
1372 (riscv_reloc_map): Likewise.
1373 * bfd-in2.h (BFD_RELOC_RISCV_32_PCREL): New relocation.
1374 * libbfd.h: Regenerate.
1376 2017-06-27 Alan Modra <amodra@gmail.com>
1379 * libbfd.c (_bfd_generic_get_section_contents): Delete abort.
1380 Use unsigned file pointer type, and remove cast.
1381 * libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise.
1382 Add "count", not "sz".
1384 2017-06-26 Pedro Alves <palves@redhat.com>
1387 * libbfd.c (_bfd_generic_get_section_contents): Add "count", not
1390 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
1393 * libbfd.c (_bfd_generic_get_section_contents_in_window): Add
1396 2017-06-26 Maciej W. Rozycki <macro@imgtec.com>
1398 * cpu-mips.c (arch_info_struct): Mark the 4010 32-bit.
1399 * elfxx-mips.c (mips_set_isa_flags) <bfd_mach_mips4010>: Set
1400 E_MIPS_ARCH_2 rather than E_MIPS_ARCH_3 in `e_flags'.
1401 (mips_mach_extensions): Mark `bfd_mach_mips4010' as extending
1402 `bfd_mach_mips6000' rather than `bfd_mach_mips4000'.
1404 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
1407 * compress.c (bfd_get_full_section_contents): Don't check the
1409 * libbfd.c (_bfd_generic_get_section_contents): Check for and
1410 reject a section whose size + offset is greater than the size
1412 (_bfd_generic_get_section_contents_in_window): Likewise.
1414 2017-06-26 Nick Clifton <nickc@redhat.com>
1417 * tekhex.c (getvalue): Check for the source pointer exceeding the
1418 end pointer before the first byte is read.
1420 2017-06-26 Nick Clifton <nickc@redhat.com>
1423 * opncls.c (get_build_id): Check that the section is big enough
1424 to contain the whole note.
1425 * compress.c (bfd_get_full_section_contents): Check for and reject
1426 a section whose size is greater than the size of the entire file.
1427 * elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not
1428 contain a notes section.
1430 2017-06-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1432 * elf64-s390.c (elf_s390_additional_program_headers): Add NULL
1434 (elf_s390_modify_segment_map): Likewise.
1435 (bfd_elf_s390_set_options): Lisewise.
1437 2017-06-26 Alan Modra <amodra@gmail.com>
1439 * elflink.c (_bfd_elf_link_create_dynstrtab): Don't make dynobj
1441 (_bfd_elf_size_group_sections): Skip --just-syms bfds.
1442 (bfd_elf_size_dynamic_sections): Ignore .note.GNU-stack and
1443 .preinit_array on --just-syms bfds.
1444 (_bfd_elf_gc_mark_extra_sections): Skip --just-syms bfds.
1445 (elf_gc_sweep, bfd_elf_parse_eh_frame_entries): Likewise.
1446 (bfd_elf_gc_sections, bfd_elf_discard_info): Likewise.
1448 2017-06-25 Sergei Trofimovich <slyfox@gentoo.org>
1450 * elf.c (find_link): Bounds check "hint".
1452 2017-06-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
1454 * elf32-arm.c (using_thumb_only): Update list of architectures in
1455 BFD_ASSERT for which the logic is valid.
1456 (using_thumb2_bl): Likewise.
1457 (using_thumb2): Likewise and return true for ARMv8-R.
1458 (arch_has_arm_nop): Likewise.
1459 (tag_cpu_arch_combine): New v8r table for ARMv8-R Tag_CPU_arch
1460 merging logic. Update commentis for value 15 of v8m_baseline,
1461 v8m_mainline and v4t_plus_v6_m arrays. Use v8r array to decide
1462 merging of value 15 of Tag_CPU_arch.
1464 2017-06-23 Jiong Wang <jiong.wang@arm.com>
1466 * reloc.c (BFD_RELOC_AARCH64_ADR_GOTPAGE): Rename to
1467 BFD_RELOC_AARCH64_ADR_GOT_PAGE
1468 * bfd-in2.h: Regenerate.
1470 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1472 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Move
1473 the error_alignment label forward. Properly align program
1474 property note section.
1476 2017-06-22 Eric Christopher <echristo@gmail.com>
1478 * elf32-arm.c (elf32_arm_final_link_relocate): Use labs rather than
1479 abs to fix a truncation warning.
1481 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1483 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Resolve
1484 local undefined weak symbol to 0.
1485 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Likewise.
1487 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1489 * elf32-i386.c (elf_i386_merge_gnu_properties): If info->shstk
1490 is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
1491 (elf_i386_link_setup_gnu_properties): If info->shstk is set,
1492 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
1493 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): If
1494 info->shstk is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
1495 (elf_x86_64_link_setup_gnu_properties): If info->shstk is set,
1496 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
1498 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1500 * elf32-i386.c (elf_i386_lazy_ibt_plt0_entry): New.
1501 (elf_i386_lazy_ibt_plt_entry): Likewise.
1502 (elf_i386_pic_lazy_ibt_plt0_entry): Likewise.
1503 (elf_i386_non_lazy_ibt_plt_entry): Likewise.
1504 (elf_i386_pic_non_lazy_ibt_plt_entry): Likewise.
1505 (elf_i386_eh_frame_lazy_ibt_plt): Likewise.
1506 (elf_i386_lazy_plt_layout): Likewise.
1507 (elf_i386_non_lazy_plt_layout): Likewise.
1508 (elf_i386_link_hash_entry): Add plt_second.
1509 (elf_i386_link_hash_table): Add plt_second and
1510 plt_second_eh_frame.
1511 (elf_i386_allocate_dynrelocs): Use the second PLT if needed.
1512 (elf_i386_size_dynamic_sections): Use .plt.got unwind info for
1513 the second PLT. Check the second PLT.
1514 (elf_i386_relocate_section): Use the second PLT to resolve
1515 PLT reference if needed.
1516 (elf_i386_finish_dynamic_symbol): Fill and use the second PLT if
1518 (elf_i386_finish_dynamic_sections): Set sh_entsize on the
1519 second PLT. Generate unwind info for the second PLT.
1520 (elf_i386_plt_type): Add plt_second.
1521 (elf_i386_get_synthetic_symtab): Support the second PLT.
1522 (elf_i386_parse_gnu_properties): Support
1523 GNU_PROPERTY_X86_FEATURE_1_AND.
1524 (elf_i386_merge_gnu_properties): Support
1525 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
1526 on GNU_PROPERTY_X86_FEATURE_1_IBT
1527 (elf_i386_link_setup_gnu_properties): If info->ibt is set,
1528 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
1529 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
1530 is set on all relocatable inputs.
1531 * elf64-x86-64.c (elf_x86_64_lazy_ibt_plt_entry): New.
1532 (elf_x32_lazy_ibt_plt_entry): Likewise.
1533 (elf_x86_64_non_lazy_ibt_plt_entry): Likewise.
1534 (elf_x32_non_lazy_ibt_plt_entry): Likewise.
1535 (elf_x86_64_eh_frame_lazy_ibt_plt): Likewise.
1536 (elf_x32_eh_frame_lazy_ibt_plt): Likewise.
1537 (elf_x86_64_lazy_ibt_plt): Likewise.
1538 (elf_x32_lazy_ibt_plt): Likewise.
1539 (elf_x86_64_non_lazy_ibt_plt): Likewise.
1540 (elf_x32_non_lazy_ibt_plt): Likewise.
1541 (elf_x86_64_get_synthetic_symtab): Support the second PLT.
1542 (elf_x86_64_parse_gnu_properties): Support
1543 GNU_PROPERTY_X86_FEATURE_1_AND.
1544 (elf_x86_64_merge_gnu_properties): Support
1545 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
1546 on GNU_PROPERTY_X86_FEATURE_1_IBT
1547 (elf_x86_64_link_setup_gnu_properties): If info->ibt is set,
1548 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
1549 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
1550 is set on all relocatable inputs.
1552 2017-06-22 Nick Clifton <nickc@redhat.com>
1555 * som.c (setup_sections): NUL terminate the space_strings buffer.
1556 Check that the space.name field does not index beyond the end of
1557 the space_strings buffer.
1559 2017-06-21 Nick Clifton <nickc@redhat.com>
1562 * coff-sh.c (sh_reloc): Check for an out of range reloc.
1564 2017-06-21 Nick Clifton <nickc@redhat.com>
1567 * vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as
1568 type of the size parameter.
1569 (_bfd_vms_save_counted_string): Add second parameter - the maximum
1570 length of the counted string.
1571 * vms.h (_bfd_vms_save_sized_string): Update prototype.
1572 (_bfd_vms_save_counted_string): Likewise.
1573 * vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to
1574 _bfd_vms_save_counted_string.
1575 (_bfd_vms_slurp_ehdr): Likewise.
1576 (_bfd_vms_slurp_egsd): Likewise.
1577 (Parse_module): Likewise.
1579 2017-06-21 Alan Modra <amodra@gmail.com>
1581 * elf64-ppc.c (ppc64_elf_size_stubs): Test for localentry:0 plt
1582 calls before tocsave calls.
1583 (ppc64_elf_relocate_section): Allow localentry:0 plt calls without
1586 2017-06-21 Nick Clifton <nickc@redhat.com>
1589 * reloc.c (bfd_generic_get_relocated_section_contents): Fail if
1590 bfd_get_full_section_contents returns no contents.
1592 2017-06-21 Nick Clifton <nickc@redhat.com>
1595 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized
1598 2017-06-21 Nick Clifton <nickc@redhat.com>
1601 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section
1603 (image_set_ptr): Likewise.
1604 (alpha_vms_fix_sec_rel): Likewise.
1605 (alpha_vms_slurp_relocs): Likewise.
1607 2017-06-21 Nick Clifton <nickc@redhat.com>
1610 * ieee.c (ieee_slurp_sections): Check for a NULL return from
1612 (ieee_archive_p): Likewise.
1613 (ieee_object_p): Likewise.
1615 2017-06-21 Nick Clifton <nickc@redhat.com>
1618 * elf.c (setup_group): Zero the group section pointer list after
1619 allocation so that loops can be caught. Check for NULL pointers
1620 when processing a group list.
1622 2017-06-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1624 * elf-s390.h: New file.
1625 * elf64-s390.c (struct elf_s390_link_hash_table): Add params
1627 (elf_s390_additional_program_headers): New function.
1628 (elf_s390_modify_segment_map): New function.
1629 (bfd_elf_s390_set_options): New function.
1630 (elf_backend_additional_program_headers)
1631 (elf_backend_modify_segment_map): Add macro definitions.
1633 2017-06-19 H.J. Lu <hongjiu.lu@intel.com>
1636 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
1637 the DYNAMIC bit instead of bfd_count_sections.
1639 2017-06-19 Nick Clifton <nickc@redhat.com>
1642 * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record
1644 (evax_bfd_print_eeom): Likewise.
1645 (evax_bfd_print_egsd): Check for an overlarge record length.
1646 (evax_bfd_print_etir): Likewise.
1648 2017-06-19 Nick Clifton <nickc@redhat.com>
1651 * libieee.h (struct common_header_type): Add end_p field.
1652 * ieee.c (this_byte_and_next): Do not advance input_p beyond
1654 (read_id): Check for a length that exceeds the remaining bytes in
1656 (ieee_seek): Initialise end_p.
1657 (ieee_archive_p): Likewise.
1658 (ieee_object_p): Likewise.
1660 2017-06-19 Nick Clifton <nickc@redhat.com>
1663 * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset
1664 before reading the EIHS structure entries.
1666 2017-06-19 Nick Clifton <nickc@redhat.com>
1669 * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for
1670 gsd_size. Check that there are enough bytes remaining to read the
1671 type and size of the next egsd. Check that the size of the egsd
1672 does not exceed the size of the record.
1674 2017-06-19 Alan Modra <amodra@gmail.com>
1676 * config.bfd: Correct targ_underscore for cris.
1678 2017-06-18 Alan Modra <amodra@gmail.com>
1680 * config.bfd: Correct targ_underscore for epiphany, ip2k,
1681 m32c, mn10200, pru, rl78, rx, crisv32 and v850.
1683 2017-06-16 Nick Clifton <nickc@redhat.com>
1685 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
1686 bucketlist is empty because there are no symbols to add to the
1689 2017-06-16 Alan Modra <amodra@gmail.com>
1695 * targets.c (struct bfd_target): Add _bfd_define_start_stop.
1696 (BFD_JUMP_TABLE_LINK): Likewise.
1697 * elf-bfd.h (bfd_elf_define_start_stop): Declare.
1698 * elflink.c (_bfd_elf_gc_mark_rsec): Update comment.
1699 (bfd_elf_define_start_stop): New function.
1700 * linker.c (bfd_generic_define_start_stop): New function.
1701 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init
1703 * aout-adobe.c (aout_32_bfd_define_start_stop): Define.
1704 * aout-target.h (MY_bfd_define_start_stop): Define.
1705 * aout-tic30.c (MY_bfd_define_start_stop): Define.
1706 * binary.c (binary_bfd_define_start_stop): Define.
1707 * bout.c (b_out_bfd_define_start_stop): Define.
1708 * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define.
1709 * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define.
1710 * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define.
1711 * coffcode.h (coff_bfd_define_start_stop): Define.
1712 * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define.
1713 * i386msdos.c (msdos_bfd_define_start_stop): Define.
1714 * i386os9k.c (os9k_bfd_define_start_stop): Define.
1715 * ieee.c (ieee_bfd_define_start_stop): Define.
1716 * ihex.c (ihex_bfd_define_start_stop): Define.
1717 * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define.
1718 * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define.
1719 * mmo.c (mmo_bfd_define_start_stop): Define.
1720 * nlm-target.h (nlm_bfd_define_start_stop): Define.
1721 * oasys.c (oasys_bfd_define_start_stop): Define.
1722 * pef.c (bfd_pef_bfd_define_start_stop): Define.
1723 * plugin.c (bfd_plugin_bfd_define_start_stop): Define.
1724 * ppcboot.c (ppcboot_bfd_define_start_stop): Define.
1725 * som.c (som_bfd_define_start_stop): Define.
1726 * srec.c (srec_bfd_define_start_stop): Define.
1727 * tekhex.c (tekhex_bfd_define_start_stop): Define.
1728 * versados.c (versados_bfd_define_start_stop): Define.
1729 * vms-alpha.c (vms_bfd_define_start_stop): Define.
1730 (alpha_vms_bfd_define_start_stop): Define.
1731 * xsym.c (bfd_sym_bfd_define_start_stop): Define.
1732 * bfd-in2.h: Regenerate.
1733 * libbfd.h: Regenerate.
1735 2017-06-16 Jiong Wang <jiong.wang@arm.com>
1737 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
1738 SYMBOL_REFERENCES_LOCAL.
1740 2017-06-15 Jiong Wang <jiong.wang@arm.com>
1743 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
1744 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
1745 runtime for if there needs copy relocation elimination.
1746 (need_copy_relocation_p): New function. Return true for symbol with
1747 pc-relative references and if it's against read-only sections.
1748 (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
1749 (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
1750 that are related with accessing external objects.
1751 (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change
1752 in elfNN_aarch64_check_relocs.
1754 2017-06-15 Nick Clifton <nickc@redhat.com>
1757 * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
1760 (ieee_archive_p): Likewise.
1762 2017-06-15 Nick Clifton <nickc@redhat.com>
1765 * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
1767 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
1769 * elf32-xtensa.c (elf_xtensa_be_plt_entry,
1770 elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays,
1771 keep both windowed and call0 ABI PLT definitions.
1772 (elf_xtensa_create_plt_entry): Use selected ABI to choose upper
1773 elf_xtensa_*_plt_entry endex.
1774 (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size.
1776 2017-06-14 Nick Clifton <nickc@redhat.com>
1779 * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
1782 2017-06-14 Nick Clifton <nickc@redhat.com>
1785 * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
1786 maximum value for the ascic pointer. Check that name processing
1787 does not read beyond this value.
1788 (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
1791 2017-06-14 Nick Clifton <nickc@redhat.com>
1794 * versados.c (versados_mkobject): Zero the allocated tdata structure.
1795 (process_otr): Check for an invalid offset in the otr structure.
1797 2017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
1799 * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
1801 2017-06-13 H.J. Lu <hongjiu.lu@intel.com>
1807 * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
1808 vtable field to a union.
1809 (_bfd_elf_is_start_stop): Removed.
1810 * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
1811 __start_SECNAME and __stop_SECNAME symbols.
1812 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
1813 * elflink.c (_bfd_elf_is_start_stop): Removed.
1814 (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
1815 _bfd_elf_is_start_stop.
1816 (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
1817 __stop_SECNAME symbols. Updated.
1818 (elf_gc_smash_unused_vtentry_relocs): Likewise.
1819 (bfd_elf_gc_record_vtinherit): Likewise.
1820 (bfd_elf_gc_record_vtentry): Likewise.
1822 2017-06-13 Nick Clifton <nickc@redhat.com>
1825 * elflink.c (elf_link_adjust_relocs): Generate an error when
1826 encountering a reloc against a symbol removed by garbage
1829 2017-06-12 H.J. Lu <hongjiu.lu@intel.com>
1831 * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
1832 to merge_gnu_properties.
1833 * elf-properties.c (elf_merge_gnu_properties): Add struct
1834 bfd_link_info * and pass it to merge_gnu_properties.
1835 (elf_merge_gnu_property_list): Add struct bfd_link_info *
1836 and pass it to elf_merge_gnu_properties.
1837 (_bfd_elf_link_setup_gnu_properties): Pass info to
1838 elf_merge_gnu_property_list.
1839 * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
1841 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
1843 2017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
1846 * binary.c (binary_set_section_contents): Scale lma by octets
1847 per byte to set filepos.
1849 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1851 * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
1854 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1856 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
1859 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1861 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
1862 patched section contents for TLS IE reloc.
1863 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
1865 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1867 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
1868 RELOC_FOR_GLOBAL_SYMBOL macro.
1870 2018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1872 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
1875 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1877 * config/tc-arc.c (md_undefined_symbol): Changed.
1878 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
1880 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1882 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
1885 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1887 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
1888 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
1890 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1892 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
1895 2017-06-08 Richard Earnshaw <rearnsha@arm.com>
1897 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
1898 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
1899 is non-zero. Add clarifying comments.
1901 2017-06-08 H.J. Lu <hongjiu.lu@intel.com>
1903 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
1904 name. Use local IFUNC symbol name string to report unsupported
1905 non-PIC call to IFUNC function.
1906 (elf_i386_relocate_section): Dump local IFUNC name with minfo
1907 when generating R_386_IRELATIVE relocation.
1908 (elf_i386_finish_dynamic_symbol): Likewise.
1909 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
1911 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
1912 when generating R_X86_64_IRELATIVE relocation.
1913 (elf_x86_64_finish_dynamic_symbol): Likewise.
1915 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
1917 * elf.c (setup_group): Make sure BFD sections are created for all
1918 group sections in the input file when processing SHF_GROUP
1920 (bfd_section_from_shdr): Avoid duplicating logic already
1921 implemented in `setup_group'.
1923 2017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
1926 * peXXigen.c (pe_print_idata): Use the address of the first thunk
1927 if the hint address is zero.
1929 2017-06-06 James Clarke <jrtc27@jrtc27.com>
1932 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
1933 ELF_COMMON_DEF_P for common symbols.
1935 2017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
1937 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
1938 SEC_GROUP sections as SEC_EXCLUDE.
1939 (bfd_elf_set_group_contents): Replace use of abort with an assert.
1940 (assign_section_numbers): Use resolve_section_groups flag instead
1941 of relocatable link type.
1942 (_bfd_elf_init_private_section_data): Use resolve_section_groups
1943 flag instead of checking the final_link flag for part of the
1944 checks in here. Fix white space as a result.
1945 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
1946 instead of relocatable link type.
1947 (bfd_elf_final_link): Likewise.
1949 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
1951 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
1953 * elf32-score.c (score_elf_final_link_relocate): Likewise.
1954 (s3_bfd_score_elf_check_relocs): Likewise.
1955 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
1956 (score_elf_final_link_relocate): Likewise.
1957 (s7_bfd_score_elf_check_relocs): Likewise.
1959 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
1961 * elflink.c (init_reloc_cookie_rels): Remove unused variable
1964 2017-06-06 Maciej W. Rozycki <macro@imgtec.com>
1966 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
1967 from `reloc_count' rather than decrementing it.
1968 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
1969 `reloc_count' by `int_rels_per_ext_rel'.
1970 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
1971 `reloc_count' by `int_rels_per_ext_rel' for last relocation
1972 entry determination.
1973 (s3_bfd_score_elf_check_relocs): Likewise.
1974 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
1975 (s7_bfd_score_elf_relocate_section): Likewise.
1976 (s7_bfd_score_elf_check_relocs): Likewise.
1977 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
1978 prototype and function.
1979 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
1980 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
1981 triple rather than once the sum of REL and RELA relocation entry
1983 (bfd_elf64_get_reloc_upper_bound): Remove macro.
1984 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
1985 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
1986 storage allocation size determination.
1987 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
1988 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
1989 by `int_rels_per_ext_rel' for last relocation entry
1991 (bfd_elf_final_link): Do not multiply `reloc_count' by
1992 `int_rels_per_ext_rel' for internal relocation storage
1993 allocation size determination.
1994 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
1995 `int_rels_per_ext_rel' for last relocation entry determination.
1996 (elf_gc_smash_unused_vtentry_relocs): Likewise.
1997 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
1998 (_bfd_mips_elf_relocate_section): Likewise.
2000 2017-06-05 Alan Modra <amodra@gmail.com>
2003 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
2005 2017-06-01 John Baldwin <jhb@FreeBSD.org>
2007 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
2008 determine structure sizes.
2009 (elfcore_grok_freebsd_prstatus): Likewise.
2011 2017-06-01 Alan Modra <amodra@gmail.com>
2013 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
2014 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
2016 (is_elfv2_localentry0): New function.
2017 (ppc64_elf_tls_setup): Default params->plt_localentry0.
2018 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
2019 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
2020 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
2021 optimized localentry:0 stubs.
2022 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
2023 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
2025 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
2027 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
2029 2017-05-30 Casey Smith <clegg89@gmail.com>
2032 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
2033 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
2035 2017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
2037 * cpu-arc.c (arc_compatible): New function.
2039 2017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
2041 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
2043 2017-05-30 H.J. Lu <hongjiu.lu@intel.com>
2046 * bfdio.c (bfd_get_file_size): New function.
2047 * bfd-in2.h: Regenerated.
2049 2017-05-23 Dilian Palauzov <git-dpa@aegee.org>
2051 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
2054 2017-05-22 H.J. Lu <hongjiu.lu@intel.com>
2056 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
2057 dynobj instead of htab->elf.dynobj.
2059 2017-05-19 Maciej W. Rozycki <macro@imgtec.com>
2061 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
2063 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
2064 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
2065 actual number of internal relocations retrieved. Adjust
2066 function description.
2067 (bfd_elf64_canonicalize_reloc): Remove macro.
2068 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
2070 2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
2072 * archures.c (bfd_mach_sparc_v9m8): Define.
2073 (bfd_mach_sparc_v8plusm8): Likewise.
2074 (bfd_mach_sparc_v9_p): Adjust to M8.
2075 (bfd_mach_sparc_64bit_p): Likewise.
2076 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
2077 bfd_mach_sparc_v8plusm8.
2078 * bfd-in2.h: Regenerated.
2079 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
2081 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
2082 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
2083 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
2085 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
2086 bfd_mach_sparc_v8plusm8.
2088 2017-05-19 Alan Modra <amodra@gmail.com>
2090 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
2091 debug and special sections when no non-note alloc sections in an
2094 2017-05-18 Alan Modra <amodra@gmail.com>
2096 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
2097 * elf-m10300.c: Likewise.
2099 * elf32-arc.c: Likewise.
2100 * elf32-bfin.c: Likewise.
2101 * elf32-m68k.c: Likewise.
2102 * elf32-nds32.c: Likewise.
2103 * elf32-tilepro.c: Likewise.
2104 * elflink.c: Likewise.
2105 * elfnn-aarch64.c: Likewise.
2106 * elfnn-riscv.c: Likewise.
2107 * elfxx-tilegx.c: Likewise.
2108 * mach-o.c: Likewise.
2109 * peXXigen.c: Likewise.
2110 * vms-alpha.c: Likewise.
2111 * vms-lib.c: Likewise.
2113 2017-05-17 H.J. Lu <hongjiu.lu@intel.com>
2116 * elflink.c (elf_gc_mark_debug_section): New function.
2117 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
2118 referenced by kept debug sections.
2120 2017-05-16 Alan Modra <amodra@gmail.com>
2122 * elf-m10300.c: Rename occurrences of non_ir_ref.
2123 * elf32-arm.c: Likewise.
2124 * elf32-bfin.c: Likewise.
2125 * elf32-cr16.c: Likewise.
2126 * elf32-cris.c: Likewise.
2127 * elf32-d10v.c: Likewise.
2128 * elf32-dlx.c: Likewise.
2129 * elf32-fr30.c: Likewise.
2130 * elf32-frv.c: Likewise.
2131 * elf32-hppa.c: Likewise.
2132 * elf32-i370.c: Likewise.
2133 * elf32-i386.c: Likewise.
2134 * elf32-iq2000.c: Likewise.
2135 * elf32-lm32.c: Likewise.
2136 * elf32-m32c.c: Likewise.
2137 * elf32-m32r.c: Likewise.
2138 * elf32-m68hc1x.c: Likewise.
2139 * elf32-m68k.c: Likewise.
2140 * elf32-mcore.c: Likewise.
2141 * elf32-metag.c: Likewise.
2142 * elf32-microblaze.c: Likewise.
2143 * elf32-moxie.c: Likewise.
2144 * elf32-msp430.c: Likewise.
2145 * elf32-mt.c: Likewise.
2146 * elf32-nios2.c: Likewise.
2147 * elf32-or1k.c: Likewise.
2148 * elf32-ppc.c: Likewise.
2149 * elf32-rl78.c: Likewise.
2150 * elf32-s390.c: Likewise.
2151 * elf32-score.c: Likewise.
2152 * elf32-score7.c: Likewise.
2153 * elf32-sh.c: Likewise.
2154 * elf32-tic6x.c: Likewise.
2155 * elf32-tilepro.c: Likewise.
2156 * elf32-v850.c: Likewise.
2157 * elf32-vax.c: Likewise.
2158 * elf32-xstormy16.c: Likewise.
2159 * elf32-xtensa.c: Likewise.
2160 * elf64-alpha.c: Likewise.
2161 * elf64-hppa.c: Likewise.
2162 * elf64-ia64-vms.c: Likewise.
2163 * elf64-mmix.c: Likewise.
2164 * elf64-ppc.c: Likewise.
2165 * elf64-s390.c: Likewise.
2166 * elf64-sh64.c: Likewise.
2167 * elf64-x86-64.c: Likewise.
2168 * elflink.c: Likewise.
2169 * elfnn-aarch64.c: Likewise.
2170 * elfnn-ia64.c: Likewise.
2171 * elfnn-riscv.c: Likewise.
2172 * elfxx-mips.c: Likewise.
2173 * elfxx-sparc.c: Likewise.
2174 * elfxx-tilegx.c: Likewise.
2175 * linker.c: Likewise.
2177 2017-05-16 Alan Modra <amodra@gmail.com>
2179 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
2180 * elflink.c (elf_link_add_object_symbols): Update to use
2182 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
2184 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
2186 2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
2188 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
2190 2017-05-12 H.J. Lu <hongjiu.lu@intel.com>
2192 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
2193 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
2195 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
2197 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
2199 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
2201 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
2202 to plt_second/plt_second_eh_frame.
2203 (elf_x86_64_link_hash_newfunc): Updated.
2204 (elf_x86_64_allocate_dynrelocs): Likewise.
2205 (elf_x86_64_size_dynamic_sections): Likewise.
2206 (elf_x86_64_relocate_section): Likewise.
2207 (elf_x86_64_finish_dynamic_symbol): Likewise.
2208 (elf_x86_64_finish_dynamic_sections): Likewise.
2209 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
2210 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
2212 (elf_backend_setup_gnu_properties): Updated. Create the
2213 .plt.sec section instead of the .plt.sec section.
2215 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
2217 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
2218 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
2219 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
2221 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
2223 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
2224 (bfd_elf64_set_reloc): Define.
2225 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
2227 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
2229 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
2230 (struct bfd_target): New field _bfd_set_reloc.
2231 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
2232 * reloc.c (_bfd_generic_set_reloc): New function.
2233 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
2234 * nlm-target.h (nlm_set_reloc): Likewise.
2235 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
2236 * aout-tic30.c (MY_set_reloc): Likewise.
2237 * aout-target.h (MY_set_reloc): Likewise.
2238 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
2239 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
2240 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
2241 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
2242 * aout-adobe.c (aout_32_set_reloc): Likewise.
2243 * bout.c (b_out_set_reloc): Likewise.
2244 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
2245 * i386os9k.c (aout_32_set_reloc): Likewise.
2246 * ieee.c (ieee_set_reloc): Likewise.
2247 * oasys.c (oasys_set_reloc): Likewise.
2248 * som.c (som_set_reloc): Likewise.
2249 * versados.c (versados_set_reloc): Likewise.
2250 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
2251 _bfd_generic_set_reloc.
2252 (rs6000_xcoff64_aix_vec): LIkewise.
2253 * libbfd.c (_bfd_norelocs_set_reloc): New function.
2254 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
2255 * i386msdos.c (msdos_set_reloc): Define to
2256 _bfd_norelocs_set_reloc.
2257 * elfcode.h (elf_set_reloc): Define.
2258 * bfd-in2.h: Regenerated.
2260 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
2263 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
2264 for IFUNC function address.
2266 2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
2268 * elf32-arc.c (FEATURE_LIST_NAME): Define.
2269 (CONFLICT_LIST): Likewise.
2270 (opcode/arc-attrs.h): Include.
2271 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
2272 (arc_extract_features): New file.
2273 (arc_stralloc): Likewise.
2274 (arc_elf_merge_attributes): Likewise.
2275 (arc_elf_merge_private_bfd_data): Use object attributes.
2276 (bfd_arc_get_mach_from_attributes): New function.
2277 (arc_elf_object_p): Use object attributes.
2278 (arc_elf_final_write_processing): Likewise.
2279 (elf32_arc_obj_attrs_arg_type): New function.
2280 (elf32_arc_obj_attrs_handle_unknown): Likewise.
2281 (elf32_arc_section_from_shdr): Likewise.
2282 (elf_backend_obj_attrs_vendor): Define.
2283 (elf_backend_obj_attrs_section): Likewise.
2284 (elf_backend_obj_attrs_arg_type): Likewise.
2285 (elf_backend_obj_attrs_section_type): Likewise.
2286 (elf_backend_obj_attrs_handle_unknown): Likewise.
2287 (elf_backend_section_from_shdr): Likewise.
2289 2017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
2292 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
2293 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
2294 and the destination is a Thumb symbol.
2296 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2298 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
2299 initializer to silence GCC 4.2.
2300 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
2302 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2304 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
2305 (LAZY_PLT_ENTRY_SIZE): This.
2306 (NON_LAZY_PLT_ENTRY_SIZE): New.
2307 (elf_x86_64_plt0_entry): Renamed to ...
2308 (elf_x86_64_lazy_plt0_entry): This.
2309 (elf_x86_64_plt_entry): Renamed to ...
2310 (elf_x86_64_lazy_plt_entry): This.
2311 (elf_x86_64_bnd_plt0_entry): Renamed to ...
2312 (elf_x86_64_lazy_bnd_plt0_entry): This.
2313 (elf_x86_64_legacy_plt_entry): Removed.
2314 (elf_x86_64_bnd_plt_entry): Renamed to ...
2315 (elf_x86_64_lazy_bnd_plt_entry): This.
2316 (elf_x86_64_legacy_plt2_entry): Renamed to ...
2317 (elf_x86_64_non_lazy_plt_entry): This.
2318 (elf_x86_64_bnd_plt2_entry): Renamed to ...
2319 (elf_x86_64_non_lazy_bnd_plt_entry): This.
2320 (elf_x86_64_eh_frame_plt): Renamed to ...
2321 (elf_x86_64_eh_frame_lazy_plt): This.
2322 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
2323 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
2324 (elf_x86_64_eh_frame_plt_got): Renamed to ...
2325 (elf_x86_64_eh_frame_non_lazy_plt): This.
2326 (elf_x86_64_lazy_plt_layout): New.
2327 (elf_x86_64_non_lazy_plt_layout): Likewise.
2328 (elf_x86_64_plt_layout): Likewise.
2329 (elf_x86_64_backend_data): Remove PLT layout information. Add
2330 os for target system.
2331 (GET_PLT_ENTRY_SIZE): Removed.
2332 (elf_x86_64_lazy_plt): New.
2333 (elf_x86_64_non_lazy_plt): Likewise.
2334 (elf_x86_64_lazy_bnd_plt): Likewise.
2335 (elf_x86_64_non_lazy_bnd_plt): Likewise.
2336 (elf_x86-64_arch_bed): Updated.
2337 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
2338 (elf_x86_64_create_dynamic_sections): Removed.
2339 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
2340 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
2341 (elf_x86-64_adjust_dynamic_symbol): Updated.
2342 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
2343 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
2344 size for PLT0 if there is no PLT0. Get plt_entry_size from
2345 non_lazy_plt for non-lazy PLT entries.
2346 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
2347 from non_lazy_plt for non-lazy PLT entries.
2348 (elf_x86-64_relocate_section): Updated. Properly get PLT index
2349 if there is no PLT0.
2350 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
2351 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
2352 entries with non-lazy PLT layout. Don't fill the second and third
2353 slots in the PLT entry if there is no PLT0.
2354 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
2355 if there is no PLT0. Set sh_entsize on the .plt.got section.
2356 (compare_relocs): New.
2357 (elf_x86_64_plt_type): Likewise.
2358 (elf_x86_64_plt): Likewise.
2359 (elf_x86_64_nacl_plt): New. Forward declaration.
2360 (elf_x86_64_get_plt_sym_val): Removed.
2361 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
2362 against all dynamic relocations.
2363 (elf_x86_64_link_setup_gnu_properties): New function.
2364 (elf_backend_create_dynamic_sections): Updated.
2365 (elf_backend_setup_gnu_properties): New.
2366 (elf_x86_64_nacl_plt): New.
2367 (elf_x86_64_nacl_arch_bed): Updated.
2369 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2371 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
2372 (LAZY_PLT_ENTRY_SIZE): This.
2373 (NON_LAZY_PLT_ENTRY_SIZE): New.
2374 (elf_i386_plt0_entry): Renamed to ...
2375 (elf_i386_lazy_plt0_entry): This.
2376 (elf_i386_plt_entry): Renamed to ...
2377 (elf_i386_lazy_plt_entry): This.
2378 (elf_i386_pic_plt0_entry): Renamed to ...
2379 (elf_i386_pic_lazy_plt0_entry): This.
2380 (elf_i386_pic_plt_entry): Renamed to ...
2381 (elf_i386_pic_lazy_plt_entry): This.
2382 (elf_i386_got_plt_entry): Renamed to ...
2383 (elf_i386_non_lazy_plt_entry): This.
2384 (elf_i386_pic_got_plt_entry): Renamed to ...
2385 (elf_i386_pic_non_lazy_plt_entry): This.
2386 (elf_i386_eh_frame_plt): Renamed to ...
2387 (elf_i386_eh_frame_lazy_plt): This.
2388 (elf_i386_eh_frame_plt_got): Renamed to ...
2389 (elf_i386_eh_frame_non_lazy_plt): This.
2390 (elf_i386_plt_layout): Renamed to ...
2391 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
2392 eh_frame_plt_got_size.
2393 (elf_i386_non_lazy_plt_layout): New.
2394 (elf_i386_plt_layout): Likewise.
2395 (elf_i386_non_lazy_plt): Likewise.
2396 (GET_PLT_ENTRY_SIZE): Removed.
2397 (elf_i386_plt): Renamed to ...
2398 (elf_i386_lazy_plt): This.
2399 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
2400 (elf_i386_arch_bed): Updated.
2401 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
2402 (elf_i386_create_dynamic_sections): Removed.
2403 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
2404 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
2405 (elf_i386_adjust_dynamic_symbol): Updated.
2406 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
2407 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
2408 size for PLT0 if there is no PLT0.
2409 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
2410 output section is discarded only if GOT isn't empty.
2411 (elf_i386_relocate_section): Updated. Properly get PLT index
2412 if there is no PLT0.
2413 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
2414 second and third slots in the PLT entry if there is no PLT0.
2415 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
2416 if there is no PLT0. Set sh_entsize on the .plt.got section.
2417 (elf_i386_nacl_plt): Forward declaration.
2418 (elf_i386_get_plt_sym_val): Removed.
2419 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
2420 against all dynamic relocations.
2421 (elf_i386_link_setup_gnu_properties): New function.
2422 (elf_backend_create_dynamic_sections): Updated.
2423 (elf_backend_setup_gnu_properties): New.
2424 (elf_i386_nacl_plt): Updated.
2425 (elf_i386_nacl_arch_bed): Likewise.
2426 (elf_i386_vxworks_arch_bed): Likewise.
2428 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
2430 * elflink.c (elf_output_implib): Remove executable flag from import
2432 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
2433 library is a relocatable object file.
2435 2017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
2438 * elf32-avr.c (avr_should_move_sym): New function.
2439 (avr_should_reduce_sym_size): Likewise.
2440 (avr_should_increase_sym_size): Likewise.
2441 (elf32_avr_relax_delete_bytes): Adjust symbol values
2442 and sizes by calling new functions.
2444 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
2446 * config.bfd (riscv32-*): Enable rv64.
2448 2017-05-02 Alan Modra <amodra@gmail.com>
2451 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
2452 rather than h->root.type == bfd_link_hash_new.
2453 (bfd_elf_record_link_assignment): Similarly, call
2454 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
2456 2017-04-29 Alan Modra <amodra@gmail.com>
2459 * reloc.c (reloc_offset_in_range): New function.
2460 (bfd_perform_relocation, bfd_install_relocation): Use it.
2461 (_bfd_final_link_relocate): Likewise.
2463 2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
2465 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
2466 before using .plt.got.
2467 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
2469 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2471 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
2472 instead of "+=" to update 0.
2474 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2476 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
2477 .plt.got section here.
2478 (elf_i386_check_relocs): Don't create the .plt.got section.
2479 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
2480 the .plt.got and .plt.bnd sections here.
2481 (elf_x86_64_check_relocs): Don't create the .plt.got nor
2484 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2486 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
2488 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
2489 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
2490 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
2491 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
2494 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2496 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
2498 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
2499 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
2500 the first relocatable ELF input with GNU properties.
2502 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2504 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
2505 VxWorks for non-PIC.
2507 2017-04-27 Alan Modra <amodra@gmail.com>
2509 * elf-bfd.h (struct elf_backend_data): Make asection param of
2510 elf_backend_eh_frame_address_size const.
2511 (_bfd_elf_eh_frame_address_size): Likewise.
2512 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
2513 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
2514 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
2515 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
2516 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
2517 (next_cie_fde_offset): Constify params.
2518 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
2520 2017-04-27 Alan Modra <amodra@gmail.com>
2522 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
2523 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
2524 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
2526 (offset_adjust): New function.
2527 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
2528 (adjust_eh_frame_local_symbols): Likewise.
2529 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
2530 after changing anything. Return true if anything changed.
2531 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
2532 _bfd_elf_adjust_eh_frame_global_symbol for globals.
2534 2017-04-27 Alan Modra <amodra@gmail.com>
2536 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
2539 2017-04-27 Alan Modra <amodra@gmail.com>
2541 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
2542 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
2543 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
2544 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
2545 for undef and undefweak dyn_relocs.
2546 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
2547 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
2548 (allocate_got, allocate_dynrelocs): Likewise.
2549 (ppc64_elf_relocate_section): Likewise.
2551 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
2553 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
2554 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
2555 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
2556 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
2558 2017-04-26 Nick Clifton <nickc@redhat.com>
2561 * reloc.c (bfd_perform_relocation): Check for a negative address
2564 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
2567 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
2569 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
2570 (elf_backend_always_renumber_dynsyms): Define.
2571 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
2572 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
2573 * elflink.c (bfd_elf_size_dynamic_sections): Also call
2574 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
2576 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
2578 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
2580 * elflink.c (bfd_elf_size_dynamic_sections): Only call
2581 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
2582 sections have been created.
2584 2017-04-26 Nick Clifton <nickc@redhat.com>
2587 * compress.c (bfd_init_section_compress_status): Check the return
2588 value from bfd_malloc.
2590 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
2592 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
2593 no_finish_dynamic_symbol.
2594 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
2596 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
2597 weak symbol, don't make it dynamic.
2598 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
2599 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
2600 relocation for GOT reference.
2601 (elf_x86_64_finish_dynamic_symbol): Abort if
2602 no_finish_dynamic_symbol isn't 0.
2604 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
2607 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
2608 undefined weak symbol, don't make it dynamic.
2609 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
2610 set no_finish_dynamic_symbol and generate R_386_RELATIVE
2611 relocation for R_386_GOT32.
2613 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
2616 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
2618 2017-04-23 Alan Modra <amodra@gmail.com>
2621 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
2622 * elf.c (lcomm_sym): New.
2623 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
2624 * bfd-in2.h: Regenerate.
2626 2017-04-23 Alan Modra <amodra@gmail.com>
2629 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
2630 parameters and comment.
2631 (_bfd_elf_get_reloc_section): Delete.
2632 (_bfd_elf_plt_get_reloc_section): Declare.
2633 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
2634 New functions. Don't blindly skip over assumed .rel/.rela prefix.
2636 (_bfd_elf_get_reloc_section): ..here. Delete.
2637 (assign_section_numbers): Call elf_get_reloc_section.
2638 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
2639 * elfxx-target.h (elf_backend_get_reloc_section): Update.
2641 2017-04-23 Alan Modra <amodra@gmail.com>
2644 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
2647 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
2650 * elf32-i386.c (elf_i386_link_hash_entry): Add
2651 no_finish_dynamic_symbol.
2652 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
2653 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
2654 symbol, don't make it dynamic in PIE.
2655 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
2656 set no_finish_dynamic_symbol and generate R_386_RELATIVE
2657 relocation for R_386_GOT32
2658 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
2661 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
2665 * elflink.c (elf_link_add_object_symbols): Require
2666 --no-dynamic-linker with -E/--dynamic-list when creating
2669 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
2671 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
2674 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
2676 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
2677 dynamic symbol sorting.
2679 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
2682 * elflink.c (elf_link_add_object_symbols): Preserve
2683 dynamic_ref_after_ir_def when restoring the symbol table for
2684 unneeded dynamic object.
2686 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
2689 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
2690 on on undefined IFUNC symbol in the second PLT.
2692 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
2694 * peXXigen.c (pe_print_reloc): Correct chunk_end.
2696 2017-04-19 Alan Modra <amodra@gmail.com>
2698 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
2699 or make dynamic for info->dynamic_undefined_weak 0 and 1.
2700 * elf32-ppc.c:Formatting.
2701 (ensure_undefweak_dynamic): Don't make dynamic when
2702 info->dynamic_undefined_weak is zero.
2703 (allocate_dynrelocs): Discard undefweak dyn_relocs for
2704 info->dynamic_undefined_weak. Discard undef dyn_relocs when
2705 not default visibility. Discard undef and undefweak
2707 (ppc_elf_relocate_section): Adjust to suit.
2708 * elf64-ppc.c: Formatting.
2709 (ensure_undefweak_dynamic): Don't make dynamic when
2710 info->dynamic_undefined_weak is zero.
2711 (allocate_dynrelocs): Discard undefweak dyn_relocs for
2712 info->dynamic_undefined_weak. Discard them earlier.
2714 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
2717 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
2718 before generating the version definition section.
2720 2017-04-17 Alan Modra <amodra@gmail.com>
2722 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
2723 state when a regular object file defines a symbol with
2724 incompatible type to that defined by an earlier shared lib.
2726 2017-04-13 Alan Modra <amodra@gmail.com>
2728 * coffcode.h: Wrap some overly long _bfd_error_handler args.
2730 * elf32-arm.c: Likewise.
2731 * elf32-i386.c: Likewise.
2732 * elf32-mep.c: Likewise.
2733 * elf64-ia64-vms.c: Likewise.
2734 * elf64-x86-64.c: Likewise.
2735 * elflink.c: Likewise.
2736 * elfnn-ia64.c: Likewise.
2737 * elfxx-mips.c: Likewise.
2739 2017-04-13 Alan Modra <amodra@gmail.com>
2741 * aoutx.h: Use %B and %A in error messages throughout file.
2742 * aout-cris.c: Likewise.
2743 * archive.c: Likewise.
2744 * binary.c: Likewise.
2745 * coff-rs6000.c: Likewise.
2746 * coff-tic4x.c: Likewise.
2747 * coffcode.h: Likewise.
2748 * coffgen.c: Likewise.
2749 * cofflink.c: Likewise.
2750 * coffswap.h: Likewise.
2751 * cpu-arm.c: Likewise.
2752 * elf-eh-frame.c: Likewise.
2753 * elf-m10300.c: Likewise.
2755 * elf32-arc.c: Likewise.
2756 * elf32-arm.c: Likewise.
2757 * elf32-bfin.c: Likewise.
2758 * elf32-frv.c: Likewise.
2759 * elf32-iq2000.c: Likewise.
2760 * elf32-m32c.c: Likewise.
2761 * elf32-microblaze.c: Likewise.
2762 * elf32-nds32.c: Likewise.
2763 * elf32-rl78.c: Likewise.
2764 * elf32-rx.c: Likewise.
2765 * elf32-score.c: Likewise.
2766 * elf32-score7.c: Likewise.
2767 * elf32-sh64.c: Likewise.
2768 * elf32-v850.c: Likewise.
2769 * elf32-vax.c: Likewise.
2770 * elf32-visium.c: Likewise.
2771 * elf64-ia64-vms.c: Likewise.
2772 * elf64-mmix.c: Likewise.
2773 * elf64-sh64.c: Likewise.
2774 * elfcode.h: Likewise.
2775 * elfnn-aarch64.c: Likewise.
2776 * elfnn-ia64.c: Likewise.
2777 * elfxx-mips.c: Likewise.
2778 * hpux-core.c: Likewise.
2781 * linker.c: Likewise.
2782 * merge.c: Likewise.
2784 * oasys.c: Likewise.
2785 * pdp11.c: Likewise.
2786 * peXXigen.c: Likewise.
2787 * rs6000-core.c: Likewise.
2788 * vms-alpha.c: Likewise.
2789 * xcofflink.c: Likewise.
2791 2017-04-13 Alan Modra <amodra@gmail.com>
2793 * bfd.c (PRINT_TYPE): Define.
2794 (_doprnt): New function.
2795 (error_handler_internal): Use _doprnt.
2796 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
2797 calls in their natural order, throughout file.
2798 * coff-mcore.c: Likewise.
2799 * coff-ppc.c: Likewise.
2800 * coff-tic80.c: Likewise.
2801 * cofflink.c: Likewise.
2802 * elf-s390-common.c: Likewise.
2804 * elf32-arm.c: Likewise.
2805 * elf32-i386.c: Likewise.
2806 * elf32-m32r.c: Likewise.
2807 * elf32-msp430.c: Likewise.
2808 * elf32-spu.c: Likewise.
2809 * elf64-ia64-vms.c: Likewise.
2810 * elf64-sparc.c: Likewise.
2811 * elf64-x86-64.c: Likewise.
2812 * elflink.c: Likewise.
2813 * elfnn-aarch64.c: Likewise.
2814 * elfnn-ia64.c: Likewise.
2815 * elfxx-mips.c: Likewise.
2817 2017-04-13 Alan Modra <amodra@gmail.com>
2819 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
2820 branch veneers" error. Fix double space and format message.
2821 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
2822 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
2824 2017-04-13 Alan Modra <amodra@gmail.com>
2826 * bfd-in2.h: Regenerate.
2828 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
2830 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
2831 extra `\n' in warning/error messages.
2832 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
2833 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
2835 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
2837 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
2838 processor-specific properties with generic ELF target vector.
2840 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
2842 * elf32-sparc.c (elf_backend_fixup_symbol): New.
2843 * elf64-sparc.c (elf_backend_fixup_symbol): New.
2844 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
2845 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
2847 (link_hash_newfunc): Initialize has_got_reloc and
2849 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
2851 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
2853 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
2855 (_bfd_sparc_elf_fixup_symbol): New function.
2856 (allocate_dynrelocs): Don't allocate space for dynamic
2857 relocations and discard relocations against resolved undefined
2858 weak symbols in executable. Don't make resolved undefined weak
2859 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
2860 relocation against undefined weak symbols in PIE.
2861 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
2862 relocations against resolved undefined weak symbols in PIE
2863 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
2864 without ynamic PLT/GOT relocations for resolved undefined weak
2866 Don't generate dynamic relocation against resolved undefined
2867 weak symbol in executable.
2868 (pie_finish_undefweak_symbol): New function.
2869 (_bfd_sparc_elf_finish_dynamic_sections): Call
2870 pie_finish_undefweak_symbol on all symbols in PIE.
2871 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
2872 (_bfd_sparc_elf_fixup_symbol): New function.
2874 2017-04-10 Nick Clifton <nickc@redhat.com>
2876 * config.bfd: Remove ns32k from obsolete list.
2878 2017-04-10 Alan Modra <amodra@gmail.com>
2881 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
2882 (special_sections_i): Likewise for .init_array.
2883 (special_sections_p): Likewise for .preinit_array.
2885 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
2889 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
2890 ELF_COMMON_DEF_P for common symbols.
2891 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
2892 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
2893 * elflink.c (_bfd_elf_merge_symbol): Revert commits
2894 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
2895 07492f668d2173da7a2bda3707ff0985e0f460b6.
2897 2017-04-07 Pedro Alves <palves@redhat.com>
2899 * opncls.c (bfd_get_debug_link_info): Rename to...
2900 (bfd_get_debug_link_info_1): ... this. Change type of second
2901 parameter to void pointer. Adjust.
2902 (bfd_get_debug_link_info): Reimplement on top of
2903 bfd_get_debug_link_info_1.
2904 (separate_debug_file_exists, separate_alt_debug_file_exists):
2905 Change type of second parameter to void pointer. Adjust.
2906 (get_func_type, check_func_type): Change type of second parameter
2908 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
2909 the callback functions instead of passing the address of a local.
2910 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
2911 find_separate_debug_file.
2912 (get_alt_debug_link_info_shim): Change type of second parameter to
2913 void pointer. Adjust.
2914 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
2915 find_separate_debug_file.
2916 (get_build_id_name, bfd_boolean check_build_id_file): Change type
2917 of second parameter to void pointer. Adjust.
2918 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
2919 pointer local to find_separate_debug_file.
2921 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
2923 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
2924 external symbols with a definition.
2925 (_bfd_coff_gc_mark_extra_sections): Fix typo.
2927 2017-04-07 Alan Modra <amodra@gmail.com>
2929 * po/SRC-POTFILES.in: Regenerate.
2931 2017-04-05 Alan Modra <amodra@gmail.com>
2933 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
2936 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
2938 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
2939 numbers for DataDirectory entry indicies passed to
2942 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
2944 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
2945 each GNU_MBIND section and align GNU_MBIND section to page size.
2946 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
2947 segment for each GNU_MBIND section.
2948 (_bfd_elf_init_private_section_data): Copy sh_info from input
2949 for GNU_MBIND section.
2951 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
2953 * elfnn-riscv.c (GP_NAME): Delete.
2954 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
2955 (_bfd_riscv_relax_lui): Likewise.
2957 2017-04-04 Nick Clifton <nickc@redhat.com>
2960 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
2962 (bfd_elf_final_link): Only initialize the extended symbol index
2963 section if there are extended symbol tables to list.
2965 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
2967 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
2968 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
2969 * configure.ac (elf): Add elf-properties.lo.
2970 * Makefile.in: Regenerated.
2971 * configure: Likewise.
2972 * elf-bfd.h (elf_property_kind): New.
2973 (elf_property): Likewise.
2974 (elf_property_list): Likewise.
2975 (elf_properties): Likewise.
2976 (_bfd_elf_parse_gnu_properties): Likewise.
2977 (_bfd_elf_get_property): Likewise.
2978 (_bfd_elf_link_setup_gnu_properties): Likewise.
2979 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
2980 and setup_gnu_properties.
2981 (elf_obj_tdata): Add properties.
2982 * elf-properties.c: New file.
2983 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
2984 (elf_i386_merge_gnu_properties): Likewise.
2985 (elf_backend_parse_gnu_properties): Likewise.
2986 (elf_backend_merge_gnu_properties): Likewise.
2987 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
2988 (elf_x86_64_merge_gnu_properties): Likewise.
2989 (elf_backend_parse_gnu_properties): Likewise.
2990 (elf_backend_merge_gnu_properties): Likewise.
2991 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
2992 (elf_backend_parse_gnu_properties): Likewise.
2993 (elf_backend_setup_gnu_properties): Likewise.
2994 (elfNN_bed): Add elf_backend_parse_gnu_properties,
2995 elf_backend_merge_gnu_properties and
2996 elf_backend_setup_gnu_properties.
2998 2017-03-30 Pip Cet <pipcet@gmail.com>
3000 * elf32-wasm32.c: Add relocation code, two relocs.
3001 * reloc.c: Add wasm32 relocations.
3002 * libbfd.h: Regenerate.
3003 * bfd-in2.h: Regenerate.
3004 * bfd/po/bfd.pot: Regenerate.
3006 2017-03-29 Nick Clifton <nickc@redhat.com>
3009 * coff-bfd.h (struct coff_section_data): Add new fields:
3010 saved_bias and bias.
3011 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
3012 computed for PE binaries.
3013 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
3016 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
3019 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
3020 to handle a local symbol with a hash-symbol-entry; without PLT.
3021 Add BFD_ASSERT for an incidental case with GOT entry present.
3022 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
3023 isn't forced-or-set local.
3025 2017-03-27 Pip Cet <pipcet@gmail.com>
3027 * wasm-module.c: New file to support WebAssembly modules.
3028 * wasm-module.h: New file to support WebAssembly modules.
3029 * doc/webassembly.texi: Start documenting wasm-module.c.
3030 * config.bfd: Add wasm_vec.
3031 * targets.c: Likewise.
3032 * configure.ac: Likewise.
3033 * Makefile.am: Add entries for wasm-module.c.
3034 * Makefile.in: Regenerate.
3035 * configure: Regenerate.
3036 * po/SRC-POTFILES.in: Regenerate.
3038 2017-03-27 Pip Cet <pipcet@gmail.com>
3040 * cpu-wasm32.c: New file to support wasm32 architecture.
3041 * elf32-wasm32.c: New file to support wasm32 architecture.
3042 * Makefile.am: Add wasm32 architecture.
3043 * archures.c: Likewise.
3044 * config.bfd: Likewise.
3045 * configure.ac: Likewise.
3046 * targets.c: Likewise.
3047 * Makefile.in: Regenerate.
3048 * bfd-in2.h: Regenerate.
3049 * configure: Regenerate.
3050 * po/SRC-POTFILES.in: Regenerate.
3052 2017-03-20 Alan Modra <amodra@gmail.com>
3055 * elf64-ppc.c (compare_symbols): Stabilize sort.
3057 2017-03-18 Alan Modra <amodra@gmail.com>
3059 * elf64-ppc.c (struct ppc_link_hash_table): Add
3060 local_ifunc_resolver and maybe_local_ifunc_resolver.
3061 (ppc_build_one_stub): Set flags on emitting dynamic
3062 relocation to ifunc.
3063 (ppc64_elf_relocate_section): Likewise.
3064 (ppc64_elf_finish_dynamic_symbol): Likewise.
3065 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
3066 local dynamic relocs to ifuncs.
3067 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
3068 local_ifunc_resolver and maybe_local_ifunc_resolver.
3069 (ppc_elf_relocate_section): Set flag on emitting dynamic
3070 relocation to ifuncs.
3071 (ppc_elf_finish_dynamic_symbol): Likewise.
3072 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
3073 dynamic relocs to ifuncs.
3075 2017-03-13 Nick Clifton <nickc@redhat.com>
3078 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
3079 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
3080 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
3081 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
3082 * bfd-in2.h: Regenerate.
3083 * libbfd.h: Regenerate.
3084 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
3086 (IS_AARCH64_TLSDESC_RELOC): Likewise.
3087 (elfNN_aarch64_howto_table): Likewise.
3088 (aarch64_tls_transition_without_check): Likewise.
3089 (aarch64_reloc_got_type): Likewise.
3090 (elfNN_aarch64_final_link_relocate): Likewise.
3091 (elfNN_aarch64_tls_relax): Likewise.
3092 (elfNN_aarch64_relocate_section): Likewise.
3093 (elfNN_aarch64_gc_sweep_hook): Likewise.
3094 (elfNN_aarch64_check_relocs): Likewise.
3095 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
3096 (_bfd_aarch64_elf_resolve_relocation): Likewise.
3098 2017-03-11 Alan Modra <amodra@gmail.com>
3100 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
3101 parameter is in fact used. Whitespace fixes.
3102 * elf64-ppc.c: Likewise.
3104 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
3106 * rs6000-core.c (CORE_NEW): Simplify macro when
3107 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
3109 2017-03-07 Alan Modra <amodra@gmail.com>
3113 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
3116 2017-03-05 Alan Modra <amodra@gmail.com>
3118 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
3119 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
3120 (next_cie_fde_offset): New function.
3121 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
3122 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
3123 four bytes. Align CIEs to four or eight bytes depending on
3124 per_encoding_aligned8. Align FDEs according to their encoding.
3125 Pad last FDE to output section alignment.
3126 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
3128 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
3129 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
3130 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
3132 2017-03-02 Martin Bickel <binutils@ineranves.de>
3135 * elf.c (rewrite_elf_program_header): Do not issue a warning for
3136 empty segments which have a zero filesz, but a non-zero memsz.
3138 2017-03-02 Alan Modra <amodra@gmail.com>
3140 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
3142 2017-02-28 Alan Modra <amodra@gmail.com>
3144 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
3145 (ppc64_elf_relocate_section): Likewise.
3147 2017-02-28 Alan Modra <amodra@gmail.com>
3150 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
3151 rather than elf32_nios2_hash_table or elf_hash_table.
3152 (create_got_section): Likewise.
3153 (nios2_elf32_finish_dynamic_symbol): Likewise.
3154 (nios2_elf32_adjust_dynamic_symbol): Likewise.
3155 (nios2_elf32_size_dynamic_sections): Likewise.
3156 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
3157 vars. Use htab equivalents directly instead. Don't create
3158 all dynamic sections on needing just the GOT. Use a goto
3159 rather than a fall-through with reloc test. Ensure
3160 htab->dynobj is set when making dynamic sreloc section.
3161 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
3162 equivalent directly instead. Don't segfault on looking for
3163 .dynamic when dynamic sections have not been created. Don't
3164 segfault on .got.plt being discarded.
3165 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
3166 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
3167 fixme and another not so relevant comment.
3168 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
3169 already set, set hash table dynobj on creating .sbss.
3171 2017-02-28 Alan Modra <amodra@gmail.com>
3173 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
3174 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
3175 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
3176 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
3177 (ppc64_elf_relocate_section): Likewise.
3178 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
3179 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
3180 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
3181 * libbfd.h: Regenerate.
3182 * bfd-in2.h: Regenerate.
3184 2017-02-28 Alan Modra <amodra@gmail.com>
3186 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
3187 dynamic .data.rel.ro read-only.
3188 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
3189 rather than section flags when deciding where copy reloc goes.
3190 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
3191 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
3192 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
3193 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
3194 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
3195 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
3196 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
3197 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
3198 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3199 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
3200 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
3201 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
3202 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3203 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
3204 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
3205 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
3206 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
3207 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
3208 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
3210 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
3212 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
3213 `jalr $0, $25' instruction encoding.
3215 2017-02-27 Nick Clifton <nickc@redhat.com>
3218 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
3219 generating a seg-fault when encountering a symbol that has been
3220 deleted by garbage collection.
3222 2017-02-25 Alan Modra <amodra@gmail.com>
3224 * elf32-arc.c (struct dynamic_sections): Delete.
3225 (enum dyn_section_types): Delete.
3226 (dyn_section_names): Delete.
3227 (arc_create_dynamic_sections): Delete.
3228 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
3229 segfault on discarded .rela.plt section.
3230 (elf_arc_size_dynamic_sections): Formatting. Don't call
3231 arc_create_dynamic_sections. Don't allocate memory for sections
3232 handled by the generic linker. Correct code finding relocs in
3233 read-only sections. Set SEC_EXCLUDE on zero size .got,
3234 .got.plt, and .dynbss sections. Do set .interp for pies.
3236 2017-02-24 Andrew Waterman <andrew@sifive.com>
3238 * elfnn-riscv.c (GP_NAME): New macro.
3239 (riscv_global_pointer_value): Use it.
3240 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
3241 output section, consider only that section's alignment.
3243 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
3245 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
3246 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
3247 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
3248 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
3250 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
3252 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
3253 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
3256 2017-02-23 Alan Modra <amodra@gmail.com>
3259 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
3261 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
3262 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
3265 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
3268 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
3269 processing ahead of the call to `elf_gc_sweep_symbol'.
3271 2017-02-22 Nick Clifton <nickc@redhat.com>
3274 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
3275 created section 4-byte alignment.
3277 2017-02-22 Alan Modra <amodra@gmail.com>
3279 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
3280 on .got or .plt output section being discarded by script.
3281 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
3284 2017-02-21 Alan Modra <amodra@gmail.com>
3286 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
3287 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
3289 2017-02-20 Alan Modra <amodra@gmail.com>
3292 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
3293 if DT_RELSZ/DT_RELASZ is zero.
3295 2017-02-17 Nick Clifton <nickc@redhat.com>
3297 * compress.c (bfd_get_full_section_contents): Remember to reduce
3298 compressed size by the sizeof the compression header when
3299 decompressing the contents.
3301 2017-02-17 Pedro Alves <palves@redhat.com>
3303 * srec.c (Chunk): Rename to ...
3304 (_bfd_srec_len): ... this.
3305 (S3Forced): Rename to ...
3306 (_bfd_srec_forceS3): ... this.
3307 * objcopy.c: Adjust all references.
3309 2017-02-17 Pedro Alves <palves@redhat.com>
3311 * archive.c (bsd_write_armap): Rename to ...
3312 (_bfd_bsd_write_armap): ... this.
3313 (coff_write_armap): Rename to ...
3314 (_bfd_coff_write_armap): ... this.
3315 * libbfd-in.h (bsd_write_armap): Rename to ...
3316 (_bfd_bsd_write_armap): ... this.
3317 (coff_write_armap): Rename to ...
3318 (_bfd_coff_write_armap): ... this.
3319 * aout-target.h, aout-tic30.c: Adjust all users.
3320 * libbfd.h: Regenerate.
3322 2017-02-17 Pedro Alves <palves@redhat.com>
3324 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
3325 (warn_deprecated): Rename to ...
3326 (_bfd_warn_deprecated): ... this.
3327 * libbfd.c (warn_deprecated): Rename to ...
3328 (_bfd_warn_deprecated): ... this.
3329 * bfd-in2.h: Regenerate.
3331 2017-02-17 Pedro Alves <palves@redhat.com>
3333 * bfdio.c (real_ftell): Rename to ...
3334 (_bfd_real_ftell): ... this.
3335 (real_fseek): Rename to ...
3336 (_bfd_real_fseek): ... this.
3337 (real_fopen): Rename to ...
3338 (_bfd_real_fopen): ... this.
3339 * libbfd-in.h (real_ftell): Rename to ...
3340 (_bfd_real_ftell): ... this.
3341 (real_fseek): Rename to ...
3342 (_bfd_real_fseek): ... this.
3343 (real_fopen): Rename to ...
3344 (_bfd_real_fopen): ... this.
3345 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
3346 * libbfd.h: Regenerate.
3348 2017-02-17 Pedro Alves <palves@redhat.com>
3350 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
3351 * libbfd.c (read_unsigned_leb128): Rename to ...
3352 (_bfd_read_unsigned_leb128): ... this.
3353 (read_signed_leb128): Rename to ...
3354 (_bfd_read_signed_leb128): ... this.
3355 (safe_read_leb128): Rename to ...
3356 (_bfd_safe_read_leb128): ... this.
3357 * libbfd-in.h (read_unsigned_leb128): Rename to ...
3358 (_bfd_read_unsigned_leb128): ... this.
3359 (read_signed_leb128): Rename to ...
3360 (_bfd_read_signed_leb128): ... this.
3361 (safe_read_leb128): Rename to ...
3362 (_bfd_safe_read_leb128): ... this.
3363 * libbfd.h: Renegerate.
3365 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
3367 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
3368 before trying to fine matching file and line information.
3370 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
3372 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
3373 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
3374 not match current bfd, then reload debug information. Record bfd
3375 we're loading debug info for in the stash. If we have debug
3376 informatin in the cache then perform section placement before
3379 2017-02-16 Alan Modra <amodra@gmail.com>
3382 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
3383 * elfxx-target.h (elf_backend_no_page_alias): Define.
3384 (elfNN_bed): Init new field.
3385 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
3386 ensure PT_LOAD segment starts on a new page.
3387 * elf32-hppa.c (elf_backend_no_page_alias): Define.
3389 2017-02-16 Alan Modra <amodra@gmail.com>
3392 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
3395 2017-02-16 Jiong Wang <jiong.wang@arm.com>
3397 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
3398 * bfd-in2.h: Regenerated.
3400 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
3403 * elf32-i386.c (elf_i386_relocate_section): Allow
3404 "lea foo@GOT, %reg" in PIC.
3406 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
3409 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
3410 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
3411 error against local IFUNC symbol without a base register for
3414 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
3416 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
3417 `%P: %H:' with `info->callbacks->einfo'.
3418 (ppc_elf_relocate_section): Likewise.
3419 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
3420 (ppc64_elf_edit_toc): Likewise.
3421 (ppc64_elf_relocate_section): Likewise.
3423 2017-02-14 Alan Modra <amodra@gmail.com>
3425 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
3426 --gc-keep-exported, and test versioned field of sym rather than
3427 looking for @ in name.
3429 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
3431 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
3434 2017-02-13 Nick Clifton <nickc@redhat.com>
3437 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
3440 2017-02-07 Andrew Waterman <andrew@sifive.com>
3442 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
3443 entry size if PLT header is written.
3445 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
3447 Fix sparc64 dynamic relocation processing to use the dynamic
3449 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
3450 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
3453 2017-02-03 Nick Clifton <nickc@redhat.com>
3456 * coffcode.h (coff_write_object_contents): Enlarge size of
3457 s_name_buf in order to avoid compile time warning about possible
3459 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
3460 32-bits of insn value before printing into buffer.
3462 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3464 * elfxx-mips.c (mips_elf_hash_sort_data): Add
3465 `max_local_dynindx'.
3466 (mips_elf_sort_hash_table): Handle it.
3467 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
3468 symbols bump up `max_local_dynindx' rather than
3469 `max_non_got_dynindx'.
3471 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3473 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
3474 `min_got_dynindx', `max_unref_got_dynindx' and
3475 `max_non_got_dynindx' members to the `bfd_size_type' data type.
3476 (mips_elf_sort_hash_table): Adjust accordingly.
3478 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3480 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
3481 to access the hash table.
3483 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3485 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
3486 non-NULL `htab' to the beginning.
3488 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3490 * elflink.c (elf_gc_sweep): Wrap overlong line.
3492 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
3494 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
3495 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
3496 * elfxx-mips.c (mips_elf_link_hash_table): Add
3497 `ignore_branch_isa' member.
3498 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
3499 in branch relocation calculation as an error if
3500 `ignore_branch_isa' has been set.
3501 (_bfd_mips_elf_insn32): Rename to...
3502 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
3503 parameter to `insn32' and add an `ignore_branch_isa' parameter.
3504 Handle the new parameter.
3506 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
3508 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
3509 local variable dynobj.
3512 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
3513 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
3514 executable from read-only sections into sdynrelro.
3515 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
3516 dynamic relocs in sdynrelro.
3517 (elf_backend_want_dynrelro): Define.
3519 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
3521 * config.bfd (*-*-rtemsaout*): Mark as removed.
3523 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
3525 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
3526 (arm-*-rtems*): Move to (arm*-*-eabi*).
3527 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
3528 (m68-*-rtems*): Move to (m68*-*-elf*).
3530 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
3532 * config.bfd (*-*-rtemscoff*): Mark as removed.
3534 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
3537 * elflink.c (bfd_elf_record_link_assignment): Revert last
3538 change and don't ever clear `forced_local'. Set `mark'
3540 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
3542 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
3543 (bfd_elf_size_dynamic_sections): ... here.
3544 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
3545 and set `mark' instead in `__tls_get_addr_opt' processing.
3546 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
3548 2017-01-24 Alan Modra <amodra@gmail.com>
3550 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
3551 where dynamic relocs are preferable. Allow ifunc too.
3552 (ensure_undefweak_dynamic): New function.
3553 (allocate_dynrelocs): Use it here. Move plt handling last and
3554 don't make symbols dynamic, simplifying loop. Only make undef
3555 weak symbols with GOT entries dynamic. Correct condition
3556 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
3557 comments. Remove goto.
3558 (ppc_elf_relocate_section): Correct test for using dynamic
3559 symbol on GOT relocs. Rearrange test for emitting GOT relocs
3560 to suit. Set up explicit tls_index entries and implicit GOT
3561 tls_index entries resolvable at link time for
3562 __tls_get_addr_opt. Simplify test to clear mem for prelink.
3563 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
3564 (ensure_undefweak_dynamic): New function.
3565 (allocate_dynrelocs): Use it here. Only make undef weak symbols
3566 with GOT entries dynamic. Remove unnecessary test of
3567 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
3568 (ppc64_elf_relocate_section): Correct test for using dynamic
3569 symbol on GOT relocs. Rearrange test for emitting GOT relocs
3570 to suit. Set up explicit tls_index entries and implicit GOT
3571 tls_index entries resolvable at link time for __tls_get_addr_opt.
3572 Simplify expression to clear mem for prelink.
3574 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
3576 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
3578 2017-01-20 Jiong Wang <jiong.wang@arm.com>
3580 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
3581 (elf_backend_hash_symbol): Define.
3583 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
3586 * elflink.c (bfd_elf_record_link_assignment): Clear any
3587 `forced_local' marking for DSO symbols that are not being
3590 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
3592 * elfnn-riscv.c (riscv_elf_object_p): New function.
3594 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
3597 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
3599 (elf_x86_64_check_relocs): Create .eh_frame section for the
3601 (elf_x86_64_size_dynamic_sections): Allocate and initialize
3602 .eh_frame section for the .plt.bnd section.
3603 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
3604 for the .plt.bnd section.
3606 2017-01-12 Nick Clifton <nickc@redhat.com>
3609 * opncls.c (find_separate_debug_file): Add include_dirs
3610 parameter. Only include the directory part of the bfd's filename
3611 in search paths if include_dirs is true. Add a couple of extra
3612 locations for looking for debug files.
3613 ( bfd_follow_gnu_debuglink): Update invocation of
3614 find_separate_debug_file.
3615 (bfd_follow_gnu_debugaltlink): Likewise.
3616 (get_build_id): New function: Finds the build-id of the given bfd.
3617 (get_build_id_name): New function: Computes the name of the
3618 separate debug info file for a bfd, based upon its build-id.
3619 (check_build_id_file): New function: Checks to see if a separate
3620 debug info file exists at the given location, and that its
3621 build-id matches that of the original bfd.
3622 (bfd_follow_build_id_debuglink): New function: Finds a separate
3623 debug info file for a given bfd by using the build-id method.
3624 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
3625 method of locating a separate debug info file before using the
3627 * bfd-in2.h: Regenerate.
3629 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
3632 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
3633 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
3634 elf_x86_64_eh_frame_plt_got.
3635 (elf_x86_64_size_dynamic_sections): Get unwind info from
3636 elf_x86_64_bnd_arch_bed for the BND PLT.
3638 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
3640 * config.bfd: Add entries for i686-redox and x86_64-redox.
3642 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
3644 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
3646 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
3647 .eh_frame section to 4 bytes for x32.
3648 (elf_x86_64_check_relocs): Likewise.
3650 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
3653 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
3654 (PLT_GOT_FDE_LENGTH): Likewise.
3655 (elf_i386_plt_layout): Add eh_frame_plt_got and
3656 eh_frame_plt_got_size.
3657 (elf_i386_plt): Updated.
3658 (elf_i386_link_hash_table): Add plt_got_eh_frame.
3659 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
3660 (elf_i386_size_dynamic_sections): Allocate and initialize
3661 .eh_frame section for .plt.got.
3662 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
3664 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
3665 eh_frame_plt_got_size.
3666 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
3667 (PLT_GOT_FDE_LENGTH): Likewise.
3668 (elf_x86_64_backend_data): Add eh_frame_plt_got and
3669 eh_frame_plt_got_size.
3670 (elf_x86_64_arch_bed): Updated.
3671 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
3672 eh_frame_plt_got_size.
3673 (elf_x86_64_nacl_arch_bed): Likewise.
3674 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
3675 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
3676 (elf_x86_64_size_dynamic_sections): Allocate and initialize
3677 .eh_frame section for .plt.got.
3678 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
3681 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
3683 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
3684 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
3686 2017-01-09 Nick Clifton <nickc@redhat.com>
3688 * dwarf2.c (lookup_address_in_function_table): Return early if
3689 there are no functions in the given comp unit, or if the high
3690 address of the last function in the comp unit is less than the
3693 2017-01-09 Nick Clifton <nickc@redhat.com>
3696 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
3697 message if there are too many symbols to load.
3699 2017-01-04 James Clarke <jrtc27@jrtc27.com>
3701 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
3702 if relocs are cached.
3704 2017-01-03 Rich Felker <bugdal@aerifal.cx>
3707 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
3708 for R_MICROBLAZE_GOTOFF_64.
3710 2017-01-03 Nick Clifton <nickc@redhat.com>
3712 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
3713 warning about using a possibly uninitialised variable.
3715 2017-01-02 Alan Modra <amodra@gmail.com>
3717 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
3718 (allocate_plt_static, allocate_dynrelocs): Use it.
3720 2017-01-02 Alan Modra <amodra@gmail.com>
3722 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
3723 .PARISC.unwind section.
3725 2017-01-02 Alan Modra <amodra@gmail.com>
3728 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
3729 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
3730 indirect to GOT pointer relative code edit.
3732 2017-01-02 Alan Modra <amodra@gmail.com>
3734 Update year range in copyright notice of all files.
3736 For older changes see ChangeLog-2016
3738 Copyright (C) 2017 Free Software Foundation, Inc.
3740 Copying and distribution of this file, with or without modification,
3741 are permitted in any medium without royalty provided the copyright
3742 notice and this notice are preserved.
3748 version-control: never