1 2017-08-31 Alan Modra <amodra@gmail.com>
3 * po/SRC-POTFILES.in: Regenerate.
5 2017-08-31 Alan Modra <amodra@gmail.com>
7 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Don't exit early
8 for a section containing just a terminator. Allow multiple
9 terminators at end of section.
10 * elflink.c (bfd_elf_discard_info): Iterate over .eh_frame
11 sections when not adding alignment. Assert on terminator in
14 2017-08-31 Alan Modra <amodra@gmail.com>
18 * elflink.c (bfd_elf_discard_info): Don't pad embedded zero
21 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
23 * configure.ac (bfd_backends): Add elf64.lo together with
24 elfxx-x86.lo for 64-bit BFD.
25 * configure: Regenerated.
27 2017-08-31 James Bowman <james.bowman@ftdichip.com>
29 * elf32-ft32.c (ft32_elf_howto_table): Use complain_overflow_dont
32 2017-08-31 Alan Modra <amodra@gmail.com>
35 * opncls.c (bfd_close_all_done): Don't call bfd_cache_close
36 before _close_and_cleanup. Call iovec->bclose after.
37 (bfd_close): Remove code common to, and call, bfd_close_all_done.
39 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
41 * elf32-i386.c (elf_i386_plt_type): Removed.
42 (elf_i386_plt): Likewise.
43 (elf_i386_get_synthetic_symtab): Updated. Call
44 _bfd_x86_elf_get_synthetic_symtab.
45 * elf64-x86-64.c (elf_x86_64_plt_type): Removed.
46 (elf_x86_64_plt): Likewise.
47 (elf_x86_64_get_synthetic_symtab): Updated. Call
48 _bfd_x86_elf_get_synthetic_symtab.
49 * elfxx-x86.c (elf_i386_get_plt_got_vma): New function.
50 (elf_x86_64_get_plt_got_vma): Likewise.
51 (elf_i386_valid_plt_reloc_p): Likewise.
52 (elf_x86_64_valid_plt_reloc_p): Likewise.
53 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
54 * elfxx-x86.h (elf_x86_plt_type): New.
55 (elf_x86_plt): Likewise.
56 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
58 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
60 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Check
61 target_id instead of elf_machine_code.
63 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
65 * elf32-i386.c (ELF_DYNAMIC_INTERPRETER): Removed.
66 (elf_i386_lazy_plt_layout): Likewise.
67 (elf_i386_non_lazy_plt_layout): Likewise.
68 (elf_i386_plt_layout): Likewise.
69 (elf_i386_link_hash_table): Likewise.
70 (elf_i386_next_tls_desc_index): Likewise.
71 (elf_i386_srelplt2): Likewise.
72 (elf_i386_plt): Likewise.
73 (elf_i386_lazy_plt): Likewise.
74 (elf_i386_non_lazy_plt): Likewise.
75 (elf_i386_link_hash_table_create): Likewise.
76 (bfd_elf32_bfd_link_hash_table_create): Likewise.
77 (elf_i386_lazy_plt): Updated.
78 (elf_i386_non_lazy_plt): Likewise.
79 (elf_i386_lazy_ibt_plt): Likewise.
80 (elf_i386_non_lazy_ibt_plt): Likewise.
81 (elf_i386_allocate_dynrelocs): Likewise.
82 (elf_i386_size_dynamic_sections): Likewise.
83 (elf_i386_relocate_section): Likewise.
84 (elf_i386_finish_dynamic_symbol): Likewise.
85 (elf_i386_finish_dynamic_sections): Likewise.
86 (elf_i386_get_synthetic_symtab): Likewise.
87 (elf_i386_link_setup_gnu_properties): Likewise.
88 (elf_i386_nacl_plt): Likewise.
89 * elf64-x86-64.c (ABI_64_P): Removed.
90 (ELF64_DYNAMIC_INTERPRETER): Likewise.
91 (ELF32_DYNAMIC_INTERPRETER): Likewise.
92 (elf_x86_64_lazy_plt_layout): Likewise.
93 (elf_x86_64_non_lazy_plt_layout): Likewise.
94 (elf_x86_64_plt_layout): Likewise.
95 (elf_x86_64_link_hash_table): Likewise.
96 (elf_x86_64_plt): Likewise.
97 (elf_x86_64_lazy_plt): Likewise.
98 (elf_x86_64_non_lazy_plt): Likewise.
99 (elf_x86_64_link_hash_table_create): Likewise.
100 (bfd_elf64_bfd_link_hash_table_create): Likewise.
101 (bfd_elf32_bfd_link_hash_table_create): Likewise.
102 (elf_x86_64_lazy_plt): Updated.
103 (elf_x86_64_non_lazy_plt): Likewise.
104 (elf_x86_64_lazy_bnd_plt): Likewise.
105 (elf_x86_64_non_lazy_bnd_plt): Likewise.
106 (elf_x86_64_lazy_ibt_plt): Likewise.
107 (elf_x32_lazy_ibt_plt): Likewise.
108 (elf_x86_64_non_lazy_ibt_plt): Likewise.
109 (elf_x32_non_lazy_ibt_plt): Likewise.
110 (elf_x86_64_allocate_dynrelocs): Likewise.
111 (elf_x86_64_size_dynamic_sections): Likewise.
112 (elf_x86_64_relocate_section): Likewise.
113 (elf_x86_64_finish_dynamic_symbol): Likewise.
114 (elf_x86_64_finish_dynamic_sections): Likewise.
115 (elf_x86_64_get_synthetic_symtab): Likewise.
116 (elf_x86_64_link_setup_gnu_properties): Likewise.
117 (elf_x86_64_nacl_plt): Likewise.
118 * elfxx-x86.c: Include "objalloc.h", "elf/i386.h" and
120 (ELF32_DYNAMIC_INTERPRETER): New.
121 (ELF64_DYNAMIC_INTERPRETER): Likewise.
122 (ELFX32_DYNAMIC_INTERPRETER): Likewise.
123 (_bfd_x86_elf_link_hash_table_create): Likewise.
124 (_bfd_x86_elf_link_hash_table_free): Renamed to ...
125 (elf_x86_link_hash_table_free): This. Make it static.
126 * elfxx-x86.h: Don't include "objalloc.h".
128 (elf_x86_lazy_plt_layout): Likewise.
129 (elf_x86_non_lazy_plt_layout): Likewise.
130 (elf_x86_plt_layout): Likewise.
131 (_bfd_x86_elf_link_hash_table_create): Likewise.
132 (bfd_elf64_bfd_link_hash_table_create): Likewise.
133 (bfd_elf32_bfd_link_hash_table_create): Likewise.
134 (elf_x86_link_hash_table): Add plt, lazy_plt, non_lazy_plt,
135 srelplt2 and next_tls_desc_index.
136 (_bfd_x86_elf_link_hash_table_free): Removed.
138 2017-08-30 Maciej W. Rozycki <macro@imgtec.com>
140 * elfxx-mips.c (mips_elf_perform_relocation): Correct microMIPS
141 branch offset interpretation.
143 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
146 * opncls.c (bfd_close_all_done): Call _close_and_cleanup.
148 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
150 * elf64-x86-64.c (elf_x86_64_next_tls_desc_index): Removed.
151 (elf_x86_64_srelplt2): Likewise.
153 2017-08-30 Alan Modra <amodra@gmail.com>
155 * elf64-ppc.c (struct ppc_link_hash_table): Add do_tls_opt.
156 (ppc64_elf_tls_optimize): Set it.
157 (ppc64_elf_relocate_section): Nop addis on TPREL16_HA, and convert
158 insn on TPREL16_LO and TPREL16_LO_DS relocs to use r13 when
159 addis would add zero.
160 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add do_tls_opt.
161 (ppc_elf_tls_optimize): Set it.
162 (ppc_elf_relocate_section): Nop addis on TPREL16_HA, and convert
163 insn on TPREL16_LO relocs to use r2 when addis would add zero.
165 2017-08-30 Alan Modra <amodra@gmail.com>
167 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing
168 __tls_get_addr call sequences to LE, don't move the addi down
169 to the nop. Replace the bl with addi and leave the nop alone.
171 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
173 * elf32-i386.c (elf_i386_pie_finish_undefweak_symbol):
175 * elf64-x86-64.c (elf_x86_64_finish_local_dynamic_symbol):
177 (elf_x86_64_pie_finish_undefweak_symbol): Likewise.
179 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
181 * Makefile.am (BFD32_BACKENDS): Add elfxx-x86.lo.
182 (BFD64_BACKENDS): Likewise.
183 (BFD32_BACKENDS_CFILES): Add elfxx-x86.c.
184 (BFD64_BACKENDS_CFILES): Likewise.
185 * Makefile.in: Regenerated.
186 * configure.ac (bfd_backends): Add elfxx-x86.lo together with
187 elf32-i386.lo and elf64-x86-64.lo.
188 * configure: Regenerated.
189 * elf32-i386.c: Include "elfxx-x86.h" instead of "sysdep.h",
190 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
191 "objalloc.h" and "hashtab.h".
192 (ELIMINATE_COPY_RELOCS): Removed.
193 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
194 (SYMBOL_NO_COPYRELOC): Likewise.
195 (elf_i386_link_hash_entry): Likewise.
196 (GOT_UNKNOWN): Likewise.
197 (GOT_NORMAL): Likewise.
198 (GOT_TLS_GD): Likewise.
199 (elf_i386_hash_entry): Likewise.
200 (elf_i386_obj_tdata): Likewise.
201 (elf_i386_tdata): Likewise.
202 (elf_i386_local_got_tls_type): Likewise.
203 (elf_i386_local_tlsdesc_gotent): Likewise.
204 (elf_i386_hash_table): Likewise.
205 (elf_i386_link_hash_newfunc): Likewise.
206 (elf_i386_local_htab_hash): Likewise.
207 (elf_i386_local_htab_eq): Likewise.
208 (elf_i386_get_local_sym_hash): Likewise.
209 (elf_i386_link_hash_table_free): Likewise.
210 (elf_i386_copy_indirect_symbol): Likewise.
211 (elf_i386_fixup_symbol): Likewise.
212 (elf_i386_readonly_dynrelocs): Likewise.
213 (elf_i386_always_size_sections): Likewise.
214 (elf_i386_set_tls_module_base): Likewise.
215 (elf_i386_dtpoff_base): Likewise.
216 (compare_relocs): Likewise.
217 (elf_i386_hash_symbol): Likewise.
218 (elf_i386_parse_gnu_properties): Likewise.
219 (elf_i386_merge_gnu_properties): Likewise.
220 (elf_i386_link_check_relocs): Likewise.
221 (elf_i386_merge_symbol_attribute): Likewise.
222 (bfd_elf32_bfd_link_check_relocs): Likewise.
223 (elf_backend_copy_indirect_symbol): Likewise.
224 (elf_backend_always_size_sections): Likewise.
225 (elf_backend_omit_section_dynsym): Likewise.
226 (elf_backend_hash_symbol): Likewise.
227 (elf_backend_fixup_symbol): Likewise.
228 (elf_backend_parse_gnu_properties): Likewise.
229 (elf_backend_merge_gnu_properties): Likewise.
230 (elf_backend_merge_symbol_attribute): Likewise.
231 (elf_i386_mkobject): Updated.
232 (elf_i386_link_hash_table_create): Likewise.
233 (elf_i386_check_tls_transition): Likewise.
234 (elf_i386_tls_transition): Likewise.
235 (elf_i386_convert_load_reloc): Likewise.
236 (elf_i386_check_relocs): Likewise.
237 (elf_i386_adjust_dynamic_symbol): Likewise.
238 (elf_i386_allocate_dynrelocs): Likewise.
239 (elf_i386_convert_load): Likewise.
240 (elf_i386_size_dynamic_sections): Likewise.
241 (elf_i386_relocate_section): Likewise.
242 (elf_i386_finish_dynamic_symbol ): Likewise.
243 (elf_i386_finish_dynamic_sections): Likewise.
244 (elf_i386_output_arch_local_syms): Likewise.
245 (elf_i386_get_synthetic_symtab): Likewise.
246 (elf_i386_link_setup_gnu_properties): Likewise.
247 (elf_i386_link_hash_table): Use elf_x86_link_hash_table, instead
248 of elf_link_hash_table, as base.
249 (elf_i386_next_tls_desc_index): New.
250 (elf_i386_srelplt2): Likewise.
251 (elf_i386_plt): Likewise.
252 (elf_i386_lazy_plt): Likewise.
253 (elf_i386_non_lazy_plt): Likewise.
254 * elf32-x86-64.c: Include "elfxx-x86.h" instead of "sysdep.h",
255 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
256 "objalloc.h" and "hashtab.h".
257 (ELIMINATE_COPY_RELOCS): Removed.
258 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
259 (SYMBOL_NO_COPYRELOC): Likewise.
260 (elf_x86_64_link_hash_entry): Likewise.
261 (GOT_UNKNOWN): Likewise.
262 (GOT_NORMAL): Likewise.
263 (GOT_TLS_GD): Likewise.
264 (elf_x86_64_hash_entry): Likewise.
265 (elf_x86_64_obj_tdata): Likewise.
266 (elf_x86_64_tdata): Likewise.
267 (elf_x86_64_local_got_tls_type): Likewise.
268 (elf_x86_64_local_tlsdesc_gotent): Likewise.
269 (elf_x86_64_hash_table): Likewise.
270 (elf_x86_64_link_hash_newfunc): Likewise.
271 (elf_x86_64_local_htab_hash): Likewise.
272 (elf_x86_64_local_htab_eq): Likewise.
273 (elf_x86_64_get_local_sym_hash): Likewise.
274 (elf_x86_64_link_hash_table_free): Likewise.
275 (elf_x86_64_copy_indirect_symbol): Likewise.
276 (elf_x86_64_fixup_symbol): Likewise.
277 (elf_x86_64_readonly_dynrelocs): Likewise.
278 (elf_x86_64_always_size_sections): Likewise.
279 (elf_x86_64_set_tls_module_base): Likewise.
280 (elf_x86_64_dtpoff_base): Likewise.
281 (compare_relocs): Likewise.
282 (elf_x86_64_merge_symbol_attribute): Likewise.
283 (elf_x86_64_hash_symbol): Likewise.
284 (elf_x86_64_parse_gnu_properties): Likewise.
285 (elf_x86_64_merge_gnu_properties): Likewise.
286 (elf_x86_64_link_check_relocs): Likewise.
287 (elf_backend_copy_indirect_symbol): Likewise.
288 (elf_backend_always_size_sections): Likewise.
289 (bfd_elf64_bfd_link_check_relocs): Likewise.
290 (elf_backend_merge_symbol_attribute): Likewise.
291 (elf_backend_hash_symbol): Likewise.
292 (elf_backend_omit_section_dynsym): Likewise.
293 (elf_backend_fixup_symbol): Likewise.
294 (elf_backend_parse_gnu_properties): Likewise.
295 (elf_backend_merge_gnu_properties): Likewise.
296 (bfd_elf32_bfd_link_check_relocs): Likewise.
297 (elf_x86_64_mkobject): Updated.
298 (elf_x86_64_link_hash_table_create): Likewise.
299 (elf_x86_64_check_tls_transition): Likewise.
300 (elf_x86_64_tls_transition): Likewise.
301 (elf_x86_64_convert_load_reloc): Likewise.
302 (elf_x86_64_check_relocs): Likewise.
303 (elf_x86_64_adjust_dynamic_symbol): Likewise.
304 (elf_x86_64_allocate_dynrelocs): Likewise.
305 (elf_x86_64_convert_load): Likewise.
306 (elf_x86_64_size_dynamic_sections): Likewise.
307 (elf_x86_64_relocate_section): Likewise.
308 (elf_x86_64_finish_dynamic_symbol ): Likewise.
309 (elf_x86_64_finish_dynamic_sections): Likewise.
310 (elf_x86_64_output_arch_local_syms): Likewise.
311 (elf_x86_64_get_synthetic_symtab): Likewise.
312 (elf_x86_64_link_setup_gnu_properties): Likewise.
313 (elf_x86_64_link_hash_table): Use elf_x86_link_hash_table,
314 instead of elf_link_hash_table, as base.
315 (elf_x86_64_next_tls_desc_index): New.
316 (elf_x86_64_srelplt2): Likewise.
317 (elf_x86_64_plt): Likewise.
318 (elf_x86_64_lazy_plt): Likewise.
319 (elf_x86_64_non_lazy_plt): Likewise.
320 * elfxx-x86.c: New file.
321 * elfxx-x86.h: Likewise.
323 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
325 * elf32-i386.c (elf_i386_get_synthetic_symtab): Simplify bad
327 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
329 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
331 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check valid PLT
332 sections before checking dynamic relocations and free invalid
333 PLT section contents.
334 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
336 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
338 * elf-bfd.h (_bfd_elf_ifunc_get_synthetic_symtab): Removed.
339 * elf-ifunc.c (_bfd_elf_ifunc_get_synthetic_symtab): Likewise.
341 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
344 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check for valid
346 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
348 2017-08-27 H.J. Lu <hongjiu.lu@intel.com>
350 * elf32-i386.c (elf_i386_link_hash_newfunc): Initialize
352 * elf64-x86-64.c (elf_x86_64_link_hash_newfunc): Likewise.
354 2017-08-26 H.J. Lu <hongjiu.lu@intel.com>
357 * elf-bfd.h (elf_obj_tdata): Use ENUM_BITFIELD on object_id,
358 dyn_lib_class and has_gnu_symbols. Change bad_symtab to bitfield.
359 Add a has_no_copy_on_protected bitfield.
360 (elf_has_no_copy_on_protected): New.
361 * elf-properties.c (_bfd_elf_parse_gnu_properties): Set
362 elf_has_no_copy_on_protected for GNU_PROPERTY_NO_COPY_ON_PROTECTED.
363 (elf_merge_gnu_property_list): Likewise.
364 (_bfd_elf_link_setup_gnu_properties): Set extern_protected_data
365 to FALSE for elf_has_no_copy_on_protected.
366 * elf32-i386.c (SYMBOL_NO_COPYRELOC): New.
367 (elf_i386_link_hash_entry): Add def_protected.
368 (elf_i386_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
369 when checking info->nocopyreloc.
370 (elf_i386_link_setup_gnu_properties): Don't set
371 extern_protected_data here.
372 (elf_i386_merge_symbol_attribute): New function.
373 (elf_backend_merge_symbol_attribute): New.
374 * elf64-x86-64.c (SYMBOL_NO_COPYRELOC): New.
375 (elf_x86_64_link_hash_entry): Add def_protected.
376 (elf_x86_64_need_pic): Report protected symbol for def_protected.
377 (elf_x86_64_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
378 when checking info->nocopyreloc.
379 (elf_x86_64_relocate_section): Also check for R_X86_64_PC32
380 relocation run-time overflow and unresolvable R_X86_64_32S
381 relocation against protected data symbol defined in shared object
382 with GNU_PROPERTY_NO_COPY_ON_PROTECTED.
383 (elf_x86_64_link_setup_gnu_properties): Don't set
384 extern_protected_data here.
385 (elf_x86_64_merge_symbol_attribute): New function.
386 (elf_backend_merge_symbol_attribute): New.
388 2017-08-26 Alan Modra <amodra@gmail.com>
390 * elf32-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
391 (ppc_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
392 (ppc_elf_relocate_section): Comment fix.
393 * elf64-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
394 (ppc64_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
395 Support dynamic relocs for TPREL16 when non-pic too.
396 (dec_dynrel_count): Adjust TPREL16 handling as per check_relocs.
397 (ppc64_elf_relocate_section): Support dynamic relocs for TPREL16
400 2017-08-25 H.J. Lu <hongjiu.lu@intel.com>
402 * elf32-i386.c (elf_i386_link_hash_entry): Remove redundant
403 "symbol" in comments.
404 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Likewise.
406 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
409 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for
410 R_X86_64_PC32 relocation run-time overflow and unresolvable
411 R_X86_64_32S relocation with -z nocopyreloc.
413 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
415 * elf32-i386.c (elf_i386_check_relocs): Revert the last change.
416 Undefined symbols may not have a type.
417 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
419 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
421 * elf64-x86-64.c (elf_x86_64_need_pic): Add an argument for
422 bfd_link_info. Report shared, PIE or PDE object based on
424 (elf_x86_64_check_relocs): Update elf_x86_64_need_pic call.
425 (elf_x86_64_relocate_section): Likewise.
427 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
429 * elf32-i386.c (elf_i386_check_relocs): Increment PLT count only
430 for function symbols.
431 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
433 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
435 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set
436 extern_protected_data to FALSE if GNU_PROPERTY_NO_COPY_ON_PROTECTED
437 is set on any input relocatable file.
438 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
440 2017-08-23 Alan Modra <amodra@gmail.com>
443 * elf64-ppc.c (ensure_undef_dynamic): Rename from
444 ensure_undefweak_dynamic. Handle undefined too.
445 * elf32-ppc.c (ensure_undef_dynamic): Likewise.
446 * elf32-hppa.c (ensure_undef_dynamic): Likewise.
447 (allocate_dynrelocs): Discard undefined non-default visibility
448 relocs first. Make undefined syms dynamic. Tidy goto.
450 2017-08-21 Alan Modra <amodra@gmail.com>
451 H.J. Lu <hongjiu.lu@intel.com>
454 * elf-bfd.h (SYMBOLIC_BIND): Return TRUE for __start/__stop symbols.
455 * elflink.c (bfd_elf_define_start_stop): Rewrite.
457 2017-08-21 Hans-Peter Nilsson <hp@bitrange.com>
460 * elf64-mmix.c (mmix_elf_relax_section): Correct handling of
461 undefined weak symbols.
463 2017-08-18 Nick Clifton <nickc@redhat.com>
466 * tekhex.c (getsym): Fix check for source pointer walking off the
467 end of the input buffer.
469 2017-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
472 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Skip IFUNC
473 relocations in debug sections, change abort to _bfd_error_handler.
475 2017-08-14 Nick Clifton <nickc@redhat.com>
478 * elf.c (setup_group): Check for an empty or very small group
480 * po/bfd.pot: Regenerate.
482 2017-08-14 Alan Modra <amodra@gmail.com>
485 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't add
486 alignment padding here.
487 * elflink.c (bfd_elf_discard_info): Add .eh_frame padding here
488 in a reverse pass over sections.
490 2017-08-11 H.J. Lu <hongjiu.lu@intel.com>
493 * elf32-i386.c (elf_i386_get_synthetic_symtab): Allocate space
494 for @plt suffixes first.
495 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
497 2017-08-08 Nick Clifton <nickc@redhat.com>
500 * elf-attrs.c (_bfd_elf_parse_attributes): Complain about very
501 small section lengths.
502 * elf.c (_bfd_elf_setup_sections): Skip empty entries in the group
504 (elfcore_grok_freebsd_prstatus): Add checks to make sure that
505 there is enough data present in the note.
507 2017-08-08 Alan Modra <amodra@gmail.com>
510 * elf32-microblaze.c (microblaze_elf_check_relocs): Don't bump
511 got.refcount for GOTOFF relocs, just create .got section.
513 2017-08-07 H.J. Lu <hongjiu.lu@intel.com>
515 * elflink.c (elf_link_add_object_symbols): Move common symbol
516 check after bed->common_definition.
518 2017-08-07 Alan Modra <amodra@gmail.com>
521 * elflink.c (bfd_elf_final_link): Don't segfault when sections
522 needed to define various dynamic tags have been discarded.
524 2017-08-07 Nick Clifton <nickc@redhat.com>
527 * elf32-i386.c (elf_i386_link_setup_gnu_properties): If the dynobj
528 has not been set then use the bfd returned by
529 _bfd_elf_link_setup_gnu_properties. If that is null then search
530 through all the input bfds selecting the first normal, ELF format
532 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
534 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
536 * elf32-i386.c (elf_i386_link_hash_entry): Change tls_get_addr
538 (elf_i386_link_hash_newfunc): Initialize tls_get_addr to 0.
539 (elf_i386_check_tls_transition): Check tls_get_addr directly.
540 (elf_i386_convert_load_reloc): Update tls_get_addr check.
541 (elf_i386_link_check_relocs): New function.
542 (bfd_elf32_bfd_link_check_relocs): New.
543 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Change tls_get_addr
545 (elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 0.
546 (elf_x86_64_check_tls_transition): Check tls_get_addr directly.
547 (elf_x86_64_convert_load_reloc): Update tls_get_addr check.
548 (elf_x86_64_link_check_relocs): New function.
549 (bfd_elf64_bfd_link_check_relocs): New.
550 (bfd_elf32_bfd_link_check_relocs): Likewise.
552 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
555 * elflink.c (elf_link_add_object_symbols): Treat common symbol
556 as undefined for --no-define-common.
558 2017-08-05 Alan Modra <amodra@gmail.com>
560 * elf32-hppa.c (elf32_hppa_set_gp): Don't require an
561 hppa_link_hash_table.
563 2017-08-02 Max Filippov <jcmvbkbc@gmail.com>
565 * xtensa-isa.c (xtensa_isa_init): Don't update lookup table
566 entries for sysregs with negative indices.
568 2017-08-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
570 * elf32-s390.c (elf_s390_finish_dynamic_sections): Skip if it
571 isn't the S/390 specific elf data.
572 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
574 2017-07-31 Kuan-Lin Chen <rufus@andestech.com>
576 * elfxx-riscv.c (riscv_elf_add_sub_reloc): New function.
577 * (howto_table) [R_RISCV_ADD8]: Use riscv_elf_add_sub_reloc.
578 [R_RISCV_ADD16]: Likewise.
579 [R_RISCV_ADD32]: Likewise.
580 [R_RISCV_ADD64]: Likewise.
581 [R_RISCV_SUB6]: Likewise.
582 [R_RISCV_SUB8]: Likewise.
583 [R_RISCV_SUB16]: Likewise.
584 [R_RISCV_SUB32]: Likewise.
585 [R_RISCV_SUB64]: Likewise.
587 2017-07-31 Alan Modra <amodra@gmail.com>
589 * elf64-ppc.c (ppc64_elf_tls_setup): Warn on --plt-localentry
590 without ld.so checks.
592 2017-07-29 Alan Modra <amodra@gmail.com>
595 * elf64-ppc.c (struct ppc_link_hash_entry): Add non_zero_localentry.
596 (ppc64_elf_merge_symbol): Set non_zero_localentry.
597 (is_elfv2_localentry0): Test non_zero_localentry.
598 (ppc64_elf_tls_setup): Default to --no-plt-localentry.
600 2017-07-28 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
602 * elf32-s390.c (elf_s390_finish_dynamic_sections): Add NULL
603 pointer check for htab->elf.irelplt.
604 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
606 2017-07-27 Nick Clifton <nickc@redhat.com>
609 * mach-o.c (bfd_mach_o_read_symtab_strtab): Fail if the symtab
611 * nlmcode.h (nlm_swap_auxiliary_headers_in): Replace assertion
613 * section.c (bfd_make_section_with_flags): Fail if the name or bfd
615 * vms-alpha.c (bfd_make_section_with_flags): Correct computation
617 (evax_bfd_print_emh): Check for invalid string lengths.
619 2017-07-25 Nick Clifton <nickc@redhat.com>
621 * po/fr.po: Updated French translation.
623 2017-07-25 Benjamin Green <bengreen5mx@gmail.com>
626 * elf32-msp430.c (msp430_elf_relax_section): Allow conversion of
627 16-bit absolute branches into 10-bit pc-relative branches on the
628 MSP430 as well as the MSP430X.
630 2017-07-25 Alan Modra <amodra@gmail.com>
632 * elf64-ppc.c (struct map_stub): Add tls_get_addr_opt_bctrl.
633 (stub_eh_frame_size): New function.
634 (ppc_size_one_stub): Set group tls_get_addr_opt_bctrl.
635 (group_sections): Init group tls_get_addr_opt_bctrl.
636 (ppc64_elf_size_stubs): Update sizing and initialization of
637 .eh_frame. Iteration over stubs via group list.
638 (ppc64_elf_build_stubs): Iterate over stubs via group list.
639 (ppc64_elf_finish_dynamic_sections): Update finalization of
642 2017-07-24 Nick Clifton <nickc@redhat.com>
645 * mach-o.c (bfd_mach_o_canonicalize_relocs): Pass the base address
646 of the relocs to the canonicalize_one_reloc routine.
647 * mach-o.h (struct bfd_mach_o_backend_data): Update the prototype
648 for the _bfd_mach_o_canonicalize_one_reloc field.
649 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add
650 res_base parameter. Use to check for corrupt pair relocs.
651 * mach-o-aarch64.c (bfd_mach_o_arm64_canonicalize_one_reloc):
653 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc):
655 * mach-o-x86-64.c (bfd_mach_o_x86_64_canonicalize_one_reloc):
658 * vms-alpha.c (_bfd_vms_slurp_eihd): Make sure that there is
659 enough data in the record before attempting to parse it.
660 (_bfd_vms_slurp_eeom): Likewise.
662 (_bfd_vms_slurp_egsd): Check for an invalid section index.
663 (image_set_ptr): Likewise.
664 (alpha_vms_slurp_relocs): Likewise.
666 (alpha_vms_object_p): Check for a truncated record.
668 2017-07-24 Nick Clifton <nickc@redhat.com>
671 * reloc.c (_bfd_unrecognized_reloc): New function. Reports
672 an unrecognized reloc and sets the bfd_error value.
673 * libbfd.h: Regenerate.
674 * elf32-arm.c (elf32_arm_final_link_relocate): Use the new
676 * elf32-i386.c (elf_i386_relocate_section): Likewise.
677 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
678 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
679 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.
680 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
682 2017-07-23 Alan Modra <amodra@gmail.com>
684 * elf64-ppc.c (ppc64_elf_size_stubs): Correct advance to
687 2017-07-19 Szabolcs Nagy <szabolcs.nagy@arm.com>
690 * elfnn-aarch64.c (elfNN_aarch64_reloc_type_class): Return
691 reloc_class_ifunc for ifunc symbols.
693 2017-07-19 Nick Clifton <nickc@redhat.com>
696 * archive.c (bfd_generic_archive_p): If the bfd does not have the
697 correct magic bytes at the start, set the error to wrong format
698 and clear the format selector before returning NULL.
700 2017-07-19 Nick Clifton <nickc@redhat.com>
703 * coff-rs6000.c (_bfd_strntol): New function.
704 (_bfd_strntoll): New function.
705 (GET_VALUE_IN_FIELD): New macro.
706 (EQ_VALUE_IN_FIELD): new macro.
707 (_bfd_xcoff_slurp_armap): Use new macros.
708 (_bfd_xcoff_archive_p): Likewise.
709 (_bfd_xcoff_read_ar_hdr): Likewise.
710 (_bfd_xcoff_openr_next_archived_file): Likewise.
711 (_bfd_xcoff_stat_arch_elt): Likewise.
712 * coff64-rs6000.c (_bfd_strntol): New function.
713 (_bfd_strntoll): New function.
714 (GET_VALUE_IN_FIELD): New macro.
715 (xcoff64_slurp_armap): Use new macros.
717 2017-07-19 Claudiu Zissulescu <claziss@synopsys.com>
718 John Eric Martin <John.Martin@emmicro-us.com>
720 * bfd-in2.h: Regenerate.
721 * libbfd.h: Regenerate.
722 * elf32-arc.c (JLI): Define.
723 * reloc.c: Add JLI relocations.
725 2017-07-18 Nick Clifton <nickc@redhat.com>
728 * coff-sh.c: Fix spelling typos.
729 * compress.c: Likewise.
730 * cpu-pdp11.c: Likewise.
731 * ecofflink.c: Likewise.
732 * elf-m10300.c: Likewise.
734 * elf32-arm.c: Likewise.
735 * elf32-m68k.c: Likewise.
736 * elf32-nds32.c: Likewise.
737 * elf32-ppc.c: Likewise.
738 * elf32-sh.c: Likewise.
739 * elf32-v850.c: Likewise.
740 * elf64-ppc.c: Likewise.
741 * elf64-x86-64.c: Likewise.
742 * elflink.c: Likewise.
743 * elfnn-aarch64.c: Likewise.
744 * elfxx-mips.c: Likewise.
747 * vms-alpha.c: Likewise.
748 * xcofflink.c: Likewise.
750 2017-07-18 Nick Clifton <nickc@redhat.com>
753 * coffcode.h (handle_COMDAT): Replace abort with an error message
756 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
759 * elf64-x86-64.c (elf_x86_64_relocate_section): Limit PIC check
762 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
764 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
766 2017-07-16 Alan Modra <amodra@gmail.com>
768 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimize
769 __tls_index GOT entries when using __tls_get_addr_opt stub.
770 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
772 2017-07-12 Alan Modra <amodra@gmail.com>
774 * po/es.po: Update from translationproject.org/latest/bfd/.
775 * po/fi.po: Likewise.
776 * po/fr.po: Likewise.
777 * po/id.po: Likewise.
778 * po/ja.po: Likewise.
779 * po/ro.po: Likewise.
780 * po/ru.po: Likewise.
781 * po/sr.po: Likewise.
782 * po/sv.po: Likewise.
783 * po/tr.po: Likewise.
784 * po/uk.po: Likewise.
785 * po/vi.po: Likewise.
786 * po/zh_CN.po: Likewise.
787 * po/hr.po: New file from translationproject.org.
788 * configure.ac (ALL_LINGUAS): Add hr. Sort.
789 * configure: Regenerate.
791 2017-07-12 Nick Clifton <nickc@redhat.com>
793 Fix compile time warnings using gcc 7.1.1.
794 * elf32-xtensa.c (elf_xtensa_get_plt_section): Increase length of
796 (elf_xtensa_get_gotplt_section): Increase length of got_name
798 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add a
799 default return of FALSE.
800 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc): Add a
801 default return of FALSE.
803 2017-07-12 Alan Modra <amodra@gmail.com>
805 * binary.c (binary_set_section_contents): Don't print filepos in
807 (coff_write_object_contents): Cast size_t for error message.
808 (coff_slurp_line_table): Don't use bfd_vma symndx.
809 (coff_slurp_reloc_table): Remove unneeded cast.
810 * dwarf2.c (read_section): Cast bfd_int64_t to long long for
812 (find_abstract_instance_name): Likewise.
813 * elf32-arm.c (arm_type_of_stub): Correct error arg order.
814 (bfd_elf32_arm_stm32l4xx_erratum_scan): Don't cast error arg.
815 (elf32_arm_check_relocs): Make r_symndx an int.
816 * elf32-cris.c (cris_elf_check_relocs): Delete extraneous %s in
818 * elf32-metag.c (elf_metag_relocate_section): Delete extra error
820 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Rewrite bogus
822 * elf32-i386.c (elf_i386_check_relocs): Make r_symndx an int.
823 * elf32-s390.c (elf_s390_check_relocs): Likewise.
824 * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
825 * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
826 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
827 * elf64-s390.c (elf_s390_check_relocs): Likewise.
828 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
829 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
830 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
831 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
832 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
833 * elf64-mmix.c (_bfd_mmix_after_linker_allocation): Cast size_t args
834 and use %lu for error message.
835 * elflink.c (elf_link_adjust_relocs): Delete extra error message arg.
836 * mmo.c (mmo_scan): Make stab_loc a file_ptr. Cast expression for
839 * elf32-arm.c (elf32_arm_tls_relax): Correct format string and args
841 (elf32_arm_final_link_relocate): Likewise.
842 * coff-arm.c (bfd_arm_process_before_allocation): Likewise.
843 * coffcode.h (styp_to_sec_flags): Likewise.
844 * cofflink.c (_bfd_coff_write_global_sym): Likewise.
845 * ecoff.c (_bfd_ecoff_slurp_symbol_table): Likewise.
846 * elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise.
847 * elf32-bfin.c (bfinfdpic_check_relocs): Likewise.
848 (elf32_bfin_merge_private_bfd_data): Likewise.
849 * elf32-cris.c (cris_elf_relocate_section): Likewise.
850 * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
851 * elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise.
852 (i370_elf_relocate_section): Likewise.
853 * elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise.
854 * elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise.
855 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
856 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
857 * elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise.
858 * elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise.
859 * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
860 * elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise.
861 (_bfd_mips_elf_merge_private_bfd_data): Likewise.
862 * ieee.c (ieee_write_id, read_id): Likewise.
863 * mach-o.c (bfd_mach_o_write_contents): Likewise.
864 (bfd_mach_o_layout_commands, bfd_mach_o_read_section_32): Likewise.
865 (bfd_mach_o_read_section_64, bfd_mach_o_read_symtab_symbol): Likewise.
866 (bfd_mach_o_read_command, bfd_mach_o_header_p): Likewise.
867 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Likewise.
868 * stabs.c (_bfd_link_section_stabs): Likewise.
870 * coff-arm.c (coff_arm_relocate_section): Use L modifier in error
872 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
873 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
874 * coff-rs6000.c (xcoff_reloc_type_toc): Likewise.
875 * coff-sh.c (sh_relax_section): Likewise.
876 (sh_relax_delete_bytes, sh_swap_insns): Likewise.
877 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
878 * coffcode.h (coff_slurp_reloc_table): Likewise.
879 * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
880 (_bfd_coff_read_string_table): Likewise.
881 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
882 * compress.c (bfd_get_full_section_contents): Likewise.
883 * dwarf2.c (read_formatted_entries, decode_line_info): Likewise.
884 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
885 * elf.c (bfd_elf_string_from_elf_section): Likewise.
886 * elf32-arc.c (arc_special_overflow_checks): Likewise.
887 * elf32-arm.c (elf32_arm_tls_relax): Likewise.
888 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Likewise.
889 (elf32_arm_write_section): Likewise.
890 * elf32-bfin.c (bfin_relocate_section): Likewise.
891 (bfinfdpic_relocate_section): Likewise.
892 * elf32-hppa.c (hppa_build_one_stub): Likewise.
893 (final_link_relocate, elf32_hppa_relocate_section): Likewise.
894 * elf32-i386.c (elf_i386_tls_transition): Likewise.
895 (elf_i386_relocate_section): Likewise.
896 * elf32-ip2k.c (ip2k_final_link_relocate): Likewise.
897 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
898 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
899 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
900 * elf32-metag.c (elf_metag_relocate_section): Likewise.
901 * elf32-nds32.c (unrecognized_reloc_msg): Likewise.
902 (nds32_elf_relax_longcall1, nds32_elf_relax_longcall2): Likewise.
903 (nds32_elf_relax_longcall3, nds32_elf_relax_longjump1): Likewise.
904 (nds32_elf_relax_longjump2, nds32_elf_relax_longjump3): Likewise.
905 (nds32_elf_relax_longcall4, nds32_elf_relax_longcall5): Likewise.
906 (nds32_elf_relax_longcall6, nds32_elf_relax_longjump4): Likewise.
907 (nds32_elf_relax_longjump5, nds32_elf_relax_longjump6): Likewise.
908 (nds32_elf_relax_longjump7, nds32_elf_relax_loadstore): Likewise.
909 (nds32_elf_relax_ptr, nds32_elf_ex9_build_hash_table): Likewise.
910 * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
911 * elf32-rx.c (UNSAFE_FOR_PID): Likewise.
912 * elf32-s390.c (invalid_tls_insn, elf_s390_relocate_section): Likewise.
913 * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
914 * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
915 * elf32-sh.c (sh_elf_relax_section): Likewise.
916 (sh_elf_relax_delete_bytes, sh_elf_swap_insns): Likewise.
917 (sh_elf_relocate_section): Likewise.
918 * elf32-sh64.c (shmedia_prepare_reloc): Likewise.
919 * elf32-spu.c (spu_elf_relocate_section): Likewise.
920 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
921 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
922 * elf32-v850.c (v850_elf_relax_section): Likewise.
923 * elf32-vax.c (elf_vax_check_relocs): Likewise.
924 (elf_vax_relocate_section): Likewise.
925 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
926 (extend_ebb_bounds_forward, extend_ebb_bounds_backward): Likewise.
927 (compute_text_actions, compute_ebb_proposed_actions): Likewise.
928 (do_fix_for_relocatable_link): Likewise.
929 * elf64-alpha.c (elf64_alpha_relax_got_load): Likewise.
930 (elf64_alpha_relax_with_lituse): Likewise.
931 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Likewise.
932 (elf_hppa_final_link_relocate): Likewise.
933 * elf64-ia64-vms.c (elf64_ia64_relax_section): Likewise.
934 (elf64_ia64_choose_gp, elf64_ia64_relocate_section): Likewise.
935 (elf64_vms_link_add_object_symbols): Likewise.
936 * elf64-mmix.c (mmix_elf_perform_relocation): Likewise.
937 (mmix_final_link_relocate): Likewise.
938 * elf64-s390.c (invalid_tls_insn): Likewise.
939 (elf_s390_relocate_section): Likewise.
940 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
941 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
942 (elf_x86_64_relocate_section): Likewise.
943 * elfcode.h (elf_slurp_symbol_table): Likewise.
944 * elfcore.h (elf_core_file_p): Likewise.
945 * elflink.c (elf_link_read_relocs_from_section): Likewise.
946 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
947 (elfNN_aarch64_relocate_section): Likewise.
948 * elfnn-ia64.c (elfNN_ia64_relax_section): Likewise.
949 (elfNN_ia64_choose_gp, elfNN_ia64_relocate_section): Likewise.
950 * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
951 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
952 (_bfd_mips_elf_relocate_section): Likewise.
953 (_bfd_mips_elf_finish_dynamic_symbol, mips_finish_exec_plt): Likewise.
954 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
955 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
956 * ieee.c (ieee_slurp_external_symbols): Likewise.
957 * ihex.c (ihex_write_object_content): Likewise.
958 * mach-o.c (bfd_mach_o_build_exec_seg_command): Likewise.
959 * merge.c (_bfd_merged_section_offset): Likewise.
960 * mmo.c (mmo_write_loc_chunk): Likewise.
961 (mmo_write_object_contents): Likewise.
962 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Likewise.
963 * stabs.c (_bfd_link_section_stabs): Likewise.
964 * xcofflink.c (xcoff_link_add_symbols, xcoff_find_tc0): Likewise.
966 2017-07-11 Alan Modra <amodra@gmail.com>
968 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo.
970 2017-07-11 Alan Modra <amodra@gmail.com>
972 * elf32-ppc.c (ppc_elf_relocate_section): Emit "unexpected
973 instruction" error using _bfd_error_handler, not einfo.
975 2017-07-10 Nick Clifton <nickc@redhat.com>
977 * coffcode.h (coff_slurp_symbol_table): Do not include an entry
978 for C_AIX_WEAKEXT if it has the same value as C_WEAKEXT.
980 2017-07-07 John Baldwin <jhb@FreeBSD.org>
982 * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PTLWPINFO.
984 2017-07-07 Alan Modra <amodra@gmail.com>
986 * coffcode.h (coff_slurp_symbol_table): Handle C_AIX_WEAKEXT.
988 2017-07-07 Alan Modra <amodra@gmail.com>
990 * bfd.c (_doprnt): Replace "L" with "ll" when printing bfd_vma
991 as long long. Move code replacing "ll" with "I64", and simplify.
993 2017-07-06 H.J. Lu <hongjiu.lu@intel.com>
995 * bfd.c (_doprnt): Convert 'L' to 'l' when setting wide_width
998 2017-07-05 H.J. Lu <hongjiu.lu@intel.com>
1000 * dwarf2.c (line_info_add_include_dir_stub): Replace time with
1002 (line_info_add_file_name): Likewise.
1003 (decode_line_info): Likewise.
1005 2017-07-04 Tristan Gingold <gingold@adacore.com>
1007 * version.m4: Bump version to 2.29.51
1008 * configure: Regenerate.
1010 2017-07-04 Jiong Wang <jiong.wang@arm.com>
1012 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Remove the
1013 sanity check at the head of this function.
1015 2017-07-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1017 * dwarf2.c (struct dwarf2_debug): Add fields dwarf_line_str_buffer and
1018 dwarf_line_str_size.
1019 (struct attr_abbrev): Add field implicit_const.
1020 (dwarf_debug_sections): Add .debug_line_str.
1021 (enum dwarf_debug_section_enum): Add debug_line_str and debug_max.
1022 (dwarf_debug_section_assert): Add static assertion.
1023 (read_indirect_line_string): New.
1024 (read_abbrevs): Support DW_FORM_implicit_const.
1025 (is_str_attr): Support DW_FORM_line_strp.
1026 (read_attribute_value): Support DW_FORM_line_strp and
1027 DW_FORM_implicit_const.
1028 (read_attribute): Support DW_FORM_implicit_const.
1029 (line_info_add_include_dir, line_info_add_include_dir_stub):
1030 (line_info_add_file_name, read_formatted_entries): New.
1031 (decode_line_info, parse_comp_unit): Support DWARF 5.
1032 (_bfd_dwarf2_cleanup_debug_info): Free dwarf_line_str_buffer.
1034 2017-07-03 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
1036 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove the
1037 abort statement that was put for symbols that are not dynamic.
1039 2017-07-03 Tristan Gingold <gingold@adacore.com>
1041 * po/bfd.pot: Regenerate
1043 2017-07-03 Alan Modra <amodra@gmail.com>
1045 * bfd.c (_doprnt): Rewrite "ll" and "L" modifiers to "I64" for
1046 __MSVCRT__. Support "L" modifier for bfd_vma. Formatting.
1047 * elf.c (setup_group): Use "Lx" to print sh_size.
1048 (_bfd_elf_setup_sections): Remove unnecessary cast and print
1049 unknown section type in hex.
1050 (copy_special_section_fields): Style fix.
1051 (bfd_section_from_shdr): Correct format for sh_link. Use a
1052 common error message for all the variants of unrecognized
1054 (assign_file_positions_for_load_sections): Use "Lx" for lma
1055 adjust error message.
1056 (assign_file_positions_for_non_load_sections): Formatting.
1057 (rewrite_elf_program_header): Formatting. Use "Lx" for
1058 bfd_vma values in error messages.
1059 * elfcode.h (elf_slurp_reloc_table_from_section): Cast
1060 ELF_R_SYM value to type expected by format.
1061 * elflink.c (elf_link_read_relocs_from_section): Use "Lx"
1063 (elf_link_add_object_symbols): Use "Lu" for symbol sizes.
1064 (elf_link_input_bfd): Use "Lx" for r_info.
1065 (bfd_elf_gc_record_vtinherit): Use "Lx" for offset.
1067 2017-07-03 Alan Modra <amodra@gmail.com>
1069 * bfd.c (bfd_scan_vma): Don't use long long unless HAVE_LONG_LONG.
1070 * coff-rs6000.c (FMT20): Handle hosts with 64-bit long and
1071 Microsoft C library variant of long long format specifier.
1072 (PRINT20): Cast value to bfd_uint64_t not long long.
1073 * coffcode.h (coff_print_aux): Use BFD_VMA_FMT.
1074 * coff-x86_64.c (coff_amd64_reloc): Use bfd_uint64_t rather than
1075 long long. Don't cast to bfd_vma.
1076 * elf32-score.c (score3_bfd_getl48): Likewise.
1077 * vms-alpha.c (_bfd_vms_slurp_eisd): Likewise.
1079 2017-07-03 Alan Modra <amodra@gmail.com>
1081 * elf.c (_bfd_elf_print_private_bfd_data): Use BFD_VMA_FMT to
1083 (bfd_elf_print_symbol): Don't cast symbol->flags.
1084 (_bfd_elf_symbol_from_bfd_symbol): Likewise.
1085 * elf32-ppc.c (ppc_elf_begin_write_processing): Correct
1086 _bfd_error_handler argument order.
1087 (ppc_elf_merge_private_bfd_data): Don't cast flags.
1089 2017-07-03 Alan Modra <amodra@gmail.com>
1091 * configure.ac: Invoke AC_CHECK_TYPES for long long. Invoke
1092 AC_TYPE_LONG_DOUBLE.
1093 * configure: Regenerate.
1094 * config.in: Regenerate.
1096 2017-06-29 Andrew Waterman <andrew@sifive.com>
1098 * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Fix TLS copy
1101 2017-06-29 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
1103 * elfxx-sparc.c (allocate_dynrelocs): Don't make a symbol dynamic
1104 unless it is undefined weak.
1105 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Set the flag
1106 relative_reloc to direct non-dynamic symbols to R_SPARC_RELATIVE
1108 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): If symbol
1109 is not dynamic in PIC, abort.
1111 2017-06-29 Jiong Wang <jiong.wang@arm.com>
1114 * elfnn-aarch64.c (elfNN_aarch64_allocate_dynrelocs): Only make
1115 undefined weak symbols into dynamic.
1116 (elfNN_aarch64_final_link_relocate): Generate runtime RELATIVE
1117 relocation for non-dynamic symbols.
1118 (elfNN_aarch64_finish_dynamic_symbol): Add sanity check.
1120 2017-06-29 Jiong Wang <jiong.wang@arm.com>
1122 * elfnn-aarch64.c (aarch64_relocation_aginst_gp_p): New function.
1123 (elfNN_aarch64_final_link_relocate): Delete duplicated code for
1124 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15, BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
1125 BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
1126 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Optimize the
1129 2017-06-29 Andreas Arnez <arnez@linux.vnet.ibm.com>
1131 * elf-bfd.h (elfcore_write_s390_gs_cb): Add prototype.
1132 (elfcore_write_s390_gs_bc): Likewise.
1133 * elf.c (elfcore_grok_s390_gs_cb): New function.
1134 (elfcore_grok_s390_gs_bc): New function.
1135 (elfcore_grok_note): Call them.
1136 (elfcore_write_s390_gs_cb): New function.
1137 (elfcore_write_s390_gs_bc): New function.
1138 (elfcore_write_register_note): Call them.
1140 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
1142 * libbfd.c (_bfd_generic_get_section_contents): Don't call
1143 bfd_get_file_size. Check archive element size.
1144 (_bfd_generic_get_section_contents_in_window): Likewise.
1146 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
1148 * bfd-in2.h: Regenerated.
1149 * bfdio.c (bfd_get_size): Change return type to ufile_ptr.
1150 (bfd_get_file_size): Likewise.
1152 2017-06-28 Maciej W. Rozycki <macro@imgtec.com>
1153 Matthew Fortune <matthew.fortune@imgtec.com>
1155 * archures.c (bfd_mach_mips_interaptiv_mr2): New macro.
1156 * cpu-mips.c (I_interaptiv_mr2): New enum value.
1157 (arch_info_struct): Add "mips:interaptiv-mr2" entry.
1158 * elfxx-mips.c (_bfd_elf_mips_mach) <E_MIPS_MACH_IAMR2>: New
1160 (mips_set_isa_flags) <bfd_mach_mips_interaptiv_mr2>: Likewise.
1161 (bfd_mips_isa_ext) <bfd_mach_mips_interaptiv_mr2>: Likewise.
1162 (print_mips_isa_ext) <AFL_EXT_INTERAPTIV_MR2>: Likewise.
1163 (mips_mach_extensions): Add `bfd_mach_mipsisa32r3' and
1164 `bfd_mach_mips_interaptiv_mr2' entries.
1165 * bfd-in2.h: Regenerate.
1167 2017-06-27 Nick Clifton <nickc@redhat.com>
1169 * tekhex.c (pass_over): Revert accidental conversion of a local
1170 array to a static array.
1172 2017-06-27 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
1175 * elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Adjust
1176 reloc addend if necessary. Adjust diff only if
1177 shrinked_insn_address < end_address.
1179 2017-06-27 Alan Modra <amodra@gmail.com>
1182 * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
1183 (_bfd_generic_get_section_contents_in_window): Likewise.
1185 2017-06-26 Kuan-Lin Chen <rufus@andestech.com>
1187 * elfnn-riscv.c (perform_relocation): Support the new
1188 R_RISCV_32_PCREL relocation.
1189 (riscv_elf_relocate_section): Likewise.
1190 * elfxx-riscv.c (howto_table): Likewise.
1191 (riscv_reloc_map): Likewise.
1192 * bfd-in2.h (BFD_RELOC_RISCV_32_PCREL): New relocation.
1193 * libbfd.h: Regenerate.
1195 2017-06-27 Alan Modra <amodra@gmail.com>
1198 * libbfd.c (_bfd_generic_get_section_contents): Delete abort.
1199 Use unsigned file pointer type, and remove cast.
1200 * libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise.
1201 Add "count", not "sz".
1203 2017-06-26 Pedro Alves <palves@redhat.com>
1206 * libbfd.c (_bfd_generic_get_section_contents): Add "count", not
1209 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
1212 * libbfd.c (_bfd_generic_get_section_contents_in_window): Add
1215 2017-06-26 Maciej W. Rozycki <macro@imgtec.com>
1217 * cpu-mips.c (arch_info_struct): Mark the 4010 32-bit.
1218 * elfxx-mips.c (mips_set_isa_flags) <bfd_mach_mips4010>: Set
1219 E_MIPS_ARCH_2 rather than E_MIPS_ARCH_3 in `e_flags'.
1220 (mips_mach_extensions): Mark `bfd_mach_mips4010' as extending
1221 `bfd_mach_mips6000' rather than `bfd_mach_mips4000'.
1223 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
1226 * compress.c (bfd_get_full_section_contents): Don't check the
1228 * libbfd.c (_bfd_generic_get_section_contents): Check for and
1229 reject a section whose size + offset is greater than the size
1231 (_bfd_generic_get_section_contents_in_window): Likewise.
1233 2017-06-26 Nick Clifton <nickc@redhat.com>
1236 * tekhex.c (getvalue): Check for the source pointer exceeding the
1237 end pointer before the first byte is read.
1239 2017-06-26 Nick Clifton <nickc@redhat.com>
1242 * opncls.c (get_build_id): Check that the section is big enough
1243 to contain the whole note.
1244 * compress.c (bfd_get_full_section_contents): Check for and reject
1245 a section whose size is greater than the size of the entire file.
1246 * elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not
1247 contain a notes section.
1249 2017-06-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1251 * elf64-s390.c (elf_s390_additional_program_headers): Add NULL
1253 (elf_s390_modify_segment_map): Likewise.
1254 (bfd_elf_s390_set_options): Lisewise.
1256 2017-06-26 Alan Modra <amodra@gmail.com>
1258 * elflink.c (_bfd_elf_link_create_dynstrtab): Don't make dynobj
1260 (_bfd_elf_size_group_sections): Skip --just-syms bfds.
1261 (bfd_elf_size_dynamic_sections): Ignore .note.GNU-stack and
1262 .preinit_array on --just-syms bfds.
1263 (_bfd_elf_gc_mark_extra_sections): Skip --just-syms bfds.
1264 (elf_gc_sweep, bfd_elf_parse_eh_frame_entries): Likewise.
1265 (bfd_elf_gc_sections, bfd_elf_discard_info): Likewise.
1267 2017-06-25 Sergei Trofimovich <slyfox@gentoo.org>
1269 * elf.c (find_link): Bounds check "hint".
1271 2017-06-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
1273 * elf32-arm.c (using_thumb_only): Update list of architectures in
1274 BFD_ASSERT for which the logic is valid.
1275 (using_thumb2_bl): Likewise.
1276 (using_thumb2): Likewise and return true for ARMv8-R.
1277 (arch_has_arm_nop): Likewise.
1278 (tag_cpu_arch_combine): New v8r table for ARMv8-R Tag_CPU_arch
1279 merging logic. Update commentis for value 15 of v8m_baseline,
1280 v8m_mainline and v4t_plus_v6_m arrays. Use v8r array to decide
1281 merging of value 15 of Tag_CPU_arch.
1283 2017-06-23 Jiong Wang <jiong.wang@arm.com>
1285 * reloc.c (BFD_RELOC_AARCH64_ADR_GOTPAGE): Rename to
1286 BFD_RELOC_AARCH64_ADR_GOT_PAGE
1287 * bfd-in2.h: Regenerate.
1289 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1291 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Move
1292 the error_alignment label forward. Properly align program
1293 property note section.
1295 2017-06-22 Eric Christopher <echristo@gmail.com>
1297 * elf32-arm.c (elf32_arm_final_link_relocate): Use labs rather than
1298 abs to fix a truncation warning.
1300 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1302 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Resolve
1303 local undefined weak symbol to 0.
1304 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Likewise.
1306 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1308 * elf32-i386.c (elf_i386_merge_gnu_properties): If info->shstk
1309 is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
1310 (elf_i386_link_setup_gnu_properties): If info->shstk is set,
1311 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
1312 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): If
1313 info->shstk is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
1314 (elf_x86_64_link_setup_gnu_properties): If info->shstk is set,
1315 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
1317 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1319 * elf32-i386.c (elf_i386_lazy_ibt_plt0_entry): New.
1320 (elf_i386_lazy_ibt_plt_entry): Likewise.
1321 (elf_i386_pic_lazy_ibt_plt0_entry): Likewise.
1322 (elf_i386_non_lazy_ibt_plt_entry): Likewise.
1323 (elf_i386_pic_non_lazy_ibt_plt_entry): Likewise.
1324 (elf_i386_eh_frame_lazy_ibt_plt): Likewise.
1325 (elf_i386_lazy_plt_layout): Likewise.
1326 (elf_i386_non_lazy_plt_layout): Likewise.
1327 (elf_i386_link_hash_entry): Add plt_second.
1328 (elf_i386_link_hash_table): Add plt_second and
1329 plt_second_eh_frame.
1330 (elf_i386_allocate_dynrelocs): Use the second PLT if needed.
1331 (elf_i386_size_dynamic_sections): Use .plt.got unwind info for
1332 the second PLT. Check the second PLT.
1333 (elf_i386_relocate_section): Use the second PLT to resolve
1334 PLT reference if needed.
1335 (elf_i386_finish_dynamic_symbol): Fill and use the second PLT if
1337 (elf_i386_finish_dynamic_sections): Set sh_entsize on the
1338 second PLT. Generate unwind info for the second PLT.
1339 (elf_i386_plt_type): Add plt_second.
1340 (elf_i386_get_synthetic_symtab): Support the second PLT.
1341 (elf_i386_parse_gnu_properties): Support
1342 GNU_PROPERTY_X86_FEATURE_1_AND.
1343 (elf_i386_merge_gnu_properties): Support
1344 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
1345 on GNU_PROPERTY_X86_FEATURE_1_IBT
1346 (elf_i386_link_setup_gnu_properties): If info->ibt is set,
1347 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
1348 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
1349 is set on all relocatable inputs.
1350 * elf64-x86-64.c (elf_x86_64_lazy_ibt_plt_entry): New.
1351 (elf_x32_lazy_ibt_plt_entry): Likewise.
1352 (elf_x86_64_non_lazy_ibt_plt_entry): Likewise.
1353 (elf_x32_non_lazy_ibt_plt_entry): Likewise.
1354 (elf_x86_64_eh_frame_lazy_ibt_plt): Likewise.
1355 (elf_x32_eh_frame_lazy_ibt_plt): Likewise.
1356 (elf_x86_64_lazy_ibt_plt): Likewise.
1357 (elf_x32_lazy_ibt_plt): Likewise.
1358 (elf_x86_64_non_lazy_ibt_plt): Likewise.
1359 (elf_x32_non_lazy_ibt_plt): Likewise.
1360 (elf_x86_64_get_synthetic_symtab): Support the second PLT.
1361 (elf_x86_64_parse_gnu_properties): Support
1362 GNU_PROPERTY_X86_FEATURE_1_AND.
1363 (elf_x86_64_merge_gnu_properties): Support
1364 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
1365 on GNU_PROPERTY_X86_FEATURE_1_IBT
1366 (elf_x86_64_link_setup_gnu_properties): If info->ibt is set,
1367 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
1368 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
1369 is set on all relocatable inputs.
1371 2017-06-22 Nick Clifton <nickc@redhat.com>
1374 * som.c (setup_sections): NUL terminate the space_strings buffer.
1375 Check that the space.name field does not index beyond the end of
1376 the space_strings buffer.
1378 2017-06-21 Nick Clifton <nickc@redhat.com>
1381 * coff-sh.c (sh_reloc): Check for an out of range reloc.
1383 2017-06-21 Nick Clifton <nickc@redhat.com>
1386 * vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as
1387 type of the size parameter.
1388 (_bfd_vms_save_counted_string): Add second parameter - the maximum
1389 length of the counted string.
1390 * vms.h (_bfd_vms_save_sized_string): Update prototype.
1391 (_bfd_vms_save_counted_string): Likewise.
1392 * vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to
1393 _bfd_vms_save_counted_string.
1394 (_bfd_vms_slurp_ehdr): Likewise.
1395 (_bfd_vms_slurp_egsd): Likewise.
1396 (Parse_module): Likewise.
1398 2017-06-21 Alan Modra <amodra@gmail.com>
1400 * elf64-ppc.c (ppc64_elf_size_stubs): Test for localentry:0 plt
1401 calls before tocsave calls.
1402 (ppc64_elf_relocate_section): Allow localentry:0 plt calls without
1405 2017-06-21 Nick Clifton <nickc@redhat.com>
1408 * reloc.c (bfd_generic_get_relocated_section_contents): Fail if
1409 bfd_get_full_section_contents returns no contents.
1411 2017-06-21 Nick Clifton <nickc@redhat.com>
1414 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized
1417 2017-06-21 Nick Clifton <nickc@redhat.com>
1420 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section
1422 (image_set_ptr): Likewise.
1423 (alpha_vms_fix_sec_rel): Likewise.
1424 (alpha_vms_slurp_relocs): Likewise.
1426 2017-06-21 Nick Clifton <nickc@redhat.com>
1429 * ieee.c (ieee_slurp_sections): Check for a NULL return from
1431 (ieee_archive_p): Likewise.
1432 (ieee_object_p): Likewise.
1434 2017-06-21 Nick Clifton <nickc@redhat.com>
1437 * elf.c (setup_group): Zero the group section pointer list after
1438 allocation so that loops can be caught. Check for NULL pointers
1439 when processing a group list.
1441 2017-06-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1443 * elf-s390.h: New file.
1444 * elf64-s390.c (struct elf_s390_link_hash_table): Add params
1446 (elf_s390_additional_program_headers): New function.
1447 (elf_s390_modify_segment_map): New function.
1448 (bfd_elf_s390_set_options): New function.
1449 (elf_backend_additional_program_headers)
1450 (elf_backend_modify_segment_map): Add macro definitions.
1452 2017-06-19 H.J. Lu <hongjiu.lu@intel.com>
1455 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
1456 the DYNAMIC bit instead of bfd_count_sections.
1458 2017-06-19 Nick Clifton <nickc@redhat.com>
1461 * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record
1463 (evax_bfd_print_eeom): Likewise.
1464 (evax_bfd_print_egsd): Check for an overlarge record length.
1465 (evax_bfd_print_etir): Likewise.
1467 2017-06-19 Nick Clifton <nickc@redhat.com>
1470 * libieee.h (struct common_header_type): Add end_p field.
1471 * ieee.c (this_byte_and_next): Do not advance input_p beyond
1473 (read_id): Check for a length that exceeds the remaining bytes in
1475 (ieee_seek): Initialise end_p.
1476 (ieee_archive_p): Likewise.
1477 (ieee_object_p): Likewise.
1479 2017-06-19 Nick Clifton <nickc@redhat.com>
1482 * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset
1483 before reading the EIHS structure entries.
1485 2017-06-19 Nick Clifton <nickc@redhat.com>
1488 * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for
1489 gsd_size. Check that there are enough bytes remaining to read the
1490 type and size of the next egsd. Check that the size of the egsd
1491 does not exceed the size of the record.
1493 2017-06-19 Alan Modra <amodra@gmail.com>
1495 * config.bfd: Correct targ_underscore for cris.
1497 2017-06-18 Alan Modra <amodra@gmail.com>
1499 * config.bfd: Correct targ_underscore for epiphany, ip2k,
1500 m32c, mn10200, pru, rl78, rx, crisv32 and v850.
1502 2017-06-16 Nick Clifton <nickc@redhat.com>
1504 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
1505 bucketlist is empty because there are no symbols to add to the
1508 2017-06-16 Alan Modra <amodra@gmail.com>
1514 * targets.c (struct bfd_target): Add _bfd_define_start_stop.
1515 (BFD_JUMP_TABLE_LINK): Likewise.
1516 * elf-bfd.h (bfd_elf_define_start_stop): Declare.
1517 * elflink.c (_bfd_elf_gc_mark_rsec): Update comment.
1518 (bfd_elf_define_start_stop): New function.
1519 * linker.c (bfd_generic_define_start_stop): New function.
1520 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init
1522 * aout-adobe.c (aout_32_bfd_define_start_stop): Define.
1523 * aout-target.h (MY_bfd_define_start_stop): Define.
1524 * aout-tic30.c (MY_bfd_define_start_stop): Define.
1525 * binary.c (binary_bfd_define_start_stop): Define.
1526 * bout.c (b_out_bfd_define_start_stop): Define.
1527 * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define.
1528 * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define.
1529 * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define.
1530 * coffcode.h (coff_bfd_define_start_stop): Define.
1531 * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define.
1532 * i386msdos.c (msdos_bfd_define_start_stop): Define.
1533 * i386os9k.c (os9k_bfd_define_start_stop): Define.
1534 * ieee.c (ieee_bfd_define_start_stop): Define.
1535 * ihex.c (ihex_bfd_define_start_stop): Define.
1536 * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define.
1537 * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define.
1538 * mmo.c (mmo_bfd_define_start_stop): Define.
1539 * nlm-target.h (nlm_bfd_define_start_stop): Define.
1540 * oasys.c (oasys_bfd_define_start_stop): Define.
1541 * pef.c (bfd_pef_bfd_define_start_stop): Define.
1542 * plugin.c (bfd_plugin_bfd_define_start_stop): Define.
1543 * ppcboot.c (ppcboot_bfd_define_start_stop): Define.
1544 * som.c (som_bfd_define_start_stop): Define.
1545 * srec.c (srec_bfd_define_start_stop): Define.
1546 * tekhex.c (tekhex_bfd_define_start_stop): Define.
1547 * versados.c (versados_bfd_define_start_stop): Define.
1548 * vms-alpha.c (vms_bfd_define_start_stop): Define.
1549 (alpha_vms_bfd_define_start_stop): Define.
1550 * xsym.c (bfd_sym_bfd_define_start_stop): Define.
1551 * bfd-in2.h: Regenerate.
1552 * libbfd.h: Regenerate.
1554 2017-06-16 Jiong Wang <jiong.wang@arm.com>
1556 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
1557 SYMBOL_REFERENCES_LOCAL.
1559 2017-06-15 Jiong Wang <jiong.wang@arm.com>
1562 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
1563 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
1564 runtime for if there needs copy relocation elimination.
1565 (need_copy_relocation_p): New function. Return true for symbol with
1566 pc-relative references and if it's against read-only sections.
1567 (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
1568 (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
1569 that are related with accessing external objects.
1570 (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change
1571 in elfNN_aarch64_check_relocs.
1573 2017-06-15 Nick Clifton <nickc@redhat.com>
1576 * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
1579 (ieee_archive_p): Likewise.
1581 2017-06-15 Nick Clifton <nickc@redhat.com>
1584 * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
1586 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
1588 * elf32-xtensa.c (elf_xtensa_be_plt_entry,
1589 elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays,
1590 keep both windowed and call0 ABI PLT definitions.
1591 (elf_xtensa_create_plt_entry): Use selected ABI to choose upper
1592 elf_xtensa_*_plt_entry endex.
1593 (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size.
1595 2017-06-14 Nick Clifton <nickc@redhat.com>
1598 * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
1601 2017-06-14 Nick Clifton <nickc@redhat.com>
1604 * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
1605 maximum value for the ascic pointer. Check that name processing
1606 does not read beyond this value.
1607 (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
1610 2017-06-14 Nick Clifton <nickc@redhat.com>
1613 * versados.c (versados_mkobject): Zero the allocated tdata structure.
1614 (process_otr): Check for an invalid offset in the otr structure.
1616 2017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
1618 * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
1620 2017-06-13 H.J. Lu <hongjiu.lu@intel.com>
1626 * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
1627 vtable field to a union.
1628 (_bfd_elf_is_start_stop): Removed.
1629 * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
1630 __start_SECNAME and __stop_SECNAME symbols.
1631 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
1632 * elflink.c (_bfd_elf_is_start_stop): Removed.
1633 (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
1634 _bfd_elf_is_start_stop.
1635 (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
1636 __stop_SECNAME symbols. Updated.
1637 (elf_gc_smash_unused_vtentry_relocs): Likewise.
1638 (bfd_elf_gc_record_vtinherit): Likewise.
1639 (bfd_elf_gc_record_vtentry): Likewise.
1641 2017-06-13 Nick Clifton <nickc@redhat.com>
1644 * elflink.c (elf_link_adjust_relocs): Generate an error when
1645 encountering a reloc against a symbol removed by garbage
1648 2017-06-12 H.J. Lu <hongjiu.lu@intel.com>
1650 * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
1651 to merge_gnu_properties.
1652 * elf-properties.c (elf_merge_gnu_properties): Add struct
1653 bfd_link_info * and pass it to merge_gnu_properties.
1654 (elf_merge_gnu_property_list): Add struct bfd_link_info *
1655 and pass it to elf_merge_gnu_properties.
1656 (_bfd_elf_link_setup_gnu_properties): Pass info to
1657 elf_merge_gnu_property_list.
1658 * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
1660 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
1662 2017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
1665 * binary.c (binary_set_section_contents): Scale lma by octets
1666 per byte to set filepos.
1668 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1670 * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
1673 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1675 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
1678 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1680 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
1681 patched section contents for TLS IE reloc.
1682 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
1684 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1686 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
1687 RELOC_FOR_GLOBAL_SYMBOL macro.
1689 2018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1691 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
1694 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1696 * config/tc-arc.c (md_undefined_symbol): Changed.
1697 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
1699 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1701 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
1704 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1706 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
1707 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
1709 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1711 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
1714 2017-06-08 Richard Earnshaw <rearnsha@arm.com>
1716 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
1717 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
1718 is non-zero. Add clarifying comments.
1720 2017-06-08 H.J. Lu <hongjiu.lu@intel.com>
1722 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
1723 name. Use local IFUNC symbol name string to report unsupported
1724 non-PIC call to IFUNC function.
1725 (elf_i386_relocate_section): Dump local IFUNC name with minfo
1726 when generating R_386_IRELATIVE relocation.
1727 (elf_i386_finish_dynamic_symbol): Likewise.
1728 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
1730 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
1731 when generating R_X86_64_IRELATIVE relocation.
1732 (elf_x86_64_finish_dynamic_symbol): Likewise.
1734 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
1736 * elf.c (setup_group): Make sure BFD sections are created for all
1737 group sections in the input file when processing SHF_GROUP
1739 (bfd_section_from_shdr): Avoid duplicating logic already
1740 implemented in `setup_group'.
1742 2017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
1745 * peXXigen.c (pe_print_idata): Use the address of the first thunk
1746 if the hint address is zero.
1748 2017-06-06 James Clarke <jrtc27@jrtc27.com>
1751 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
1752 ELF_COMMON_DEF_P for common symbols.
1754 2017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
1756 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
1757 SEC_GROUP sections as SEC_EXCLUDE.
1758 (bfd_elf_set_group_contents): Replace use of abort with an assert.
1759 (assign_section_numbers): Use resolve_section_groups flag instead
1760 of relocatable link type.
1761 (_bfd_elf_init_private_section_data): Use resolve_section_groups
1762 flag instead of checking the final_link flag for part of the
1763 checks in here. Fix white space as a result.
1764 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
1765 instead of relocatable link type.
1766 (bfd_elf_final_link): Likewise.
1768 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
1770 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
1772 * elf32-score.c (score_elf_final_link_relocate): Likewise.
1773 (s3_bfd_score_elf_check_relocs): Likewise.
1774 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
1775 (score_elf_final_link_relocate): Likewise.
1776 (s7_bfd_score_elf_check_relocs): Likewise.
1778 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
1780 * elflink.c (init_reloc_cookie_rels): Remove unused variable
1783 2017-06-06 Maciej W. Rozycki <macro@imgtec.com>
1785 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
1786 from `reloc_count' rather than decrementing it.
1787 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
1788 `reloc_count' by `int_rels_per_ext_rel'.
1789 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
1790 `reloc_count' by `int_rels_per_ext_rel' for last relocation
1791 entry determination.
1792 (s3_bfd_score_elf_check_relocs): Likewise.
1793 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
1794 (s7_bfd_score_elf_relocate_section): Likewise.
1795 (s7_bfd_score_elf_check_relocs): Likewise.
1796 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
1797 prototype and function.
1798 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
1799 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
1800 triple rather than once the sum of REL and RELA relocation entry
1802 (bfd_elf64_get_reloc_upper_bound): Remove macro.
1803 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
1804 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
1805 storage allocation size determination.
1806 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
1807 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
1808 by `int_rels_per_ext_rel' for last relocation entry
1810 (bfd_elf_final_link): Do not multiply `reloc_count' by
1811 `int_rels_per_ext_rel' for internal relocation storage
1812 allocation size determination.
1813 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
1814 `int_rels_per_ext_rel' for last relocation entry determination.
1815 (elf_gc_smash_unused_vtentry_relocs): Likewise.
1816 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
1817 (_bfd_mips_elf_relocate_section): Likewise.
1819 2017-06-05 Alan Modra <amodra@gmail.com>
1822 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
1824 2017-06-01 John Baldwin <jhb@FreeBSD.org>
1826 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
1827 determine structure sizes.
1828 (elfcore_grok_freebsd_prstatus): Likewise.
1830 2017-06-01 Alan Modra <amodra@gmail.com>
1832 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
1833 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
1835 (is_elfv2_localentry0): New function.
1836 (ppc64_elf_tls_setup): Default params->plt_localentry0.
1837 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
1838 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
1839 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
1840 optimized localentry:0 stubs.
1841 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
1842 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
1844 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
1846 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
1848 2017-05-30 Casey Smith <clegg89@gmail.com>
1851 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
1852 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
1854 2017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
1856 * cpu-arc.c (arc_compatible): New function.
1858 2017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
1860 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
1862 2017-05-30 H.J. Lu <hongjiu.lu@intel.com>
1865 * bfdio.c (bfd_get_file_size): New function.
1866 * bfd-in2.h: Regenerated.
1868 2017-05-23 Dilian Palauzov <git-dpa@aegee.org>
1870 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
1873 2017-05-22 H.J. Lu <hongjiu.lu@intel.com>
1875 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
1876 dynobj instead of htab->elf.dynobj.
1878 2017-05-19 Maciej W. Rozycki <macro@imgtec.com>
1880 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
1882 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
1883 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
1884 actual number of internal relocations retrieved. Adjust
1885 function description.
1886 (bfd_elf64_canonicalize_reloc): Remove macro.
1887 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
1889 2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
1891 * archures.c (bfd_mach_sparc_v9m8): Define.
1892 (bfd_mach_sparc_v8plusm8): Likewise.
1893 (bfd_mach_sparc_v9_p): Adjust to M8.
1894 (bfd_mach_sparc_64bit_p): Likewise.
1895 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
1896 bfd_mach_sparc_v8plusm8.
1897 * bfd-in2.h: Regenerated.
1898 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
1900 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
1901 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
1902 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
1904 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
1905 bfd_mach_sparc_v8plusm8.
1907 2017-05-19 Alan Modra <amodra@gmail.com>
1909 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
1910 debug and special sections when no non-note alloc sections in an
1913 2017-05-18 Alan Modra <amodra@gmail.com>
1915 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
1916 * elf-m10300.c: Likewise.
1918 * elf32-arc.c: Likewise.
1919 * elf32-bfin.c: Likewise.
1920 * elf32-m68k.c: Likewise.
1921 * elf32-nds32.c: Likewise.
1922 * elf32-tilepro.c: Likewise.
1923 * elflink.c: Likewise.
1924 * elfnn-aarch64.c: Likewise.
1925 * elfnn-riscv.c: Likewise.
1926 * elfxx-tilegx.c: Likewise.
1927 * mach-o.c: Likewise.
1928 * peXXigen.c: Likewise.
1929 * vms-alpha.c: Likewise.
1930 * vms-lib.c: Likewise.
1932 2017-05-17 H.J. Lu <hongjiu.lu@intel.com>
1935 * elflink.c (elf_gc_mark_debug_section): New function.
1936 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
1937 referenced by kept debug sections.
1939 2017-05-16 Alan Modra <amodra@gmail.com>
1941 * elf-m10300.c: Rename occurrences of non_ir_ref.
1942 * elf32-arm.c: Likewise.
1943 * elf32-bfin.c: Likewise.
1944 * elf32-cr16.c: Likewise.
1945 * elf32-cris.c: Likewise.
1946 * elf32-d10v.c: Likewise.
1947 * elf32-dlx.c: Likewise.
1948 * elf32-fr30.c: Likewise.
1949 * elf32-frv.c: Likewise.
1950 * elf32-hppa.c: Likewise.
1951 * elf32-i370.c: Likewise.
1952 * elf32-i386.c: Likewise.
1953 * elf32-iq2000.c: Likewise.
1954 * elf32-lm32.c: Likewise.
1955 * elf32-m32c.c: Likewise.
1956 * elf32-m32r.c: Likewise.
1957 * elf32-m68hc1x.c: Likewise.
1958 * elf32-m68k.c: Likewise.
1959 * elf32-mcore.c: Likewise.
1960 * elf32-metag.c: Likewise.
1961 * elf32-microblaze.c: Likewise.
1962 * elf32-moxie.c: Likewise.
1963 * elf32-msp430.c: Likewise.
1964 * elf32-mt.c: Likewise.
1965 * elf32-nios2.c: Likewise.
1966 * elf32-or1k.c: Likewise.
1967 * elf32-ppc.c: Likewise.
1968 * elf32-rl78.c: Likewise.
1969 * elf32-s390.c: Likewise.
1970 * elf32-score.c: Likewise.
1971 * elf32-score7.c: Likewise.
1972 * elf32-sh.c: Likewise.
1973 * elf32-tic6x.c: Likewise.
1974 * elf32-tilepro.c: Likewise.
1975 * elf32-v850.c: Likewise.
1976 * elf32-vax.c: Likewise.
1977 * elf32-xstormy16.c: Likewise.
1978 * elf32-xtensa.c: Likewise.
1979 * elf64-alpha.c: Likewise.
1980 * elf64-hppa.c: Likewise.
1981 * elf64-ia64-vms.c: Likewise.
1982 * elf64-mmix.c: Likewise.
1983 * elf64-ppc.c: Likewise.
1984 * elf64-s390.c: Likewise.
1985 * elf64-sh64.c: Likewise.
1986 * elf64-x86-64.c: Likewise.
1987 * elflink.c: Likewise.
1988 * elfnn-aarch64.c: Likewise.
1989 * elfnn-ia64.c: Likewise.
1990 * elfnn-riscv.c: Likewise.
1991 * elfxx-mips.c: Likewise.
1992 * elfxx-sparc.c: Likewise.
1993 * elfxx-tilegx.c: Likewise.
1994 * linker.c: Likewise.
1996 2017-05-16 Alan Modra <amodra@gmail.com>
1998 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
1999 * elflink.c (elf_link_add_object_symbols): Update to use
2001 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
2003 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
2005 2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
2007 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
2009 2017-05-12 H.J. Lu <hongjiu.lu@intel.com>
2011 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
2012 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
2014 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
2016 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
2018 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
2020 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
2021 to plt_second/plt_second_eh_frame.
2022 (elf_x86_64_link_hash_newfunc): Updated.
2023 (elf_x86_64_allocate_dynrelocs): Likewise.
2024 (elf_x86_64_size_dynamic_sections): Likewise.
2025 (elf_x86_64_relocate_section): Likewise.
2026 (elf_x86_64_finish_dynamic_symbol): Likewise.
2027 (elf_x86_64_finish_dynamic_sections): Likewise.
2028 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
2029 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
2031 (elf_backend_setup_gnu_properties): Updated. Create the
2032 .plt.sec section instead of the .plt.sec section.
2034 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
2036 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
2037 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
2038 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
2040 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
2042 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
2043 (bfd_elf64_set_reloc): Define.
2044 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
2046 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
2048 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
2049 (struct bfd_target): New field _bfd_set_reloc.
2050 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
2051 * reloc.c (_bfd_generic_set_reloc): New function.
2052 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
2053 * nlm-target.h (nlm_set_reloc): Likewise.
2054 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
2055 * aout-tic30.c (MY_set_reloc): Likewise.
2056 * aout-target.h (MY_set_reloc): Likewise.
2057 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
2058 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
2059 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
2060 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
2061 * aout-adobe.c (aout_32_set_reloc): Likewise.
2062 * bout.c (b_out_set_reloc): Likewise.
2063 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
2064 * i386os9k.c (aout_32_set_reloc): Likewise.
2065 * ieee.c (ieee_set_reloc): Likewise.
2066 * oasys.c (oasys_set_reloc): Likewise.
2067 * som.c (som_set_reloc): Likewise.
2068 * versados.c (versados_set_reloc): Likewise.
2069 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
2070 _bfd_generic_set_reloc.
2071 (rs6000_xcoff64_aix_vec): LIkewise.
2072 * libbfd.c (_bfd_norelocs_set_reloc): New function.
2073 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
2074 * i386msdos.c (msdos_set_reloc): Define to
2075 _bfd_norelocs_set_reloc.
2076 * elfcode.h (elf_set_reloc): Define.
2077 * bfd-in2.h: Regenerated.
2079 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
2082 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
2083 for IFUNC function address.
2085 2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
2087 * elf32-arc.c (FEATURE_LIST_NAME): Define.
2088 (CONFLICT_LIST): Likewise.
2089 (opcode/arc-attrs.h): Include.
2090 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
2091 (arc_extract_features): New file.
2092 (arc_stralloc): Likewise.
2093 (arc_elf_merge_attributes): Likewise.
2094 (arc_elf_merge_private_bfd_data): Use object attributes.
2095 (bfd_arc_get_mach_from_attributes): New function.
2096 (arc_elf_object_p): Use object attributes.
2097 (arc_elf_final_write_processing): Likewise.
2098 (elf32_arc_obj_attrs_arg_type): New function.
2099 (elf32_arc_obj_attrs_handle_unknown): Likewise.
2100 (elf32_arc_section_from_shdr): Likewise.
2101 (elf_backend_obj_attrs_vendor): Define.
2102 (elf_backend_obj_attrs_section): Likewise.
2103 (elf_backend_obj_attrs_arg_type): Likewise.
2104 (elf_backend_obj_attrs_section_type): Likewise.
2105 (elf_backend_obj_attrs_handle_unknown): Likewise.
2106 (elf_backend_section_from_shdr): Likewise.
2108 2017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
2111 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
2112 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
2113 and the destination is a Thumb symbol.
2115 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2117 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
2118 initializer to silence GCC 4.2.
2119 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
2121 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2123 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
2124 (LAZY_PLT_ENTRY_SIZE): This.
2125 (NON_LAZY_PLT_ENTRY_SIZE): New.
2126 (elf_x86_64_plt0_entry): Renamed to ...
2127 (elf_x86_64_lazy_plt0_entry): This.
2128 (elf_x86_64_plt_entry): Renamed to ...
2129 (elf_x86_64_lazy_plt_entry): This.
2130 (elf_x86_64_bnd_plt0_entry): Renamed to ...
2131 (elf_x86_64_lazy_bnd_plt0_entry): This.
2132 (elf_x86_64_legacy_plt_entry): Removed.
2133 (elf_x86_64_bnd_plt_entry): Renamed to ...
2134 (elf_x86_64_lazy_bnd_plt_entry): This.
2135 (elf_x86_64_legacy_plt2_entry): Renamed to ...
2136 (elf_x86_64_non_lazy_plt_entry): This.
2137 (elf_x86_64_bnd_plt2_entry): Renamed to ...
2138 (elf_x86_64_non_lazy_bnd_plt_entry): This.
2139 (elf_x86_64_eh_frame_plt): Renamed to ...
2140 (elf_x86_64_eh_frame_lazy_plt): This.
2141 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
2142 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
2143 (elf_x86_64_eh_frame_plt_got): Renamed to ...
2144 (elf_x86_64_eh_frame_non_lazy_plt): This.
2145 (elf_x86_64_lazy_plt_layout): New.
2146 (elf_x86_64_non_lazy_plt_layout): Likewise.
2147 (elf_x86_64_plt_layout): Likewise.
2148 (elf_x86_64_backend_data): Remove PLT layout information. Add
2149 os for target system.
2150 (GET_PLT_ENTRY_SIZE): Removed.
2151 (elf_x86_64_lazy_plt): New.
2152 (elf_x86_64_non_lazy_plt): Likewise.
2153 (elf_x86_64_lazy_bnd_plt): Likewise.
2154 (elf_x86_64_non_lazy_bnd_plt): Likewise.
2155 (elf_x86-64_arch_bed): Updated.
2156 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
2157 (elf_x86_64_create_dynamic_sections): Removed.
2158 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
2159 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
2160 (elf_x86-64_adjust_dynamic_symbol): Updated.
2161 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
2162 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
2163 size for PLT0 if there is no PLT0. Get plt_entry_size from
2164 non_lazy_plt for non-lazy PLT entries.
2165 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
2166 from non_lazy_plt for non-lazy PLT entries.
2167 (elf_x86-64_relocate_section): Updated. Properly get PLT index
2168 if there is no PLT0.
2169 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
2170 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
2171 entries with non-lazy PLT layout. Don't fill the second and third
2172 slots in the PLT entry if there is no PLT0.
2173 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
2174 if there is no PLT0. Set sh_entsize on the .plt.got section.
2175 (compare_relocs): New.
2176 (elf_x86_64_plt_type): Likewise.
2177 (elf_x86_64_plt): Likewise.
2178 (elf_x86_64_nacl_plt): New. Forward declaration.
2179 (elf_x86_64_get_plt_sym_val): Removed.
2180 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
2181 against all dynamic relocations.
2182 (elf_x86_64_link_setup_gnu_properties): New function.
2183 (elf_backend_create_dynamic_sections): Updated.
2184 (elf_backend_setup_gnu_properties): New.
2185 (elf_x86_64_nacl_plt): New.
2186 (elf_x86_64_nacl_arch_bed): Updated.
2188 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2190 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
2191 (LAZY_PLT_ENTRY_SIZE): This.
2192 (NON_LAZY_PLT_ENTRY_SIZE): New.
2193 (elf_i386_plt0_entry): Renamed to ...
2194 (elf_i386_lazy_plt0_entry): This.
2195 (elf_i386_plt_entry): Renamed to ...
2196 (elf_i386_lazy_plt_entry): This.
2197 (elf_i386_pic_plt0_entry): Renamed to ...
2198 (elf_i386_pic_lazy_plt0_entry): This.
2199 (elf_i386_pic_plt_entry): Renamed to ...
2200 (elf_i386_pic_lazy_plt_entry): This.
2201 (elf_i386_got_plt_entry): Renamed to ...
2202 (elf_i386_non_lazy_plt_entry): This.
2203 (elf_i386_pic_got_plt_entry): Renamed to ...
2204 (elf_i386_pic_non_lazy_plt_entry): This.
2205 (elf_i386_eh_frame_plt): Renamed to ...
2206 (elf_i386_eh_frame_lazy_plt): This.
2207 (elf_i386_eh_frame_plt_got): Renamed to ...
2208 (elf_i386_eh_frame_non_lazy_plt): This.
2209 (elf_i386_plt_layout): Renamed to ...
2210 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
2211 eh_frame_plt_got_size.
2212 (elf_i386_non_lazy_plt_layout): New.
2213 (elf_i386_plt_layout): Likewise.
2214 (elf_i386_non_lazy_plt): Likewise.
2215 (GET_PLT_ENTRY_SIZE): Removed.
2216 (elf_i386_plt): Renamed to ...
2217 (elf_i386_lazy_plt): This.
2218 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
2219 (elf_i386_arch_bed): Updated.
2220 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
2221 (elf_i386_create_dynamic_sections): Removed.
2222 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
2223 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
2224 (elf_i386_adjust_dynamic_symbol): Updated.
2225 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
2226 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
2227 size for PLT0 if there is no PLT0.
2228 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
2229 output section is discarded only if GOT isn't empty.
2230 (elf_i386_relocate_section): Updated. Properly get PLT index
2231 if there is no PLT0.
2232 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
2233 second and third slots in the PLT entry if there is no PLT0.
2234 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
2235 if there is no PLT0. Set sh_entsize on the .plt.got section.
2236 (elf_i386_nacl_plt): Forward declaration.
2237 (elf_i386_get_plt_sym_val): Removed.
2238 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
2239 against all dynamic relocations.
2240 (elf_i386_link_setup_gnu_properties): New function.
2241 (elf_backend_create_dynamic_sections): Updated.
2242 (elf_backend_setup_gnu_properties): New.
2243 (elf_i386_nacl_plt): Updated.
2244 (elf_i386_nacl_arch_bed): Likewise.
2245 (elf_i386_vxworks_arch_bed): Likewise.
2247 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
2249 * elflink.c (elf_output_implib): Remove executable flag from import
2251 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
2252 library is a relocatable object file.
2254 2017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
2257 * elf32-avr.c (avr_should_move_sym): New function.
2258 (avr_should_reduce_sym_size): Likewise.
2259 (avr_should_increase_sym_size): Likewise.
2260 (elf32_avr_relax_delete_bytes): Adjust symbol values
2261 and sizes by calling new functions.
2263 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
2265 * config.bfd (riscv32-*): Enable rv64.
2267 2017-05-02 Alan Modra <amodra@gmail.com>
2270 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
2271 rather than h->root.type == bfd_link_hash_new.
2272 (bfd_elf_record_link_assignment): Similarly, call
2273 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
2275 2017-04-29 Alan Modra <amodra@gmail.com>
2278 * reloc.c (reloc_offset_in_range): New function.
2279 (bfd_perform_relocation, bfd_install_relocation): Use it.
2280 (_bfd_final_link_relocate): Likewise.
2282 2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
2284 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
2285 before using .plt.got.
2286 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
2288 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2290 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
2291 instead of "+=" to update 0.
2293 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2295 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
2296 .plt.got section here.
2297 (elf_i386_check_relocs): Don't create the .plt.got section.
2298 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
2299 the .plt.got and .plt.bnd sections here.
2300 (elf_x86_64_check_relocs): Don't create the .plt.got nor
2303 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2305 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
2307 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
2308 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
2309 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
2310 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
2313 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2315 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
2317 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
2318 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
2319 the first relocatable ELF input with GNU properties.
2321 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2323 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
2324 VxWorks for non-PIC.
2326 2017-04-27 Alan Modra <amodra@gmail.com>
2328 * elf-bfd.h (struct elf_backend_data): Make asection param of
2329 elf_backend_eh_frame_address_size const.
2330 (_bfd_elf_eh_frame_address_size): Likewise.
2331 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
2332 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
2333 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
2334 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
2335 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
2336 (next_cie_fde_offset): Constify params.
2337 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
2339 2017-04-27 Alan Modra <amodra@gmail.com>
2341 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
2342 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
2343 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
2345 (offset_adjust): New function.
2346 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
2347 (adjust_eh_frame_local_symbols): Likewise.
2348 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
2349 after changing anything. Return true if anything changed.
2350 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
2351 _bfd_elf_adjust_eh_frame_global_symbol for globals.
2353 2017-04-27 Alan Modra <amodra@gmail.com>
2355 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
2358 2017-04-27 Alan Modra <amodra@gmail.com>
2360 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
2361 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
2362 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
2363 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
2364 for undef and undefweak dyn_relocs.
2365 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
2366 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
2367 (allocate_got, allocate_dynrelocs): Likewise.
2368 (ppc64_elf_relocate_section): Likewise.
2370 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
2372 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
2373 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
2374 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
2375 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
2377 2017-04-26 Nick Clifton <nickc@redhat.com>
2380 * reloc.c (bfd_perform_relocation): Check for a negative address
2383 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
2386 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
2388 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
2389 (elf_backend_always_renumber_dynsyms): Define.
2390 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
2391 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
2392 * elflink.c (bfd_elf_size_dynamic_sections): Also call
2393 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
2395 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
2397 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
2399 * elflink.c (bfd_elf_size_dynamic_sections): Only call
2400 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
2401 sections have been created.
2403 2017-04-26 Nick Clifton <nickc@redhat.com>
2406 * compress.c (bfd_init_section_compress_status): Check the return
2407 value from bfd_malloc.
2409 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
2411 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
2412 no_finish_dynamic_symbol.
2413 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
2415 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
2416 weak symbol, don't make it dynamic.
2417 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
2418 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
2419 relocation for GOT reference.
2420 (elf_x86_64_finish_dynamic_symbol): Abort if
2421 no_finish_dynamic_symbol isn't 0.
2423 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
2426 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
2427 undefined weak symbol, don't make it dynamic.
2428 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
2429 set no_finish_dynamic_symbol and generate R_386_RELATIVE
2430 relocation for R_386_GOT32.
2432 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
2435 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
2437 2017-04-23 Alan Modra <amodra@gmail.com>
2440 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
2441 * elf.c (lcomm_sym): New.
2442 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
2443 * bfd-in2.h: Regenerate.
2445 2017-04-23 Alan Modra <amodra@gmail.com>
2448 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
2449 parameters and comment.
2450 (_bfd_elf_get_reloc_section): Delete.
2451 (_bfd_elf_plt_get_reloc_section): Declare.
2452 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
2453 New functions. Don't blindly skip over assumed .rel/.rela prefix.
2455 (_bfd_elf_get_reloc_section): ..here. Delete.
2456 (assign_section_numbers): Call elf_get_reloc_section.
2457 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
2458 * elfxx-target.h (elf_backend_get_reloc_section): Update.
2460 2017-04-23 Alan Modra <amodra@gmail.com>
2463 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
2466 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
2469 * elf32-i386.c (elf_i386_link_hash_entry): Add
2470 no_finish_dynamic_symbol.
2471 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
2472 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
2473 symbol, don't make it dynamic in PIE.
2474 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
2475 set no_finish_dynamic_symbol and generate R_386_RELATIVE
2476 relocation for R_386_GOT32
2477 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
2480 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
2484 * elflink.c (elf_link_add_object_symbols): Require
2485 --no-dynamic-linker with -E/--dynamic-list when creating
2488 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
2490 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
2493 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
2495 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
2496 dynamic symbol sorting.
2498 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
2501 * elflink.c (elf_link_add_object_symbols): Preserve
2502 dynamic_ref_after_ir_def when restoring the symbol table for
2503 unneeded dynamic object.
2505 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
2508 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
2509 on on undefined IFUNC symbol in the second PLT.
2511 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
2513 * peXXigen.c (pe_print_reloc): Correct chunk_end.
2515 2017-04-19 Alan Modra <amodra@gmail.com>
2517 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
2518 or make dynamic for info->dynamic_undefined_weak 0 and 1.
2519 * elf32-ppc.c:Formatting.
2520 (ensure_undefweak_dynamic): Don't make dynamic when
2521 info->dynamic_undefined_weak is zero.
2522 (allocate_dynrelocs): Discard undefweak dyn_relocs for
2523 info->dynamic_undefined_weak. Discard undef dyn_relocs when
2524 not default visibility. Discard undef and undefweak
2526 (ppc_elf_relocate_section): Adjust to suit.
2527 * elf64-ppc.c: Formatting.
2528 (ensure_undefweak_dynamic): Don't make dynamic when
2529 info->dynamic_undefined_weak is zero.
2530 (allocate_dynrelocs): Discard undefweak dyn_relocs for
2531 info->dynamic_undefined_weak. Discard them earlier.
2533 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
2536 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
2537 before generating the version definition section.
2539 2017-04-17 Alan Modra <amodra@gmail.com>
2541 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
2542 state when a regular object file defines a symbol with
2543 incompatible type to that defined by an earlier shared lib.
2545 2017-04-13 Alan Modra <amodra@gmail.com>
2547 * coffcode.h: Wrap some overly long _bfd_error_handler args.
2549 * elf32-arm.c: Likewise.
2550 * elf32-i386.c: Likewise.
2551 * elf32-mep.c: Likewise.
2552 * elf64-ia64-vms.c: Likewise.
2553 * elf64-x86-64.c: Likewise.
2554 * elflink.c: Likewise.
2555 * elfnn-ia64.c: Likewise.
2556 * elfxx-mips.c: Likewise.
2558 2017-04-13 Alan Modra <amodra@gmail.com>
2560 * aoutx.h: Use %B and %A in error messages throughout file.
2561 * aout-cris.c: Likewise.
2562 * archive.c: Likewise.
2563 * binary.c: Likewise.
2564 * coff-rs6000.c: Likewise.
2565 * coff-tic4x.c: Likewise.
2566 * coffcode.h: Likewise.
2567 * coffgen.c: Likewise.
2568 * cofflink.c: Likewise.
2569 * coffswap.h: Likewise.
2570 * cpu-arm.c: Likewise.
2571 * elf-eh-frame.c: Likewise.
2572 * elf-m10300.c: Likewise.
2574 * elf32-arc.c: Likewise.
2575 * elf32-arm.c: Likewise.
2576 * elf32-bfin.c: Likewise.
2577 * elf32-frv.c: Likewise.
2578 * elf32-iq2000.c: Likewise.
2579 * elf32-m32c.c: Likewise.
2580 * elf32-microblaze.c: Likewise.
2581 * elf32-nds32.c: Likewise.
2582 * elf32-rl78.c: Likewise.
2583 * elf32-rx.c: Likewise.
2584 * elf32-score.c: Likewise.
2585 * elf32-score7.c: Likewise.
2586 * elf32-sh64.c: Likewise.
2587 * elf32-v850.c: Likewise.
2588 * elf32-vax.c: Likewise.
2589 * elf32-visium.c: Likewise.
2590 * elf64-ia64-vms.c: Likewise.
2591 * elf64-mmix.c: Likewise.
2592 * elf64-sh64.c: Likewise.
2593 * elfcode.h: Likewise.
2594 * elfnn-aarch64.c: Likewise.
2595 * elfnn-ia64.c: Likewise.
2596 * elfxx-mips.c: Likewise.
2597 * hpux-core.c: Likewise.
2600 * linker.c: Likewise.
2601 * merge.c: Likewise.
2603 * oasys.c: Likewise.
2604 * pdp11.c: Likewise.
2605 * peXXigen.c: Likewise.
2606 * rs6000-core.c: Likewise.
2607 * vms-alpha.c: Likewise.
2608 * xcofflink.c: Likewise.
2610 2017-04-13 Alan Modra <amodra@gmail.com>
2612 * bfd.c (PRINT_TYPE): Define.
2613 (_doprnt): New function.
2614 (error_handler_internal): Use _doprnt.
2615 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
2616 calls in their natural order, throughout file.
2617 * coff-mcore.c: Likewise.
2618 * coff-ppc.c: Likewise.
2619 * coff-tic80.c: Likewise.
2620 * cofflink.c: Likewise.
2621 * elf-s390-common.c: Likewise.
2623 * elf32-arm.c: Likewise.
2624 * elf32-i386.c: Likewise.
2625 * elf32-m32r.c: Likewise.
2626 * elf32-msp430.c: Likewise.
2627 * elf32-spu.c: Likewise.
2628 * elf64-ia64-vms.c: Likewise.
2629 * elf64-sparc.c: Likewise.
2630 * elf64-x86-64.c: Likewise.
2631 * elflink.c: Likewise.
2632 * elfnn-aarch64.c: Likewise.
2633 * elfnn-ia64.c: Likewise.
2634 * elfxx-mips.c: Likewise.
2636 2017-04-13 Alan Modra <amodra@gmail.com>
2638 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
2639 branch veneers" error. Fix double space and format message.
2640 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
2641 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
2643 2017-04-13 Alan Modra <amodra@gmail.com>
2645 * bfd-in2.h: Regenerate.
2647 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
2649 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
2650 extra `\n' in warning/error messages.
2651 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
2652 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
2654 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
2656 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
2657 processor-specific properties with generic ELF target vector.
2659 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
2661 * elf32-sparc.c (elf_backend_fixup_symbol): New.
2662 * elf64-sparc.c (elf_backend_fixup_symbol): New.
2663 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
2664 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
2666 (link_hash_newfunc): Initialize has_got_reloc and
2668 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
2670 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
2672 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
2674 (_bfd_sparc_elf_fixup_symbol): New function.
2675 (allocate_dynrelocs): Don't allocate space for dynamic
2676 relocations and discard relocations against resolved undefined
2677 weak symbols in executable. Don't make resolved undefined weak
2678 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
2679 relocation against undefined weak symbols in PIE.
2680 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
2681 relocations against resolved undefined weak symbols in PIE
2682 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
2683 without ynamic PLT/GOT relocations for resolved undefined weak
2685 Don't generate dynamic relocation against resolved undefined
2686 weak symbol in executable.
2687 (pie_finish_undefweak_symbol): New function.
2688 (_bfd_sparc_elf_finish_dynamic_sections): Call
2689 pie_finish_undefweak_symbol on all symbols in PIE.
2690 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
2691 (_bfd_sparc_elf_fixup_symbol): New function.
2693 2017-04-10 Nick Clifton <nickc@redhat.com>
2695 * config.bfd: Remove ns32k from obsolete list.
2697 2017-04-10 Alan Modra <amodra@gmail.com>
2700 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
2701 (special_sections_i): Likewise for .init_array.
2702 (special_sections_p): Likewise for .preinit_array.
2704 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
2708 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
2709 ELF_COMMON_DEF_P for common symbols.
2710 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
2711 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
2712 * elflink.c (_bfd_elf_merge_symbol): Revert commits
2713 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
2714 07492f668d2173da7a2bda3707ff0985e0f460b6.
2716 2017-04-07 Pedro Alves <palves@redhat.com>
2718 * opncls.c (bfd_get_debug_link_info): Rename to...
2719 (bfd_get_debug_link_info_1): ... this. Change type of second
2720 parameter to void pointer. Adjust.
2721 (bfd_get_debug_link_info): Reimplement on top of
2722 bfd_get_debug_link_info_1.
2723 (separate_debug_file_exists, separate_alt_debug_file_exists):
2724 Change type of second parameter to void pointer. Adjust.
2725 (get_func_type, check_func_type): Change type of second parameter
2727 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
2728 the callback functions instead of passing the address of a local.
2729 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
2730 find_separate_debug_file.
2731 (get_alt_debug_link_info_shim): Change type of second parameter to
2732 void pointer. Adjust.
2733 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
2734 find_separate_debug_file.
2735 (get_build_id_name, bfd_boolean check_build_id_file): Change type
2736 of second parameter to void pointer. Adjust.
2737 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
2738 pointer local to find_separate_debug_file.
2740 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
2742 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
2743 external symbols with a definition.
2744 (_bfd_coff_gc_mark_extra_sections): Fix typo.
2746 2017-04-07 Alan Modra <amodra@gmail.com>
2748 * po/SRC-POTFILES.in: Regenerate.
2750 2017-04-05 Alan Modra <amodra@gmail.com>
2752 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
2755 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
2757 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
2758 numbers for DataDirectory entry indicies passed to
2761 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
2763 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
2764 each GNU_MBIND section and align GNU_MBIND section to page size.
2765 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
2766 segment for each GNU_MBIND section.
2767 (_bfd_elf_init_private_section_data): Copy sh_info from input
2768 for GNU_MBIND section.
2770 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
2772 * elfnn-riscv.c (GP_NAME): Delete.
2773 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
2774 (_bfd_riscv_relax_lui): Likewise.
2776 2017-04-04 Nick Clifton <nickc@redhat.com>
2779 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
2781 (bfd_elf_final_link): Only initialize the extended symbol index
2782 section if there are extended symbol tables to list.
2784 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
2786 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
2787 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
2788 * configure.ac (elf): Add elf-properties.lo.
2789 * Makefile.in: Regenerated.
2790 * configure: Likewise.
2791 * elf-bfd.h (elf_property_kind): New.
2792 (elf_property): Likewise.
2793 (elf_property_list): Likewise.
2794 (elf_properties): Likewise.
2795 (_bfd_elf_parse_gnu_properties): Likewise.
2796 (_bfd_elf_get_property): Likewise.
2797 (_bfd_elf_link_setup_gnu_properties): Likewise.
2798 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
2799 and setup_gnu_properties.
2800 (elf_obj_tdata): Add properties.
2801 * elf-properties.c: New file.
2802 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
2803 (elf_i386_merge_gnu_properties): Likewise.
2804 (elf_backend_parse_gnu_properties): Likewise.
2805 (elf_backend_merge_gnu_properties): Likewise.
2806 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
2807 (elf_x86_64_merge_gnu_properties): Likewise.
2808 (elf_backend_parse_gnu_properties): Likewise.
2809 (elf_backend_merge_gnu_properties): Likewise.
2810 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
2811 (elf_backend_parse_gnu_properties): Likewise.
2812 (elf_backend_setup_gnu_properties): Likewise.
2813 (elfNN_bed): Add elf_backend_parse_gnu_properties,
2814 elf_backend_merge_gnu_properties and
2815 elf_backend_setup_gnu_properties.
2817 2017-03-30 Pip Cet <pipcet@gmail.com>
2819 * elf32-wasm32.c: Add relocation code, two relocs.
2820 * reloc.c: Add wasm32 relocations.
2821 * libbfd.h: Regenerate.
2822 * bfd-in2.h: Regenerate.
2823 * bfd/po/bfd.pot: Regenerate.
2825 2017-03-29 Nick Clifton <nickc@redhat.com>
2828 * coff-bfd.h (struct coff_section_data): Add new fields:
2829 saved_bias and bias.
2830 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
2831 computed for PE binaries.
2832 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
2835 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
2838 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
2839 to handle a local symbol with a hash-symbol-entry; without PLT.
2840 Add BFD_ASSERT for an incidental case with GOT entry present.
2841 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
2842 isn't forced-or-set local.
2844 2017-03-27 Pip Cet <pipcet@gmail.com>
2846 * wasm-module.c: New file to support WebAssembly modules.
2847 * wasm-module.h: New file to support WebAssembly modules.
2848 * doc/webassembly.texi: Start documenting wasm-module.c.
2849 * config.bfd: Add wasm_vec.
2850 * targets.c: Likewise.
2851 * configure.ac: Likewise.
2852 * Makefile.am: Add entries for wasm-module.c.
2853 * Makefile.in: Regenerate.
2854 * configure: Regenerate.
2855 * po/SRC-POTFILES.in: Regenerate.
2857 2017-03-27 Pip Cet <pipcet@gmail.com>
2859 * cpu-wasm32.c: New file to support wasm32 architecture.
2860 * elf32-wasm32.c: New file to support wasm32 architecture.
2861 * Makefile.am: Add wasm32 architecture.
2862 * archures.c: Likewise.
2863 * config.bfd: Likewise.
2864 * configure.ac: Likewise.
2865 * targets.c: Likewise.
2866 * Makefile.in: Regenerate.
2867 * bfd-in2.h: Regenerate.
2868 * configure: Regenerate.
2869 * po/SRC-POTFILES.in: Regenerate.
2871 2017-03-20 Alan Modra <amodra@gmail.com>
2874 * elf64-ppc.c (compare_symbols): Stabilize sort.
2876 2017-03-18 Alan Modra <amodra@gmail.com>
2878 * elf64-ppc.c (struct ppc_link_hash_table): Add
2879 local_ifunc_resolver and maybe_local_ifunc_resolver.
2880 (ppc_build_one_stub): Set flags on emitting dynamic
2881 relocation to ifunc.
2882 (ppc64_elf_relocate_section): Likewise.
2883 (ppc64_elf_finish_dynamic_symbol): Likewise.
2884 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
2885 local dynamic relocs to ifuncs.
2886 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
2887 local_ifunc_resolver and maybe_local_ifunc_resolver.
2888 (ppc_elf_relocate_section): Set flag on emitting dynamic
2889 relocation to ifuncs.
2890 (ppc_elf_finish_dynamic_symbol): Likewise.
2891 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
2892 dynamic relocs to ifuncs.
2894 2017-03-13 Nick Clifton <nickc@redhat.com>
2897 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
2898 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
2899 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
2900 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
2901 * bfd-in2.h: Regenerate.
2902 * libbfd.h: Regenerate.
2903 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
2905 (IS_AARCH64_TLSDESC_RELOC): Likewise.
2906 (elfNN_aarch64_howto_table): Likewise.
2907 (aarch64_tls_transition_without_check): Likewise.
2908 (aarch64_reloc_got_type): Likewise.
2909 (elfNN_aarch64_final_link_relocate): Likewise.
2910 (elfNN_aarch64_tls_relax): Likewise.
2911 (elfNN_aarch64_relocate_section): Likewise.
2912 (elfNN_aarch64_gc_sweep_hook): Likewise.
2913 (elfNN_aarch64_check_relocs): Likewise.
2914 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
2915 (_bfd_aarch64_elf_resolve_relocation): Likewise.
2917 2017-03-11 Alan Modra <amodra@gmail.com>
2919 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
2920 parameter is in fact used. Whitespace fixes.
2921 * elf64-ppc.c: Likewise.
2923 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
2925 * rs6000-core.c (CORE_NEW): Simplify macro when
2926 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
2928 2017-03-07 Alan Modra <amodra@gmail.com>
2932 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
2935 2017-03-05 Alan Modra <amodra@gmail.com>
2937 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
2938 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
2939 (next_cie_fde_offset): New function.
2940 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
2941 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
2942 four bytes. Align CIEs to four or eight bytes depending on
2943 per_encoding_aligned8. Align FDEs according to their encoding.
2944 Pad last FDE to output section alignment.
2945 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
2947 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
2948 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
2949 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
2951 2017-03-02 Martin Bickel <binutils@ineranves.de>
2954 * elf.c (rewrite_elf_program_header): Do not issue a warning for
2955 empty segments which have a zero filesz, but a non-zero memsz.
2957 2017-03-02 Alan Modra <amodra@gmail.com>
2959 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
2961 2017-02-28 Alan Modra <amodra@gmail.com>
2963 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
2964 (ppc64_elf_relocate_section): Likewise.
2966 2017-02-28 Alan Modra <amodra@gmail.com>
2969 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
2970 rather than elf32_nios2_hash_table or elf_hash_table.
2971 (create_got_section): Likewise.
2972 (nios2_elf32_finish_dynamic_symbol): Likewise.
2973 (nios2_elf32_adjust_dynamic_symbol): Likewise.
2974 (nios2_elf32_size_dynamic_sections): Likewise.
2975 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
2976 vars. Use htab equivalents directly instead. Don't create
2977 all dynamic sections on needing just the GOT. Use a goto
2978 rather than a fall-through with reloc test. Ensure
2979 htab->dynobj is set when making dynamic sreloc section.
2980 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
2981 equivalent directly instead. Don't segfault on looking for
2982 .dynamic when dynamic sections have not been created. Don't
2983 segfault on .got.plt being discarded.
2984 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
2985 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
2986 fixme and another not so relevant comment.
2987 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
2988 already set, set hash table dynobj on creating .sbss.
2990 2017-02-28 Alan Modra <amodra@gmail.com>
2992 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
2993 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
2994 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
2995 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
2996 (ppc64_elf_relocate_section): Likewise.
2997 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
2998 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
2999 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
3000 * libbfd.h: Regenerate.
3001 * bfd-in2.h: Regenerate.
3003 2017-02-28 Alan Modra <amodra@gmail.com>
3005 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
3006 dynamic .data.rel.ro read-only.
3007 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
3008 rather than section flags when deciding where copy reloc goes.
3009 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
3010 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
3011 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
3012 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
3013 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
3014 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
3015 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
3016 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
3017 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3018 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
3019 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
3020 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
3021 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3022 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
3023 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
3024 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
3025 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
3026 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
3027 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
3029 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
3031 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
3032 `jalr $0, $25' instruction encoding.
3034 2017-02-27 Nick Clifton <nickc@redhat.com>
3037 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
3038 generating a seg-fault when encountering a symbol that has been
3039 deleted by garbage collection.
3041 2017-02-25 Alan Modra <amodra@gmail.com>
3043 * elf32-arc.c (struct dynamic_sections): Delete.
3044 (enum dyn_section_types): Delete.
3045 (dyn_section_names): Delete.
3046 (arc_create_dynamic_sections): Delete.
3047 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
3048 segfault on discarded .rela.plt section.
3049 (elf_arc_size_dynamic_sections): Formatting. Don't call
3050 arc_create_dynamic_sections. Don't allocate memory for sections
3051 handled by the generic linker. Correct code finding relocs in
3052 read-only sections. Set SEC_EXCLUDE on zero size .got,
3053 .got.plt, and .dynbss sections. Do set .interp for pies.
3055 2017-02-24 Andrew Waterman <andrew@sifive.com>
3057 * elfnn-riscv.c (GP_NAME): New macro.
3058 (riscv_global_pointer_value): Use it.
3059 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
3060 output section, consider only that section's alignment.
3062 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
3064 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
3065 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
3066 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
3067 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
3069 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
3071 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
3072 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
3075 2017-02-23 Alan Modra <amodra@gmail.com>
3078 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
3080 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
3081 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
3084 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
3087 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
3088 processing ahead of the call to `elf_gc_sweep_symbol'.
3090 2017-02-22 Nick Clifton <nickc@redhat.com>
3093 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
3094 created section 4-byte alignment.
3096 2017-02-22 Alan Modra <amodra@gmail.com>
3098 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
3099 on .got or .plt output section being discarded by script.
3100 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
3103 2017-02-21 Alan Modra <amodra@gmail.com>
3105 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
3106 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
3108 2017-02-20 Alan Modra <amodra@gmail.com>
3111 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
3112 if DT_RELSZ/DT_RELASZ is zero.
3114 2017-02-17 Nick Clifton <nickc@redhat.com>
3116 * compress.c (bfd_get_full_section_contents): Remember to reduce
3117 compressed size by the sizeof the compression header when
3118 decompressing the contents.
3120 2017-02-17 Pedro Alves <palves@redhat.com>
3122 * srec.c (Chunk): Rename to ...
3123 (_bfd_srec_len): ... this.
3124 (S3Forced): Rename to ...
3125 (_bfd_srec_forceS3): ... this.
3126 * objcopy.c: Adjust all references.
3128 2017-02-17 Pedro Alves <palves@redhat.com>
3130 * archive.c (bsd_write_armap): Rename to ...
3131 (_bfd_bsd_write_armap): ... this.
3132 (coff_write_armap): Rename to ...
3133 (_bfd_coff_write_armap): ... this.
3134 * libbfd-in.h (bsd_write_armap): Rename to ...
3135 (_bfd_bsd_write_armap): ... this.
3136 (coff_write_armap): Rename to ...
3137 (_bfd_coff_write_armap): ... this.
3138 * aout-target.h, aout-tic30.c: Adjust all users.
3139 * libbfd.h: Regenerate.
3141 2017-02-17 Pedro Alves <palves@redhat.com>
3143 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
3144 (warn_deprecated): Rename to ...
3145 (_bfd_warn_deprecated): ... this.
3146 * libbfd.c (warn_deprecated): Rename to ...
3147 (_bfd_warn_deprecated): ... this.
3148 * bfd-in2.h: Regenerate.
3150 2017-02-17 Pedro Alves <palves@redhat.com>
3152 * bfdio.c (real_ftell): Rename to ...
3153 (_bfd_real_ftell): ... this.
3154 (real_fseek): Rename to ...
3155 (_bfd_real_fseek): ... this.
3156 (real_fopen): Rename to ...
3157 (_bfd_real_fopen): ... this.
3158 * libbfd-in.h (real_ftell): Rename to ...
3159 (_bfd_real_ftell): ... this.
3160 (real_fseek): Rename to ...
3161 (_bfd_real_fseek): ... this.
3162 (real_fopen): Rename to ...
3163 (_bfd_real_fopen): ... this.
3164 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
3165 * libbfd.h: Regenerate.
3167 2017-02-17 Pedro Alves <palves@redhat.com>
3169 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
3170 * libbfd.c (read_unsigned_leb128): Rename to ...
3171 (_bfd_read_unsigned_leb128): ... this.
3172 (read_signed_leb128): Rename to ...
3173 (_bfd_read_signed_leb128): ... this.
3174 (safe_read_leb128): Rename to ...
3175 (_bfd_safe_read_leb128): ... this.
3176 * libbfd-in.h (read_unsigned_leb128): Rename to ...
3177 (_bfd_read_unsigned_leb128): ... this.
3178 (read_signed_leb128): Rename to ...
3179 (_bfd_read_signed_leb128): ... this.
3180 (safe_read_leb128): Rename to ...
3181 (_bfd_safe_read_leb128): ... this.
3182 * libbfd.h: Renegerate.
3184 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
3186 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
3187 before trying to fine matching file and line information.
3189 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
3191 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
3192 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
3193 not match current bfd, then reload debug information. Record bfd
3194 we're loading debug info for in the stash. If we have debug
3195 informatin in the cache then perform section placement before
3198 2017-02-16 Alan Modra <amodra@gmail.com>
3201 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
3202 * elfxx-target.h (elf_backend_no_page_alias): Define.
3203 (elfNN_bed): Init new field.
3204 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
3205 ensure PT_LOAD segment starts on a new page.
3206 * elf32-hppa.c (elf_backend_no_page_alias): Define.
3208 2017-02-16 Alan Modra <amodra@gmail.com>
3211 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
3214 2017-02-16 Jiong Wang <jiong.wang@arm.com>
3216 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
3217 * bfd-in2.h: Regenerated.
3219 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
3222 * elf32-i386.c (elf_i386_relocate_section): Allow
3223 "lea foo@GOT, %reg" in PIC.
3225 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
3228 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
3229 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
3230 error against local IFUNC symbol without a base register for
3233 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
3235 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
3236 `%P: %H:' with `info->callbacks->einfo'.
3237 (ppc_elf_relocate_section): Likewise.
3238 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
3239 (ppc64_elf_edit_toc): Likewise.
3240 (ppc64_elf_relocate_section): Likewise.
3242 2017-02-14 Alan Modra <amodra@gmail.com>
3244 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
3245 --gc-keep-exported, and test versioned field of sym rather than
3246 looking for @ in name.
3248 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
3250 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
3253 2017-02-13 Nick Clifton <nickc@redhat.com>
3256 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
3259 2017-02-07 Andrew Waterman <andrew@sifive.com>
3261 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
3262 entry size if PLT header is written.
3264 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
3266 Fix sparc64 dynamic relocation processing to use the dynamic
3268 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
3269 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
3272 2017-02-03 Nick Clifton <nickc@redhat.com>
3275 * coffcode.h (coff_write_object_contents): Enlarge size of
3276 s_name_buf in order to avoid compile time warning about possible
3278 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
3279 32-bits of insn value before printing into buffer.
3281 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3283 * elfxx-mips.c (mips_elf_hash_sort_data): Add
3284 `max_local_dynindx'.
3285 (mips_elf_sort_hash_table): Handle it.
3286 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
3287 symbols bump up `max_local_dynindx' rather than
3288 `max_non_got_dynindx'.
3290 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3292 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
3293 `min_got_dynindx', `max_unref_got_dynindx' and
3294 `max_non_got_dynindx' members to the `bfd_size_type' data type.
3295 (mips_elf_sort_hash_table): Adjust accordingly.
3297 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3299 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
3300 to access the hash table.
3302 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3304 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
3305 non-NULL `htab' to the beginning.
3307 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3309 * elflink.c (elf_gc_sweep): Wrap overlong line.
3311 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
3313 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
3314 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
3315 * elfxx-mips.c (mips_elf_link_hash_table): Add
3316 `ignore_branch_isa' member.
3317 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
3318 in branch relocation calculation as an error if
3319 `ignore_branch_isa' has been set.
3320 (_bfd_mips_elf_insn32): Rename to...
3321 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
3322 parameter to `insn32' and add an `ignore_branch_isa' parameter.
3323 Handle the new parameter.
3325 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
3327 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
3328 local variable dynobj.
3331 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
3332 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
3333 executable from read-only sections into sdynrelro.
3334 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
3335 dynamic relocs in sdynrelro.
3336 (elf_backend_want_dynrelro): Define.
3338 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
3340 * config.bfd (*-*-rtemsaout*): Mark as removed.
3342 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
3344 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
3345 (arm-*-rtems*): Move to (arm*-*-eabi*).
3346 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
3347 (m68-*-rtems*): Move to (m68*-*-elf*).
3349 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
3351 * config.bfd (*-*-rtemscoff*): Mark as removed.
3353 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
3356 * elflink.c (bfd_elf_record_link_assignment): Revert last
3357 change and don't ever clear `forced_local'. Set `mark'
3359 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
3361 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
3362 (bfd_elf_size_dynamic_sections): ... here.
3363 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
3364 and set `mark' instead in `__tls_get_addr_opt' processing.
3365 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
3367 2017-01-24 Alan Modra <amodra@gmail.com>
3369 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
3370 where dynamic relocs are preferable. Allow ifunc too.
3371 (ensure_undefweak_dynamic): New function.
3372 (allocate_dynrelocs): Use it here. Move plt handling last and
3373 don't make symbols dynamic, simplifying loop. Only make undef
3374 weak symbols with GOT entries dynamic. Correct condition
3375 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
3376 comments. Remove goto.
3377 (ppc_elf_relocate_section): Correct test for using dynamic
3378 symbol on GOT relocs. Rearrange test for emitting GOT relocs
3379 to suit. Set up explicit tls_index entries and implicit GOT
3380 tls_index entries resolvable at link time for
3381 __tls_get_addr_opt. Simplify test to clear mem for prelink.
3382 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
3383 (ensure_undefweak_dynamic): New function.
3384 (allocate_dynrelocs): Use it here. Only make undef weak symbols
3385 with GOT entries dynamic. Remove unnecessary test of
3386 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
3387 (ppc64_elf_relocate_section): Correct test for using dynamic
3388 symbol on GOT relocs. Rearrange test for emitting GOT relocs
3389 to suit. Set up explicit tls_index entries and implicit GOT
3390 tls_index entries resolvable at link time for __tls_get_addr_opt.
3391 Simplify expression to clear mem for prelink.
3393 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
3395 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
3397 2017-01-20 Jiong Wang <jiong.wang@arm.com>
3399 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
3400 (elf_backend_hash_symbol): Define.
3402 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
3405 * elflink.c (bfd_elf_record_link_assignment): Clear any
3406 `forced_local' marking for DSO symbols that are not being
3409 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
3411 * elfnn-riscv.c (riscv_elf_object_p): New function.
3413 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
3416 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
3418 (elf_x86_64_check_relocs): Create .eh_frame section for the
3420 (elf_x86_64_size_dynamic_sections): Allocate and initialize
3421 .eh_frame section for the .plt.bnd section.
3422 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
3423 for the .plt.bnd section.
3425 2017-01-12 Nick Clifton <nickc@redhat.com>
3428 * opncls.c (find_separate_debug_file): Add include_dirs
3429 parameter. Only include the directory part of the bfd's filename
3430 in search paths if include_dirs is true. Add a couple of extra
3431 locations for looking for debug files.
3432 ( bfd_follow_gnu_debuglink): Update invocation of
3433 find_separate_debug_file.
3434 (bfd_follow_gnu_debugaltlink): Likewise.
3435 (get_build_id): New function: Finds the build-id of the given bfd.
3436 (get_build_id_name): New function: Computes the name of the
3437 separate debug info file for a bfd, based upon its build-id.
3438 (check_build_id_file): New function: Checks to see if a separate
3439 debug info file exists at the given location, and that its
3440 build-id matches that of the original bfd.
3441 (bfd_follow_build_id_debuglink): New function: Finds a separate
3442 debug info file for a given bfd by using the build-id method.
3443 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
3444 method of locating a separate debug info file before using the
3446 * bfd-in2.h: Regenerate.
3448 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
3451 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
3452 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
3453 elf_x86_64_eh_frame_plt_got.
3454 (elf_x86_64_size_dynamic_sections): Get unwind info from
3455 elf_x86_64_bnd_arch_bed for the BND PLT.
3457 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
3459 * config.bfd: Add entries for i686-redox and x86_64-redox.
3461 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
3463 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
3465 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
3466 .eh_frame section to 4 bytes for x32.
3467 (elf_x86_64_check_relocs): Likewise.
3469 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
3472 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
3473 (PLT_GOT_FDE_LENGTH): Likewise.
3474 (elf_i386_plt_layout): Add eh_frame_plt_got and
3475 eh_frame_plt_got_size.
3476 (elf_i386_plt): Updated.
3477 (elf_i386_link_hash_table): Add plt_got_eh_frame.
3478 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
3479 (elf_i386_size_dynamic_sections): Allocate and initialize
3480 .eh_frame section for .plt.got.
3481 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
3483 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
3484 eh_frame_plt_got_size.
3485 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
3486 (PLT_GOT_FDE_LENGTH): Likewise.
3487 (elf_x86_64_backend_data): Add eh_frame_plt_got and
3488 eh_frame_plt_got_size.
3489 (elf_x86_64_arch_bed): Updated.
3490 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
3491 eh_frame_plt_got_size.
3492 (elf_x86_64_nacl_arch_bed): Likewise.
3493 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
3494 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
3495 (elf_x86_64_size_dynamic_sections): Allocate and initialize
3496 .eh_frame section for .plt.got.
3497 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
3500 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
3502 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
3503 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
3505 2017-01-09 Nick Clifton <nickc@redhat.com>
3507 * dwarf2.c (lookup_address_in_function_table): Return early if
3508 there are no functions in the given comp unit, or if the high
3509 address of the last function in the comp unit is less than the
3512 2017-01-09 Nick Clifton <nickc@redhat.com>
3515 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
3516 message if there are too many symbols to load.
3518 2017-01-04 James Clarke <jrtc27@jrtc27.com>
3520 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
3521 if relocs are cached.
3523 2017-01-03 Rich Felker <bugdal@aerifal.cx>
3526 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
3527 for R_MICROBLAZE_GOTOFF_64.
3529 2017-01-03 Nick Clifton <nickc@redhat.com>
3531 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
3532 warning about using a possibly uninitialised variable.
3534 2017-01-02 Alan Modra <amodra@gmail.com>
3536 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
3537 (allocate_plt_static, allocate_dynrelocs): Use it.
3539 2017-01-02 Alan Modra <amodra@gmail.com>
3541 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
3542 .PARISC.unwind section.
3544 2017-01-02 Alan Modra <amodra@gmail.com>
3547 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
3548 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
3549 indirect to GOT pointer relative code edit.
3551 2017-01-02 Alan Modra <amodra@gmail.com>
3553 Update year range in copyright notice of all files.
3555 For older changes see ChangeLog-2016
3557 Copyright (C) 2017 Free Software Foundation, Inc.
3559 Copying and distribution of this file, with or without modification,
3560 are permitted in any medium without royalty provided the copyright
3561 notice and this notice are preserved.
3567 version-control: never