1 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
3 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
4 tls_get_addr for x86-64 in one place.
6 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
8 * configure.ac (bfd_backends): Add elf64-x86-64.lo together
9 with elfxx-x86.lo for 64-bit BFD.
10 * configure: Regenerated.
12 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
14 * elf32-i386.c (elf_i386_convert_load): Renamed to ...
15 (_bfd_i386_elf_convert_load): This. Remove static.
16 (elf_i386_size_dynamic_sections): Removed.
17 (elf_backend_size_dynamic_sections): Likewise.
18 * elf64-x86-64.c (elf_x86_64_convert_load): Renamed to ...
19 (_bfd_x86_64_elf_convert_load): This. Remove static.
20 (elf_x86_64_size_dynamic_sections): Removed.
21 (elf_backend_size_dynamic_sections): Likewise.
22 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): Renamed to ...
23 (elf_x86_allocate_dynrelocs): This. Make it static.
24 (_bfd_x86_elf_allocate_local_dynrelocs): Renamed to ...
25 (elf_x86_allocate_local_dynreloc): This. Make it static.
26 (elf_i386_is_reloc_section): New function.
27 (elf_x86_64_is_reloc_section): Likewise.
28 (_bfd_x86_elf_link_hash_table_create): Initialize convert_load,
29 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
30 Rearrange got_entry_size initialization.
31 (_bfd_x86_elf_size_dynamic_sections): New function.
32 * elfxx-x86.h (elf_x86_link_hash_table): Add convert_load,
33 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
34 (_bfd_i386_elf_convert_load): New.
35 (_bfd_x86_64_elf_convert_load): Likewise.
36 (_bfd_x86_elf_size_dynamic_sections): Likewise.
37 (elf_backend_size_dynamic_sections): Likewise.
38 (_bfd_x86_elf_allocate_dynrelocs): Removed.
39 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
41 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
43 * elfxx-x86.h (elf_x86_link_hash_table): Rearrange fields and
46 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
48 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
49 sgotplt_jump_table_size with elf_x86_compute_jump_table_size.
51 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
53 * elf32-i386.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
54 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Moved to ...
55 * elfxx-x86.h (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
56 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Here.
57 * elf64-x86-64.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
58 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Removed.
60 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
62 * elf32-i386.c (elf_i386_allocate_dynrelocs): Removed.
63 (elf_i386_allocate_local_dynrelocs): Likewise.
64 (elf_i386_size_dynamic_sections): Replace
65 elf_i386_allocate_dynrelocs/elf_i386_allocate_local_dynrelocs
66 with _bfd_x86_elf_allocate_dynrelocs and
67 _bfd_x86_elf_allocate_local_dynrelocs.
68 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Removed.
69 (elf_x86_64_allocate_local_dynrelocs): Likewise.
70 (elf_x86_64_size_dynamic_sections): Replace
71 elf_x86_64_allocate_dynrelocs/elf_x86_64_allocate_local_dynrelocs
72 with _bfd_x86_elf_allocate_dynrelocs and
73 _bfd_x86_elf_allocate_local_dynrelocs.
74 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): New function.
75 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
76 * elfxx-x86.h (_bfd_x86_elf_allocate_dynrelocs): New prototype.
77 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
79 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
81 * elf32-i386.c (is_i386_elf): Removed.
82 (elf_i386_check_relocs): Replace is_i386_elf with is_x86_elf.
83 (elf_i386_size_dynamic_sections): Likewise.
84 (elf_i386_relocate_section): Likewise.
85 * elf64-x86-64.c (is_x86_64_elf): Removed.
86 (elf_x86_64_check_relocs): Replace is_x86_64_elf with
88 (elf_x86_64_size_dynamic_sections): Likewise.
89 (elf_x86_64_relocate_section): Likewise.
90 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
92 * elfxx-x86.h (elf_x86_link_hash_table): Add target_id.
95 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
97 * elf32-i386.c (elf_i386_compute_jump_table_size): Removed.
98 (elf_i386_allocate_dynrelocs): Replace
99 elf_i386_compute_jump_table_size with
100 elf_x86_compute_jump_table_size.
101 (elf_i386_size_dynamic_sections): Likewise.
102 * elf64-x86-64.c (elf_x86_64_compute_jump_table_size): Removed.
103 (elf_x86_64_allocate_dynrelocs): Replace
104 elf_x86_64_compute_jump_table_size with
105 elf_x86_compute_jump_table_size.
106 (elf_x86_64_size_dynamic_sections): Likewise.
107 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
109 * elfxx-x86.h (elf_x86_link_hash_table): Add got_entry_size.
110 (elf_x86_compute_jump_table_size): New.
112 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
114 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
116 (_bfd_x86_elf_adjust_dynamic_symbol): Use sizeof_reloc.
117 * elfxx-x86.h (elf_x86_link_hash_table): Add sizeof_reloc.
119 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
121 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check VxWorks
122 with htab->is_vxworks.
123 (elf_i386_size_dynamic_sections): Likewise.
124 (elf_i386_relocate_section): Likewise.
125 (elf_i386_finish_dynamic_symbol): Likewise.
126 (elf_i386_finish_dynamic_sections): Likewise.
128 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
130 * elf32-i386.c (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
131 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
132 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Moved to ...
133 * elfxx-x86.h (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
134 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
135 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Here.
136 * elf64-x86-64.c (GOT_TLS_IE, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
137 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Removed.
139 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
142 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Check
143 ELF_COMMON_DEF_P for common symbols.
145 2017-09-02 Alan Modra <amodra@gmail.com>
147 * elf-eh-frame.c (offset_adjust): Avoid false positive gcc warning.
148 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Likewise.
149 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
151 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
153 * elf32-i386.c (elf_i386_gc_mark_hook): Removed.
154 (elf_backend_gc_mark_hook): Likewise.
155 * elf64-x86-64.c (elf_x86_64_gc_mark_hook): Likewise.
156 (elf_backend_gc_mark_hook): Likewise.
157 * elfxx-x86.c (_bfd_x86_elf_gc_mark_hook): New function.
158 * elfxx-x86.h (_bfd_x86_elf_gc_mark_hook): New.
159 (elf_backend_gc_mark_hook): Likewise.
161 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
163 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Removed.
164 (elf_backend_adjust_dynamic_symbol): Likewise.
165 * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.
166 (elf_backend_adjust_dynamic_symbol): Likewise.
167 * elfxx-x86.c (_bfd_x86_elf_adjust_dynamic_symbol): New function.
168 (_bfd_x86_elf_link_setup_gnu_properties): Copy is_vxworks.
169 * elfxx-x86.h (elf_x86_link_hash_table): Add is_vxworks.
170 (_bfd_x86_elf_adjust_dynamic_symbol): New.
171 (elf_backend_adjust_dynamic_symbol): Likewise.
173 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
175 * elfxx-x86.h (elf_x86_plt_layout_table): Fix a typo in
178 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
180 * elf32-i386.c (elf_i386_mkobject): Removed.
181 (bfd_elf32_mkobject): Likewise.
182 * elf64-x86-64.c (elf_x86_64_mkobject): Likewise.
183 (bfd_elf64_mkobject): Likewise.
184 (bfd_elf32_mkobject): Likewise.
185 * elfxx-x86.c (_bfd_x86_elf_mkobject): New function.
186 * elfxx-x86.h (_bfd_x86_elf_mkobject): New.
187 (bfd_elf64_mkobject): Likewise.
188 (bfd_elf32_mkobject): Likewise.
190 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
192 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Updated.
193 Call _bfd_x86_elf_link_setup_gnu_properties.
194 * elf64-x86-64.c (elf_x86_lazy_plt_layout): Initialize
195 pic_plt0_entry and pic_plt_entry fields with the non-PIC PLT
197 (elf_x86_64_non_lazy_plt): Likewise.
198 (elf_x86_64_lazy_bnd_plt): Likewise.
199 (elf_x86_64_non_lazy_bnd_plt): Likewise.
200 (elf_x86_64_lazy_ibt_plt): Likewise.
201 (elf_x32_lazy_ibt_plt): Likewise.
202 (elf_x86_64_non_lazy_ibt_plt): Likewise.
203 (elf_x32_non_lazy_ibt_plt): Likewise.
204 (elf_x86_64_nacl_plt): Likewise.
205 (elf_x86_64_link_setup_gnu_properties): Updated. Call
206 _bfd_x86_elf_link_setup_gnu_properties.
207 * elfxx-x86.c: Include elf-vxworks.h".
208 (_bfd_x86_elf_link_setup_gnu_properties): New function.
209 * elfxx-x86.h (elf_x86_lazy_plt_layout): Remove "for i386 only"
210 comments for pic_plt0_entry and pic_plt_entry.
211 (elf_x86_non_lazy_plt_layout): Likewise.
212 (elf_x86_plt_layout_table): New.
213 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
215 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
218 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Create
219 .eh_frame section for the second PLT.
220 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Correct
221 alignment of .eh_frame section for the second PLT.
223 2017-09-01 Nick Clifton <nickc@redhat.com>
226 * dwarf2.c (decode_line_info): Fix test for an overlong line info
229 2017-09-01 Nick Clifton <nickc@redhat.com>
232 * elf-attrs.c (_bfd_elf_parse_attributes): Ensure that the
233 attribute buffer is NUL terminated.
235 2017-08-31 Nick Clifton <nickc@redhat.com>
238 * dwarf2.c (read_section): If necessary add a terminating NUL byte
239 to dwarf string sections.
241 2017-08-31 Alan Modra <amodra@gmail.com>
243 * po/SRC-POTFILES.in: Regenerate.
245 2017-08-31 Alan Modra <amodra@gmail.com>
247 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Don't exit early
248 for a section containing just a terminator. Allow multiple
249 terminators at end of section.
250 * elflink.c (bfd_elf_discard_info): Iterate over .eh_frame
251 sections when not adding alignment. Assert on terminator in
254 2017-08-31 Alan Modra <amodra@gmail.com>
258 * elflink.c (bfd_elf_discard_info): Don't pad embedded zero
261 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
263 * configure.ac (bfd_backends): Add elf64.lo together with
264 elfxx-x86.lo for 64-bit BFD.
265 * configure: Regenerated.
267 2017-08-31 James Bowman <james.bowman@ftdichip.com>
269 * elf32-ft32.c (ft32_elf_howto_table): Use complain_overflow_dont
272 2017-08-31 Alan Modra <amodra@gmail.com>
275 * opncls.c (bfd_close_all_done): Don't call bfd_cache_close
276 before _close_and_cleanup. Call iovec->bclose after.
277 (bfd_close): Remove code common to, and call, bfd_close_all_done.
279 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
281 * elf32-i386.c (elf_i386_plt_type): Removed.
282 (elf_i386_plt): Likewise.
283 (elf_i386_get_synthetic_symtab): Updated. Call
284 _bfd_x86_elf_get_synthetic_symtab.
285 * elf64-x86-64.c (elf_x86_64_plt_type): Removed.
286 (elf_x86_64_plt): Likewise.
287 (elf_x86_64_get_synthetic_symtab): Updated. Call
288 _bfd_x86_elf_get_synthetic_symtab.
289 * elfxx-x86.c (elf_i386_get_plt_got_vma): New function.
290 (elf_x86_64_get_plt_got_vma): Likewise.
291 (elf_i386_valid_plt_reloc_p): Likewise.
292 (elf_x86_64_valid_plt_reloc_p): Likewise.
293 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
294 * elfxx-x86.h (elf_x86_plt_type): New.
295 (elf_x86_plt): Likewise.
296 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
298 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
300 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Check
301 target_id instead of elf_machine_code.
303 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
305 * elf32-i386.c (ELF_DYNAMIC_INTERPRETER): Removed.
306 (elf_i386_lazy_plt_layout): Likewise.
307 (elf_i386_non_lazy_plt_layout): Likewise.
308 (elf_i386_plt_layout): Likewise.
309 (elf_i386_link_hash_table): Likewise.
310 (elf_i386_next_tls_desc_index): Likewise.
311 (elf_i386_srelplt2): Likewise.
312 (elf_i386_plt): Likewise.
313 (elf_i386_lazy_plt): Likewise.
314 (elf_i386_non_lazy_plt): Likewise.
315 (elf_i386_link_hash_table_create): Likewise.
316 (bfd_elf32_bfd_link_hash_table_create): Likewise.
317 (elf_i386_lazy_plt): Updated.
318 (elf_i386_non_lazy_plt): Likewise.
319 (elf_i386_lazy_ibt_plt): Likewise.
320 (elf_i386_non_lazy_ibt_plt): Likewise.
321 (elf_i386_allocate_dynrelocs): Likewise.
322 (elf_i386_size_dynamic_sections): Likewise.
323 (elf_i386_relocate_section): Likewise.
324 (elf_i386_finish_dynamic_symbol): Likewise.
325 (elf_i386_finish_dynamic_sections): Likewise.
326 (elf_i386_get_synthetic_symtab): Likewise.
327 (elf_i386_link_setup_gnu_properties): Likewise.
328 (elf_i386_nacl_plt): Likewise.
329 * elf64-x86-64.c (ABI_64_P): Removed.
330 (ELF64_DYNAMIC_INTERPRETER): Likewise.
331 (ELF32_DYNAMIC_INTERPRETER): Likewise.
332 (elf_x86_64_lazy_plt_layout): Likewise.
333 (elf_x86_64_non_lazy_plt_layout): Likewise.
334 (elf_x86_64_plt_layout): Likewise.
335 (elf_x86_64_link_hash_table): Likewise.
336 (elf_x86_64_plt): Likewise.
337 (elf_x86_64_lazy_plt): Likewise.
338 (elf_x86_64_non_lazy_plt): Likewise.
339 (elf_x86_64_link_hash_table_create): Likewise.
340 (bfd_elf64_bfd_link_hash_table_create): Likewise.
341 (bfd_elf32_bfd_link_hash_table_create): Likewise.
342 (elf_x86_64_lazy_plt): Updated.
343 (elf_x86_64_non_lazy_plt): Likewise.
344 (elf_x86_64_lazy_bnd_plt): Likewise.
345 (elf_x86_64_non_lazy_bnd_plt): Likewise.
346 (elf_x86_64_lazy_ibt_plt): Likewise.
347 (elf_x32_lazy_ibt_plt): Likewise.
348 (elf_x86_64_non_lazy_ibt_plt): Likewise.
349 (elf_x32_non_lazy_ibt_plt): Likewise.
350 (elf_x86_64_allocate_dynrelocs): Likewise.
351 (elf_x86_64_size_dynamic_sections): Likewise.
352 (elf_x86_64_relocate_section): Likewise.
353 (elf_x86_64_finish_dynamic_symbol): Likewise.
354 (elf_x86_64_finish_dynamic_sections): Likewise.
355 (elf_x86_64_get_synthetic_symtab): Likewise.
356 (elf_x86_64_link_setup_gnu_properties): Likewise.
357 (elf_x86_64_nacl_plt): Likewise.
358 * elfxx-x86.c: Include "objalloc.h", "elf/i386.h" and
360 (ELF32_DYNAMIC_INTERPRETER): New.
361 (ELF64_DYNAMIC_INTERPRETER): Likewise.
362 (ELFX32_DYNAMIC_INTERPRETER): Likewise.
363 (_bfd_x86_elf_link_hash_table_create): Likewise.
364 (_bfd_x86_elf_link_hash_table_free): Renamed to ...
365 (elf_x86_link_hash_table_free): This. Make it static.
366 * elfxx-x86.h: Don't include "objalloc.h".
368 (elf_x86_lazy_plt_layout): Likewise.
369 (elf_x86_non_lazy_plt_layout): Likewise.
370 (elf_x86_plt_layout): Likewise.
371 (_bfd_x86_elf_link_hash_table_create): Likewise.
372 (bfd_elf64_bfd_link_hash_table_create): Likewise.
373 (bfd_elf32_bfd_link_hash_table_create): Likewise.
374 (elf_x86_link_hash_table): Add plt, lazy_plt, non_lazy_plt,
375 srelplt2 and next_tls_desc_index.
376 (_bfd_x86_elf_link_hash_table_free): Removed.
378 2017-08-30 Maciej W. Rozycki <macro@imgtec.com>
380 * elfxx-mips.c (mips_elf_perform_relocation): Correct microMIPS
381 branch offset interpretation.
383 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
386 * opncls.c (bfd_close_all_done): Call _close_and_cleanup.
388 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
390 * elf64-x86-64.c (elf_x86_64_next_tls_desc_index): Removed.
391 (elf_x86_64_srelplt2): Likewise.
393 2017-08-30 Alan Modra <amodra@gmail.com>
395 * elf64-ppc.c (struct ppc_link_hash_table): Add do_tls_opt.
396 (ppc64_elf_tls_optimize): Set it.
397 (ppc64_elf_relocate_section): Nop addis on TPREL16_HA, and convert
398 insn on TPREL16_LO and TPREL16_LO_DS relocs to use r13 when
399 addis would add zero.
400 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add do_tls_opt.
401 (ppc_elf_tls_optimize): Set it.
402 (ppc_elf_relocate_section): Nop addis on TPREL16_HA, and convert
403 insn on TPREL16_LO relocs to use r2 when addis would add zero.
405 2017-08-30 Alan Modra <amodra@gmail.com>
407 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing
408 __tls_get_addr call sequences to LE, don't move the addi down
409 to the nop. Replace the bl with addi and leave the nop alone.
411 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
413 * elf32-i386.c (elf_i386_pie_finish_undefweak_symbol):
415 * elf64-x86-64.c (elf_x86_64_finish_local_dynamic_symbol):
417 (elf_x86_64_pie_finish_undefweak_symbol): Likewise.
419 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
421 * Makefile.am (BFD32_BACKENDS): Add elfxx-x86.lo.
422 (BFD64_BACKENDS): Likewise.
423 (BFD32_BACKENDS_CFILES): Add elfxx-x86.c.
424 (BFD64_BACKENDS_CFILES): Likewise.
425 * Makefile.in: Regenerated.
426 * configure.ac (bfd_backends): Add elfxx-x86.lo together with
427 elf32-i386.lo and elf64-x86-64.lo.
428 * configure: Regenerated.
429 * elf32-i386.c: Include "elfxx-x86.h" instead of "sysdep.h",
430 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
431 "objalloc.h" and "hashtab.h".
432 (ELIMINATE_COPY_RELOCS): Removed.
433 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
434 (SYMBOL_NO_COPYRELOC): Likewise.
435 (elf_i386_link_hash_entry): Likewise.
436 (GOT_UNKNOWN): Likewise.
437 (GOT_NORMAL): Likewise.
438 (GOT_TLS_GD): Likewise.
439 (elf_i386_hash_entry): Likewise.
440 (elf_i386_obj_tdata): Likewise.
441 (elf_i386_tdata): Likewise.
442 (elf_i386_local_got_tls_type): Likewise.
443 (elf_i386_local_tlsdesc_gotent): Likewise.
444 (elf_i386_hash_table): Likewise.
445 (elf_i386_link_hash_newfunc): Likewise.
446 (elf_i386_local_htab_hash): Likewise.
447 (elf_i386_local_htab_eq): Likewise.
448 (elf_i386_get_local_sym_hash): Likewise.
449 (elf_i386_link_hash_table_free): Likewise.
450 (elf_i386_copy_indirect_symbol): Likewise.
451 (elf_i386_fixup_symbol): Likewise.
452 (elf_i386_readonly_dynrelocs): Likewise.
453 (elf_i386_always_size_sections): Likewise.
454 (elf_i386_set_tls_module_base): Likewise.
455 (elf_i386_dtpoff_base): Likewise.
456 (compare_relocs): Likewise.
457 (elf_i386_hash_symbol): Likewise.
458 (elf_i386_parse_gnu_properties): Likewise.
459 (elf_i386_merge_gnu_properties): Likewise.
460 (elf_i386_link_check_relocs): Likewise.
461 (elf_i386_merge_symbol_attribute): Likewise.
462 (bfd_elf32_bfd_link_check_relocs): Likewise.
463 (elf_backend_copy_indirect_symbol): Likewise.
464 (elf_backend_always_size_sections): Likewise.
465 (elf_backend_omit_section_dynsym): Likewise.
466 (elf_backend_hash_symbol): Likewise.
467 (elf_backend_fixup_symbol): Likewise.
468 (elf_backend_parse_gnu_properties): Likewise.
469 (elf_backend_merge_gnu_properties): Likewise.
470 (elf_backend_merge_symbol_attribute): Likewise.
471 (elf_i386_mkobject): Updated.
472 (elf_i386_link_hash_table_create): Likewise.
473 (elf_i386_check_tls_transition): Likewise.
474 (elf_i386_tls_transition): Likewise.
475 (elf_i386_convert_load_reloc): Likewise.
476 (elf_i386_check_relocs): Likewise.
477 (elf_i386_adjust_dynamic_symbol): Likewise.
478 (elf_i386_allocate_dynrelocs): Likewise.
479 (elf_i386_convert_load): Likewise.
480 (elf_i386_size_dynamic_sections): Likewise.
481 (elf_i386_relocate_section): Likewise.
482 (elf_i386_finish_dynamic_symbol ): Likewise.
483 (elf_i386_finish_dynamic_sections): Likewise.
484 (elf_i386_output_arch_local_syms): Likewise.
485 (elf_i386_get_synthetic_symtab): Likewise.
486 (elf_i386_link_setup_gnu_properties): Likewise.
487 (elf_i386_link_hash_table): Use elf_x86_link_hash_table, instead
488 of elf_link_hash_table, as base.
489 (elf_i386_next_tls_desc_index): New.
490 (elf_i386_srelplt2): Likewise.
491 (elf_i386_plt): Likewise.
492 (elf_i386_lazy_plt): Likewise.
493 (elf_i386_non_lazy_plt): Likewise.
494 * elf32-x86-64.c: Include "elfxx-x86.h" instead of "sysdep.h",
495 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
496 "objalloc.h" and "hashtab.h".
497 (ELIMINATE_COPY_RELOCS): Removed.
498 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
499 (SYMBOL_NO_COPYRELOC): Likewise.
500 (elf_x86_64_link_hash_entry): Likewise.
501 (GOT_UNKNOWN): Likewise.
502 (GOT_NORMAL): Likewise.
503 (GOT_TLS_GD): Likewise.
504 (elf_x86_64_hash_entry): Likewise.
505 (elf_x86_64_obj_tdata): Likewise.
506 (elf_x86_64_tdata): Likewise.
507 (elf_x86_64_local_got_tls_type): Likewise.
508 (elf_x86_64_local_tlsdesc_gotent): Likewise.
509 (elf_x86_64_hash_table): Likewise.
510 (elf_x86_64_link_hash_newfunc): Likewise.
511 (elf_x86_64_local_htab_hash): Likewise.
512 (elf_x86_64_local_htab_eq): Likewise.
513 (elf_x86_64_get_local_sym_hash): Likewise.
514 (elf_x86_64_link_hash_table_free): Likewise.
515 (elf_x86_64_copy_indirect_symbol): Likewise.
516 (elf_x86_64_fixup_symbol): Likewise.
517 (elf_x86_64_readonly_dynrelocs): Likewise.
518 (elf_x86_64_always_size_sections): Likewise.
519 (elf_x86_64_set_tls_module_base): Likewise.
520 (elf_x86_64_dtpoff_base): Likewise.
521 (compare_relocs): Likewise.
522 (elf_x86_64_merge_symbol_attribute): Likewise.
523 (elf_x86_64_hash_symbol): Likewise.
524 (elf_x86_64_parse_gnu_properties): Likewise.
525 (elf_x86_64_merge_gnu_properties): Likewise.
526 (elf_x86_64_link_check_relocs): Likewise.
527 (elf_backend_copy_indirect_symbol): Likewise.
528 (elf_backend_always_size_sections): Likewise.
529 (bfd_elf64_bfd_link_check_relocs): Likewise.
530 (elf_backend_merge_symbol_attribute): Likewise.
531 (elf_backend_hash_symbol): Likewise.
532 (elf_backend_omit_section_dynsym): Likewise.
533 (elf_backend_fixup_symbol): Likewise.
534 (elf_backend_parse_gnu_properties): Likewise.
535 (elf_backend_merge_gnu_properties): Likewise.
536 (bfd_elf32_bfd_link_check_relocs): Likewise.
537 (elf_x86_64_mkobject): Updated.
538 (elf_x86_64_link_hash_table_create): Likewise.
539 (elf_x86_64_check_tls_transition): Likewise.
540 (elf_x86_64_tls_transition): Likewise.
541 (elf_x86_64_convert_load_reloc): Likewise.
542 (elf_x86_64_check_relocs): Likewise.
543 (elf_x86_64_adjust_dynamic_symbol): Likewise.
544 (elf_x86_64_allocate_dynrelocs): Likewise.
545 (elf_x86_64_convert_load): Likewise.
546 (elf_x86_64_size_dynamic_sections): Likewise.
547 (elf_x86_64_relocate_section): Likewise.
548 (elf_x86_64_finish_dynamic_symbol ): Likewise.
549 (elf_x86_64_finish_dynamic_sections): Likewise.
550 (elf_x86_64_output_arch_local_syms): Likewise.
551 (elf_x86_64_get_synthetic_symtab): Likewise.
552 (elf_x86_64_link_setup_gnu_properties): Likewise.
553 (elf_x86_64_link_hash_table): Use elf_x86_link_hash_table,
554 instead of elf_link_hash_table, as base.
555 (elf_x86_64_next_tls_desc_index): New.
556 (elf_x86_64_srelplt2): Likewise.
557 (elf_x86_64_plt): Likewise.
558 (elf_x86_64_lazy_plt): Likewise.
559 (elf_x86_64_non_lazy_plt): Likewise.
560 * elfxx-x86.c: New file.
561 * elfxx-x86.h: Likewise.
563 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
565 * elf32-i386.c (elf_i386_get_synthetic_symtab): Simplify bad
567 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
569 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
571 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check valid PLT
572 sections before checking dynamic relocations and free invalid
573 PLT section contents.
574 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
576 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
578 * elf-bfd.h (_bfd_elf_ifunc_get_synthetic_symtab): Removed.
579 * elf-ifunc.c (_bfd_elf_ifunc_get_synthetic_symtab): Likewise.
581 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
584 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check for valid
586 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
588 2017-08-27 H.J. Lu <hongjiu.lu@intel.com>
590 * elf32-i386.c (elf_i386_link_hash_newfunc): Initialize
592 * elf64-x86-64.c (elf_x86_64_link_hash_newfunc): Likewise.
594 2017-08-26 H.J. Lu <hongjiu.lu@intel.com>
597 * elf-bfd.h (elf_obj_tdata): Use ENUM_BITFIELD on object_id,
598 dyn_lib_class and has_gnu_symbols. Change bad_symtab to bitfield.
599 Add a has_no_copy_on_protected bitfield.
600 (elf_has_no_copy_on_protected): New.
601 * elf-properties.c (_bfd_elf_parse_gnu_properties): Set
602 elf_has_no_copy_on_protected for GNU_PROPERTY_NO_COPY_ON_PROTECTED.
603 (elf_merge_gnu_property_list): Likewise.
604 (_bfd_elf_link_setup_gnu_properties): Set extern_protected_data
605 to FALSE for elf_has_no_copy_on_protected.
606 * elf32-i386.c (SYMBOL_NO_COPYRELOC): New.
607 (elf_i386_link_hash_entry): Add def_protected.
608 (elf_i386_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
609 when checking info->nocopyreloc.
610 (elf_i386_link_setup_gnu_properties): Don't set
611 extern_protected_data here.
612 (elf_i386_merge_symbol_attribute): New function.
613 (elf_backend_merge_symbol_attribute): New.
614 * elf64-x86-64.c (SYMBOL_NO_COPYRELOC): New.
615 (elf_x86_64_link_hash_entry): Add def_protected.
616 (elf_x86_64_need_pic): Report protected symbol for def_protected.
617 (elf_x86_64_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
618 when checking info->nocopyreloc.
619 (elf_x86_64_relocate_section): Also check for R_X86_64_PC32
620 relocation run-time overflow and unresolvable R_X86_64_32S
621 relocation against protected data symbol defined in shared object
622 with GNU_PROPERTY_NO_COPY_ON_PROTECTED.
623 (elf_x86_64_link_setup_gnu_properties): Don't set
624 extern_protected_data here.
625 (elf_x86_64_merge_symbol_attribute): New function.
626 (elf_backend_merge_symbol_attribute): New.
628 2017-08-26 Alan Modra <amodra@gmail.com>
630 * elf32-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
631 (ppc_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
632 (ppc_elf_relocate_section): Comment fix.
633 * elf64-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
634 (ppc64_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
635 Support dynamic relocs for TPREL16 when non-pic too.
636 (dec_dynrel_count): Adjust TPREL16 handling as per check_relocs.
637 (ppc64_elf_relocate_section): Support dynamic relocs for TPREL16
640 2017-08-25 H.J. Lu <hongjiu.lu@intel.com>
642 * elf32-i386.c (elf_i386_link_hash_entry): Remove redundant
643 "symbol" in comments.
644 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Likewise.
646 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
649 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for
650 R_X86_64_PC32 relocation run-time overflow and unresolvable
651 R_X86_64_32S relocation with -z nocopyreloc.
653 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
655 * elf32-i386.c (elf_i386_check_relocs): Revert the last change.
656 Undefined symbols may not have a type.
657 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
659 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
661 * elf64-x86-64.c (elf_x86_64_need_pic): Add an argument for
662 bfd_link_info. Report shared, PIE or PDE object based on
664 (elf_x86_64_check_relocs): Update elf_x86_64_need_pic call.
665 (elf_x86_64_relocate_section): Likewise.
667 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
669 * elf32-i386.c (elf_i386_check_relocs): Increment PLT count only
670 for function symbols.
671 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
673 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
675 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set
676 extern_protected_data to FALSE if GNU_PROPERTY_NO_COPY_ON_PROTECTED
677 is set on any input relocatable file.
678 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
680 2017-08-23 Alan Modra <amodra@gmail.com>
683 * elf64-ppc.c (ensure_undef_dynamic): Rename from
684 ensure_undefweak_dynamic. Handle undefined too.
685 * elf32-ppc.c (ensure_undef_dynamic): Likewise.
686 * elf32-hppa.c (ensure_undef_dynamic): Likewise.
687 (allocate_dynrelocs): Discard undefined non-default visibility
688 relocs first. Make undefined syms dynamic. Tidy goto.
690 2017-08-21 Alan Modra <amodra@gmail.com>
691 H.J. Lu <hongjiu.lu@intel.com>
694 * elf-bfd.h (SYMBOLIC_BIND): Return TRUE for __start/__stop symbols.
695 * elflink.c (bfd_elf_define_start_stop): Rewrite.
697 2017-08-21 Hans-Peter Nilsson <hp@bitrange.com>
700 * elf64-mmix.c (mmix_elf_relax_section): Correct handling of
701 undefined weak symbols.
703 2017-08-18 Nick Clifton <nickc@redhat.com>
706 * tekhex.c (getsym): Fix check for source pointer walking off the
707 end of the input buffer.
709 2017-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
712 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Skip IFUNC
713 relocations in debug sections, change abort to _bfd_error_handler.
715 2017-08-14 Nick Clifton <nickc@redhat.com>
718 * elf.c (setup_group): Check for an empty or very small group
720 * po/bfd.pot: Regenerate.
722 2017-08-14 Alan Modra <amodra@gmail.com>
725 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't add
726 alignment padding here.
727 * elflink.c (bfd_elf_discard_info): Add .eh_frame padding here
728 in a reverse pass over sections.
730 2017-08-11 H.J. Lu <hongjiu.lu@intel.com>
733 * elf32-i386.c (elf_i386_get_synthetic_symtab): Allocate space
734 for @plt suffixes first.
735 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
737 2017-08-08 Nick Clifton <nickc@redhat.com>
740 * elf-attrs.c (_bfd_elf_parse_attributes): Complain about very
741 small section lengths.
742 * elf.c (_bfd_elf_setup_sections): Skip empty entries in the group
744 (elfcore_grok_freebsd_prstatus): Add checks to make sure that
745 there is enough data present in the note.
747 2017-08-08 Alan Modra <amodra@gmail.com>
750 * elf32-microblaze.c (microblaze_elf_check_relocs): Don't bump
751 got.refcount for GOTOFF relocs, just create .got section.
753 2017-08-07 H.J. Lu <hongjiu.lu@intel.com>
755 * elflink.c (elf_link_add_object_symbols): Move common symbol
756 check after bed->common_definition.
758 2017-08-07 Alan Modra <amodra@gmail.com>
761 * elflink.c (bfd_elf_final_link): Don't segfault when sections
762 needed to define various dynamic tags have been discarded.
764 2017-08-07 Nick Clifton <nickc@redhat.com>
767 * elf32-i386.c (elf_i386_link_setup_gnu_properties): If the dynobj
768 has not been set then use the bfd returned by
769 _bfd_elf_link_setup_gnu_properties. If that is null then search
770 through all the input bfds selecting the first normal, ELF format
772 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
774 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
776 * elf32-i386.c (elf_i386_link_hash_entry): Change tls_get_addr
778 (elf_i386_link_hash_newfunc): Initialize tls_get_addr to 0.
779 (elf_i386_check_tls_transition): Check tls_get_addr directly.
780 (elf_i386_convert_load_reloc): Update tls_get_addr check.
781 (elf_i386_link_check_relocs): New function.
782 (bfd_elf32_bfd_link_check_relocs): New.
783 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Change tls_get_addr
785 (elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 0.
786 (elf_x86_64_check_tls_transition): Check tls_get_addr directly.
787 (elf_x86_64_convert_load_reloc): Update tls_get_addr check.
788 (elf_x86_64_link_check_relocs): New function.
789 (bfd_elf64_bfd_link_check_relocs): New.
790 (bfd_elf32_bfd_link_check_relocs): Likewise.
792 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
795 * elflink.c (elf_link_add_object_symbols): Treat common symbol
796 as undefined for --no-define-common.
798 2017-08-05 Alan Modra <amodra@gmail.com>
800 * elf32-hppa.c (elf32_hppa_set_gp): Don't require an
801 hppa_link_hash_table.
803 2017-08-02 Max Filippov <jcmvbkbc@gmail.com>
805 * xtensa-isa.c (xtensa_isa_init): Don't update lookup table
806 entries for sysregs with negative indices.
808 2017-08-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
810 * elf32-s390.c (elf_s390_finish_dynamic_sections): Skip if it
811 isn't the S/390 specific elf data.
812 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
814 2017-07-31 Kuan-Lin Chen <rufus@andestech.com>
816 * elfxx-riscv.c (riscv_elf_add_sub_reloc): New function.
817 * (howto_table) [R_RISCV_ADD8]: Use riscv_elf_add_sub_reloc.
818 [R_RISCV_ADD16]: Likewise.
819 [R_RISCV_ADD32]: Likewise.
820 [R_RISCV_ADD64]: Likewise.
821 [R_RISCV_SUB6]: Likewise.
822 [R_RISCV_SUB8]: Likewise.
823 [R_RISCV_SUB16]: Likewise.
824 [R_RISCV_SUB32]: Likewise.
825 [R_RISCV_SUB64]: Likewise.
827 2017-07-31 Alan Modra <amodra@gmail.com>
829 * elf64-ppc.c (ppc64_elf_tls_setup): Warn on --plt-localentry
830 without ld.so checks.
832 2017-07-29 Alan Modra <amodra@gmail.com>
835 * elf64-ppc.c (struct ppc_link_hash_entry): Add non_zero_localentry.
836 (ppc64_elf_merge_symbol): Set non_zero_localentry.
837 (is_elfv2_localentry0): Test non_zero_localentry.
838 (ppc64_elf_tls_setup): Default to --no-plt-localentry.
840 2017-07-28 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
842 * elf32-s390.c (elf_s390_finish_dynamic_sections): Add NULL
843 pointer check for htab->elf.irelplt.
844 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
846 2017-07-27 Nick Clifton <nickc@redhat.com>
849 * mach-o.c (bfd_mach_o_read_symtab_strtab): Fail if the symtab
851 * nlmcode.h (nlm_swap_auxiliary_headers_in): Replace assertion
853 * section.c (bfd_make_section_with_flags): Fail if the name or bfd
855 * vms-alpha.c (bfd_make_section_with_flags): Correct computation
857 (evax_bfd_print_emh): Check for invalid string lengths.
859 2017-07-25 Nick Clifton <nickc@redhat.com>
861 * po/fr.po: Updated French translation.
863 2017-07-25 Benjamin Green <bengreen5mx@gmail.com>
866 * elf32-msp430.c (msp430_elf_relax_section): Allow conversion of
867 16-bit absolute branches into 10-bit pc-relative branches on the
868 MSP430 as well as the MSP430X.
870 2017-07-25 Alan Modra <amodra@gmail.com>
872 * elf64-ppc.c (struct map_stub): Add tls_get_addr_opt_bctrl.
873 (stub_eh_frame_size): New function.
874 (ppc_size_one_stub): Set group tls_get_addr_opt_bctrl.
875 (group_sections): Init group tls_get_addr_opt_bctrl.
876 (ppc64_elf_size_stubs): Update sizing and initialization of
877 .eh_frame. Iteration over stubs via group list.
878 (ppc64_elf_build_stubs): Iterate over stubs via group list.
879 (ppc64_elf_finish_dynamic_sections): Update finalization of
882 2017-07-24 Nick Clifton <nickc@redhat.com>
885 * mach-o.c (bfd_mach_o_canonicalize_relocs): Pass the base address
886 of the relocs to the canonicalize_one_reloc routine.
887 * mach-o.h (struct bfd_mach_o_backend_data): Update the prototype
888 for the _bfd_mach_o_canonicalize_one_reloc field.
889 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add
890 res_base parameter. Use to check for corrupt pair relocs.
891 * mach-o-aarch64.c (bfd_mach_o_arm64_canonicalize_one_reloc):
893 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc):
895 * mach-o-x86-64.c (bfd_mach_o_x86_64_canonicalize_one_reloc):
898 * vms-alpha.c (_bfd_vms_slurp_eihd): Make sure that there is
899 enough data in the record before attempting to parse it.
900 (_bfd_vms_slurp_eeom): Likewise.
902 (_bfd_vms_slurp_egsd): Check for an invalid section index.
903 (image_set_ptr): Likewise.
904 (alpha_vms_slurp_relocs): Likewise.
906 (alpha_vms_object_p): Check for a truncated record.
908 2017-07-24 Nick Clifton <nickc@redhat.com>
911 * reloc.c (_bfd_unrecognized_reloc): New function. Reports
912 an unrecognized reloc and sets the bfd_error value.
913 * libbfd.h: Regenerate.
914 * elf32-arm.c (elf32_arm_final_link_relocate): Use the new
916 * elf32-i386.c (elf_i386_relocate_section): Likewise.
917 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
918 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
919 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.
920 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
922 2017-07-23 Alan Modra <amodra@gmail.com>
924 * elf64-ppc.c (ppc64_elf_size_stubs): Correct advance to
927 2017-07-19 Szabolcs Nagy <szabolcs.nagy@arm.com>
930 * elfnn-aarch64.c (elfNN_aarch64_reloc_type_class): Return
931 reloc_class_ifunc for ifunc symbols.
933 2017-07-19 Nick Clifton <nickc@redhat.com>
936 * archive.c (bfd_generic_archive_p): If the bfd does not have the
937 correct magic bytes at the start, set the error to wrong format
938 and clear the format selector before returning NULL.
940 2017-07-19 Nick Clifton <nickc@redhat.com>
943 * coff-rs6000.c (_bfd_strntol): New function.
944 (_bfd_strntoll): New function.
945 (GET_VALUE_IN_FIELD): New macro.
946 (EQ_VALUE_IN_FIELD): new macro.
947 (_bfd_xcoff_slurp_armap): Use new macros.
948 (_bfd_xcoff_archive_p): Likewise.
949 (_bfd_xcoff_read_ar_hdr): Likewise.
950 (_bfd_xcoff_openr_next_archived_file): Likewise.
951 (_bfd_xcoff_stat_arch_elt): Likewise.
952 * coff64-rs6000.c (_bfd_strntol): New function.
953 (_bfd_strntoll): New function.
954 (GET_VALUE_IN_FIELD): New macro.
955 (xcoff64_slurp_armap): Use new macros.
957 2017-07-19 Claudiu Zissulescu <claziss@synopsys.com>
958 John Eric Martin <John.Martin@emmicro-us.com>
960 * bfd-in2.h: Regenerate.
961 * libbfd.h: Regenerate.
962 * elf32-arc.c (JLI): Define.
963 * reloc.c: Add JLI relocations.
965 2017-07-18 Nick Clifton <nickc@redhat.com>
968 * coff-sh.c: Fix spelling typos.
969 * compress.c: Likewise.
970 * cpu-pdp11.c: Likewise.
971 * ecofflink.c: Likewise.
972 * elf-m10300.c: Likewise.
974 * elf32-arm.c: Likewise.
975 * elf32-m68k.c: Likewise.
976 * elf32-nds32.c: Likewise.
977 * elf32-ppc.c: Likewise.
978 * elf32-sh.c: Likewise.
979 * elf32-v850.c: Likewise.
980 * elf64-ppc.c: Likewise.
981 * elf64-x86-64.c: Likewise.
982 * elflink.c: Likewise.
983 * elfnn-aarch64.c: Likewise.
984 * elfxx-mips.c: Likewise.
987 * vms-alpha.c: Likewise.
988 * xcofflink.c: Likewise.
990 2017-07-18 Nick Clifton <nickc@redhat.com>
993 * coffcode.h (handle_COMDAT): Replace abort with an error message
996 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
999 * elf64-x86-64.c (elf_x86_64_relocate_section): Limit PIC check
1002 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
1004 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
1006 2017-07-16 Alan Modra <amodra@gmail.com>
1008 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimize
1009 __tls_index GOT entries when using __tls_get_addr_opt stub.
1010 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1012 2017-07-12 Alan Modra <amodra@gmail.com>
1014 * po/es.po: Update from translationproject.org/latest/bfd/.
1015 * po/fi.po: Likewise.
1016 * po/fr.po: Likewise.
1017 * po/id.po: Likewise.
1018 * po/ja.po: Likewise.
1019 * po/ro.po: Likewise.
1020 * po/ru.po: Likewise.
1021 * po/sr.po: Likewise.
1022 * po/sv.po: Likewise.
1023 * po/tr.po: Likewise.
1024 * po/uk.po: Likewise.
1025 * po/vi.po: Likewise.
1026 * po/zh_CN.po: Likewise.
1027 * po/hr.po: New file from translationproject.org.
1028 * configure.ac (ALL_LINGUAS): Add hr. Sort.
1029 * configure: Regenerate.
1031 2017-07-12 Nick Clifton <nickc@redhat.com>
1033 Fix compile time warnings using gcc 7.1.1.
1034 * elf32-xtensa.c (elf_xtensa_get_plt_section): Increase length of
1036 (elf_xtensa_get_gotplt_section): Increase length of got_name
1038 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add a
1039 default return of FALSE.
1040 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc): Add a
1041 default return of FALSE.
1043 2017-07-12 Alan Modra <amodra@gmail.com>
1045 * binary.c (binary_set_section_contents): Don't print filepos in
1047 (coff_write_object_contents): Cast size_t for error message.
1048 (coff_slurp_line_table): Don't use bfd_vma symndx.
1049 (coff_slurp_reloc_table): Remove unneeded cast.
1050 * dwarf2.c (read_section): Cast bfd_int64_t to long long for
1052 (find_abstract_instance_name): Likewise.
1053 * elf32-arm.c (arm_type_of_stub): Correct error arg order.
1054 (bfd_elf32_arm_stm32l4xx_erratum_scan): Don't cast error arg.
1055 (elf32_arm_check_relocs): Make r_symndx an int.
1056 * elf32-cris.c (cris_elf_check_relocs): Delete extraneous %s in
1058 * elf32-metag.c (elf_metag_relocate_section): Delete extra error
1060 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Rewrite bogus
1062 * elf32-i386.c (elf_i386_check_relocs): Make r_symndx an int.
1063 * elf32-s390.c (elf_s390_check_relocs): Likewise.
1064 * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
1065 * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
1066 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
1067 * elf64-s390.c (elf_s390_check_relocs): Likewise.
1068 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1069 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
1070 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
1071 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
1072 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
1073 * elf64-mmix.c (_bfd_mmix_after_linker_allocation): Cast size_t args
1074 and use %lu for error message.
1075 * elflink.c (elf_link_adjust_relocs): Delete extra error message arg.
1076 * mmo.c (mmo_scan): Make stab_loc a file_ptr. Cast expression for
1079 * elf32-arm.c (elf32_arm_tls_relax): Correct format string and args
1081 (elf32_arm_final_link_relocate): Likewise.
1082 * coff-arm.c (bfd_arm_process_before_allocation): Likewise.
1083 * coffcode.h (styp_to_sec_flags): Likewise.
1084 * cofflink.c (_bfd_coff_write_global_sym): Likewise.
1085 * ecoff.c (_bfd_ecoff_slurp_symbol_table): Likewise.
1086 * elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise.
1087 * elf32-bfin.c (bfinfdpic_check_relocs): Likewise.
1088 (elf32_bfin_merge_private_bfd_data): Likewise.
1089 * elf32-cris.c (cris_elf_relocate_section): Likewise.
1090 * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
1091 * elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise.
1092 (i370_elf_relocate_section): Likewise.
1093 * elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise.
1094 * elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise.
1095 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
1096 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
1097 * elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise.
1098 * elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise.
1099 * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
1100 * elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise.
1101 (_bfd_mips_elf_merge_private_bfd_data): Likewise.
1102 * ieee.c (ieee_write_id, read_id): Likewise.
1103 * mach-o.c (bfd_mach_o_write_contents): Likewise.
1104 (bfd_mach_o_layout_commands, bfd_mach_o_read_section_32): Likewise.
1105 (bfd_mach_o_read_section_64, bfd_mach_o_read_symtab_symbol): Likewise.
1106 (bfd_mach_o_read_command, bfd_mach_o_header_p): Likewise.
1107 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Likewise.
1108 * stabs.c (_bfd_link_section_stabs): Likewise.
1110 * coff-arm.c (coff_arm_relocate_section): Use L modifier in error
1112 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
1113 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
1114 * coff-rs6000.c (xcoff_reloc_type_toc): Likewise.
1115 * coff-sh.c (sh_relax_section): Likewise.
1116 (sh_relax_delete_bytes, sh_swap_insns): Likewise.
1117 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
1118 * coffcode.h (coff_slurp_reloc_table): Likewise.
1119 * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
1120 (_bfd_coff_read_string_table): Likewise.
1121 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
1122 * compress.c (bfd_get_full_section_contents): Likewise.
1123 * dwarf2.c (read_formatted_entries, decode_line_info): Likewise.
1124 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
1125 * elf.c (bfd_elf_string_from_elf_section): Likewise.
1126 * elf32-arc.c (arc_special_overflow_checks): Likewise.
1127 * elf32-arm.c (elf32_arm_tls_relax): Likewise.
1128 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Likewise.
1129 (elf32_arm_write_section): Likewise.
1130 * elf32-bfin.c (bfin_relocate_section): Likewise.
1131 (bfinfdpic_relocate_section): Likewise.
1132 * elf32-hppa.c (hppa_build_one_stub): Likewise.
1133 (final_link_relocate, elf32_hppa_relocate_section): Likewise.
1134 * elf32-i386.c (elf_i386_tls_transition): Likewise.
1135 (elf_i386_relocate_section): Likewise.
1136 * elf32-ip2k.c (ip2k_final_link_relocate): Likewise.
1137 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
1138 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
1139 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1140 * elf32-metag.c (elf_metag_relocate_section): Likewise.
1141 * elf32-nds32.c (unrecognized_reloc_msg): Likewise.
1142 (nds32_elf_relax_longcall1, nds32_elf_relax_longcall2): Likewise.
1143 (nds32_elf_relax_longcall3, nds32_elf_relax_longjump1): Likewise.
1144 (nds32_elf_relax_longjump2, nds32_elf_relax_longjump3): Likewise.
1145 (nds32_elf_relax_longcall4, nds32_elf_relax_longcall5): Likewise.
1146 (nds32_elf_relax_longcall6, nds32_elf_relax_longjump4): Likewise.
1147 (nds32_elf_relax_longjump5, nds32_elf_relax_longjump6): Likewise.
1148 (nds32_elf_relax_longjump7, nds32_elf_relax_loadstore): Likewise.
1149 (nds32_elf_relax_ptr, nds32_elf_ex9_build_hash_table): Likewise.
1150 * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
1151 * elf32-rx.c (UNSAFE_FOR_PID): Likewise.
1152 * elf32-s390.c (invalid_tls_insn, elf_s390_relocate_section): Likewise.
1153 * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
1154 * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
1155 * elf32-sh.c (sh_elf_relax_section): Likewise.
1156 (sh_elf_relax_delete_bytes, sh_elf_swap_insns): Likewise.
1157 (sh_elf_relocate_section): Likewise.
1158 * elf32-sh64.c (shmedia_prepare_reloc): Likewise.
1159 * elf32-spu.c (spu_elf_relocate_section): Likewise.
1160 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
1161 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
1162 * elf32-v850.c (v850_elf_relax_section): Likewise.
1163 * elf32-vax.c (elf_vax_check_relocs): Likewise.
1164 (elf_vax_relocate_section): Likewise.
1165 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
1166 (extend_ebb_bounds_forward, extend_ebb_bounds_backward): Likewise.
1167 (compute_text_actions, compute_ebb_proposed_actions): Likewise.
1168 (do_fix_for_relocatable_link): Likewise.
1169 * elf64-alpha.c (elf64_alpha_relax_got_load): Likewise.
1170 (elf64_alpha_relax_with_lituse): Likewise.
1171 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Likewise.
1172 (elf_hppa_final_link_relocate): Likewise.
1173 * elf64-ia64-vms.c (elf64_ia64_relax_section): Likewise.
1174 (elf64_ia64_choose_gp, elf64_ia64_relocate_section): Likewise.
1175 (elf64_vms_link_add_object_symbols): Likewise.
1176 * elf64-mmix.c (mmix_elf_perform_relocation): Likewise.
1177 (mmix_final_link_relocate): Likewise.
1178 * elf64-s390.c (invalid_tls_insn): Likewise.
1179 (elf_s390_relocate_section): Likewise.
1180 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
1181 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
1182 (elf_x86_64_relocate_section): Likewise.
1183 * elfcode.h (elf_slurp_symbol_table): Likewise.
1184 * elfcore.h (elf_core_file_p): Likewise.
1185 * elflink.c (elf_link_read_relocs_from_section): Likewise.
1186 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
1187 (elfNN_aarch64_relocate_section): Likewise.
1188 * elfnn-ia64.c (elfNN_ia64_relax_section): Likewise.
1189 (elfNN_ia64_choose_gp, elfNN_ia64_relocate_section): Likewise.
1190 * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
1191 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
1192 (_bfd_mips_elf_relocate_section): Likewise.
1193 (_bfd_mips_elf_finish_dynamic_symbol, mips_finish_exec_plt): Likewise.
1194 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
1195 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
1196 * ieee.c (ieee_slurp_external_symbols): Likewise.
1197 * ihex.c (ihex_write_object_content): Likewise.
1198 * mach-o.c (bfd_mach_o_build_exec_seg_command): Likewise.
1199 * merge.c (_bfd_merged_section_offset): Likewise.
1200 * mmo.c (mmo_write_loc_chunk): Likewise.
1201 (mmo_write_object_contents): Likewise.
1202 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Likewise.
1203 * stabs.c (_bfd_link_section_stabs): Likewise.
1204 * xcofflink.c (xcoff_link_add_symbols, xcoff_find_tc0): Likewise.
1206 2017-07-11 Alan Modra <amodra@gmail.com>
1208 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo.
1210 2017-07-11 Alan Modra <amodra@gmail.com>
1212 * elf32-ppc.c (ppc_elf_relocate_section): Emit "unexpected
1213 instruction" error using _bfd_error_handler, not einfo.
1215 2017-07-10 Nick Clifton <nickc@redhat.com>
1217 * coffcode.h (coff_slurp_symbol_table): Do not include an entry
1218 for C_AIX_WEAKEXT if it has the same value as C_WEAKEXT.
1220 2017-07-07 John Baldwin <jhb@FreeBSD.org>
1222 * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PTLWPINFO.
1224 2017-07-07 Alan Modra <amodra@gmail.com>
1226 * coffcode.h (coff_slurp_symbol_table): Handle C_AIX_WEAKEXT.
1228 2017-07-07 Alan Modra <amodra@gmail.com>
1230 * bfd.c (_doprnt): Replace "L" with "ll" when printing bfd_vma
1231 as long long. Move code replacing "ll" with "I64", and simplify.
1233 2017-07-06 H.J. Lu <hongjiu.lu@intel.com>
1235 * bfd.c (_doprnt): Convert 'L' to 'l' when setting wide_width
1238 2017-07-05 H.J. Lu <hongjiu.lu@intel.com>
1240 * dwarf2.c (line_info_add_include_dir_stub): Replace time with
1242 (line_info_add_file_name): Likewise.
1243 (decode_line_info): Likewise.
1245 2017-07-04 Tristan Gingold <gingold@adacore.com>
1247 * version.m4: Bump version to 2.29.51
1248 * configure: Regenerate.
1250 2017-07-04 Jiong Wang <jiong.wang@arm.com>
1252 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Remove the
1253 sanity check at the head of this function.
1255 2017-07-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1257 * dwarf2.c (struct dwarf2_debug): Add fields dwarf_line_str_buffer and
1258 dwarf_line_str_size.
1259 (struct attr_abbrev): Add field implicit_const.
1260 (dwarf_debug_sections): Add .debug_line_str.
1261 (enum dwarf_debug_section_enum): Add debug_line_str and debug_max.
1262 (dwarf_debug_section_assert): Add static assertion.
1263 (read_indirect_line_string): New.
1264 (read_abbrevs): Support DW_FORM_implicit_const.
1265 (is_str_attr): Support DW_FORM_line_strp.
1266 (read_attribute_value): Support DW_FORM_line_strp and
1267 DW_FORM_implicit_const.
1268 (read_attribute): Support DW_FORM_implicit_const.
1269 (line_info_add_include_dir, line_info_add_include_dir_stub):
1270 (line_info_add_file_name, read_formatted_entries): New.
1271 (decode_line_info, parse_comp_unit): Support DWARF 5.
1272 (_bfd_dwarf2_cleanup_debug_info): Free dwarf_line_str_buffer.
1274 2017-07-03 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
1276 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove the
1277 abort statement that was put for symbols that are not dynamic.
1279 2017-07-03 Tristan Gingold <gingold@adacore.com>
1281 * po/bfd.pot: Regenerate
1283 2017-07-03 Alan Modra <amodra@gmail.com>
1285 * bfd.c (_doprnt): Rewrite "ll" and "L" modifiers to "I64" for
1286 __MSVCRT__. Support "L" modifier for bfd_vma. Formatting.
1287 * elf.c (setup_group): Use "Lx" to print sh_size.
1288 (_bfd_elf_setup_sections): Remove unnecessary cast and print
1289 unknown section type in hex.
1290 (copy_special_section_fields): Style fix.
1291 (bfd_section_from_shdr): Correct format for sh_link. Use a
1292 common error message for all the variants of unrecognized
1294 (assign_file_positions_for_load_sections): Use "Lx" for lma
1295 adjust error message.
1296 (assign_file_positions_for_non_load_sections): Formatting.
1297 (rewrite_elf_program_header): Formatting. Use "Lx" for
1298 bfd_vma values in error messages.
1299 * elfcode.h (elf_slurp_reloc_table_from_section): Cast
1300 ELF_R_SYM value to type expected by format.
1301 * elflink.c (elf_link_read_relocs_from_section): Use "Lx"
1303 (elf_link_add_object_symbols): Use "Lu" for symbol sizes.
1304 (elf_link_input_bfd): Use "Lx" for r_info.
1305 (bfd_elf_gc_record_vtinherit): Use "Lx" for offset.
1307 2017-07-03 Alan Modra <amodra@gmail.com>
1309 * bfd.c (bfd_scan_vma): Don't use long long unless HAVE_LONG_LONG.
1310 * coff-rs6000.c (FMT20): Handle hosts with 64-bit long and
1311 Microsoft C library variant of long long format specifier.
1312 (PRINT20): Cast value to bfd_uint64_t not long long.
1313 * coffcode.h (coff_print_aux): Use BFD_VMA_FMT.
1314 * coff-x86_64.c (coff_amd64_reloc): Use bfd_uint64_t rather than
1315 long long. Don't cast to bfd_vma.
1316 * elf32-score.c (score3_bfd_getl48): Likewise.
1317 * vms-alpha.c (_bfd_vms_slurp_eisd): Likewise.
1319 2017-07-03 Alan Modra <amodra@gmail.com>
1321 * elf.c (_bfd_elf_print_private_bfd_data): Use BFD_VMA_FMT to
1323 (bfd_elf_print_symbol): Don't cast symbol->flags.
1324 (_bfd_elf_symbol_from_bfd_symbol): Likewise.
1325 * elf32-ppc.c (ppc_elf_begin_write_processing): Correct
1326 _bfd_error_handler argument order.
1327 (ppc_elf_merge_private_bfd_data): Don't cast flags.
1329 2017-07-03 Alan Modra <amodra@gmail.com>
1331 * configure.ac: Invoke AC_CHECK_TYPES for long long. Invoke
1332 AC_TYPE_LONG_DOUBLE.
1333 * configure: Regenerate.
1334 * config.in: Regenerate.
1336 2017-06-29 Andrew Waterman <andrew@sifive.com>
1338 * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Fix TLS copy
1341 2017-06-29 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
1343 * elfxx-sparc.c (allocate_dynrelocs): Don't make a symbol dynamic
1344 unless it is undefined weak.
1345 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Set the flag
1346 relative_reloc to direct non-dynamic symbols to R_SPARC_RELATIVE
1348 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): If symbol
1349 is not dynamic in PIC, abort.
1351 2017-06-29 Jiong Wang <jiong.wang@arm.com>
1354 * elfnn-aarch64.c (elfNN_aarch64_allocate_dynrelocs): Only make
1355 undefined weak symbols into dynamic.
1356 (elfNN_aarch64_final_link_relocate): Generate runtime RELATIVE
1357 relocation for non-dynamic symbols.
1358 (elfNN_aarch64_finish_dynamic_symbol): Add sanity check.
1360 2017-06-29 Jiong Wang <jiong.wang@arm.com>
1362 * elfnn-aarch64.c (aarch64_relocation_aginst_gp_p): New function.
1363 (elfNN_aarch64_final_link_relocate): Delete duplicated code for
1364 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15, BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
1365 BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
1366 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Optimize the
1369 2017-06-29 Andreas Arnez <arnez@linux.vnet.ibm.com>
1371 * elf-bfd.h (elfcore_write_s390_gs_cb): Add prototype.
1372 (elfcore_write_s390_gs_bc): Likewise.
1373 * elf.c (elfcore_grok_s390_gs_cb): New function.
1374 (elfcore_grok_s390_gs_bc): New function.
1375 (elfcore_grok_note): Call them.
1376 (elfcore_write_s390_gs_cb): New function.
1377 (elfcore_write_s390_gs_bc): New function.
1378 (elfcore_write_register_note): Call them.
1380 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
1382 * libbfd.c (_bfd_generic_get_section_contents): Don't call
1383 bfd_get_file_size. Check archive element size.
1384 (_bfd_generic_get_section_contents_in_window): Likewise.
1386 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
1388 * bfd-in2.h: Regenerated.
1389 * bfdio.c (bfd_get_size): Change return type to ufile_ptr.
1390 (bfd_get_file_size): Likewise.
1392 2017-06-28 Maciej W. Rozycki <macro@imgtec.com>
1393 Matthew Fortune <matthew.fortune@imgtec.com>
1395 * archures.c (bfd_mach_mips_interaptiv_mr2): New macro.
1396 * cpu-mips.c (I_interaptiv_mr2): New enum value.
1397 (arch_info_struct): Add "mips:interaptiv-mr2" entry.
1398 * elfxx-mips.c (_bfd_elf_mips_mach) <E_MIPS_MACH_IAMR2>: New
1400 (mips_set_isa_flags) <bfd_mach_mips_interaptiv_mr2>: Likewise.
1401 (bfd_mips_isa_ext) <bfd_mach_mips_interaptiv_mr2>: Likewise.
1402 (print_mips_isa_ext) <AFL_EXT_INTERAPTIV_MR2>: Likewise.
1403 (mips_mach_extensions): Add `bfd_mach_mipsisa32r3' and
1404 `bfd_mach_mips_interaptiv_mr2' entries.
1405 * bfd-in2.h: Regenerate.
1407 2017-06-27 Nick Clifton <nickc@redhat.com>
1409 * tekhex.c (pass_over): Revert accidental conversion of a local
1410 array to a static array.
1412 2017-06-27 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
1415 * elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Adjust
1416 reloc addend if necessary. Adjust diff only if
1417 shrinked_insn_address < end_address.
1419 2017-06-27 Alan Modra <amodra@gmail.com>
1422 * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
1423 (_bfd_generic_get_section_contents_in_window): Likewise.
1425 2017-06-26 Kuan-Lin Chen <rufus@andestech.com>
1427 * elfnn-riscv.c (perform_relocation): Support the new
1428 R_RISCV_32_PCREL relocation.
1429 (riscv_elf_relocate_section): Likewise.
1430 * elfxx-riscv.c (howto_table): Likewise.
1431 (riscv_reloc_map): Likewise.
1432 * bfd-in2.h (BFD_RELOC_RISCV_32_PCREL): New relocation.
1433 * libbfd.h: Regenerate.
1435 2017-06-27 Alan Modra <amodra@gmail.com>
1438 * libbfd.c (_bfd_generic_get_section_contents): Delete abort.
1439 Use unsigned file pointer type, and remove cast.
1440 * libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise.
1441 Add "count", not "sz".
1443 2017-06-26 Pedro Alves <palves@redhat.com>
1446 * libbfd.c (_bfd_generic_get_section_contents): Add "count", not
1449 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
1452 * libbfd.c (_bfd_generic_get_section_contents_in_window): Add
1455 2017-06-26 Maciej W. Rozycki <macro@imgtec.com>
1457 * cpu-mips.c (arch_info_struct): Mark the 4010 32-bit.
1458 * elfxx-mips.c (mips_set_isa_flags) <bfd_mach_mips4010>: Set
1459 E_MIPS_ARCH_2 rather than E_MIPS_ARCH_3 in `e_flags'.
1460 (mips_mach_extensions): Mark `bfd_mach_mips4010' as extending
1461 `bfd_mach_mips6000' rather than `bfd_mach_mips4000'.
1463 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
1466 * compress.c (bfd_get_full_section_contents): Don't check the
1468 * libbfd.c (_bfd_generic_get_section_contents): Check for and
1469 reject a section whose size + offset is greater than the size
1471 (_bfd_generic_get_section_contents_in_window): Likewise.
1473 2017-06-26 Nick Clifton <nickc@redhat.com>
1476 * tekhex.c (getvalue): Check for the source pointer exceeding the
1477 end pointer before the first byte is read.
1479 2017-06-26 Nick Clifton <nickc@redhat.com>
1482 * opncls.c (get_build_id): Check that the section is big enough
1483 to contain the whole note.
1484 * compress.c (bfd_get_full_section_contents): Check for and reject
1485 a section whose size is greater than the size of the entire file.
1486 * elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not
1487 contain a notes section.
1489 2017-06-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1491 * elf64-s390.c (elf_s390_additional_program_headers): Add NULL
1493 (elf_s390_modify_segment_map): Likewise.
1494 (bfd_elf_s390_set_options): Lisewise.
1496 2017-06-26 Alan Modra <amodra@gmail.com>
1498 * elflink.c (_bfd_elf_link_create_dynstrtab): Don't make dynobj
1500 (_bfd_elf_size_group_sections): Skip --just-syms bfds.
1501 (bfd_elf_size_dynamic_sections): Ignore .note.GNU-stack and
1502 .preinit_array on --just-syms bfds.
1503 (_bfd_elf_gc_mark_extra_sections): Skip --just-syms bfds.
1504 (elf_gc_sweep, bfd_elf_parse_eh_frame_entries): Likewise.
1505 (bfd_elf_gc_sections, bfd_elf_discard_info): Likewise.
1507 2017-06-25 Sergei Trofimovich <slyfox@gentoo.org>
1509 * elf.c (find_link): Bounds check "hint".
1511 2017-06-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
1513 * elf32-arm.c (using_thumb_only): Update list of architectures in
1514 BFD_ASSERT for which the logic is valid.
1515 (using_thumb2_bl): Likewise.
1516 (using_thumb2): Likewise and return true for ARMv8-R.
1517 (arch_has_arm_nop): Likewise.
1518 (tag_cpu_arch_combine): New v8r table for ARMv8-R Tag_CPU_arch
1519 merging logic. Update commentis for value 15 of v8m_baseline,
1520 v8m_mainline and v4t_plus_v6_m arrays. Use v8r array to decide
1521 merging of value 15 of Tag_CPU_arch.
1523 2017-06-23 Jiong Wang <jiong.wang@arm.com>
1525 * reloc.c (BFD_RELOC_AARCH64_ADR_GOTPAGE): Rename to
1526 BFD_RELOC_AARCH64_ADR_GOT_PAGE
1527 * bfd-in2.h: Regenerate.
1529 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1531 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Move
1532 the error_alignment label forward. Properly align program
1533 property note section.
1535 2017-06-22 Eric Christopher <echristo@gmail.com>
1537 * elf32-arm.c (elf32_arm_final_link_relocate): Use labs rather than
1538 abs to fix a truncation warning.
1540 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1542 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Resolve
1543 local undefined weak symbol to 0.
1544 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Likewise.
1546 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1548 * elf32-i386.c (elf_i386_merge_gnu_properties): If info->shstk
1549 is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
1550 (elf_i386_link_setup_gnu_properties): If info->shstk is set,
1551 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
1552 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): If
1553 info->shstk is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
1554 (elf_x86_64_link_setup_gnu_properties): If info->shstk is set,
1555 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
1557 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1559 * elf32-i386.c (elf_i386_lazy_ibt_plt0_entry): New.
1560 (elf_i386_lazy_ibt_plt_entry): Likewise.
1561 (elf_i386_pic_lazy_ibt_plt0_entry): Likewise.
1562 (elf_i386_non_lazy_ibt_plt_entry): Likewise.
1563 (elf_i386_pic_non_lazy_ibt_plt_entry): Likewise.
1564 (elf_i386_eh_frame_lazy_ibt_plt): Likewise.
1565 (elf_i386_lazy_plt_layout): Likewise.
1566 (elf_i386_non_lazy_plt_layout): Likewise.
1567 (elf_i386_link_hash_entry): Add plt_second.
1568 (elf_i386_link_hash_table): Add plt_second and
1569 plt_second_eh_frame.
1570 (elf_i386_allocate_dynrelocs): Use the second PLT if needed.
1571 (elf_i386_size_dynamic_sections): Use .plt.got unwind info for
1572 the second PLT. Check the second PLT.
1573 (elf_i386_relocate_section): Use the second PLT to resolve
1574 PLT reference if needed.
1575 (elf_i386_finish_dynamic_symbol): Fill and use the second PLT if
1577 (elf_i386_finish_dynamic_sections): Set sh_entsize on the
1578 second PLT. Generate unwind info for the second PLT.
1579 (elf_i386_plt_type): Add plt_second.
1580 (elf_i386_get_synthetic_symtab): Support the second PLT.
1581 (elf_i386_parse_gnu_properties): Support
1582 GNU_PROPERTY_X86_FEATURE_1_AND.
1583 (elf_i386_merge_gnu_properties): Support
1584 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
1585 on GNU_PROPERTY_X86_FEATURE_1_IBT
1586 (elf_i386_link_setup_gnu_properties): If info->ibt is set,
1587 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
1588 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
1589 is set on all relocatable inputs.
1590 * elf64-x86-64.c (elf_x86_64_lazy_ibt_plt_entry): New.
1591 (elf_x32_lazy_ibt_plt_entry): Likewise.
1592 (elf_x86_64_non_lazy_ibt_plt_entry): Likewise.
1593 (elf_x32_non_lazy_ibt_plt_entry): Likewise.
1594 (elf_x86_64_eh_frame_lazy_ibt_plt): Likewise.
1595 (elf_x32_eh_frame_lazy_ibt_plt): Likewise.
1596 (elf_x86_64_lazy_ibt_plt): Likewise.
1597 (elf_x32_lazy_ibt_plt): Likewise.
1598 (elf_x86_64_non_lazy_ibt_plt): Likewise.
1599 (elf_x32_non_lazy_ibt_plt): Likewise.
1600 (elf_x86_64_get_synthetic_symtab): Support the second PLT.
1601 (elf_x86_64_parse_gnu_properties): Support
1602 GNU_PROPERTY_X86_FEATURE_1_AND.
1603 (elf_x86_64_merge_gnu_properties): Support
1604 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
1605 on GNU_PROPERTY_X86_FEATURE_1_IBT
1606 (elf_x86_64_link_setup_gnu_properties): If info->ibt is set,
1607 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
1608 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
1609 is set on all relocatable inputs.
1611 2017-06-22 Nick Clifton <nickc@redhat.com>
1614 * som.c (setup_sections): NUL terminate the space_strings buffer.
1615 Check that the space.name field does not index beyond the end of
1616 the space_strings buffer.
1618 2017-06-21 Nick Clifton <nickc@redhat.com>
1621 * coff-sh.c (sh_reloc): Check for an out of range reloc.
1623 2017-06-21 Nick Clifton <nickc@redhat.com>
1626 * vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as
1627 type of the size parameter.
1628 (_bfd_vms_save_counted_string): Add second parameter - the maximum
1629 length of the counted string.
1630 * vms.h (_bfd_vms_save_sized_string): Update prototype.
1631 (_bfd_vms_save_counted_string): Likewise.
1632 * vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to
1633 _bfd_vms_save_counted_string.
1634 (_bfd_vms_slurp_ehdr): Likewise.
1635 (_bfd_vms_slurp_egsd): Likewise.
1636 (Parse_module): Likewise.
1638 2017-06-21 Alan Modra <amodra@gmail.com>
1640 * elf64-ppc.c (ppc64_elf_size_stubs): Test for localentry:0 plt
1641 calls before tocsave calls.
1642 (ppc64_elf_relocate_section): Allow localentry:0 plt calls without
1645 2017-06-21 Nick Clifton <nickc@redhat.com>
1648 * reloc.c (bfd_generic_get_relocated_section_contents): Fail if
1649 bfd_get_full_section_contents returns no contents.
1651 2017-06-21 Nick Clifton <nickc@redhat.com>
1654 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized
1657 2017-06-21 Nick Clifton <nickc@redhat.com>
1660 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section
1662 (image_set_ptr): Likewise.
1663 (alpha_vms_fix_sec_rel): Likewise.
1664 (alpha_vms_slurp_relocs): Likewise.
1666 2017-06-21 Nick Clifton <nickc@redhat.com>
1669 * ieee.c (ieee_slurp_sections): Check for a NULL return from
1671 (ieee_archive_p): Likewise.
1672 (ieee_object_p): Likewise.
1674 2017-06-21 Nick Clifton <nickc@redhat.com>
1677 * elf.c (setup_group): Zero the group section pointer list after
1678 allocation so that loops can be caught. Check for NULL pointers
1679 when processing a group list.
1681 2017-06-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1683 * elf-s390.h: New file.
1684 * elf64-s390.c (struct elf_s390_link_hash_table): Add params
1686 (elf_s390_additional_program_headers): New function.
1687 (elf_s390_modify_segment_map): New function.
1688 (bfd_elf_s390_set_options): New function.
1689 (elf_backend_additional_program_headers)
1690 (elf_backend_modify_segment_map): Add macro definitions.
1692 2017-06-19 H.J. Lu <hongjiu.lu@intel.com>
1695 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
1696 the DYNAMIC bit instead of bfd_count_sections.
1698 2017-06-19 Nick Clifton <nickc@redhat.com>
1701 * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record
1703 (evax_bfd_print_eeom): Likewise.
1704 (evax_bfd_print_egsd): Check for an overlarge record length.
1705 (evax_bfd_print_etir): Likewise.
1707 2017-06-19 Nick Clifton <nickc@redhat.com>
1710 * libieee.h (struct common_header_type): Add end_p field.
1711 * ieee.c (this_byte_and_next): Do not advance input_p beyond
1713 (read_id): Check for a length that exceeds the remaining bytes in
1715 (ieee_seek): Initialise end_p.
1716 (ieee_archive_p): Likewise.
1717 (ieee_object_p): Likewise.
1719 2017-06-19 Nick Clifton <nickc@redhat.com>
1722 * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset
1723 before reading the EIHS structure entries.
1725 2017-06-19 Nick Clifton <nickc@redhat.com>
1728 * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for
1729 gsd_size. Check that there are enough bytes remaining to read the
1730 type and size of the next egsd. Check that the size of the egsd
1731 does not exceed the size of the record.
1733 2017-06-19 Alan Modra <amodra@gmail.com>
1735 * config.bfd: Correct targ_underscore for cris.
1737 2017-06-18 Alan Modra <amodra@gmail.com>
1739 * config.bfd: Correct targ_underscore for epiphany, ip2k,
1740 m32c, mn10200, pru, rl78, rx, crisv32 and v850.
1742 2017-06-16 Nick Clifton <nickc@redhat.com>
1744 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
1745 bucketlist is empty because there are no symbols to add to the
1748 2017-06-16 Alan Modra <amodra@gmail.com>
1754 * targets.c (struct bfd_target): Add _bfd_define_start_stop.
1755 (BFD_JUMP_TABLE_LINK): Likewise.
1756 * elf-bfd.h (bfd_elf_define_start_stop): Declare.
1757 * elflink.c (_bfd_elf_gc_mark_rsec): Update comment.
1758 (bfd_elf_define_start_stop): New function.
1759 * linker.c (bfd_generic_define_start_stop): New function.
1760 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init
1762 * aout-adobe.c (aout_32_bfd_define_start_stop): Define.
1763 * aout-target.h (MY_bfd_define_start_stop): Define.
1764 * aout-tic30.c (MY_bfd_define_start_stop): Define.
1765 * binary.c (binary_bfd_define_start_stop): Define.
1766 * bout.c (b_out_bfd_define_start_stop): Define.
1767 * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define.
1768 * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define.
1769 * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define.
1770 * coffcode.h (coff_bfd_define_start_stop): Define.
1771 * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define.
1772 * i386msdos.c (msdos_bfd_define_start_stop): Define.
1773 * i386os9k.c (os9k_bfd_define_start_stop): Define.
1774 * ieee.c (ieee_bfd_define_start_stop): Define.
1775 * ihex.c (ihex_bfd_define_start_stop): Define.
1776 * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define.
1777 * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define.
1778 * mmo.c (mmo_bfd_define_start_stop): Define.
1779 * nlm-target.h (nlm_bfd_define_start_stop): Define.
1780 * oasys.c (oasys_bfd_define_start_stop): Define.
1781 * pef.c (bfd_pef_bfd_define_start_stop): Define.
1782 * plugin.c (bfd_plugin_bfd_define_start_stop): Define.
1783 * ppcboot.c (ppcboot_bfd_define_start_stop): Define.
1784 * som.c (som_bfd_define_start_stop): Define.
1785 * srec.c (srec_bfd_define_start_stop): Define.
1786 * tekhex.c (tekhex_bfd_define_start_stop): Define.
1787 * versados.c (versados_bfd_define_start_stop): Define.
1788 * vms-alpha.c (vms_bfd_define_start_stop): Define.
1789 (alpha_vms_bfd_define_start_stop): Define.
1790 * xsym.c (bfd_sym_bfd_define_start_stop): Define.
1791 * bfd-in2.h: Regenerate.
1792 * libbfd.h: Regenerate.
1794 2017-06-16 Jiong Wang <jiong.wang@arm.com>
1796 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
1797 SYMBOL_REFERENCES_LOCAL.
1799 2017-06-15 Jiong Wang <jiong.wang@arm.com>
1802 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
1803 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
1804 runtime for if there needs copy relocation elimination.
1805 (need_copy_relocation_p): New function. Return true for symbol with
1806 pc-relative references and if it's against read-only sections.
1807 (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
1808 (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
1809 that are related with accessing external objects.
1810 (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change
1811 in elfNN_aarch64_check_relocs.
1813 2017-06-15 Nick Clifton <nickc@redhat.com>
1816 * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
1819 (ieee_archive_p): Likewise.
1821 2017-06-15 Nick Clifton <nickc@redhat.com>
1824 * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
1826 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
1828 * elf32-xtensa.c (elf_xtensa_be_plt_entry,
1829 elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays,
1830 keep both windowed and call0 ABI PLT definitions.
1831 (elf_xtensa_create_plt_entry): Use selected ABI to choose upper
1832 elf_xtensa_*_plt_entry endex.
1833 (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size.
1835 2017-06-14 Nick Clifton <nickc@redhat.com>
1838 * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
1841 2017-06-14 Nick Clifton <nickc@redhat.com>
1844 * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
1845 maximum value for the ascic pointer. Check that name processing
1846 does not read beyond this value.
1847 (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
1850 2017-06-14 Nick Clifton <nickc@redhat.com>
1853 * versados.c (versados_mkobject): Zero the allocated tdata structure.
1854 (process_otr): Check for an invalid offset in the otr structure.
1856 2017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
1858 * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
1860 2017-06-13 H.J. Lu <hongjiu.lu@intel.com>
1866 * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
1867 vtable field to a union.
1868 (_bfd_elf_is_start_stop): Removed.
1869 * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
1870 __start_SECNAME and __stop_SECNAME symbols.
1871 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
1872 * elflink.c (_bfd_elf_is_start_stop): Removed.
1873 (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
1874 _bfd_elf_is_start_stop.
1875 (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
1876 __stop_SECNAME symbols. Updated.
1877 (elf_gc_smash_unused_vtentry_relocs): Likewise.
1878 (bfd_elf_gc_record_vtinherit): Likewise.
1879 (bfd_elf_gc_record_vtentry): Likewise.
1881 2017-06-13 Nick Clifton <nickc@redhat.com>
1884 * elflink.c (elf_link_adjust_relocs): Generate an error when
1885 encountering a reloc against a symbol removed by garbage
1888 2017-06-12 H.J. Lu <hongjiu.lu@intel.com>
1890 * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
1891 to merge_gnu_properties.
1892 * elf-properties.c (elf_merge_gnu_properties): Add struct
1893 bfd_link_info * and pass it to merge_gnu_properties.
1894 (elf_merge_gnu_property_list): Add struct bfd_link_info *
1895 and pass it to elf_merge_gnu_properties.
1896 (_bfd_elf_link_setup_gnu_properties): Pass info to
1897 elf_merge_gnu_property_list.
1898 * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
1900 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
1902 2017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
1905 * binary.c (binary_set_section_contents): Scale lma by octets
1906 per byte to set filepos.
1908 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1910 * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
1913 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1915 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
1918 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1920 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
1921 patched section contents for TLS IE reloc.
1922 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
1924 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1926 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
1927 RELOC_FOR_GLOBAL_SYMBOL macro.
1929 2018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1931 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
1934 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1936 * config/tc-arc.c (md_undefined_symbol): Changed.
1937 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
1939 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1941 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
1944 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1946 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
1947 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
1949 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1951 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
1954 2017-06-08 Richard Earnshaw <rearnsha@arm.com>
1956 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
1957 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
1958 is non-zero. Add clarifying comments.
1960 2017-06-08 H.J. Lu <hongjiu.lu@intel.com>
1962 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
1963 name. Use local IFUNC symbol name string to report unsupported
1964 non-PIC call to IFUNC function.
1965 (elf_i386_relocate_section): Dump local IFUNC name with minfo
1966 when generating R_386_IRELATIVE relocation.
1967 (elf_i386_finish_dynamic_symbol): Likewise.
1968 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
1970 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
1971 when generating R_X86_64_IRELATIVE relocation.
1972 (elf_x86_64_finish_dynamic_symbol): Likewise.
1974 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
1976 * elf.c (setup_group): Make sure BFD sections are created for all
1977 group sections in the input file when processing SHF_GROUP
1979 (bfd_section_from_shdr): Avoid duplicating logic already
1980 implemented in `setup_group'.
1982 2017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
1985 * peXXigen.c (pe_print_idata): Use the address of the first thunk
1986 if the hint address is zero.
1988 2017-06-06 James Clarke <jrtc27@jrtc27.com>
1991 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
1992 ELF_COMMON_DEF_P for common symbols.
1994 2017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
1996 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
1997 SEC_GROUP sections as SEC_EXCLUDE.
1998 (bfd_elf_set_group_contents): Replace use of abort with an assert.
1999 (assign_section_numbers): Use resolve_section_groups flag instead
2000 of relocatable link type.
2001 (_bfd_elf_init_private_section_data): Use resolve_section_groups
2002 flag instead of checking the final_link flag for part of the
2003 checks in here. Fix white space as a result.
2004 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
2005 instead of relocatable link type.
2006 (bfd_elf_final_link): Likewise.
2008 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2010 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
2012 * elf32-score.c (score_elf_final_link_relocate): Likewise.
2013 (s3_bfd_score_elf_check_relocs): Likewise.
2014 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
2015 (score_elf_final_link_relocate): Likewise.
2016 (s7_bfd_score_elf_check_relocs): Likewise.
2018 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2020 * elflink.c (init_reloc_cookie_rels): Remove unused variable
2023 2017-06-06 Maciej W. Rozycki <macro@imgtec.com>
2025 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
2026 from `reloc_count' rather than decrementing it.
2027 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
2028 `reloc_count' by `int_rels_per_ext_rel'.
2029 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
2030 `reloc_count' by `int_rels_per_ext_rel' for last relocation
2031 entry determination.
2032 (s3_bfd_score_elf_check_relocs): Likewise.
2033 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
2034 (s7_bfd_score_elf_relocate_section): Likewise.
2035 (s7_bfd_score_elf_check_relocs): Likewise.
2036 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
2037 prototype and function.
2038 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
2039 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
2040 triple rather than once the sum of REL and RELA relocation entry
2042 (bfd_elf64_get_reloc_upper_bound): Remove macro.
2043 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
2044 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
2045 storage allocation size determination.
2046 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
2047 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
2048 by `int_rels_per_ext_rel' for last relocation entry
2050 (bfd_elf_final_link): Do not multiply `reloc_count' by
2051 `int_rels_per_ext_rel' for internal relocation storage
2052 allocation size determination.
2053 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
2054 `int_rels_per_ext_rel' for last relocation entry determination.
2055 (elf_gc_smash_unused_vtentry_relocs): Likewise.
2056 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
2057 (_bfd_mips_elf_relocate_section): Likewise.
2059 2017-06-05 Alan Modra <amodra@gmail.com>
2062 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
2064 2017-06-01 John Baldwin <jhb@FreeBSD.org>
2066 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
2067 determine structure sizes.
2068 (elfcore_grok_freebsd_prstatus): Likewise.
2070 2017-06-01 Alan Modra <amodra@gmail.com>
2072 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
2073 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
2075 (is_elfv2_localentry0): New function.
2076 (ppc64_elf_tls_setup): Default params->plt_localentry0.
2077 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
2078 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
2079 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
2080 optimized localentry:0 stubs.
2081 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
2082 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
2084 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
2086 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
2088 2017-05-30 Casey Smith <clegg89@gmail.com>
2091 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
2092 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
2094 2017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
2096 * cpu-arc.c (arc_compatible): New function.
2098 2017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
2100 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
2102 2017-05-30 H.J. Lu <hongjiu.lu@intel.com>
2105 * bfdio.c (bfd_get_file_size): New function.
2106 * bfd-in2.h: Regenerated.
2108 2017-05-23 Dilian Palauzov <git-dpa@aegee.org>
2110 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
2113 2017-05-22 H.J. Lu <hongjiu.lu@intel.com>
2115 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
2116 dynobj instead of htab->elf.dynobj.
2118 2017-05-19 Maciej W. Rozycki <macro@imgtec.com>
2120 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
2122 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
2123 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
2124 actual number of internal relocations retrieved. Adjust
2125 function description.
2126 (bfd_elf64_canonicalize_reloc): Remove macro.
2127 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
2129 2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
2131 * archures.c (bfd_mach_sparc_v9m8): Define.
2132 (bfd_mach_sparc_v8plusm8): Likewise.
2133 (bfd_mach_sparc_v9_p): Adjust to M8.
2134 (bfd_mach_sparc_64bit_p): Likewise.
2135 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
2136 bfd_mach_sparc_v8plusm8.
2137 * bfd-in2.h: Regenerated.
2138 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
2140 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
2141 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
2142 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
2144 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
2145 bfd_mach_sparc_v8plusm8.
2147 2017-05-19 Alan Modra <amodra@gmail.com>
2149 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
2150 debug and special sections when no non-note alloc sections in an
2153 2017-05-18 Alan Modra <amodra@gmail.com>
2155 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
2156 * elf-m10300.c: Likewise.
2158 * elf32-arc.c: Likewise.
2159 * elf32-bfin.c: Likewise.
2160 * elf32-m68k.c: Likewise.
2161 * elf32-nds32.c: Likewise.
2162 * elf32-tilepro.c: Likewise.
2163 * elflink.c: Likewise.
2164 * elfnn-aarch64.c: Likewise.
2165 * elfnn-riscv.c: Likewise.
2166 * elfxx-tilegx.c: Likewise.
2167 * mach-o.c: Likewise.
2168 * peXXigen.c: Likewise.
2169 * vms-alpha.c: Likewise.
2170 * vms-lib.c: Likewise.
2172 2017-05-17 H.J. Lu <hongjiu.lu@intel.com>
2175 * elflink.c (elf_gc_mark_debug_section): New function.
2176 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
2177 referenced by kept debug sections.
2179 2017-05-16 Alan Modra <amodra@gmail.com>
2181 * elf-m10300.c: Rename occurrences of non_ir_ref.
2182 * elf32-arm.c: Likewise.
2183 * elf32-bfin.c: Likewise.
2184 * elf32-cr16.c: Likewise.
2185 * elf32-cris.c: Likewise.
2186 * elf32-d10v.c: Likewise.
2187 * elf32-dlx.c: Likewise.
2188 * elf32-fr30.c: Likewise.
2189 * elf32-frv.c: Likewise.
2190 * elf32-hppa.c: Likewise.
2191 * elf32-i370.c: Likewise.
2192 * elf32-i386.c: Likewise.
2193 * elf32-iq2000.c: Likewise.
2194 * elf32-lm32.c: Likewise.
2195 * elf32-m32c.c: Likewise.
2196 * elf32-m32r.c: Likewise.
2197 * elf32-m68hc1x.c: Likewise.
2198 * elf32-m68k.c: Likewise.
2199 * elf32-mcore.c: Likewise.
2200 * elf32-metag.c: Likewise.
2201 * elf32-microblaze.c: Likewise.
2202 * elf32-moxie.c: Likewise.
2203 * elf32-msp430.c: Likewise.
2204 * elf32-mt.c: Likewise.
2205 * elf32-nios2.c: Likewise.
2206 * elf32-or1k.c: Likewise.
2207 * elf32-ppc.c: Likewise.
2208 * elf32-rl78.c: Likewise.
2209 * elf32-s390.c: Likewise.
2210 * elf32-score.c: Likewise.
2211 * elf32-score7.c: Likewise.
2212 * elf32-sh.c: Likewise.
2213 * elf32-tic6x.c: Likewise.
2214 * elf32-tilepro.c: Likewise.
2215 * elf32-v850.c: Likewise.
2216 * elf32-vax.c: Likewise.
2217 * elf32-xstormy16.c: Likewise.
2218 * elf32-xtensa.c: Likewise.
2219 * elf64-alpha.c: Likewise.
2220 * elf64-hppa.c: Likewise.
2221 * elf64-ia64-vms.c: Likewise.
2222 * elf64-mmix.c: Likewise.
2223 * elf64-ppc.c: Likewise.
2224 * elf64-s390.c: Likewise.
2225 * elf64-sh64.c: Likewise.
2226 * elf64-x86-64.c: Likewise.
2227 * elflink.c: Likewise.
2228 * elfnn-aarch64.c: Likewise.
2229 * elfnn-ia64.c: Likewise.
2230 * elfnn-riscv.c: Likewise.
2231 * elfxx-mips.c: Likewise.
2232 * elfxx-sparc.c: Likewise.
2233 * elfxx-tilegx.c: Likewise.
2234 * linker.c: Likewise.
2236 2017-05-16 Alan Modra <amodra@gmail.com>
2238 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
2239 * elflink.c (elf_link_add_object_symbols): Update to use
2241 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
2243 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
2245 2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
2247 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
2249 2017-05-12 H.J. Lu <hongjiu.lu@intel.com>
2251 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
2252 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
2254 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
2256 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
2258 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
2260 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
2261 to plt_second/plt_second_eh_frame.
2262 (elf_x86_64_link_hash_newfunc): Updated.
2263 (elf_x86_64_allocate_dynrelocs): Likewise.
2264 (elf_x86_64_size_dynamic_sections): Likewise.
2265 (elf_x86_64_relocate_section): Likewise.
2266 (elf_x86_64_finish_dynamic_symbol): Likewise.
2267 (elf_x86_64_finish_dynamic_sections): Likewise.
2268 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
2269 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
2271 (elf_backend_setup_gnu_properties): Updated. Create the
2272 .plt.sec section instead of the .plt.sec section.
2274 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
2276 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
2277 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
2278 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
2280 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
2282 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
2283 (bfd_elf64_set_reloc): Define.
2284 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
2286 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
2288 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
2289 (struct bfd_target): New field _bfd_set_reloc.
2290 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
2291 * reloc.c (_bfd_generic_set_reloc): New function.
2292 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
2293 * nlm-target.h (nlm_set_reloc): Likewise.
2294 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
2295 * aout-tic30.c (MY_set_reloc): Likewise.
2296 * aout-target.h (MY_set_reloc): Likewise.
2297 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
2298 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
2299 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
2300 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
2301 * aout-adobe.c (aout_32_set_reloc): Likewise.
2302 * bout.c (b_out_set_reloc): Likewise.
2303 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
2304 * i386os9k.c (aout_32_set_reloc): Likewise.
2305 * ieee.c (ieee_set_reloc): Likewise.
2306 * oasys.c (oasys_set_reloc): Likewise.
2307 * som.c (som_set_reloc): Likewise.
2308 * versados.c (versados_set_reloc): Likewise.
2309 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
2310 _bfd_generic_set_reloc.
2311 (rs6000_xcoff64_aix_vec): LIkewise.
2312 * libbfd.c (_bfd_norelocs_set_reloc): New function.
2313 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
2314 * i386msdos.c (msdos_set_reloc): Define to
2315 _bfd_norelocs_set_reloc.
2316 * elfcode.h (elf_set_reloc): Define.
2317 * bfd-in2.h: Regenerated.
2319 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
2322 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
2323 for IFUNC function address.
2325 2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
2327 * elf32-arc.c (FEATURE_LIST_NAME): Define.
2328 (CONFLICT_LIST): Likewise.
2329 (opcode/arc-attrs.h): Include.
2330 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
2331 (arc_extract_features): New file.
2332 (arc_stralloc): Likewise.
2333 (arc_elf_merge_attributes): Likewise.
2334 (arc_elf_merge_private_bfd_data): Use object attributes.
2335 (bfd_arc_get_mach_from_attributes): New function.
2336 (arc_elf_object_p): Use object attributes.
2337 (arc_elf_final_write_processing): Likewise.
2338 (elf32_arc_obj_attrs_arg_type): New function.
2339 (elf32_arc_obj_attrs_handle_unknown): Likewise.
2340 (elf32_arc_section_from_shdr): Likewise.
2341 (elf_backend_obj_attrs_vendor): Define.
2342 (elf_backend_obj_attrs_section): Likewise.
2343 (elf_backend_obj_attrs_arg_type): Likewise.
2344 (elf_backend_obj_attrs_section_type): Likewise.
2345 (elf_backend_obj_attrs_handle_unknown): Likewise.
2346 (elf_backend_section_from_shdr): Likewise.
2348 2017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
2351 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
2352 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
2353 and the destination is a Thumb symbol.
2355 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2357 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
2358 initializer to silence GCC 4.2.
2359 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
2361 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2363 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
2364 (LAZY_PLT_ENTRY_SIZE): This.
2365 (NON_LAZY_PLT_ENTRY_SIZE): New.
2366 (elf_x86_64_plt0_entry): Renamed to ...
2367 (elf_x86_64_lazy_plt0_entry): This.
2368 (elf_x86_64_plt_entry): Renamed to ...
2369 (elf_x86_64_lazy_plt_entry): This.
2370 (elf_x86_64_bnd_plt0_entry): Renamed to ...
2371 (elf_x86_64_lazy_bnd_plt0_entry): This.
2372 (elf_x86_64_legacy_plt_entry): Removed.
2373 (elf_x86_64_bnd_plt_entry): Renamed to ...
2374 (elf_x86_64_lazy_bnd_plt_entry): This.
2375 (elf_x86_64_legacy_plt2_entry): Renamed to ...
2376 (elf_x86_64_non_lazy_plt_entry): This.
2377 (elf_x86_64_bnd_plt2_entry): Renamed to ...
2378 (elf_x86_64_non_lazy_bnd_plt_entry): This.
2379 (elf_x86_64_eh_frame_plt): Renamed to ...
2380 (elf_x86_64_eh_frame_lazy_plt): This.
2381 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
2382 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
2383 (elf_x86_64_eh_frame_plt_got): Renamed to ...
2384 (elf_x86_64_eh_frame_non_lazy_plt): This.
2385 (elf_x86_64_lazy_plt_layout): New.
2386 (elf_x86_64_non_lazy_plt_layout): Likewise.
2387 (elf_x86_64_plt_layout): Likewise.
2388 (elf_x86_64_backend_data): Remove PLT layout information. Add
2389 os for target system.
2390 (GET_PLT_ENTRY_SIZE): Removed.
2391 (elf_x86_64_lazy_plt): New.
2392 (elf_x86_64_non_lazy_plt): Likewise.
2393 (elf_x86_64_lazy_bnd_plt): Likewise.
2394 (elf_x86_64_non_lazy_bnd_plt): Likewise.
2395 (elf_x86-64_arch_bed): Updated.
2396 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
2397 (elf_x86_64_create_dynamic_sections): Removed.
2398 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
2399 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
2400 (elf_x86-64_adjust_dynamic_symbol): Updated.
2401 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
2402 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
2403 size for PLT0 if there is no PLT0. Get plt_entry_size from
2404 non_lazy_plt for non-lazy PLT entries.
2405 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
2406 from non_lazy_plt for non-lazy PLT entries.
2407 (elf_x86-64_relocate_section): Updated. Properly get PLT index
2408 if there is no PLT0.
2409 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
2410 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
2411 entries with non-lazy PLT layout. Don't fill the second and third
2412 slots in the PLT entry if there is no PLT0.
2413 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
2414 if there is no PLT0. Set sh_entsize on the .plt.got section.
2415 (compare_relocs): New.
2416 (elf_x86_64_plt_type): Likewise.
2417 (elf_x86_64_plt): Likewise.
2418 (elf_x86_64_nacl_plt): New. Forward declaration.
2419 (elf_x86_64_get_plt_sym_val): Removed.
2420 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
2421 against all dynamic relocations.
2422 (elf_x86_64_link_setup_gnu_properties): New function.
2423 (elf_backend_create_dynamic_sections): Updated.
2424 (elf_backend_setup_gnu_properties): New.
2425 (elf_x86_64_nacl_plt): New.
2426 (elf_x86_64_nacl_arch_bed): Updated.
2428 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2430 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
2431 (LAZY_PLT_ENTRY_SIZE): This.
2432 (NON_LAZY_PLT_ENTRY_SIZE): New.
2433 (elf_i386_plt0_entry): Renamed to ...
2434 (elf_i386_lazy_plt0_entry): This.
2435 (elf_i386_plt_entry): Renamed to ...
2436 (elf_i386_lazy_plt_entry): This.
2437 (elf_i386_pic_plt0_entry): Renamed to ...
2438 (elf_i386_pic_lazy_plt0_entry): This.
2439 (elf_i386_pic_plt_entry): Renamed to ...
2440 (elf_i386_pic_lazy_plt_entry): This.
2441 (elf_i386_got_plt_entry): Renamed to ...
2442 (elf_i386_non_lazy_plt_entry): This.
2443 (elf_i386_pic_got_plt_entry): Renamed to ...
2444 (elf_i386_pic_non_lazy_plt_entry): This.
2445 (elf_i386_eh_frame_plt): Renamed to ...
2446 (elf_i386_eh_frame_lazy_plt): This.
2447 (elf_i386_eh_frame_plt_got): Renamed to ...
2448 (elf_i386_eh_frame_non_lazy_plt): This.
2449 (elf_i386_plt_layout): Renamed to ...
2450 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
2451 eh_frame_plt_got_size.
2452 (elf_i386_non_lazy_plt_layout): New.
2453 (elf_i386_plt_layout): Likewise.
2454 (elf_i386_non_lazy_plt): Likewise.
2455 (GET_PLT_ENTRY_SIZE): Removed.
2456 (elf_i386_plt): Renamed to ...
2457 (elf_i386_lazy_plt): This.
2458 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
2459 (elf_i386_arch_bed): Updated.
2460 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
2461 (elf_i386_create_dynamic_sections): Removed.
2462 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
2463 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
2464 (elf_i386_adjust_dynamic_symbol): Updated.
2465 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
2466 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
2467 size for PLT0 if there is no PLT0.
2468 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
2469 output section is discarded only if GOT isn't empty.
2470 (elf_i386_relocate_section): Updated. Properly get PLT index
2471 if there is no PLT0.
2472 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
2473 second and third slots in the PLT entry if there is no PLT0.
2474 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
2475 if there is no PLT0. Set sh_entsize on the .plt.got section.
2476 (elf_i386_nacl_plt): Forward declaration.
2477 (elf_i386_get_plt_sym_val): Removed.
2478 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
2479 against all dynamic relocations.
2480 (elf_i386_link_setup_gnu_properties): New function.
2481 (elf_backend_create_dynamic_sections): Updated.
2482 (elf_backend_setup_gnu_properties): New.
2483 (elf_i386_nacl_plt): Updated.
2484 (elf_i386_nacl_arch_bed): Likewise.
2485 (elf_i386_vxworks_arch_bed): Likewise.
2487 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
2489 * elflink.c (elf_output_implib): Remove executable flag from import
2491 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
2492 library is a relocatable object file.
2494 2017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
2497 * elf32-avr.c (avr_should_move_sym): New function.
2498 (avr_should_reduce_sym_size): Likewise.
2499 (avr_should_increase_sym_size): Likewise.
2500 (elf32_avr_relax_delete_bytes): Adjust symbol values
2501 and sizes by calling new functions.
2503 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
2505 * config.bfd (riscv32-*): Enable rv64.
2507 2017-05-02 Alan Modra <amodra@gmail.com>
2510 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
2511 rather than h->root.type == bfd_link_hash_new.
2512 (bfd_elf_record_link_assignment): Similarly, call
2513 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
2515 2017-04-29 Alan Modra <amodra@gmail.com>
2518 * reloc.c (reloc_offset_in_range): New function.
2519 (bfd_perform_relocation, bfd_install_relocation): Use it.
2520 (_bfd_final_link_relocate): Likewise.
2522 2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
2524 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
2525 before using .plt.got.
2526 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
2528 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2530 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
2531 instead of "+=" to update 0.
2533 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2535 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
2536 .plt.got section here.
2537 (elf_i386_check_relocs): Don't create the .plt.got section.
2538 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
2539 the .plt.got and .plt.bnd sections here.
2540 (elf_x86_64_check_relocs): Don't create the .plt.got nor
2543 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2545 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
2547 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
2548 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
2549 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
2550 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
2553 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2555 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
2557 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
2558 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
2559 the first relocatable ELF input with GNU properties.
2561 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2563 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
2564 VxWorks for non-PIC.
2566 2017-04-27 Alan Modra <amodra@gmail.com>
2568 * elf-bfd.h (struct elf_backend_data): Make asection param of
2569 elf_backend_eh_frame_address_size const.
2570 (_bfd_elf_eh_frame_address_size): Likewise.
2571 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
2572 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
2573 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
2574 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
2575 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
2576 (next_cie_fde_offset): Constify params.
2577 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
2579 2017-04-27 Alan Modra <amodra@gmail.com>
2581 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
2582 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
2583 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
2585 (offset_adjust): New function.
2586 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
2587 (adjust_eh_frame_local_symbols): Likewise.
2588 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
2589 after changing anything. Return true if anything changed.
2590 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
2591 _bfd_elf_adjust_eh_frame_global_symbol for globals.
2593 2017-04-27 Alan Modra <amodra@gmail.com>
2595 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
2598 2017-04-27 Alan Modra <amodra@gmail.com>
2600 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
2601 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
2602 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
2603 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
2604 for undef and undefweak dyn_relocs.
2605 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
2606 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
2607 (allocate_got, allocate_dynrelocs): Likewise.
2608 (ppc64_elf_relocate_section): Likewise.
2610 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
2612 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
2613 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
2614 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
2615 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
2617 2017-04-26 Nick Clifton <nickc@redhat.com>
2620 * reloc.c (bfd_perform_relocation): Check for a negative address
2623 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
2626 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
2628 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
2629 (elf_backend_always_renumber_dynsyms): Define.
2630 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
2631 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
2632 * elflink.c (bfd_elf_size_dynamic_sections): Also call
2633 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
2635 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
2637 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
2639 * elflink.c (bfd_elf_size_dynamic_sections): Only call
2640 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
2641 sections have been created.
2643 2017-04-26 Nick Clifton <nickc@redhat.com>
2646 * compress.c (bfd_init_section_compress_status): Check the return
2647 value from bfd_malloc.
2649 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
2651 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
2652 no_finish_dynamic_symbol.
2653 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
2655 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
2656 weak symbol, don't make it dynamic.
2657 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
2658 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
2659 relocation for GOT reference.
2660 (elf_x86_64_finish_dynamic_symbol): Abort if
2661 no_finish_dynamic_symbol isn't 0.
2663 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
2666 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
2667 undefined weak symbol, don't make it dynamic.
2668 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
2669 set no_finish_dynamic_symbol and generate R_386_RELATIVE
2670 relocation for R_386_GOT32.
2672 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
2675 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
2677 2017-04-23 Alan Modra <amodra@gmail.com>
2680 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
2681 * elf.c (lcomm_sym): New.
2682 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
2683 * bfd-in2.h: Regenerate.
2685 2017-04-23 Alan Modra <amodra@gmail.com>
2688 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
2689 parameters and comment.
2690 (_bfd_elf_get_reloc_section): Delete.
2691 (_bfd_elf_plt_get_reloc_section): Declare.
2692 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
2693 New functions. Don't blindly skip over assumed .rel/.rela prefix.
2695 (_bfd_elf_get_reloc_section): ..here. Delete.
2696 (assign_section_numbers): Call elf_get_reloc_section.
2697 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
2698 * elfxx-target.h (elf_backend_get_reloc_section): Update.
2700 2017-04-23 Alan Modra <amodra@gmail.com>
2703 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
2706 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
2709 * elf32-i386.c (elf_i386_link_hash_entry): Add
2710 no_finish_dynamic_symbol.
2711 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
2712 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
2713 symbol, don't make it dynamic in PIE.
2714 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
2715 set no_finish_dynamic_symbol and generate R_386_RELATIVE
2716 relocation for R_386_GOT32
2717 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
2720 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
2724 * elflink.c (elf_link_add_object_symbols): Require
2725 --no-dynamic-linker with -E/--dynamic-list when creating
2728 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
2730 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
2733 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
2735 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
2736 dynamic symbol sorting.
2738 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
2741 * elflink.c (elf_link_add_object_symbols): Preserve
2742 dynamic_ref_after_ir_def when restoring the symbol table for
2743 unneeded dynamic object.
2745 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
2748 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
2749 on on undefined IFUNC symbol in the second PLT.
2751 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
2753 * peXXigen.c (pe_print_reloc): Correct chunk_end.
2755 2017-04-19 Alan Modra <amodra@gmail.com>
2757 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
2758 or make dynamic for info->dynamic_undefined_weak 0 and 1.
2759 * elf32-ppc.c:Formatting.
2760 (ensure_undefweak_dynamic): Don't make dynamic when
2761 info->dynamic_undefined_weak is zero.
2762 (allocate_dynrelocs): Discard undefweak dyn_relocs for
2763 info->dynamic_undefined_weak. Discard undef dyn_relocs when
2764 not default visibility. Discard undef and undefweak
2766 (ppc_elf_relocate_section): Adjust to suit.
2767 * elf64-ppc.c: Formatting.
2768 (ensure_undefweak_dynamic): Don't make dynamic when
2769 info->dynamic_undefined_weak is zero.
2770 (allocate_dynrelocs): Discard undefweak dyn_relocs for
2771 info->dynamic_undefined_weak. Discard them earlier.
2773 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
2776 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
2777 before generating the version definition section.
2779 2017-04-17 Alan Modra <amodra@gmail.com>
2781 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
2782 state when a regular object file defines a symbol with
2783 incompatible type to that defined by an earlier shared lib.
2785 2017-04-13 Alan Modra <amodra@gmail.com>
2787 * coffcode.h: Wrap some overly long _bfd_error_handler args.
2789 * elf32-arm.c: Likewise.
2790 * elf32-i386.c: Likewise.
2791 * elf32-mep.c: Likewise.
2792 * elf64-ia64-vms.c: Likewise.
2793 * elf64-x86-64.c: Likewise.
2794 * elflink.c: Likewise.
2795 * elfnn-ia64.c: Likewise.
2796 * elfxx-mips.c: Likewise.
2798 2017-04-13 Alan Modra <amodra@gmail.com>
2800 * aoutx.h: Use %B and %A in error messages throughout file.
2801 * aout-cris.c: Likewise.
2802 * archive.c: Likewise.
2803 * binary.c: Likewise.
2804 * coff-rs6000.c: Likewise.
2805 * coff-tic4x.c: Likewise.
2806 * coffcode.h: Likewise.
2807 * coffgen.c: Likewise.
2808 * cofflink.c: Likewise.
2809 * coffswap.h: Likewise.
2810 * cpu-arm.c: Likewise.
2811 * elf-eh-frame.c: Likewise.
2812 * elf-m10300.c: Likewise.
2814 * elf32-arc.c: Likewise.
2815 * elf32-arm.c: Likewise.
2816 * elf32-bfin.c: Likewise.
2817 * elf32-frv.c: Likewise.
2818 * elf32-iq2000.c: Likewise.
2819 * elf32-m32c.c: Likewise.
2820 * elf32-microblaze.c: Likewise.
2821 * elf32-nds32.c: Likewise.
2822 * elf32-rl78.c: Likewise.
2823 * elf32-rx.c: Likewise.
2824 * elf32-score.c: Likewise.
2825 * elf32-score7.c: Likewise.
2826 * elf32-sh64.c: Likewise.
2827 * elf32-v850.c: Likewise.
2828 * elf32-vax.c: Likewise.
2829 * elf32-visium.c: Likewise.
2830 * elf64-ia64-vms.c: Likewise.
2831 * elf64-mmix.c: Likewise.
2832 * elf64-sh64.c: Likewise.
2833 * elfcode.h: Likewise.
2834 * elfnn-aarch64.c: Likewise.
2835 * elfnn-ia64.c: Likewise.
2836 * elfxx-mips.c: Likewise.
2837 * hpux-core.c: Likewise.
2840 * linker.c: Likewise.
2841 * merge.c: Likewise.
2843 * oasys.c: Likewise.
2844 * pdp11.c: Likewise.
2845 * peXXigen.c: Likewise.
2846 * rs6000-core.c: Likewise.
2847 * vms-alpha.c: Likewise.
2848 * xcofflink.c: Likewise.
2850 2017-04-13 Alan Modra <amodra@gmail.com>
2852 * bfd.c (PRINT_TYPE): Define.
2853 (_doprnt): New function.
2854 (error_handler_internal): Use _doprnt.
2855 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
2856 calls in their natural order, throughout file.
2857 * coff-mcore.c: Likewise.
2858 * coff-ppc.c: Likewise.
2859 * coff-tic80.c: Likewise.
2860 * cofflink.c: Likewise.
2861 * elf-s390-common.c: Likewise.
2863 * elf32-arm.c: Likewise.
2864 * elf32-i386.c: Likewise.
2865 * elf32-m32r.c: Likewise.
2866 * elf32-msp430.c: Likewise.
2867 * elf32-spu.c: Likewise.
2868 * elf64-ia64-vms.c: Likewise.
2869 * elf64-sparc.c: Likewise.
2870 * elf64-x86-64.c: Likewise.
2871 * elflink.c: Likewise.
2872 * elfnn-aarch64.c: Likewise.
2873 * elfnn-ia64.c: Likewise.
2874 * elfxx-mips.c: Likewise.
2876 2017-04-13 Alan Modra <amodra@gmail.com>
2878 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
2879 branch veneers" error. Fix double space and format message.
2880 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
2881 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
2883 2017-04-13 Alan Modra <amodra@gmail.com>
2885 * bfd-in2.h: Regenerate.
2887 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
2889 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
2890 extra `\n' in warning/error messages.
2891 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
2892 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
2894 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
2896 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
2897 processor-specific properties with generic ELF target vector.
2899 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
2901 * elf32-sparc.c (elf_backend_fixup_symbol): New.
2902 * elf64-sparc.c (elf_backend_fixup_symbol): New.
2903 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
2904 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
2906 (link_hash_newfunc): Initialize has_got_reloc and
2908 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
2910 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
2912 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
2914 (_bfd_sparc_elf_fixup_symbol): New function.
2915 (allocate_dynrelocs): Don't allocate space for dynamic
2916 relocations and discard relocations against resolved undefined
2917 weak symbols in executable. Don't make resolved undefined weak
2918 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
2919 relocation against undefined weak symbols in PIE.
2920 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
2921 relocations against resolved undefined weak symbols in PIE
2922 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
2923 without ynamic PLT/GOT relocations for resolved undefined weak
2925 Don't generate dynamic relocation against resolved undefined
2926 weak symbol in executable.
2927 (pie_finish_undefweak_symbol): New function.
2928 (_bfd_sparc_elf_finish_dynamic_sections): Call
2929 pie_finish_undefweak_symbol on all symbols in PIE.
2930 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
2931 (_bfd_sparc_elf_fixup_symbol): New function.
2933 2017-04-10 Nick Clifton <nickc@redhat.com>
2935 * config.bfd: Remove ns32k from obsolete list.
2937 2017-04-10 Alan Modra <amodra@gmail.com>
2940 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
2941 (special_sections_i): Likewise for .init_array.
2942 (special_sections_p): Likewise for .preinit_array.
2944 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
2948 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
2949 ELF_COMMON_DEF_P for common symbols.
2950 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
2951 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
2952 * elflink.c (_bfd_elf_merge_symbol): Revert commits
2953 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
2954 07492f668d2173da7a2bda3707ff0985e0f460b6.
2956 2017-04-07 Pedro Alves <palves@redhat.com>
2958 * opncls.c (bfd_get_debug_link_info): Rename to...
2959 (bfd_get_debug_link_info_1): ... this. Change type of second
2960 parameter to void pointer. Adjust.
2961 (bfd_get_debug_link_info): Reimplement on top of
2962 bfd_get_debug_link_info_1.
2963 (separate_debug_file_exists, separate_alt_debug_file_exists):
2964 Change type of second parameter to void pointer. Adjust.
2965 (get_func_type, check_func_type): Change type of second parameter
2967 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
2968 the callback functions instead of passing the address of a local.
2969 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
2970 find_separate_debug_file.
2971 (get_alt_debug_link_info_shim): Change type of second parameter to
2972 void pointer. Adjust.
2973 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
2974 find_separate_debug_file.
2975 (get_build_id_name, bfd_boolean check_build_id_file): Change type
2976 of second parameter to void pointer. Adjust.
2977 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
2978 pointer local to find_separate_debug_file.
2980 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
2982 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
2983 external symbols with a definition.
2984 (_bfd_coff_gc_mark_extra_sections): Fix typo.
2986 2017-04-07 Alan Modra <amodra@gmail.com>
2988 * po/SRC-POTFILES.in: Regenerate.
2990 2017-04-05 Alan Modra <amodra@gmail.com>
2992 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
2995 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
2997 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
2998 numbers for DataDirectory entry indicies passed to
3001 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
3003 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
3004 each GNU_MBIND section and align GNU_MBIND section to page size.
3005 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
3006 segment for each GNU_MBIND section.
3007 (_bfd_elf_init_private_section_data): Copy sh_info from input
3008 for GNU_MBIND section.
3010 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
3012 * elfnn-riscv.c (GP_NAME): Delete.
3013 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
3014 (_bfd_riscv_relax_lui): Likewise.
3016 2017-04-04 Nick Clifton <nickc@redhat.com>
3019 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
3021 (bfd_elf_final_link): Only initialize the extended symbol index
3022 section if there are extended symbol tables to list.
3024 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
3026 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
3027 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
3028 * configure.ac (elf): Add elf-properties.lo.
3029 * Makefile.in: Regenerated.
3030 * configure: Likewise.
3031 * elf-bfd.h (elf_property_kind): New.
3032 (elf_property): Likewise.
3033 (elf_property_list): Likewise.
3034 (elf_properties): Likewise.
3035 (_bfd_elf_parse_gnu_properties): Likewise.
3036 (_bfd_elf_get_property): Likewise.
3037 (_bfd_elf_link_setup_gnu_properties): Likewise.
3038 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
3039 and setup_gnu_properties.
3040 (elf_obj_tdata): Add properties.
3041 * elf-properties.c: New file.
3042 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
3043 (elf_i386_merge_gnu_properties): Likewise.
3044 (elf_backend_parse_gnu_properties): Likewise.
3045 (elf_backend_merge_gnu_properties): Likewise.
3046 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3047 (elf_x86_64_merge_gnu_properties): Likewise.
3048 (elf_backend_parse_gnu_properties): Likewise.
3049 (elf_backend_merge_gnu_properties): Likewise.
3050 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
3051 (elf_backend_parse_gnu_properties): Likewise.
3052 (elf_backend_setup_gnu_properties): Likewise.
3053 (elfNN_bed): Add elf_backend_parse_gnu_properties,
3054 elf_backend_merge_gnu_properties and
3055 elf_backend_setup_gnu_properties.
3057 2017-03-30 Pip Cet <pipcet@gmail.com>
3059 * elf32-wasm32.c: Add relocation code, two relocs.
3060 * reloc.c: Add wasm32 relocations.
3061 * libbfd.h: Regenerate.
3062 * bfd-in2.h: Regenerate.
3063 * bfd/po/bfd.pot: Regenerate.
3065 2017-03-29 Nick Clifton <nickc@redhat.com>
3068 * coff-bfd.h (struct coff_section_data): Add new fields:
3069 saved_bias and bias.
3070 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
3071 computed for PE binaries.
3072 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
3075 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
3078 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
3079 to handle a local symbol with a hash-symbol-entry; without PLT.
3080 Add BFD_ASSERT for an incidental case with GOT entry present.
3081 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
3082 isn't forced-or-set local.
3084 2017-03-27 Pip Cet <pipcet@gmail.com>
3086 * wasm-module.c: New file to support WebAssembly modules.
3087 * wasm-module.h: New file to support WebAssembly modules.
3088 * doc/webassembly.texi: Start documenting wasm-module.c.
3089 * config.bfd: Add wasm_vec.
3090 * targets.c: Likewise.
3091 * configure.ac: Likewise.
3092 * Makefile.am: Add entries for wasm-module.c.
3093 * Makefile.in: Regenerate.
3094 * configure: Regenerate.
3095 * po/SRC-POTFILES.in: Regenerate.
3097 2017-03-27 Pip Cet <pipcet@gmail.com>
3099 * cpu-wasm32.c: New file to support wasm32 architecture.
3100 * elf32-wasm32.c: New file to support wasm32 architecture.
3101 * Makefile.am: Add wasm32 architecture.
3102 * archures.c: Likewise.
3103 * config.bfd: Likewise.
3104 * configure.ac: Likewise.
3105 * targets.c: Likewise.
3106 * Makefile.in: Regenerate.
3107 * bfd-in2.h: Regenerate.
3108 * configure: Regenerate.
3109 * po/SRC-POTFILES.in: Regenerate.
3111 2017-03-20 Alan Modra <amodra@gmail.com>
3114 * elf64-ppc.c (compare_symbols): Stabilize sort.
3116 2017-03-18 Alan Modra <amodra@gmail.com>
3118 * elf64-ppc.c (struct ppc_link_hash_table): Add
3119 local_ifunc_resolver and maybe_local_ifunc_resolver.
3120 (ppc_build_one_stub): Set flags on emitting dynamic
3121 relocation to ifunc.
3122 (ppc64_elf_relocate_section): Likewise.
3123 (ppc64_elf_finish_dynamic_symbol): Likewise.
3124 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
3125 local dynamic relocs to ifuncs.
3126 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
3127 local_ifunc_resolver and maybe_local_ifunc_resolver.
3128 (ppc_elf_relocate_section): Set flag on emitting dynamic
3129 relocation to ifuncs.
3130 (ppc_elf_finish_dynamic_symbol): Likewise.
3131 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
3132 dynamic relocs to ifuncs.
3134 2017-03-13 Nick Clifton <nickc@redhat.com>
3137 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
3138 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
3139 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
3140 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
3141 * bfd-in2.h: Regenerate.
3142 * libbfd.h: Regenerate.
3143 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
3145 (IS_AARCH64_TLSDESC_RELOC): Likewise.
3146 (elfNN_aarch64_howto_table): Likewise.
3147 (aarch64_tls_transition_without_check): Likewise.
3148 (aarch64_reloc_got_type): Likewise.
3149 (elfNN_aarch64_final_link_relocate): Likewise.
3150 (elfNN_aarch64_tls_relax): Likewise.
3151 (elfNN_aarch64_relocate_section): Likewise.
3152 (elfNN_aarch64_gc_sweep_hook): Likewise.
3153 (elfNN_aarch64_check_relocs): Likewise.
3154 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
3155 (_bfd_aarch64_elf_resolve_relocation): Likewise.
3157 2017-03-11 Alan Modra <amodra@gmail.com>
3159 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
3160 parameter is in fact used. Whitespace fixes.
3161 * elf64-ppc.c: Likewise.
3163 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
3165 * rs6000-core.c (CORE_NEW): Simplify macro when
3166 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
3168 2017-03-07 Alan Modra <amodra@gmail.com>
3172 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
3175 2017-03-05 Alan Modra <amodra@gmail.com>
3177 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
3178 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
3179 (next_cie_fde_offset): New function.
3180 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
3181 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
3182 four bytes. Align CIEs to four or eight bytes depending on
3183 per_encoding_aligned8. Align FDEs according to their encoding.
3184 Pad last FDE to output section alignment.
3185 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
3187 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
3188 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
3189 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
3191 2017-03-02 Martin Bickel <binutils@ineranves.de>
3194 * elf.c (rewrite_elf_program_header): Do not issue a warning for
3195 empty segments which have a zero filesz, but a non-zero memsz.
3197 2017-03-02 Alan Modra <amodra@gmail.com>
3199 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
3201 2017-02-28 Alan Modra <amodra@gmail.com>
3203 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
3204 (ppc64_elf_relocate_section): Likewise.
3206 2017-02-28 Alan Modra <amodra@gmail.com>
3209 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
3210 rather than elf32_nios2_hash_table or elf_hash_table.
3211 (create_got_section): Likewise.
3212 (nios2_elf32_finish_dynamic_symbol): Likewise.
3213 (nios2_elf32_adjust_dynamic_symbol): Likewise.
3214 (nios2_elf32_size_dynamic_sections): Likewise.
3215 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
3216 vars. Use htab equivalents directly instead. Don't create
3217 all dynamic sections on needing just the GOT. Use a goto
3218 rather than a fall-through with reloc test. Ensure
3219 htab->dynobj is set when making dynamic sreloc section.
3220 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
3221 equivalent directly instead. Don't segfault on looking for
3222 .dynamic when dynamic sections have not been created. Don't
3223 segfault on .got.plt being discarded.
3224 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
3225 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
3226 fixme and another not so relevant comment.
3227 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
3228 already set, set hash table dynobj on creating .sbss.
3230 2017-02-28 Alan Modra <amodra@gmail.com>
3232 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
3233 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
3234 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
3235 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
3236 (ppc64_elf_relocate_section): Likewise.
3237 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
3238 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
3239 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
3240 * libbfd.h: Regenerate.
3241 * bfd-in2.h: Regenerate.
3243 2017-02-28 Alan Modra <amodra@gmail.com>
3245 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
3246 dynamic .data.rel.ro read-only.
3247 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
3248 rather than section flags when deciding where copy reloc goes.
3249 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
3250 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
3251 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
3252 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
3253 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
3254 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
3255 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
3256 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
3257 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3258 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
3259 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
3260 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
3261 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3262 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
3263 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
3264 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
3265 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
3266 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
3267 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
3269 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
3271 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
3272 `jalr $0, $25' instruction encoding.
3274 2017-02-27 Nick Clifton <nickc@redhat.com>
3277 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
3278 generating a seg-fault when encountering a symbol that has been
3279 deleted by garbage collection.
3281 2017-02-25 Alan Modra <amodra@gmail.com>
3283 * elf32-arc.c (struct dynamic_sections): Delete.
3284 (enum dyn_section_types): Delete.
3285 (dyn_section_names): Delete.
3286 (arc_create_dynamic_sections): Delete.
3287 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
3288 segfault on discarded .rela.plt section.
3289 (elf_arc_size_dynamic_sections): Formatting. Don't call
3290 arc_create_dynamic_sections. Don't allocate memory for sections
3291 handled by the generic linker. Correct code finding relocs in
3292 read-only sections. Set SEC_EXCLUDE on zero size .got,
3293 .got.plt, and .dynbss sections. Do set .interp for pies.
3295 2017-02-24 Andrew Waterman <andrew@sifive.com>
3297 * elfnn-riscv.c (GP_NAME): New macro.
3298 (riscv_global_pointer_value): Use it.
3299 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
3300 output section, consider only that section's alignment.
3302 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
3304 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
3305 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
3306 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
3307 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
3309 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
3311 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
3312 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
3315 2017-02-23 Alan Modra <amodra@gmail.com>
3318 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
3320 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
3321 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
3324 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
3327 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
3328 processing ahead of the call to `elf_gc_sweep_symbol'.
3330 2017-02-22 Nick Clifton <nickc@redhat.com>
3333 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
3334 created section 4-byte alignment.
3336 2017-02-22 Alan Modra <amodra@gmail.com>
3338 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
3339 on .got or .plt output section being discarded by script.
3340 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
3343 2017-02-21 Alan Modra <amodra@gmail.com>
3345 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
3346 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
3348 2017-02-20 Alan Modra <amodra@gmail.com>
3351 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
3352 if DT_RELSZ/DT_RELASZ is zero.
3354 2017-02-17 Nick Clifton <nickc@redhat.com>
3356 * compress.c (bfd_get_full_section_contents): Remember to reduce
3357 compressed size by the sizeof the compression header when
3358 decompressing the contents.
3360 2017-02-17 Pedro Alves <palves@redhat.com>
3362 * srec.c (Chunk): Rename to ...
3363 (_bfd_srec_len): ... this.
3364 (S3Forced): Rename to ...
3365 (_bfd_srec_forceS3): ... this.
3366 * objcopy.c: Adjust all references.
3368 2017-02-17 Pedro Alves <palves@redhat.com>
3370 * archive.c (bsd_write_armap): Rename to ...
3371 (_bfd_bsd_write_armap): ... this.
3372 (coff_write_armap): Rename to ...
3373 (_bfd_coff_write_armap): ... this.
3374 * libbfd-in.h (bsd_write_armap): Rename to ...
3375 (_bfd_bsd_write_armap): ... this.
3376 (coff_write_armap): Rename to ...
3377 (_bfd_coff_write_armap): ... this.
3378 * aout-target.h, aout-tic30.c: Adjust all users.
3379 * libbfd.h: Regenerate.
3381 2017-02-17 Pedro Alves <palves@redhat.com>
3383 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
3384 (warn_deprecated): Rename to ...
3385 (_bfd_warn_deprecated): ... this.
3386 * libbfd.c (warn_deprecated): Rename to ...
3387 (_bfd_warn_deprecated): ... this.
3388 * bfd-in2.h: Regenerate.
3390 2017-02-17 Pedro Alves <palves@redhat.com>
3392 * bfdio.c (real_ftell): Rename to ...
3393 (_bfd_real_ftell): ... this.
3394 (real_fseek): Rename to ...
3395 (_bfd_real_fseek): ... this.
3396 (real_fopen): Rename to ...
3397 (_bfd_real_fopen): ... this.
3398 * libbfd-in.h (real_ftell): Rename to ...
3399 (_bfd_real_ftell): ... this.
3400 (real_fseek): Rename to ...
3401 (_bfd_real_fseek): ... this.
3402 (real_fopen): Rename to ...
3403 (_bfd_real_fopen): ... this.
3404 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
3405 * libbfd.h: Regenerate.
3407 2017-02-17 Pedro Alves <palves@redhat.com>
3409 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
3410 * libbfd.c (read_unsigned_leb128): Rename to ...
3411 (_bfd_read_unsigned_leb128): ... this.
3412 (read_signed_leb128): Rename to ...
3413 (_bfd_read_signed_leb128): ... this.
3414 (safe_read_leb128): Rename to ...
3415 (_bfd_safe_read_leb128): ... this.
3416 * libbfd-in.h (read_unsigned_leb128): Rename to ...
3417 (_bfd_read_unsigned_leb128): ... this.
3418 (read_signed_leb128): Rename to ...
3419 (_bfd_read_signed_leb128): ... this.
3420 (safe_read_leb128): Rename to ...
3421 (_bfd_safe_read_leb128): ... this.
3422 * libbfd.h: Renegerate.
3424 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
3426 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
3427 before trying to fine matching file and line information.
3429 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
3431 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
3432 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
3433 not match current bfd, then reload debug information. Record bfd
3434 we're loading debug info for in the stash. If we have debug
3435 informatin in the cache then perform section placement before
3438 2017-02-16 Alan Modra <amodra@gmail.com>
3441 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
3442 * elfxx-target.h (elf_backend_no_page_alias): Define.
3443 (elfNN_bed): Init new field.
3444 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
3445 ensure PT_LOAD segment starts on a new page.
3446 * elf32-hppa.c (elf_backend_no_page_alias): Define.
3448 2017-02-16 Alan Modra <amodra@gmail.com>
3451 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
3454 2017-02-16 Jiong Wang <jiong.wang@arm.com>
3456 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
3457 * bfd-in2.h: Regenerated.
3459 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
3462 * elf32-i386.c (elf_i386_relocate_section): Allow
3463 "lea foo@GOT, %reg" in PIC.
3465 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
3468 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
3469 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
3470 error against local IFUNC symbol without a base register for
3473 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
3475 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
3476 `%P: %H:' with `info->callbacks->einfo'.
3477 (ppc_elf_relocate_section): Likewise.
3478 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
3479 (ppc64_elf_edit_toc): Likewise.
3480 (ppc64_elf_relocate_section): Likewise.
3482 2017-02-14 Alan Modra <amodra@gmail.com>
3484 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
3485 --gc-keep-exported, and test versioned field of sym rather than
3486 looking for @ in name.
3488 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
3490 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
3493 2017-02-13 Nick Clifton <nickc@redhat.com>
3496 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
3499 2017-02-07 Andrew Waterman <andrew@sifive.com>
3501 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
3502 entry size if PLT header is written.
3504 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
3506 Fix sparc64 dynamic relocation processing to use the dynamic
3508 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
3509 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
3512 2017-02-03 Nick Clifton <nickc@redhat.com>
3515 * coffcode.h (coff_write_object_contents): Enlarge size of
3516 s_name_buf in order to avoid compile time warning about possible
3518 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
3519 32-bits of insn value before printing into buffer.
3521 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3523 * elfxx-mips.c (mips_elf_hash_sort_data): Add
3524 `max_local_dynindx'.
3525 (mips_elf_sort_hash_table): Handle it.
3526 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
3527 symbols bump up `max_local_dynindx' rather than
3528 `max_non_got_dynindx'.
3530 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3532 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
3533 `min_got_dynindx', `max_unref_got_dynindx' and
3534 `max_non_got_dynindx' members to the `bfd_size_type' data type.
3535 (mips_elf_sort_hash_table): Adjust accordingly.
3537 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3539 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
3540 to access the hash table.
3542 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3544 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
3545 non-NULL `htab' to the beginning.
3547 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3549 * elflink.c (elf_gc_sweep): Wrap overlong line.
3551 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
3553 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
3554 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
3555 * elfxx-mips.c (mips_elf_link_hash_table): Add
3556 `ignore_branch_isa' member.
3557 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
3558 in branch relocation calculation as an error if
3559 `ignore_branch_isa' has been set.
3560 (_bfd_mips_elf_insn32): Rename to...
3561 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
3562 parameter to `insn32' and add an `ignore_branch_isa' parameter.
3563 Handle the new parameter.
3565 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
3567 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
3568 local variable dynobj.
3571 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
3572 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
3573 executable from read-only sections into sdynrelro.
3574 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
3575 dynamic relocs in sdynrelro.
3576 (elf_backend_want_dynrelro): Define.
3578 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
3580 * config.bfd (*-*-rtemsaout*): Mark as removed.
3582 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
3584 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
3585 (arm-*-rtems*): Move to (arm*-*-eabi*).
3586 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
3587 (m68-*-rtems*): Move to (m68*-*-elf*).
3589 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
3591 * config.bfd (*-*-rtemscoff*): Mark as removed.
3593 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
3596 * elflink.c (bfd_elf_record_link_assignment): Revert last
3597 change and don't ever clear `forced_local'. Set `mark'
3599 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
3601 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
3602 (bfd_elf_size_dynamic_sections): ... here.
3603 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
3604 and set `mark' instead in `__tls_get_addr_opt' processing.
3605 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
3607 2017-01-24 Alan Modra <amodra@gmail.com>
3609 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
3610 where dynamic relocs are preferable. Allow ifunc too.
3611 (ensure_undefweak_dynamic): New function.
3612 (allocate_dynrelocs): Use it here. Move plt handling last and
3613 don't make symbols dynamic, simplifying loop. Only make undef
3614 weak symbols with GOT entries dynamic. Correct condition
3615 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
3616 comments. Remove goto.
3617 (ppc_elf_relocate_section): Correct test for using dynamic
3618 symbol on GOT relocs. Rearrange test for emitting GOT relocs
3619 to suit. Set up explicit tls_index entries and implicit GOT
3620 tls_index entries resolvable at link time for
3621 __tls_get_addr_opt. Simplify test to clear mem for prelink.
3622 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
3623 (ensure_undefweak_dynamic): New function.
3624 (allocate_dynrelocs): Use it here. Only make undef weak symbols
3625 with GOT entries dynamic. Remove unnecessary test of
3626 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
3627 (ppc64_elf_relocate_section): Correct test for using dynamic
3628 symbol on GOT relocs. Rearrange test for emitting GOT relocs
3629 to suit. Set up explicit tls_index entries and implicit GOT
3630 tls_index entries resolvable at link time for __tls_get_addr_opt.
3631 Simplify expression to clear mem for prelink.
3633 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
3635 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
3637 2017-01-20 Jiong Wang <jiong.wang@arm.com>
3639 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
3640 (elf_backend_hash_symbol): Define.
3642 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
3645 * elflink.c (bfd_elf_record_link_assignment): Clear any
3646 `forced_local' marking for DSO symbols that are not being
3649 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
3651 * elfnn-riscv.c (riscv_elf_object_p): New function.
3653 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
3656 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
3658 (elf_x86_64_check_relocs): Create .eh_frame section for the
3660 (elf_x86_64_size_dynamic_sections): Allocate and initialize
3661 .eh_frame section for the .plt.bnd section.
3662 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
3663 for the .plt.bnd section.
3665 2017-01-12 Nick Clifton <nickc@redhat.com>
3668 * opncls.c (find_separate_debug_file): Add include_dirs
3669 parameter. Only include the directory part of the bfd's filename
3670 in search paths if include_dirs is true. Add a couple of extra
3671 locations for looking for debug files.
3672 ( bfd_follow_gnu_debuglink): Update invocation of
3673 find_separate_debug_file.
3674 (bfd_follow_gnu_debugaltlink): Likewise.
3675 (get_build_id): New function: Finds the build-id of the given bfd.
3676 (get_build_id_name): New function: Computes the name of the
3677 separate debug info file for a bfd, based upon its build-id.
3678 (check_build_id_file): New function: Checks to see if a separate
3679 debug info file exists at the given location, and that its
3680 build-id matches that of the original bfd.
3681 (bfd_follow_build_id_debuglink): New function: Finds a separate
3682 debug info file for a given bfd by using the build-id method.
3683 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
3684 method of locating a separate debug info file before using the
3686 * bfd-in2.h: Regenerate.
3688 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
3691 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
3692 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
3693 elf_x86_64_eh_frame_plt_got.
3694 (elf_x86_64_size_dynamic_sections): Get unwind info from
3695 elf_x86_64_bnd_arch_bed for the BND PLT.
3697 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
3699 * config.bfd: Add entries for i686-redox and x86_64-redox.
3701 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
3703 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
3705 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
3706 .eh_frame section to 4 bytes for x32.
3707 (elf_x86_64_check_relocs): Likewise.
3709 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
3712 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
3713 (PLT_GOT_FDE_LENGTH): Likewise.
3714 (elf_i386_plt_layout): Add eh_frame_plt_got and
3715 eh_frame_plt_got_size.
3716 (elf_i386_plt): Updated.
3717 (elf_i386_link_hash_table): Add plt_got_eh_frame.
3718 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
3719 (elf_i386_size_dynamic_sections): Allocate and initialize
3720 .eh_frame section for .plt.got.
3721 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
3723 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
3724 eh_frame_plt_got_size.
3725 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
3726 (PLT_GOT_FDE_LENGTH): Likewise.
3727 (elf_x86_64_backend_data): Add eh_frame_plt_got and
3728 eh_frame_plt_got_size.
3729 (elf_x86_64_arch_bed): Updated.
3730 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
3731 eh_frame_plt_got_size.
3732 (elf_x86_64_nacl_arch_bed): Likewise.
3733 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
3734 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
3735 (elf_x86_64_size_dynamic_sections): Allocate and initialize
3736 .eh_frame section for .plt.got.
3737 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
3740 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
3742 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
3743 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
3745 2017-01-09 Nick Clifton <nickc@redhat.com>
3747 * dwarf2.c (lookup_address_in_function_table): Return early if
3748 there are no functions in the given comp unit, or if the high
3749 address of the last function in the comp unit is less than the
3752 2017-01-09 Nick Clifton <nickc@redhat.com>
3755 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
3756 message if there are too many symbols to load.
3758 2017-01-04 James Clarke <jrtc27@jrtc27.com>
3760 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
3761 if relocs are cached.
3763 2017-01-03 Rich Felker <bugdal@aerifal.cx>
3766 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
3767 for R_MICROBLAZE_GOTOFF_64.
3769 2017-01-03 Nick Clifton <nickc@redhat.com>
3771 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
3772 warning about using a possibly uninitialised variable.
3774 2017-01-02 Alan Modra <amodra@gmail.com>
3776 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
3777 (allocate_plt_static, allocate_dynrelocs): Use it.
3779 2017-01-02 Alan Modra <amodra@gmail.com>
3781 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
3782 .PARISC.unwind section.
3784 2017-01-02 Alan Modra <amodra@gmail.com>
3787 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
3788 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
3789 indirect to GOT pointer relative code edit.
3791 2017-01-02 Alan Modra <amodra@gmail.com>
3793 Update year range in copyright notice of all files.
3795 For older changes see ChangeLog-2016
3797 Copyright (C) 2017 Free Software Foundation, Inc.
3799 Copying and distribution of this file, with or without modification,
3800 are permitted in any medium without royalty provided the copyright
3801 notice and this notice are preserved.
3807 version-control: never