1 2017-08-31 Alan Modra <amodra@gmail.com>
3 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Don't exit early
4 for a section containing just a terminator. Allow multiple
5 terminators at end of section.
6 * elflink.c (bfd_elf_discard_info): Iterate over .eh_frame
7 sections when not adding alignment. Assert on terminator in
10 2017-08-31 Alan Modra <amodra@gmail.com>
14 * elflink.c (bfd_elf_discard_info): Don't pad embedded zero
17 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
19 * configure.ac (bfd_backends): Add elf64.lo together with
20 elfxx-x86.lo for 64-bit BFD.
21 * configure: Regenerated.
23 2017-08-31 James Bowman <james.bowman@ftdichip.com>
25 * elf32-ft32.c (ft32_elf_howto_table): Use complain_overflow_dont
28 2017-08-31 Alan Modra <amodra@gmail.com>
31 * opncls.c (bfd_close_all_done): Don't call bfd_cache_close
32 before _close_and_cleanup. Call iovec->bclose after.
33 (bfd_close): Remove code common to, and call, bfd_close_all_done.
35 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
37 * elf32-i386.c (elf_i386_plt_type): Removed.
38 (elf_i386_plt): Likewise.
39 (elf_i386_get_synthetic_symtab): Updated. Call
40 _bfd_x86_elf_get_synthetic_symtab.
41 * elf64-x86-64.c (elf_x86_64_plt_type): Removed.
42 (elf_x86_64_plt): Likewise.
43 (elf_x86_64_get_synthetic_symtab): Updated. Call
44 _bfd_x86_elf_get_synthetic_symtab.
45 * elfxx-x86.c (elf_i386_get_plt_got_vma): New function.
46 (elf_x86_64_get_plt_got_vma): Likewise.
47 (elf_i386_valid_plt_reloc_p): Likewise.
48 (elf_x86_64_valid_plt_reloc_p): Likewise.
49 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
50 * elfxx-x86.h (elf_x86_plt_type): New.
51 (elf_x86_plt): Likewise.
52 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
54 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
56 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Check
57 target_id instead of elf_machine_code.
59 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
61 * elf32-i386.c (ELF_DYNAMIC_INTERPRETER): Removed.
62 (elf_i386_lazy_plt_layout): Likewise.
63 (elf_i386_non_lazy_plt_layout): Likewise.
64 (elf_i386_plt_layout): Likewise.
65 (elf_i386_link_hash_table): Likewise.
66 (elf_i386_next_tls_desc_index): Likewise.
67 (elf_i386_srelplt2): Likewise.
68 (elf_i386_plt): Likewise.
69 (elf_i386_lazy_plt): Likewise.
70 (elf_i386_non_lazy_plt): Likewise.
71 (elf_i386_link_hash_table_create): Likewise.
72 (bfd_elf32_bfd_link_hash_table_create): Likewise.
73 (elf_i386_lazy_plt): Updated.
74 (elf_i386_non_lazy_plt): Likewise.
75 (elf_i386_lazy_ibt_plt): Likewise.
76 (elf_i386_non_lazy_ibt_plt): Likewise.
77 (elf_i386_allocate_dynrelocs): Likewise.
78 (elf_i386_size_dynamic_sections): Likewise.
79 (elf_i386_relocate_section): Likewise.
80 (elf_i386_finish_dynamic_symbol): Likewise.
81 (elf_i386_finish_dynamic_sections): Likewise.
82 (elf_i386_get_synthetic_symtab): Likewise.
83 (elf_i386_link_setup_gnu_properties): Likewise.
84 (elf_i386_nacl_plt): Likewise.
85 * elf64-x86-64.c (ABI_64_P): Removed.
86 (ELF64_DYNAMIC_INTERPRETER): Likewise.
87 (ELF32_DYNAMIC_INTERPRETER): Likewise.
88 (elf_x86_64_lazy_plt_layout): Likewise.
89 (elf_x86_64_non_lazy_plt_layout): Likewise.
90 (elf_x86_64_plt_layout): Likewise.
91 (elf_x86_64_link_hash_table): Likewise.
92 (elf_x86_64_plt): Likewise.
93 (elf_x86_64_lazy_plt): Likewise.
94 (elf_x86_64_non_lazy_plt): Likewise.
95 (elf_x86_64_link_hash_table_create): Likewise.
96 (bfd_elf64_bfd_link_hash_table_create): Likewise.
97 (bfd_elf32_bfd_link_hash_table_create): Likewise.
98 (elf_x86_64_lazy_plt): Updated.
99 (elf_x86_64_non_lazy_plt): Likewise.
100 (elf_x86_64_lazy_bnd_plt): Likewise.
101 (elf_x86_64_non_lazy_bnd_plt): Likewise.
102 (elf_x86_64_lazy_ibt_plt): Likewise.
103 (elf_x32_lazy_ibt_plt): Likewise.
104 (elf_x86_64_non_lazy_ibt_plt): Likewise.
105 (elf_x32_non_lazy_ibt_plt): Likewise.
106 (elf_x86_64_allocate_dynrelocs): Likewise.
107 (elf_x86_64_size_dynamic_sections): Likewise.
108 (elf_x86_64_relocate_section): Likewise.
109 (elf_x86_64_finish_dynamic_symbol): Likewise.
110 (elf_x86_64_finish_dynamic_sections): Likewise.
111 (elf_x86_64_get_synthetic_symtab): Likewise.
112 (elf_x86_64_link_setup_gnu_properties): Likewise.
113 (elf_x86_64_nacl_plt): Likewise.
114 * elfxx-x86.c: Include "objalloc.h", "elf/i386.h" and
116 (ELF32_DYNAMIC_INTERPRETER): New.
117 (ELF64_DYNAMIC_INTERPRETER): Likewise.
118 (ELFX32_DYNAMIC_INTERPRETER): Likewise.
119 (_bfd_x86_elf_link_hash_table_create): Likewise.
120 (_bfd_x86_elf_link_hash_table_free): Renamed to ...
121 (elf_x86_link_hash_table_free): This. Make it static.
122 * elfxx-x86.h: Don't include "objalloc.h".
124 (elf_x86_lazy_plt_layout): Likewise.
125 (elf_x86_non_lazy_plt_layout): Likewise.
126 (elf_x86_plt_layout): Likewise.
127 (_bfd_x86_elf_link_hash_table_create): Likewise.
128 (bfd_elf64_bfd_link_hash_table_create): Likewise.
129 (bfd_elf32_bfd_link_hash_table_create): Likewise.
130 (elf_x86_link_hash_table): Add plt, lazy_plt, non_lazy_plt,
131 srelplt2 and next_tls_desc_index.
132 (_bfd_x86_elf_link_hash_table_free): Removed.
134 2017-08-30 Maciej W. Rozycki <macro@imgtec.com>
136 * elfxx-mips.c (mips_elf_perform_relocation): Correct microMIPS
137 branch offset interpretation.
139 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
142 * opncls.c (bfd_close_all_done): Call _close_and_cleanup.
144 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
146 * elf64-x86-64.c (elf_x86_64_next_tls_desc_index): Removed.
147 (elf_x86_64_srelplt2): Likewise.
149 2017-08-30 Alan Modra <amodra@gmail.com>
151 * elf64-ppc.c (struct ppc_link_hash_table): Add do_tls_opt.
152 (ppc64_elf_tls_optimize): Set it.
153 (ppc64_elf_relocate_section): Nop addis on TPREL16_HA, and convert
154 insn on TPREL16_LO and TPREL16_LO_DS relocs to use r13 when
155 addis would add zero.
156 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add do_tls_opt.
157 (ppc_elf_tls_optimize): Set it.
158 (ppc_elf_relocate_section): Nop addis on TPREL16_HA, and convert
159 insn on TPREL16_LO relocs to use r2 when addis would add zero.
161 2017-08-30 Alan Modra <amodra@gmail.com>
163 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing
164 __tls_get_addr call sequences to LE, don't move the addi down
165 to the nop. Replace the bl with addi and leave the nop alone.
167 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
169 * elf32-i386.c (elf_i386_pie_finish_undefweak_symbol):
171 * elf64-x86-64.c (elf_x86_64_finish_local_dynamic_symbol):
173 (elf_x86_64_pie_finish_undefweak_symbol): Likewise.
175 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
177 * Makefile.am (BFD32_BACKENDS): Add elfxx-x86.lo.
178 (BFD64_BACKENDS): Likewise.
179 (BFD32_BACKENDS_CFILES): Add elfxx-x86.c.
180 (BFD64_BACKENDS_CFILES): Likewise.
181 * Makefile.in: Regenerated.
182 * configure.ac (bfd_backends): Add elfxx-x86.lo together with
183 elf32-i386.lo and elf64-x86-64.lo.
184 * configure: Regenerated.
185 * elf32-i386.c: Include "elfxx-x86.h" instead of "sysdep.h",
186 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
187 "objalloc.h" and "hashtab.h".
188 (ELIMINATE_COPY_RELOCS): Removed.
189 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
190 (SYMBOL_NO_COPYRELOC): Likewise.
191 (elf_i386_link_hash_entry): Likewise.
192 (GOT_UNKNOWN): Likewise.
193 (GOT_NORMAL): Likewise.
194 (GOT_TLS_GD): Likewise.
195 (elf_i386_hash_entry): Likewise.
196 (elf_i386_obj_tdata): Likewise.
197 (elf_i386_tdata): Likewise.
198 (elf_i386_local_got_tls_type): Likewise.
199 (elf_i386_local_tlsdesc_gotent): Likewise.
200 (elf_i386_hash_table): Likewise.
201 (elf_i386_link_hash_newfunc): Likewise.
202 (elf_i386_local_htab_hash): Likewise.
203 (elf_i386_local_htab_eq): Likewise.
204 (elf_i386_get_local_sym_hash): Likewise.
205 (elf_i386_link_hash_table_free): Likewise.
206 (elf_i386_copy_indirect_symbol): Likewise.
207 (elf_i386_fixup_symbol): Likewise.
208 (elf_i386_readonly_dynrelocs): Likewise.
209 (elf_i386_always_size_sections): Likewise.
210 (elf_i386_set_tls_module_base): Likewise.
211 (elf_i386_dtpoff_base): Likewise.
212 (compare_relocs): Likewise.
213 (elf_i386_hash_symbol): Likewise.
214 (elf_i386_parse_gnu_properties): Likewise.
215 (elf_i386_merge_gnu_properties): Likewise.
216 (elf_i386_link_check_relocs): Likewise.
217 (elf_i386_merge_symbol_attribute): Likewise.
218 (bfd_elf32_bfd_link_check_relocs): Likewise.
219 (elf_backend_copy_indirect_symbol): Likewise.
220 (elf_backend_always_size_sections): Likewise.
221 (elf_backend_omit_section_dynsym): Likewise.
222 (elf_backend_hash_symbol): Likewise.
223 (elf_backend_fixup_symbol): Likewise.
224 (elf_backend_parse_gnu_properties): Likewise.
225 (elf_backend_merge_gnu_properties): Likewise.
226 (elf_backend_merge_symbol_attribute): Likewise.
227 (elf_i386_mkobject): Updated.
228 (elf_i386_link_hash_table_create): Likewise.
229 (elf_i386_check_tls_transition): Likewise.
230 (elf_i386_tls_transition): Likewise.
231 (elf_i386_convert_load_reloc): Likewise.
232 (elf_i386_check_relocs): Likewise.
233 (elf_i386_adjust_dynamic_symbol): Likewise.
234 (elf_i386_allocate_dynrelocs): Likewise.
235 (elf_i386_convert_load): Likewise.
236 (elf_i386_size_dynamic_sections): Likewise.
237 (elf_i386_relocate_section): Likewise.
238 (elf_i386_finish_dynamic_symbol ): Likewise.
239 (elf_i386_finish_dynamic_sections): Likewise.
240 (elf_i386_output_arch_local_syms): Likewise.
241 (elf_i386_get_synthetic_symtab): Likewise.
242 (elf_i386_link_setup_gnu_properties): Likewise.
243 (elf_i386_link_hash_table): Use elf_x86_link_hash_table, instead
244 of elf_link_hash_table, as base.
245 (elf_i386_next_tls_desc_index): New.
246 (elf_i386_srelplt2): Likewise.
247 (elf_i386_plt): Likewise.
248 (elf_i386_lazy_plt): Likewise.
249 (elf_i386_non_lazy_plt): Likewise.
250 * elf32-x86-64.c: Include "elfxx-x86.h" instead of "sysdep.h",
251 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
252 "objalloc.h" and "hashtab.h".
253 (ELIMINATE_COPY_RELOCS): Removed.
254 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
255 (SYMBOL_NO_COPYRELOC): Likewise.
256 (elf_x86_64_link_hash_entry): Likewise.
257 (GOT_UNKNOWN): Likewise.
258 (GOT_NORMAL): Likewise.
259 (GOT_TLS_GD): Likewise.
260 (elf_x86_64_hash_entry): Likewise.
261 (elf_x86_64_obj_tdata): Likewise.
262 (elf_x86_64_tdata): Likewise.
263 (elf_x86_64_local_got_tls_type): Likewise.
264 (elf_x86_64_local_tlsdesc_gotent): Likewise.
265 (elf_x86_64_hash_table): Likewise.
266 (elf_x86_64_link_hash_newfunc): Likewise.
267 (elf_x86_64_local_htab_hash): Likewise.
268 (elf_x86_64_local_htab_eq): Likewise.
269 (elf_x86_64_get_local_sym_hash): Likewise.
270 (elf_x86_64_link_hash_table_free): Likewise.
271 (elf_x86_64_copy_indirect_symbol): Likewise.
272 (elf_x86_64_fixup_symbol): Likewise.
273 (elf_x86_64_readonly_dynrelocs): Likewise.
274 (elf_x86_64_always_size_sections): Likewise.
275 (elf_x86_64_set_tls_module_base): Likewise.
276 (elf_x86_64_dtpoff_base): Likewise.
277 (compare_relocs): Likewise.
278 (elf_x86_64_merge_symbol_attribute): Likewise.
279 (elf_x86_64_hash_symbol): Likewise.
280 (elf_x86_64_parse_gnu_properties): Likewise.
281 (elf_x86_64_merge_gnu_properties): Likewise.
282 (elf_x86_64_link_check_relocs): Likewise.
283 (elf_backend_copy_indirect_symbol): Likewise.
284 (elf_backend_always_size_sections): Likewise.
285 (bfd_elf64_bfd_link_check_relocs): Likewise.
286 (elf_backend_merge_symbol_attribute): Likewise.
287 (elf_backend_hash_symbol): Likewise.
288 (elf_backend_omit_section_dynsym): Likewise.
289 (elf_backend_fixup_symbol): Likewise.
290 (elf_backend_parse_gnu_properties): Likewise.
291 (elf_backend_merge_gnu_properties): Likewise.
292 (bfd_elf32_bfd_link_check_relocs): Likewise.
293 (elf_x86_64_mkobject): Updated.
294 (elf_x86_64_link_hash_table_create): Likewise.
295 (elf_x86_64_check_tls_transition): Likewise.
296 (elf_x86_64_tls_transition): Likewise.
297 (elf_x86_64_convert_load_reloc): Likewise.
298 (elf_x86_64_check_relocs): Likewise.
299 (elf_x86_64_adjust_dynamic_symbol): Likewise.
300 (elf_x86_64_allocate_dynrelocs): Likewise.
301 (elf_x86_64_convert_load): Likewise.
302 (elf_x86_64_size_dynamic_sections): Likewise.
303 (elf_x86_64_relocate_section): Likewise.
304 (elf_x86_64_finish_dynamic_symbol ): Likewise.
305 (elf_x86_64_finish_dynamic_sections): Likewise.
306 (elf_x86_64_output_arch_local_syms): Likewise.
307 (elf_x86_64_get_synthetic_symtab): Likewise.
308 (elf_x86_64_link_setup_gnu_properties): Likewise.
309 (elf_x86_64_link_hash_table): Use elf_x86_link_hash_table,
310 instead of elf_link_hash_table, as base.
311 (elf_x86_64_next_tls_desc_index): New.
312 (elf_x86_64_srelplt2): Likewise.
313 (elf_x86_64_plt): Likewise.
314 (elf_x86_64_lazy_plt): Likewise.
315 (elf_x86_64_non_lazy_plt): Likewise.
316 * elfxx-x86.c: New file.
317 * elfxx-x86.h: Likewise.
319 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
321 * elf32-i386.c (elf_i386_get_synthetic_symtab): Simplify bad
323 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
325 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
327 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check valid PLT
328 sections before checking dynamic relocations and free invalid
329 PLT section contents.
330 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
332 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
334 * elf-bfd.h (_bfd_elf_ifunc_get_synthetic_symtab): Removed.
335 * elf-ifunc.c (_bfd_elf_ifunc_get_synthetic_symtab): Likewise.
337 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
340 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check for valid
342 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
344 2017-08-27 H.J. Lu <hongjiu.lu@intel.com>
346 * elf32-i386.c (elf_i386_link_hash_newfunc): Initialize
348 * elf64-x86-64.c (elf_x86_64_link_hash_newfunc): Likewise.
350 2017-08-26 H.J. Lu <hongjiu.lu@intel.com>
353 * elf-bfd.h (elf_obj_tdata): Use ENUM_BITFIELD on object_id,
354 dyn_lib_class and has_gnu_symbols. Change bad_symtab to bitfield.
355 Add a has_no_copy_on_protected bitfield.
356 (elf_has_no_copy_on_protected): New.
357 * elf-properties.c (_bfd_elf_parse_gnu_properties): Set
358 elf_has_no_copy_on_protected for GNU_PROPERTY_NO_COPY_ON_PROTECTED.
359 (elf_merge_gnu_property_list): Likewise.
360 (_bfd_elf_link_setup_gnu_properties): Set extern_protected_data
361 to FALSE for elf_has_no_copy_on_protected.
362 * elf32-i386.c (SYMBOL_NO_COPYRELOC): New.
363 (elf_i386_link_hash_entry): Add def_protected.
364 (elf_i386_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
365 when checking info->nocopyreloc.
366 (elf_i386_link_setup_gnu_properties): Don't set
367 extern_protected_data here.
368 (elf_i386_merge_symbol_attribute): New function.
369 (elf_backend_merge_symbol_attribute): New.
370 * elf64-x86-64.c (SYMBOL_NO_COPYRELOC): New.
371 (elf_x86_64_link_hash_entry): Add def_protected.
372 (elf_x86_64_need_pic): Report protected symbol for def_protected.
373 (elf_x86_64_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
374 when checking info->nocopyreloc.
375 (elf_x86_64_relocate_section): Also check for R_X86_64_PC32
376 relocation run-time overflow and unresolvable R_X86_64_32S
377 relocation against protected data symbol defined in shared object
378 with GNU_PROPERTY_NO_COPY_ON_PROTECTED.
379 (elf_x86_64_link_setup_gnu_properties): Don't set
380 extern_protected_data here.
381 (elf_x86_64_merge_symbol_attribute): New function.
382 (elf_backend_merge_symbol_attribute): New.
384 2017-08-26 Alan Modra <amodra@gmail.com>
386 * elf32-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
387 (ppc_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
388 (ppc_elf_relocate_section): Comment fix.
389 * elf64-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
390 (ppc64_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
391 Support dynamic relocs for TPREL16 when non-pic too.
392 (dec_dynrel_count): Adjust TPREL16 handling as per check_relocs.
393 (ppc64_elf_relocate_section): Support dynamic relocs for TPREL16
396 2017-08-25 H.J. Lu <hongjiu.lu@intel.com>
398 * elf32-i386.c (elf_i386_link_hash_entry): Remove redundant
399 "symbol" in comments.
400 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Likewise.
402 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
405 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for
406 R_X86_64_PC32 relocation run-time overflow and unresolvable
407 R_X86_64_32S relocation with -z nocopyreloc.
409 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
411 * elf32-i386.c (elf_i386_check_relocs): Revert the last change.
412 Undefined symbols may not have a type.
413 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
415 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
417 * elf64-x86-64.c (elf_x86_64_need_pic): Add an argument for
418 bfd_link_info. Report shared, PIE or PDE object based on
420 (elf_x86_64_check_relocs): Update elf_x86_64_need_pic call.
421 (elf_x86_64_relocate_section): Likewise.
423 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
425 * elf32-i386.c (elf_i386_check_relocs): Increment PLT count only
426 for function symbols.
427 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
429 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
431 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set
432 extern_protected_data to FALSE if GNU_PROPERTY_NO_COPY_ON_PROTECTED
433 is set on any input relocatable file.
434 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
436 2017-08-23 Alan Modra <amodra@gmail.com>
439 * elf64-ppc.c (ensure_undef_dynamic): Rename from
440 ensure_undefweak_dynamic. Handle undefined too.
441 * elf32-ppc.c (ensure_undef_dynamic): Likewise.
442 * elf32-hppa.c (ensure_undef_dynamic): Likewise.
443 (allocate_dynrelocs): Discard undefined non-default visibility
444 relocs first. Make undefined syms dynamic. Tidy goto.
446 2017-08-21 Alan Modra <amodra@gmail.com>
447 H.J. Lu <hongjiu.lu@intel.com>
450 * elf-bfd.h (SYMBOLIC_BIND): Return TRUE for __start/__stop symbols.
451 * elflink.c (bfd_elf_define_start_stop): Rewrite.
453 2017-08-21 Hans-Peter Nilsson <hp@bitrange.com>
456 * elf64-mmix.c (mmix_elf_relax_section): Correct handling of
457 undefined weak symbols.
459 2017-08-18 Nick Clifton <nickc@redhat.com>
462 * tekhex.c (getsym): Fix check for source pointer walking off the
463 end of the input buffer.
465 2017-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
468 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Skip IFUNC
469 relocations in debug sections, change abort to _bfd_error_handler.
471 2017-08-14 Nick Clifton <nickc@redhat.com>
474 * elf.c (setup_group): Check for an empty or very small group
476 * po/bfd.pot: Regenerate.
478 2017-08-14 Alan Modra <amodra@gmail.com>
481 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't add
482 alignment padding here.
483 * elflink.c (bfd_elf_discard_info): Add .eh_frame padding here
484 in a reverse pass over sections.
486 2017-08-11 H.J. Lu <hongjiu.lu@intel.com>
489 * elf32-i386.c (elf_i386_get_synthetic_symtab): Allocate space
490 for @plt suffixes first.
491 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
493 2017-08-08 Nick Clifton <nickc@redhat.com>
496 * elf-attrs.c (_bfd_elf_parse_attributes): Complain about very
497 small section lengths.
498 * elf.c (_bfd_elf_setup_sections): Skip empty entries in the group
500 (elfcore_grok_freebsd_prstatus): Add checks to make sure that
501 there is enough data present in the note.
503 2017-08-08 Alan Modra <amodra@gmail.com>
506 * elf32-microblaze.c (microblaze_elf_check_relocs): Don't bump
507 got.refcount for GOTOFF relocs, just create .got section.
509 2017-08-07 H.J. Lu <hongjiu.lu@intel.com>
511 * elflink.c (elf_link_add_object_symbols): Move common symbol
512 check after bed->common_definition.
514 2017-08-07 Alan Modra <amodra@gmail.com>
517 * elflink.c (bfd_elf_final_link): Don't segfault when sections
518 needed to define various dynamic tags have been discarded.
520 2017-08-07 Nick Clifton <nickc@redhat.com>
523 * elf32-i386.c (elf_i386_link_setup_gnu_properties): If the dynobj
524 has not been set then use the bfd returned by
525 _bfd_elf_link_setup_gnu_properties. If that is null then search
526 through all the input bfds selecting the first normal, ELF format
528 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
530 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
532 * elf32-i386.c (elf_i386_link_hash_entry): Change tls_get_addr
534 (elf_i386_link_hash_newfunc): Initialize tls_get_addr to 0.
535 (elf_i386_check_tls_transition): Check tls_get_addr directly.
536 (elf_i386_convert_load_reloc): Update tls_get_addr check.
537 (elf_i386_link_check_relocs): New function.
538 (bfd_elf32_bfd_link_check_relocs): New.
539 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Change tls_get_addr
541 (elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 0.
542 (elf_x86_64_check_tls_transition): Check tls_get_addr directly.
543 (elf_x86_64_convert_load_reloc): Update tls_get_addr check.
544 (elf_x86_64_link_check_relocs): New function.
545 (bfd_elf64_bfd_link_check_relocs): New.
546 (bfd_elf32_bfd_link_check_relocs): Likewise.
548 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
551 * elflink.c (elf_link_add_object_symbols): Treat common symbol
552 as undefined for --no-define-common.
554 2017-08-05 Alan Modra <amodra@gmail.com>
556 * elf32-hppa.c (elf32_hppa_set_gp): Don't require an
557 hppa_link_hash_table.
559 2017-08-02 Max Filippov <jcmvbkbc@gmail.com>
561 * xtensa-isa.c (xtensa_isa_init): Don't update lookup table
562 entries for sysregs with negative indices.
564 2017-08-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
566 * elf32-s390.c (elf_s390_finish_dynamic_sections): Skip if it
567 isn't the S/390 specific elf data.
568 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
570 2017-07-31 Kuan-Lin Chen <rufus@andestech.com>
572 * elfxx-riscv.c (riscv_elf_add_sub_reloc): New function.
573 * (howto_table) [R_RISCV_ADD8]: Use riscv_elf_add_sub_reloc.
574 [R_RISCV_ADD16]: Likewise.
575 [R_RISCV_ADD32]: Likewise.
576 [R_RISCV_ADD64]: Likewise.
577 [R_RISCV_SUB6]: Likewise.
578 [R_RISCV_SUB8]: Likewise.
579 [R_RISCV_SUB16]: Likewise.
580 [R_RISCV_SUB32]: Likewise.
581 [R_RISCV_SUB64]: Likewise.
583 2017-07-31 Alan Modra <amodra@gmail.com>
585 * elf64-ppc.c (ppc64_elf_tls_setup): Warn on --plt-localentry
586 without ld.so checks.
588 2017-07-29 Alan Modra <amodra@gmail.com>
591 * elf64-ppc.c (struct ppc_link_hash_entry): Add non_zero_localentry.
592 (ppc64_elf_merge_symbol): Set non_zero_localentry.
593 (is_elfv2_localentry0): Test non_zero_localentry.
594 (ppc64_elf_tls_setup): Default to --no-plt-localentry.
596 2017-07-28 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
598 * elf32-s390.c (elf_s390_finish_dynamic_sections): Add NULL
599 pointer check for htab->elf.irelplt.
600 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
602 2017-07-27 Nick Clifton <nickc@redhat.com>
605 * mach-o.c (bfd_mach_o_read_symtab_strtab): Fail if the symtab
607 * nlmcode.h (nlm_swap_auxiliary_headers_in): Replace assertion
609 * section.c (bfd_make_section_with_flags): Fail if the name or bfd
611 * vms-alpha.c (bfd_make_section_with_flags): Correct computation
613 (evax_bfd_print_emh): Check for invalid string lengths.
615 2017-07-25 Nick Clifton <nickc@redhat.com>
617 * po/fr.po: Updated French translation.
619 2017-07-25 Benjamin Green <bengreen5mx@gmail.com>
622 * elf32-msp430.c (msp430_elf_relax_section): Allow conversion of
623 16-bit absolute branches into 10-bit pc-relative branches on the
624 MSP430 as well as the MSP430X.
626 2017-07-25 Alan Modra <amodra@gmail.com>
628 * elf64-ppc.c (struct map_stub): Add tls_get_addr_opt_bctrl.
629 (stub_eh_frame_size): New function.
630 (ppc_size_one_stub): Set group tls_get_addr_opt_bctrl.
631 (group_sections): Init group tls_get_addr_opt_bctrl.
632 (ppc64_elf_size_stubs): Update sizing and initialization of
633 .eh_frame. Iteration over stubs via group list.
634 (ppc64_elf_build_stubs): Iterate over stubs via group list.
635 (ppc64_elf_finish_dynamic_sections): Update finalization of
638 2017-07-24 Nick Clifton <nickc@redhat.com>
641 * mach-o.c (bfd_mach_o_canonicalize_relocs): Pass the base address
642 of the relocs to the canonicalize_one_reloc routine.
643 * mach-o.h (struct bfd_mach_o_backend_data): Update the prototype
644 for the _bfd_mach_o_canonicalize_one_reloc field.
645 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add
646 res_base parameter. Use to check for corrupt pair relocs.
647 * mach-o-aarch64.c (bfd_mach_o_arm64_canonicalize_one_reloc):
649 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc):
651 * mach-o-x86-64.c (bfd_mach_o_x86_64_canonicalize_one_reloc):
654 * vms-alpha.c (_bfd_vms_slurp_eihd): Make sure that there is
655 enough data in the record before attempting to parse it.
656 (_bfd_vms_slurp_eeom): Likewise.
658 (_bfd_vms_slurp_egsd): Check for an invalid section index.
659 (image_set_ptr): Likewise.
660 (alpha_vms_slurp_relocs): Likewise.
662 (alpha_vms_object_p): Check for a truncated record.
664 2017-07-24 Nick Clifton <nickc@redhat.com>
667 * reloc.c (_bfd_unrecognized_reloc): New function. Reports
668 an unrecognized reloc and sets the bfd_error value.
669 * libbfd.h: Regenerate.
670 * elf32-arm.c (elf32_arm_final_link_relocate): Use the new
672 * elf32-i386.c (elf_i386_relocate_section): Likewise.
673 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
674 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
675 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.
676 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
678 2017-07-23 Alan Modra <amodra@gmail.com>
680 * elf64-ppc.c (ppc64_elf_size_stubs): Correct advance to
683 2017-07-19 Szabolcs Nagy <szabolcs.nagy@arm.com>
686 * elfnn-aarch64.c (elfNN_aarch64_reloc_type_class): Return
687 reloc_class_ifunc for ifunc symbols.
689 2017-07-19 Nick Clifton <nickc@redhat.com>
692 * archive.c (bfd_generic_archive_p): If the bfd does not have the
693 correct magic bytes at the start, set the error to wrong format
694 and clear the format selector before returning NULL.
696 2017-07-19 Nick Clifton <nickc@redhat.com>
699 * coff-rs6000.c (_bfd_strntol): New function.
700 (_bfd_strntoll): New function.
701 (GET_VALUE_IN_FIELD): New macro.
702 (EQ_VALUE_IN_FIELD): new macro.
703 (_bfd_xcoff_slurp_armap): Use new macros.
704 (_bfd_xcoff_archive_p): Likewise.
705 (_bfd_xcoff_read_ar_hdr): Likewise.
706 (_bfd_xcoff_openr_next_archived_file): Likewise.
707 (_bfd_xcoff_stat_arch_elt): Likewise.
708 * coff64-rs6000.c (_bfd_strntol): New function.
709 (_bfd_strntoll): New function.
710 (GET_VALUE_IN_FIELD): New macro.
711 (xcoff64_slurp_armap): Use new macros.
713 2017-07-19 Claudiu Zissulescu <claziss@synopsys.com>
714 John Eric Martin <John.Martin@emmicro-us.com>
716 * bfd-in2.h: Regenerate.
717 * libbfd.h: Regenerate.
718 * elf32-arc.c (JLI): Define.
719 * reloc.c: Add JLI relocations.
721 2017-07-18 Nick Clifton <nickc@redhat.com>
724 * coff-sh.c: Fix spelling typos.
725 * compress.c: Likewise.
726 * cpu-pdp11.c: Likewise.
727 * ecofflink.c: Likewise.
728 * elf-m10300.c: Likewise.
730 * elf32-arm.c: Likewise.
731 * elf32-m68k.c: Likewise.
732 * elf32-nds32.c: Likewise.
733 * elf32-ppc.c: Likewise.
734 * elf32-sh.c: Likewise.
735 * elf32-v850.c: Likewise.
736 * elf64-ppc.c: Likewise.
737 * elf64-x86-64.c: Likewise.
738 * elflink.c: Likewise.
739 * elfnn-aarch64.c: Likewise.
740 * elfxx-mips.c: Likewise.
743 * vms-alpha.c: Likewise.
744 * xcofflink.c: Likewise.
746 2017-07-18 Nick Clifton <nickc@redhat.com>
749 * coffcode.h (handle_COMDAT): Replace abort with an error message
752 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
755 * elf64-x86-64.c (elf_x86_64_relocate_section): Limit PIC check
758 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
760 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
762 2017-07-16 Alan Modra <amodra@gmail.com>
764 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimize
765 __tls_index GOT entries when using __tls_get_addr_opt stub.
766 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
768 2017-07-12 Alan Modra <amodra@gmail.com>
770 * po/es.po: Update from translationproject.org/latest/bfd/.
771 * po/fi.po: Likewise.
772 * po/fr.po: Likewise.
773 * po/id.po: Likewise.
774 * po/ja.po: Likewise.
775 * po/ro.po: Likewise.
776 * po/ru.po: Likewise.
777 * po/sr.po: Likewise.
778 * po/sv.po: Likewise.
779 * po/tr.po: Likewise.
780 * po/uk.po: Likewise.
781 * po/vi.po: Likewise.
782 * po/zh_CN.po: Likewise.
783 * po/hr.po: New file from translationproject.org.
784 * configure.ac (ALL_LINGUAS): Add hr. Sort.
785 * configure: Regenerate.
787 2017-07-12 Nick Clifton <nickc@redhat.com>
789 Fix compile time warnings using gcc 7.1.1.
790 * elf32-xtensa.c (elf_xtensa_get_plt_section): Increase length of
792 (elf_xtensa_get_gotplt_section): Increase length of got_name
794 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add a
795 default return of FALSE.
796 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc): Add a
797 default return of FALSE.
799 2017-07-12 Alan Modra <amodra@gmail.com>
801 * binary.c (binary_set_section_contents): Don't print filepos in
803 (coff_write_object_contents): Cast size_t for error message.
804 (coff_slurp_line_table): Don't use bfd_vma symndx.
805 (coff_slurp_reloc_table): Remove unneeded cast.
806 * dwarf2.c (read_section): Cast bfd_int64_t to long long for
808 (find_abstract_instance_name): Likewise.
809 * elf32-arm.c (arm_type_of_stub): Correct error arg order.
810 (bfd_elf32_arm_stm32l4xx_erratum_scan): Don't cast error arg.
811 (elf32_arm_check_relocs): Make r_symndx an int.
812 * elf32-cris.c (cris_elf_check_relocs): Delete extraneous %s in
814 * elf32-metag.c (elf_metag_relocate_section): Delete extra error
816 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Rewrite bogus
818 * elf32-i386.c (elf_i386_check_relocs): Make r_symndx an int.
819 * elf32-s390.c (elf_s390_check_relocs): Likewise.
820 * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
821 * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
822 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
823 * elf64-s390.c (elf_s390_check_relocs): Likewise.
824 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
825 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
826 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
827 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
828 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
829 * elf64-mmix.c (_bfd_mmix_after_linker_allocation): Cast size_t args
830 and use %lu for error message.
831 * elflink.c (elf_link_adjust_relocs): Delete extra error message arg.
832 * mmo.c (mmo_scan): Make stab_loc a file_ptr. Cast expression for
835 * elf32-arm.c (elf32_arm_tls_relax): Correct format string and args
837 (elf32_arm_final_link_relocate): Likewise.
838 * coff-arm.c (bfd_arm_process_before_allocation): Likewise.
839 * coffcode.h (styp_to_sec_flags): Likewise.
840 * cofflink.c (_bfd_coff_write_global_sym): Likewise.
841 * ecoff.c (_bfd_ecoff_slurp_symbol_table): Likewise.
842 * elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise.
843 * elf32-bfin.c (bfinfdpic_check_relocs): Likewise.
844 (elf32_bfin_merge_private_bfd_data): Likewise.
845 * elf32-cris.c (cris_elf_relocate_section): Likewise.
846 * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
847 * elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise.
848 (i370_elf_relocate_section): Likewise.
849 * elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise.
850 * elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise.
851 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
852 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
853 * elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise.
854 * elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise.
855 * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
856 * elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise.
857 (_bfd_mips_elf_merge_private_bfd_data): Likewise.
858 * ieee.c (ieee_write_id, read_id): Likewise.
859 * mach-o.c (bfd_mach_o_write_contents): Likewise.
860 (bfd_mach_o_layout_commands, bfd_mach_o_read_section_32): Likewise.
861 (bfd_mach_o_read_section_64, bfd_mach_o_read_symtab_symbol): Likewise.
862 (bfd_mach_o_read_command, bfd_mach_o_header_p): Likewise.
863 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Likewise.
864 * stabs.c (_bfd_link_section_stabs): Likewise.
866 * coff-arm.c (coff_arm_relocate_section): Use L modifier in error
868 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
869 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
870 * coff-rs6000.c (xcoff_reloc_type_toc): Likewise.
871 * coff-sh.c (sh_relax_section): Likewise.
872 (sh_relax_delete_bytes, sh_swap_insns): Likewise.
873 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
874 * coffcode.h (coff_slurp_reloc_table): Likewise.
875 * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
876 (_bfd_coff_read_string_table): Likewise.
877 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
878 * compress.c (bfd_get_full_section_contents): Likewise.
879 * dwarf2.c (read_formatted_entries, decode_line_info): Likewise.
880 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
881 * elf.c (bfd_elf_string_from_elf_section): Likewise.
882 * elf32-arc.c (arc_special_overflow_checks): Likewise.
883 * elf32-arm.c (elf32_arm_tls_relax): Likewise.
884 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Likewise.
885 (elf32_arm_write_section): Likewise.
886 * elf32-bfin.c (bfin_relocate_section): Likewise.
887 (bfinfdpic_relocate_section): Likewise.
888 * elf32-hppa.c (hppa_build_one_stub): Likewise.
889 (final_link_relocate, elf32_hppa_relocate_section): Likewise.
890 * elf32-i386.c (elf_i386_tls_transition): Likewise.
891 (elf_i386_relocate_section): Likewise.
892 * elf32-ip2k.c (ip2k_final_link_relocate): Likewise.
893 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
894 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
895 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
896 * elf32-metag.c (elf_metag_relocate_section): Likewise.
897 * elf32-nds32.c (unrecognized_reloc_msg): Likewise.
898 (nds32_elf_relax_longcall1, nds32_elf_relax_longcall2): Likewise.
899 (nds32_elf_relax_longcall3, nds32_elf_relax_longjump1): Likewise.
900 (nds32_elf_relax_longjump2, nds32_elf_relax_longjump3): Likewise.
901 (nds32_elf_relax_longcall4, nds32_elf_relax_longcall5): Likewise.
902 (nds32_elf_relax_longcall6, nds32_elf_relax_longjump4): Likewise.
903 (nds32_elf_relax_longjump5, nds32_elf_relax_longjump6): Likewise.
904 (nds32_elf_relax_longjump7, nds32_elf_relax_loadstore): Likewise.
905 (nds32_elf_relax_ptr, nds32_elf_ex9_build_hash_table): Likewise.
906 * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
907 * elf32-rx.c (UNSAFE_FOR_PID): Likewise.
908 * elf32-s390.c (invalid_tls_insn, elf_s390_relocate_section): Likewise.
909 * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
910 * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
911 * elf32-sh.c (sh_elf_relax_section): Likewise.
912 (sh_elf_relax_delete_bytes, sh_elf_swap_insns): Likewise.
913 (sh_elf_relocate_section): Likewise.
914 * elf32-sh64.c (shmedia_prepare_reloc): Likewise.
915 * elf32-spu.c (spu_elf_relocate_section): Likewise.
916 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
917 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
918 * elf32-v850.c (v850_elf_relax_section): Likewise.
919 * elf32-vax.c (elf_vax_check_relocs): Likewise.
920 (elf_vax_relocate_section): Likewise.
921 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
922 (extend_ebb_bounds_forward, extend_ebb_bounds_backward): Likewise.
923 (compute_text_actions, compute_ebb_proposed_actions): Likewise.
924 (do_fix_for_relocatable_link): Likewise.
925 * elf64-alpha.c (elf64_alpha_relax_got_load): Likewise.
926 (elf64_alpha_relax_with_lituse): Likewise.
927 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Likewise.
928 (elf_hppa_final_link_relocate): Likewise.
929 * elf64-ia64-vms.c (elf64_ia64_relax_section): Likewise.
930 (elf64_ia64_choose_gp, elf64_ia64_relocate_section): Likewise.
931 (elf64_vms_link_add_object_symbols): Likewise.
932 * elf64-mmix.c (mmix_elf_perform_relocation): Likewise.
933 (mmix_final_link_relocate): Likewise.
934 * elf64-s390.c (invalid_tls_insn): Likewise.
935 (elf_s390_relocate_section): Likewise.
936 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
937 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
938 (elf_x86_64_relocate_section): Likewise.
939 * elfcode.h (elf_slurp_symbol_table): Likewise.
940 * elfcore.h (elf_core_file_p): Likewise.
941 * elflink.c (elf_link_read_relocs_from_section): Likewise.
942 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
943 (elfNN_aarch64_relocate_section): Likewise.
944 * elfnn-ia64.c (elfNN_ia64_relax_section): Likewise.
945 (elfNN_ia64_choose_gp, elfNN_ia64_relocate_section): Likewise.
946 * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
947 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
948 (_bfd_mips_elf_relocate_section): Likewise.
949 (_bfd_mips_elf_finish_dynamic_symbol, mips_finish_exec_plt): Likewise.
950 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
951 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
952 * ieee.c (ieee_slurp_external_symbols): Likewise.
953 * ihex.c (ihex_write_object_content): Likewise.
954 * mach-o.c (bfd_mach_o_build_exec_seg_command): Likewise.
955 * merge.c (_bfd_merged_section_offset): Likewise.
956 * mmo.c (mmo_write_loc_chunk): Likewise.
957 (mmo_write_object_contents): Likewise.
958 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Likewise.
959 * stabs.c (_bfd_link_section_stabs): Likewise.
960 * xcofflink.c (xcoff_link_add_symbols, xcoff_find_tc0): Likewise.
962 2017-07-11 Alan Modra <amodra@gmail.com>
964 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo.
966 2017-07-11 Alan Modra <amodra@gmail.com>
968 * elf32-ppc.c (ppc_elf_relocate_section): Emit "unexpected
969 instruction" error using _bfd_error_handler, not einfo.
971 2017-07-10 Nick Clifton <nickc@redhat.com>
973 * coffcode.h (coff_slurp_symbol_table): Do not include an entry
974 for C_AIX_WEAKEXT if it has the same value as C_WEAKEXT.
976 2017-07-07 John Baldwin <jhb@FreeBSD.org>
978 * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PTLWPINFO.
980 2017-07-07 Alan Modra <amodra@gmail.com>
982 * coffcode.h (coff_slurp_symbol_table): Handle C_AIX_WEAKEXT.
984 2017-07-07 Alan Modra <amodra@gmail.com>
986 * bfd.c (_doprnt): Replace "L" with "ll" when printing bfd_vma
987 as long long. Move code replacing "ll" with "I64", and simplify.
989 2017-07-06 H.J. Lu <hongjiu.lu@intel.com>
991 * bfd.c (_doprnt): Convert 'L' to 'l' when setting wide_width
994 2017-07-05 H.J. Lu <hongjiu.lu@intel.com>
996 * dwarf2.c (line_info_add_include_dir_stub): Replace time with
998 (line_info_add_file_name): Likewise.
999 (decode_line_info): Likewise.
1001 2017-07-04 Tristan Gingold <gingold@adacore.com>
1003 * version.m4: Bump version to 2.29.51
1004 * configure: Regenerate.
1006 2017-07-04 Jiong Wang <jiong.wang@arm.com>
1008 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Remove the
1009 sanity check at the head of this function.
1011 2017-07-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1013 * dwarf2.c (struct dwarf2_debug): Add fields dwarf_line_str_buffer and
1014 dwarf_line_str_size.
1015 (struct attr_abbrev): Add field implicit_const.
1016 (dwarf_debug_sections): Add .debug_line_str.
1017 (enum dwarf_debug_section_enum): Add debug_line_str and debug_max.
1018 (dwarf_debug_section_assert): Add static assertion.
1019 (read_indirect_line_string): New.
1020 (read_abbrevs): Support DW_FORM_implicit_const.
1021 (is_str_attr): Support DW_FORM_line_strp.
1022 (read_attribute_value): Support DW_FORM_line_strp and
1023 DW_FORM_implicit_const.
1024 (read_attribute): Support DW_FORM_implicit_const.
1025 (line_info_add_include_dir, line_info_add_include_dir_stub):
1026 (line_info_add_file_name, read_formatted_entries): New.
1027 (decode_line_info, parse_comp_unit): Support DWARF 5.
1028 (_bfd_dwarf2_cleanup_debug_info): Free dwarf_line_str_buffer.
1030 2017-07-03 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
1032 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove the
1033 abort statement that was put for symbols that are not dynamic.
1035 2017-07-03 Tristan Gingold <gingold@adacore.com>
1037 * po/bfd.pot: Regenerate
1039 2017-07-03 Alan Modra <amodra@gmail.com>
1041 * bfd.c (_doprnt): Rewrite "ll" and "L" modifiers to "I64" for
1042 __MSVCRT__. Support "L" modifier for bfd_vma. Formatting.
1043 * elf.c (setup_group): Use "Lx" to print sh_size.
1044 (_bfd_elf_setup_sections): Remove unnecessary cast and print
1045 unknown section type in hex.
1046 (copy_special_section_fields): Style fix.
1047 (bfd_section_from_shdr): Correct format for sh_link. Use a
1048 common error message for all the variants of unrecognized
1050 (assign_file_positions_for_load_sections): Use "Lx" for lma
1051 adjust error message.
1052 (assign_file_positions_for_non_load_sections): Formatting.
1053 (rewrite_elf_program_header): Formatting. Use "Lx" for
1054 bfd_vma values in error messages.
1055 * elfcode.h (elf_slurp_reloc_table_from_section): Cast
1056 ELF_R_SYM value to type expected by format.
1057 * elflink.c (elf_link_read_relocs_from_section): Use "Lx"
1059 (elf_link_add_object_symbols): Use "Lu" for symbol sizes.
1060 (elf_link_input_bfd): Use "Lx" for r_info.
1061 (bfd_elf_gc_record_vtinherit): Use "Lx" for offset.
1063 2017-07-03 Alan Modra <amodra@gmail.com>
1065 * bfd.c (bfd_scan_vma): Don't use long long unless HAVE_LONG_LONG.
1066 * coff-rs6000.c (FMT20): Handle hosts with 64-bit long and
1067 Microsoft C library variant of long long format specifier.
1068 (PRINT20): Cast value to bfd_uint64_t not long long.
1069 * coffcode.h (coff_print_aux): Use BFD_VMA_FMT.
1070 * coff-x86_64.c (coff_amd64_reloc): Use bfd_uint64_t rather than
1071 long long. Don't cast to bfd_vma.
1072 * elf32-score.c (score3_bfd_getl48): Likewise.
1073 * vms-alpha.c (_bfd_vms_slurp_eisd): Likewise.
1075 2017-07-03 Alan Modra <amodra@gmail.com>
1077 * elf.c (_bfd_elf_print_private_bfd_data): Use BFD_VMA_FMT to
1079 (bfd_elf_print_symbol): Don't cast symbol->flags.
1080 (_bfd_elf_symbol_from_bfd_symbol): Likewise.
1081 * elf32-ppc.c (ppc_elf_begin_write_processing): Correct
1082 _bfd_error_handler argument order.
1083 (ppc_elf_merge_private_bfd_data): Don't cast flags.
1085 2017-07-03 Alan Modra <amodra@gmail.com>
1087 * configure.ac: Invoke AC_CHECK_TYPES for long long. Invoke
1088 AC_TYPE_LONG_DOUBLE.
1089 * configure: Regenerate.
1090 * config.in: Regenerate.
1092 2017-06-29 Andrew Waterman <andrew@sifive.com>
1094 * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Fix TLS copy
1097 2017-06-29 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
1099 * elfxx-sparc.c (allocate_dynrelocs): Don't make a symbol dynamic
1100 unless it is undefined weak.
1101 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Set the flag
1102 relative_reloc to direct non-dynamic symbols to R_SPARC_RELATIVE
1104 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): If symbol
1105 is not dynamic in PIC, abort.
1107 2017-06-29 Jiong Wang <jiong.wang@arm.com>
1110 * elfnn-aarch64.c (elfNN_aarch64_allocate_dynrelocs): Only make
1111 undefined weak symbols into dynamic.
1112 (elfNN_aarch64_final_link_relocate): Generate runtime RELATIVE
1113 relocation for non-dynamic symbols.
1114 (elfNN_aarch64_finish_dynamic_symbol): Add sanity check.
1116 2017-06-29 Jiong Wang <jiong.wang@arm.com>
1118 * elfnn-aarch64.c (aarch64_relocation_aginst_gp_p): New function.
1119 (elfNN_aarch64_final_link_relocate): Delete duplicated code for
1120 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15, BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
1121 BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
1122 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Optimize the
1125 2017-06-29 Andreas Arnez <arnez@linux.vnet.ibm.com>
1127 * elf-bfd.h (elfcore_write_s390_gs_cb): Add prototype.
1128 (elfcore_write_s390_gs_bc): Likewise.
1129 * elf.c (elfcore_grok_s390_gs_cb): New function.
1130 (elfcore_grok_s390_gs_bc): New function.
1131 (elfcore_grok_note): Call them.
1132 (elfcore_write_s390_gs_cb): New function.
1133 (elfcore_write_s390_gs_bc): New function.
1134 (elfcore_write_register_note): Call them.
1136 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
1138 * libbfd.c (_bfd_generic_get_section_contents): Don't call
1139 bfd_get_file_size. Check archive element size.
1140 (_bfd_generic_get_section_contents_in_window): Likewise.
1142 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
1144 * bfd-in2.h: Regenerated.
1145 * bfdio.c (bfd_get_size): Change return type to ufile_ptr.
1146 (bfd_get_file_size): Likewise.
1148 2017-06-28 Maciej W. Rozycki <macro@imgtec.com>
1149 Matthew Fortune <matthew.fortune@imgtec.com>
1151 * archures.c (bfd_mach_mips_interaptiv_mr2): New macro.
1152 * cpu-mips.c (I_interaptiv_mr2): New enum value.
1153 (arch_info_struct): Add "mips:interaptiv-mr2" entry.
1154 * elfxx-mips.c (_bfd_elf_mips_mach) <E_MIPS_MACH_IAMR2>: New
1156 (mips_set_isa_flags) <bfd_mach_mips_interaptiv_mr2>: Likewise.
1157 (bfd_mips_isa_ext) <bfd_mach_mips_interaptiv_mr2>: Likewise.
1158 (print_mips_isa_ext) <AFL_EXT_INTERAPTIV_MR2>: Likewise.
1159 (mips_mach_extensions): Add `bfd_mach_mipsisa32r3' and
1160 `bfd_mach_mips_interaptiv_mr2' entries.
1161 * bfd-in2.h: Regenerate.
1163 2017-06-27 Nick Clifton <nickc@redhat.com>
1165 * tekhex.c (pass_over): Revert accidental conversion of a local
1166 array to a static array.
1168 2017-06-27 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
1171 * elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Adjust
1172 reloc addend if necessary. Adjust diff only if
1173 shrinked_insn_address < end_address.
1175 2017-06-27 Alan Modra <amodra@gmail.com>
1178 * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
1179 (_bfd_generic_get_section_contents_in_window): Likewise.
1181 2017-06-26 Kuan-Lin Chen <rufus@andestech.com>
1183 * elfnn-riscv.c (perform_relocation): Support the new
1184 R_RISCV_32_PCREL relocation.
1185 (riscv_elf_relocate_section): Likewise.
1186 * elfxx-riscv.c (howto_table): Likewise.
1187 (riscv_reloc_map): Likewise.
1188 * bfd-in2.h (BFD_RELOC_RISCV_32_PCREL): New relocation.
1189 * libbfd.h: Regenerate.
1191 2017-06-27 Alan Modra <amodra@gmail.com>
1194 * libbfd.c (_bfd_generic_get_section_contents): Delete abort.
1195 Use unsigned file pointer type, and remove cast.
1196 * libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise.
1197 Add "count", not "sz".
1199 2017-06-26 Pedro Alves <palves@redhat.com>
1202 * libbfd.c (_bfd_generic_get_section_contents): Add "count", not
1205 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
1208 * libbfd.c (_bfd_generic_get_section_contents_in_window): Add
1211 2017-06-26 Maciej W. Rozycki <macro@imgtec.com>
1213 * cpu-mips.c (arch_info_struct): Mark the 4010 32-bit.
1214 * elfxx-mips.c (mips_set_isa_flags) <bfd_mach_mips4010>: Set
1215 E_MIPS_ARCH_2 rather than E_MIPS_ARCH_3 in `e_flags'.
1216 (mips_mach_extensions): Mark `bfd_mach_mips4010' as extending
1217 `bfd_mach_mips6000' rather than `bfd_mach_mips4000'.
1219 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
1222 * compress.c (bfd_get_full_section_contents): Don't check the
1224 * libbfd.c (_bfd_generic_get_section_contents): Check for and
1225 reject a section whose size + offset is greater than the size
1227 (_bfd_generic_get_section_contents_in_window): Likewise.
1229 2017-06-26 Nick Clifton <nickc@redhat.com>
1232 * tekhex.c (getvalue): Check for the source pointer exceeding the
1233 end pointer before the first byte is read.
1235 2017-06-26 Nick Clifton <nickc@redhat.com>
1238 * opncls.c (get_build_id): Check that the section is big enough
1239 to contain the whole note.
1240 * compress.c (bfd_get_full_section_contents): Check for and reject
1241 a section whose size is greater than the size of the entire file.
1242 * elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not
1243 contain a notes section.
1245 2017-06-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1247 * elf64-s390.c (elf_s390_additional_program_headers): Add NULL
1249 (elf_s390_modify_segment_map): Likewise.
1250 (bfd_elf_s390_set_options): Lisewise.
1252 2017-06-26 Alan Modra <amodra@gmail.com>
1254 * elflink.c (_bfd_elf_link_create_dynstrtab): Don't make dynobj
1256 (_bfd_elf_size_group_sections): Skip --just-syms bfds.
1257 (bfd_elf_size_dynamic_sections): Ignore .note.GNU-stack and
1258 .preinit_array on --just-syms bfds.
1259 (_bfd_elf_gc_mark_extra_sections): Skip --just-syms bfds.
1260 (elf_gc_sweep, bfd_elf_parse_eh_frame_entries): Likewise.
1261 (bfd_elf_gc_sections, bfd_elf_discard_info): Likewise.
1263 2017-06-25 Sergei Trofimovich <slyfox@gentoo.org>
1265 * elf.c (find_link): Bounds check "hint".
1267 2017-06-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
1269 * elf32-arm.c (using_thumb_only): Update list of architectures in
1270 BFD_ASSERT for which the logic is valid.
1271 (using_thumb2_bl): Likewise.
1272 (using_thumb2): Likewise and return true for ARMv8-R.
1273 (arch_has_arm_nop): Likewise.
1274 (tag_cpu_arch_combine): New v8r table for ARMv8-R Tag_CPU_arch
1275 merging logic. Update commentis for value 15 of v8m_baseline,
1276 v8m_mainline and v4t_plus_v6_m arrays. Use v8r array to decide
1277 merging of value 15 of Tag_CPU_arch.
1279 2017-06-23 Jiong Wang <jiong.wang@arm.com>
1281 * reloc.c (BFD_RELOC_AARCH64_ADR_GOTPAGE): Rename to
1282 BFD_RELOC_AARCH64_ADR_GOT_PAGE
1283 * bfd-in2.h: Regenerate.
1285 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1287 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Move
1288 the error_alignment label forward. Properly align program
1289 property note section.
1291 2017-06-22 Eric Christopher <echristo@gmail.com>
1293 * elf32-arm.c (elf32_arm_final_link_relocate): Use labs rather than
1294 abs to fix a truncation warning.
1296 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1298 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Resolve
1299 local undefined weak symbol to 0.
1300 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Likewise.
1302 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1304 * elf32-i386.c (elf_i386_merge_gnu_properties): If info->shstk
1305 is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
1306 (elf_i386_link_setup_gnu_properties): If info->shstk is set,
1307 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
1308 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): If
1309 info->shstk is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
1310 (elf_x86_64_link_setup_gnu_properties): If info->shstk is set,
1311 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
1313 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1315 * elf32-i386.c (elf_i386_lazy_ibt_plt0_entry): New.
1316 (elf_i386_lazy_ibt_plt_entry): Likewise.
1317 (elf_i386_pic_lazy_ibt_plt0_entry): Likewise.
1318 (elf_i386_non_lazy_ibt_plt_entry): Likewise.
1319 (elf_i386_pic_non_lazy_ibt_plt_entry): Likewise.
1320 (elf_i386_eh_frame_lazy_ibt_plt): Likewise.
1321 (elf_i386_lazy_plt_layout): Likewise.
1322 (elf_i386_non_lazy_plt_layout): Likewise.
1323 (elf_i386_link_hash_entry): Add plt_second.
1324 (elf_i386_link_hash_table): Add plt_second and
1325 plt_second_eh_frame.
1326 (elf_i386_allocate_dynrelocs): Use the second PLT if needed.
1327 (elf_i386_size_dynamic_sections): Use .plt.got unwind info for
1328 the second PLT. Check the second PLT.
1329 (elf_i386_relocate_section): Use the second PLT to resolve
1330 PLT reference if needed.
1331 (elf_i386_finish_dynamic_symbol): Fill and use the second PLT if
1333 (elf_i386_finish_dynamic_sections): Set sh_entsize on the
1334 second PLT. Generate unwind info for the second PLT.
1335 (elf_i386_plt_type): Add plt_second.
1336 (elf_i386_get_synthetic_symtab): Support the second PLT.
1337 (elf_i386_parse_gnu_properties): Support
1338 GNU_PROPERTY_X86_FEATURE_1_AND.
1339 (elf_i386_merge_gnu_properties): Support
1340 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
1341 on GNU_PROPERTY_X86_FEATURE_1_IBT
1342 (elf_i386_link_setup_gnu_properties): If info->ibt is set,
1343 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
1344 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
1345 is set on all relocatable inputs.
1346 * elf64-x86-64.c (elf_x86_64_lazy_ibt_plt_entry): New.
1347 (elf_x32_lazy_ibt_plt_entry): Likewise.
1348 (elf_x86_64_non_lazy_ibt_plt_entry): Likewise.
1349 (elf_x32_non_lazy_ibt_plt_entry): Likewise.
1350 (elf_x86_64_eh_frame_lazy_ibt_plt): Likewise.
1351 (elf_x32_eh_frame_lazy_ibt_plt): Likewise.
1352 (elf_x86_64_lazy_ibt_plt): Likewise.
1353 (elf_x32_lazy_ibt_plt): Likewise.
1354 (elf_x86_64_non_lazy_ibt_plt): Likewise.
1355 (elf_x32_non_lazy_ibt_plt): Likewise.
1356 (elf_x86_64_get_synthetic_symtab): Support the second PLT.
1357 (elf_x86_64_parse_gnu_properties): Support
1358 GNU_PROPERTY_X86_FEATURE_1_AND.
1359 (elf_x86_64_merge_gnu_properties): Support
1360 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
1361 on GNU_PROPERTY_X86_FEATURE_1_IBT
1362 (elf_x86_64_link_setup_gnu_properties): If info->ibt is set,
1363 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
1364 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
1365 is set on all relocatable inputs.
1367 2017-06-22 Nick Clifton <nickc@redhat.com>
1370 * som.c (setup_sections): NUL terminate the space_strings buffer.
1371 Check that the space.name field does not index beyond the end of
1372 the space_strings buffer.
1374 2017-06-21 Nick Clifton <nickc@redhat.com>
1377 * coff-sh.c (sh_reloc): Check for an out of range reloc.
1379 2017-06-21 Nick Clifton <nickc@redhat.com>
1382 * vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as
1383 type of the size parameter.
1384 (_bfd_vms_save_counted_string): Add second parameter - the maximum
1385 length of the counted string.
1386 * vms.h (_bfd_vms_save_sized_string): Update prototype.
1387 (_bfd_vms_save_counted_string): Likewise.
1388 * vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to
1389 _bfd_vms_save_counted_string.
1390 (_bfd_vms_slurp_ehdr): Likewise.
1391 (_bfd_vms_slurp_egsd): Likewise.
1392 (Parse_module): Likewise.
1394 2017-06-21 Alan Modra <amodra@gmail.com>
1396 * elf64-ppc.c (ppc64_elf_size_stubs): Test for localentry:0 plt
1397 calls before tocsave calls.
1398 (ppc64_elf_relocate_section): Allow localentry:0 plt calls without
1401 2017-06-21 Nick Clifton <nickc@redhat.com>
1404 * reloc.c (bfd_generic_get_relocated_section_contents): Fail if
1405 bfd_get_full_section_contents returns no contents.
1407 2017-06-21 Nick Clifton <nickc@redhat.com>
1410 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized
1413 2017-06-21 Nick Clifton <nickc@redhat.com>
1416 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section
1418 (image_set_ptr): Likewise.
1419 (alpha_vms_fix_sec_rel): Likewise.
1420 (alpha_vms_slurp_relocs): Likewise.
1422 2017-06-21 Nick Clifton <nickc@redhat.com>
1425 * ieee.c (ieee_slurp_sections): Check for a NULL return from
1427 (ieee_archive_p): Likewise.
1428 (ieee_object_p): Likewise.
1430 2017-06-21 Nick Clifton <nickc@redhat.com>
1433 * elf.c (setup_group): Zero the group section pointer list after
1434 allocation so that loops can be caught. Check for NULL pointers
1435 when processing a group list.
1437 2017-06-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1439 * elf-s390.h: New file.
1440 * elf64-s390.c (struct elf_s390_link_hash_table): Add params
1442 (elf_s390_additional_program_headers): New function.
1443 (elf_s390_modify_segment_map): New function.
1444 (bfd_elf_s390_set_options): New function.
1445 (elf_backend_additional_program_headers)
1446 (elf_backend_modify_segment_map): Add macro definitions.
1448 2017-06-19 H.J. Lu <hongjiu.lu@intel.com>
1451 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
1452 the DYNAMIC bit instead of bfd_count_sections.
1454 2017-06-19 Nick Clifton <nickc@redhat.com>
1457 * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record
1459 (evax_bfd_print_eeom): Likewise.
1460 (evax_bfd_print_egsd): Check for an overlarge record length.
1461 (evax_bfd_print_etir): Likewise.
1463 2017-06-19 Nick Clifton <nickc@redhat.com>
1466 * libieee.h (struct common_header_type): Add end_p field.
1467 * ieee.c (this_byte_and_next): Do not advance input_p beyond
1469 (read_id): Check for a length that exceeds the remaining bytes in
1471 (ieee_seek): Initialise end_p.
1472 (ieee_archive_p): Likewise.
1473 (ieee_object_p): Likewise.
1475 2017-06-19 Nick Clifton <nickc@redhat.com>
1478 * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset
1479 before reading the EIHS structure entries.
1481 2017-06-19 Nick Clifton <nickc@redhat.com>
1484 * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for
1485 gsd_size. Check that there are enough bytes remaining to read the
1486 type and size of the next egsd. Check that the size of the egsd
1487 does not exceed the size of the record.
1489 2017-06-19 Alan Modra <amodra@gmail.com>
1491 * config.bfd: Correct targ_underscore for cris.
1493 2017-06-18 Alan Modra <amodra@gmail.com>
1495 * config.bfd: Correct targ_underscore for epiphany, ip2k,
1496 m32c, mn10200, pru, rl78, rx, crisv32 and v850.
1498 2017-06-16 Nick Clifton <nickc@redhat.com>
1500 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
1501 bucketlist is empty because there are no symbols to add to the
1504 2017-06-16 Alan Modra <amodra@gmail.com>
1510 * targets.c (struct bfd_target): Add _bfd_define_start_stop.
1511 (BFD_JUMP_TABLE_LINK): Likewise.
1512 * elf-bfd.h (bfd_elf_define_start_stop): Declare.
1513 * elflink.c (_bfd_elf_gc_mark_rsec): Update comment.
1514 (bfd_elf_define_start_stop): New function.
1515 * linker.c (bfd_generic_define_start_stop): New function.
1516 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init
1518 * aout-adobe.c (aout_32_bfd_define_start_stop): Define.
1519 * aout-target.h (MY_bfd_define_start_stop): Define.
1520 * aout-tic30.c (MY_bfd_define_start_stop): Define.
1521 * binary.c (binary_bfd_define_start_stop): Define.
1522 * bout.c (b_out_bfd_define_start_stop): Define.
1523 * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define.
1524 * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define.
1525 * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define.
1526 * coffcode.h (coff_bfd_define_start_stop): Define.
1527 * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define.
1528 * i386msdos.c (msdos_bfd_define_start_stop): Define.
1529 * i386os9k.c (os9k_bfd_define_start_stop): Define.
1530 * ieee.c (ieee_bfd_define_start_stop): Define.
1531 * ihex.c (ihex_bfd_define_start_stop): Define.
1532 * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define.
1533 * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define.
1534 * mmo.c (mmo_bfd_define_start_stop): Define.
1535 * nlm-target.h (nlm_bfd_define_start_stop): Define.
1536 * oasys.c (oasys_bfd_define_start_stop): Define.
1537 * pef.c (bfd_pef_bfd_define_start_stop): Define.
1538 * plugin.c (bfd_plugin_bfd_define_start_stop): Define.
1539 * ppcboot.c (ppcboot_bfd_define_start_stop): Define.
1540 * som.c (som_bfd_define_start_stop): Define.
1541 * srec.c (srec_bfd_define_start_stop): Define.
1542 * tekhex.c (tekhex_bfd_define_start_stop): Define.
1543 * versados.c (versados_bfd_define_start_stop): Define.
1544 * vms-alpha.c (vms_bfd_define_start_stop): Define.
1545 (alpha_vms_bfd_define_start_stop): Define.
1546 * xsym.c (bfd_sym_bfd_define_start_stop): Define.
1547 * bfd-in2.h: Regenerate.
1548 * libbfd.h: Regenerate.
1550 2017-06-16 Jiong Wang <jiong.wang@arm.com>
1552 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
1553 SYMBOL_REFERENCES_LOCAL.
1555 2017-06-15 Jiong Wang <jiong.wang@arm.com>
1558 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
1559 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
1560 runtime for if there needs copy relocation elimination.
1561 (need_copy_relocation_p): New function. Return true for symbol with
1562 pc-relative references and if it's against read-only sections.
1563 (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
1564 (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
1565 that are related with accessing external objects.
1566 (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change
1567 in elfNN_aarch64_check_relocs.
1569 2017-06-15 Nick Clifton <nickc@redhat.com>
1572 * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
1575 (ieee_archive_p): Likewise.
1577 2017-06-15 Nick Clifton <nickc@redhat.com>
1580 * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
1582 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
1584 * elf32-xtensa.c (elf_xtensa_be_plt_entry,
1585 elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays,
1586 keep both windowed and call0 ABI PLT definitions.
1587 (elf_xtensa_create_plt_entry): Use selected ABI to choose upper
1588 elf_xtensa_*_plt_entry endex.
1589 (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size.
1591 2017-06-14 Nick Clifton <nickc@redhat.com>
1594 * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
1597 2017-06-14 Nick Clifton <nickc@redhat.com>
1600 * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
1601 maximum value for the ascic pointer. Check that name processing
1602 does not read beyond this value.
1603 (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
1606 2017-06-14 Nick Clifton <nickc@redhat.com>
1609 * versados.c (versados_mkobject): Zero the allocated tdata structure.
1610 (process_otr): Check for an invalid offset in the otr structure.
1612 2017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
1614 * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
1616 2017-06-13 H.J. Lu <hongjiu.lu@intel.com>
1622 * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
1623 vtable field to a union.
1624 (_bfd_elf_is_start_stop): Removed.
1625 * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
1626 __start_SECNAME and __stop_SECNAME symbols.
1627 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
1628 * elflink.c (_bfd_elf_is_start_stop): Removed.
1629 (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
1630 _bfd_elf_is_start_stop.
1631 (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
1632 __stop_SECNAME symbols. Updated.
1633 (elf_gc_smash_unused_vtentry_relocs): Likewise.
1634 (bfd_elf_gc_record_vtinherit): Likewise.
1635 (bfd_elf_gc_record_vtentry): Likewise.
1637 2017-06-13 Nick Clifton <nickc@redhat.com>
1640 * elflink.c (elf_link_adjust_relocs): Generate an error when
1641 encountering a reloc against a symbol removed by garbage
1644 2017-06-12 H.J. Lu <hongjiu.lu@intel.com>
1646 * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
1647 to merge_gnu_properties.
1648 * elf-properties.c (elf_merge_gnu_properties): Add struct
1649 bfd_link_info * and pass it to merge_gnu_properties.
1650 (elf_merge_gnu_property_list): Add struct bfd_link_info *
1651 and pass it to elf_merge_gnu_properties.
1652 (_bfd_elf_link_setup_gnu_properties): Pass info to
1653 elf_merge_gnu_property_list.
1654 * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
1656 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
1658 2017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
1661 * binary.c (binary_set_section_contents): Scale lma by octets
1662 per byte to set filepos.
1664 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1666 * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
1669 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1671 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
1674 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1676 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
1677 patched section contents for TLS IE reloc.
1678 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
1680 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1682 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
1683 RELOC_FOR_GLOBAL_SYMBOL macro.
1685 2018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1687 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
1690 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1692 * config/tc-arc.c (md_undefined_symbol): Changed.
1693 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
1695 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1697 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
1700 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1702 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
1703 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
1705 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1707 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
1710 2017-06-08 Richard Earnshaw <rearnsha@arm.com>
1712 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
1713 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
1714 is non-zero. Add clarifying comments.
1716 2017-06-08 H.J. Lu <hongjiu.lu@intel.com>
1718 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
1719 name. Use local IFUNC symbol name string to report unsupported
1720 non-PIC call to IFUNC function.
1721 (elf_i386_relocate_section): Dump local IFUNC name with minfo
1722 when generating R_386_IRELATIVE relocation.
1723 (elf_i386_finish_dynamic_symbol): Likewise.
1724 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
1726 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
1727 when generating R_X86_64_IRELATIVE relocation.
1728 (elf_x86_64_finish_dynamic_symbol): Likewise.
1730 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
1732 * elf.c (setup_group): Make sure BFD sections are created for all
1733 group sections in the input file when processing SHF_GROUP
1735 (bfd_section_from_shdr): Avoid duplicating logic already
1736 implemented in `setup_group'.
1738 2017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
1741 * peXXigen.c (pe_print_idata): Use the address of the first thunk
1742 if the hint address is zero.
1744 2017-06-06 James Clarke <jrtc27@jrtc27.com>
1747 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
1748 ELF_COMMON_DEF_P for common symbols.
1750 2017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
1752 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
1753 SEC_GROUP sections as SEC_EXCLUDE.
1754 (bfd_elf_set_group_contents): Replace use of abort with an assert.
1755 (assign_section_numbers): Use resolve_section_groups flag instead
1756 of relocatable link type.
1757 (_bfd_elf_init_private_section_data): Use resolve_section_groups
1758 flag instead of checking the final_link flag for part of the
1759 checks in here. Fix white space as a result.
1760 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
1761 instead of relocatable link type.
1762 (bfd_elf_final_link): Likewise.
1764 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
1766 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
1768 * elf32-score.c (score_elf_final_link_relocate): Likewise.
1769 (s3_bfd_score_elf_check_relocs): Likewise.
1770 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
1771 (score_elf_final_link_relocate): Likewise.
1772 (s7_bfd_score_elf_check_relocs): Likewise.
1774 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
1776 * elflink.c (init_reloc_cookie_rels): Remove unused variable
1779 2017-06-06 Maciej W. Rozycki <macro@imgtec.com>
1781 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
1782 from `reloc_count' rather than decrementing it.
1783 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
1784 `reloc_count' by `int_rels_per_ext_rel'.
1785 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
1786 `reloc_count' by `int_rels_per_ext_rel' for last relocation
1787 entry determination.
1788 (s3_bfd_score_elf_check_relocs): Likewise.
1789 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
1790 (s7_bfd_score_elf_relocate_section): Likewise.
1791 (s7_bfd_score_elf_check_relocs): Likewise.
1792 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
1793 prototype and function.
1794 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
1795 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
1796 triple rather than once the sum of REL and RELA relocation entry
1798 (bfd_elf64_get_reloc_upper_bound): Remove macro.
1799 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
1800 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
1801 storage allocation size determination.
1802 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
1803 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
1804 by `int_rels_per_ext_rel' for last relocation entry
1806 (bfd_elf_final_link): Do not multiply `reloc_count' by
1807 `int_rels_per_ext_rel' for internal relocation storage
1808 allocation size determination.
1809 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
1810 `int_rels_per_ext_rel' for last relocation entry determination.
1811 (elf_gc_smash_unused_vtentry_relocs): Likewise.
1812 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
1813 (_bfd_mips_elf_relocate_section): Likewise.
1815 2017-06-05 Alan Modra <amodra@gmail.com>
1818 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
1820 2017-06-01 John Baldwin <jhb@FreeBSD.org>
1822 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
1823 determine structure sizes.
1824 (elfcore_grok_freebsd_prstatus): Likewise.
1826 2017-06-01 Alan Modra <amodra@gmail.com>
1828 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
1829 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
1831 (is_elfv2_localentry0): New function.
1832 (ppc64_elf_tls_setup): Default params->plt_localentry0.
1833 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
1834 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
1835 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
1836 optimized localentry:0 stubs.
1837 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
1838 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
1840 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
1842 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
1844 2017-05-30 Casey Smith <clegg89@gmail.com>
1847 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
1848 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
1850 2017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
1852 * cpu-arc.c (arc_compatible): New function.
1854 2017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
1856 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
1858 2017-05-30 H.J. Lu <hongjiu.lu@intel.com>
1861 * bfdio.c (bfd_get_file_size): New function.
1862 * bfd-in2.h: Regenerated.
1864 2017-05-23 Dilian Palauzov <git-dpa@aegee.org>
1866 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
1869 2017-05-22 H.J. Lu <hongjiu.lu@intel.com>
1871 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
1872 dynobj instead of htab->elf.dynobj.
1874 2017-05-19 Maciej W. Rozycki <macro@imgtec.com>
1876 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
1878 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
1879 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
1880 actual number of internal relocations retrieved. Adjust
1881 function description.
1882 (bfd_elf64_canonicalize_reloc): Remove macro.
1883 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
1885 2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
1887 * archures.c (bfd_mach_sparc_v9m8): Define.
1888 (bfd_mach_sparc_v8plusm8): Likewise.
1889 (bfd_mach_sparc_v9_p): Adjust to M8.
1890 (bfd_mach_sparc_64bit_p): Likewise.
1891 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
1892 bfd_mach_sparc_v8plusm8.
1893 * bfd-in2.h: Regenerated.
1894 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
1896 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
1897 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
1898 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
1900 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
1901 bfd_mach_sparc_v8plusm8.
1903 2017-05-19 Alan Modra <amodra@gmail.com>
1905 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
1906 debug and special sections when no non-note alloc sections in an
1909 2017-05-18 Alan Modra <amodra@gmail.com>
1911 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
1912 * elf-m10300.c: Likewise.
1914 * elf32-arc.c: Likewise.
1915 * elf32-bfin.c: Likewise.
1916 * elf32-m68k.c: Likewise.
1917 * elf32-nds32.c: Likewise.
1918 * elf32-tilepro.c: Likewise.
1919 * elflink.c: Likewise.
1920 * elfnn-aarch64.c: Likewise.
1921 * elfnn-riscv.c: Likewise.
1922 * elfxx-tilegx.c: Likewise.
1923 * mach-o.c: Likewise.
1924 * peXXigen.c: Likewise.
1925 * vms-alpha.c: Likewise.
1926 * vms-lib.c: Likewise.
1928 2017-05-17 H.J. Lu <hongjiu.lu@intel.com>
1931 * elflink.c (elf_gc_mark_debug_section): New function.
1932 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
1933 referenced by kept debug sections.
1935 2017-05-16 Alan Modra <amodra@gmail.com>
1937 * elf-m10300.c: Rename occurrences of non_ir_ref.
1938 * elf32-arm.c: Likewise.
1939 * elf32-bfin.c: Likewise.
1940 * elf32-cr16.c: Likewise.
1941 * elf32-cris.c: Likewise.
1942 * elf32-d10v.c: Likewise.
1943 * elf32-dlx.c: Likewise.
1944 * elf32-fr30.c: Likewise.
1945 * elf32-frv.c: Likewise.
1946 * elf32-hppa.c: Likewise.
1947 * elf32-i370.c: Likewise.
1948 * elf32-i386.c: Likewise.
1949 * elf32-iq2000.c: Likewise.
1950 * elf32-lm32.c: Likewise.
1951 * elf32-m32c.c: Likewise.
1952 * elf32-m32r.c: Likewise.
1953 * elf32-m68hc1x.c: Likewise.
1954 * elf32-m68k.c: Likewise.
1955 * elf32-mcore.c: Likewise.
1956 * elf32-metag.c: Likewise.
1957 * elf32-microblaze.c: Likewise.
1958 * elf32-moxie.c: Likewise.
1959 * elf32-msp430.c: Likewise.
1960 * elf32-mt.c: Likewise.
1961 * elf32-nios2.c: Likewise.
1962 * elf32-or1k.c: Likewise.
1963 * elf32-ppc.c: Likewise.
1964 * elf32-rl78.c: Likewise.
1965 * elf32-s390.c: Likewise.
1966 * elf32-score.c: Likewise.
1967 * elf32-score7.c: Likewise.
1968 * elf32-sh.c: Likewise.
1969 * elf32-tic6x.c: Likewise.
1970 * elf32-tilepro.c: Likewise.
1971 * elf32-v850.c: Likewise.
1972 * elf32-vax.c: Likewise.
1973 * elf32-xstormy16.c: Likewise.
1974 * elf32-xtensa.c: Likewise.
1975 * elf64-alpha.c: Likewise.
1976 * elf64-hppa.c: Likewise.
1977 * elf64-ia64-vms.c: Likewise.
1978 * elf64-mmix.c: Likewise.
1979 * elf64-ppc.c: Likewise.
1980 * elf64-s390.c: Likewise.
1981 * elf64-sh64.c: Likewise.
1982 * elf64-x86-64.c: Likewise.
1983 * elflink.c: Likewise.
1984 * elfnn-aarch64.c: Likewise.
1985 * elfnn-ia64.c: Likewise.
1986 * elfnn-riscv.c: Likewise.
1987 * elfxx-mips.c: Likewise.
1988 * elfxx-sparc.c: Likewise.
1989 * elfxx-tilegx.c: Likewise.
1990 * linker.c: Likewise.
1992 2017-05-16 Alan Modra <amodra@gmail.com>
1994 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
1995 * elflink.c (elf_link_add_object_symbols): Update to use
1997 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
1999 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
2001 2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
2003 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
2005 2017-05-12 H.J. Lu <hongjiu.lu@intel.com>
2007 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
2008 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
2010 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
2012 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
2014 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
2016 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
2017 to plt_second/plt_second_eh_frame.
2018 (elf_x86_64_link_hash_newfunc): Updated.
2019 (elf_x86_64_allocate_dynrelocs): Likewise.
2020 (elf_x86_64_size_dynamic_sections): Likewise.
2021 (elf_x86_64_relocate_section): Likewise.
2022 (elf_x86_64_finish_dynamic_symbol): Likewise.
2023 (elf_x86_64_finish_dynamic_sections): Likewise.
2024 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
2025 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
2027 (elf_backend_setup_gnu_properties): Updated. Create the
2028 .plt.sec section instead of the .plt.sec section.
2030 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
2032 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
2033 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
2034 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
2036 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
2038 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
2039 (bfd_elf64_set_reloc): Define.
2040 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
2042 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
2044 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
2045 (struct bfd_target): New field _bfd_set_reloc.
2046 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
2047 * reloc.c (_bfd_generic_set_reloc): New function.
2048 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
2049 * nlm-target.h (nlm_set_reloc): Likewise.
2050 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
2051 * aout-tic30.c (MY_set_reloc): Likewise.
2052 * aout-target.h (MY_set_reloc): Likewise.
2053 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
2054 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
2055 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
2056 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
2057 * aout-adobe.c (aout_32_set_reloc): Likewise.
2058 * bout.c (b_out_set_reloc): Likewise.
2059 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
2060 * i386os9k.c (aout_32_set_reloc): Likewise.
2061 * ieee.c (ieee_set_reloc): Likewise.
2062 * oasys.c (oasys_set_reloc): Likewise.
2063 * som.c (som_set_reloc): Likewise.
2064 * versados.c (versados_set_reloc): Likewise.
2065 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
2066 _bfd_generic_set_reloc.
2067 (rs6000_xcoff64_aix_vec): LIkewise.
2068 * libbfd.c (_bfd_norelocs_set_reloc): New function.
2069 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
2070 * i386msdos.c (msdos_set_reloc): Define to
2071 _bfd_norelocs_set_reloc.
2072 * elfcode.h (elf_set_reloc): Define.
2073 * bfd-in2.h: Regenerated.
2075 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
2078 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
2079 for IFUNC function address.
2081 2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
2083 * elf32-arc.c (FEATURE_LIST_NAME): Define.
2084 (CONFLICT_LIST): Likewise.
2085 (opcode/arc-attrs.h): Include.
2086 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
2087 (arc_extract_features): New file.
2088 (arc_stralloc): Likewise.
2089 (arc_elf_merge_attributes): Likewise.
2090 (arc_elf_merge_private_bfd_data): Use object attributes.
2091 (bfd_arc_get_mach_from_attributes): New function.
2092 (arc_elf_object_p): Use object attributes.
2093 (arc_elf_final_write_processing): Likewise.
2094 (elf32_arc_obj_attrs_arg_type): New function.
2095 (elf32_arc_obj_attrs_handle_unknown): Likewise.
2096 (elf32_arc_section_from_shdr): Likewise.
2097 (elf_backend_obj_attrs_vendor): Define.
2098 (elf_backend_obj_attrs_section): Likewise.
2099 (elf_backend_obj_attrs_arg_type): Likewise.
2100 (elf_backend_obj_attrs_section_type): Likewise.
2101 (elf_backend_obj_attrs_handle_unknown): Likewise.
2102 (elf_backend_section_from_shdr): Likewise.
2104 2017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
2107 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
2108 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
2109 and the destination is a Thumb symbol.
2111 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2113 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
2114 initializer to silence GCC 4.2.
2115 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
2117 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2119 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
2120 (LAZY_PLT_ENTRY_SIZE): This.
2121 (NON_LAZY_PLT_ENTRY_SIZE): New.
2122 (elf_x86_64_plt0_entry): Renamed to ...
2123 (elf_x86_64_lazy_plt0_entry): This.
2124 (elf_x86_64_plt_entry): Renamed to ...
2125 (elf_x86_64_lazy_plt_entry): This.
2126 (elf_x86_64_bnd_plt0_entry): Renamed to ...
2127 (elf_x86_64_lazy_bnd_plt0_entry): This.
2128 (elf_x86_64_legacy_plt_entry): Removed.
2129 (elf_x86_64_bnd_plt_entry): Renamed to ...
2130 (elf_x86_64_lazy_bnd_plt_entry): This.
2131 (elf_x86_64_legacy_plt2_entry): Renamed to ...
2132 (elf_x86_64_non_lazy_plt_entry): This.
2133 (elf_x86_64_bnd_plt2_entry): Renamed to ...
2134 (elf_x86_64_non_lazy_bnd_plt_entry): This.
2135 (elf_x86_64_eh_frame_plt): Renamed to ...
2136 (elf_x86_64_eh_frame_lazy_plt): This.
2137 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
2138 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
2139 (elf_x86_64_eh_frame_plt_got): Renamed to ...
2140 (elf_x86_64_eh_frame_non_lazy_plt): This.
2141 (elf_x86_64_lazy_plt_layout): New.
2142 (elf_x86_64_non_lazy_plt_layout): Likewise.
2143 (elf_x86_64_plt_layout): Likewise.
2144 (elf_x86_64_backend_data): Remove PLT layout information. Add
2145 os for target system.
2146 (GET_PLT_ENTRY_SIZE): Removed.
2147 (elf_x86_64_lazy_plt): New.
2148 (elf_x86_64_non_lazy_plt): Likewise.
2149 (elf_x86_64_lazy_bnd_plt): Likewise.
2150 (elf_x86_64_non_lazy_bnd_plt): Likewise.
2151 (elf_x86-64_arch_bed): Updated.
2152 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
2153 (elf_x86_64_create_dynamic_sections): Removed.
2154 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
2155 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
2156 (elf_x86-64_adjust_dynamic_symbol): Updated.
2157 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
2158 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
2159 size for PLT0 if there is no PLT0. Get plt_entry_size from
2160 non_lazy_plt for non-lazy PLT entries.
2161 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
2162 from non_lazy_plt for non-lazy PLT entries.
2163 (elf_x86-64_relocate_section): Updated. Properly get PLT index
2164 if there is no PLT0.
2165 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
2166 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
2167 entries with non-lazy PLT layout. Don't fill the second and third
2168 slots in the PLT entry if there is no PLT0.
2169 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
2170 if there is no PLT0. Set sh_entsize on the .plt.got section.
2171 (compare_relocs): New.
2172 (elf_x86_64_plt_type): Likewise.
2173 (elf_x86_64_plt): Likewise.
2174 (elf_x86_64_nacl_plt): New. Forward declaration.
2175 (elf_x86_64_get_plt_sym_val): Removed.
2176 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
2177 against all dynamic relocations.
2178 (elf_x86_64_link_setup_gnu_properties): New function.
2179 (elf_backend_create_dynamic_sections): Updated.
2180 (elf_backend_setup_gnu_properties): New.
2181 (elf_x86_64_nacl_plt): New.
2182 (elf_x86_64_nacl_arch_bed): Updated.
2184 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2186 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
2187 (LAZY_PLT_ENTRY_SIZE): This.
2188 (NON_LAZY_PLT_ENTRY_SIZE): New.
2189 (elf_i386_plt0_entry): Renamed to ...
2190 (elf_i386_lazy_plt0_entry): This.
2191 (elf_i386_plt_entry): Renamed to ...
2192 (elf_i386_lazy_plt_entry): This.
2193 (elf_i386_pic_plt0_entry): Renamed to ...
2194 (elf_i386_pic_lazy_plt0_entry): This.
2195 (elf_i386_pic_plt_entry): Renamed to ...
2196 (elf_i386_pic_lazy_plt_entry): This.
2197 (elf_i386_got_plt_entry): Renamed to ...
2198 (elf_i386_non_lazy_plt_entry): This.
2199 (elf_i386_pic_got_plt_entry): Renamed to ...
2200 (elf_i386_pic_non_lazy_plt_entry): This.
2201 (elf_i386_eh_frame_plt): Renamed to ...
2202 (elf_i386_eh_frame_lazy_plt): This.
2203 (elf_i386_eh_frame_plt_got): Renamed to ...
2204 (elf_i386_eh_frame_non_lazy_plt): This.
2205 (elf_i386_plt_layout): Renamed to ...
2206 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
2207 eh_frame_plt_got_size.
2208 (elf_i386_non_lazy_plt_layout): New.
2209 (elf_i386_plt_layout): Likewise.
2210 (elf_i386_non_lazy_plt): Likewise.
2211 (GET_PLT_ENTRY_SIZE): Removed.
2212 (elf_i386_plt): Renamed to ...
2213 (elf_i386_lazy_plt): This.
2214 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
2215 (elf_i386_arch_bed): Updated.
2216 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
2217 (elf_i386_create_dynamic_sections): Removed.
2218 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
2219 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
2220 (elf_i386_adjust_dynamic_symbol): Updated.
2221 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
2222 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
2223 size for PLT0 if there is no PLT0.
2224 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
2225 output section is discarded only if GOT isn't empty.
2226 (elf_i386_relocate_section): Updated. Properly get PLT index
2227 if there is no PLT0.
2228 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
2229 second and third slots in the PLT entry if there is no PLT0.
2230 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
2231 if there is no PLT0. Set sh_entsize on the .plt.got section.
2232 (elf_i386_nacl_plt): Forward declaration.
2233 (elf_i386_get_plt_sym_val): Removed.
2234 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
2235 against all dynamic relocations.
2236 (elf_i386_link_setup_gnu_properties): New function.
2237 (elf_backend_create_dynamic_sections): Updated.
2238 (elf_backend_setup_gnu_properties): New.
2239 (elf_i386_nacl_plt): Updated.
2240 (elf_i386_nacl_arch_bed): Likewise.
2241 (elf_i386_vxworks_arch_bed): Likewise.
2243 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
2245 * elflink.c (elf_output_implib): Remove executable flag from import
2247 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
2248 library is a relocatable object file.
2250 2017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
2253 * elf32-avr.c (avr_should_move_sym): New function.
2254 (avr_should_reduce_sym_size): Likewise.
2255 (avr_should_increase_sym_size): Likewise.
2256 (elf32_avr_relax_delete_bytes): Adjust symbol values
2257 and sizes by calling new functions.
2259 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
2261 * config.bfd (riscv32-*): Enable rv64.
2263 2017-05-02 Alan Modra <amodra@gmail.com>
2266 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
2267 rather than h->root.type == bfd_link_hash_new.
2268 (bfd_elf_record_link_assignment): Similarly, call
2269 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
2271 2017-04-29 Alan Modra <amodra@gmail.com>
2274 * reloc.c (reloc_offset_in_range): New function.
2275 (bfd_perform_relocation, bfd_install_relocation): Use it.
2276 (_bfd_final_link_relocate): Likewise.
2278 2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
2280 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
2281 before using .plt.got.
2282 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
2284 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2286 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
2287 instead of "+=" to update 0.
2289 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2291 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
2292 .plt.got section here.
2293 (elf_i386_check_relocs): Don't create the .plt.got section.
2294 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
2295 the .plt.got and .plt.bnd sections here.
2296 (elf_x86_64_check_relocs): Don't create the .plt.got nor
2299 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2301 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
2303 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
2304 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
2305 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
2306 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
2309 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2311 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
2313 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
2314 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
2315 the first relocatable ELF input with GNU properties.
2317 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2319 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
2320 VxWorks for non-PIC.
2322 2017-04-27 Alan Modra <amodra@gmail.com>
2324 * elf-bfd.h (struct elf_backend_data): Make asection param of
2325 elf_backend_eh_frame_address_size const.
2326 (_bfd_elf_eh_frame_address_size): Likewise.
2327 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
2328 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
2329 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
2330 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
2331 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
2332 (next_cie_fde_offset): Constify params.
2333 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
2335 2017-04-27 Alan Modra <amodra@gmail.com>
2337 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
2338 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
2339 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
2341 (offset_adjust): New function.
2342 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
2343 (adjust_eh_frame_local_symbols): Likewise.
2344 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
2345 after changing anything. Return true if anything changed.
2346 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
2347 _bfd_elf_adjust_eh_frame_global_symbol for globals.
2349 2017-04-27 Alan Modra <amodra@gmail.com>
2351 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
2354 2017-04-27 Alan Modra <amodra@gmail.com>
2356 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
2357 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
2358 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
2359 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
2360 for undef and undefweak dyn_relocs.
2361 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
2362 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
2363 (allocate_got, allocate_dynrelocs): Likewise.
2364 (ppc64_elf_relocate_section): Likewise.
2366 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
2368 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
2369 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
2370 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
2371 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
2373 2017-04-26 Nick Clifton <nickc@redhat.com>
2376 * reloc.c (bfd_perform_relocation): Check for a negative address
2379 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
2382 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
2384 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
2385 (elf_backend_always_renumber_dynsyms): Define.
2386 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
2387 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
2388 * elflink.c (bfd_elf_size_dynamic_sections): Also call
2389 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
2391 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
2393 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
2395 * elflink.c (bfd_elf_size_dynamic_sections): Only call
2396 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
2397 sections have been created.
2399 2017-04-26 Nick Clifton <nickc@redhat.com>
2402 * compress.c (bfd_init_section_compress_status): Check the return
2403 value from bfd_malloc.
2405 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
2407 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
2408 no_finish_dynamic_symbol.
2409 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
2411 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
2412 weak symbol, don't make it dynamic.
2413 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
2414 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
2415 relocation for GOT reference.
2416 (elf_x86_64_finish_dynamic_symbol): Abort if
2417 no_finish_dynamic_symbol isn't 0.
2419 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
2422 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
2423 undefined weak symbol, don't make it dynamic.
2424 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
2425 set no_finish_dynamic_symbol and generate R_386_RELATIVE
2426 relocation for R_386_GOT32.
2428 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
2431 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
2433 2017-04-23 Alan Modra <amodra@gmail.com>
2436 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
2437 * elf.c (lcomm_sym): New.
2438 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
2439 * bfd-in2.h: Regenerate.
2441 2017-04-23 Alan Modra <amodra@gmail.com>
2444 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
2445 parameters and comment.
2446 (_bfd_elf_get_reloc_section): Delete.
2447 (_bfd_elf_plt_get_reloc_section): Declare.
2448 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
2449 New functions. Don't blindly skip over assumed .rel/.rela prefix.
2451 (_bfd_elf_get_reloc_section): ..here. Delete.
2452 (assign_section_numbers): Call elf_get_reloc_section.
2453 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
2454 * elfxx-target.h (elf_backend_get_reloc_section): Update.
2456 2017-04-23 Alan Modra <amodra@gmail.com>
2459 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
2462 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
2465 * elf32-i386.c (elf_i386_link_hash_entry): Add
2466 no_finish_dynamic_symbol.
2467 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
2468 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
2469 symbol, don't make it dynamic in PIE.
2470 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
2471 set no_finish_dynamic_symbol and generate R_386_RELATIVE
2472 relocation for R_386_GOT32
2473 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
2476 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
2480 * elflink.c (elf_link_add_object_symbols): Require
2481 --no-dynamic-linker with -E/--dynamic-list when creating
2484 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
2486 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
2489 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
2491 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
2492 dynamic symbol sorting.
2494 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
2497 * elflink.c (elf_link_add_object_symbols): Preserve
2498 dynamic_ref_after_ir_def when restoring the symbol table for
2499 unneeded dynamic object.
2501 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
2504 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
2505 on on undefined IFUNC symbol in the second PLT.
2507 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
2509 * peXXigen.c (pe_print_reloc): Correct chunk_end.
2511 2017-04-19 Alan Modra <amodra@gmail.com>
2513 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
2514 or make dynamic for info->dynamic_undefined_weak 0 and 1.
2515 * elf32-ppc.c:Formatting.
2516 (ensure_undefweak_dynamic): Don't make dynamic when
2517 info->dynamic_undefined_weak is zero.
2518 (allocate_dynrelocs): Discard undefweak dyn_relocs for
2519 info->dynamic_undefined_weak. Discard undef dyn_relocs when
2520 not default visibility. Discard undef and undefweak
2522 (ppc_elf_relocate_section): Adjust to suit.
2523 * elf64-ppc.c: Formatting.
2524 (ensure_undefweak_dynamic): Don't make dynamic when
2525 info->dynamic_undefined_weak is zero.
2526 (allocate_dynrelocs): Discard undefweak dyn_relocs for
2527 info->dynamic_undefined_weak. Discard them earlier.
2529 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
2532 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
2533 before generating the version definition section.
2535 2017-04-17 Alan Modra <amodra@gmail.com>
2537 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
2538 state when a regular object file defines a symbol with
2539 incompatible type to that defined by an earlier shared lib.
2541 2017-04-13 Alan Modra <amodra@gmail.com>
2543 * coffcode.h: Wrap some overly long _bfd_error_handler args.
2545 * elf32-arm.c: Likewise.
2546 * elf32-i386.c: Likewise.
2547 * elf32-mep.c: Likewise.
2548 * elf64-ia64-vms.c: Likewise.
2549 * elf64-x86-64.c: Likewise.
2550 * elflink.c: Likewise.
2551 * elfnn-ia64.c: Likewise.
2552 * elfxx-mips.c: Likewise.
2554 2017-04-13 Alan Modra <amodra@gmail.com>
2556 * aoutx.h: Use %B and %A in error messages throughout file.
2557 * aout-cris.c: Likewise.
2558 * archive.c: Likewise.
2559 * binary.c: Likewise.
2560 * coff-rs6000.c: Likewise.
2561 * coff-tic4x.c: Likewise.
2562 * coffcode.h: Likewise.
2563 * coffgen.c: Likewise.
2564 * cofflink.c: Likewise.
2565 * coffswap.h: Likewise.
2566 * cpu-arm.c: Likewise.
2567 * elf-eh-frame.c: Likewise.
2568 * elf-m10300.c: Likewise.
2570 * elf32-arc.c: Likewise.
2571 * elf32-arm.c: Likewise.
2572 * elf32-bfin.c: Likewise.
2573 * elf32-frv.c: Likewise.
2574 * elf32-iq2000.c: Likewise.
2575 * elf32-m32c.c: Likewise.
2576 * elf32-microblaze.c: Likewise.
2577 * elf32-nds32.c: Likewise.
2578 * elf32-rl78.c: Likewise.
2579 * elf32-rx.c: Likewise.
2580 * elf32-score.c: Likewise.
2581 * elf32-score7.c: Likewise.
2582 * elf32-sh64.c: Likewise.
2583 * elf32-v850.c: Likewise.
2584 * elf32-vax.c: Likewise.
2585 * elf32-visium.c: Likewise.
2586 * elf64-ia64-vms.c: Likewise.
2587 * elf64-mmix.c: Likewise.
2588 * elf64-sh64.c: Likewise.
2589 * elfcode.h: Likewise.
2590 * elfnn-aarch64.c: Likewise.
2591 * elfnn-ia64.c: Likewise.
2592 * elfxx-mips.c: Likewise.
2593 * hpux-core.c: Likewise.
2596 * linker.c: Likewise.
2597 * merge.c: Likewise.
2599 * oasys.c: Likewise.
2600 * pdp11.c: Likewise.
2601 * peXXigen.c: Likewise.
2602 * rs6000-core.c: Likewise.
2603 * vms-alpha.c: Likewise.
2604 * xcofflink.c: Likewise.
2606 2017-04-13 Alan Modra <amodra@gmail.com>
2608 * bfd.c (PRINT_TYPE): Define.
2609 (_doprnt): New function.
2610 (error_handler_internal): Use _doprnt.
2611 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
2612 calls in their natural order, throughout file.
2613 * coff-mcore.c: Likewise.
2614 * coff-ppc.c: Likewise.
2615 * coff-tic80.c: Likewise.
2616 * cofflink.c: Likewise.
2617 * elf-s390-common.c: Likewise.
2619 * elf32-arm.c: Likewise.
2620 * elf32-i386.c: Likewise.
2621 * elf32-m32r.c: Likewise.
2622 * elf32-msp430.c: Likewise.
2623 * elf32-spu.c: Likewise.
2624 * elf64-ia64-vms.c: Likewise.
2625 * elf64-sparc.c: Likewise.
2626 * elf64-x86-64.c: Likewise.
2627 * elflink.c: Likewise.
2628 * elfnn-aarch64.c: Likewise.
2629 * elfnn-ia64.c: Likewise.
2630 * elfxx-mips.c: Likewise.
2632 2017-04-13 Alan Modra <amodra@gmail.com>
2634 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
2635 branch veneers" error. Fix double space and format message.
2636 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
2637 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
2639 2017-04-13 Alan Modra <amodra@gmail.com>
2641 * bfd-in2.h: Regenerate.
2643 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
2645 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
2646 extra `\n' in warning/error messages.
2647 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
2648 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
2650 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
2652 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
2653 processor-specific properties with generic ELF target vector.
2655 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
2657 * elf32-sparc.c (elf_backend_fixup_symbol): New.
2658 * elf64-sparc.c (elf_backend_fixup_symbol): New.
2659 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
2660 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
2662 (link_hash_newfunc): Initialize has_got_reloc and
2664 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
2666 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
2668 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
2670 (_bfd_sparc_elf_fixup_symbol): New function.
2671 (allocate_dynrelocs): Don't allocate space for dynamic
2672 relocations and discard relocations against resolved undefined
2673 weak symbols in executable. Don't make resolved undefined weak
2674 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
2675 relocation against undefined weak symbols in PIE.
2676 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
2677 relocations against resolved undefined weak symbols in PIE
2678 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
2679 without ynamic PLT/GOT relocations for resolved undefined weak
2681 Don't generate dynamic relocation against resolved undefined
2682 weak symbol in executable.
2683 (pie_finish_undefweak_symbol): New function.
2684 (_bfd_sparc_elf_finish_dynamic_sections): Call
2685 pie_finish_undefweak_symbol on all symbols in PIE.
2686 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
2687 (_bfd_sparc_elf_fixup_symbol): New function.
2689 2017-04-10 Nick Clifton <nickc@redhat.com>
2691 * config.bfd: Remove ns32k from obsolete list.
2693 2017-04-10 Alan Modra <amodra@gmail.com>
2696 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
2697 (special_sections_i): Likewise for .init_array.
2698 (special_sections_p): Likewise for .preinit_array.
2700 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
2704 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
2705 ELF_COMMON_DEF_P for common symbols.
2706 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
2707 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
2708 * elflink.c (_bfd_elf_merge_symbol): Revert commits
2709 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
2710 07492f668d2173da7a2bda3707ff0985e0f460b6.
2712 2017-04-07 Pedro Alves <palves@redhat.com>
2714 * opncls.c (bfd_get_debug_link_info): Rename to...
2715 (bfd_get_debug_link_info_1): ... this. Change type of second
2716 parameter to void pointer. Adjust.
2717 (bfd_get_debug_link_info): Reimplement on top of
2718 bfd_get_debug_link_info_1.
2719 (separate_debug_file_exists, separate_alt_debug_file_exists):
2720 Change type of second parameter to void pointer. Adjust.
2721 (get_func_type, check_func_type): Change type of second parameter
2723 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
2724 the callback functions instead of passing the address of a local.
2725 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
2726 find_separate_debug_file.
2727 (get_alt_debug_link_info_shim): Change type of second parameter to
2728 void pointer. Adjust.
2729 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
2730 find_separate_debug_file.
2731 (get_build_id_name, bfd_boolean check_build_id_file): Change type
2732 of second parameter to void pointer. Adjust.
2733 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
2734 pointer local to find_separate_debug_file.
2736 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
2738 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
2739 external symbols with a definition.
2740 (_bfd_coff_gc_mark_extra_sections): Fix typo.
2742 2017-04-07 Alan Modra <amodra@gmail.com>
2744 * po/SRC-POTFILES.in: Regenerate.
2746 2017-04-05 Alan Modra <amodra@gmail.com>
2748 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
2751 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
2753 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
2754 numbers for DataDirectory entry indicies passed to
2757 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
2759 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
2760 each GNU_MBIND section and align GNU_MBIND section to page size.
2761 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
2762 segment for each GNU_MBIND section.
2763 (_bfd_elf_init_private_section_data): Copy sh_info from input
2764 for GNU_MBIND section.
2766 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
2768 * elfnn-riscv.c (GP_NAME): Delete.
2769 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
2770 (_bfd_riscv_relax_lui): Likewise.
2772 2017-04-04 Nick Clifton <nickc@redhat.com>
2775 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
2777 (bfd_elf_final_link): Only initialize the extended symbol index
2778 section if there are extended symbol tables to list.
2780 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
2782 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
2783 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
2784 * configure.ac (elf): Add elf-properties.lo.
2785 * Makefile.in: Regenerated.
2786 * configure: Likewise.
2787 * elf-bfd.h (elf_property_kind): New.
2788 (elf_property): Likewise.
2789 (elf_property_list): Likewise.
2790 (elf_properties): Likewise.
2791 (_bfd_elf_parse_gnu_properties): Likewise.
2792 (_bfd_elf_get_property): Likewise.
2793 (_bfd_elf_link_setup_gnu_properties): Likewise.
2794 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
2795 and setup_gnu_properties.
2796 (elf_obj_tdata): Add properties.
2797 * elf-properties.c: New file.
2798 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
2799 (elf_i386_merge_gnu_properties): Likewise.
2800 (elf_backend_parse_gnu_properties): Likewise.
2801 (elf_backend_merge_gnu_properties): Likewise.
2802 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
2803 (elf_x86_64_merge_gnu_properties): Likewise.
2804 (elf_backend_parse_gnu_properties): Likewise.
2805 (elf_backend_merge_gnu_properties): Likewise.
2806 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
2807 (elf_backend_parse_gnu_properties): Likewise.
2808 (elf_backend_setup_gnu_properties): Likewise.
2809 (elfNN_bed): Add elf_backend_parse_gnu_properties,
2810 elf_backend_merge_gnu_properties and
2811 elf_backend_setup_gnu_properties.
2813 2017-03-30 Pip Cet <pipcet@gmail.com>
2815 * elf32-wasm32.c: Add relocation code, two relocs.
2816 * reloc.c: Add wasm32 relocations.
2817 * libbfd.h: Regenerate.
2818 * bfd-in2.h: Regenerate.
2819 * bfd/po/bfd.pot: Regenerate.
2821 2017-03-29 Nick Clifton <nickc@redhat.com>
2824 * coff-bfd.h (struct coff_section_data): Add new fields:
2825 saved_bias and bias.
2826 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
2827 computed for PE binaries.
2828 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
2831 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
2834 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
2835 to handle a local symbol with a hash-symbol-entry; without PLT.
2836 Add BFD_ASSERT for an incidental case with GOT entry present.
2837 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
2838 isn't forced-or-set local.
2840 2017-03-27 Pip Cet <pipcet@gmail.com>
2842 * wasm-module.c: New file to support WebAssembly modules.
2843 * wasm-module.h: New file to support WebAssembly modules.
2844 * doc/webassembly.texi: Start documenting wasm-module.c.
2845 * config.bfd: Add wasm_vec.
2846 * targets.c: Likewise.
2847 * configure.ac: Likewise.
2848 * Makefile.am: Add entries for wasm-module.c.
2849 * Makefile.in: Regenerate.
2850 * configure: Regenerate.
2851 * po/SRC-POTFILES.in: Regenerate.
2853 2017-03-27 Pip Cet <pipcet@gmail.com>
2855 * cpu-wasm32.c: New file to support wasm32 architecture.
2856 * elf32-wasm32.c: New file to support wasm32 architecture.
2857 * Makefile.am: Add wasm32 architecture.
2858 * archures.c: Likewise.
2859 * config.bfd: Likewise.
2860 * configure.ac: Likewise.
2861 * targets.c: Likewise.
2862 * Makefile.in: Regenerate.
2863 * bfd-in2.h: Regenerate.
2864 * configure: Regenerate.
2865 * po/SRC-POTFILES.in: Regenerate.
2867 2017-03-20 Alan Modra <amodra@gmail.com>
2870 * elf64-ppc.c (compare_symbols): Stabilize sort.
2872 2017-03-18 Alan Modra <amodra@gmail.com>
2874 * elf64-ppc.c (struct ppc_link_hash_table): Add
2875 local_ifunc_resolver and maybe_local_ifunc_resolver.
2876 (ppc_build_one_stub): Set flags on emitting dynamic
2877 relocation to ifunc.
2878 (ppc64_elf_relocate_section): Likewise.
2879 (ppc64_elf_finish_dynamic_symbol): Likewise.
2880 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
2881 local dynamic relocs to ifuncs.
2882 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
2883 local_ifunc_resolver and maybe_local_ifunc_resolver.
2884 (ppc_elf_relocate_section): Set flag on emitting dynamic
2885 relocation to ifuncs.
2886 (ppc_elf_finish_dynamic_symbol): Likewise.
2887 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
2888 dynamic relocs to ifuncs.
2890 2017-03-13 Nick Clifton <nickc@redhat.com>
2893 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
2894 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
2895 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
2896 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
2897 * bfd-in2.h: Regenerate.
2898 * libbfd.h: Regenerate.
2899 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
2901 (IS_AARCH64_TLSDESC_RELOC): Likewise.
2902 (elfNN_aarch64_howto_table): Likewise.
2903 (aarch64_tls_transition_without_check): Likewise.
2904 (aarch64_reloc_got_type): Likewise.
2905 (elfNN_aarch64_final_link_relocate): Likewise.
2906 (elfNN_aarch64_tls_relax): Likewise.
2907 (elfNN_aarch64_relocate_section): Likewise.
2908 (elfNN_aarch64_gc_sweep_hook): Likewise.
2909 (elfNN_aarch64_check_relocs): Likewise.
2910 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
2911 (_bfd_aarch64_elf_resolve_relocation): Likewise.
2913 2017-03-11 Alan Modra <amodra@gmail.com>
2915 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
2916 parameter is in fact used. Whitespace fixes.
2917 * elf64-ppc.c: Likewise.
2919 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
2921 * rs6000-core.c (CORE_NEW): Simplify macro when
2922 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
2924 2017-03-07 Alan Modra <amodra@gmail.com>
2928 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
2931 2017-03-05 Alan Modra <amodra@gmail.com>
2933 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
2934 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
2935 (next_cie_fde_offset): New function.
2936 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
2937 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
2938 four bytes. Align CIEs to four or eight bytes depending on
2939 per_encoding_aligned8. Align FDEs according to their encoding.
2940 Pad last FDE to output section alignment.
2941 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
2943 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
2944 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
2945 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
2947 2017-03-02 Martin Bickel <binutils@ineranves.de>
2950 * elf.c (rewrite_elf_program_header): Do not issue a warning for
2951 empty segments which have a zero filesz, but a non-zero memsz.
2953 2017-03-02 Alan Modra <amodra@gmail.com>
2955 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
2957 2017-02-28 Alan Modra <amodra@gmail.com>
2959 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
2960 (ppc64_elf_relocate_section): Likewise.
2962 2017-02-28 Alan Modra <amodra@gmail.com>
2965 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
2966 rather than elf32_nios2_hash_table or elf_hash_table.
2967 (create_got_section): Likewise.
2968 (nios2_elf32_finish_dynamic_symbol): Likewise.
2969 (nios2_elf32_adjust_dynamic_symbol): Likewise.
2970 (nios2_elf32_size_dynamic_sections): Likewise.
2971 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
2972 vars. Use htab equivalents directly instead. Don't create
2973 all dynamic sections on needing just the GOT. Use a goto
2974 rather than a fall-through with reloc test. Ensure
2975 htab->dynobj is set when making dynamic sreloc section.
2976 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
2977 equivalent directly instead. Don't segfault on looking for
2978 .dynamic when dynamic sections have not been created. Don't
2979 segfault on .got.plt being discarded.
2980 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
2981 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
2982 fixme and another not so relevant comment.
2983 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
2984 already set, set hash table dynobj on creating .sbss.
2986 2017-02-28 Alan Modra <amodra@gmail.com>
2988 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
2989 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
2990 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
2991 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
2992 (ppc64_elf_relocate_section): Likewise.
2993 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
2994 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
2995 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
2996 * libbfd.h: Regenerate.
2997 * bfd-in2.h: Regenerate.
2999 2017-02-28 Alan Modra <amodra@gmail.com>
3001 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
3002 dynamic .data.rel.ro read-only.
3003 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
3004 rather than section flags when deciding where copy reloc goes.
3005 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
3006 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
3007 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
3008 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
3009 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
3010 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
3011 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
3012 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
3013 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3014 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
3015 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
3016 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
3017 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3018 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
3019 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
3020 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
3021 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
3022 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
3023 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
3025 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
3027 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
3028 `jalr $0, $25' instruction encoding.
3030 2017-02-27 Nick Clifton <nickc@redhat.com>
3033 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
3034 generating a seg-fault when encountering a symbol that has been
3035 deleted by garbage collection.
3037 2017-02-25 Alan Modra <amodra@gmail.com>
3039 * elf32-arc.c (struct dynamic_sections): Delete.
3040 (enum dyn_section_types): Delete.
3041 (dyn_section_names): Delete.
3042 (arc_create_dynamic_sections): Delete.
3043 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
3044 segfault on discarded .rela.plt section.
3045 (elf_arc_size_dynamic_sections): Formatting. Don't call
3046 arc_create_dynamic_sections. Don't allocate memory for sections
3047 handled by the generic linker. Correct code finding relocs in
3048 read-only sections. Set SEC_EXCLUDE on zero size .got,
3049 .got.plt, and .dynbss sections. Do set .interp for pies.
3051 2017-02-24 Andrew Waterman <andrew@sifive.com>
3053 * elfnn-riscv.c (GP_NAME): New macro.
3054 (riscv_global_pointer_value): Use it.
3055 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
3056 output section, consider only that section's alignment.
3058 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
3060 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
3061 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
3062 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
3063 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
3065 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
3067 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
3068 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
3071 2017-02-23 Alan Modra <amodra@gmail.com>
3074 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
3076 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
3077 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
3080 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
3083 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
3084 processing ahead of the call to `elf_gc_sweep_symbol'.
3086 2017-02-22 Nick Clifton <nickc@redhat.com>
3089 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
3090 created section 4-byte alignment.
3092 2017-02-22 Alan Modra <amodra@gmail.com>
3094 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
3095 on .got or .plt output section being discarded by script.
3096 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
3099 2017-02-21 Alan Modra <amodra@gmail.com>
3101 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
3102 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
3104 2017-02-20 Alan Modra <amodra@gmail.com>
3107 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
3108 if DT_RELSZ/DT_RELASZ is zero.
3110 2017-02-17 Nick Clifton <nickc@redhat.com>
3112 * compress.c (bfd_get_full_section_contents): Remember to reduce
3113 compressed size by the sizeof the compression header when
3114 decompressing the contents.
3116 2017-02-17 Pedro Alves <palves@redhat.com>
3118 * srec.c (Chunk): Rename to ...
3119 (_bfd_srec_len): ... this.
3120 (S3Forced): Rename to ...
3121 (_bfd_srec_forceS3): ... this.
3122 * objcopy.c: Adjust all references.
3124 2017-02-17 Pedro Alves <palves@redhat.com>
3126 * archive.c (bsd_write_armap): Rename to ...
3127 (_bfd_bsd_write_armap): ... this.
3128 (coff_write_armap): Rename to ...
3129 (_bfd_coff_write_armap): ... this.
3130 * libbfd-in.h (bsd_write_armap): Rename to ...
3131 (_bfd_bsd_write_armap): ... this.
3132 (coff_write_armap): Rename to ...
3133 (_bfd_coff_write_armap): ... this.
3134 * aout-target.h, aout-tic30.c: Adjust all users.
3135 * libbfd.h: Regenerate.
3137 2017-02-17 Pedro Alves <palves@redhat.com>
3139 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
3140 (warn_deprecated): Rename to ...
3141 (_bfd_warn_deprecated): ... this.
3142 * libbfd.c (warn_deprecated): Rename to ...
3143 (_bfd_warn_deprecated): ... this.
3144 * bfd-in2.h: Regenerate.
3146 2017-02-17 Pedro Alves <palves@redhat.com>
3148 * bfdio.c (real_ftell): Rename to ...
3149 (_bfd_real_ftell): ... this.
3150 (real_fseek): Rename to ...
3151 (_bfd_real_fseek): ... this.
3152 (real_fopen): Rename to ...
3153 (_bfd_real_fopen): ... this.
3154 * libbfd-in.h (real_ftell): Rename to ...
3155 (_bfd_real_ftell): ... this.
3156 (real_fseek): Rename to ...
3157 (_bfd_real_fseek): ... this.
3158 (real_fopen): Rename to ...
3159 (_bfd_real_fopen): ... this.
3160 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
3161 * libbfd.h: Regenerate.
3163 2017-02-17 Pedro Alves <palves@redhat.com>
3165 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
3166 * libbfd.c (read_unsigned_leb128): Rename to ...
3167 (_bfd_read_unsigned_leb128): ... this.
3168 (read_signed_leb128): Rename to ...
3169 (_bfd_read_signed_leb128): ... this.
3170 (safe_read_leb128): Rename to ...
3171 (_bfd_safe_read_leb128): ... this.
3172 * libbfd-in.h (read_unsigned_leb128): Rename to ...
3173 (_bfd_read_unsigned_leb128): ... this.
3174 (read_signed_leb128): Rename to ...
3175 (_bfd_read_signed_leb128): ... this.
3176 (safe_read_leb128): Rename to ...
3177 (_bfd_safe_read_leb128): ... this.
3178 * libbfd.h: Renegerate.
3180 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
3182 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
3183 before trying to fine matching file and line information.
3185 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
3187 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
3188 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
3189 not match current bfd, then reload debug information. Record bfd
3190 we're loading debug info for in the stash. If we have debug
3191 informatin in the cache then perform section placement before
3194 2017-02-16 Alan Modra <amodra@gmail.com>
3197 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
3198 * elfxx-target.h (elf_backend_no_page_alias): Define.
3199 (elfNN_bed): Init new field.
3200 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
3201 ensure PT_LOAD segment starts on a new page.
3202 * elf32-hppa.c (elf_backend_no_page_alias): Define.
3204 2017-02-16 Alan Modra <amodra@gmail.com>
3207 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
3210 2017-02-16 Jiong Wang <jiong.wang@arm.com>
3212 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
3213 * bfd-in2.h: Regenerated.
3215 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
3218 * elf32-i386.c (elf_i386_relocate_section): Allow
3219 "lea foo@GOT, %reg" in PIC.
3221 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
3224 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
3225 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
3226 error against local IFUNC symbol without a base register for
3229 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
3231 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
3232 `%P: %H:' with `info->callbacks->einfo'.
3233 (ppc_elf_relocate_section): Likewise.
3234 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
3235 (ppc64_elf_edit_toc): Likewise.
3236 (ppc64_elf_relocate_section): Likewise.
3238 2017-02-14 Alan Modra <amodra@gmail.com>
3240 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
3241 --gc-keep-exported, and test versioned field of sym rather than
3242 looking for @ in name.
3244 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
3246 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
3249 2017-02-13 Nick Clifton <nickc@redhat.com>
3252 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
3255 2017-02-07 Andrew Waterman <andrew@sifive.com>
3257 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
3258 entry size if PLT header is written.
3260 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
3262 Fix sparc64 dynamic relocation processing to use the dynamic
3264 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
3265 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
3268 2017-02-03 Nick Clifton <nickc@redhat.com>
3271 * coffcode.h (coff_write_object_contents): Enlarge size of
3272 s_name_buf in order to avoid compile time warning about possible
3274 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
3275 32-bits of insn value before printing into buffer.
3277 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3279 * elfxx-mips.c (mips_elf_hash_sort_data): Add
3280 `max_local_dynindx'.
3281 (mips_elf_sort_hash_table): Handle it.
3282 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
3283 symbols bump up `max_local_dynindx' rather than
3284 `max_non_got_dynindx'.
3286 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3288 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
3289 `min_got_dynindx', `max_unref_got_dynindx' and
3290 `max_non_got_dynindx' members to the `bfd_size_type' data type.
3291 (mips_elf_sort_hash_table): Adjust accordingly.
3293 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3295 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
3296 to access the hash table.
3298 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3300 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
3301 non-NULL `htab' to the beginning.
3303 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3305 * elflink.c (elf_gc_sweep): Wrap overlong line.
3307 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
3309 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
3310 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
3311 * elfxx-mips.c (mips_elf_link_hash_table): Add
3312 `ignore_branch_isa' member.
3313 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
3314 in branch relocation calculation as an error if
3315 `ignore_branch_isa' has been set.
3316 (_bfd_mips_elf_insn32): Rename to...
3317 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
3318 parameter to `insn32' and add an `ignore_branch_isa' parameter.
3319 Handle the new parameter.
3321 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
3323 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
3324 local variable dynobj.
3327 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
3328 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
3329 executable from read-only sections into sdynrelro.
3330 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
3331 dynamic relocs in sdynrelro.
3332 (elf_backend_want_dynrelro): Define.
3334 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
3336 * config.bfd (*-*-rtemsaout*): Mark as removed.
3338 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
3340 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
3341 (arm-*-rtems*): Move to (arm*-*-eabi*).
3342 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
3343 (m68-*-rtems*): Move to (m68*-*-elf*).
3345 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
3347 * config.bfd (*-*-rtemscoff*): Mark as removed.
3349 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
3352 * elflink.c (bfd_elf_record_link_assignment): Revert last
3353 change and don't ever clear `forced_local'. Set `mark'
3355 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
3357 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
3358 (bfd_elf_size_dynamic_sections): ... here.
3359 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
3360 and set `mark' instead in `__tls_get_addr_opt' processing.
3361 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
3363 2017-01-24 Alan Modra <amodra@gmail.com>
3365 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
3366 where dynamic relocs are preferable. Allow ifunc too.
3367 (ensure_undefweak_dynamic): New function.
3368 (allocate_dynrelocs): Use it here. Move plt handling last and
3369 don't make symbols dynamic, simplifying loop. Only make undef
3370 weak symbols with GOT entries dynamic. Correct condition
3371 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
3372 comments. Remove goto.
3373 (ppc_elf_relocate_section): Correct test for using dynamic
3374 symbol on GOT relocs. Rearrange test for emitting GOT relocs
3375 to suit. Set up explicit tls_index entries and implicit GOT
3376 tls_index entries resolvable at link time for
3377 __tls_get_addr_opt. Simplify test to clear mem for prelink.
3378 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
3379 (ensure_undefweak_dynamic): New function.
3380 (allocate_dynrelocs): Use it here. Only make undef weak symbols
3381 with GOT entries dynamic. Remove unnecessary test of
3382 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
3383 (ppc64_elf_relocate_section): Correct test for using dynamic
3384 symbol on GOT relocs. Rearrange test for emitting GOT relocs
3385 to suit. Set up explicit tls_index entries and implicit GOT
3386 tls_index entries resolvable at link time for __tls_get_addr_opt.
3387 Simplify expression to clear mem for prelink.
3389 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
3391 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
3393 2017-01-20 Jiong Wang <jiong.wang@arm.com>
3395 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
3396 (elf_backend_hash_symbol): Define.
3398 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
3401 * elflink.c (bfd_elf_record_link_assignment): Clear any
3402 `forced_local' marking for DSO symbols that are not being
3405 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
3407 * elfnn-riscv.c (riscv_elf_object_p): New function.
3409 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
3412 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
3414 (elf_x86_64_check_relocs): Create .eh_frame section for the
3416 (elf_x86_64_size_dynamic_sections): Allocate and initialize
3417 .eh_frame section for the .plt.bnd section.
3418 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
3419 for the .plt.bnd section.
3421 2017-01-12 Nick Clifton <nickc@redhat.com>
3424 * opncls.c (find_separate_debug_file): Add include_dirs
3425 parameter. Only include the directory part of the bfd's filename
3426 in search paths if include_dirs is true. Add a couple of extra
3427 locations for looking for debug files.
3428 ( bfd_follow_gnu_debuglink): Update invocation of
3429 find_separate_debug_file.
3430 (bfd_follow_gnu_debugaltlink): Likewise.
3431 (get_build_id): New function: Finds the build-id of the given bfd.
3432 (get_build_id_name): New function: Computes the name of the
3433 separate debug info file for a bfd, based upon its build-id.
3434 (check_build_id_file): New function: Checks to see if a separate
3435 debug info file exists at the given location, and that its
3436 build-id matches that of the original bfd.
3437 (bfd_follow_build_id_debuglink): New function: Finds a separate
3438 debug info file for a given bfd by using the build-id method.
3439 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
3440 method of locating a separate debug info file before using the
3442 * bfd-in2.h: Regenerate.
3444 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
3447 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
3448 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
3449 elf_x86_64_eh_frame_plt_got.
3450 (elf_x86_64_size_dynamic_sections): Get unwind info from
3451 elf_x86_64_bnd_arch_bed for the BND PLT.
3453 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
3455 * config.bfd: Add entries for i686-redox and x86_64-redox.
3457 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
3459 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
3461 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
3462 .eh_frame section to 4 bytes for x32.
3463 (elf_x86_64_check_relocs): Likewise.
3465 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
3468 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
3469 (PLT_GOT_FDE_LENGTH): Likewise.
3470 (elf_i386_plt_layout): Add eh_frame_plt_got and
3471 eh_frame_plt_got_size.
3472 (elf_i386_plt): Updated.
3473 (elf_i386_link_hash_table): Add plt_got_eh_frame.
3474 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
3475 (elf_i386_size_dynamic_sections): Allocate and initialize
3476 .eh_frame section for .plt.got.
3477 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
3479 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
3480 eh_frame_plt_got_size.
3481 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
3482 (PLT_GOT_FDE_LENGTH): Likewise.
3483 (elf_x86_64_backend_data): Add eh_frame_plt_got and
3484 eh_frame_plt_got_size.
3485 (elf_x86_64_arch_bed): Updated.
3486 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
3487 eh_frame_plt_got_size.
3488 (elf_x86_64_nacl_arch_bed): Likewise.
3489 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
3490 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
3491 (elf_x86_64_size_dynamic_sections): Allocate and initialize
3492 .eh_frame section for .plt.got.
3493 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
3496 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
3498 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
3499 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
3501 2017-01-09 Nick Clifton <nickc@redhat.com>
3503 * dwarf2.c (lookup_address_in_function_table): Return early if
3504 there are no functions in the given comp unit, or if the high
3505 address of the last function in the comp unit is less than the
3508 2017-01-09 Nick Clifton <nickc@redhat.com>
3511 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
3512 message if there are too many symbols to load.
3514 2017-01-04 James Clarke <jrtc27@jrtc27.com>
3516 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
3517 if relocs are cached.
3519 2017-01-03 Rich Felker <bugdal@aerifal.cx>
3522 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
3523 for R_MICROBLAZE_GOTOFF_64.
3525 2017-01-03 Nick Clifton <nickc@redhat.com>
3527 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
3528 warning about using a possibly uninitialised variable.
3530 2017-01-02 Alan Modra <amodra@gmail.com>
3532 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
3533 (allocate_plt_static, allocate_dynrelocs): Use it.
3535 2017-01-02 Alan Modra <amodra@gmail.com>
3537 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
3538 .PARISC.unwind section.
3540 2017-01-02 Alan Modra <amodra@gmail.com>
3543 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
3544 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
3545 indirect to GOT pointer relative code edit.
3547 2017-01-02 Alan Modra <amodra@gmail.com>
3549 Update year range in copyright notice of all files.
3551 For older changes see ChangeLog-2016
3553 Copyright (C) 2017 Free Software Foundation, Inc.
3555 Copying and distribution of this file, with or without modification,
3556 are permitted in any medium without royalty provided the copyright
3557 notice and this notice are preserved.
3563 version-control: never