1 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
3 * elf32-i386.c (elf_i386_mkobject): Removed.
4 (bfd_elf32_mkobject): Likewise.
5 * elf64-x86-64.c (elf_x86_64_mkobject): Likewise.
6 (bfd_elf64_mkobject): Likewise.
7 (bfd_elf32_mkobject): Likewise.
8 * elfxx-x86.c (_bfd_x86_elf_mkobject): New function.
9 (_bfd_x86_elf_mkobject): New.
10 (bfd_elf64_mkobject): Likewise.
11 (bfd_elf32_mkobject): Likewise.
13 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
15 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Updated.
16 Call _bfd_x86_elf_link_setup_gnu_properties.
17 * elf64-x86-64.c (elf_x86_lazy_plt_layout): Initialize
18 pic_plt0_entry and pic_plt_entry fields with the non-PIC PLT
20 (elf_x86_64_non_lazy_plt): Likewise.
21 (elf_x86_64_lazy_bnd_plt): Likewise.
22 (elf_x86_64_non_lazy_bnd_plt): Likewise.
23 (elf_x86_64_lazy_ibt_plt): Likewise.
24 (elf_x32_lazy_ibt_plt): Likewise.
25 (elf_x86_64_non_lazy_ibt_plt): Likewise.
26 (elf_x32_non_lazy_ibt_plt): Likewise.
27 (elf_x86_64_nacl_plt): Likewise.
28 (elf_x86_64_link_setup_gnu_properties): Updated. Call
29 _bfd_x86_elf_link_setup_gnu_properties.
30 * elfxx-x86.c: Include elf-vxworks.h".
31 (_bfd_x86_elf_link_setup_gnu_properties): New function.
32 * elfxx-x86.h (elf_x86_lazy_plt_layout): Remove "for i386 only"
33 comments for pic_plt0_entry and pic_plt_entry.
34 (elf_x86_non_lazy_plt_layout): Likewise.
35 (elf_x86_plt_layout_table): New.
36 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
38 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
41 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Create
42 .eh_frame section for the second PLT.
43 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Correct
44 alignment of .eh_frame section for the second PLT.
46 2017-09-01 Nick Clifton <nickc@redhat.com>
49 * dwarf2.c (decode_line_info): Fix test for an overlong line info
52 2017-09-01 Nick Clifton <nickc@redhat.com>
55 * elf-attrs.c (_bfd_elf_parse_attributes): Ensure that the
56 attribute buffer is NUL terminated.
58 2017-08-31 Nick Clifton <nickc@redhat.com>
61 * dwarf2.c (read_section): If necessary add a terminating NUL byte
62 to dwarf string sections.
64 2017-08-31 Alan Modra <amodra@gmail.com>
66 * po/SRC-POTFILES.in: Regenerate.
68 2017-08-31 Alan Modra <amodra@gmail.com>
70 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Don't exit early
71 for a section containing just a terminator. Allow multiple
72 terminators at end of section.
73 * elflink.c (bfd_elf_discard_info): Iterate over .eh_frame
74 sections when not adding alignment. Assert on terminator in
77 2017-08-31 Alan Modra <amodra@gmail.com>
81 * elflink.c (bfd_elf_discard_info): Don't pad embedded zero
84 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
86 * configure.ac (bfd_backends): Add elf64.lo together with
87 elfxx-x86.lo for 64-bit BFD.
88 * configure: Regenerated.
90 2017-08-31 James Bowman <james.bowman@ftdichip.com>
92 * elf32-ft32.c (ft32_elf_howto_table): Use complain_overflow_dont
95 2017-08-31 Alan Modra <amodra@gmail.com>
98 * opncls.c (bfd_close_all_done): Don't call bfd_cache_close
99 before _close_and_cleanup. Call iovec->bclose after.
100 (bfd_close): Remove code common to, and call, bfd_close_all_done.
102 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
104 * elf32-i386.c (elf_i386_plt_type): Removed.
105 (elf_i386_plt): Likewise.
106 (elf_i386_get_synthetic_symtab): Updated. Call
107 _bfd_x86_elf_get_synthetic_symtab.
108 * elf64-x86-64.c (elf_x86_64_plt_type): Removed.
109 (elf_x86_64_plt): Likewise.
110 (elf_x86_64_get_synthetic_symtab): Updated. Call
111 _bfd_x86_elf_get_synthetic_symtab.
112 * elfxx-x86.c (elf_i386_get_plt_got_vma): New function.
113 (elf_x86_64_get_plt_got_vma): Likewise.
114 (elf_i386_valid_plt_reloc_p): Likewise.
115 (elf_x86_64_valid_plt_reloc_p): Likewise.
116 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
117 * elfxx-x86.h (elf_x86_plt_type): New.
118 (elf_x86_plt): Likewise.
119 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
121 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
123 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Check
124 target_id instead of elf_machine_code.
126 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
128 * elf32-i386.c (ELF_DYNAMIC_INTERPRETER): Removed.
129 (elf_i386_lazy_plt_layout): Likewise.
130 (elf_i386_non_lazy_plt_layout): Likewise.
131 (elf_i386_plt_layout): Likewise.
132 (elf_i386_link_hash_table): Likewise.
133 (elf_i386_next_tls_desc_index): Likewise.
134 (elf_i386_srelplt2): Likewise.
135 (elf_i386_plt): Likewise.
136 (elf_i386_lazy_plt): Likewise.
137 (elf_i386_non_lazy_plt): Likewise.
138 (elf_i386_link_hash_table_create): Likewise.
139 (bfd_elf32_bfd_link_hash_table_create): Likewise.
140 (elf_i386_lazy_plt): Updated.
141 (elf_i386_non_lazy_plt): Likewise.
142 (elf_i386_lazy_ibt_plt): Likewise.
143 (elf_i386_non_lazy_ibt_plt): Likewise.
144 (elf_i386_allocate_dynrelocs): Likewise.
145 (elf_i386_size_dynamic_sections): Likewise.
146 (elf_i386_relocate_section): Likewise.
147 (elf_i386_finish_dynamic_symbol): Likewise.
148 (elf_i386_finish_dynamic_sections): Likewise.
149 (elf_i386_get_synthetic_symtab): Likewise.
150 (elf_i386_link_setup_gnu_properties): Likewise.
151 (elf_i386_nacl_plt): Likewise.
152 * elf64-x86-64.c (ABI_64_P): Removed.
153 (ELF64_DYNAMIC_INTERPRETER): Likewise.
154 (ELF32_DYNAMIC_INTERPRETER): Likewise.
155 (elf_x86_64_lazy_plt_layout): Likewise.
156 (elf_x86_64_non_lazy_plt_layout): Likewise.
157 (elf_x86_64_plt_layout): Likewise.
158 (elf_x86_64_link_hash_table): Likewise.
159 (elf_x86_64_plt): Likewise.
160 (elf_x86_64_lazy_plt): Likewise.
161 (elf_x86_64_non_lazy_plt): Likewise.
162 (elf_x86_64_link_hash_table_create): Likewise.
163 (bfd_elf64_bfd_link_hash_table_create): Likewise.
164 (bfd_elf32_bfd_link_hash_table_create): Likewise.
165 (elf_x86_64_lazy_plt): Updated.
166 (elf_x86_64_non_lazy_plt): Likewise.
167 (elf_x86_64_lazy_bnd_plt): Likewise.
168 (elf_x86_64_non_lazy_bnd_plt): Likewise.
169 (elf_x86_64_lazy_ibt_plt): Likewise.
170 (elf_x32_lazy_ibt_plt): Likewise.
171 (elf_x86_64_non_lazy_ibt_plt): Likewise.
172 (elf_x32_non_lazy_ibt_plt): Likewise.
173 (elf_x86_64_allocate_dynrelocs): Likewise.
174 (elf_x86_64_size_dynamic_sections): Likewise.
175 (elf_x86_64_relocate_section): Likewise.
176 (elf_x86_64_finish_dynamic_symbol): Likewise.
177 (elf_x86_64_finish_dynamic_sections): Likewise.
178 (elf_x86_64_get_synthetic_symtab): Likewise.
179 (elf_x86_64_link_setup_gnu_properties): Likewise.
180 (elf_x86_64_nacl_plt): Likewise.
181 * elfxx-x86.c: Include "objalloc.h", "elf/i386.h" and
183 (ELF32_DYNAMIC_INTERPRETER): New.
184 (ELF64_DYNAMIC_INTERPRETER): Likewise.
185 (ELFX32_DYNAMIC_INTERPRETER): Likewise.
186 (_bfd_x86_elf_link_hash_table_create): Likewise.
187 (_bfd_x86_elf_link_hash_table_free): Renamed to ...
188 (elf_x86_link_hash_table_free): This. Make it static.
189 * elfxx-x86.h: Don't include "objalloc.h".
191 (elf_x86_lazy_plt_layout): Likewise.
192 (elf_x86_non_lazy_plt_layout): Likewise.
193 (elf_x86_plt_layout): Likewise.
194 (_bfd_x86_elf_link_hash_table_create): Likewise.
195 (bfd_elf64_bfd_link_hash_table_create): Likewise.
196 (bfd_elf32_bfd_link_hash_table_create): Likewise.
197 (elf_x86_link_hash_table): Add plt, lazy_plt, non_lazy_plt,
198 srelplt2 and next_tls_desc_index.
199 (_bfd_x86_elf_link_hash_table_free): Removed.
201 2017-08-30 Maciej W. Rozycki <macro@imgtec.com>
203 * elfxx-mips.c (mips_elf_perform_relocation): Correct microMIPS
204 branch offset interpretation.
206 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
209 * opncls.c (bfd_close_all_done): Call _close_and_cleanup.
211 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
213 * elf64-x86-64.c (elf_x86_64_next_tls_desc_index): Removed.
214 (elf_x86_64_srelplt2): Likewise.
216 2017-08-30 Alan Modra <amodra@gmail.com>
218 * elf64-ppc.c (struct ppc_link_hash_table): Add do_tls_opt.
219 (ppc64_elf_tls_optimize): Set it.
220 (ppc64_elf_relocate_section): Nop addis on TPREL16_HA, and convert
221 insn on TPREL16_LO and TPREL16_LO_DS relocs to use r13 when
222 addis would add zero.
223 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add do_tls_opt.
224 (ppc_elf_tls_optimize): Set it.
225 (ppc_elf_relocate_section): Nop addis on TPREL16_HA, and convert
226 insn on TPREL16_LO relocs to use r2 when addis would add zero.
228 2017-08-30 Alan Modra <amodra@gmail.com>
230 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing
231 __tls_get_addr call sequences to LE, don't move the addi down
232 to the nop. Replace the bl with addi and leave the nop alone.
234 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
236 * elf32-i386.c (elf_i386_pie_finish_undefweak_symbol):
238 * elf64-x86-64.c (elf_x86_64_finish_local_dynamic_symbol):
240 (elf_x86_64_pie_finish_undefweak_symbol): Likewise.
242 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
244 * Makefile.am (BFD32_BACKENDS): Add elfxx-x86.lo.
245 (BFD64_BACKENDS): Likewise.
246 (BFD32_BACKENDS_CFILES): Add elfxx-x86.c.
247 (BFD64_BACKENDS_CFILES): Likewise.
248 * Makefile.in: Regenerated.
249 * configure.ac (bfd_backends): Add elfxx-x86.lo together with
250 elf32-i386.lo and elf64-x86-64.lo.
251 * configure: Regenerated.
252 * elf32-i386.c: Include "elfxx-x86.h" instead of "sysdep.h",
253 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
254 "objalloc.h" and "hashtab.h".
255 (ELIMINATE_COPY_RELOCS): Removed.
256 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
257 (SYMBOL_NO_COPYRELOC): Likewise.
258 (elf_i386_link_hash_entry): Likewise.
259 (GOT_UNKNOWN): Likewise.
260 (GOT_NORMAL): Likewise.
261 (GOT_TLS_GD): Likewise.
262 (elf_i386_hash_entry): Likewise.
263 (elf_i386_obj_tdata): Likewise.
264 (elf_i386_tdata): Likewise.
265 (elf_i386_local_got_tls_type): Likewise.
266 (elf_i386_local_tlsdesc_gotent): Likewise.
267 (elf_i386_hash_table): Likewise.
268 (elf_i386_link_hash_newfunc): Likewise.
269 (elf_i386_local_htab_hash): Likewise.
270 (elf_i386_local_htab_eq): Likewise.
271 (elf_i386_get_local_sym_hash): Likewise.
272 (elf_i386_link_hash_table_free): Likewise.
273 (elf_i386_copy_indirect_symbol): Likewise.
274 (elf_i386_fixup_symbol): Likewise.
275 (elf_i386_readonly_dynrelocs): Likewise.
276 (elf_i386_always_size_sections): Likewise.
277 (elf_i386_set_tls_module_base): Likewise.
278 (elf_i386_dtpoff_base): Likewise.
279 (compare_relocs): Likewise.
280 (elf_i386_hash_symbol): Likewise.
281 (elf_i386_parse_gnu_properties): Likewise.
282 (elf_i386_merge_gnu_properties): Likewise.
283 (elf_i386_link_check_relocs): Likewise.
284 (elf_i386_merge_symbol_attribute): Likewise.
285 (bfd_elf32_bfd_link_check_relocs): Likewise.
286 (elf_backend_copy_indirect_symbol): Likewise.
287 (elf_backend_always_size_sections): Likewise.
288 (elf_backend_omit_section_dynsym): Likewise.
289 (elf_backend_hash_symbol): Likewise.
290 (elf_backend_fixup_symbol): Likewise.
291 (elf_backend_parse_gnu_properties): Likewise.
292 (elf_backend_merge_gnu_properties): Likewise.
293 (elf_backend_merge_symbol_attribute): Likewise.
294 (elf_i386_mkobject): Updated.
295 (elf_i386_link_hash_table_create): Likewise.
296 (elf_i386_check_tls_transition): Likewise.
297 (elf_i386_tls_transition): Likewise.
298 (elf_i386_convert_load_reloc): Likewise.
299 (elf_i386_check_relocs): Likewise.
300 (elf_i386_adjust_dynamic_symbol): Likewise.
301 (elf_i386_allocate_dynrelocs): Likewise.
302 (elf_i386_convert_load): Likewise.
303 (elf_i386_size_dynamic_sections): Likewise.
304 (elf_i386_relocate_section): Likewise.
305 (elf_i386_finish_dynamic_symbol ): Likewise.
306 (elf_i386_finish_dynamic_sections): Likewise.
307 (elf_i386_output_arch_local_syms): Likewise.
308 (elf_i386_get_synthetic_symtab): Likewise.
309 (elf_i386_link_setup_gnu_properties): Likewise.
310 (elf_i386_link_hash_table): Use elf_x86_link_hash_table, instead
311 of elf_link_hash_table, as base.
312 (elf_i386_next_tls_desc_index): New.
313 (elf_i386_srelplt2): Likewise.
314 (elf_i386_plt): Likewise.
315 (elf_i386_lazy_plt): Likewise.
316 (elf_i386_non_lazy_plt): Likewise.
317 * elf32-x86-64.c: Include "elfxx-x86.h" instead of "sysdep.h",
318 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
319 "objalloc.h" and "hashtab.h".
320 (ELIMINATE_COPY_RELOCS): Removed.
321 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
322 (SYMBOL_NO_COPYRELOC): Likewise.
323 (elf_x86_64_link_hash_entry): Likewise.
324 (GOT_UNKNOWN): Likewise.
325 (GOT_NORMAL): Likewise.
326 (GOT_TLS_GD): Likewise.
327 (elf_x86_64_hash_entry): Likewise.
328 (elf_x86_64_obj_tdata): Likewise.
329 (elf_x86_64_tdata): Likewise.
330 (elf_x86_64_local_got_tls_type): Likewise.
331 (elf_x86_64_local_tlsdesc_gotent): Likewise.
332 (elf_x86_64_hash_table): Likewise.
333 (elf_x86_64_link_hash_newfunc): Likewise.
334 (elf_x86_64_local_htab_hash): Likewise.
335 (elf_x86_64_local_htab_eq): Likewise.
336 (elf_x86_64_get_local_sym_hash): Likewise.
337 (elf_x86_64_link_hash_table_free): Likewise.
338 (elf_x86_64_copy_indirect_symbol): Likewise.
339 (elf_x86_64_fixup_symbol): Likewise.
340 (elf_x86_64_readonly_dynrelocs): Likewise.
341 (elf_x86_64_always_size_sections): Likewise.
342 (elf_x86_64_set_tls_module_base): Likewise.
343 (elf_x86_64_dtpoff_base): Likewise.
344 (compare_relocs): Likewise.
345 (elf_x86_64_merge_symbol_attribute): Likewise.
346 (elf_x86_64_hash_symbol): Likewise.
347 (elf_x86_64_parse_gnu_properties): Likewise.
348 (elf_x86_64_merge_gnu_properties): Likewise.
349 (elf_x86_64_link_check_relocs): Likewise.
350 (elf_backend_copy_indirect_symbol): Likewise.
351 (elf_backend_always_size_sections): Likewise.
352 (bfd_elf64_bfd_link_check_relocs): Likewise.
353 (elf_backend_merge_symbol_attribute): Likewise.
354 (elf_backend_hash_symbol): Likewise.
355 (elf_backend_omit_section_dynsym): Likewise.
356 (elf_backend_fixup_symbol): Likewise.
357 (elf_backend_parse_gnu_properties): Likewise.
358 (elf_backend_merge_gnu_properties): Likewise.
359 (bfd_elf32_bfd_link_check_relocs): Likewise.
360 (elf_x86_64_mkobject): Updated.
361 (elf_x86_64_link_hash_table_create): Likewise.
362 (elf_x86_64_check_tls_transition): Likewise.
363 (elf_x86_64_tls_transition): Likewise.
364 (elf_x86_64_convert_load_reloc): Likewise.
365 (elf_x86_64_check_relocs): Likewise.
366 (elf_x86_64_adjust_dynamic_symbol): Likewise.
367 (elf_x86_64_allocate_dynrelocs): Likewise.
368 (elf_x86_64_convert_load): Likewise.
369 (elf_x86_64_size_dynamic_sections): Likewise.
370 (elf_x86_64_relocate_section): Likewise.
371 (elf_x86_64_finish_dynamic_symbol ): Likewise.
372 (elf_x86_64_finish_dynamic_sections): Likewise.
373 (elf_x86_64_output_arch_local_syms): Likewise.
374 (elf_x86_64_get_synthetic_symtab): Likewise.
375 (elf_x86_64_link_setup_gnu_properties): Likewise.
376 (elf_x86_64_link_hash_table): Use elf_x86_link_hash_table,
377 instead of elf_link_hash_table, as base.
378 (elf_x86_64_next_tls_desc_index): New.
379 (elf_x86_64_srelplt2): Likewise.
380 (elf_x86_64_plt): Likewise.
381 (elf_x86_64_lazy_plt): Likewise.
382 (elf_x86_64_non_lazy_plt): Likewise.
383 * elfxx-x86.c: New file.
384 * elfxx-x86.h: Likewise.
386 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
388 * elf32-i386.c (elf_i386_get_synthetic_symtab): Simplify bad
390 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
392 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
394 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check valid PLT
395 sections before checking dynamic relocations and free invalid
396 PLT section contents.
397 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
399 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
401 * elf-bfd.h (_bfd_elf_ifunc_get_synthetic_symtab): Removed.
402 * elf-ifunc.c (_bfd_elf_ifunc_get_synthetic_symtab): Likewise.
404 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
407 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check for valid
409 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
411 2017-08-27 H.J. Lu <hongjiu.lu@intel.com>
413 * elf32-i386.c (elf_i386_link_hash_newfunc): Initialize
415 * elf64-x86-64.c (elf_x86_64_link_hash_newfunc): Likewise.
417 2017-08-26 H.J. Lu <hongjiu.lu@intel.com>
420 * elf-bfd.h (elf_obj_tdata): Use ENUM_BITFIELD on object_id,
421 dyn_lib_class and has_gnu_symbols. Change bad_symtab to bitfield.
422 Add a has_no_copy_on_protected bitfield.
423 (elf_has_no_copy_on_protected): New.
424 * elf-properties.c (_bfd_elf_parse_gnu_properties): Set
425 elf_has_no_copy_on_protected for GNU_PROPERTY_NO_COPY_ON_PROTECTED.
426 (elf_merge_gnu_property_list): Likewise.
427 (_bfd_elf_link_setup_gnu_properties): Set extern_protected_data
428 to FALSE for elf_has_no_copy_on_protected.
429 * elf32-i386.c (SYMBOL_NO_COPYRELOC): New.
430 (elf_i386_link_hash_entry): Add def_protected.
431 (elf_i386_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
432 when checking info->nocopyreloc.
433 (elf_i386_link_setup_gnu_properties): Don't set
434 extern_protected_data here.
435 (elf_i386_merge_symbol_attribute): New function.
436 (elf_backend_merge_symbol_attribute): New.
437 * elf64-x86-64.c (SYMBOL_NO_COPYRELOC): New.
438 (elf_x86_64_link_hash_entry): Add def_protected.
439 (elf_x86_64_need_pic): Report protected symbol for def_protected.
440 (elf_x86_64_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
441 when checking info->nocopyreloc.
442 (elf_x86_64_relocate_section): Also check for R_X86_64_PC32
443 relocation run-time overflow and unresolvable R_X86_64_32S
444 relocation against protected data symbol defined in shared object
445 with GNU_PROPERTY_NO_COPY_ON_PROTECTED.
446 (elf_x86_64_link_setup_gnu_properties): Don't set
447 extern_protected_data here.
448 (elf_x86_64_merge_symbol_attribute): New function.
449 (elf_backend_merge_symbol_attribute): New.
451 2017-08-26 Alan Modra <amodra@gmail.com>
453 * elf32-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
454 (ppc_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
455 (ppc_elf_relocate_section): Comment fix.
456 * elf64-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
457 (ppc64_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
458 Support dynamic relocs for TPREL16 when non-pic too.
459 (dec_dynrel_count): Adjust TPREL16 handling as per check_relocs.
460 (ppc64_elf_relocate_section): Support dynamic relocs for TPREL16
463 2017-08-25 H.J. Lu <hongjiu.lu@intel.com>
465 * elf32-i386.c (elf_i386_link_hash_entry): Remove redundant
466 "symbol" in comments.
467 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Likewise.
469 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
472 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for
473 R_X86_64_PC32 relocation run-time overflow and unresolvable
474 R_X86_64_32S relocation with -z nocopyreloc.
476 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
478 * elf32-i386.c (elf_i386_check_relocs): Revert the last change.
479 Undefined symbols may not have a type.
480 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
482 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
484 * elf64-x86-64.c (elf_x86_64_need_pic): Add an argument for
485 bfd_link_info. Report shared, PIE or PDE object based on
487 (elf_x86_64_check_relocs): Update elf_x86_64_need_pic call.
488 (elf_x86_64_relocate_section): Likewise.
490 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
492 * elf32-i386.c (elf_i386_check_relocs): Increment PLT count only
493 for function symbols.
494 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
496 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
498 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set
499 extern_protected_data to FALSE if GNU_PROPERTY_NO_COPY_ON_PROTECTED
500 is set on any input relocatable file.
501 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
503 2017-08-23 Alan Modra <amodra@gmail.com>
506 * elf64-ppc.c (ensure_undef_dynamic): Rename from
507 ensure_undefweak_dynamic. Handle undefined too.
508 * elf32-ppc.c (ensure_undef_dynamic): Likewise.
509 * elf32-hppa.c (ensure_undef_dynamic): Likewise.
510 (allocate_dynrelocs): Discard undefined non-default visibility
511 relocs first. Make undefined syms dynamic. Tidy goto.
513 2017-08-21 Alan Modra <amodra@gmail.com>
514 H.J. Lu <hongjiu.lu@intel.com>
517 * elf-bfd.h (SYMBOLIC_BIND): Return TRUE for __start/__stop symbols.
518 * elflink.c (bfd_elf_define_start_stop): Rewrite.
520 2017-08-21 Hans-Peter Nilsson <hp@bitrange.com>
523 * elf64-mmix.c (mmix_elf_relax_section): Correct handling of
524 undefined weak symbols.
526 2017-08-18 Nick Clifton <nickc@redhat.com>
529 * tekhex.c (getsym): Fix check for source pointer walking off the
530 end of the input buffer.
532 2017-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
535 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Skip IFUNC
536 relocations in debug sections, change abort to _bfd_error_handler.
538 2017-08-14 Nick Clifton <nickc@redhat.com>
541 * elf.c (setup_group): Check for an empty or very small group
543 * po/bfd.pot: Regenerate.
545 2017-08-14 Alan Modra <amodra@gmail.com>
548 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't add
549 alignment padding here.
550 * elflink.c (bfd_elf_discard_info): Add .eh_frame padding here
551 in a reverse pass over sections.
553 2017-08-11 H.J. Lu <hongjiu.lu@intel.com>
556 * elf32-i386.c (elf_i386_get_synthetic_symtab): Allocate space
557 for @plt suffixes first.
558 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
560 2017-08-08 Nick Clifton <nickc@redhat.com>
563 * elf-attrs.c (_bfd_elf_parse_attributes): Complain about very
564 small section lengths.
565 * elf.c (_bfd_elf_setup_sections): Skip empty entries in the group
567 (elfcore_grok_freebsd_prstatus): Add checks to make sure that
568 there is enough data present in the note.
570 2017-08-08 Alan Modra <amodra@gmail.com>
573 * elf32-microblaze.c (microblaze_elf_check_relocs): Don't bump
574 got.refcount for GOTOFF relocs, just create .got section.
576 2017-08-07 H.J. Lu <hongjiu.lu@intel.com>
578 * elflink.c (elf_link_add_object_symbols): Move common symbol
579 check after bed->common_definition.
581 2017-08-07 Alan Modra <amodra@gmail.com>
584 * elflink.c (bfd_elf_final_link): Don't segfault when sections
585 needed to define various dynamic tags have been discarded.
587 2017-08-07 Nick Clifton <nickc@redhat.com>
590 * elf32-i386.c (elf_i386_link_setup_gnu_properties): If the dynobj
591 has not been set then use the bfd returned by
592 _bfd_elf_link_setup_gnu_properties. If that is null then search
593 through all the input bfds selecting the first normal, ELF format
595 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
597 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
599 * elf32-i386.c (elf_i386_link_hash_entry): Change tls_get_addr
601 (elf_i386_link_hash_newfunc): Initialize tls_get_addr to 0.
602 (elf_i386_check_tls_transition): Check tls_get_addr directly.
603 (elf_i386_convert_load_reloc): Update tls_get_addr check.
604 (elf_i386_link_check_relocs): New function.
605 (bfd_elf32_bfd_link_check_relocs): New.
606 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Change tls_get_addr
608 (elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 0.
609 (elf_x86_64_check_tls_transition): Check tls_get_addr directly.
610 (elf_x86_64_convert_load_reloc): Update tls_get_addr check.
611 (elf_x86_64_link_check_relocs): New function.
612 (bfd_elf64_bfd_link_check_relocs): New.
613 (bfd_elf32_bfd_link_check_relocs): Likewise.
615 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
618 * elflink.c (elf_link_add_object_symbols): Treat common symbol
619 as undefined for --no-define-common.
621 2017-08-05 Alan Modra <amodra@gmail.com>
623 * elf32-hppa.c (elf32_hppa_set_gp): Don't require an
624 hppa_link_hash_table.
626 2017-08-02 Max Filippov <jcmvbkbc@gmail.com>
628 * xtensa-isa.c (xtensa_isa_init): Don't update lookup table
629 entries for sysregs with negative indices.
631 2017-08-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
633 * elf32-s390.c (elf_s390_finish_dynamic_sections): Skip if it
634 isn't the S/390 specific elf data.
635 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
637 2017-07-31 Kuan-Lin Chen <rufus@andestech.com>
639 * elfxx-riscv.c (riscv_elf_add_sub_reloc): New function.
640 * (howto_table) [R_RISCV_ADD8]: Use riscv_elf_add_sub_reloc.
641 [R_RISCV_ADD16]: Likewise.
642 [R_RISCV_ADD32]: Likewise.
643 [R_RISCV_ADD64]: Likewise.
644 [R_RISCV_SUB6]: Likewise.
645 [R_RISCV_SUB8]: Likewise.
646 [R_RISCV_SUB16]: Likewise.
647 [R_RISCV_SUB32]: Likewise.
648 [R_RISCV_SUB64]: Likewise.
650 2017-07-31 Alan Modra <amodra@gmail.com>
652 * elf64-ppc.c (ppc64_elf_tls_setup): Warn on --plt-localentry
653 without ld.so checks.
655 2017-07-29 Alan Modra <amodra@gmail.com>
658 * elf64-ppc.c (struct ppc_link_hash_entry): Add non_zero_localentry.
659 (ppc64_elf_merge_symbol): Set non_zero_localentry.
660 (is_elfv2_localentry0): Test non_zero_localentry.
661 (ppc64_elf_tls_setup): Default to --no-plt-localentry.
663 2017-07-28 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
665 * elf32-s390.c (elf_s390_finish_dynamic_sections): Add NULL
666 pointer check for htab->elf.irelplt.
667 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
669 2017-07-27 Nick Clifton <nickc@redhat.com>
672 * mach-o.c (bfd_mach_o_read_symtab_strtab): Fail if the symtab
674 * nlmcode.h (nlm_swap_auxiliary_headers_in): Replace assertion
676 * section.c (bfd_make_section_with_flags): Fail if the name or bfd
678 * vms-alpha.c (bfd_make_section_with_flags): Correct computation
680 (evax_bfd_print_emh): Check for invalid string lengths.
682 2017-07-25 Nick Clifton <nickc@redhat.com>
684 * po/fr.po: Updated French translation.
686 2017-07-25 Benjamin Green <bengreen5mx@gmail.com>
689 * elf32-msp430.c (msp430_elf_relax_section): Allow conversion of
690 16-bit absolute branches into 10-bit pc-relative branches on the
691 MSP430 as well as the MSP430X.
693 2017-07-25 Alan Modra <amodra@gmail.com>
695 * elf64-ppc.c (struct map_stub): Add tls_get_addr_opt_bctrl.
696 (stub_eh_frame_size): New function.
697 (ppc_size_one_stub): Set group tls_get_addr_opt_bctrl.
698 (group_sections): Init group tls_get_addr_opt_bctrl.
699 (ppc64_elf_size_stubs): Update sizing and initialization of
700 .eh_frame. Iteration over stubs via group list.
701 (ppc64_elf_build_stubs): Iterate over stubs via group list.
702 (ppc64_elf_finish_dynamic_sections): Update finalization of
705 2017-07-24 Nick Clifton <nickc@redhat.com>
708 * mach-o.c (bfd_mach_o_canonicalize_relocs): Pass the base address
709 of the relocs to the canonicalize_one_reloc routine.
710 * mach-o.h (struct bfd_mach_o_backend_data): Update the prototype
711 for the _bfd_mach_o_canonicalize_one_reloc field.
712 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add
713 res_base parameter. Use to check for corrupt pair relocs.
714 * mach-o-aarch64.c (bfd_mach_o_arm64_canonicalize_one_reloc):
716 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc):
718 * mach-o-x86-64.c (bfd_mach_o_x86_64_canonicalize_one_reloc):
721 * vms-alpha.c (_bfd_vms_slurp_eihd): Make sure that there is
722 enough data in the record before attempting to parse it.
723 (_bfd_vms_slurp_eeom): Likewise.
725 (_bfd_vms_slurp_egsd): Check for an invalid section index.
726 (image_set_ptr): Likewise.
727 (alpha_vms_slurp_relocs): Likewise.
729 (alpha_vms_object_p): Check for a truncated record.
731 2017-07-24 Nick Clifton <nickc@redhat.com>
734 * reloc.c (_bfd_unrecognized_reloc): New function. Reports
735 an unrecognized reloc and sets the bfd_error value.
736 * libbfd.h: Regenerate.
737 * elf32-arm.c (elf32_arm_final_link_relocate): Use the new
739 * elf32-i386.c (elf_i386_relocate_section): Likewise.
740 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
741 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
742 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.
743 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
745 2017-07-23 Alan Modra <amodra@gmail.com>
747 * elf64-ppc.c (ppc64_elf_size_stubs): Correct advance to
750 2017-07-19 Szabolcs Nagy <szabolcs.nagy@arm.com>
753 * elfnn-aarch64.c (elfNN_aarch64_reloc_type_class): Return
754 reloc_class_ifunc for ifunc symbols.
756 2017-07-19 Nick Clifton <nickc@redhat.com>
759 * archive.c (bfd_generic_archive_p): If the bfd does not have the
760 correct magic bytes at the start, set the error to wrong format
761 and clear the format selector before returning NULL.
763 2017-07-19 Nick Clifton <nickc@redhat.com>
766 * coff-rs6000.c (_bfd_strntol): New function.
767 (_bfd_strntoll): New function.
768 (GET_VALUE_IN_FIELD): New macro.
769 (EQ_VALUE_IN_FIELD): new macro.
770 (_bfd_xcoff_slurp_armap): Use new macros.
771 (_bfd_xcoff_archive_p): Likewise.
772 (_bfd_xcoff_read_ar_hdr): Likewise.
773 (_bfd_xcoff_openr_next_archived_file): Likewise.
774 (_bfd_xcoff_stat_arch_elt): Likewise.
775 * coff64-rs6000.c (_bfd_strntol): New function.
776 (_bfd_strntoll): New function.
777 (GET_VALUE_IN_FIELD): New macro.
778 (xcoff64_slurp_armap): Use new macros.
780 2017-07-19 Claudiu Zissulescu <claziss@synopsys.com>
781 John Eric Martin <John.Martin@emmicro-us.com>
783 * bfd-in2.h: Regenerate.
784 * libbfd.h: Regenerate.
785 * elf32-arc.c (JLI): Define.
786 * reloc.c: Add JLI relocations.
788 2017-07-18 Nick Clifton <nickc@redhat.com>
791 * coff-sh.c: Fix spelling typos.
792 * compress.c: Likewise.
793 * cpu-pdp11.c: Likewise.
794 * ecofflink.c: Likewise.
795 * elf-m10300.c: Likewise.
797 * elf32-arm.c: Likewise.
798 * elf32-m68k.c: Likewise.
799 * elf32-nds32.c: Likewise.
800 * elf32-ppc.c: Likewise.
801 * elf32-sh.c: Likewise.
802 * elf32-v850.c: Likewise.
803 * elf64-ppc.c: Likewise.
804 * elf64-x86-64.c: Likewise.
805 * elflink.c: Likewise.
806 * elfnn-aarch64.c: Likewise.
807 * elfxx-mips.c: Likewise.
810 * vms-alpha.c: Likewise.
811 * xcofflink.c: Likewise.
813 2017-07-18 Nick Clifton <nickc@redhat.com>
816 * coffcode.h (handle_COMDAT): Replace abort with an error message
819 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
822 * elf64-x86-64.c (elf_x86_64_relocate_section): Limit PIC check
825 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
827 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
829 2017-07-16 Alan Modra <amodra@gmail.com>
831 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimize
832 __tls_index GOT entries when using __tls_get_addr_opt stub.
833 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
835 2017-07-12 Alan Modra <amodra@gmail.com>
837 * po/es.po: Update from translationproject.org/latest/bfd/.
838 * po/fi.po: Likewise.
839 * po/fr.po: Likewise.
840 * po/id.po: Likewise.
841 * po/ja.po: Likewise.
842 * po/ro.po: Likewise.
843 * po/ru.po: Likewise.
844 * po/sr.po: Likewise.
845 * po/sv.po: Likewise.
846 * po/tr.po: Likewise.
847 * po/uk.po: Likewise.
848 * po/vi.po: Likewise.
849 * po/zh_CN.po: Likewise.
850 * po/hr.po: New file from translationproject.org.
851 * configure.ac (ALL_LINGUAS): Add hr. Sort.
852 * configure: Regenerate.
854 2017-07-12 Nick Clifton <nickc@redhat.com>
856 Fix compile time warnings using gcc 7.1.1.
857 * elf32-xtensa.c (elf_xtensa_get_plt_section): Increase length of
859 (elf_xtensa_get_gotplt_section): Increase length of got_name
861 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add a
862 default return of FALSE.
863 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc): Add a
864 default return of FALSE.
866 2017-07-12 Alan Modra <amodra@gmail.com>
868 * binary.c (binary_set_section_contents): Don't print filepos in
870 (coff_write_object_contents): Cast size_t for error message.
871 (coff_slurp_line_table): Don't use bfd_vma symndx.
872 (coff_slurp_reloc_table): Remove unneeded cast.
873 * dwarf2.c (read_section): Cast bfd_int64_t to long long for
875 (find_abstract_instance_name): Likewise.
876 * elf32-arm.c (arm_type_of_stub): Correct error arg order.
877 (bfd_elf32_arm_stm32l4xx_erratum_scan): Don't cast error arg.
878 (elf32_arm_check_relocs): Make r_symndx an int.
879 * elf32-cris.c (cris_elf_check_relocs): Delete extraneous %s in
881 * elf32-metag.c (elf_metag_relocate_section): Delete extra error
883 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Rewrite bogus
885 * elf32-i386.c (elf_i386_check_relocs): Make r_symndx an int.
886 * elf32-s390.c (elf_s390_check_relocs): Likewise.
887 * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
888 * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
889 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
890 * elf64-s390.c (elf_s390_check_relocs): Likewise.
891 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
892 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
893 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
894 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
895 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
896 * elf64-mmix.c (_bfd_mmix_after_linker_allocation): Cast size_t args
897 and use %lu for error message.
898 * elflink.c (elf_link_adjust_relocs): Delete extra error message arg.
899 * mmo.c (mmo_scan): Make stab_loc a file_ptr. Cast expression for
902 * elf32-arm.c (elf32_arm_tls_relax): Correct format string and args
904 (elf32_arm_final_link_relocate): Likewise.
905 * coff-arm.c (bfd_arm_process_before_allocation): Likewise.
906 * coffcode.h (styp_to_sec_flags): Likewise.
907 * cofflink.c (_bfd_coff_write_global_sym): Likewise.
908 * ecoff.c (_bfd_ecoff_slurp_symbol_table): Likewise.
909 * elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise.
910 * elf32-bfin.c (bfinfdpic_check_relocs): Likewise.
911 (elf32_bfin_merge_private_bfd_data): Likewise.
912 * elf32-cris.c (cris_elf_relocate_section): Likewise.
913 * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
914 * elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise.
915 (i370_elf_relocate_section): Likewise.
916 * elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise.
917 * elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise.
918 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
919 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
920 * elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise.
921 * elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise.
922 * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
923 * elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise.
924 (_bfd_mips_elf_merge_private_bfd_data): Likewise.
925 * ieee.c (ieee_write_id, read_id): Likewise.
926 * mach-o.c (bfd_mach_o_write_contents): Likewise.
927 (bfd_mach_o_layout_commands, bfd_mach_o_read_section_32): Likewise.
928 (bfd_mach_o_read_section_64, bfd_mach_o_read_symtab_symbol): Likewise.
929 (bfd_mach_o_read_command, bfd_mach_o_header_p): Likewise.
930 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Likewise.
931 * stabs.c (_bfd_link_section_stabs): Likewise.
933 * coff-arm.c (coff_arm_relocate_section): Use L modifier in error
935 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
936 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
937 * coff-rs6000.c (xcoff_reloc_type_toc): Likewise.
938 * coff-sh.c (sh_relax_section): Likewise.
939 (sh_relax_delete_bytes, sh_swap_insns): Likewise.
940 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
941 * coffcode.h (coff_slurp_reloc_table): Likewise.
942 * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
943 (_bfd_coff_read_string_table): Likewise.
944 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
945 * compress.c (bfd_get_full_section_contents): Likewise.
946 * dwarf2.c (read_formatted_entries, decode_line_info): Likewise.
947 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
948 * elf.c (bfd_elf_string_from_elf_section): Likewise.
949 * elf32-arc.c (arc_special_overflow_checks): Likewise.
950 * elf32-arm.c (elf32_arm_tls_relax): Likewise.
951 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Likewise.
952 (elf32_arm_write_section): Likewise.
953 * elf32-bfin.c (bfin_relocate_section): Likewise.
954 (bfinfdpic_relocate_section): Likewise.
955 * elf32-hppa.c (hppa_build_one_stub): Likewise.
956 (final_link_relocate, elf32_hppa_relocate_section): Likewise.
957 * elf32-i386.c (elf_i386_tls_transition): Likewise.
958 (elf_i386_relocate_section): Likewise.
959 * elf32-ip2k.c (ip2k_final_link_relocate): Likewise.
960 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
961 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
962 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
963 * elf32-metag.c (elf_metag_relocate_section): Likewise.
964 * elf32-nds32.c (unrecognized_reloc_msg): Likewise.
965 (nds32_elf_relax_longcall1, nds32_elf_relax_longcall2): Likewise.
966 (nds32_elf_relax_longcall3, nds32_elf_relax_longjump1): Likewise.
967 (nds32_elf_relax_longjump2, nds32_elf_relax_longjump3): Likewise.
968 (nds32_elf_relax_longcall4, nds32_elf_relax_longcall5): Likewise.
969 (nds32_elf_relax_longcall6, nds32_elf_relax_longjump4): Likewise.
970 (nds32_elf_relax_longjump5, nds32_elf_relax_longjump6): Likewise.
971 (nds32_elf_relax_longjump7, nds32_elf_relax_loadstore): Likewise.
972 (nds32_elf_relax_ptr, nds32_elf_ex9_build_hash_table): Likewise.
973 * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
974 * elf32-rx.c (UNSAFE_FOR_PID): Likewise.
975 * elf32-s390.c (invalid_tls_insn, elf_s390_relocate_section): Likewise.
976 * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
977 * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
978 * elf32-sh.c (sh_elf_relax_section): Likewise.
979 (sh_elf_relax_delete_bytes, sh_elf_swap_insns): Likewise.
980 (sh_elf_relocate_section): Likewise.
981 * elf32-sh64.c (shmedia_prepare_reloc): Likewise.
982 * elf32-spu.c (spu_elf_relocate_section): Likewise.
983 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
984 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
985 * elf32-v850.c (v850_elf_relax_section): Likewise.
986 * elf32-vax.c (elf_vax_check_relocs): Likewise.
987 (elf_vax_relocate_section): Likewise.
988 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
989 (extend_ebb_bounds_forward, extend_ebb_bounds_backward): Likewise.
990 (compute_text_actions, compute_ebb_proposed_actions): Likewise.
991 (do_fix_for_relocatable_link): Likewise.
992 * elf64-alpha.c (elf64_alpha_relax_got_load): Likewise.
993 (elf64_alpha_relax_with_lituse): Likewise.
994 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Likewise.
995 (elf_hppa_final_link_relocate): Likewise.
996 * elf64-ia64-vms.c (elf64_ia64_relax_section): Likewise.
997 (elf64_ia64_choose_gp, elf64_ia64_relocate_section): Likewise.
998 (elf64_vms_link_add_object_symbols): Likewise.
999 * elf64-mmix.c (mmix_elf_perform_relocation): Likewise.
1000 (mmix_final_link_relocate): Likewise.
1001 * elf64-s390.c (invalid_tls_insn): Likewise.
1002 (elf_s390_relocate_section): Likewise.
1003 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
1004 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
1005 (elf_x86_64_relocate_section): Likewise.
1006 * elfcode.h (elf_slurp_symbol_table): Likewise.
1007 * elfcore.h (elf_core_file_p): Likewise.
1008 * elflink.c (elf_link_read_relocs_from_section): Likewise.
1009 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
1010 (elfNN_aarch64_relocate_section): Likewise.
1011 * elfnn-ia64.c (elfNN_ia64_relax_section): Likewise.
1012 (elfNN_ia64_choose_gp, elfNN_ia64_relocate_section): Likewise.
1013 * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
1014 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
1015 (_bfd_mips_elf_relocate_section): Likewise.
1016 (_bfd_mips_elf_finish_dynamic_symbol, mips_finish_exec_plt): Likewise.
1017 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
1018 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
1019 * ieee.c (ieee_slurp_external_symbols): Likewise.
1020 * ihex.c (ihex_write_object_content): Likewise.
1021 * mach-o.c (bfd_mach_o_build_exec_seg_command): Likewise.
1022 * merge.c (_bfd_merged_section_offset): Likewise.
1023 * mmo.c (mmo_write_loc_chunk): Likewise.
1024 (mmo_write_object_contents): Likewise.
1025 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Likewise.
1026 * stabs.c (_bfd_link_section_stabs): Likewise.
1027 * xcofflink.c (xcoff_link_add_symbols, xcoff_find_tc0): Likewise.
1029 2017-07-11 Alan Modra <amodra@gmail.com>
1031 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo.
1033 2017-07-11 Alan Modra <amodra@gmail.com>
1035 * elf32-ppc.c (ppc_elf_relocate_section): Emit "unexpected
1036 instruction" error using _bfd_error_handler, not einfo.
1038 2017-07-10 Nick Clifton <nickc@redhat.com>
1040 * coffcode.h (coff_slurp_symbol_table): Do not include an entry
1041 for C_AIX_WEAKEXT if it has the same value as C_WEAKEXT.
1043 2017-07-07 John Baldwin <jhb@FreeBSD.org>
1045 * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PTLWPINFO.
1047 2017-07-07 Alan Modra <amodra@gmail.com>
1049 * coffcode.h (coff_slurp_symbol_table): Handle C_AIX_WEAKEXT.
1051 2017-07-07 Alan Modra <amodra@gmail.com>
1053 * bfd.c (_doprnt): Replace "L" with "ll" when printing bfd_vma
1054 as long long. Move code replacing "ll" with "I64", and simplify.
1056 2017-07-06 H.J. Lu <hongjiu.lu@intel.com>
1058 * bfd.c (_doprnt): Convert 'L' to 'l' when setting wide_width
1061 2017-07-05 H.J. Lu <hongjiu.lu@intel.com>
1063 * dwarf2.c (line_info_add_include_dir_stub): Replace time with
1065 (line_info_add_file_name): Likewise.
1066 (decode_line_info): Likewise.
1068 2017-07-04 Tristan Gingold <gingold@adacore.com>
1070 * version.m4: Bump version to 2.29.51
1071 * configure: Regenerate.
1073 2017-07-04 Jiong Wang <jiong.wang@arm.com>
1075 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Remove the
1076 sanity check at the head of this function.
1078 2017-07-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1080 * dwarf2.c (struct dwarf2_debug): Add fields dwarf_line_str_buffer and
1081 dwarf_line_str_size.
1082 (struct attr_abbrev): Add field implicit_const.
1083 (dwarf_debug_sections): Add .debug_line_str.
1084 (enum dwarf_debug_section_enum): Add debug_line_str and debug_max.
1085 (dwarf_debug_section_assert): Add static assertion.
1086 (read_indirect_line_string): New.
1087 (read_abbrevs): Support DW_FORM_implicit_const.
1088 (is_str_attr): Support DW_FORM_line_strp.
1089 (read_attribute_value): Support DW_FORM_line_strp and
1090 DW_FORM_implicit_const.
1091 (read_attribute): Support DW_FORM_implicit_const.
1092 (line_info_add_include_dir, line_info_add_include_dir_stub):
1093 (line_info_add_file_name, read_formatted_entries): New.
1094 (decode_line_info, parse_comp_unit): Support DWARF 5.
1095 (_bfd_dwarf2_cleanup_debug_info): Free dwarf_line_str_buffer.
1097 2017-07-03 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
1099 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove the
1100 abort statement that was put for symbols that are not dynamic.
1102 2017-07-03 Tristan Gingold <gingold@adacore.com>
1104 * po/bfd.pot: Regenerate
1106 2017-07-03 Alan Modra <amodra@gmail.com>
1108 * bfd.c (_doprnt): Rewrite "ll" and "L" modifiers to "I64" for
1109 __MSVCRT__. Support "L" modifier for bfd_vma. Formatting.
1110 * elf.c (setup_group): Use "Lx" to print sh_size.
1111 (_bfd_elf_setup_sections): Remove unnecessary cast and print
1112 unknown section type in hex.
1113 (copy_special_section_fields): Style fix.
1114 (bfd_section_from_shdr): Correct format for sh_link. Use a
1115 common error message for all the variants of unrecognized
1117 (assign_file_positions_for_load_sections): Use "Lx" for lma
1118 adjust error message.
1119 (assign_file_positions_for_non_load_sections): Formatting.
1120 (rewrite_elf_program_header): Formatting. Use "Lx" for
1121 bfd_vma values in error messages.
1122 * elfcode.h (elf_slurp_reloc_table_from_section): Cast
1123 ELF_R_SYM value to type expected by format.
1124 * elflink.c (elf_link_read_relocs_from_section): Use "Lx"
1126 (elf_link_add_object_symbols): Use "Lu" for symbol sizes.
1127 (elf_link_input_bfd): Use "Lx" for r_info.
1128 (bfd_elf_gc_record_vtinherit): Use "Lx" for offset.
1130 2017-07-03 Alan Modra <amodra@gmail.com>
1132 * bfd.c (bfd_scan_vma): Don't use long long unless HAVE_LONG_LONG.
1133 * coff-rs6000.c (FMT20): Handle hosts with 64-bit long and
1134 Microsoft C library variant of long long format specifier.
1135 (PRINT20): Cast value to bfd_uint64_t not long long.
1136 * coffcode.h (coff_print_aux): Use BFD_VMA_FMT.
1137 * coff-x86_64.c (coff_amd64_reloc): Use bfd_uint64_t rather than
1138 long long. Don't cast to bfd_vma.
1139 * elf32-score.c (score3_bfd_getl48): Likewise.
1140 * vms-alpha.c (_bfd_vms_slurp_eisd): Likewise.
1142 2017-07-03 Alan Modra <amodra@gmail.com>
1144 * elf.c (_bfd_elf_print_private_bfd_data): Use BFD_VMA_FMT to
1146 (bfd_elf_print_symbol): Don't cast symbol->flags.
1147 (_bfd_elf_symbol_from_bfd_symbol): Likewise.
1148 * elf32-ppc.c (ppc_elf_begin_write_processing): Correct
1149 _bfd_error_handler argument order.
1150 (ppc_elf_merge_private_bfd_data): Don't cast flags.
1152 2017-07-03 Alan Modra <amodra@gmail.com>
1154 * configure.ac: Invoke AC_CHECK_TYPES for long long. Invoke
1155 AC_TYPE_LONG_DOUBLE.
1156 * configure: Regenerate.
1157 * config.in: Regenerate.
1159 2017-06-29 Andrew Waterman <andrew@sifive.com>
1161 * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Fix TLS copy
1164 2017-06-29 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
1166 * elfxx-sparc.c (allocate_dynrelocs): Don't make a symbol dynamic
1167 unless it is undefined weak.
1168 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Set the flag
1169 relative_reloc to direct non-dynamic symbols to R_SPARC_RELATIVE
1171 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): If symbol
1172 is not dynamic in PIC, abort.
1174 2017-06-29 Jiong Wang <jiong.wang@arm.com>
1177 * elfnn-aarch64.c (elfNN_aarch64_allocate_dynrelocs): Only make
1178 undefined weak symbols into dynamic.
1179 (elfNN_aarch64_final_link_relocate): Generate runtime RELATIVE
1180 relocation for non-dynamic symbols.
1181 (elfNN_aarch64_finish_dynamic_symbol): Add sanity check.
1183 2017-06-29 Jiong Wang <jiong.wang@arm.com>
1185 * elfnn-aarch64.c (aarch64_relocation_aginst_gp_p): New function.
1186 (elfNN_aarch64_final_link_relocate): Delete duplicated code for
1187 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15, BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
1188 BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
1189 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Optimize the
1192 2017-06-29 Andreas Arnez <arnez@linux.vnet.ibm.com>
1194 * elf-bfd.h (elfcore_write_s390_gs_cb): Add prototype.
1195 (elfcore_write_s390_gs_bc): Likewise.
1196 * elf.c (elfcore_grok_s390_gs_cb): New function.
1197 (elfcore_grok_s390_gs_bc): New function.
1198 (elfcore_grok_note): Call them.
1199 (elfcore_write_s390_gs_cb): New function.
1200 (elfcore_write_s390_gs_bc): New function.
1201 (elfcore_write_register_note): Call them.
1203 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
1205 * libbfd.c (_bfd_generic_get_section_contents): Don't call
1206 bfd_get_file_size. Check archive element size.
1207 (_bfd_generic_get_section_contents_in_window): Likewise.
1209 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
1211 * bfd-in2.h: Regenerated.
1212 * bfdio.c (bfd_get_size): Change return type to ufile_ptr.
1213 (bfd_get_file_size): Likewise.
1215 2017-06-28 Maciej W. Rozycki <macro@imgtec.com>
1216 Matthew Fortune <matthew.fortune@imgtec.com>
1218 * archures.c (bfd_mach_mips_interaptiv_mr2): New macro.
1219 * cpu-mips.c (I_interaptiv_mr2): New enum value.
1220 (arch_info_struct): Add "mips:interaptiv-mr2" entry.
1221 * elfxx-mips.c (_bfd_elf_mips_mach) <E_MIPS_MACH_IAMR2>: New
1223 (mips_set_isa_flags) <bfd_mach_mips_interaptiv_mr2>: Likewise.
1224 (bfd_mips_isa_ext) <bfd_mach_mips_interaptiv_mr2>: Likewise.
1225 (print_mips_isa_ext) <AFL_EXT_INTERAPTIV_MR2>: Likewise.
1226 (mips_mach_extensions): Add `bfd_mach_mipsisa32r3' and
1227 `bfd_mach_mips_interaptiv_mr2' entries.
1228 * bfd-in2.h: Regenerate.
1230 2017-06-27 Nick Clifton <nickc@redhat.com>
1232 * tekhex.c (pass_over): Revert accidental conversion of a local
1233 array to a static array.
1235 2017-06-27 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
1238 * elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Adjust
1239 reloc addend if necessary. Adjust diff only if
1240 shrinked_insn_address < end_address.
1242 2017-06-27 Alan Modra <amodra@gmail.com>
1245 * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
1246 (_bfd_generic_get_section_contents_in_window): Likewise.
1248 2017-06-26 Kuan-Lin Chen <rufus@andestech.com>
1250 * elfnn-riscv.c (perform_relocation): Support the new
1251 R_RISCV_32_PCREL relocation.
1252 (riscv_elf_relocate_section): Likewise.
1253 * elfxx-riscv.c (howto_table): Likewise.
1254 (riscv_reloc_map): Likewise.
1255 * bfd-in2.h (BFD_RELOC_RISCV_32_PCREL): New relocation.
1256 * libbfd.h: Regenerate.
1258 2017-06-27 Alan Modra <amodra@gmail.com>
1261 * libbfd.c (_bfd_generic_get_section_contents): Delete abort.
1262 Use unsigned file pointer type, and remove cast.
1263 * libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise.
1264 Add "count", not "sz".
1266 2017-06-26 Pedro Alves <palves@redhat.com>
1269 * libbfd.c (_bfd_generic_get_section_contents): Add "count", not
1272 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
1275 * libbfd.c (_bfd_generic_get_section_contents_in_window): Add
1278 2017-06-26 Maciej W. Rozycki <macro@imgtec.com>
1280 * cpu-mips.c (arch_info_struct): Mark the 4010 32-bit.
1281 * elfxx-mips.c (mips_set_isa_flags) <bfd_mach_mips4010>: Set
1282 E_MIPS_ARCH_2 rather than E_MIPS_ARCH_3 in `e_flags'.
1283 (mips_mach_extensions): Mark `bfd_mach_mips4010' as extending
1284 `bfd_mach_mips6000' rather than `bfd_mach_mips4000'.
1286 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
1289 * compress.c (bfd_get_full_section_contents): Don't check the
1291 * libbfd.c (_bfd_generic_get_section_contents): Check for and
1292 reject a section whose size + offset is greater than the size
1294 (_bfd_generic_get_section_contents_in_window): Likewise.
1296 2017-06-26 Nick Clifton <nickc@redhat.com>
1299 * tekhex.c (getvalue): Check for the source pointer exceeding the
1300 end pointer before the first byte is read.
1302 2017-06-26 Nick Clifton <nickc@redhat.com>
1305 * opncls.c (get_build_id): Check that the section is big enough
1306 to contain the whole note.
1307 * compress.c (bfd_get_full_section_contents): Check for and reject
1308 a section whose size is greater than the size of the entire file.
1309 * elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not
1310 contain a notes section.
1312 2017-06-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1314 * elf64-s390.c (elf_s390_additional_program_headers): Add NULL
1316 (elf_s390_modify_segment_map): Likewise.
1317 (bfd_elf_s390_set_options): Lisewise.
1319 2017-06-26 Alan Modra <amodra@gmail.com>
1321 * elflink.c (_bfd_elf_link_create_dynstrtab): Don't make dynobj
1323 (_bfd_elf_size_group_sections): Skip --just-syms bfds.
1324 (bfd_elf_size_dynamic_sections): Ignore .note.GNU-stack and
1325 .preinit_array on --just-syms bfds.
1326 (_bfd_elf_gc_mark_extra_sections): Skip --just-syms bfds.
1327 (elf_gc_sweep, bfd_elf_parse_eh_frame_entries): Likewise.
1328 (bfd_elf_gc_sections, bfd_elf_discard_info): Likewise.
1330 2017-06-25 Sergei Trofimovich <slyfox@gentoo.org>
1332 * elf.c (find_link): Bounds check "hint".
1334 2017-06-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
1336 * elf32-arm.c (using_thumb_only): Update list of architectures in
1337 BFD_ASSERT for which the logic is valid.
1338 (using_thumb2_bl): Likewise.
1339 (using_thumb2): Likewise and return true for ARMv8-R.
1340 (arch_has_arm_nop): Likewise.
1341 (tag_cpu_arch_combine): New v8r table for ARMv8-R Tag_CPU_arch
1342 merging logic. Update commentis for value 15 of v8m_baseline,
1343 v8m_mainline and v4t_plus_v6_m arrays. Use v8r array to decide
1344 merging of value 15 of Tag_CPU_arch.
1346 2017-06-23 Jiong Wang <jiong.wang@arm.com>
1348 * reloc.c (BFD_RELOC_AARCH64_ADR_GOTPAGE): Rename to
1349 BFD_RELOC_AARCH64_ADR_GOT_PAGE
1350 * bfd-in2.h: Regenerate.
1352 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1354 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Move
1355 the error_alignment label forward. Properly align program
1356 property note section.
1358 2017-06-22 Eric Christopher <echristo@gmail.com>
1360 * elf32-arm.c (elf32_arm_final_link_relocate): Use labs rather than
1361 abs to fix a truncation warning.
1363 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1365 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Resolve
1366 local undefined weak symbol to 0.
1367 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Likewise.
1369 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1371 * elf32-i386.c (elf_i386_merge_gnu_properties): If info->shstk
1372 is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
1373 (elf_i386_link_setup_gnu_properties): If info->shstk is set,
1374 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
1375 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): If
1376 info->shstk is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
1377 (elf_x86_64_link_setup_gnu_properties): If info->shstk is set,
1378 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
1380 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1382 * elf32-i386.c (elf_i386_lazy_ibt_plt0_entry): New.
1383 (elf_i386_lazy_ibt_plt_entry): Likewise.
1384 (elf_i386_pic_lazy_ibt_plt0_entry): Likewise.
1385 (elf_i386_non_lazy_ibt_plt_entry): Likewise.
1386 (elf_i386_pic_non_lazy_ibt_plt_entry): Likewise.
1387 (elf_i386_eh_frame_lazy_ibt_plt): Likewise.
1388 (elf_i386_lazy_plt_layout): Likewise.
1389 (elf_i386_non_lazy_plt_layout): Likewise.
1390 (elf_i386_link_hash_entry): Add plt_second.
1391 (elf_i386_link_hash_table): Add plt_second and
1392 plt_second_eh_frame.
1393 (elf_i386_allocate_dynrelocs): Use the second PLT if needed.
1394 (elf_i386_size_dynamic_sections): Use .plt.got unwind info for
1395 the second PLT. Check the second PLT.
1396 (elf_i386_relocate_section): Use the second PLT to resolve
1397 PLT reference if needed.
1398 (elf_i386_finish_dynamic_symbol): Fill and use the second PLT if
1400 (elf_i386_finish_dynamic_sections): Set sh_entsize on the
1401 second PLT. Generate unwind info for the second PLT.
1402 (elf_i386_plt_type): Add plt_second.
1403 (elf_i386_get_synthetic_symtab): Support the second PLT.
1404 (elf_i386_parse_gnu_properties): Support
1405 GNU_PROPERTY_X86_FEATURE_1_AND.
1406 (elf_i386_merge_gnu_properties): Support
1407 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
1408 on GNU_PROPERTY_X86_FEATURE_1_IBT
1409 (elf_i386_link_setup_gnu_properties): If info->ibt is set,
1410 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
1411 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
1412 is set on all relocatable inputs.
1413 * elf64-x86-64.c (elf_x86_64_lazy_ibt_plt_entry): New.
1414 (elf_x32_lazy_ibt_plt_entry): Likewise.
1415 (elf_x86_64_non_lazy_ibt_plt_entry): Likewise.
1416 (elf_x32_non_lazy_ibt_plt_entry): Likewise.
1417 (elf_x86_64_eh_frame_lazy_ibt_plt): Likewise.
1418 (elf_x32_eh_frame_lazy_ibt_plt): Likewise.
1419 (elf_x86_64_lazy_ibt_plt): Likewise.
1420 (elf_x32_lazy_ibt_plt): Likewise.
1421 (elf_x86_64_non_lazy_ibt_plt): Likewise.
1422 (elf_x32_non_lazy_ibt_plt): Likewise.
1423 (elf_x86_64_get_synthetic_symtab): Support the second PLT.
1424 (elf_x86_64_parse_gnu_properties): Support
1425 GNU_PROPERTY_X86_FEATURE_1_AND.
1426 (elf_x86_64_merge_gnu_properties): Support
1427 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
1428 on GNU_PROPERTY_X86_FEATURE_1_IBT
1429 (elf_x86_64_link_setup_gnu_properties): If info->ibt is set,
1430 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
1431 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
1432 is set on all relocatable inputs.
1434 2017-06-22 Nick Clifton <nickc@redhat.com>
1437 * som.c (setup_sections): NUL terminate the space_strings buffer.
1438 Check that the space.name field does not index beyond the end of
1439 the space_strings buffer.
1441 2017-06-21 Nick Clifton <nickc@redhat.com>
1444 * coff-sh.c (sh_reloc): Check for an out of range reloc.
1446 2017-06-21 Nick Clifton <nickc@redhat.com>
1449 * vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as
1450 type of the size parameter.
1451 (_bfd_vms_save_counted_string): Add second parameter - the maximum
1452 length of the counted string.
1453 * vms.h (_bfd_vms_save_sized_string): Update prototype.
1454 (_bfd_vms_save_counted_string): Likewise.
1455 * vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to
1456 _bfd_vms_save_counted_string.
1457 (_bfd_vms_slurp_ehdr): Likewise.
1458 (_bfd_vms_slurp_egsd): Likewise.
1459 (Parse_module): Likewise.
1461 2017-06-21 Alan Modra <amodra@gmail.com>
1463 * elf64-ppc.c (ppc64_elf_size_stubs): Test for localentry:0 plt
1464 calls before tocsave calls.
1465 (ppc64_elf_relocate_section): Allow localentry:0 plt calls without
1468 2017-06-21 Nick Clifton <nickc@redhat.com>
1471 * reloc.c (bfd_generic_get_relocated_section_contents): Fail if
1472 bfd_get_full_section_contents returns no contents.
1474 2017-06-21 Nick Clifton <nickc@redhat.com>
1477 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized
1480 2017-06-21 Nick Clifton <nickc@redhat.com>
1483 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section
1485 (image_set_ptr): Likewise.
1486 (alpha_vms_fix_sec_rel): Likewise.
1487 (alpha_vms_slurp_relocs): Likewise.
1489 2017-06-21 Nick Clifton <nickc@redhat.com>
1492 * ieee.c (ieee_slurp_sections): Check for a NULL return from
1494 (ieee_archive_p): Likewise.
1495 (ieee_object_p): Likewise.
1497 2017-06-21 Nick Clifton <nickc@redhat.com>
1500 * elf.c (setup_group): Zero the group section pointer list after
1501 allocation so that loops can be caught. Check for NULL pointers
1502 when processing a group list.
1504 2017-06-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1506 * elf-s390.h: New file.
1507 * elf64-s390.c (struct elf_s390_link_hash_table): Add params
1509 (elf_s390_additional_program_headers): New function.
1510 (elf_s390_modify_segment_map): New function.
1511 (bfd_elf_s390_set_options): New function.
1512 (elf_backend_additional_program_headers)
1513 (elf_backend_modify_segment_map): Add macro definitions.
1515 2017-06-19 H.J. Lu <hongjiu.lu@intel.com>
1518 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
1519 the DYNAMIC bit instead of bfd_count_sections.
1521 2017-06-19 Nick Clifton <nickc@redhat.com>
1524 * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record
1526 (evax_bfd_print_eeom): Likewise.
1527 (evax_bfd_print_egsd): Check for an overlarge record length.
1528 (evax_bfd_print_etir): Likewise.
1530 2017-06-19 Nick Clifton <nickc@redhat.com>
1533 * libieee.h (struct common_header_type): Add end_p field.
1534 * ieee.c (this_byte_and_next): Do not advance input_p beyond
1536 (read_id): Check for a length that exceeds the remaining bytes in
1538 (ieee_seek): Initialise end_p.
1539 (ieee_archive_p): Likewise.
1540 (ieee_object_p): Likewise.
1542 2017-06-19 Nick Clifton <nickc@redhat.com>
1545 * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset
1546 before reading the EIHS structure entries.
1548 2017-06-19 Nick Clifton <nickc@redhat.com>
1551 * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for
1552 gsd_size. Check that there are enough bytes remaining to read the
1553 type and size of the next egsd. Check that the size of the egsd
1554 does not exceed the size of the record.
1556 2017-06-19 Alan Modra <amodra@gmail.com>
1558 * config.bfd: Correct targ_underscore for cris.
1560 2017-06-18 Alan Modra <amodra@gmail.com>
1562 * config.bfd: Correct targ_underscore for epiphany, ip2k,
1563 m32c, mn10200, pru, rl78, rx, crisv32 and v850.
1565 2017-06-16 Nick Clifton <nickc@redhat.com>
1567 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
1568 bucketlist is empty because there are no symbols to add to the
1571 2017-06-16 Alan Modra <amodra@gmail.com>
1577 * targets.c (struct bfd_target): Add _bfd_define_start_stop.
1578 (BFD_JUMP_TABLE_LINK): Likewise.
1579 * elf-bfd.h (bfd_elf_define_start_stop): Declare.
1580 * elflink.c (_bfd_elf_gc_mark_rsec): Update comment.
1581 (bfd_elf_define_start_stop): New function.
1582 * linker.c (bfd_generic_define_start_stop): New function.
1583 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init
1585 * aout-adobe.c (aout_32_bfd_define_start_stop): Define.
1586 * aout-target.h (MY_bfd_define_start_stop): Define.
1587 * aout-tic30.c (MY_bfd_define_start_stop): Define.
1588 * binary.c (binary_bfd_define_start_stop): Define.
1589 * bout.c (b_out_bfd_define_start_stop): Define.
1590 * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define.
1591 * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define.
1592 * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define.
1593 * coffcode.h (coff_bfd_define_start_stop): Define.
1594 * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define.
1595 * i386msdos.c (msdos_bfd_define_start_stop): Define.
1596 * i386os9k.c (os9k_bfd_define_start_stop): Define.
1597 * ieee.c (ieee_bfd_define_start_stop): Define.
1598 * ihex.c (ihex_bfd_define_start_stop): Define.
1599 * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define.
1600 * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define.
1601 * mmo.c (mmo_bfd_define_start_stop): Define.
1602 * nlm-target.h (nlm_bfd_define_start_stop): Define.
1603 * oasys.c (oasys_bfd_define_start_stop): Define.
1604 * pef.c (bfd_pef_bfd_define_start_stop): Define.
1605 * plugin.c (bfd_plugin_bfd_define_start_stop): Define.
1606 * ppcboot.c (ppcboot_bfd_define_start_stop): Define.
1607 * som.c (som_bfd_define_start_stop): Define.
1608 * srec.c (srec_bfd_define_start_stop): Define.
1609 * tekhex.c (tekhex_bfd_define_start_stop): Define.
1610 * versados.c (versados_bfd_define_start_stop): Define.
1611 * vms-alpha.c (vms_bfd_define_start_stop): Define.
1612 (alpha_vms_bfd_define_start_stop): Define.
1613 * xsym.c (bfd_sym_bfd_define_start_stop): Define.
1614 * bfd-in2.h: Regenerate.
1615 * libbfd.h: Regenerate.
1617 2017-06-16 Jiong Wang <jiong.wang@arm.com>
1619 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
1620 SYMBOL_REFERENCES_LOCAL.
1622 2017-06-15 Jiong Wang <jiong.wang@arm.com>
1625 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
1626 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
1627 runtime for if there needs copy relocation elimination.
1628 (need_copy_relocation_p): New function. Return true for symbol with
1629 pc-relative references and if it's against read-only sections.
1630 (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
1631 (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
1632 that are related with accessing external objects.
1633 (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change
1634 in elfNN_aarch64_check_relocs.
1636 2017-06-15 Nick Clifton <nickc@redhat.com>
1639 * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
1642 (ieee_archive_p): Likewise.
1644 2017-06-15 Nick Clifton <nickc@redhat.com>
1647 * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
1649 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
1651 * elf32-xtensa.c (elf_xtensa_be_plt_entry,
1652 elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays,
1653 keep both windowed and call0 ABI PLT definitions.
1654 (elf_xtensa_create_plt_entry): Use selected ABI to choose upper
1655 elf_xtensa_*_plt_entry endex.
1656 (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size.
1658 2017-06-14 Nick Clifton <nickc@redhat.com>
1661 * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
1664 2017-06-14 Nick Clifton <nickc@redhat.com>
1667 * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
1668 maximum value for the ascic pointer. Check that name processing
1669 does not read beyond this value.
1670 (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
1673 2017-06-14 Nick Clifton <nickc@redhat.com>
1676 * versados.c (versados_mkobject): Zero the allocated tdata structure.
1677 (process_otr): Check for an invalid offset in the otr structure.
1679 2017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
1681 * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
1683 2017-06-13 H.J. Lu <hongjiu.lu@intel.com>
1689 * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
1690 vtable field to a union.
1691 (_bfd_elf_is_start_stop): Removed.
1692 * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
1693 __start_SECNAME and __stop_SECNAME symbols.
1694 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
1695 * elflink.c (_bfd_elf_is_start_stop): Removed.
1696 (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
1697 _bfd_elf_is_start_stop.
1698 (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
1699 __stop_SECNAME symbols. Updated.
1700 (elf_gc_smash_unused_vtentry_relocs): Likewise.
1701 (bfd_elf_gc_record_vtinherit): Likewise.
1702 (bfd_elf_gc_record_vtentry): Likewise.
1704 2017-06-13 Nick Clifton <nickc@redhat.com>
1707 * elflink.c (elf_link_adjust_relocs): Generate an error when
1708 encountering a reloc against a symbol removed by garbage
1711 2017-06-12 H.J. Lu <hongjiu.lu@intel.com>
1713 * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
1714 to merge_gnu_properties.
1715 * elf-properties.c (elf_merge_gnu_properties): Add struct
1716 bfd_link_info * and pass it to merge_gnu_properties.
1717 (elf_merge_gnu_property_list): Add struct bfd_link_info *
1718 and pass it to elf_merge_gnu_properties.
1719 (_bfd_elf_link_setup_gnu_properties): Pass info to
1720 elf_merge_gnu_property_list.
1721 * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
1723 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
1725 2017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
1728 * binary.c (binary_set_section_contents): Scale lma by octets
1729 per byte to set filepos.
1731 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1733 * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
1736 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1738 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
1741 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1743 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
1744 patched section contents for TLS IE reloc.
1745 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
1747 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1749 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
1750 RELOC_FOR_GLOBAL_SYMBOL macro.
1752 2018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1754 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
1757 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1759 * config/tc-arc.c (md_undefined_symbol): Changed.
1760 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
1762 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1764 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
1767 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1769 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
1770 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
1772 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1774 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
1777 2017-06-08 Richard Earnshaw <rearnsha@arm.com>
1779 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
1780 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
1781 is non-zero. Add clarifying comments.
1783 2017-06-08 H.J. Lu <hongjiu.lu@intel.com>
1785 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
1786 name. Use local IFUNC symbol name string to report unsupported
1787 non-PIC call to IFUNC function.
1788 (elf_i386_relocate_section): Dump local IFUNC name with minfo
1789 when generating R_386_IRELATIVE relocation.
1790 (elf_i386_finish_dynamic_symbol): Likewise.
1791 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
1793 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
1794 when generating R_X86_64_IRELATIVE relocation.
1795 (elf_x86_64_finish_dynamic_symbol): Likewise.
1797 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
1799 * elf.c (setup_group): Make sure BFD sections are created for all
1800 group sections in the input file when processing SHF_GROUP
1802 (bfd_section_from_shdr): Avoid duplicating logic already
1803 implemented in `setup_group'.
1805 2017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
1808 * peXXigen.c (pe_print_idata): Use the address of the first thunk
1809 if the hint address is zero.
1811 2017-06-06 James Clarke <jrtc27@jrtc27.com>
1814 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
1815 ELF_COMMON_DEF_P for common symbols.
1817 2017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
1819 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
1820 SEC_GROUP sections as SEC_EXCLUDE.
1821 (bfd_elf_set_group_contents): Replace use of abort with an assert.
1822 (assign_section_numbers): Use resolve_section_groups flag instead
1823 of relocatable link type.
1824 (_bfd_elf_init_private_section_data): Use resolve_section_groups
1825 flag instead of checking the final_link flag for part of the
1826 checks in here. Fix white space as a result.
1827 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
1828 instead of relocatable link type.
1829 (bfd_elf_final_link): Likewise.
1831 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
1833 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
1835 * elf32-score.c (score_elf_final_link_relocate): Likewise.
1836 (s3_bfd_score_elf_check_relocs): Likewise.
1837 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
1838 (score_elf_final_link_relocate): Likewise.
1839 (s7_bfd_score_elf_check_relocs): Likewise.
1841 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
1843 * elflink.c (init_reloc_cookie_rels): Remove unused variable
1846 2017-06-06 Maciej W. Rozycki <macro@imgtec.com>
1848 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
1849 from `reloc_count' rather than decrementing it.
1850 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
1851 `reloc_count' by `int_rels_per_ext_rel'.
1852 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
1853 `reloc_count' by `int_rels_per_ext_rel' for last relocation
1854 entry determination.
1855 (s3_bfd_score_elf_check_relocs): Likewise.
1856 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
1857 (s7_bfd_score_elf_relocate_section): Likewise.
1858 (s7_bfd_score_elf_check_relocs): Likewise.
1859 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
1860 prototype and function.
1861 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
1862 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
1863 triple rather than once the sum of REL and RELA relocation entry
1865 (bfd_elf64_get_reloc_upper_bound): Remove macro.
1866 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
1867 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
1868 storage allocation size determination.
1869 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
1870 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
1871 by `int_rels_per_ext_rel' for last relocation entry
1873 (bfd_elf_final_link): Do not multiply `reloc_count' by
1874 `int_rels_per_ext_rel' for internal relocation storage
1875 allocation size determination.
1876 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
1877 `int_rels_per_ext_rel' for last relocation entry determination.
1878 (elf_gc_smash_unused_vtentry_relocs): Likewise.
1879 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
1880 (_bfd_mips_elf_relocate_section): Likewise.
1882 2017-06-05 Alan Modra <amodra@gmail.com>
1885 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
1887 2017-06-01 John Baldwin <jhb@FreeBSD.org>
1889 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
1890 determine structure sizes.
1891 (elfcore_grok_freebsd_prstatus): Likewise.
1893 2017-06-01 Alan Modra <amodra@gmail.com>
1895 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
1896 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
1898 (is_elfv2_localentry0): New function.
1899 (ppc64_elf_tls_setup): Default params->plt_localentry0.
1900 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
1901 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
1902 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
1903 optimized localentry:0 stubs.
1904 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
1905 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
1907 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
1909 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
1911 2017-05-30 Casey Smith <clegg89@gmail.com>
1914 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
1915 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
1917 2017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
1919 * cpu-arc.c (arc_compatible): New function.
1921 2017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
1923 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
1925 2017-05-30 H.J. Lu <hongjiu.lu@intel.com>
1928 * bfdio.c (bfd_get_file_size): New function.
1929 * bfd-in2.h: Regenerated.
1931 2017-05-23 Dilian Palauzov <git-dpa@aegee.org>
1933 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
1936 2017-05-22 H.J. Lu <hongjiu.lu@intel.com>
1938 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
1939 dynobj instead of htab->elf.dynobj.
1941 2017-05-19 Maciej W. Rozycki <macro@imgtec.com>
1943 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
1945 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
1946 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
1947 actual number of internal relocations retrieved. Adjust
1948 function description.
1949 (bfd_elf64_canonicalize_reloc): Remove macro.
1950 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
1952 2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
1954 * archures.c (bfd_mach_sparc_v9m8): Define.
1955 (bfd_mach_sparc_v8plusm8): Likewise.
1956 (bfd_mach_sparc_v9_p): Adjust to M8.
1957 (bfd_mach_sparc_64bit_p): Likewise.
1958 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
1959 bfd_mach_sparc_v8plusm8.
1960 * bfd-in2.h: Regenerated.
1961 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
1963 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
1964 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
1965 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
1967 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
1968 bfd_mach_sparc_v8plusm8.
1970 2017-05-19 Alan Modra <amodra@gmail.com>
1972 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
1973 debug and special sections when no non-note alloc sections in an
1976 2017-05-18 Alan Modra <amodra@gmail.com>
1978 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
1979 * elf-m10300.c: Likewise.
1981 * elf32-arc.c: Likewise.
1982 * elf32-bfin.c: Likewise.
1983 * elf32-m68k.c: Likewise.
1984 * elf32-nds32.c: Likewise.
1985 * elf32-tilepro.c: Likewise.
1986 * elflink.c: Likewise.
1987 * elfnn-aarch64.c: Likewise.
1988 * elfnn-riscv.c: Likewise.
1989 * elfxx-tilegx.c: Likewise.
1990 * mach-o.c: Likewise.
1991 * peXXigen.c: Likewise.
1992 * vms-alpha.c: Likewise.
1993 * vms-lib.c: Likewise.
1995 2017-05-17 H.J. Lu <hongjiu.lu@intel.com>
1998 * elflink.c (elf_gc_mark_debug_section): New function.
1999 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
2000 referenced by kept debug sections.
2002 2017-05-16 Alan Modra <amodra@gmail.com>
2004 * elf-m10300.c: Rename occurrences of non_ir_ref.
2005 * elf32-arm.c: Likewise.
2006 * elf32-bfin.c: Likewise.
2007 * elf32-cr16.c: Likewise.
2008 * elf32-cris.c: Likewise.
2009 * elf32-d10v.c: Likewise.
2010 * elf32-dlx.c: Likewise.
2011 * elf32-fr30.c: Likewise.
2012 * elf32-frv.c: Likewise.
2013 * elf32-hppa.c: Likewise.
2014 * elf32-i370.c: Likewise.
2015 * elf32-i386.c: Likewise.
2016 * elf32-iq2000.c: Likewise.
2017 * elf32-lm32.c: Likewise.
2018 * elf32-m32c.c: Likewise.
2019 * elf32-m32r.c: Likewise.
2020 * elf32-m68hc1x.c: Likewise.
2021 * elf32-m68k.c: Likewise.
2022 * elf32-mcore.c: Likewise.
2023 * elf32-metag.c: Likewise.
2024 * elf32-microblaze.c: Likewise.
2025 * elf32-moxie.c: Likewise.
2026 * elf32-msp430.c: Likewise.
2027 * elf32-mt.c: Likewise.
2028 * elf32-nios2.c: Likewise.
2029 * elf32-or1k.c: Likewise.
2030 * elf32-ppc.c: Likewise.
2031 * elf32-rl78.c: Likewise.
2032 * elf32-s390.c: Likewise.
2033 * elf32-score.c: Likewise.
2034 * elf32-score7.c: Likewise.
2035 * elf32-sh.c: Likewise.
2036 * elf32-tic6x.c: Likewise.
2037 * elf32-tilepro.c: Likewise.
2038 * elf32-v850.c: Likewise.
2039 * elf32-vax.c: Likewise.
2040 * elf32-xstormy16.c: Likewise.
2041 * elf32-xtensa.c: Likewise.
2042 * elf64-alpha.c: Likewise.
2043 * elf64-hppa.c: Likewise.
2044 * elf64-ia64-vms.c: Likewise.
2045 * elf64-mmix.c: Likewise.
2046 * elf64-ppc.c: Likewise.
2047 * elf64-s390.c: Likewise.
2048 * elf64-sh64.c: Likewise.
2049 * elf64-x86-64.c: Likewise.
2050 * elflink.c: Likewise.
2051 * elfnn-aarch64.c: Likewise.
2052 * elfnn-ia64.c: Likewise.
2053 * elfnn-riscv.c: Likewise.
2054 * elfxx-mips.c: Likewise.
2055 * elfxx-sparc.c: Likewise.
2056 * elfxx-tilegx.c: Likewise.
2057 * linker.c: Likewise.
2059 2017-05-16 Alan Modra <amodra@gmail.com>
2061 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
2062 * elflink.c (elf_link_add_object_symbols): Update to use
2064 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
2066 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
2068 2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
2070 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
2072 2017-05-12 H.J. Lu <hongjiu.lu@intel.com>
2074 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
2075 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
2077 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
2079 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
2081 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
2083 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
2084 to plt_second/plt_second_eh_frame.
2085 (elf_x86_64_link_hash_newfunc): Updated.
2086 (elf_x86_64_allocate_dynrelocs): Likewise.
2087 (elf_x86_64_size_dynamic_sections): Likewise.
2088 (elf_x86_64_relocate_section): Likewise.
2089 (elf_x86_64_finish_dynamic_symbol): Likewise.
2090 (elf_x86_64_finish_dynamic_sections): Likewise.
2091 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
2092 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
2094 (elf_backend_setup_gnu_properties): Updated. Create the
2095 .plt.sec section instead of the .plt.sec section.
2097 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
2099 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
2100 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
2101 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
2103 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
2105 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
2106 (bfd_elf64_set_reloc): Define.
2107 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
2109 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
2111 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
2112 (struct bfd_target): New field _bfd_set_reloc.
2113 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
2114 * reloc.c (_bfd_generic_set_reloc): New function.
2115 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
2116 * nlm-target.h (nlm_set_reloc): Likewise.
2117 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
2118 * aout-tic30.c (MY_set_reloc): Likewise.
2119 * aout-target.h (MY_set_reloc): Likewise.
2120 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
2121 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
2122 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
2123 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
2124 * aout-adobe.c (aout_32_set_reloc): Likewise.
2125 * bout.c (b_out_set_reloc): Likewise.
2126 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
2127 * i386os9k.c (aout_32_set_reloc): Likewise.
2128 * ieee.c (ieee_set_reloc): Likewise.
2129 * oasys.c (oasys_set_reloc): Likewise.
2130 * som.c (som_set_reloc): Likewise.
2131 * versados.c (versados_set_reloc): Likewise.
2132 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
2133 _bfd_generic_set_reloc.
2134 (rs6000_xcoff64_aix_vec): LIkewise.
2135 * libbfd.c (_bfd_norelocs_set_reloc): New function.
2136 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
2137 * i386msdos.c (msdos_set_reloc): Define to
2138 _bfd_norelocs_set_reloc.
2139 * elfcode.h (elf_set_reloc): Define.
2140 * bfd-in2.h: Regenerated.
2142 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
2145 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
2146 for IFUNC function address.
2148 2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
2150 * elf32-arc.c (FEATURE_LIST_NAME): Define.
2151 (CONFLICT_LIST): Likewise.
2152 (opcode/arc-attrs.h): Include.
2153 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
2154 (arc_extract_features): New file.
2155 (arc_stralloc): Likewise.
2156 (arc_elf_merge_attributes): Likewise.
2157 (arc_elf_merge_private_bfd_data): Use object attributes.
2158 (bfd_arc_get_mach_from_attributes): New function.
2159 (arc_elf_object_p): Use object attributes.
2160 (arc_elf_final_write_processing): Likewise.
2161 (elf32_arc_obj_attrs_arg_type): New function.
2162 (elf32_arc_obj_attrs_handle_unknown): Likewise.
2163 (elf32_arc_section_from_shdr): Likewise.
2164 (elf_backend_obj_attrs_vendor): Define.
2165 (elf_backend_obj_attrs_section): Likewise.
2166 (elf_backend_obj_attrs_arg_type): Likewise.
2167 (elf_backend_obj_attrs_section_type): Likewise.
2168 (elf_backend_obj_attrs_handle_unknown): Likewise.
2169 (elf_backend_section_from_shdr): Likewise.
2171 2017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
2174 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
2175 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
2176 and the destination is a Thumb symbol.
2178 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2180 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
2181 initializer to silence GCC 4.2.
2182 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
2184 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2186 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
2187 (LAZY_PLT_ENTRY_SIZE): This.
2188 (NON_LAZY_PLT_ENTRY_SIZE): New.
2189 (elf_x86_64_plt0_entry): Renamed to ...
2190 (elf_x86_64_lazy_plt0_entry): This.
2191 (elf_x86_64_plt_entry): Renamed to ...
2192 (elf_x86_64_lazy_plt_entry): This.
2193 (elf_x86_64_bnd_plt0_entry): Renamed to ...
2194 (elf_x86_64_lazy_bnd_plt0_entry): This.
2195 (elf_x86_64_legacy_plt_entry): Removed.
2196 (elf_x86_64_bnd_plt_entry): Renamed to ...
2197 (elf_x86_64_lazy_bnd_plt_entry): This.
2198 (elf_x86_64_legacy_plt2_entry): Renamed to ...
2199 (elf_x86_64_non_lazy_plt_entry): This.
2200 (elf_x86_64_bnd_plt2_entry): Renamed to ...
2201 (elf_x86_64_non_lazy_bnd_plt_entry): This.
2202 (elf_x86_64_eh_frame_plt): Renamed to ...
2203 (elf_x86_64_eh_frame_lazy_plt): This.
2204 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
2205 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
2206 (elf_x86_64_eh_frame_plt_got): Renamed to ...
2207 (elf_x86_64_eh_frame_non_lazy_plt): This.
2208 (elf_x86_64_lazy_plt_layout): New.
2209 (elf_x86_64_non_lazy_plt_layout): Likewise.
2210 (elf_x86_64_plt_layout): Likewise.
2211 (elf_x86_64_backend_data): Remove PLT layout information. Add
2212 os for target system.
2213 (GET_PLT_ENTRY_SIZE): Removed.
2214 (elf_x86_64_lazy_plt): New.
2215 (elf_x86_64_non_lazy_plt): Likewise.
2216 (elf_x86_64_lazy_bnd_plt): Likewise.
2217 (elf_x86_64_non_lazy_bnd_plt): Likewise.
2218 (elf_x86-64_arch_bed): Updated.
2219 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
2220 (elf_x86_64_create_dynamic_sections): Removed.
2221 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
2222 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
2223 (elf_x86-64_adjust_dynamic_symbol): Updated.
2224 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
2225 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
2226 size for PLT0 if there is no PLT0. Get plt_entry_size from
2227 non_lazy_plt for non-lazy PLT entries.
2228 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
2229 from non_lazy_plt for non-lazy PLT entries.
2230 (elf_x86-64_relocate_section): Updated. Properly get PLT index
2231 if there is no PLT0.
2232 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
2233 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
2234 entries with non-lazy PLT layout. Don't fill the second and third
2235 slots in the PLT entry if there is no PLT0.
2236 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
2237 if there is no PLT0. Set sh_entsize on the .plt.got section.
2238 (compare_relocs): New.
2239 (elf_x86_64_plt_type): Likewise.
2240 (elf_x86_64_plt): Likewise.
2241 (elf_x86_64_nacl_plt): New. Forward declaration.
2242 (elf_x86_64_get_plt_sym_val): Removed.
2243 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
2244 against all dynamic relocations.
2245 (elf_x86_64_link_setup_gnu_properties): New function.
2246 (elf_backend_create_dynamic_sections): Updated.
2247 (elf_backend_setup_gnu_properties): New.
2248 (elf_x86_64_nacl_plt): New.
2249 (elf_x86_64_nacl_arch_bed): Updated.
2251 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2253 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
2254 (LAZY_PLT_ENTRY_SIZE): This.
2255 (NON_LAZY_PLT_ENTRY_SIZE): New.
2256 (elf_i386_plt0_entry): Renamed to ...
2257 (elf_i386_lazy_plt0_entry): This.
2258 (elf_i386_plt_entry): Renamed to ...
2259 (elf_i386_lazy_plt_entry): This.
2260 (elf_i386_pic_plt0_entry): Renamed to ...
2261 (elf_i386_pic_lazy_plt0_entry): This.
2262 (elf_i386_pic_plt_entry): Renamed to ...
2263 (elf_i386_pic_lazy_plt_entry): This.
2264 (elf_i386_got_plt_entry): Renamed to ...
2265 (elf_i386_non_lazy_plt_entry): This.
2266 (elf_i386_pic_got_plt_entry): Renamed to ...
2267 (elf_i386_pic_non_lazy_plt_entry): This.
2268 (elf_i386_eh_frame_plt): Renamed to ...
2269 (elf_i386_eh_frame_lazy_plt): This.
2270 (elf_i386_eh_frame_plt_got): Renamed to ...
2271 (elf_i386_eh_frame_non_lazy_plt): This.
2272 (elf_i386_plt_layout): Renamed to ...
2273 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
2274 eh_frame_plt_got_size.
2275 (elf_i386_non_lazy_plt_layout): New.
2276 (elf_i386_plt_layout): Likewise.
2277 (elf_i386_non_lazy_plt): Likewise.
2278 (GET_PLT_ENTRY_SIZE): Removed.
2279 (elf_i386_plt): Renamed to ...
2280 (elf_i386_lazy_plt): This.
2281 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
2282 (elf_i386_arch_bed): Updated.
2283 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
2284 (elf_i386_create_dynamic_sections): Removed.
2285 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
2286 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
2287 (elf_i386_adjust_dynamic_symbol): Updated.
2288 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
2289 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
2290 size for PLT0 if there is no PLT0.
2291 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
2292 output section is discarded only if GOT isn't empty.
2293 (elf_i386_relocate_section): Updated. Properly get PLT index
2294 if there is no PLT0.
2295 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
2296 second and third slots in the PLT entry if there is no PLT0.
2297 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
2298 if there is no PLT0. Set sh_entsize on the .plt.got section.
2299 (elf_i386_nacl_plt): Forward declaration.
2300 (elf_i386_get_plt_sym_val): Removed.
2301 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
2302 against all dynamic relocations.
2303 (elf_i386_link_setup_gnu_properties): New function.
2304 (elf_backend_create_dynamic_sections): Updated.
2305 (elf_backend_setup_gnu_properties): New.
2306 (elf_i386_nacl_plt): Updated.
2307 (elf_i386_nacl_arch_bed): Likewise.
2308 (elf_i386_vxworks_arch_bed): Likewise.
2310 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
2312 * elflink.c (elf_output_implib): Remove executable flag from import
2314 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
2315 library is a relocatable object file.
2317 2017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
2320 * elf32-avr.c (avr_should_move_sym): New function.
2321 (avr_should_reduce_sym_size): Likewise.
2322 (avr_should_increase_sym_size): Likewise.
2323 (elf32_avr_relax_delete_bytes): Adjust symbol values
2324 and sizes by calling new functions.
2326 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
2328 * config.bfd (riscv32-*): Enable rv64.
2330 2017-05-02 Alan Modra <amodra@gmail.com>
2333 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
2334 rather than h->root.type == bfd_link_hash_new.
2335 (bfd_elf_record_link_assignment): Similarly, call
2336 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
2338 2017-04-29 Alan Modra <amodra@gmail.com>
2341 * reloc.c (reloc_offset_in_range): New function.
2342 (bfd_perform_relocation, bfd_install_relocation): Use it.
2343 (_bfd_final_link_relocate): Likewise.
2345 2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
2347 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
2348 before using .plt.got.
2349 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
2351 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2353 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
2354 instead of "+=" to update 0.
2356 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2358 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
2359 .plt.got section here.
2360 (elf_i386_check_relocs): Don't create the .plt.got section.
2361 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
2362 the .plt.got and .plt.bnd sections here.
2363 (elf_x86_64_check_relocs): Don't create the .plt.got nor
2366 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2368 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
2370 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
2371 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
2372 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
2373 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
2376 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2378 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
2380 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
2381 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
2382 the first relocatable ELF input with GNU properties.
2384 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2386 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
2387 VxWorks for non-PIC.
2389 2017-04-27 Alan Modra <amodra@gmail.com>
2391 * elf-bfd.h (struct elf_backend_data): Make asection param of
2392 elf_backend_eh_frame_address_size const.
2393 (_bfd_elf_eh_frame_address_size): Likewise.
2394 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
2395 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
2396 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
2397 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
2398 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
2399 (next_cie_fde_offset): Constify params.
2400 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
2402 2017-04-27 Alan Modra <amodra@gmail.com>
2404 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
2405 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
2406 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
2408 (offset_adjust): New function.
2409 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
2410 (adjust_eh_frame_local_symbols): Likewise.
2411 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
2412 after changing anything. Return true if anything changed.
2413 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
2414 _bfd_elf_adjust_eh_frame_global_symbol for globals.
2416 2017-04-27 Alan Modra <amodra@gmail.com>
2418 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
2421 2017-04-27 Alan Modra <amodra@gmail.com>
2423 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
2424 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
2425 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
2426 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
2427 for undef and undefweak dyn_relocs.
2428 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
2429 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
2430 (allocate_got, allocate_dynrelocs): Likewise.
2431 (ppc64_elf_relocate_section): Likewise.
2433 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
2435 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
2436 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
2437 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
2438 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
2440 2017-04-26 Nick Clifton <nickc@redhat.com>
2443 * reloc.c (bfd_perform_relocation): Check for a negative address
2446 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
2449 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
2451 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
2452 (elf_backend_always_renumber_dynsyms): Define.
2453 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
2454 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
2455 * elflink.c (bfd_elf_size_dynamic_sections): Also call
2456 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
2458 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
2460 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
2462 * elflink.c (bfd_elf_size_dynamic_sections): Only call
2463 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
2464 sections have been created.
2466 2017-04-26 Nick Clifton <nickc@redhat.com>
2469 * compress.c (bfd_init_section_compress_status): Check the return
2470 value from bfd_malloc.
2472 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
2474 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
2475 no_finish_dynamic_symbol.
2476 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
2478 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
2479 weak symbol, don't make it dynamic.
2480 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
2481 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
2482 relocation for GOT reference.
2483 (elf_x86_64_finish_dynamic_symbol): Abort if
2484 no_finish_dynamic_symbol isn't 0.
2486 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
2489 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
2490 undefined weak symbol, don't make it dynamic.
2491 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
2492 set no_finish_dynamic_symbol and generate R_386_RELATIVE
2493 relocation for R_386_GOT32.
2495 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
2498 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
2500 2017-04-23 Alan Modra <amodra@gmail.com>
2503 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
2504 * elf.c (lcomm_sym): New.
2505 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
2506 * bfd-in2.h: Regenerate.
2508 2017-04-23 Alan Modra <amodra@gmail.com>
2511 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
2512 parameters and comment.
2513 (_bfd_elf_get_reloc_section): Delete.
2514 (_bfd_elf_plt_get_reloc_section): Declare.
2515 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
2516 New functions. Don't blindly skip over assumed .rel/.rela prefix.
2518 (_bfd_elf_get_reloc_section): ..here. Delete.
2519 (assign_section_numbers): Call elf_get_reloc_section.
2520 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
2521 * elfxx-target.h (elf_backend_get_reloc_section): Update.
2523 2017-04-23 Alan Modra <amodra@gmail.com>
2526 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
2529 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
2532 * elf32-i386.c (elf_i386_link_hash_entry): Add
2533 no_finish_dynamic_symbol.
2534 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
2535 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
2536 symbol, don't make it dynamic in PIE.
2537 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
2538 set no_finish_dynamic_symbol and generate R_386_RELATIVE
2539 relocation for R_386_GOT32
2540 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
2543 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
2547 * elflink.c (elf_link_add_object_symbols): Require
2548 --no-dynamic-linker with -E/--dynamic-list when creating
2551 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
2553 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
2556 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
2558 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
2559 dynamic symbol sorting.
2561 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
2564 * elflink.c (elf_link_add_object_symbols): Preserve
2565 dynamic_ref_after_ir_def when restoring the symbol table for
2566 unneeded dynamic object.
2568 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
2571 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
2572 on on undefined IFUNC symbol in the second PLT.
2574 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
2576 * peXXigen.c (pe_print_reloc): Correct chunk_end.
2578 2017-04-19 Alan Modra <amodra@gmail.com>
2580 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
2581 or make dynamic for info->dynamic_undefined_weak 0 and 1.
2582 * elf32-ppc.c:Formatting.
2583 (ensure_undefweak_dynamic): Don't make dynamic when
2584 info->dynamic_undefined_weak is zero.
2585 (allocate_dynrelocs): Discard undefweak dyn_relocs for
2586 info->dynamic_undefined_weak. Discard undef dyn_relocs when
2587 not default visibility. Discard undef and undefweak
2589 (ppc_elf_relocate_section): Adjust to suit.
2590 * elf64-ppc.c: Formatting.
2591 (ensure_undefweak_dynamic): Don't make dynamic when
2592 info->dynamic_undefined_weak is zero.
2593 (allocate_dynrelocs): Discard undefweak dyn_relocs for
2594 info->dynamic_undefined_weak. Discard them earlier.
2596 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
2599 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
2600 before generating the version definition section.
2602 2017-04-17 Alan Modra <amodra@gmail.com>
2604 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
2605 state when a regular object file defines a symbol with
2606 incompatible type to that defined by an earlier shared lib.
2608 2017-04-13 Alan Modra <amodra@gmail.com>
2610 * coffcode.h: Wrap some overly long _bfd_error_handler args.
2612 * elf32-arm.c: Likewise.
2613 * elf32-i386.c: Likewise.
2614 * elf32-mep.c: Likewise.
2615 * elf64-ia64-vms.c: Likewise.
2616 * elf64-x86-64.c: Likewise.
2617 * elflink.c: Likewise.
2618 * elfnn-ia64.c: Likewise.
2619 * elfxx-mips.c: Likewise.
2621 2017-04-13 Alan Modra <amodra@gmail.com>
2623 * aoutx.h: Use %B and %A in error messages throughout file.
2624 * aout-cris.c: Likewise.
2625 * archive.c: Likewise.
2626 * binary.c: Likewise.
2627 * coff-rs6000.c: Likewise.
2628 * coff-tic4x.c: Likewise.
2629 * coffcode.h: Likewise.
2630 * coffgen.c: Likewise.
2631 * cofflink.c: Likewise.
2632 * coffswap.h: Likewise.
2633 * cpu-arm.c: Likewise.
2634 * elf-eh-frame.c: Likewise.
2635 * elf-m10300.c: Likewise.
2637 * elf32-arc.c: Likewise.
2638 * elf32-arm.c: Likewise.
2639 * elf32-bfin.c: Likewise.
2640 * elf32-frv.c: Likewise.
2641 * elf32-iq2000.c: Likewise.
2642 * elf32-m32c.c: Likewise.
2643 * elf32-microblaze.c: Likewise.
2644 * elf32-nds32.c: Likewise.
2645 * elf32-rl78.c: Likewise.
2646 * elf32-rx.c: Likewise.
2647 * elf32-score.c: Likewise.
2648 * elf32-score7.c: Likewise.
2649 * elf32-sh64.c: Likewise.
2650 * elf32-v850.c: Likewise.
2651 * elf32-vax.c: Likewise.
2652 * elf32-visium.c: Likewise.
2653 * elf64-ia64-vms.c: Likewise.
2654 * elf64-mmix.c: Likewise.
2655 * elf64-sh64.c: Likewise.
2656 * elfcode.h: Likewise.
2657 * elfnn-aarch64.c: Likewise.
2658 * elfnn-ia64.c: Likewise.
2659 * elfxx-mips.c: Likewise.
2660 * hpux-core.c: Likewise.
2663 * linker.c: Likewise.
2664 * merge.c: Likewise.
2666 * oasys.c: Likewise.
2667 * pdp11.c: Likewise.
2668 * peXXigen.c: Likewise.
2669 * rs6000-core.c: Likewise.
2670 * vms-alpha.c: Likewise.
2671 * xcofflink.c: Likewise.
2673 2017-04-13 Alan Modra <amodra@gmail.com>
2675 * bfd.c (PRINT_TYPE): Define.
2676 (_doprnt): New function.
2677 (error_handler_internal): Use _doprnt.
2678 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
2679 calls in their natural order, throughout file.
2680 * coff-mcore.c: Likewise.
2681 * coff-ppc.c: Likewise.
2682 * coff-tic80.c: Likewise.
2683 * cofflink.c: Likewise.
2684 * elf-s390-common.c: Likewise.
2686 * elf32-arm.c: Likewise.
2687 * elf32-i386.c: Likewise.
2688 * elf32-m32r.c: Likewise.
2689 * elf32-msp430.c: Likewise.
2690 * elf32-spu.c: Likewise.
2691 * elf64-ia64-vms.c: Likewise.
2692 * elf64-sparc.c: Likewise.
2693 * elf64-x86-64.c: Likewise.
2694 * elflink.c: Likewise.
2695 * elfnn-aarch64.c: Likewise.
2696 * elfnn-ia64.c: Likewise.
2697 * elfxx-mips.c: Likewise.
2699 2017-04-13 Alan Modra <amodra@gmail.com>
2701 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
2702 branch veneers" error. Fix double space and format message.
2703 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
2704 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
2706 2017-04-13 Alan Modra <amodra@gmail.com>
2708 * bfd-in2.h: Regenerate.
2710 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
2712 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
2713 extra `\n' in warning/error messages.
2714 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
2715 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
2717 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
2719 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
2720 processor-specific properties with generic ELF target vector.
2722 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
2724 * elf32-sparc.c (elf_backend_fixup_symbol): New.
2725 * elf64-sparc.c (elf_backend_fixup_symbol): New.
2726 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
2727 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
2729 (link_hash_newfunc): Initialize has_got_reloc and
2731 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
2733 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
2735 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
2737 (_bfd_sparc_elf_fixup_symbol): New function.
2738 (allocate_dynrelocs): Don't allocate space for dynamic
2739 relocations and discard relocations against resolved undefined
2740 weak symbols in executable. Don't make resolved undefined weak
2741 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
2742 relocation against undefined weak symbols in PIE.
2743 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
2744 relocations against resolved undefined weak symbols in PIE
2745 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
2746 without ynamic PLT/GOT relocations for resolved undefined weak
2748 Don't generate dynamic relocation against resolved undefined
2749 weak symbol in executable.
2750 (pie_finish_undefweak_symbol): New function.
2751 (_bfd_sparc_elf_finish_dynamic_sections): Call
2752 pie_finish_undefweak_symbol on all symbols in PIE.
2753 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
2754 (_bfd_sparc_elf_fixup_symbol): New function.
2756 2017-04-10 Nick Clifton <nickc@redhat.com>
2758 * config.bfd: Remove ns32k from obsolete list.
2760 2017-04-10 Alan Modra <amodra@gmail.com>
2763 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
2764 (special_sections_i): Likewise for .init_array.
2765 (special_sections_p): Likewise for .preinit_array.
2767 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
2771 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
2772 ELF_COMMON_DEF_P for common symbols.
2773 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
2774 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
2775 * elflink.c (_bfd_elf_merge_symbol): Revert commits
2776 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
2777 07492f668d2173da7a2bda3707ff0985e0f460b6.
2779 2017-04-07 Pedro Alves <palves@redhat.com>
2781 * opncls.c (bfd_get_debug_link_info): Rename to...
2782 (bfd_get_debug_link_info_1): ... this. Change type of second
2783 parameter to void pointer. Adjust.
2784 (bfd_get_debug_link_info): Reimplement on top of
2785 bfd_get_debug_link_info_1.
2786 (separate_debug_file_exists, separate_alt_debug_file_exists):
2787 Change type of second parameter to void pointer. Adjust.
2788 (get_func_type, check_func_type): Change type of second parameter
2790 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
2791 the callback functions instead of passing the address of a local.
2792 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
2793 find_separate_debug_file.
2794 (get_alt_debug_link_info_shim): Change type of second parameter to
2795 void pointer. Adjust.
2796 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
2797 find_separate_debug_file.
2798 (get_build_id_name, bfd_boolean check_build_id_file): Change type
2799 of second parameter to void pointer. Adjust.
2800 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
2801 pointer local to find_separate_debug_file.
2803 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
2805 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
2806 external symbols with a definition.
2807 (_bfd_coff_gc_mark_extra_sections): Fix typo.
2809 2017-04-07 Alan Modra <amodra@gmail.com>
2811 * po/SRC-POTFILES.in: Regenerate.
2813 2017-04-05 Alan Modra <amodra@gmail.com>
2815 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
2818 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
2820 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
2821 numbers for DataDirectory entry indicies passed to
2824 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
2826 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
2827 each GNU_MBIND section and align GNU_MBIND section to page size.
2828 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
2829 segment for each GNU_MBIND section.
2830 (_bfd_elf_init_private_section_data): Copy sh_info from input
2831 for GNU_MBIND section.
2833 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
2835 * elfnn-riscv.c (GP_NAME): Delete.
2836 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
2837 (_bfd_riscv_relax_lui): Likewise.
2839 2017-04-04 Nick Clifton <nickc@redhat.com>
2842 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
2844 (bfd_elf_final_link): Only initialize the extended symbol index
2845 section if there are extended symbol tables to list.
2847 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
2849 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
2850 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
2851 * configure.ac (elf): Add elf-properties.lo.
2852 * Makefile.in: Regenerated.
2853 * configure: Likewise.
2854 * elf-bfd.h (elf_property_kind): New.
2855 (elf_property): Likewise.
2856 (elf_property_list): Likewise.
2857 (elf_properties): Likewise.
2858 (_bfd_elf_parse_gnu_properties): Likewise.
2859 (_bfd_elf_get_property): Likewise.
2860 (_bfd_elf_link_setup_gnu_properties): Likewise.
2861 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
2862 and setup_gnu_properties.
2863 (elf_obj_tdata): Add properties.
2864 * elf-properties.c: New file.
2865 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
2866 (elf_i386_merge_gnu_properties): Likewise.
2867 (elf_backend_parse_gnu_properties): Likewise.
2868 (elf_backend_merge_gnu_properties): Likewise.
2869 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
2870 (elf_x86_64_merge_gnu_properties): Likewise.
2871 (elf_backend_parse_gnu_properties): Likewise.
2872 (elf_backend_merge_gnu_properties): Likewise.
2873 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
2874 (elf_backend_parse_gnu_properties): Likewise.
2875 (elf_backend_setup_gnu_properties): Likewise.
2876 (elfNN_bed): Add elf_backend_parse_gnu_properties,
2877 elf_backend_merge_gnu_properties and
2878 elf_backend_setup_gnu_properties.
2880 2017-03-30 Pip Cet <pipcet@gmail.com>
2882 * elf32-wasm32.c: Add relocation code, two relocs.
2883 * reloc.c: Add wasm32 relocations.
2884 * libbfd.h: Regenerate.
2885 * bfd-in2.h: Regenerate.
2886 * bfd/po/bfd.pot: Regenerate.
2888 2017-03-29 Nick Clifton <nickc@redhat.com>
2891 * coff-bfd.h (struct coff_section_data): Add new fields:
2892 saved_bias and bias.
2893 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
2894 computed for PE binaries.
2895 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
2898 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
2901 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
2902 to handle a local symbol with a hash-symbol-entry; without PLT.
2903 Add BFD_ASSERT for an incidental case with GOT entry present.
2904 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
2905 isn't forced-or-set local.
2907 2017-03-27 Pip Cet <pipcet@gmail.com>
2909 * wasm-module.c: New file to support WebAssembly modules.
2910 * wasm-module.h: New file to support WebAssembly modules.
2911 * doc/webassembly.texi: Start documenting wasm-module.c.
2912 * config.bfd: Add wasm_vec.
2913 * targets.c: Likewise.
2914 * configure.ac: Likewise.
2915 * Makefile.am: Add entries for wasm-module.c.
2916 * Makefile.in: Regenerate.
2917 * configure: Regenerate.
2918 * po/SRC-POTFILES.in: Regenerate.
2920 2017-03-27 Pip Cet <pipcet@gmail.com>
2922 * cpu-wasm32.c: New file to support wasm32 architecture.
2923 * elf32-wasm32.c: New file to support wasm32 architecture.
2924 * Makefile.am: Add wasm32 architecture.
2925 * archures.c: Likewise.
2926 * config.bfd: Likewise.
2927 * configure.ac: Likewise.
2928 * targets.c: Likewise.
2929 * Makefile.in: Regenerate.
2930 * bfd-in2.h: Regenerate.
2931 * configure: Regenerate.
2932 * po/SRC-POTFILES.in: Regenerate.
2934 2017-03-20 Alan Modra <amodra@gmail.com>
2937 * elf64-ppc.c (compare_symbols): Stabilize sort.
2939 2017-03-18 Alan Modra <amodra@gmail.com>
2941 * elf64-ppc.c (struct ppc_link_hash_table): Add
2942 local_ifunc_resolver and maybe_local_ifunc_resolver.
2943 (ppc_build_one_stub): Set flags on emitting dynamic
2944 relocation to ifunc.
2945 (ppc64_elf_relocate_section): Likewise.
2946 (ppc64_elf_finish_dynamic_symbol): Likewise.
2947 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
2948 local dynamic relocs to ifuncs.
2949 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
2950 local_ifunc_resolver and maybe_local_ifunc_resolver.
2951 (ppc_elf_relocate_section): Set flag on emitting dynamic
2952 relocation to ifuncs.
2953 (ppc_elf_finish_dynamic_symbol): Likewise.
2954 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
2955 dynamic relocs to ifuncs.
2957 2017-03-13 Nick Clifton <nickc@redhat.com>
2960 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
2961 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
2962 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
2963 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
2964 * bfd-in2.h: Regenerate.
2965 * libbfd.h: Regenerate.
2966 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
2968 (IS_AARCH64_TLSDESC_RELOC): Likewise.
2969 (elfNN_aarch64_howto_table): Likewise.
2970 (aarch64_tls_transition_without_check): Likewise.
2971 (aarch64_reloc_got_type): Likewise.
2972 (elfNN_aarch64_final_link_relocate): Likewise.
2973 (elfNN_aarch64_tls_relax): Likewise.
2974 (elfNN_aarch64_relocate_section): Likewise.
2975 (elfNN_aarch64_gc_sweep_hook): Likewise.
2976 (elfNN_aarch64_check_relocs): Likewise.
2977 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
2978 (_bfd_aarch64_elf_resolve_relocation): Likewise.
2980 2017-03-11 Alan Modra <amodra@gmail.com>
2982 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
2983 parameter is in fact used. Whitespace fixes.
2984 * elf64-ppc.c: Likewise.
2986 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
2988 * rs6000-core.c (CORE_NEW): Simplify macro when
2989 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
2991 2017-03-07 Alan Modra <amodra@gmail.com>
2995 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
2998 2017-03-05 Alan Modra <amodra@gmail.com>
3000 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
3001 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
3002 (next_cie_fde_offset): New function.
3003 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
3004 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
3005 four bytes. Align CIEs to four or eight bytes depending on
3006 per_encoding_aligned8. Align FDEs according to their encoding.
3007 Pad last FDE to output section alignment.
3008 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
3010 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
3011 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
3012 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
3014 2017-03-02 Martin Bickel <binutils@ineranves.de>
3017 * elf.c (rewrite_elf_program_header): Do not issue a warning for
3018 empty segments which have a zero filesz, but a non-zero memsz.
3020 2017-03-02 Alan Modra <amodra@gmail.com>
3022 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
3024 2017-02-28 Alan Modra <amodra@gmail.com>
3026 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
3027 (ppc64_elf_relocate_section): Likewise.
3029 2017-02-28 Alan Modra <amodra@gmail.com>
3032 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
3033 rather than elf32_nios2_hash_table or elf_hash_table.
3034 (create_got_section): Likewise.
3035 (nios2_elf32_finish_dynamic_symbol): Likewise.
3036 (nios2_elf32_adjust_dynamic_symbol): Likewise.
3037 (nios2_elf32_size_dynamic_sections): Likewise.
3038 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
3039 vars. Use htab equivalents directly instead. Don't create
3040 all dynamic sections on needing just the GOT. Use a goto
3041 rather than a fall-through with reloc test. Ensure
3042 htab->dynobj is set when making dynamic sreloc section.
3043 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
3044 equivalent directly instead. Don't segfault on looking for
3045 .dynamic when dynamic sections have not been created. Don't
3046 segfault on .got.plt being discarded.
3047 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
3048 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
3049 fixme and another not so relevant comment.
3050 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
3051 already set, set hash table dynobj on creating .sbss.
3053 2017-02-28 Alan Modra <amodra@gmail.com>
3055 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
3056 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
3057 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
3058 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
3059 (ppc64_elf_relocate_section): Likewise.
3060 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
3061 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
3062 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
3063 * libbfd.h: Regenerate.
3064 * bfd-in2.h: Regenerate.
3066 2017-02-28 Alan Modra <amodra@gmail.com>
3068 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
3069 dynamic .data.rel.ro read-only.
3070 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
3071 rather than section flags when deciding where copy reloc goes.
3072 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
3073 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
3074 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
3075 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
3076 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
3077 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
3078 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
3079 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
3080 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3081 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
3082 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
3083 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
3084 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3085 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
3086 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
3087 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
3088 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
3089 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
3090 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
3092 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
3094 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
3095 `jalr $0, $25' instruction encoding.
3097 2017-02-27 Nick Clifton <nickc@redhat.com>
3100 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
3101 generating a seg-fault when encountering a symbol that has been
3102 deleted by garbage collection.
3104 2017-02-25 Alan Modra <amodra@gmail.com>
3106 * elf32-arc.c (struct dynamic_sections): Delete.
3107 (enum dyn_section_types): Delete.
3108 (dyn_section_names): Delete.
3109 (arc_create_dynamic_sections): Delete.
3110 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
3111 segfault on discarded .rela.plt section.
3112 (elf_arc_size_dynamic_sections): Formatting. Don't call
3113 arc_create_dynamic_sections. Don't allocate memory for sections
3114 handled by the generic linker. Correct code finding relocs in
3115 read-only sections. Set SEC_EXCLUDE on zero size .got,
3116 .got.plt, and .dynbss sections. Do set .interp for pies.
3118 2017-02-24 Andrew Waterman <andrew@sifive.com>
3120 * elfnn-riscv.c (GP_NAME): New macro.
3121 (riscv_global_pointer_value): Use it.
3122 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
3123 output section, consider only that section's alignment.
3125 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
3127 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
3128 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
3129 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
3130 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
3132 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
3134 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
3135 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
3138 2017-02-23 Alan Modra <amodra@gmail.com>
3141 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
3143 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
3144 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
3147 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
3150 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
3151 processing ahead of the call to `elf_gc_sweep_symbol'.
3153 2017-02-22 Nick Clifton <nickc@redhat.com>
3156 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
3157 created section 4-byte alignment.
3159 2017-02-22 Alan Modra <amodra@gmail.com>
3161 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
3162 on .got or .plt output section being discarded by script.
3163 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
3166 2017-02-21 Alan Modra <amodra@gmail.com>
3168 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
3169 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
3171 2017-02-20 Alan Modra <amodra@gmail.com>
3174 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
3175 if DT_RELSZ/DT_RELASZ is zero.
3177 2017-02-17 Nick Clifton <nickc@redhat.com>
3179 * compress.c (bfd_get_full_section_contents): Remember to reduce
3180 compressed size by the sizeof the compression header when
3181 decompressing the contents.
3183 2017-02-17 Pedro Alves <palves@redhat.com>
3185 * srec.c (Chunk): Rename to ...
3186 (_bfd_srec_len): ... this.
3187 (S3Forced): Rename to ...
3188 (_bfd_srec_forceS3): ... this.
3189 * objcopy.c: Adjust all references.
3191 2017-02-17 Pedro Alves <palves@redhat.com>
3193 * archive.c (bsd_write_armap): Rename to ...
3194 (_bfd_bsd_write_armap): ... this.
3195 (coff_write_armap): Rename to ...
3196 (_bfd_coff_write_armap): ... this.
3197 * libbfd-in.h (bsd_write_armap): Rename to ...
3198 (_bfd_bsd_write_armap): ... this.
3199 (coff_write_armap): Rename to ...
3200 (_bfd_coff_write_armap): ... this.
3201 * aout-target.h, aout-tic30.c: Adjust all users.
3202 * libbfd.h: Regenerate.
3204 2017-02-17 Pedro Alves <palves@redhat.com>
3206 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
3207 (warn_deprecated): Rename to ...
3208 (_bfd_warn_deprecated): ... this.
3209 * libbfd.c (warn_deprecated): Rename to ...
3210 (_bfd_warn_deprecated): ... this.
3211 * bfd-in2.h: Regenerate.
3213 2017-02-17 Pedro Alves <palves@redhat.com>
3215 * bfdio.c (real_ftell): Rename to ...
3216 (_bfd_real_ftell): ... this.
3217 (real_fseek): Rename to ...
3218 (_bfd_real_fseek): ... this.
3219 (real_fopen): Rename to ...
3220 (_bfd_real_fopen): ... this.
3221 * libbfd-in.h (real_ftell): Rename to ...
3222 (_bfd_real_ftell): ... this.
3223 (real_fseek): Rename to ...
3224 (_bfd_real_fseek): ... this.
3225 (real_fopen): Rename to ...
3226 (_bfd_real_fopen): ... this.
3227 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
3228 * libbfd.h: Regenerate.
3230 2017-02-17 Pedro Alves <palves@redhat.com>
3232 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
3233 * libbfd.c (read_unsigned_leb128): Rename to ...
3234 (_bfd_read_unsigned_leb128): ... this.
3235 (read_signed_leb128): Rename to ...
3236 (_bfd_read_signed_leb128): ... this.
3237 (safe_read_leb128): Rename to ...
3238 (_bfd_safe_read_leb128): ... this.
3239 * libbfd-in.h (read_unsigned_leb128): Rename to ...
3240 (_bfd_read_unsigned_leb128): ... this.
3241 (read_signed_leb128): Rename to ...
3242 (_bfd_read_signed_leb128): ... this.
3243 (safe_read_leb128): Rename to ...
3244 (_bfd_safe_read_leb128): ... this.
3245 * libbfd.h: Renegerate.
3247 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
3249 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
3250 before trying to fine matching file and line information.
3252 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
3254 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
3255 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
3256 not match current bfd, then reload debug information. Record bfd
3257 we're loading debug info for in the stash. If we have debug
3258 informatin in the cache then perform section placement before
3261 2017-02-16 Alan Modra <amodra@gmail.com>
3264 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
3265 * elfxx-target.h (elf_backend_no_page_alias): Define.
3266 (elfNN_bed): Init new field.
3267 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
3268 ensure PT_LOAD segment starts on a new page.
3269 * elf32-hppa.c (elf_backend_no_page_alias): Define.
3271 2017-02-16 Alan Modra <amodra@gmail.com>
3274 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
3277 2017-02-16 Jiong Wang <jiong.wang@arm.com>
3279 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
3280 * bfd-in2.h: Regenerated.
3282 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
3285 * elf32-i386.c (elf_i386_relocate_section): Allow
3286 "lea foo@GOT, %reg" in PIC.
3288 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
3291 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
3292 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
3293 error against local IFUNC symbol without a base register for
3296 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
3298 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
3299 `%P: %H:' with `info->callbacks->einfo'.
3300 (ppc_elf_relocate_section): Likewise.
3301 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
3302 (ppc64_elf_edit_toc): Likewise.
3303 (ppc64_elf_relocate_section): Likewise.
3305 2017-02-14 Alan Modra <amodra@gmail.com>
3307 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
3308 --gc-keep-exported, and test versioned field of sym rather than
3309 looking for @ in name.
3311 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
3313 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
3316 2017-02-13 Nick Clifton <nickc@redhat.com>
3319 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
3322 2017-02-07 Andrew Waterman <andrew@sifive.com>
3324 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
3325 entry size if PLT header is written.
3327 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
3329 Fix sparc64 dynamic relocation processing to use the dynamic
3331 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
3332 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
3335 2017-02-03 Nick Clifton <nickc@redhat.com>
3338 * coffcode.h (coff_write_object_contents): Enlarge size of
3339 s_name_buf in order to avoid compile time warning about possible
3341 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
3342 32-bits of insn value before printing into buffer.
3344 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3346 * elfxx-mips.c (mips_elf_hash_sort_data): Add
3347 `max_local_dynindx'.
3348 (mips_elf_sort_hash_table): Handle it.
3349 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
3350 symbols bump up `max_local_dynindx' rather than
3351 `max_non_got_dynindx'.
3353 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3355 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
3356 `min_got_dynindx', `max_unref_got_dynindx' and
3357 `max_non_got_dynindx' members to the `bfd_size_type' data type.
3358 (mips_elf_sort_hash_table): Adjust accordingly.
3360 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3362 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
3363 to access the hash table.
3365 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3367 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
3368 non-NULL `htab' to the beginning.
3370 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3372 * elflink.c (elf_gc_sweep): Wrap overlong line.
3374 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
3376 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
3377 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
3378 * elfxx-mips.c (mips_elf_link_hash_table): Add
3379 `ignore_branch_isa' member.
3380 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
3381 in branch relocation calculation as an error if
3382 `ignore_branch_isa' has been set.
3383 (_bfd_mips_elf_insn32): Rename to...
3384 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
3385 parameter to `insn32' and add an `ignore_branch_isa' parameter.
3386 Handle the new parameter.
3388 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
3390 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
3391 local variable dynobj.
3394 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
3395 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
3396 executable from read-only sections into sdynrelro.
3397 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
3398 dynamic relocs in sdynrelro.
3399 (elf_backend_want_dynrelro): Define.
3401 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
3403 * config.bfd (*-*-rtemsaout*): Mark as removed.
3405 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
3407 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
3408 (arm-*-rtems*): Move to (arm*-*-eabi*).
3409 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
3410 (m68-*-rtems*): Move to (m68*-*-elf*).
3412 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
3414 * config.bfd (*-*-rtemscoff*): Mark as removed.
3416 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
3419 * elflink.c (bfd_elf_record_link_assignment): Revert last
3420 change and don't ever clear `forced_local'. Set `mark'
3422 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
3424 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
3425 (bfd_elf_size_dynamic_sections): ... here.
3426 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
3427 and set `mark' instead in `__tls_get_addr_opt' processing.
3428 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
3430 2017-01-24 Alan Modra <amodra@gmail.com>
3432 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
3433 where dynamic relocs are preferable. Allow ifunc too.
3434 (ensure_undefweak_dynamic): New function.
3435 (allocate_dynrelocs): Use it here. Move plt handling last and
3436 don't make symbols dynamic, simplifying loop. Only make undef
3437 weak symbols with GOT entries dynamic. Correct condition
3438 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
3439 comments. Remove goto.
3440 (ppc_elf_relocate_section): Correct test for using dynamic
3441 symbol on GOT relocs. Rearrange test for emitting GOT relocs
3442 to suit. Set up explicit tls_index entries and implicit GOT
3443 tls_index entries resolvable at link time for
3444 __tls_get_addr_opt. Simplify test to clear mem for prelink.
3445 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
3446 (ensure_undefweak_dynamic): New function.
3447 (allocate_dynrelocs): Use it here. Only make undef weak symbols
3448 with GOT entries dynamic. Remove unnecessary test of
3449 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
3450 (ppc64_elf_relocate_section): Correct test for using dynamic
3451 symbol on GOT relocs. Rearrange test for emitting GOT relocs
3452 to suit. Set up explicit tls_index entries and implicit GOT
3453 tls_index entries resolvable at link time for __tls_get_addr_opt.
3454 Simplify expression to clear mem for prelink.
3456 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
3458 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
3460 2017-01-20 Jiong Wang <jiong.wang@arm.com>
3462 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
3463 (elf_backend_hash_symbol): Define.
3465 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
3468 * elflink.c (bfd_elf_record_link_assignment): Clear any
3469 `forced_local' marking for DSO symbols that are not being
3472 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
3474 * elfnn-riscv.c (riscv_elf_object_p): New function.
3476 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
3479 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
3481 (elf_x86_64_check_relocs): Create .eh_frame section for the
3483 (elf_x86_64_size_dynamic_sections): Allocate and initialize
3484 .eh_frame section for the .plt.bnd section.
3485 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
3486 for the .plt.bnd section.
3488 2017-01-12 Nick Clifton <nickc@redhat.com>
3491 * opncls.c (find_separate_debug_file): Add include_dirs
3492 parameter. Only include the directory part of the bfd's filename
3493 in search paths if include_dirs is true. Add a couple of extra
3494 locations for looking for debug files.
3495 ( bfd_follow_gnu_debuglink): Update invocation of
3496 find_separate_debug_file.
3497 (bfd_follow_gnu_debugaltlink): Likewise.
3498 (get_build_id): New function: Finds the build-id of the given bfd.
3499 (get_build_id_name): New function: Computes the name of the
3500 separate debug info file for a bfd, based upon its build-id.
3501 (check_build_id_file): New function: Checks to see if a separate
3502 debug info file exists at the given location, and that its
3503 build-id matches that of the original bfd.
3504 (bfd_follow_build_id_debuglink): New function: Finds a separate
3505 debug info file for a given bfd by using the build-id method.
3506 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
3507 method of locating a separate debug info file before using the
3509 * bfd-in2.h: Regenerate.
3511 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
3514 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
3515 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
3516 elf_x86_64_eh_frame_plt_got.
3517 (elf_x86_64_size_dynamic_sections): Get unwind info from
3518 elf_x86_64_bnd_arch_bed for the BND PLT.
3520 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
3522 * config.bfd: Add entries for i686-redox and x86_64-redox.
3524 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
3526 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
3528 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
3529 .eh_frame section to 4 bytes for x32.
3530 (elf_x86_64_check_relocs): Likewise.
3532 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
3535 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
3536 (PLT_GOT_FDE_LENGTH): Likewise.
3537 (elf_i386_plt_layout): Add eh_frame_plt_got and
3538 eh_frame_plt_got_size.
3539 (elf_i386_plt): Updated.
3540 (elf_i386_link_hash_table): Add plt_got_eh_frame.
3541 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
3542 (elf_i386_size_dynamic_sections): Allocate and initialize
3543 .eh_frame section for .plt.got.
3544 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
3546 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
3547 eh_frame_plt_got_size.
3548 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
3549 (PLT_GOT_FDE_LENGTH): Likewise.
3550 (elf_x86_64_backend_data): Add eh_frame_plt_got and
3551 eh_frame_plt_got_size.
3552 (elf_x86_64_arch_bed): Updated.
3553 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
3554 eh_frame_plt_got_size.
3555 (elf_x86_64_nacl_arch_bed): Likewise.
3556 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
3557 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
3558 (elf_x86_64_size_dynamic_sections): Allocate and initialize
3559 .eh_frame section for .plt.got.
3560 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
3563 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
3565 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
3566 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
3568 2017-01-09 Nick Clifton <nickc@redhat.com>
3570 * dwarf2.c (lookup_address_in_function_table): Return early if
3571 there are no functions in the given comp unit, or if the high
3572 address of the last function in the comp unit is less than the
3575 2017-01-09 Nick Clifton <nickc@redhat.com>
3578 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
3579 message if there are too many symbols to load.
3581 2017-01-04 James Clarke <jrtc27@jrtc27.com>
3583 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
3584 if relocs are cached.
3586 2017-01-03 Rich Felker <bugdal@aerifal.cx>
3589 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
3590 for R_MICROBLAZE_GOTOFF_64.
3592 2017-01-03 Nick Clifton <nickc@redhat.com>
3594 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
3595 warning about using a possibly uninitialised variable.
3597 2017-01-02 Alan Modra <amodra@gmail.com>
3599 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
3600 (allocate_plt_static, allocate_dynrelocs): Use it.
3602 2017-01-02 Alan Modra <amodra@gmail.com>
3604 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
3605 .PARISC.unwind section.
3607 2017-01-02 Alan Modra <amodra@gmail.com>
3610 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
3611 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
3612 indirect to GOT pointer relative code edit.
3614 2017-01-02 Alan Modra <amodra@gmail.com>
3616 Update year range in copyright notice of all files.
3618 For older changes see ChangeLog-2016
3620 Copyright (C) 2017 Free Software Foundation, Inc.
3622 Copying and distribution of this file, with or without modification,
3623 are permitted in any medium without royalty provided the copyright
3624 notice and this notice are preserved.
3630 version-control: never