1 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
3 * elf32-i386.c (ELF_DYNAMIC_INTERPRETER): Removed.
4 (elf_i386_lazy_plt_layout): Likewise.
5 (elf_i386_non_lazy_plt_layout): Likewise.
6 (elf_i386_plt_layout): Likewise.
7 (elf_i386_link_hash_table): Likewise.
8 (elf_i386_next_tls_desc_index): Likewise.
9 (elf_i386_srelplt2): Likewise.
10 (elf_i386_plt): Likewise.
11 (elf_i386_lazy_plt): Likewise.
12 (elf_i386_non_lazy_plt): Likewise.
13 (elf_i386_link_hash_table_create): Likewise.
14 (bfd_elf32_bfd_link_hash_table_create): Likewise.
15 (elf_i386_lazy_plt): Updated.
16 (elf_i386_non_lazy_plt): Likewise.
17 (elf_i386_lazy_ibt_plt): Likewise.
18 (elf_i386_non_lazy_ibt_plt): Likewise.
19 (elf_i386_allocate_dynrelocs): Likewise.
20 (elf_i386_size_dynamic_sections): Likewise.
21 (elf_i386_relocate_section): Likewise.
22 (elf_i386_finish_dynamic_symbol): Likewise.
23 (elf_i386_finish_dynamic_sections): Likewise.
24 (elf_i386_get_synthetic_symtab): Likewise.
25 (elf_i386_link_setup_gnu_properties): Likewise.
26 (elf_i386_nacl_plt): Likewise.
27 * elf64-x86-64.c (ABI_64_P): Removed.
28 (ELF64_DYNAMIC_INTERPRETER): Likewise.
29 (ELF32_DYNAMIC_INTERPRETER): Likewise.
30 (elf_x86_64_lazy_plt_layout): Likewise.
31 (elf_x86_64_non_lazy_plt_layout): Likewise.
32 (elf_x86_64_plt_layout): Likewise.
33 (elf_x86_64_link_hash_table): Likewise.
34 (elf_x86_64_plt): Likewise.
35 (elf_x86_64_lazy_plt): Likewise.
36 (elf_x86_64_non_lazy_plt): Likewise.
37 (elf_x86_64_link_hash_table_create): Likewise.
38 (bfd_elf64_bfd_link_hash_table_create): Likewise.
39 (bfd_elf32_bfd_link_hash_table_create): Likewise.
40 (elf_x86_64_lazy_plt): Updated.
41 (elf_x86_64_non_lazy_plt): Likewise.
42 (elf_x86_64_lazy_bnd_plt): Likewise.
43 (elf_x86_64_non_lazy_bnd_plt): Likewise.
44 (elf_x86_64_lazy_ibt_plt): Likewise.
45 (elf_x32_lazy_ibt_plt): Likewise.
46 (elf_x86_64_non_lazy_ibt_plt): Likewise.
47 (elf_x32_non_lazy_ibt_plt): Likewise.
48 (elf_x86_64_allocate_dynrelocs): Likewise.
49 (elf_x86_64_size_dynamic_sections): Likewise.
50 (elf_x86_64_relocate_section): Likewise.
51 (elf_x86_64_finish_dynamic_symbol): Likewise.
52 (elf_x86_64_finish_dynamic_sections): Likewise.
53 (elf_x86_64_get_synthetic_symtab): Likewise.
54 (elf_x86_64_link_setup_gnu_properties): Likewise.
55 (elf_x86_64_nacl_plt): Likewise.
56 * elfxx-x86.c: Include "objalloc.h", "elf/i386.h" and
58 (ELF32_DYNAMIC_INTERPRETER): New.
59 (ELF64_DYNAMIC_INTERPRETER): Likewise.
60 (ELFX32_DYNAMIC_INTERPRETER): Likewise.
61 (_bfd_x86_elf_link_hash_table_create): Likewise.
62 (_bfd_x86_elf_link_hash_table_free): Renamed to ...
63 (elf_x86_link_hash_table_free): This. Make it static.
64 * elfxx-x86.h: Don't include "objalloc.h".
66 (elf_x86_lazy_plt_layout): Likewise.
67 (elf_x86_non_lazy_plt_layout): Likewise.
68 (elf_x86_plt_layout): Likewise.
69 (_bfd_x86_elf_link_hash_table_create): Likewise.
70 (bfd_elf64_bfd_link_hash_table_create): Likewise.
71 (bfd_elf32_bfd_link_hash_table_create): Likewise.
72 (elf_x86_link_hash_table): Add plt, lazy_plt, non_lazy_plt,
73 srelplt2 and next_tls_desc_index.
74 (_bfd_x86_elf_link_hash_table_free): Removed.
76 2017-08-30 Maciej W. Rozycki <macro@imgtec.com>
78 * elfxx-mips.c (mips_elf_perform_relocation): Correct microMIPS
79 branch offset interpretation.
81 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
84 * opncls.c (bfd_close_all_done): Call _close_and_cleanup.
86 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
88 * elf64-x86-64.c (elf_x86_64_next_tls_desc_index): Removed.
89 (elf_x86_64_srelplt2): Likewise.
91 2017-08-30 Alan Modra <amodra@gmail.com>
93 * elf64-ppc.c (struct ppc_link_hash_table): Add do_tls_opt.
94 (ppc64_elf_tls_optimize): Set it.
95 (ppc64_elf_relocate_section): Nop addis on TPREL16_HA, and convert
96 insn on TPREL16_LO and TPREL16_LO_DS relocs to use r13 when
98 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add do_tls_opt.
99 (ppc_elf_tls_optimize): Set it.
100 (ppc_elf_relocate_section): Nop addis on TPREL16_HA, and convert
101 insn on TPREL16_LO relocs to use r2 when addis would add zero.
103 2017-08-30 Alan Modra <amodra@gmail.com>
105 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing
106 __tls_get_addr call sequences to LE, don't move the addi down
107 to the nop. Replace the bl with addi and leave the nop alone.
109 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
111 * elf32-i386.c (elf_i386_pie_finish_undefweak_symbol):
113 * elf64-x86-64.c (elf_x86_64_finish_local_dynamic_symbol):
115 (elf_x86_64_pie_finish_undefweak_symbol): Likewise.
117 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
119 * Makefile.am (BFD32_BACKENDS): Add elfxx-x86.lo.
120 (BFD64_BACKENDS): Likewise.
121 (BFD32_BACKENDS_CFILES): Add elfxx-x86.c.
122 (BFD64_BACKENDS_CFILES): Likewise.
123 * Makefile.in: Regenerated.
124 * configure.ac (bfd_backends): Add elfxx-x86.lo together with
125 elf32-i386.lo and elf64-x86-64.lo.
126 * configure: Regenerated.
127 * elf32-i386.c: Include "elfxx-x86.h" instead of "sysdep.h",
128 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
129 "objalloc.h" and "hashtab.h".
130 (ELIMINATE_COPY_RELOCS): Removed.
131 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
132 (SYMBOL_NO_COPYRELOC): Likewise.
133 (elf_i386_link_hash_entry): Likewise.
134 (GOT_UNKNOWN): Likewise.
135 (GOT_NORMAL): Likewise.
136 (GOT_TLS_GD): Likewise.
137 (elf_i386_hash_entry): Likewise.
138 (elf_i386_obj_tdata): Likewise.
139 (elf_i386_tdata): Likewise.
140 (elf_i386_local_got_tls_type): Likewise.
141 (elf_i386_local_tlsdesc_gotent): Likewise.
142 (elf_i386_hash_table): Likewise.
143 (elf_i386_link_hash_newfunc): Likewise.
144 (elf_i386_local_htab_hash): Likewise.
145 (elf_i386_local_htab_eq): Likewise.
146 (elf_i386_get_local_sym_hash): Likewise.
147 (elf_i386_link_hash_table_free): Likewise.
148 (elf_i386_copy_indirect_symbol): Likewise.
149 (elf_i386_fixup_symbol): Likewise.
150 (elf_i386_readonly_dynrelocs): Likewise.
151 (elf_i386_always_size_sections): Likewise.
152 (elf_i386_set_tls_module_base): Likewise.
153 (elf_i386_dtpoff_base): Likewise.
154 (compare_relocs): Likewise.
155 (elf_i386_hash_symbol): Likewise.
156 (elf_i386_parse_gnu_properties): Likewise.
157 (elf_i386_merge_gnu_properties): Likewise.
158 (elf_i386_link_check_relocs): Likewise.
159 (elf_i386_merge_symbol_attribute): Likewise.
160 (bfd_elf32_bfd_link_check_relocs): Likewise.
161 (elf_backend_copy_indirect_symbol): Likewise.
162 (elf_backend_always_size_sections): Likewise.
163 (elf_backend_omit_section_dynsym): Likewise.
164 (elf_backend_hash_symbol): Likewise.
165 (elf_backend_fixup_symbol): Likewise.
166 (elf_backend_parse_gnu_properties): Likewise.
167 (elf_backend_merge_gnu_properties): Likewise.
168 (elf_backend_merge_symbol_attribute): Likewise.
169 (elf_i386_mkobject): Updated.
170 (elf_i386_link_hash_table_create): Likewise.
171 (elf_i386_check_tls_transition): Likewise.
172 (elf_i386_tls_transition): Likewise.
173 (elf_i386_convert_load_reloc): Likewise.
174 (elf_i386_check_relocs): Likewise.
175 (elf_i386_adjust_dynamic_symbol): Likewise.
176 (elf_i386_allocate_dynrelocs): Likewise.
177 (elf_i386_convert_load): Likewise.
178 (elf_i386_size_dynamic_sections): Likewise.
179 (elf_i386_relocate_section): Likewise.
180 (elf_i386_finish_dynamic_symbol ): Likewise.
181 (elf_i386_finish_dynamic_sections): Likewise.
182 (elf_i386_output_arch_local_syms): Likewise.
183 (elf_i386_get_synthetic_symtab): Likewise.
184 (elf_i386_link_setup_gnu_properties): Likewise.
185 (elf_i386_link_hash_table): Use elf_x86_link_hash_table, instead
186 of elf_link_hash_table, as base.
187 (elf_i386_next_tls_desc_index): New.
188 (elf_i386_srelplt2): Likewise.
189 (elf_i386_plt): Likewise.
190 (elf_i386_lazy_plt): Likewise.
191 (elf_i386_non_lazy_plt): Likewise.
192 * elf32-x86-64.c: Include "elfxx-x86.h" instead of "sysdep.h",
193 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
194 "objalloc.h" and "hashtab.h".
195 (ELIMINATE_COPY_RELOCS): Removed.
196 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
197 (SYMBOL_NO_COPYRELOC): Likewise.
198 (elf_x86_64_link_hash_entry): Likewise.
199 (GOT_UNKNOWN): Likewise.
200 (GOT_NORMAL): Likewise.
201 (GOT_TLS_GD): Likewise.
202 (elf_x86_64_hash_entry): Likewise.
203 (elf_x86_64_obj_tdata): Likewise.
204 (elf_x86_64_tdata): Likewise.
205 (elf_x86_64_local_got_tls_type): Likewise.
206 (elf_x86_64_local_tlsdesc_gotent): Likewise.
207 (elf_x86_64_hash_table): Likewise.
208 (elf_x86_64_link_hash_newfunc): Likewise.
209 (elf_x86_64_local_htab_hash): Likewise.
210 (elf_x86_64_local_htab_eq): Likewise.
211 (elf_x86_64_get_local_sym_hash): Likewise.
212 (elf_x86_64_link_hash_table_free): Likewise.
213 (elf_x86_64_copy_indirect_symbol): Likewise.
214 (elf_x86_64_fixup_symbol): Likewise.
215 (elf_x86_64_readonly_dynrelocs): Likewise.
216 (elf_x86_64_always_size_sections): Likewise.
217 (elf_x86_64_set_tls_module_base): Likewise.
218 (elf_x86_64_dtpoff_base): Likewise.
219 (compare_relocs): Likewise.
220 (elf_x86_64_merge_symbol_attribute): Likewise.
221 (elf_x86_64_hash_symbol): Likewise.
222 (elf_x86_64_parse_gnu_properties): Likewise.
223 (elf_x86_64_merge_gnu_properties): Likewise.
224 (elf_x86_64_link_check_relocs): Likewise.
225 (elf_backend_copy_indirect_symbol): Likewise.
226 (elf_backend_always_size_sections): Likewise.
227 (bfd_elf64_bfd_link_check_relocs): Likewise.
228 (elf_backend_merge_symbol_attribute): Likewise.
229 (elf_backend_hash_symbol): Likewise.
230 (elf_backend_omit_section_dynsym): Likewise.
231 (elf_backend_fixup_symbol): Likewise.
232 (elf_backend_parse_gnu_properties): Likewise.
233 (elf_backend_merge_gnu_properties): Likewise.
234 (bfd_elf32_bfd_link_check_relocs): Likewise.
235 (elf_x86_64_mkobject): Updated.
236 (elf_x86_64_link_hash_table_create): Likewise.
237 (elf_x86_64_check_tls_transition): Likewise.
238 (elf_x86_64_tls_transition): Likewise.
239 (elf_x86_64_convert_load_reloc): Likewise.
240 (elf_x86_64_check_relocs): Likewise.
241 (elf_x86_64_adjust_dynamic_symbol): Likewise.
242 (elf_x86_64_allocate_dynrelocs): Likewise.
243 (elf_x86_64_convert_load): Likewise.
244 (elf_x86_64_size_dynamic_sections): Likewise.
245 (elf_x86_64_relocate_section): Likewise.
246 (elf_x86_64_finish_dynamic_symbol ): Likewise.
247 (elf_x86_64_finish_dynamic_sections): Likewise.
248 (elf_x86_64_output_arch_local_syms): Likewise.
249 (elf_x86_64_get_synthetic_symtab): Likewise.
250 (elf_x86_64_link_setup_gnu_properties): Likewise.
251 (elf_x86_64_link_hash_table): Use elf_x86_link_hash_table,
252 instead of elf_link_hash_table, as base.
253 (elf_x86_64_next_tls_desc_index): New.
254 (elf_x86_64_srelplt2): Likewise.
255 (elf_x86_64_plt): Likewise.
256 (elf_x86_64_lazy_plt): Likewise.
257 (elf_x86_64_non_lazy_plt): Likewise.
258 * elfxx-x86.c: New file.
259 * elfxx-x86.h: Likewise.
261 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
263 * elf32-i386.c (elf_i386_get_synthetic_symtab): Simplify bad
265 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
267 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
269 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check valid PLT
270 sections before checking dynamic relocations and free invalid
271 PLT section contents.
272 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
274 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
276 * elf-bfd.h (_bfd_elf_ifunc_get_synthetic_symtab): Removed.
277 * elf-ifunc.c (_bfd_elf_ifunc_get_synthetic_symtab): Likewise.
279 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
282 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check for valid
284 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
286 2017-08-27 H.J. Lu <hongjiu.lu@intel.com>
288 * elf32-i386.c (elf_i386_link_hash_newfunc): Initialize
290 * elf64-x86-64.c (elf_x86_64_link_hash_newfunc): Likewise.
292 2017-08-26 H.J. Lu <hongjiu.lu@intel.com>
295 * elf-bfd.h (elf_obj_tdata): Use ENUM_BITFIELD on object_id,
296 dyn_lib_class and has_gnu_symbols. Change bad_symtab to bitfield.
297 Add a has_no_copy_on_protected bitfield.
298 (elf_has_no_copy_on_protected): New.
299 * elf-properties.c (_bfd_elf_parse_gnu_properties): Set
300 elf_has_no_copy_on_protected for GNU_PROPERTY_NO_COPY_ON_PROTECTED.
301 (elf_merge_gnu_property_list): Likewise.
302 (_bfd_elf_link_setup_gnu_properties): Set extern_protected_data
303 to FALSE for elf_has_no_copy_on_protected.
304 * elf32-i386.c (SYMBOL_NO_COPYRELOC): New.
305 (elf_i386_link_hash_entry): Add def_protected.
306 (elf_i386_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
307 when checking info->nocopyreloc.
308 (elf_i386_link_setup_gnu_properties): Don't set
309 extern_protected_data here.
310 (elf_i386_merge_symbol_attribute): New function.
311 (elf_backend_merge_symbol_attribute): New.
312 * elf64-x86-64.c (SYMBOL_NO_COPYRELOC): New.
313 (elf_x86_64_link_hash_entry): Add def_protected.
314 (elf_x86_64_need_pic): Report protected symbol for def_protected.
315 (elf_x86_64_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
316 when checking info->nocopyreloc.
317 (elf_x86_64_relocate_section): Also check for R_X86_64_PC32
318 relocation run-time overflow and unresolvable R_X86_64_32S
319 relocation against protected data symbol defined in shared object
320 with GNU_PROPERTY_NO_COPY_ON_PROTECTED.
321 (elf_x86_64_link_setup_gnu_properties): Don't set
322 extern_protected_data here.
323 (elf_x86_64_merge_symbol_attribute): New function.
324 (elf_backend_merge_symbol_attribute): New.
326 2017-08-26 Alan Modra <amodra@gmail.com>
328 * elf32-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
329 (ppc_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
330 (ppc_elf_relocate_section): Comment fix.
331 * elf64-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
332 (ppc64_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
333 Support dynamic relocs for TPREL16 when non-pic too.
334 (dec_dynrel_count): Adjust TPREL16 handling as per check_relocs.
335 (ppc64_elf_relocate_section): Support dynamic relocs for TPREL16
338 2017-08-25 H.J. Lu <hongjiu.lu@intel.com>
340 * elf32-i386.c (elf_i386_link_hash_entry): Remove redundant
341 "symbol" in comments.
342 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Likewise.
344 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
347 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for
348 R_X86_64_PC32 relocation run-time overflow and unresolvable
349 R_X86_64_32S relocation with -z nocopyreloc.
351 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
353 * elf32-i386.c (elf_i386_check_relocs): Revert the last change.
354 Undefined symbols may not have a type.
355 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
357 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
359 * elf64-x86-64.c (elf_x86_64_need_pic): Add an argument for
360 bfd_link_info. Report shared, PIE or PDE object based on
362 (elf_x86_64_check_relocs): Update elf_x86_64_need_pic call.
363 (elf_x86_64_relocate_section): Likewise.
365 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
367 * elf32-i386.c (elf_i386_check_relocs): Increment PLT count only
368 for function symbols.
369 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
371 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
373 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set
374 extern_protected_data to FALSE if GNU_PROPERTY_NO_COPY_ON_PROTECTED
375 is set on any input relocatable file.
376 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
378 2017-08-23 Alan Modra <amodra@gmail.com>
381 * elf64-ppc.c (ensure_undef_dynamic): Rename from
382 ensure_undefweak_dynamic. Handle undefined too.
383 * elf32-ppc.c (ensure_undef_dynamic): Likewise.
384 * elf32-hppa.c (ensure_undef_dynamic): Likewise.
385 (allocate_dynrelocs): Discard undefined non-default visibility
386 relocs first. Make undefined syms dynamic. Tidy goto.
388 2017-08-21 Alan Modra <amodra@gmail.com>
389 H.J. Lu <hongjiu.lu@intel.com>
392 * elf-bfd.h (SYMBOLIC_BIND): Return TRUE for __start/__stop symbols.
393 * elflink.c (bfd_elf_define_start_stop): Rewrite.
395 2017-08-21 Hans-Peter Nilsson <hp@bitrange.com>
398 * elf64-mmix.c (mmix_elf_relax_section): Correct handling of
399 undefined weak symbols.
401 2017-08-18 Nick Clifton <nickc@redhat.com>
404 * tekhex.c (getsym): Fix check for source pointer walking off the
405 end of the input buffer.
407 2017-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
410 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Skip IFUNC
411 relocations in debug sections, change abort to _bfd_error_handler.
413 2017-08-14 Nick Clifton <nickc@redhat.com>
416 * elf.c (setup_group): Check for an empty or very small group
418 * po/bfd.pot: Regenerate.
420 2017-08-14 Alan Modra <amodra@gmail.com>
423 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't add
424 alignment padding here.
425 * elflink.c (bfd_elf_discard_info): Add .eh_frame padding here
426 in a reverse pass over sections.
428 2017-08-11 H.J. Lu <hongjiu.lu@intel.com>
431 * elf32-i386.c (elf_i386_get_synthetic_symtab): Allocate space
432 for @plt suffixes first.
433 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
435 2017-08-08 Nick Clifton <nickc@redhat.com>
438 * elf-attrs.c (_bfd_elf_parse_attributes): Complain about very
439 small section lengths.
440 * elf.c (_bfd_elf_setup_sections): Skip empty entries in the group
442 (elfcore_grok_freebsd_prstatus): Add checks to make sure that
443 there is enough data present in the note.
445 2017-08-08 Alan Modra <amodra@gmail.com>
448 * elf32-microblaze.c (microblaze_elf_check_relocs): Don't bump
449 got.refcount for GOTOFF relocs, just create .got section.
451 2017-08-07 H.J. Lu <hongjiu.lu@intel.com>
453 * elflink.c (elf_link_add_object_symbols): Move common symbol
454 check after bed->common_definition.
456 2017-08-07 Alan Modra <amodra@gmail.com>
459 * elflink.c (bfd_elf_final_link): Don't segfault when sections
460 needed to define various dynamic tags have been discarded.
462 2017-08-07 Nick Clifton <nickc@redhat.com>
465 * elf32-i386.c (elf_i386_link_setup_gnu_properties): If the dynobj
466 has not been set then use the bfd returned by
467 _bfd_elf_link_setup_gnu_properties. If that is null then search
468 through all the input bfds selecting the first normal, ELF format
470 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
472 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
474 * elf32-i386.c (elf_i386_link_hash_entry): Change tls_get_addr
476 (elf_i386_link_hash_newfunc): Initialize tls_get_addr to 0.
477 (elf_i386_check_tls_transition): Check tls_get_addr directly.
478 (elf_i386_convert_load_reloc): Update tls_get_addr check.
479 (elf_i386_link_check_relocs): New function.
480 (bfd_elf32_bfd_link_check_relocs): New.
481 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Change tls_get_addr
483 (elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 0.
484 (elf_x86_64_check_tls_transition): Check tls_get_addr directly.
485 (elf_x86_64_convert_load_reloc): Update tls_get_addr check.
486 (elf_x86_64_link_check_relocs): New function.
487 (bfd_elf64_bfd_link_check_relocs): New.
488 (bfd_elf32_bfd_link_check_relocs): Likewise.
490 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
493 * elflink.c (elf_link_add_object_symbols): Treat common symbol
494 as undefined for --no-define-common.
496 2017-08-05 Alan Modra <amodra@gmail.com>
498 * elf32-hppa.c (elf32_hppa_set_gp): Don't require an
499 hppa_link_hash_table.
501 2017-08-02 Max Filippov <jcmvbkbc@gmail.com>
503 * xtensa-isa.c (xtensa_isa_init): Don't update lookup table
504 entries for sysregs with negative indices.
506 2017-08-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
508 * elf32-s390.c (elf_s390_finish_dynamic_sections): Skip if it
509 isn't the S/390 specific elf data.
510 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
512 2017-07-31 Kuan-Lin Chen <rufus@andestech.com>
514 * elfxx-riscv.c (riscv_elf_add_sub_reloc): New function.
515 * (howto_table) [R_RISCV_ADD8]: Use riscv_elf_add_sub_reloc.
516 [R_RISCV_ADD16]: Likewise.
517 [R_RISCV_ADD32]: Likewise.
518 [R_RISCV_ADD64]: Likewise.
519 [R_RISCV_SUB6]: Likewise.
520 [R_RISCV_SUB8]: Likewise.
521 [R_RISCV_SUB16]: Likewise.
522 [R_RISCV_SUB32]: Likewise.
523 [R_RISCV_SUB64]: Likewise.
525 2017-07-31 Alan Modra <amodra@gmail.com>
527 * elf64-ppc.c (ppc64_elf_tls_setup): Warn on --plt-localentry
528 without ld.so checks.
530 2017-07-29 Alan Modra <amodra@gmail.com>
533 * elf64-ppc.c (struct ppc_link_hash_entry): Add non_zero_localentry.
534 (ppc64_elf_merge_symbol): Set non_zero_localentry.
535 (is_elfv2_localentry0): Test non_zero_localentry.
536 (ppc64_elf_tls_setup): Default to --no-plt-localentry.
538 2017-07-28 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
540 * elf32-s390.c (elf_s390_finish_dynamic_sections): Add NULL
541 pointer check for htab->elf.irelplt.
542 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
544 2017-07-27 Nick Clifton <nickc@redhat.com>
547 * mach-o.c (bfd_mach_o_read_symtab_strtab): Fail if the symtab
549 * nlmcode.h (nlm_swap_auxiliary_headers_in): Replace assertion
551 * section.c (bfd_make_section_with_flags): Fail if the name or bfd
553 * vms-alpha.c (bfd_make_section_with_flags): Correct computation
555 (evax_bfd_print_emh): Check for invalid string lengths.
557 2017-07-25 Nick Clifton <nickc@redhat.com>
559 * po/fr.po: Updated French translation.
561 2017-07-25 Benjamin Green <bengreen5mx@gmail.com>
564 * elf32-msp430.c (msp430_elf_relax_section): Allow conversion of
565 16-bit absolute branches into 10-bit pc-relative branches on the
566 MSP430 as well as the MSP430X.
568 2017-07-25 Alan Modra <amodra@gmail.com>
570 * elf64-ppc.c (struct map_stub): Add tls_get_addr_opt_bctrl.
571 (stub_eh_frame_size): New function.
572 (ppc_size_one_stub): Set group tls_get_addr_opt_bctrl.
573 (group_sections): Init group tls_get_addr_opt_bctrl.
574 (ppc64_elf_size_stubs): Update sizing and initialization of
575 .eh_frame. Iteration over stubs via group list.
576 (ppc64_elf_build_stubs): Iterate over stubs via group list.
577 (ppc64_elf_finish_dynamic_sections): Update finalization of
580 2017-07-24 Nick Clifton <nickc@redhat.com>
583 * mach-o.c (bfd_mach_o_canonicalize_relocs): Pass the base address
584 of the relocs to the canonicalize_one_reloc routine.
585 * mach-o.h (struct bfd_mach_o_backend_data): Update the prototype
586 for the _bfd_mach_o_canonicalize_one_reloc field.
587 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add
588 res_base parameter. Use to check for corrupt pair relocs.
589 * mach-o-aarch64.c (bfd_mach_o_arm64_canonicalize_one_reloc):
591 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc):
593 * mach-o-x86-64.c (bfd_mach_o_x86_64_canonicalize_one_reloc):
596 * vms-alpha.c (_bfd_vms_slurp_eihd): Make sure that there is
597 enough data in the record before attempting to parse it.
598 (_bfd_vms_slurp_eeom): Likewise.
600 (_bfd_vms_slurp_egsd): Check for an invalid section index.
601 (image_set_ptr): Likewise.
602 (alpha_vms_slurp_relocs): Likewise.
604 (alpha_vms_object_p): Check for a truncated record.
606 2017-07-24 Nick Clifton <nickc@redhat.com>
609 * reloc.c (_bfd_unrecognized_reloc): New function. Reports
610 an unrecognized reloc and sets the bfd_error value.
611 * libbfd.h: Regenerate.
612 * elf32-arm.c (elf32_arm_final_link_relocate): Use the new
614 * elf32-i386.c (elf_i386_relocate_section): Likewise.
615 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
616 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
617 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.
618 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
620 2017-07-23 Alan Modra <amodra@gmail.com>
622 * elf64-ppc.c (ppc64_elf_size_stubs): Correct advance to
625 2017-07-19 Szabolcs Nagy <szabolcs.nagy@arm.com>
628 * elfnn-aarch64.c (elfNN_aarch64_reloc_type_class): Return
629 reloc_class_ifunc for ifunc symbols.
631 2017-07-19 Nick Clifton <nickc@redhat.com>
634 * archive.c (bfd_generic_archive_p): If the bfd does not have the
635 correct magic bytes at the start, set the error to wrong format
636 and clear the format selector before returning NULL.
638 2017-07-19 Nick Clifton <nickc@redhat.com>
641 * coff-rs6000.c (_bfd_strntol): New function.
642 (_bfd_strntoll): New function.
643 (GET_VALUE_IN_FIELD): New macro.
644 (EQ_VALUE_IN_FIELD): new macro.
645 (_bfd_xcoff_slurp_armap): Use new macros.
646 (_bfd_xcoff_archive_p): Likewise.
647 (_bfd_xcoff_read_ar_hdr): Likewise.
648 (_bfd_xcoff_openr_next_archived_file): Likewise.
649 (_bfd_xcoff_stat_arch_elt): Likewise.
650 * coff64-rs6000.c (_bfd_strntol): New function.
651 (_bfd_strntoll): New function.
652 (GET_VALUE_IN_FIELD): New macro.
653 (xcoff64_slurp_armap): Use new macros.
655 2017-07-19 Claudiu Zissulescu <claziss@synopsys.com>
656 John Eric Martin <John.Martin@emmicro-us.com>
658 * bfd-in2.h: Regenerate.
659 * libbfd.h: Regenerate.
660 * elf32-arc.c (JLI): Define.
661 * reloc.c: Add JLI relocations.
663 2017-07-18 Nick Clifton <nickc@redhat.com>
666 * coff-sh.c: Fix spelling typos.
667 * compress.c: Likewise.
668 * cpu-pdp11.c: Likewise.
669 * ecofflink.c: Likewise.
670 * elf-m10300.c: Likewise.
672 * elf32-arm.c: Likewise.
673 * elf32-m68k.c: Likewise.
674 * elf32-nds32.c: Likewise.
675 * elf32-ppc.c: Likewise.
676 * elf32-sh.c: Likewise.
677 * elf32-v850.c: Likewise.
678 * elf64-ppc.c: Likewise.
679 * elf64-x86-64.c: Likewise.
680 * elflink.c: Likewise.
681 * elfnn-aarch64.c: Likewise.
682 * elfxx-mips.c: Likewise.
685 * vms-alpha.c: Likewise.
686 * xcofflink.c: Likewise.
688 2017-07-18 Nick Clifton <nickc@redhat.com>
691 * coffcode.h (handle_COMDAT): Replace abort with an error message
694 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
697 * elf64-x86-64.c (elf_x86_64_relocate_section): Limit PIC check
700 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
702 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
704 2017-07-16 Alan Modra <amodra@gmail.com>
706 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimize
707 __tls_index GOT entries when using __tls_get_addr_opt stub.
708 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
710 2017-07-12 Alan Modra <amodra@gmail.com>
712 * po/es.po: Update from translationproject.org/latest/bfd/.
713 * po/fi.po: Likewise.
714 * po/fr.po: Likewise.
715 * po/id.po: Likewise.
716 * po/ja.po: Likewise.
717 * po/ro.po: Likewise.
718 * po/ru.po: Likewise.
719 * po/sr.po: Likewise.
720 * po/sv.po: Likewise.
721 * po/tr.po: Likewise.
722 * po/uk.po: Likewise.
723 * po/vi.po: Likewise.
724 * po/zh_CN.po: Likewise.
725 * po/hr.po: New file from translationproject.org.
726 * configure.ac (ALL_LINGUAS): Add hr. Sort.
727 * configure: Regenerate.
729 2017-07-12 Nick Clifton <nickc@redhat.com>
731 Fix compile time warnings using gcc 7.1.1.
732 * elf32-xtensa.c (elf_xtensa_get_plt_section): Increase length of
734 (elf_xtensa_get_gotplt_section): Increase length of got_name
736 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add a
737 default return of FALSE.
738 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc): Add a
739 default return of FALSE.
741 2017-07-12 Alan Modra <amodra@gmail.com>
743 * binary.c (binary_set_section_contents): Don't print filepos in
745 (coff_write_object_contents): Cast size_t for error message.
746 (coff_slurp_line_table): Don't use bfd_vma symndx.
747 (coff_slurp_reloc_table): Remove unneeded cast.
748 * dwarf2.c (read_section): Cast bfd_int64_t to long long for
750 (find_abstract_instance_name): Likewise.
751 * elf32-arm.c (arm_type_of_stub): Correct error arg order.
752 (bfd_elf32_arm_stm32l4xx_erratum_scan): Don't cast error arg.
753 (elf32_arm_check_relocs): Make r_symndx an int.
754 * elf32-cris.c (cris_elf_check_relocs): Delete extraneous %s in
756 * elf32-metag.c (elf_metag_relocate_section): Delete extra error
758 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Rewrite bogus
760 * elf32-i386.c (elf_i386_check_relocs): Make r_symndx an int.
761 * elf32-s390.c (elf_s390_check_relocs): Likewise.
762 * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
763 * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
764 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
765 * elf64-s390.c (elf_s390_check_relocs): Likewise.
766 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
767 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
768 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
769 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
770 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
771 * elf64-mmix.c (_bfd_mmix_after_linker_allocation): Cast size_t args
772 and use %lu for error message.
773 * elflink.c (elf_link_adjust_relocs): Delete extra error message arg.
774 * mmo.c (mmo_scan): Make stab_loc a file_ptr. Cast expression for
777 * elf32-arm.c (elf32_arm_tls_relax): Correct format string and args
779 (elf32_arm_final_link_relocate): Likewise.
780 * coff-arm.c (bfd_arm_process_before_allocation): Likewise.
781 * coffcode.h (styp_to_sec_flags): Likewise.
782 * cofflink.c (_bfd_coff_write_global_sym): Likewise.
783 * ecoff.c (_bfd_ecoff_slurp_symbol_table): Likewise.
784 * elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise.
785 * elf32-bfin.c (bfinfdpic_check_relocs): Likewise.
786 (elf32_bfin_merge_private_bfd_data): Likewise.
787 * elf32-cris.c (cris_elf_relocate_section): Likewise.
788 * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
789 * elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise.
790 (i370_elf_relocate_section): Likewise.
791 * elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise.
792 * elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise.
793 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
794 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
795 * elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise.
796 * elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise.
797 * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
798 * elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise.
799 (_bfd_mips_elf_merge_private_bfd_data): Likewise.
800 * ieee.c (ieee_write_id, read_id): Likewise.
801 * mach-o.c (bfd_mach_o_write_contents): Likewise.
802 (bfd_mach_o_layout_commands, bfd_mach_o_read_section_32): Likewise.
803 (bfd_mach_o_read_section_64, bfd_mach_o_read_symtab_symbol): Likewise.
804 (bfd_mach_o_read_command, bfd_mach_o_header_p): Likewise.
805 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Likewise.
806 * stabs.c (_bfd_link_section_stabs): Likewise.
808 * coff-arm.c (coff_arm_relocate_section): Use L modifier in error
810 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
811 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
812 * coff-rs6000.c (xcoff_reloc_type_toc): Likewise.
813 * coff-sh.c (sh_relax_section): Likewise.
814 (sh_relax_delete_bytes, sh_swap_insns): Likewise.
815 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
816 * coffcode.h (coff_slurp_reloc_table): Likewise.
817 * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
818 (_bfd_coff_read_string_table): Likewise.
819 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
820 * compress.c (bfd_get_full_section_contents): Likewise.
821 * dwarf2.c (read_formatted_entries, decode_line_info): Likewise.
822 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
823 * elf.c (bfd_elf_string_from_elf_section): Likewise.
824 * elf32-arc.c (arc_special_overflow_checks): Likewise.
825 * elf32-arm.c (elf32_arm_tls_relax): Likewise.
826 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Likewise.
827 (elf32_arm_write_section): Likewise.
828 * elf32-bfin.c (bfin_relocate_section): Likewise.
829 (bfinfdpic_relocate_section): Likewise.
830 * elf32-hppa.c (hppa_build_one_stub): Likewise.
831 (final_link_relocate, elf32_hppa_relocate_section): Likewise.
832 * elf32-i386.c (elf_i386_tls_transition): Likewise.
833 (elf_i386_relocate_section): Likewise.
834 * elf32-ip2k.c (ip2k_final_link_relocate): Likewise.
835 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
836 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
837 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
838 * elf32-metag.c (elf_metag_relocate_section): Likewise.
839 * elf32-nds32.c (unrecognized_reloc_msg): Likewise.
840 (nds32_elf_relax_longcall1, nds32_elf_relax_longcall2): Likewise.
841 (nds32_elf_relax_longcall3, nds32_elf_relax_longjump1): Likewise.
842 (nds32_elf_relax_longjump2, nds32_elf_relax_longjump3): Likewise.
843 (nds32_elf_relax_longcall4, nds32_elf_relax_longcall5): Likewise.
844 (nds32_elf_relax_longcall6, nds32_elf_relax_longjump4): Likewise.
845 (nds32_elf_relax_longjump5, nds32_elf_relax_longjump6): Likewise.
846 (nds32_elf_relax_longjump7, nds32_elf_relax_loadstore): Likewise.
847 (nds32_elf_relax_ptr, nds32_elf_ex9_build_hash_table): Likewise.
848 * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
849 * elf32-rx.c (UNSAFE_FOR_PID): Likewise.
850 * elf32-s390.c (invalid_tls_insn, elf_s390_relocate_section): Likewise.
851 * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
852 * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
853 * elf32-sh.c (sh_elf_relax_section): Likewise.
854 (sh_elf_relax_delete_bytes, sh_elf_swap_insns): Likewise.
855 (sh_elf_relocate_section): Likewise.
856 * elf32-sh64.c (shmedia_prepare_reloc): Likewise.
857 * elf32-spu.c (spu_elf_relocate_section): Likewise.
858 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
859 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
860 * elf32-v850.c (v850_elf_relax_section): Likewise.
861 * elf32-vax.c (elf_vax_check_relocs): Likewise.
862 (elf_vax_relocate_section): Likewise.
863 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
864 (extend_ebb_bounds_forward, extend_ebb_bounds_backward): Likewise.
865 (compute_text_actions, compute_ebb_proposed_actions): Likewise.
866 (do_fix_for_relocatable_link): Likewise.
867 * elf64-alpha.c (elf64_alpha_relax_got_load): Likewise.
868 (elf64_alpha_relax_with_lituse): Likewise.
869 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Likewise.
870 (elf_hppa_final_link_relocate): Likewise.
871 * elf64-ia64-vms.c (elf64_ia64_relax_section): Likewise.
872 (elf64_ia64_choose_gp, elf64_ia64_relocate_section): Likewise.
873 (elf64_vms_link_add_object_symbols): Likewise.
874 * elf64-mmix.c (mmix_elf_perform_relocation): Likewise.
875 (mmix_final_link_relocate): Likewise.
876 * elf64-s390.c (invalid_tls_insn): Likewise.
877 (elf_s390_relocate_section): Likewise.
878 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
879 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
880 (elf_x86_64_relocate_section): Likewise.
881 * elfcode.h (elf_slurp_symbol_table): Likewise.
882 * elfcore.h (elf_core_file_p): Likewise.
883 * elflink.c (elf_link_read_relocs_from_section): Likewise.
884 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
885 (elfNN_aarch64_relocate_section): Likewise.
886 * elfnn-ia64.c (elfNN_ia64_relax_section): Likewise.
887 (elfNN_ia64_choose_gp, elfNN_ia64_relocate_section): Likewise.
888 * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
889 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
890 (_bfd_mips_elf_relocate_section): Likewise.
891 (_bfd_mips_elf_finish_dynamic_symbol, mips_finish_exec_plt): Likewise.
892 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
893 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
894 * ieee.c (ieee_slurp_external_symbols): Likewise.
895 * ihex.c (ihex_write_object_content): Likewise.
896 * mach-o.c (bfd_mach_o_build_exec_seg_command): Likewise.
897 * merge.c (_bfd_merged_section_offset): Likewise.
898 * mmo.c (mmo_write_loc_chunk): Likewise.
899 (mmo_write_object_contents): Likewise.
900 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Likewise.
901 * stabs.c (_bfd_link_section_stabs): Likewise.
902 * xcofflink.c (xcoff_link_add_symbols, xcoff_find_tc0): Likewise.
904 2017-07-11 Alan Modra <amodra@gmail.com>
906 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo.
908 2017-07-11 Alan Modra <amodra@gmail.com>
910 * elf32-ppc.c (ppc_elf_relocate_section): Emit "unexpected
911 instruction" error using _bfd_error_handler, not einfo.
913 2017-07-10 Nick Clifton <nickc@redhat.com>
915 * coffcode.h (coff_slurp_symbol_table): Do not include an entry
916 for C_AIX_WEAKEXT if it has the same value as C_WEAKEXT.
918 2017-07-07 John Baldwin <jhb@FreeBSD.org>
920 * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PTLWPINFO.
922 2017-07-07 Alan Modra <amodra@gmail.com>
924 * coffcode.h (coff_slurp_symbol_table): Handle C_AIX_WEAKEXT.
926 2017-07-07 Alan Modra <amodra@gmail.com>
928 * bfd.c (_doprnt): Replace "L" with "ll" when printing bfd_vma
929 as long long. Move code replacing "ll" with "I64", and simplify.
931 2017-07-06 H.J. Lu <hongjiu.lu@intel.com>
933 * bfd.c (_doprnt): Convert 'L' to 'l' when setting wide_width
936 2017-07-05 H.J. Lu <hongjiu.lu@intel.com>
938 * dwarf2.c (line_info_add_include_dir_stub): Replace time with
940 (line_info_add_file_name): Likewise.
941 (decode_line_info): Likewise.
943 2017-07-04 Tristan Gingold <gingold@adacore.com>
945 * version.m4: Bump version to 2.29.51
946 * configure: Regenerate.
948 2017-07-04 Jiong Wang <jiong.wang@arm.com>
950 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Remove the
951 sanity check at the head of this function.
953 2017-07-04 Jan Kratochvil <jan.kratochvil@redhat.com>
955 * dwarf2.c (struct dwarf2_debug): Add fields dwarf_line_str_buffer and
957 (struct attr_abbrev): Add field implicit_const.
958 (dwarf_debug_sections): Add .debug_line_str.
959 (enum dwarf_debug_section_enum): Add debug_line_str and debug_max.
960 (dwarf_debug_section_assert): Add static assertion.
961 (read_indirect_line_string): New.
962 (read_abbrevs): Support DW_FORM_implicit_const.
963 (is_str_attr): Support DW_FORM_line_strp.
964 (read_attribute_value): Support DW_FORM_line_strp and
965 DW_FORM_implicit_const.
966 (read_attribute): Support DW_FORM_implicit_const.
967 (line_info_add_include_dir, line_info_add_include_dir_stub):
968 (line_info_add_file_name, read_formatted_entries): New.
969 (decode_line_info, parse_comp_unit): Support DWARF 5.
970 (_bfd_dwarf2_cleanup_debug_info): Free dwarf_line_str_buffer.
972 2017-07-03 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
974 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove the
975 abort statement that was put for symbols that are not dynamic.
977 2017-07-03 Tristan Gingold <gingold@adacore.com>
979 * po/bfd.pot: Regenerate
981 2017-07-03 Alan Modra <amodra@gmail.com>
983 * bfd.c (_doprnt): Rewrite "ll" and "L" modifiers to "I64" for
984 __MSVCRT__. Support "L" modifier for bfd_vma. Formatting.
985 * elf.c (setup_group): Use "Lx" to print sh_size.
986 (_bfd_elf_setup_sections): Remove unnecessary cast and print
987 unknown section type in hex.
988 (copy_special_section_fields): Style fix.
989 (bfd_section_from_shdr): Correct format for sh_link. Use a
990 common error message for all the variants of unrecognized
992 (assign_file_positions_for_load_sections): Use "Lx" for lma
993 adjust error message.
994 (assign_file_positions_for_non_load_sections): Formatting.
995 (rewrite_elf_program_header): Formatting. Use "Lx" for
996 bfd_vma values in error messages.
997 * elfcode.h (elf_slurp_reloc_table_from_section): Cast
998 ELF_R_SYM value to type expected by format.
999 * elflink.c (elf_link_read_relocs_from_section): Use "Lx"
1001 (elf_link_add_object_symbols): Use "Lu" for symbol sizes.
1002 (elf_link_input_bfd): Use "Lx" for r_info.
1003 (bfd_elf_gc_record_vtinherit): Use "Lx" for offset.
1005 2017-07-03 Alan Modra <amodra@gmail.com>
1007 * bfd.c (bfd_scan_vma): Don't use long long unless HAVE_LONG_LONG.
1008 * coff-rs6000.c (FMT20): Handle hosts with 64-bit long and
1009 Microsoft C library variant of long long format specifier.
1010 (PRINT20): Cast value to bfd_uint64_t not long long.
1011 * coffcode.h (coff_print_aux): Use BFD_VMA_FMT.
1012 * coff-x86_64.c (coff_amd64_reloc): Use bfd_uint64_t rather than
1013 long long. Don't cast to bfd_vma.
1014 * elf32-score.c (score3_bfd_getl48): Likewise.
1015 * vms-alpha.c (_bfd_vms_slurp_eisd): Likewise.
1017 2017-07-03 Alan Modra <amodra@gmail.com>
1019 * elf.c (_bfd_elf_print_private_bfd_data): Use BFD_VMA_FMT to
1021 (bfd_elf_print_symbol): Don't cast symbol->flags.
1022 (_bfd_elf_symbol_from_bfd_symbol): Likewise.
1023 * elf32-ppc.c (ppc_elf_begin_write_processing): Correct
1024 _bfd_error_handler argument order.
1025 (ppc_elf_merge_private_bfd_data): Don't cast flags.
1027 2017-07-03 Alan Modra <amodra@gmail.com>
1029 * configure.ac: Invoke AC_CHECK_TYPES for long long. Invoke
1030 AC_TYPE_LONG_DOUBLE.
1031 * configure: Regenerate.
1032 * config.in: Regenerate.
1034 2017-06-29 Andrew Waterman <andrew@sifive.com>
1036 * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Fix TLS copy
1039 2017-06-29 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
1041 * elfxx-sparc.c (allocate_dynrelocs): Don't make a symbol dynamic
1042 unless it is undefined weak.
1043 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Set the flag
1044 relative_reloc to direct non-dynamic symbols to R_SPARC_RELATIVE
1046 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): If symbol
1047 is not dynamic in PIC, abort.
1049 2017-06-29 Jiong Wang <jiong.wang@arm.com>
1052 * elfnn-aarch64.c (elfNN_aarch64_allocate_dynrelocs): Only make
1053 undefined weak symbols into dynamic.
1054 (elfNN_aarch64_final_link_relocate): Generate runtime RELATIVE
1055 relocation for non-dynamic symbols.
1056 (elfNN_aarch64_finish_dynamic_symbol): Add sanity check.
1058 2017-06-29 Jiong Wang <jiong.wang@arm.com>
1060 * elfnn-aarch64.c (aarch64_relocation_aginst_gp_p): New function.
1061 (elfNN_aarch64_final_link_relocate): Delete duplicated code for
1062 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15, BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
1063 BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
1064 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Optimize the
1067 2017-06-29 Andreas Arnez <arnez@linux.vnet.ibm.com>
1069 * elf-bfd.h (elfcore_write_s390_gs_cb): Add prototype.
1070 (elfcore_write_s390_gs_bc): Likewise.
1071 * elf.c (elfcore_grok_s390_gs_cb): New function.
1072 (elfcore_grok_s390_gs_bc): New function.
1073 (elfcore_grok_note): Call them.
1074 (elfcore_write_s390_gs_cb): New function.
1075 (elfcore_write_s390_gs_bc): New function.
1076 (elfcore_write_register_note): Call them.
1078 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
1080 * libbfd.c (_bfd_generic_get_section_contents): Don't call
1081 bfd_get_file_size. Check archive element size.
1082 (_bfd_generic_get_section_contents_in_window): Likewise.
1084 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
1086 * bfd-in2.h: Regenerated.
1087 * bfdio.c (bfd_get_size): Change return type to ufile_ptr.
1088 (bfd_get_file_size): Likewise.
1090 2017-06-28 Maciej W. Rozycki <macro@imgtec.com>
1091 Matthew Fortune <matthew.fortune@imgtec.com>
1093 * archures.c (bfd_mach_mips_interaptiv_mr2): New macro.
1094 * cpu-mips.c (I_interaptiv_mr2): New enum value.
1095 (arch_info_struct): Add "mips:interaptiv-mr2" entry.
1096 * elfxx-mips.c (_bfd_elf_mips_mach) <E_MIPS_MACH_IAMR2>: New
1098 (mips_set_isa_flags) <bfd_mach_mips_interaptiv_mr2>: Likewise.
1099 (bfd_mips_isa_ext) <bfd_mach_mips_interaptiv_mr2>: Likewise.
1100 (print_mips_isa_ext) <AFL_EXT_INTERAPTIV_MR2>: Likewise.
1101 (mips_mach_extensions): Add `bfd_mach_mipsisa32r3' and
1102 `bfd_mach_mips_interaptiv_mr2' entries.
1103 * bfd-in2.h: Regenerate.
1105 2017-06-27 Nick Clifton <nickc@redhat.com>
1107 * tekhex.c (pass_over): Revert accidental conversion of a local
1108 array to a static array.
1110 2017-06-27 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
1113 * elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Adjust
1114 reloc addend if necessary. Adjust diff only if
1115 shrinked_insn_address < end_address.
1117 2017-06-27 Alan Modra <amodra@gmail.com>
1120 * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
1121 (_bfd_generic_get_section_contents_in_window): Likewise.
1123 2017-06-26 Kuan-Lin Chen <rufus@andestech.com>
1125 * elfnn-riscv.c (perform_relocation): Support the new
1126 R_RISCV_32_PCREL relocation.
1127 (riscv_elf_relocate_section): Likewise.
1128 * elfxx-riscv.c (howto_table): Likewise.
1129 (riscv_reloc_map): Likewise.
1130 * bfd-in2.h (BFD_RELOC_RISCV_32_PCREL): New relocation.
1131 * libbfd.h: Regenerate.
1133 2017-06-27 Alan Modra <amodra@gmail.com>
1136 * libbfd.c (_bfd_generic_get_section_contents): Delete abort.
1137 Use unsigned file pointer type, and remove cast.
1138 * libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise.
1139 Add "count", not "sz".
1141 2017-06-26 Pedro Alves <palves@redhat.com>
1144 * libbfd.c (_bfd_generic_get_section_contents): Add "count", not
1147 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
1150 * libbfd.c (_bfd_generic_get_section_contents_in_window): Add
1153 2017-06-26 Maciej W. Rozycki <macro@imgtec.com>
1155 * cpu-mips.c (arch_info_struct): Mark the 4010 32-bit.
1156 * elfxx-mips.c (mips_set_isa_flags) <bfd_mach_mips4010>: Set
1157 E_MIPS_ARCH_2 rather than E_MIPS_ARCH_3 in `e_flags'.
1158 (mips_mach_extensions): Mark `bfd_mach_mips4010' as extending
1159 `bfd_mach_mips6000' rather than `bfd_mach_mips4000'.
1161 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
1164 * compress.c (bfd_get_full_section_contents): Don't check the
1166 * libbfd.c (_bfd_generic_get_section_contents): Check for and
1167 reject a section whose size + offset is greater than the size
1169 (_bfd_generic_get_section_contents_in_window): Likewise.
1171 2017-06-26 Nick Clifton <nickc@redhat.com>
1174 * tekhex.c (getvalue): Check for the source pointer exceeding the
1175 end pointer before the first byte is read.
1177 2017-06-26 Nick Clifton <nickc@redhat.com>
1180 * opncls.c (get_build_id): Check that the section is big enough
1181 to contain the whole note.
1182 * compress.c (bfd_get_full_section_contents): Check for and reject
1183 a section whose size is greater than the size of the entire file.
1184 * elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not
1185 contain a notes section.
1187 2017-06-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1189 * elf64-s390.c (elf_s390_additional_program_headers): Add NULL
1191 (elf_s390_modify_segment_map): Likewise.
1192 (bfd_elf_s390_set_options): Lisewise.
1194 2017-06-26 Alan Modra <amodra@gmail.com>
1196 * elflink.c (_bfd_elf_link_create_dynstrtab): Don't make dynobj
1198 (_bfd_elf_size_group_sections): Skip --just-syms bfds.
1199 (bfd_elf_size_dynamic_sections): Ignore .note.GNU-stack and
1200 .preinit_array on --just-syms bfds.
1201 (_bfd_elf_gc_mark_extra_sections): Skip --just-syms bfds.
1202 (elf_gc_sweep, bfd_elf_parse_eh_frame_entries): Likewise.
1203 (bfd_elf_gc_sections, bfd_elf_discard_info): Likewise.
1205 2017-06-25 Sergei Trofimovich <slyfox@gentoo.org>
1207 * elf.c (find_link): Bounds check "hint".
1209 2017-06-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
1211 * elf32-arm.c (using_thumb_only): Update list of architectures in
1212 BFD_ASSERT for which the logic is valid.
1213 (using_thumb2_bl): Likewise.
1214 (using_thumb2): Likewise and return true for ARMv8-R.
1215 (arch_has_arm_nop): Likewise.
1216 (tag_cpu_arch_combine): New v8r table for ARMv8-R Tag_CPU_arch
1217 merging logic. Update commentis for value 15 of v8m_baseline,
1218 v8m_mainline and v4t_plus_v6_m arrays. Use v8r array to decide
1219 merging of value 15 of Tag_CPU_arch.
1221 2017-06-23 Jiong Wang <jiong.wang@arm.com>
1223 * reloc.c (BFD_RELOC_AARCH64_ADR_GOTPAGE): Rename to
1224 BFD_RELOC_AARCH64_ADR_GOT_PAGE
1225 * bfd-in2.h: Regenerate.
1227 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1229 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Move
1230 the error_alignment label forward. Properly align program
1231 property note section.
1233 2017-06-22 Eric Christopher <echristo@gmail.com>
1235 * elf32-arm.c (elf32_arm_final_link_relocate): Use labs rather than
1236 abs to fix a truncation warning.
1238 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1240 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Resolve
1241 local undefined weak symbol to 0.
1242 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Likewise.
1244 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1246 * elf32-i386.c (elf_i386_merge_gnu_properties): If info->shstk
1247 is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
1248 (elf_i386_link_setup_gnu_properties): If info->shstk is set,
1249 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
1250 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): If
1251 info->shstk is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
1252 (elf_x86_64_link_setup_gnu_properties): If info->shstk is set,
1253 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
1255 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1257 * elf32-i386.c (elf_i386_lazy_ibt_plt0_entry): New.
1258 (elf_i386_lazy_ibt_plt_entry): Likewise.
1259 (elf_i386_pic_lazy_ibt_plt0_entry): Likewise.
1260 (elf_i386_non_lazy_ibt_plt_entry): Likewise.
1261 (elf_i386_pic_non_lazy_ibt_plt_entry): Likewise.
1262 (elf_i386_eh_frame_lazy_ibt_plt): Likewise.
1263 (elf_i386_lazy_plt_layout): Likewise.
1264 (elf_i386_non_lazy_plt_layout): Likewise.
1265 (elf_i386_link_hash_entry): Add plt_second.
1266 (elf_i386_link_hash_table): Add plt_second and
1267 plt_second_eh_frame.
1268 (elf_i386_allocate_dynrelocs): Use the second PLT if needed.
1269 (elf_i386_size_dynamic_sections): Use .plt.got unwind info for
1270 the second PLT. Check the second PLT.
1271 (elf_i386_relocate_section): Use the second PLT to resolve
1272 PLT reference if needed.
1273 (elf_i386_finish_dynamic_symbol): Fill and use the second PLT if
1275 (elf_i386_finish_dynamic_sections): Set sh_entsize on the
1276 second PLT. Generate unwind info for the second PLT.
1277 (elf_i386_plt_type): Add plt_second.
1278 (elf_i386_get_synthetic_symtab): Support the second PLT.
1279 (elf_i386_parse_gnu_properties): Support
1280 GNU_PROPERTY_X86_FEATURE_1_AND.
1281 (elf_i386_merge_gnu_properties): Support
1282 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
1283 on GNU_PROPERTY_X86_FEATURE_1_IBT
1284 (elf_i386_link_setup_gnu_properties): If info->ibt is set,
1285 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
1286 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
1287 is set on all relocatable inputs.
1288 * elf64-x86-64.c (elf_x86_64_lazy_ibt_plt_entry): New.
1289 (elf_x32_lazy_ibt_plt_entry): Likewise.
1290 (elf_x86_64_non_lazy_ibt_plt_entry): Likewise.
1291 (elf_x32_non_lazy_ibt_plt_entry): Likewise.
1292 (elf_x86_64_eh_frame_lazy_ibt_plt): Likewise.
1293 (elf_x32_eh_frame_lazy_ibt_plt): Likewise.
1294 (elf_x86_64_lazy_ibt_plt): Likewise.
1295 (elf_x32_lazy_ibt_plt): Likewise.
1296 (elf_x86_64_non_lazy_ibt_plt): Likewise.
1297 (elf_x32_non_lazy_ibt_plt): Likewise.
1298 (elf_x86_64_get_synthetic_symtab): Support the second PLT.
1299 (elf_x86_64_parse_gnu_properties): Support
1300 GNU_PROPERTY_X86_FEATURE_1_AND.
1301 (elf_x86_64_merge_gnu_properties): Support
1302 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
1303 on GNU_PROPERTY_X86_FEATURE_1_IBT
1304 (elf_x86_64_link_setup_gnu_properties): If info->ibt is set,
1305 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
1306 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
1307 is set on all relocatable inputs.
1309 2017-06-22 Nick Clifton <nickc@redhat.com>
1312 * som.c (setup_sections): NUL terminate the space_strings buffer.
1313 Check that the space.name field does not index beyond the end of
1314 the space_strings buffer.
1316 2017-06-21 Nick Clifton <nickc@redhat.com>
1319 * coff-sh.c (sh_reloc): Check for an out of range reloc.
1321 2017-06-21 Nick Clifton <nickc@redhat.com>
1324 * vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as
1325 type of the size parameter.
1326 (_bfd_vms_save_counted_string): Add second parameter - the maximum
1327 length of the counted string.
1328 * vms.h (_bfd_vms_save_sized_string): Update prototype.
1329 (_bfd_vms_save_counted_string): Likewise.
1330 * vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to
1331 _bfd_vms_save_counted_string.
1332 (_bfd_vms_slurp_ehdr): Likewise.
1333 (_bfd_vms_slurp_egsd): Likewise.
1334 (Parse_module): Likewise.
1336 2017-06-21 Alan Modra <amodra@gmail.com>
1338 * elf64-ppc.c (ppc64_elf_size_stubs): Test for localentry:0 plt
1339 calls before tocsave calls.
1340 (ppc64_elf_relocate_section): Allow localentry:0 plt calls without
1343 2017-06-21 Nick Clifton <nickc@redhat.com>
1346 * reloc.c (bfd_generic_get_relocated_section_contents): Fail if
1347 bfd_get_full_section_contents returns no contents.
1349 2017-06-21 Nick Clifton <nickc@redhat.com>
1352 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized
1355 2017-06-21 Nick Clifton <nickc@redhat.com>
1358 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section
1360 (image_set_ptr): Likewise.
1361 (alpha_vms_fix_sec_rel): Likewise.
1362 (alpha_vms_slurp_relocs): Likewise.
1364 2017-06-21 Nick Clifton <nickc@redhat.com>
1367 * ieee.c (ieee_slurp_sections): Check for a NULL return from
1369 (ieee_archive_p): Likewise.
1370 (ieee_object_p): Likewise.
1372 2017-06-21 Nick Clifton <nickc@redhat.com>
1375 * elf.c (setup_group): Zero the group section pointer list after
1376 allocation so that loops can be caught. Check for NULL pointers
1377 when processing a group list.
1379 2017-06-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1381 * elf-s390.h: New file.
1382 * elf64-s390.c (struct elf_s390_link_hash_table): Add params
1384 (elf_s390_additional_program_headers): New function.
1385 (elf_s390_modify_segment_map): New function.
1386 (bfd_elf_s390_set_options): New function.
1387 (elf_backend_additional_program_headers)
1388 (elf_backend_modify_segment_map): Add macro definitions.
1390 2017-06-19 H.J. Lu <hongjiu.lu@intel.com>
1393 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
1394 the DYNAMIC bit instead of bfd_count_sections.
1396 2017-06-19 Nick Clifton <nickc@redhat.com>
1399 * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record
1401 (evax_bfd_print_eeom): Likewise.
1402 (evax_bfd_print_egsd): Check for an overlarge record length.
1403 (evax_bfd_print_etir): Likewise.
1405 2017-06-19 Nick Clifton <nickc@redhat.com>
1408 * libieee.h (struct common_header_type): Add end_p field.
1409 * ieee.c (this_byte_and_next): Do not advance input_p beyond
1411 (read_id): Check for a length that exceeds the remaining bytes in
1413 (ieee_seek): Initialise end_p.
1414 (ieee_archive_p): Likewise.
1415 (ieee_object_p): Likewise.
1417 2017-06-19 Nick Clifton <nickc@redhat.com>
1420 * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset
1421 before reading the EIHS structure entries.
1423 2017-06-19 Nick Clifton <nickc@redhat.com>
1426 * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for
1427 gsd_size. Check that there are enough bytes remaining to read the
1428 type and size of the next egsd. Check that the size of the egsd
1429 does not exceed the size of the record.
1431 2017-06-19 Alan Modra <amodra@gmail.com>
1433 * config.bfd: Correct targ_underscore for cris.
1435 2017-06-18 Alan Modra <amodra@gmail.com>
1437 * config.bfd: Correct targ_underscore for epiphany, ip2k,
1438 m32c, mn10200, pru, rl78, rx, crisv32 and v850.
1440 2017-06-16 Nick Clifton <nickc@redhat.com>
1442 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
1443 bucketlist is empty because there are no symbols to add to the
1446 2017-06-16 Alan Modra <amodra@gmail.com>
1452 * targets.c (struct bfd_target): Add _bfd_define_start_stop.
1453 (BFD_JUMP_TABLE_LINK): Likewise.
1454 * elf-bfd.h (bfd_elf_define_start_stop): Declare.
1455 * elflink.c (_bfd_elf_gc_mark_rsec): Update comment.
1456 (bfd_elf_define_start_stop): New function.
1457 * linker.c (bfd_generic_define_start_stop): New function.
1458 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init
1460 * aout-adobe.c (aout_32_bfd_define_start_stop): Define.
1461 * aout-target.h (MY_bfd_define_start_stop): Define.
1462 * aout-tic30.c (MY_bfd_define_start_stop): Define.
1463 * binary.c (binary_bfd_define_start_stop): Define.
1464 * bout.c (b_out_bfd_define_start_stop): Define.
1465 * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define.
1466 * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define.
1467 * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define.
1468 * coffcode.h (coff_bfd_define_start_stop): Define.
1469 * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define.
1470 * i386msdos.c (msdos_bfd_define_start_stop): Define.
1471 * i386os9k.c (os9k_bfd_define_start_stop): Define.
1472 * ieee.c (ieee_bfd_define_start_stop): Define.
1473 * ihex.c (ihex_bfd_define_start_stop): Define.
1474 * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define.
1475 * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define.
1476 * mmo.c (mmo_bfd_define_start_stop): Define.
1477 * nlm-target.h (nlm_bfd_define_start_stop): Define.
1478 * oasys.c (oasys_bfd_define_start_stop): Define.
1479 * pef.c (bfd_pef_bfd_define_start_stop): Define.
1480 * plugin.c (bfd_plugin_bfd_define_start_stop): Define.
1481 * ppcboot.c (ppcboot_bfd_define_start_stop): Define.
1482 * som.c (som_bfd_define_start_stop): Define.
1483 * srec.c (srec_bfd_define_start_stop): Define.
1484 * tekhex.c (tekhex_bfd_define_start_stop): Define.
1485 * versados.c (versados_bfd_define_start_stop): Define.
1486 * vms-alpha.c (vms_bfd_define_start_stop): Define.
1487 (alpha_vms_bfd_define_start_stop): Define.
1488 * xsym.c (bfd_sym_bfd_define_start_stop): Define.
1489 * bfd-in2.h: Regenerate.
1490 * libbfd.h: Regenerate.
1492 2017-06-16 Jiong Wang <jiong.wang@arm.com>
1494 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
1495 SYMBOL_REFERENCES_LOCAL.
1497 2017-06-15 Jiong Wang <jiong.wang@arm.com>
1500 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
1501 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
1502 runtime for if there needs copy relocation elimination.
1503 (need_copy_relocation_p): New function. Return true for symbol with
1504 pc-relative references and if it's against read-only sections.
1505 (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
1506 (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
1507 that are related with accessing external objects.
1508 (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change
1509 in elfNN_aarch64_check_relocs.
1511 2017-06-15 Nick Clifton <nickc@redhat.com>
1514 * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
1517 (ieee_archive_p): Likewise.
1519 2017-06-15 Nick Clifton <nickc@redhat.com>
1522 * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
1524 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
1526 * elf32-xtensa.c (elf_xtensa_be_plt_entry,
1527 elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays,
1528 keep both windowed and call0 ABI PLT definitions.
1529 (elf_xtensa_create_plt_entry): Use selected ABI to choose upper
1530 elf_xtensa_*_plt_entry endex.
1531 (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size.
1533 2017-06-14 Nick Clifton <nickc@redhat.com>
1536 * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
1539 2017-06-14 Nick Clifton <nickc@redhat.com>
1542 * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
1543 maximum value for the ascic pointer. Check that name processing
1544 does not read beyond this value.
1545 (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
1548 2017-06-14 Nick Clifton <nickc@redhat.com>
1551 * versados.c (versados_mkobject): Zero the allocated tdata structure.
1552 (process_otr): Check for an invalid offset in the otr structure.
1554 2017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
1556 * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
1558 2017-06-13 H.J. Lu <hongjiu.lu@intel.com>
1564 * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
1565 vtable field to a union.
1566 (_bfd_elf_is_start_stop): Removed.
1567 * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
1568 __start_SECNAME and __stop_SECNAME symbols.
1569 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
1570 * elflink.c (_bfd_elf_is_start_stop): Removed.
1571 (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
1572 _bfd_elf_is_start_stop.
1573 (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
1574 __stop_SECNAME symbols. Updated.
1575 (elf_gc_smash_unused_vtentry_relocs): Likewise.
1576 (bfd_elf_gc_record_vtinherit): Likewise.
1577 (bfd_elf_gc_record_vtentry): Likewise.
1579 2017-06-13 Nick Clifton <nickc@redhat.com>
1582 * elflink.c (elf_link_adjust_relocs): Generate an error when
1583 encountering a reloc against a symbol removed by garbage
1586 2017-06-12 H.J. Lu <hongjiu.lu@intel.com>
1588 * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
1589 to merge_gnu_properties.
1590 * elf-properties.c (elf_merge_gnu_properties): Add struct
1591 bfd_link_info * and pass it to merge_gnu_properties.
1592 (elf_merge_gnu_property_list): Add struct bfd_link_info *
1593 and pass it to elf_merge_gnu_properties.
1594 (_bfd_elf_link_setup_gnu_properties): Pass info to
1595 elf_merge_gnu_property_list.
1596 * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
1598 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
1600 2017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
1603 * binary.c (binary_set_section_contents): Scale lma by octets
1604 per byte to set filepos.
1606 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1608 * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
1611 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1613 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
1616 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1618 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
1619 patched section contents for TLS IE reloc.
1620 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
1622 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1624 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
1625 RELOC_FOR_GLOBAL_SYMBOL macro.
1627 2018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1629 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
1632 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1634 * config/tc-arc.c (md_undefined_symbol): Changed.
1635 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
1637 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1639 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
1642 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1644 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
1645 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
1647 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1649 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
1652 2017-06-08 Richard Earnshaw <rearnsha@arm.com>
1654 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
1655 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
1656 is non-zero. Add clarifying comments.
1658 2017-06-08 H.J. Lu <hongjiu.lu@intel.com>
1660 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
1661 name. Use local IFUNC symbol name string to report unsupported
1662 non-PIC call to IFUNC function.
1663 (elf_i386_relocate_section): Dump local IFUNC name with minfo
1664 when generating R_386_IRELATIVE relocation.
1665 (elf_i386_finish_dynamic_symbol): Likewise.
1666 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
1668 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
1669 when generating R_X86_64_IRELATIVE relocation.
1670 (elf_x86_64_finish_dynamic_symbol): Likewise.
1672 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
1674 * elf.c (setup_group): Make sure BFD sections are created for all
1675 group sections in the input file when processing SHF_GROUP
1677 (bfd_section_from_shdr): Avoid duplicating logic already
1678 implemented in `setup_group'.
1680 2017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
1683 * peXXigen.c (pe_print_idata): Use the address of the first thunk
1684 if the hint address is zero.
1686 2017-06-06 James Clarke <jrtc27@jrtc27.com>
1689 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
1690 ELF_COMMON_DEF_P for common symbols.
1692 2017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
1694 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
1695 SEC_GROUP sections as SEC_EXCLUDE.
1696 (bfd_elf_set_group_contents): Replace use of abort with an assert.
1697 (assign_section_numbers): Use resolve_section_groups flag instead
1698 of relocatable link type.
1699 (_bfd_elf_init_private_section_data): Use resolve_section_groups
1700 flag instead of checking the final_link flag for part of the
1701 checks in here. Fix white space as a result.
1702 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
1703 instead of relocatable link type.
1704 (bfd_elf_final_link): Likewise.
1706 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
1708 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
1710 * elf32-score.c (score_elf_final_link_relocate): Likewise.
1711 (s3_bfd_score_elf_check_relocs): Likewise.
1712 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
1713 (score_elf_final_link_relocate): Likewise.
1714 (s7_bfd_score_elf_check_relocs): Likewise.
1716 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
1718 * elflink.c (init_reloc_cookie_rels): Remove unused variable
1721 2017-06-06 Maciej W. Rozycki <macro@imgtec.com>
1723 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
1724 from `reloc_count' rather than decrementing it.
1725 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
1726 `reloc_count' by `int_rels_per_ext_rel'.
1727 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
1728 `reloc_count' by `int_rels_per_ext_rel' for last relocation
1729 entry determination.
1730 (s3_bfd_score_elf_check_relocs): Likewise.
1731 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
1732 (s7_bfd_score_elf_relocate_section): Likewise.
1733 (s7_bfd_score_elf_check_relocs): Likewise.
1734 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
1735 prototype and function.
1736 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
1737 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
1738 triple rather than once the sum of REL and RELA relocation entry
1740 (bfd_elf64_get_reloc_upper_bound): Remove macro.
1741 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
1742 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
1743 storage allocation size determination.
1744 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
1745 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
1746 by `int_rels_per_ext_rel' for last relocation entry
1748 (bfd_elf_final_link): Do not multiply `reloc_count' by
1749 `int_rels_per_ext_rel' for internal relocation storage
1750 allocation size determination.
1751 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
1752 `int_rels_per_ext_rel' for last relocation entry determination.
1753 (elf_gc_smash_unused_vtentry_relocs): Likewise.
1754 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
1755 (_bfd_mips_elf_relocate_section): Likewise.
1757 2017-06-05 Alan Modra <amodra@gmail.com>
1760 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
1762 2017-06-01 John Baldwin <jhb@FreeBSD.org>
1764 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
1765 determine structure sizes.
1766 (elfcore_grok_freebsd_prstatus): Likewise.
1768 2017-06-01 Alan Modra <amodra@gmail.com>
1770 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
1771 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
1773 (is_elfv2_localentry0): New function.
1774 (ppc64_elf_tls_setup): Default params->plt_localentry0.
1775 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
1776 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
1777 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
1778 optimized localentry:0 stubs.
1779 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
1780 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
1782 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
1784 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
1786 2017-05-30 Casey Smith <clegg89@gmail.com>
1789 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
1790 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
1792 2017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
1794 * cpu-arc.c (arc_compatible): New function.
1796 2017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
1798 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
1800 2017-05-30 H.J. Lu <hongjiu.lu@intel.com>
1803 * bfdio.c (bfd_get_file_size): New function.
1804 * bfd-in2.h: Regenerated.
1806 2017-05-23 Dilian Palauzov <git-dpa@aegee.org>
1808 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
1811 2017-05-22 H.J. Lu <hongjiu.lu@intel.com>
1813 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
1814 dynobj instead of htab->elf.dynobj.
1816 2017-05-19 Maciej W. Rozycki <macro@imgtec.com>
1818 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
1820 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
1821 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
1822 actual number of internal relocations retrieved. Adjust
1823 function description.
1824 (bfd_elf64_canonicalize_reloc): Remove macro.
1825 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
1827 2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
1829 * archures.c (bfd_mach_sparc_v9m8): Define.
1830 (bfd_mach_sparc_v8plusm8): Likewise.
1831 (bfd_mach_sparc_v9_p): Adjust to M8.
1832 (bfd_mach_sparc_64bit_p): Likewise.
1833 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
1834 bfd_mach_sparc_v8plusm8.
1835 * bfd-in2.h: Regenerated.
1836 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
1838 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
1839 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
1840 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
1842 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
1843 bfd_mach_sparc_v8plusm8.
1845 2017-05-19 Alan Modra <amodra@gmail.com>
1847 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
1848 debug and special sections when no non-note alloc sections in an
1851 2017-05-18 Alan Modra <amodra@gmail.com>
1853 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
1854 * elf-m10300.c: Likewise.
1856 * elf32-arc.c: Likewise.
1857 * elf32-bfin.c: Likewise.
1858 * elf32-m68k.c: Likewise.
1859 * elf32-nds32.c: Likewise.
1860 * elf32-tilepro.c: Likewise.
1861 * elflink.c: Likewise.
1862 * elfnn-aarch64.c: Likewise.
1863 * elfnn-riscv.c: Likewise.
1864 * elfxx-tilegx.c: Likewise.
1865 * mach-o.c: Likewise.
1866 * peXXigen.c: Likewise.
1867 * vms-alpha.c: Likewise.
1868 * vms-lib.c: Likewise.
1870 2017-05-17 H.J. Lu <hongjiu.lu@intel.com>
1873 * elflink.c (elf_gc_mark_debug_section): New function.
1874 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
1875 referenced by kept debug sections.
1877 2017-05-16 Alan Modra <amodra@gmail.com>
1879 * elf-m10300.c: Rename occurrences of non_ir_ref.
1880 * elf32-arm.c: Likewise.
1881 * elf32-bfin.c: Likewise.
1882 * elf32-cr16.c: Likewise.
1883 * elf32-cris.c: Likewise.
1884 * elf32-d10v.c: Likewise.
1885 * elf32-dlx.c: Likewise.
1886 * elf32-fr30.c: Likewise.
1887 * elf32-frv.c: Likewise.
1888 * elf32-hppa.c: Likewise.
1889 * elf32-i370.c: Likewise.
1890 * elf32-i386.c: Likewise.
1891 * elf32-iq2000.c: Likewise.
1892 * elf32-lm32.c: Likewise.
1893 * elf32-m32c.c: Likewise.
1894 * elf32-m32r.c: Likewise.
1895 * elf32-m68hc1x.c: Likewise.
1896 * elf32-m68k.c: Likewise.
1897 * elf32-mcore.c: Likewise.
1898 * elf32-metag.c: Likewise.
1899 * elf32-microblaze.c: Likewise.
1900 * elf32-moxie.c: Likewise.
1901 * elf32-msp430.c: Likewise.
1902 * elf32-mt.c: Likewise.
1903 * elf32-nios2.c: Likewise.
1904 * elf32-or1k.c: Likewise.
1905 * elf32-ppc.c: Likewise.
1906 * elf32-rl78.c: Likewise.
1907 * elf32-s390.c: Likewise.
1908 * elf32-score.c: Likewise.
1909 * elf32-score7.c: Likewise.
1910 * elf32-sh.c: Likewise.
1911 * elf32-tic6x.c: Likewise.
1912 * elf32-tilepro.c: Likewise.
1913 * elf32-v850.c: Likewise.
1914 * elf32-vax.c: Likewise.
1915 * elf32-xstormy16.c: Likewise.
1916 * elf32-xtensa.c: Likewise.
1917 * elf64-alpha.c: Likewise.
1918 * elf64-hppa.c: Likewise.
1919 * elf64-ia64-vms.c: Likewise.
1920 * elf64-mmix.c: Likewise.
1921 * elf64-ppc.c: Likewise.
1922 * elf64-s390.c: Likewise.
1923 * elf64-sh64.c: Likewise.
1924 * elf64-x86-64.c: Likewise.
1925 * elflink.c: Likewise.
1926 * elfnn-aarch64.c: Likewise.
1927 * elfnn-ia64.c: Likewise.
1928 * elfnn-riscv.c: Likewise.
1929 * elfxx-mips.c: Likewise.
1930 * elfxx-sparc.c: Likewise.
1931 * elfxx-tilegx.c: Likewise.
1932 * linker.c: Likewise.
1934 2017-05-16 Alan Modra <amodra@gmail.com>
1936 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
1937 * elflink.c (elf_link_add_object_symbols): Update to use
1939 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
1941 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
1943 2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
1945 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
1947 2017-05-12 H.J. Lu <hongjiu.lu@intel.com>
1949 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
1950 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
1952 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
1954 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
1956 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
1958 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
1959 to plt_second/plt_second_eh_frame.
1960 (elf_x86_64_link_hash_newfunc): Updated.
1961 (elf_x86_64_allocate_dynrelocs): Likewise.
1962 (elf_x86_64_size_dynamic_sections): Likewise.
1963 (elf_x86_64_relocate_section): Likewise.
1964 (elf_x86_64_finish_dynamic_symbol): Likewise.
1965 (elf_x86_64_finish_dynamic_sections): Likewise.
1966 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
1967 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
1969 (elf_backend_setup_gnu_properties): Updated. Create the
1970 .plt.sec section instead of the .plt.sec section.
1972 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
1974 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
1975 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
1976 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
1978 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
1980 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
1981 (bfd_elf64_set_reloc): Define.
1982 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
1984 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
1986 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
1987 (struct bfd_target): New field _bfd_set_reloc.
1988 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
1989 * reloc.c (_bfd_generic_set_reloc): New function.
1990 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
1991 * nlm-target.h (nlm_set_reloc): Likewise.
1992 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
1993 * aout-tic30.c (MY_set_reloc): Likewise.
1994 * aout-target.h (MY_set_reloc): Likewise.
1995 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
1996 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
1997 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
1998 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
1999 * aout-adobe.c (aout_32_set_reloc): Likewise.
2000 * bout.c (b_out_set_reloc): Likewise.
2001 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
2002 * i386os9k.c (aout_32_set_reloc): Likewise.
2003 * ieee.c (ieee_set_reloc): Likewise.
2004 * oasys.c (oasys_set_reloc): Likewise.
2005 * som.c (som_set_reloc): Likewise.
2006 * versados.c (versados_set_reloc): Likewise.
2007 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
2008 _bfd_generic_set_reloc.
2009 (rs6000_xcoff64_aix_vec): LIkewise.
2010 * libbfd.c (_bfd_norelocs_set_reloc): New function.
2011 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
2012 * i386msdos.c (msdos_set_reloc): Define to
2013 _bfd_norelocs_set_reloc.
2014 * elfcode.h (elf_set_reloc): Define.
2015 * bfd-in2.h: Regenerated.
2017 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
2020 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
2021 for IFUNC function address.
2023 2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
2025 * elf32-arc.c (FEATURE_LIST_NAME): Define.
2026 (CONFLICT_LIST): Likewise.
2027 (opcode/arc-attrs.h): Include.
2028 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
2029 (arc_extract_features): New file.
2030 (arc_stralloc): Likewise.
2031 (arc_elf_merge_attributes): Likewise.
2032 (arc_elf_merge_private_bfd_data): Use object attributes.
2033 (bfd_arc_get_mach_from_attributes): New function.
2034 (arc_elf_object_p): Use object attributes.
2035 (arc_elf_final_write_processing): Likewise.
2036 (elf32_arc_obj_attrs_arg_type): New function.
2037 (elf32_arc_obj_attrs_handle_unknown): Likewise.
2038 (elf32_arc_section_from_shdr): Likewise.
2039 (elf_backend_obj_attrs_vendor): Define.
2040 (elf_backend_obj_attrs_section): Likewise.
2041 (elf_backend_obj_attrs_arg_type): Likewise.
2042 (elf_backend_obj_attrs_section_type): Likewise.
2043 (elf_backend_obj_attrs_handle_unknown): Likewise.
2044 (elf_backend_section_from_shdr): Likewise.
2046 2017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
2049 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
2050 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
2051 and the destination is a Thumb symbol.
2053 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2055 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
2056 initializer to silence GCC 4.2.
2057 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
2059 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2061 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
2062 (LAZY_PLT_ENTRY_SIZE): This.
2063 (NON_LAZY_PLT_ENTRY_SIZE): New.
2064 (elf_x86_64_plt0_entry): Renamed to ...
2065 (elf_x86_64_lazy_plt0_entry): This.
2066 (elf_x86_64_plt_entry): Renamed to ...
2067 (elf_x86_64_lazy_plt_entry): This.
2068 (elf_x86_64_bnd_plt0_entry): Renamed to ...
2069 (elf_x86_64_lazy_bnd_plt0_entry): This.
2070 (elf_x86_64_legacy_plt_entry): Removed.
2071 (elf_x86_64_bnd_plt_entry): Renamed to ...
2072 (elf_x86_64_lazy_bnd_plt_entry): This.
2073 (elf_x86_64_legacy_plt2_entry): Renamed to ...
2074 (elf_x86_64_non_lazy_plt_entry): This.
2075 (elf_x86_64_bnd_plt2_entry): Renamed to ...
2076 (elf_x86_64_non_lazy_bnd_plt_entry): This.
2077 (elf_x86_64_eh_frame_plt): Renamed to ...
2078 (elf_x86_64_eh_frame_lazy_plt): This.
2079 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
2080 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
2081 (elf_x86_64_eh_frame_plt_got): Renamed to ...
2082 (elf_x86_64_eh_frame_non_lazy_plt): This.
2083 (elf_x86_64_lazy_plt_layout): New.
2084 (elf_x86_64_non_lazy_plt_layout): Likewise.
2085 (elf_x86_64_plt_layout): Likewise.
2086 (elf_x86_64_backend_data): Remove PLT layout information. Add
2087 os for target system.
2088 (GET_PLT_ENTRY_SIZE): Removed.
2089 (elf_x86_64_lazy_plt): New.
2090 (elf_x86_64_non_lazy_plt): Likewise.
2091 (elf_x86_64_lazy_bnd_plt): Likewise.
2092 (elf_x86_64_non_lazy_bnd_plt): Likewise.
2093 (elf_x86-64_arch_bed): Updated.
2094 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
2095 (elf_x86_64_create_dynamic_sections): Removed.
2096 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
2097 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
2098 (elf_x86-64_adjust_dynamic_symbol): Updated.
2099 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
2100 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
2101 size for PLT0 if there is no PLT0. Get plt_entry_size from
2102 non_lazy_plt for non-lazy PLT entries.
2103 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
2104 from non_lazy_plt for non-lazy PLT entries.
2105 (elf_x86-64_relocate_section): Updated. Properly get PLT index
2106 if there is no PLT0.
2107 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
2108 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
2109 entries with non-lazy PLT layout. Don't fill the second and third
2110 slots in the PLT entry if there is no PLT0.
2111 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
2112 if there is no PLT0. Set sh_entsize on the .plt.got section.
2113 (compare_relocs): New.
2114 (elf_x86_64_plt_type): Likewise.
2115 (elf_x86_64_plt): Likewise.
2116 (elf_x86_64_nacl_plt): New. Forward declaration.
2117 (elf_x86_64_get_plt_sym_val): Removed.
2118 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
2119 against all dynamic relocations.
2120 (elf_x86_64_link_setup_gnu_properties): New function.
2121 (elf_backend_create_dynamic_sections): Updated.
2122 (elf_backend_setup_gnu_properties): New.
2123 (elf_x86_64_nacl_plt): New.
2124 (elf_x86_64_nacl_arch_bed): Updated.
2126 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2128 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
2129 (LAZY_PLT_ENTRY_SIZE): This.
2130 (NON_LAZY_PLT_ENTRY_SIZE): New.
2131 (elf_i386_plt0_entry): Renamed to ...
2132 (elf_i386_lazy_plt0_entry): This.
2133 (elf_i386_plt_entry): Renamed to ...
2134 (elf_i386_lazy_plt_entry): This.
2135 (elf_i386_pic_plt0_entry): Renamed to ...
2136 (elf_i386_pic_lazy_plt0_entry): This.
2137 (elf_i386_pic_plt_entry): Renamed to ...
2138 (elf_i386_pic_lazy_plt_entry): This.
2139 (elf_i386_got_plt_entry): Renamed to ...
2140 (elf_i386_non_lazy_plt_entry): This.
2141 (elf_i386_pic_got_plt_entry): Renamed to ...
2142 (elf_i386_pic_non_lazy_plt_entry): This.
2143 (elf_i386_eh_frame_plt): Renamed to ...
2144 (elf_i386_eh_frame_lazy_plt): This.
2145 (elf_i386_eh_frame_plt_got): Renamed to ...
2146 (elf_i386_eh_frame_non_lazy_plt): This.
2147 (elf_i386_plt_layout): Renamed to ...
2148 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
2149 eh_frame_plt_got_size.
2150 (elf_i386_non_lazy_plt_layout): New.
2151 (elf_i386_plt_layout): Likewise.
2152 (elf_i386_non_lazy_plt): Likewise.
2153 (GET_PLT_ENTRY_SIZE): Removed.
2154 (elf_i386_plt): Renamed to ...
2155 (elf_i386_lazy_plt): This.
2156 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
2157 (elf_i386_arch_bed): Updated.
2158 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
2159 (elf_i386_create_dynamic_sections): Removed.
2160 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
2161 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
2162 (elf_i386_adjust_dynamic_symbol): Updated.
2163 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
2164 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
2165 size for PLT0 if there is no PLT0.
2166 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
2167 output section is discarded only if GOT isn't empty.
2168 (elf_i386_relocate_section): Updated. Properly get PLT index
2169 if there is no PLT0.
2170 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
2171 second and third slots in the PLT entry if there is no PLT0.
2172 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
2173 if there is no PLT0. Set sh_entsize on the .plt.got section.
2174 (elf_i386_nacl_plt): Forward declaration.
2175 (elf_i386_get_plt_sym_val): Removed.
2176 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
2177 against all dynamic relocations.
2178 (elf_i386_link_setup_gnu_properties): New function.
2179 (elf_backend_create_dynamic_sections): Updated.
2180 (elf_backend_setup_gnu_properties): New.
2181 (elf_i386_nacl_plt): Updated.
2182 (elf_i386_nacl_arch_bed): Likewise.
2183 (elf_i386_vxworks_arch_bed): Likewise.
2185 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
2187 * elflink.c (elf_output_implib): Remove executable flag from import
2189 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
2190 library is a relocatable object file.
2192 2017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
2195 * elf32-avr.c (avr_should_move_sym): New function.
2196 (avr_should_reduce_sym_size): Likewise.
2197 (avr_should_increase_sym_size): Likewise.
2198 (elf32_avr_relax_delete_bytes): Adjust symbol values
2199 and sizes by calling new functions.
2201 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
2203 * config.bfd (riscv32-*): Enable rv64.
2205 2017-05-02 Alan Modra <amodra@gmail.com>
2208 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
2209 rather than h->root.type == bfd_link_hash_new.
2210 (bfd_elf_record_link_assignment): Similarly, call
2211 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
2213 2017-04-29 Alan Modra <amodra@gmail.com>
2216 * reloc.c (reloc_offset_in_range): New function.
2217 (bfd_perform_relocation, bfd_install_relocation): Use it.
2218 (_bfd_final_link_relocate): Likewise.
2220 2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
2222 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
2223 before using .plt.got.
2224 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
2226 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2228 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
2229 instead of "+=" to update 0.
2231 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2233 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
2234 .plt.got section here.
2235 (elf_i386_check_relocs): Don't create the .plt.got section.
2236 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
2237 the .plt.got and .plt.bnd sections here.
2238 (elf_x86_64_check_relocs): Don't create the .plt.got nor
2241 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2243 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
2245 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
2246 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
2247 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
2248 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
2251 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2253 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
2255 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
2256 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
2257 the first relocatable ELF input with GNU properties.
2259 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2261 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
2262 VxWorks for non-PIC.
2264 2017-04-27 Alan Modra <amodra@gmail.com>
2266 * elf-bfd.h (struct elf_backend_data): Make asection param of
2267 elf_backend_eh_frame_address_size const.
2268 (_bfd_elf_eh_frame_address_size): Likewise.
2269 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
2270 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
2271 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
2272 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
2273 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
2274 (next_cie_fde_offset): Constify params.
2275 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
2277 2017-04-27 Alan Modra <amodra@gmail.com>
2279 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
2280 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
2281 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
2283 (offset_adjust): New function.
2284 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
2285 (adjust_eh_frame_local_symbols): Likewise.
2286 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
2287 after changing anything. Return true if anything changed.
2288 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
2289 _bfd_elf_adjust_eh_frame_global_symbol for globals.
2291 2017-04-27 Alan Modra <amodra@gmail.com>
2293 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
2296 2017-04-27 Alan Modra <amodra@gmail.com>
2298 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
2299 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
2300 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
2301 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
2302 for undef and undefweak dyn_relocs.
2303 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
2304 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
2305 (allocate_got, allocate_dynrelocs): Likewise.
2306 (ppc64_elf_relocate_section): Likewise.
2308 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
2310 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
2311 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
2312 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
2313 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
2315 2017-04-26 Nick Clifton <nickc@redhat.com>
2318 * reloc.c (bfd_perform_relocation): Check for a negative address
2321 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
2324 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
2326 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
2327 (elf_backend_always_renumber_dynsyms): Define.
2328 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
2329 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
2330 * elflink.c (bfd_elf_size_dynamic_sections): Also call
2331 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
2333 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
2335 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
2337 * elflink.c (bfd_elf_size_dynamic_sections): Only call
2338 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
2339 sections have been created.
2341 2017-04-26 Nick Clifton <nickc@redhat.com>
2344 * compress.c (bfd_init_section_compress_status): Check the return
2345 value from bfd_malloc.
2347 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
2349 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
2350 no_finish_dynamic_symbol.
2351 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
2353 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
2354 weak symbol, don't make it dynamic.
2355 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
2356 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
2357 relocation for GOT reference.
2358 (elf_x86_64_finish_dynamic_symbol): Abort if
2359 no_finish_dynamic_symbol isn't 0.
2361 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
2364 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
2365 undefined weak symbol, don't make it dynamic.
2366 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
2367 set no_finish_dynamic_symbol and generate R_386_RELATIVE
2368 relocation for R_386_GOT32.
2370 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
2373 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
2375 2017-04-23 Alan Modra <amodra@gmail.com>
2378 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
2379 * elf.c (lcomm_sym): New.
2380 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
2381 * bfd-in2.h: Regenerate.
2383 2017-04-23 Alan Modra <amodra@gmail.com>
2386 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
2387 parameters and comment.
2388 (_bfd_elf_get_reloc_section): Delete.
2389 (_bfd_elf_plt_get_reloc_section): Declare.
2390 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
2391 New functions. Don't blindly skip over assumed .rel/.rela prefix.
2393 (_bfd_elf_get_reloc_section): ..here. Delete.
2394 (assign_section_numbers): Call elf_get_reloc_section.
2395 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
2396 * elfxx-target.h (elf_backend_get_reloc_section): Update.
2398 2017-04-23 Alan Modra <amodra@gmail.com>
2401 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
2404 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
2407 * elf32-i386.c (elf_i386_link_hash_entry): Add
2408 no_finish_dynamic_symbol.
2409 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
2410 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
2411 symbol, don't make it dynamic in PIE.
2412 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
2413 set no_finish_dynamic_symbol and generate R_386_RELATIVE
2414 relocation for R_386_GOT32
2415 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
2418 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
2422 * elflink.c (elf_link_add_object_symbols): Require
2423 --no-dynamic-linker with -E/--dynamic-list when creating
2426 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
2428 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
2431 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
2433 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
2434 dynamic symbol sorting.
2436 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
2439 * elflink.c (elf_link_add_object_symbols): Preserve
2440 dynamic_ref_after_ir_def when restoring the symbol table for
2441 unneeded dynamic object.
2443 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
2446 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
2447 on on undefined IFUNC symbol in the second PLT.
2449 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
2451 * peXXigen.c (pe_print_reloc): Correct chunk_end.
2453 2017-04-19 Alan Modra <amodra@gmail.com>
2455 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
2456 or make dynamic for info->dynamic_undefined_weak 0 and 1.
2457 * elf32-ppc.c:Formatting.
2458 (ensure_undefweak_dynamic): Don't make dynamic when
2459 info->dynamic_undefined_weak is zero.
2460 (allocate_dynrelocs): Discard undefweak dyn_relocs for
2461 info->dynamic_undefined_weak. Discard undef dyn_relocs when
2462 not default visibility. Discard undef and undefweak
2464 (ppc_elf_relocate_section): Adjust to suit.
2465 * elf64-ppc.c: Formatting.
2466 (ensure_undefweak_dynamic): Don't make dynamic when
2467 info->dynamic_undefined_weak is zero.
2468 (allocate_dynrelocs): Discard undefweak dyn_relocs for
2469 info->dynamic_undefined_weak. Discard them earlier.
2471 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
2474 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
2475 before generating the version definition section.
2477 2017-04-17 Alan Modra <amodra@gmail.com>
2479 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
2480 state when a regular object file defines a symbol with
2481 incompatible type to that defined by an earlier shared lib.
2483 2017-04-13 Alan Modra <amodra@gmail.com>
2485 * coffcode.h: Wrap some overly long _bfd_error_handler args.
2487 * elf32-arm.c: Likewise.
2488 * elf32-i386.c: Likewise.
2489 * elf32-mep.c: Likewise.
2490 * elf64-ia64-vms.c: Likewise.
2491 * elf64-x86-64.c: Likewise.
2492 * elflink.c: Likewise.
2493 * elfnn-ia64.c: Likewise.
2494 * elfxx-mips.c: Likewise.
2496 2017-04-13 Alan Modra <amodra@gmail.com>
2498 * aoutx.h: Use %B and %A in error messages throughout file.
2499 * aout-cris.c: Likewise.
2500 * archive.c: Likewise.
2501 * binary.c: Likewise.
2502 * coff-rs6000.c: Likewise.
2503 * coff-tic4x.c: Likewise.
2504 * coffcode.h: Likewise.
2505 * coffgen.c: Likewise.
2506 * cofflink.c: Likewise.
2507 * coffswap.h: Likewise.
2508 * cpu-arm.c: Likewise.
2509 * elf-eh-frame.c: Likewise.
2510 * elf-m10300.c: Likewise.
2512 * elf32-arc.c: Likewise.
2513 * elf32-arm.c: Likewise.
2514 * elf32-bfin.c: Likewise.
2515 * elf32-frv.c: Likewise.
2516 * elf32-iq2000.c: Likewise.
2517 * elf32-m32c.c: Likewise.
2518 * elf32-microblaze.c: Likewise.
2519 * elf32-nds32.c: Likewise.
2520 * elf32-rl78.c: Likewise.
2521 * elf32-rx.c: Likewise.
2522 * elf32-score.c: Likewise.
2523 * elf32-score7.c: Likewise.
2524 * elf32-sh64.c: Likewise.
2525 * elf32-v850.c: Likewise.
2526 * elf32-vax.c: Likewise.
2527 * elf32-visium.c: Likewise.
2528 * elf64-ia64-vms.c: Likewise.
2529 * elf64-mmix.c: Likewise.
2530 * elf64-sh64.c: Likewise.
2531 * elfcode.h: Likewise.
2532 * elfnn-aarch64.c: Likewise.
2533 * elfnn-ia64.c: Likewise.
2534 * elfxx-mips.c: Likewise.
2535 * hpux-core.c: Likewise.
2538 * linker.c: Likewise.
2539 * merge.c: Likewise.
2541 * oasys.c: Likewise.
2542 * pdp11.c: Likewise.
2543 * peXXigen.c: Likewise.
2544 * rs6000-core.c: Likewise.
2545 * vms-alpha.c: Likewise.
2546 * xcofflink.c: Likewise.
2548 2017-04-13 Alan Modra <amodra@gmail.com>
2550 * bfd.c (PRINT_TYPE): Define.
2551 (_doprnt): New function.
2552 (error_handler_internal): Use _doprnt.
2553 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
2554 calls in their natural order, throughout file.
2555 * coff-mcore.c: Likewise.
2556 * coff-ppc.c: Likewise.
2557 * coff-tic80.c: Likewise.
2558 * cofflink.c: Likewise.
2559 * elf-s390-common.c: Likewise.
2561 * elf32-arm.c: Likewise.
2562 * elf32-i386.c: Likewise.
2563 * elf32-m32r.c: Likewise.
2564 * elf32-msp430.c: Likewise.
2565 * elf32-spu.c: Likewise.
2566 * elf64-ia64-vms.c: Likewise.
2567 * elf64-sparc.c: Likewise.
2568 * elf64-x86-64.c: Likewise.
2569 * elflink.c: Likewise.
2570 * elfnn-aarch64.c: Likewise.
2571 * elfnn-ia64.c: Likewise.
2572 * elfxx-mips.c: Likewise.
2574 2017-04-13 Alan Modra <amodra@gmail.com>
2576 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
2577 branch veneers" error. Fix double space and format message.
2578 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
2579 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
2581 2017-04-13 Alan Modra <amodra@gmail.com>
2583 * bfd-in2.h: Regenerate.
2585 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
2587 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
2588 extra `\n' in warning/error messages.
2589 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
2590 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
2592 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
2594 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
2595 processor-specific properties with generic ELF target vector.
2597 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
2599 * elf32-sparc.c (elf_backend_fixup_symbol): New.
2600 * elf64-sparc.c (elf_backend_fixup_symbol): New.
2601 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
2602 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
2604 (link_hash_newfunc): Initialize has_got_reloc and
2606 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
2608 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
2610 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
2612 (_bfd_sparc_elf_fixup_symbol): New function.
2613 (allocate_dynrelocs): Don't allocate space for dynamic
2614 relocations and discard relocations against resolved undefined
2615 weak symbols in executable. Don't make resolved undefined weak
2616 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
2617 relocation against undefined weak symbols in PIE.
2618 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
2619 relocations against resolved undefined weak symbols in PIE
2620 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
2621 without ynamic PLT/GOT relocations for resolved undefined weak
2623 Don't generate dynamic relocation against resolved undefined
2624 weak symbol in executable.
2625 (pie_finish_undefweak_symbol): New function.
2626 (_bfd_sparc_elf_finish_dynamic_sections): Call
2627 pie_finish_undefweak_symbol on all symbols in PIE.
2628 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
2629 (_bfd_sparc_elf_fixup_symbol): New function.
2631 2017-04-10 Nick Clifton <nickc@redhat.com>
2633 * config.bfd: Remove ns32k from obsolete list.
2635 2017-04-10 Alan Modra <amodra@gmail.com>
2638 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
2639 (special_sections_i): Likewise for .init_array.
2640 (special_sections_p): Likewise for .preinit_array.
2642 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
2646 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
2647 ELF_COMMON_DEF_P for common symbols.
2648 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
2649 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
2650 * elflink.c (_bfd_elf_merge_symbol): Revert commits
2651 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
2652 07492f668d2173da7a2bda3707ff0985e0f460b6.
2654 2017-04-07 Pedro Alves <palves@redhat.com>
2656 * opncls.c (bfd_get_debug_link_info): Rename to...
2657 (bfd_get_debug_link_info_1): ... this. Change type of second
2658 parameter to void pointer. Adjust.
2659 (bfd_get_debug_link_info): Reimplement on top of
2660 bfd_get_debug_link_info_1.
2661 (separate_debug_file_exists, separate_alt_debug_file_exists):
2662 Change type of second parameter to void pointer. Adjust.
2663 (get_func_type, check_func_type): Change type of second parameter
2665 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
2666 the callback functions instead of passing the address of a local.
2667 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
2668 find_separate_debug_file.
2669 (get_alt_debug_link_info_shim): Change type of second parameter to
2670 void pointer. Adjust.
2671 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
2672 find_separate_debug_file.
2673 (get_build_id_name, bfd_boolean check_build_id_file): Change type
2674 of second parameter to void pointer. Adjust.
2675 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
2676 pointer local to find_separate_debug_file.
2678 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
2680 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
2681 external symbols with a definition.
2682 (_bfd_coff_gc_mark_extra_sections): Fix typo.
2684 2017-04-07 Alan Modra <amodra@gmail.com>
2686 * po/SRC-POTFILES.in: Regenerate.
2688 2017-04-05 Alan Modra <amodra@gmail.com>
2690 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
2693 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
2695 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
2696 numbers for DataDirectory entry indicies passed to
2699 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
2701 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
2702 each GNU_MBIND section and align GNU_MBIND section to page size.
2703 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
2704 segment for each GNU_MBIND section.
2705 (_bfd_elf_init_private_section_data): Copy sh_info from input
2706 for GNU_MBIND section.
2708 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
2710 * elfnn-riscv.c (GP_NAME): Delete.
2711 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
2712 (_bfd_riscv_relax_lui): Likewise.
2714 2017-04-04 Nick Clifton <nickc@redhat.com>
2717 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
2719 (bfd_elf_final_link): Only initialize the extended symbol index
2720 section if there are extended symbol tables to list.
2722 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
2724 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
2725 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
2726 * configure.ac (elf): Add elf-properties.lo.
2727 * Makefile.in: Regenerated.
2728 * configure: Likewise.
2729 * elf-bfd.h (elf_property_kind): New.
2730 (elf_property): Likewise.
2731 (elf_property_list): Likewise.
2732 (elf_properties): Likewise.
2733 (_bfd_elf_parse_gnu_properties): Likewise.
2734 (_bfd_elf_get_property): Likewise.
2735 (_bfd_elf_link_setup_gnu_properties): Likewise.
2736 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
2737 and setup_gnu_properties.
2738 (elf_obj_tdata): Add properties.
2739 * elf-properties.c: New file.
2740 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
2741 (elf_i386_merge_gnu_properties): Likewise.
2742 (elf_backend_parse_gnu_properties): Likewise.
2743 (elf_backend_merge_gnu_properties): Likewise.
2744 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
2745 (elf_x86_64_merge_gnu_properties): Likewise.
2746 (elf_backend_parse_gnu_properties): Likewise.
2747 (elf_backend_merge_gnu_properties): Likewise.
2748 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
2749 (elf_backend_parse_gnu_properties): Likewise.
2750 (elf_backend_setup_gnu_properties): Likewise.
2751 (elfNN_bed): Add elf_backend_parse_gnu_properties,
2752 elf_backend_merge_gnu_properties and
2753 elf_backend_setup_gnu_properties.
2755 2017-03-30 Pip Cet <pipcet@gmail.com>
2757 * elf32-wasm32.c: Add relocation code, two relocs.
2758 * reloc.c: Add wasm32 relocations.
2759 * libbfd.h: Regenerate.
2760 * bfd-in2.h: Regenerate.
2761 * bfd/po/bfd.pot: Regenerate.
2763 2017-03-29 Nick Clifton <nickc@redhat.com>
2766 * coff-bfd.h (struct coff_section_data): Add new fields:
2767 saved_bias and bias.
2768 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
2769 computed for PE binaries.
2770 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
2773 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
2776 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
2777 to handle a local symbol with a hash-symbol-entry; without PLT.
2778 Add BFD_ASSERT for an incidental case with GOT entry present.
2779 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
2780 isn't forced-or-set local.
2782 2017-03-27 Pip Cet <pipcet@gmail.com>
2784 * wasm-module.c: New file to support WebAssembly modules.
2785 * wasm-module.h: New file to support WebAssembly modules.
2786 * doc/webassembly.texi: Start documenting wasm-module.c.
2787 * config.bfd: Add wasm_vec.
2788 * targets.c: Likewise.
2789 * configure.ac: Likewise.
2790 * Makefile.am: Add entries for wasm-module.c.
2791 * Makefile.in: Regenerate.
2792 * configure: Regenerate.
2793 * po/SRC-POTFILES.in: Regenerate.
2795 2017-03-27 Pip Cet <pipcet@gmail.com>
2797 * cpu-wasm32.c: New file to support wasm32 architecture.
2798 * elf32-wasm32.c: New file to support wasm32 architecture.
2799 * Makefile.am: Add wasm32 architecture.
2800 * archures.c: Likewise.
2801 * config.bfd: Likewise.
2802 * configure.ac: Likewise.
2803 * targets.c: Likewise.
2804 * Makefile.in: Regenerate.
2805 * bfd-in2.h: Regenerate.
2806 * configure: Regenerate.
2807 * po/SRC-POTFILES.in: Regenerate.
2809 2017-03-20 Alan Modra <amodra@gmail.com>
2812 * elf64-ppc.c (compare_symbols): Stabilize sort.
2814 2017-03-18 Alan Modra <amodra@gmail.com>
2816 * elf64-ppc.c (struct ppc_link_hash_table): Add
2817 local_ifunc_resolver and maybe_local_ifunc_resolver.
2818 (ppc_build_one_stub): Set flags on emitting dynamic
2819 relocation to ifunc.
2820 (ppc64_elf_relocate_section): Likewise.
2821 (ppc64_elf_finish_dynamic_symbol): Likewise.
2822 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
2823 local dynamic relocs to ifuncs.
2824 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
2825 local_ifunc_resolver and maybe_local_ifunc_resolver.
2826 (ppc_elf_relocate_section): Set flag on emitting dynamic
2827 relocation to ifuncs.
2828 (ppc_elf_finish_dynamic_symbol): Likewise.
2829 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
2830 dynamic relocs to ifuncs.
2832 2017-03-13 Nick Clifton <nickc@redhat.com>
2835 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
2836 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
2837 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
2838 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
2839 * bfd-in2.h: Regenerate.
2840 * libbfd.h: Regenerate.
2841 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
2843 (IS_AARCH64_TLSDESC_RELOC): Likewise.
2844 (elfNN_aarch64_howto_table): Likewise.
2845 (aarch64_tls_transition_without_check): Likewise.
2846 (aarch64_reloc_got_type): Likewise.
2847 (elfNN_aarch64_final_link_relocate): Likewise.
2848 (elfNN_aarch64_tls_relax): Likewise.
2849 (elfNN_aarch64_relocate_section): Likewise.
2850 (elfNN_aarch64_gc_sweep_hook): Likewise.
2851 (elfNN_aarch64_check_relocs): Likewise.
2852 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
2853 (_bfd_aarch64_elf_resolve_relocation): Likewise.
2855 2017-03-11 Alan Modra <amodra@gmail.com>
2857 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
2858 parameter is in fact used. Whitespace fixes.
2859 * elf64-ppc.c: Likewise.
2861 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
2863 * rs6000-core.c (CORE_NEW): Simplify macro when
2864 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
2866 2017-03-07 Alan Modra <amodra@gmail.com>
2870 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
2873 2017-03-05 Alan Modra <amodra@gmail.com>
2875 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
2876 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
2877 (next_cie_fde_offset): New function.
2878 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
2879 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
2880 four bytes. Align CIEs to four or eight bytes depending on
2881 per_encoding_aligned8. Align FDEs according to their encoding.
2882 Pad last FDE to output section alignment.
2883 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
2885 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
2886 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
2887 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
2889 2017-03-02 Martin Bickel <binutils@ineranves.de>
2892 * elf.c (rewrite_elf_program_header): Do not issue a warning for
2893 empty segments which have a zero filesz, but a non-zero memsz.
2895 2017-03-02 Alan Modra <amodra@gmail.com>
2897 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
2899 2017-02-28 Alan Modra <amodra@gmail.com>
2901 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
2902 (ppc64_elf_relocate_section): Likewise.
2904 2017-02-28 Alan Modra <amodra@gmail.com>
2907 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
2908 rather than elf32_nios2_hash_table or elf_hash_table.
2909 (create_got_section): Likewise.
2910 (nios2_elf32_finish_dynamic_symbol): Likewise.
2911 (nios2_elf32_adjust_dynamic_symbol): Likewise.
2912 (nios2_elf32_size_dynamic_sections): Likewise.
2913 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
2914 vars. Use htab equivalents directly instead. Don't create
2915 all dynamic sections on needing just the GOT. Use a goto
2916 rather than a fall-through with reloc test. Ensure
2917 htab->dynobj is set when making dynamic sreloc section.
2918 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
2919 equivalent directly instead. Don't segfault on looking for
2920 .dynamic when dynamic sections have not been created. Don't
2921 segfault on .got.plt being discarded.
2922 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
2923 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
2924 fixme and another not so relevant comment.
2925 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
2926 already set, set hash table dynobj on creating .sbss.
2928 2017-02-28 Alan Modra <amodra@gmail.com>
2930 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
2931 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
2932 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
2933 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
2934 (ppc64_elf_relocate_section): Likewise.
2935 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
2936 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
2937 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
2938 * libbfd.h: Regenerate.
2939 * bfd-in2.h: Regenerate.
2941 2017-02-28 Alan Modra <amodra@gmail.com>
2943 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
2944 dynamic .data.rel.ro read-only.
2945 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
2946 rather than section flags when deciding where copy reloc goes.
2947 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
2948 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
2949 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
2950 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
2951 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
2952 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
2953 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
2954 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
2955 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
2956 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
2957 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
2958 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
2959 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
2960 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
2961 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
2962 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
2963 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
2964 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
2965 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
2967 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
2969 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
2970 `jalr $0, $25' instruction encoding.
2972 2017-02-27 Nick Clifton <nickc@redhat.com>
2975 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
2976 generating a seg-fault when encountering a symbol that has been
2977 deleted by garbage collection.
2979 2017-02-25 Alan Modra <amodra@gmail.com>
2981 * elf32-arc.c (struct dynamic_sections): Delete.
2982 (enum dyn_section_types): Delete.
2983 (dyn_section_names): Delete.
2984 (arc_create_dynamic_sections): Delete.
2985 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
2986 segfault on discarded .rela.plt section.
2987 (elf_arc_size_dynamic_sections): Formatting. Don't call
2988 arc_create_dynamic_sections. Don't allocate memory for sections
2989 handled by the generic linker. Correct code finding relocs in
2990 read-only sections. Set SEC_EXCLUDE on zero size .got,
2991 .got.plt, and .dynbss sections. Do set .interp for pies.
2993 2017-02-24 Andrew Waterman <andrew@sifive.com>
2995 * elfnn-riscv.c (GP_NAME): New macro.
2996 (riscv_global_pointer_value): Use it.
2997 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
2998 output section, consider only that section's alignment.
3000 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
3002 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
3003 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
3004 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
3005 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
3007 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
3009 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
3010 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
3013 2017-02-23 Alan Modra <amodra@gmail.com>
3016 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
3018 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
3019 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
3022 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
3025 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
3026 processing ahead of the call to `elf_gc_sweep_symbol'.
3028 2017-02-22 Nick Clifton <nickc@redhat.com>
3031 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
3032 created section 4-byte alignment.
3034 2017-02-22 Alan Modra <amodra@gmail.com>
3036 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
3037 on .got or .plt output section being discarded by script.
3038 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
3041 2017-02-21 Alan Modra <amodra@gmail.com>
3043 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
3044 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
3046 2017-02-20 Alan Modra <amodra@gmail.com>
3049 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
3050 if DT_RELSZ/DT_RELASZ is zero.
3052 2017-02-17 Nick Clifton <nickc@redhat.com>
3054 * compress.c (bfd_get_full_section_contents): Remember to reduce
3055 compressed size by the sizeof the compression header when
3056 decompressing the contents.
3058 2017-02-17 Pedro Alves <palves@redhat.com>
3060 * srec.c (Chunk): Rename to ...
3061 (_bfd_srec_len): ... this.
3062 (S3Forced): Rename to ...
3063 (_bfd_srec_forceS3): ... this.
3064 * objcopy.c: Adjust all references.
3066 2017-02-17 Pedro Alves <palves@redhat.com>
3068 * archive.c (bsd_write_armap): Rename to ...
3069 (_bfd_bsd_write_armap): ... this.
3070 (coff_write_armap): Rename to ...
3071 (_bfd_coff_write_armap): ... this.
3072 * libbfd-in.h (bsd_write_armap): Rename to ...
3073 (_bfd_bsd_write_armap): ... this.
3074 (coff_write_armap): Rename to ...
3075 (_bfd_coff_write_armap): ... this.
3076 * aout-target.h, aout-tic30.c: Adjust all users.
3077 * libbfd.h: Regenerate.
3079 2017-02-17 Pedro Alves <palves@redhat.com>
3081 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
3082 (warn_deprecated): Rename to ...
3083 (_bfd_warn_deprecated): ... this.
3084 * libbfd.c (warn_deprecated): Rename to ...
3085 (_bfd_warn_deprecated): ... this.
3086 * bfd-in2.h: Regenerate.
3088 2017-02-17 Pedro Alves <palves@redhat.com>
3090 * bfdio.c (real_ftell): Rename to ...
3091 (_bfd_real_ftell): ... this.
3092 (real_fseek): Rename to ...
3093 (_bfd_real_fseek): ... this.
3094 (real_fopen): Rename to ...
3095 (_bfd_real_fopen): ... this.
3096 * libbfd-in.h (real_ftell): Rename to ...
3097 (_bfd_real_ftell): ... this.
3098 (real_fseek): Rename to ...
3099 (_bfd_real_fseek): ... this.
3100 (real_fopen): Rename to ...
3101 (_bfd_real_fopen): ... this.
3102 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
3103 * libbfd.h: Regenerate.
3105 2017-02-17 Pedro Alves <palves@redhat.com>
3107 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
3108 * libbfd.c (read_unsigned_leb128): Rename to ...
3109 (_bfd_read_unsigned_leb128): ... this.
3110 (read_signed_leb128): Rename to ...
3111 (_bfd_read_signed_leb128): ... this.
3112 (safe_read_leb128): Rename to ...
3113 (_bfd_safe_read_leb128): ... this.
3114 * libbfd-in.h (read_unsigned_leb128): Rename to ...
3115 (_bfd_read_unsigned_leb128): ... this.
3116 (read_signed_leb128): Rename to ...
3117 (_bfd_read_signed_leb128): ... this.
3118 (safe_read_leb128): Rename to ...
3119 (_bfd_safe_read_leb128): ... this.
3120 * libbfd.h: Renegerate.
3122 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
3124 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
3125 before trying to fine matching file and line information.
3127 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
3129 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
3130 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
3131 not match current bfd, then reload debug information. Record bfd
3132 we're loading debug info for in the stash. If we have debug
3133 informatin in the cache then perform section placement before
3136 2017-02-16 Alan Modra <amodra@gmail.com>
3139 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
3140 * elfxx-target.h (elf_backend_no_page_alias): Define.
3141 (elfNN_bed): Init new field.
3142 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
3143 ensure PT_LOAD segment starts on a new page.
3144 * elf32-hppa.c (elf_backend_no_page_alias): Define.
3146 2017-02-16 Alan Modra <amodra@gmail.com>
3149 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
3152 2017-02-16 Jiong Wang <jiong.wang@arm.com>
3154 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
3155 * bfd-in2.h: Regenerated.
3157 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
3160 * elf32-i386.c (elf_i386_relocate_section): Allow
3161 "lea foo@GOT, %reg" in PIC.
3163 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
3166 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
3167 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
3168 error against local IFUNC symbol without a base register for
3171 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
3173 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
3174 `%P: %H:' with `info->callbacks->einfo'.
3175 (ppc_elf_relocate_section): Likewise.
3176 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
3177 (ppc64_elf_edit_toc): Likewise.
3178 (ppc64_elf_relocate_section): Likewise.
3180 2017-02-14 Alan Modra <amodra@gmail.com>
3182 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
3183 --gc-keep-exported, and test versioned field of sym rather than
3184 looking for @ in name.
3186 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
3188 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
3191 2017-02-13 Nick Clifton <nickc@redhat.com>
3194 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
3197 2017-02-07 Andrew Waterman <andrew@sifive.com>
3199 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
3200 entry size if PLT header is written.
3202 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
3204 Fix sparc64 dynamic relocation processing to use the dynamic
3206 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
3207 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
3210 2017-02-03 Nick Clifton <nickc@redhat.com>
3213 * coffcode.h (coff_write_object_contents): Enlarge size of
3214 s_name_buf in order to avoid compile time warning about possible
3216 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
3217 32-bits of insn value before printing into buffer.
3219 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3221 * elfxx-mips.c (mips_elf_hash_sort_data): Add
3222 `max_local_dynindx'.
3223 (mips_elf_sort_hash_table): Handle it.
3224 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
3225 symbols bump up `max_local_dynindx' rather than
3226 `max_non_got_dynindx'.
3228 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3230 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
3231 `min_got_dynindx', `max_unref_got_dynindx' and
3232 `max_non_got_dynindx' members to the `bfd_size_type' data type.
3233 (mips_elf_sort_hash_table): Adjust accordingly.
3235 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3237 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
3238 to access the hash table.
3240 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3242 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
3243 non-NULL `htab' to the beginning.
3245 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3247 * elflink.c (elf_gc_sweep): Wrap overlong line.
3249 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
3251 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
3252 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
3253 * elfxx-mips.c (mips_elf_link_hash_table): Add
3254 `ignore_branch_isa' member.
3255 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
3256 in branch relocation calculation as an error if
3257 `ignore_branch_isa' has been set.
3258 (_bfd_mips_elf_insn32): Rename to...
3259 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
3260 parameter to `insn32' and add an `ignore_branch_isa' parameter.
3261 Handle the new parameter.
3263 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
3265 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
3266 local variable dynobj.
3269 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
3270 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
3271 executable from read-only sections into sdynrelro.
3272 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
3273 dynamic relocs in sdynrelro.
3274 (elf_backend_want_dynrelro): Define.
3276 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
3278 * config.bfd (*-*-rtemsaout*): Mark as removed.
3280 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
3282 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
3283 (arm-*-rtems*): Move to (arm*-*-eabi*).
3284 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
3285 (m68-*-rtems*): Move to (m68*-*-elf*).
3287 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
3289 * config.bfd (*-*-rtemscoff*): Mark as removed.
3291 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
3294 * elflink.c (bfd_elf_record_link_assignment): Revert last
3295 change and don't ever clear `forced_local'. Set `mark'
3297 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
3299 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
3300 (bfd_elf_size_dynamic_sections): ... here.
3301 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
3302 and set `mark' instead in `__tls_get_addr_opt' processing.
3303 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
3305 2017-01-24 Alan Modra <amodra@gmail.com>
3307 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
3308 where dynamic relocs are preferable. Allow ifunc too.
3309 (ensure_undefweak_dynamic): New function.
3310 (allocate_dynrelocs): Use it here. Move plt handling last and
3311 don't make symbols dynamic, simplifying loop. Only make undef
3312 weak symbols with GOT entries dynamic. Correct condition
3313 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
3314 comments. Remove goto.
3315 (ppc_elf_relocate_section): Correct test for using dynamic
3316 symbol on GOT relocs. Rearrange test for emitting GOT relocs
3317 to suit. Set up explicit tls_index entries and implicit GOT
3318 tls_index entries resolvable at link time for
3319 __tls_get_addr_opt. Simplify test to clear mem for prelink.
3320 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
3321 (ensure_undefweak_dynamic): New function.
3322 (allocate_dynrelocs): Use it here. Only make undef weak symbols
3323 with GOT entries dynamic. Remove unnecessary test of
3324 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
3325 (ppc64_elf_relocate_section): Correct test for using dynamic
3326 symbol on GOT relocs. Rearrange test for emitting GOT relocs
3327 to suit. Set up explicit tls_index entries and implicit GOT
3328 tls_index entries resolvable at link time for __tls_get_addr_opt.
3329 Simplify expression to clear mem for prelink.
3331 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
3333 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
3335 2017-01-20 Jiong Wang <jiong.wang@arm.com>
3337 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
3338 (elf_backend_hash_symbol): Define.
3340 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
3343 * elflink.c (bfd_elf_record_link_assignment): Clear any
3344 `forced_local' marking for DSO symbols that are not being
3347 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
3349 * elfnn-riscv.c (riscv_elf_object_p): New function.
3351 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
3354 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
3356 (elf_x86_64_check_relocs): Create .eh_frame section for the
3358 (elf_x86_64_size_dynamic_sections): Allocate and initialize
3359 .eh_frame section for the .plt.bnd section.
3360 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
3361 for the .plt.bnd section.
3363 2017-01-12 Nick Clifton <nickc@redhat.com>
3366 * opncls.c (find_separate_debug_file): Add include_dirs
3367 parameter. Only include the directory part of the bfd's filename
3368 in search paths if include_dirs is true. Add a couple of extra
3369 locations for looking for debug files.
3370 ( bfd_follow_gnu_debuglink): Update invocation of
3371 find_separate_debug_file.
3372 (bfd_follow_gnu_debugaltlink): Likewise.
3373 (get_build_id): New function: Finds the build-id of the given bfd.
3374 (get_build_id_name): New function: Computes the name of the
3375 separate debug info file for a bfd, based upon its build-id.
3376 (check_build_id_file): New function: Checks to see if a separate
3377 debug info file exists at the given location, and that its
3378 build-id matches that of the original bfd.
3379 (bfd_follow_build_id_debuglink): New function: Finds a separate
3380 debug info file for a given bfd by using the build-id method.
3381 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
3382 method of locating a separate debug info file before using the
3384 * bfd-in2.h: Regenerate.
3386 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
3389 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
3390 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
3391 elf_x86_64_eh_frame_plt_got.
3392 (elf_x86_64_size_dynamic_sections): Get unwind info from
3393 elf_x86_64_bnd_arch_bed for the BND PLT.
3395 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
3397 * config.bfd: Add entries for i686-redox and x86_64-redox.
3399 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
3401 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
3403 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
3404 .eh_frame section to 4 bytes for x32.
3405 (elf_x86_64_check_relocs): Likewise.
3407 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
3410 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
3411 (PLT_GOT_FDE_LENGTH): Likewise.
3412 (elf_i386_plt_layout): Add eh_frame_plt_got and
3413 eh_frame_plt_got_size.
3414 (elf_i386_plt): Updated.
3415 (elf_i386_link_hash_table): Add plt_got_eh_frame.
3416 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
3417 (elf_i386_size_dynamic_sections): Allocate and initialize
3418 .eh_frame section for .plt.got.
3419 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
3421 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
3422 eh_frame_plt_got_size.
3423 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
3424 (PLT_GOT_FDE_LENGTH): Likewise.
3425 (elf_x86_64_backend_data): Add eh_frame_plt_got and
3426 eh_frame_plt_got_size.
3427 (elf_x86_64_arch_bed): Updated.
3428 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
3429 eh_frame_plt_got_size.
3430 (elf_x86_64_nacl_arch_bed): Likewise.
3431 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
3432 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
3433 (elf_x86_64_size_dynamic_sections): Allocate and initialize
3434 .eh_frame section for .plt.got.
3435 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
3438 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
3440 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
3441 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
3443 2017-01-09 Nick Clifton <nickc@redhat.com>
3445 * dwarf2.c (lookup_address_in_function_table): Return early if
3446 there are no functions in the given comp unit, or if the high
3447 address of the last function in the comp unit is less than the
3450 2017-01-09 Nick Clifton <nickc@redhat.com>
3453 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
3454 message if there are too many symbols to load.
3456 2017-01-04 James Clarke <jrtc27@jrtc27.com>
3458 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
3459 if relocs are cached.
3461 2017-01-03 Rich Felker <bugdal@aerifal.cx>
3464 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
3465 for R_MICROBLAZE_GOTOFF_64.
3467 2017-01-03 Nick Clifton <nickc@redhat.com>
3469 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
3470 warning about using a possibly uninitialised variable.
3472 2017-01-02 Alan Modra <amodra@gmail.com>
3474 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
3475 (allocate_plt_static, allocate_dynrelocs): Use it.
3477 2017-01-02 Alan Modra <amodra@gmail.com>
3479 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
3480 .PARISC.unwind section.
3482 2017-01-02 Alan Modra <amodra@gmail.com>
3485 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
3486 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
3487 indirect to GOT pointer relative code edit.
3489 2017-01-02 Alan Modra <amodra@gmail.com>
3491 Update year range in copyright notice of all files.
3493 For older changes see ChangeLog-2016
3495 Copyright (C) 2017 Free Software Foundation, Inc.
3497 Copying and distribution of this file, with or without modification,
3498 are permitted in any medium without royalty provided the copyright
3499 notice and this notice are preserved.
3505 version-control: never