1 2017-10-30 Alan Modra <amodra@gmail.com>
3 * elf32-frv.c (ELF_TARGET_ID): Don't define for generic
6 * elflink.c (elf_gc_sweep): Test elf_object_id in addition to
8 (bfd_elf_gc_sections): Likewise.
10 2017-10-30 Alan Modra <amodra@gmail.com>
13 * elf32-hppa.c (elf32_hppa_check_relocs): Move SEC_ALLOC test to
14 ensure non_got_ref is not set due to debug references.
15 (elf32_hppa_adjust_dynamic_symbol): Tidy plabel handling. Use
16 SYMBOL_CALLS_LOCAL and UNDEFWEAK_NO_DYNAMIC_RELOC when determining
18 (allocate_dynrelocs): Similarly for got entries. Tidy code discarding
19 dynamic relocs when pic. Remove bogus code attempting to handle
21 (elf32_hppa_relocate_section): Similarly. Delete resolved_to_zero
23 (elf32_hppa_finish_dynamic_symbol): Use UNDEFWEAK_NO_DYNAMIC_RELOC
24 and SYMBOL_REFERENCES_LOCAL in GOT handling.
26 2017-10-28 Alan Modra <amodra@gmail.com>
29 * elflink.c (_bfd_elf_merge_symbol): Remove relocs_compatible check.
30 * elf32-hppa.c (elf_backend_relocs_compatible): Define.
31 * elf32-ppc.c (elf_backend_relocs_compatible): Define.
32 * elf64-ppc.c (elf_backend_relocs_compatible): Define.
34 2017-10-25 Alan Modra <amodra@gmail.com>
36 * archive.c (_bfd_compute_and_write_armap): Match "__gnu_lto_slim"
37 optionally prefixed with "_".
38 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
40 2017-10-24 Andrew Waterman <andrew@sifive.com>
42 * elfnn-riscv.c (_bfd_riscv_relax_lui): Don't relax to c.lui
45 2017-10-24 Renlin Li <renlin.li@arm.com>
48 * elflink.c (_bfd_elf_merge_symbol): Handle multiple definition case.
50 2017-10-23 Nick Clifton <nickc@redhat.com>
53 * elflink.c (elf_link_output_extsym): Keep global undefined
54 symbols if they have been marked as needed.
56 2017-10-23 Maciej W. Rozycki <macro@imgtec.com>
58 * elfn32-mips.c (mips_elf_n32_mkobject): New prototype and
60 (bfd_elf32_mkobject): Use `mips_elf_n32_mkobject' rather than
61 `_bfd_mips_elf_mkobject'.
63 2017-10-22 Hans-Peter Nilsson <hp@axis.com>
66 * config.bfd (cris-*-* | crisv32-*-*): Require a 64-bit BFD.
68 2017-10-19 Palmer Dabbelt <palmer@dabbelt.com>
70 * elfnn-riscv.c (riscv_pcgp_hi_reloc): New structure.
71 (riscv_pcgp_lo_reloc): Likewise.
72 (riscv_pcgp_relocs): Likewise.
73 (riscv_init_pcgp_relocs): New function.
74 (riscv_free_pcgp_relocs): Likewise.
75 (riscv_record_pcgp_hi_reloc): Likewise.
76 (riscv_record_pcgp_lo_reloc): Likewise.
77 (riscv_delete_pcgp_hi_reloc): Likewise.
78 (riscv_use_pcgp_hi_reloc): Likewise.
79 (riscv_record_pcgp_lo_reloc): Likewise.
80 (riscv_find_pcgp_lo_reloc): Likewise.
81 (riscv_delete_pcgp_lo_reloc): Likewise.
82 (_bfd_riscv_relax_pc): Likewise.
83 (_bfd_riscv_relax_section): Handle R_RISCV_PCREL_* relocations
84 via the new functions above.
86 2017-10-19 Palmer Dabbelt <palmer@dabbelt.com>
88 * elfnn-riscv.c (R_RISCV_DELETE): New define.
89 (_bfd_riscv_relax_delete): New function.
90 (perform_relocation): Handle R_RISCV_DELETE.
91 (_bfd_riscv_relax_section): Likewise.
93 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
96 * elfxx-tilegx.c (tilegx_elf_tls_transition): Replace
97 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
98 bfd_link_executable for TLS check.
99 (tilegx_elf_check_relocs): Likewise.
100 (allocate_dynrelocs): Likewise.
101 (tilegx_elf_relocate_section): Likewise.
103 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
106 * elf32-tilepro.c (tilepro_elf_tls_transition): Replace
107 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
108 bfd_link_executable for TLS check.
109 (tilepro_elf_check_relocs): Likewise.
110 (allocate_dynrelocs): Likewise.
111 (tilepro_elf_relocate_section): Likewise.
113 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
116 * elfxx-sparc.c (sparc_elf_tls_transition): Replace
117 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
118 bfd_link_executable for TLS check.
119 (_bfd_sparc_elf_check_relocs): Likewise.
120 (allocate_dynrelocs): Likewise.
121 (_bfd_sparc_elf_relocate_section): Likewise.
123 2017-10-18 H.J. Lu <hongjiu.lu@intel.com>
125 * elf32-tilepro.c (tilepro_elf_gc_mark_hook): Call
126 _bfd_generic_link_add_one_symbol to mark __tls_get_addr.
127 * elfxx-tilegx.c (tilegx_elf_gc_mark_hook): Likewise.
129 2017-10-17 H.J. Lu <hongjiu.lu@intel.com>
131 * elf32-microblaze.c (microblaze_elf_check_relocs): Check for
132 indirect and warning symbols.
134 2017-10-17 Alan Modra <amodra@gmail.com>
137 * elf-properties.c (_bfd_elf_parse_gnu_properties): Compare datasz
138 against size left rather than comparing pointers. Reorganise loop.
140 2017-10-17 Alan Modra <amodra@gmail.com>
143 * aoutx.h (aout_get_external_symbols): Handle stringsize of zero,
144 and error for any other size that doesn't cover the header word.
146 2017-10-16 H.J. Lu <hongjiu.lu@intel.com>
148 * elf-bfd.h (elf_backend_data): Remove gc_sweep_hook.
149 * elf32-arm.c (elf32_arm_gc_sweep_hook): Removed.
150 (elf_backend_gc_sweep_hook): Likewise.
151 * elf32-bfin.c (bfin_gc_sweep_hook): Likewise.
152 (bfinfdpic_gc_sweep_hook): Likewise.
153 (elf_backend_gc_sweep_hook): Likewise.
154 * elf32-cr16.c (elf32_cr16_gc_sweep_hook): Likewise.
155 (elf_backend_gc_sweep_hook): Likewise.
156 * elf32-cris.c (cris_elf_gc_sweep_hook): Likewise.
157 (elf_backend_gc_sweep_hook): Likewise.
158 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Likewise.
159 (elf_backend_gc_sweep_hook): Likewise.
160 * elf32-lm32.c (lm32_elf_gc_sweep_hook): Likewise.
161 (elf_backend_gc_sweep_hook): Likewise.
162 * elf32-m32r.c (m32r_elf_gc_sweep_hook): Likewise.
163 (elf_backend_gc_sweep_hook): Likewise.
164 * elf32-m68k.c (elf_m68k_got_entry): Remove elf_m68k_gc_sweep_hook
166 (elf_m68k_remove_got_entry_type): Removed.
167 (elf_m68k_find_got_entry_ptr): Likewise.
168 (elf_m68k_remove_got_entry): Likewise.
169 (elf_m68k_gc_sweep_hook): Likewise.
170 (elf_backend_gc_sweep_hook): Likewise.
171 * elf32-mcore.c (mcore_elf_gc_sweep_hook): Likewise.
172 (elf_backend_gc_sweep_hook): Likewise.
173 * elf32-metag.c (elf_metag_gc_sweep_hook): Likewise.
174 (elf_backend_gc_sweep_hook): Likewise.
175 * elf32-microblaze.c (elf_backend_gc_sweep_hook): Likewise.
176 (elf_backend_gc_sweep_hook): Likewise.
177 * elf32-mips.c (elf_backend_gc_sweep_hook): Likewise.
178 (elf_backend_gc_sweep_hook): Likewise.
179 * elf32-nds32.c (nds32_elf_gc_sweep_hook): Likewise.
180 (elf_backend_gc_sweep_hook): Likewise.
181 * elf32-nios2.c (nios2_elf32_gc_sweep_hook): Likewise.
182 (elf_backend_gc_sweep_hook): Likewise.
183 * elf32-or1k.c (or1k_elf_gc_sweep_hook): Likewise.
184 (elf_backend_gc_sweep_hook): Likewise.
185 * elf32-ppc.c (ppc_elf_gc_sweep_hook): Likewise.
186 (elf_backend_gc_sweep_hook): Likewise.
187 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
188 (elf_backend_gc_sweep_hook): Likewise.
189 * elf32-sparc.c (elf_backend_gc_sweep_hook): Likewise.
190 * elf32-tic6x.c (elf32_tic6x_gc_sweep_hook): Likewise.
191 (elf_backend_gc_sweep_hook): Likewise.
192 * elf32-tilegx.c (elf_backend_gc_sweep_hook): Likewise.
193 * elf32-tilepro.c (tilepro_elf_gc_sweep_hook): Likewise.
194 (elf_backend_gc_sweep_hook): Likewise.
195 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
196 (elf_backend_gc_sweep_hook): Likewise.
197 * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Likewise.
198 (elf_backend_gc_sweep_hook): Likewise.
199 * elf64-alpha.c (elf64_alpha_gc_sweep_hook): Likewise.
200 (elf_backend_gc_sweep_hook): Likewise.
201 * elf64-mips.c (elf_backend_gc_sweep_hook): Likewise.
202 * elf64-mmix.c (mmix_elf_gc_sweep_hook): Likewise.
203 (elf_backend_gc_sweep_hook): Likewise.
204 * elf64-ppc.c (elf_backend_gc_sweep_hook): Likewise.
205 (ppc64_elf_gc_sweep_hook): Likewise.
206 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
207 (elf_backend_gc_sweep_hook): Likewise.
208 * elf64-sparc.c (elf_backend_gc_sweep_hook): Likewise.
209 * elf64-tilegx.c (elf_backend_gc_sweep_hook): Likewise.
210 * elflink.c (elf_link_add_object_symbols): Don't call
211 _bfd_elf_link_check_relocs here.
212 (gc_sweep_hook_fn): Removed.
213 (elf_gc_sweep): Remove gc_sweep_hook.
214 * elfnn-aarch64.c (elfNN_aarch64_gc_sweep_hook): Removed.
215 (elf_backend_gc_sweep_hook): Likewise.
216 * elfnn-riscv.c (riscv_elf_gc_sweep_hook): Likewise.
217 (elf_backend_gc_sweep_hook): Likewise.
218 * elfxx-mips.c (_bfd_mips_elf_gc_sweep_hook): Likewise.
219 * elfxx-mips.h (_bfd_mips_elf_gc_sweep_hook): Likewise.
220 (elf_backend_gc_sweep_hook): Likewise.
221 * elfxx-sparc.c (_bfd_sparc_elf_gc_sweep_hook): Likewise.
222 * elfxx-sparc.h (_bfd_sparc_elf_gc_sweep_hook): Likewise.
223 * elfxx-target.h (elf_backend_gc_sweep_hook): Likewise.
224 (elfNN_bed): Remove elf_backend_gc_sweep_hook.
225 * elfxx-tilegx.c (tilegx_elf_gc_sweep_hook): Removed.
226 * elfxx-tilegx.h (tilegx_elf_gc_sweep_hook): Likewise.
228 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
230 * elf32-i386.c (elf_i386_backend_data): Removed.
231 (get_elf_i386_backend_data): Likewise.
232 (elf_i386_arch_bed): Replace elf_i386_backend_data with
233 elf_x86_backend_data.
234 (elf_i386_get_synthetic_symtab): Likewise.
235 (elf_i386_nacl_arch_bed): Likewise.
236 (elf_i386_vxworks_arch_bed): Likewise.
237 (elf_i386_relocate_section): Check target_os instead of
239 (elf_i386_finish_dynamic_symbol): Likewise.
240 (elf_i386_finish_dynamic_sections): Use htab->plt0_pad_byte.
241 Check target_os instead of is_vxworks.
242 (elf_i386_link_setup_gnu_properties): Remove normal_target and
243 is_vxworks. Initialize plt0_pad_byte.
244 * elf64-x86-64.c (elf_x86_64_backend_data); Removed.
245 (get_elf_x86_64_arch_data): Likewise.
246 (get_elf_x86_64_backend_data): Likewise.
247 (elf_x86_64_arch_bed): Replace elf_x86_64_backend_data with
248 elf_x86_backend_data.
249 (elf_x86_64_get_synthetic_symtab): Likewise.
250 (elf_x86_64_nacl_arch_bed): Likewise.
251 (elf_x86_64_link_setup_gnu_properties): Remove is_vxworks and
252 normal_target. Initialize plt0_pad_byte.
253 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Check target_os
254 instead of is_vxworks.
255 (_bfd_x86_elf_size_dynamic_sections): Likewise.
256 (_bfd_x86_elf_finish_dynamic_sections): Likewise.
257 (_bfd_x86_elf_adjust_dynamic_symbol): Likewise.
258 (_bfd_x86_elf_link_hash_table_create): Initialize target_os.
259 (_bfd_x86_elf_link_setup_gnu_properties): Remove is_vxworks.
260 Update normal_target. Set up plt0_pad_byte. Check target_os
261 instead of is_vxworks.
262 * elfxx-x86.h (elf_x86_target_os): New.
263 (elf_x86_backend_data): Likewise.
264 (get_elf_x86_backend_data): Likewise.
265 (elf_x86_link_hash_table): Remove is_vxworks. Add plt0_pad_byte
267 (elf_x86_init_table): Remove normal_target and is_vxworks. Add
270 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
272 * elf32-i386.c (elf_i386_finish_dynamic_sections): Call
273 _bfd_x86_elf_finish_dynamic_sections.
274 * elf64-x86-64.c (elf_x86_64_finish_dynamic_sections): Likewise.
275 * elfxx-x86.c (_bfd_x86_elf_finish_dynamic_sections): New
277 * elfxx-x86.h (_bfd_x86_elf_finish_dynamic_sections): New
280 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
283 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
284 hide symbol which was forced to be dynamic.
286 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
289 * elf32-cris.c (cris_elf_relocate_section): Don't generate
290 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
291 (cris_elf_check_relocs): Don't allocate dynamic relocation
292 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
294 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
297 * elf32-sh.c (allocate_dynrelocs): Discard dynamic relocations
298 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
299 (sh_elf_relocate_section): Don't generate dynamic relocation if
300 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
302 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
305 * elf32-s390.c (allocate_dynrelocs): Discard dynamic
306 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
307 (elf_s390_relocate_section): Don't generate dynamic relocation
308 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
309 * elf64-s390.c (allocate_dynrelocs): Discard dynamic
310 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
311 (elf_s390_relocate_section): Don't generate dynamic relocation
312 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
314 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
317 * elf32-nios2.c (nios2_elf32_relocate_section): Don't generate
318 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
319 (allocate_dynrelocs): Discard dynamic relocations if
320 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
322 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
325 * elf32-microblaze.c (microblaze_elf_relocate_section): Don't
326 generate dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is
328 (allocate_dynrelocs): Discard dynamic relocations if
329 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
331 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
334 * elf32-m68k.c (elf_m68k_check_relocs): Don't allocate dynamic
335 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
336 (elf_m68k_adjust_dynamic_symbol): Don't make symbol dynamic if
337 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
338 (elf_m68k_relocate_section): Don't generate dynamic relocation
339 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
341 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
344 * elf32-hppa.c (ensure_undef_dynamic): Don't make undefined
345 symbol dynamic if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
346 (allocate_dynrelocs): Discard dynamic relocations if
347 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
348 (elf32_hppa_relocate_section): Don't generate dynamic
349 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
351 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
354 * elfnn-ia64.c (elfNN_ia64_check_relocs): Don't allocate
355 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
356 (allocate_fptr): Don't allocate function pointer if
357 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
358 (allocate_dynrel_entries): Don't allocate dynamic relocation
359 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
360 (set_got_entry): Don't set GOT entry if
361 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
362 (set_pltoff_entry): Don't set PLTOFF entry if
363 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
364 (elfNN_ia64_relocate_section): Don't install dynamic relocation
365 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
367 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
370 * elfxx-mips.c (mips_elf_calculate_relocation): Don't generate
371 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
372 (allocate_dynrelocs): Don't allocate dynamic relocations if
373 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
375 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
378 * elf32-arm.c (elf32_arm_final_link_relocate): Don't generate
379 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
380 (allocate_dynrelocs_for_symbol): Discard dynamic relocations
381 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
383 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
386 * elf32-tilepro.c (allocate_dynrelocs): Discard dynamic
387 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
388 (tilepro_elf_relocate_section): Don't generate dynamic
389 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
390 * elfxx-tilegx.c (allocate_dynrelocs): Discard dynamic
391 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
392 (tilegx_elf_relocate_section): Don't generate dynamic
393 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
395 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
398 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Don't
399 generate dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is
401 (elfNN_aarch64_allocate_dynrelocs): Discard dynamic relocations
402 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
404 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
406 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Moved to ...
407 * elf-bfd.h (UNDEFWEAK_NO_DYNAMIC_RELOC): Here.
408 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Removed.
410 2017-10-12 James Bowman <james.bowman@ftdichip.com>
412 * bfd-in2.h: Regenerate.
413 * libbfd.h: Regenerate.
414 * elf32-ft32.c: Add HOWTO R_FT32_15.
415 * reloc.c: Add BFD_RELOC_FT32_15.
417 2017-10-12 Nick Clifton <nickc@redhat.com>
419 * reloc.c (enum bfd_reloc_status): Start values at 2.
420 * bfd-in2.h: Regenerate.
421 * elfnn-aarch64.c (aarch64_relocate): Invert sense of function, so
422 that a TRUE return indicates success. Compare the result of
423 calling _bfd_aarch64_elf_put_addend against bfd_reloc_ok.
424 (build_one_stub): Change sense of tests against aarch64_relocate
426 (elfNN_aarch64_tls_relax): Return bfd_reloc_notsupported, rather
427 than FALSE, when an error is detected.
428 (elfNN_aarch64_final_link_relocate): Likewise.
430 2017-10-12 H.J. Lu <hongjiu.lu@intel.com>
432 * elf32-i386.c (elf_backend_hide_symbol): New.
433 * elf64-x86-64.c (elf_backend_hide_symbol): Likewise.
434 * elfxx-x86.c (_bfd_x86_elf_hide_symbol): Likewise.
435 * elfxx-x86.h (_bfd_x86_elf_hide_symbol): Likewise.
437 2017-10-12 Alan Modra <amodra@gmail.com>
439 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Call
440 elf_backend_hide_symbol, not _bfd_elf_link_hash_hide_symbol.
441 (bfd_elf_define_start_stop): Likewise.
443 2017-10-12 Alan Modra <amodra@gmail.com>
445 * elf32-nds32.c (nds32_elf_size_dynamic_sections): Set .interp
446 when executable rather than non-PIC.
447 * elf32-score.c (s3_bfd_score_elf_size_dynamic_sections): Likewise.
448 * elf32-score7.c (s7_bfd_score_elf_size_dynamic_sections): Likewise.
450 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
452 * elf-bfd.h (elf_backend_data): Add `linux_prpsinfo64_ugid16'
454 * elf-linux-core.h (elf_external_linux_prpsinfo64): Rename to...
455 (elf_external_linux_prpsinfo64_ugid32): ... this.
456 (swap_linux_prpsinfo32_out): Rename to...
457 (swap_linux_prpsinfo32_ugid32_out): ... this.
458 (elf_external_linux_prpsinfo64_ugid16): New structure.
459 (swap_linux_prpsinfo64_ugid16_out): New function.
460 * elfxx-target.h [!elf_backend_linux_prpsinfo64_ugid16]
461 (elf_backend_linux_prpsinfo64_ugid16): Define.
462 (elfNN_bed): Initialize `linux_prpsinfo64_ugid16' member.
463 * elf.c (elfcore_write_linux_prpsinfo64): Handle both variants
464 of the 64-bit Linux core PRPSINFO note.
465 * elf64-sh64.c (elf_backend_linux_prpsinfo64_ugid16): Define.
467 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
469 * elf-bfd.h (elf_backend_data): Add `linux_prpsinfo32_ugid16'
471 (elfcore_write_ppc_linux_prpsinfo32): Remove prototype.
472 * elf32-ppc.c (elfcore_write_ppc_linux_prpsinfo32): Remove.
473 (elf_external_ppc_linux_prpsinfo32)
474 (swap_ppc_linux_prpsinfo32_out): Move to...
475 * elf-linux-core.h (elf_external_linux_prpsinfo32_ugid32)
476 (swap_linux_prpsinfo32_ugid32_out): ... these.
477 (elf_external_linux_prpsinfo32): Rename to...
478 (elf_external_linux_prpsinfo32_ugid16): ... this.
479 (swap_linux_prpsinfo32_out): Rename to...
480 (swap_linux_prpsinfo32_ugid16_out): ... this.
481 * elfxx-target.h [!elf_backend_linux_prpsinfo32_ugid16]
482 (elf_backend_linux_prpsinfo32_ugid16): Define.
483 (elfNN_bed): Initialize `linux_prpsinfo32_ugid16' member.
484 * elf.c (elfcore_write_linux_prpsinfo32): Handle both variants
485 of the 32-bit Linux core PRPSINFO note.
486 * elf32-am33lin.c (elf_backend_linux_prpsinfo32_ugid16): Define.
487 * elf32-arm.c (elf_backend_linux_prpsinfo32_ugid16): Define.
488 * elf32-cris.c (elf_backend_linux_prpsinfo32_ugid16): Define.
489 * elf32-frv.c (elf_backend_linux_prpsinfo32_ugid16): Define.
490 * elf32-i386.c (elf_backend_linux_prpsinfo32_ugid16): Define.
491 * elf32-m32r.c (elf_backend_linux_prpsinfo32_ugid16): Define.
492 * elf32-m68k.c (elf_backend_linux_prpsinfo32_ugid16): Define.
493 * elf32-s390.c (elf_backend_linux_prpsinfo32_ugid16): Define.
494 * elf32-sh.c (elf_backend_linux_prpsinfo32_ugid16): Define.
495 * elf32-sparc.c (elf_backend_linux_prpsinfo32_ugid16): Define.
497 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
499 * elf-linux-core.h (elf_external_linux_prpsinfo64): Move the
500 `gap' member ahead of `pr_flag'.
502 2017-10-11 Pedro Alves <palves@redhat.com>
504 * bfd.c (_doprnt): Rename to ...
505 (_bfd_doprnt): ... this.
506 (error_handler_internal): Adjust.
508 2017-10-10 H.J. Lu <hongjiu.lu@intel.com>
510 * elf32-i386.c (elf_i386_check_relocs): Set GOT refcount to 1
511 instead of incrementing it.
512 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
514 2017-10-10 Renlin Li <renlin.li@arm.com>
517 * elf32-arm.c (allocate_dynrelocs_for_symbol): Only make undefined weak
518 symbols into dynamic.
520 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
523 * elfnn-riscv.c (riscv_elf_link_hash_table): Add max_alignment.
524 (riscv_elf_link_hash_table_create): Initialize max_alignment to
526 (_bfd_riscv_relax_section): Cache the max alignment of output
527 sections if possible.
529 2017-10-10 Alan Modra <amodra@gmail.com>
531 * elf64-ppc.c (ppc64_elf_before_check_relocs): Set sec_type for
532 .opd whenever .opd is present and non-zero size. Move code
533 setting abiversion to/from output file earlier. Only set
534 u.opd.func_sec when --gc-sections. Read relocs and set up
535 u.opd.func_sec values here..
536 (ppc64_elf_check_relocs): ..rather than here. Simplify opd
538 (ppc64_elf_edit_opd): Don't set sec_type for .opd here.
540 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
542 * elf-m10300.c (mn10300_elf_check_relocs): Don't free cached
545 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
547 * elf32-bfin.c (bfin_size_dynamic_sections): Don't create the
548 .interp section with "ld --no-dynamic-linker".
550 2017-10-09 Alan Modra <amodra@gmail.com>
553 * dwarf2.c (_bfd_dwarf2_cleanup_debug_info): Free
554 funcinfo_hash_table and varinfo_hash_table.
556 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
558 * elf32-sh.c (readonly_dynrelocs): Dump dynamic relocation
559 in read-only section with minfo.
560 (sh_elf_size_dynamic_sections): Likewise.
562 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
564 * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Remove
567 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
569 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_sections): Set
570 this_hdr.sh_entsize only if section size > 0.
572 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
574 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Reformat.
576 2017-10-07 H.J. Lu <hongjiu.lu@intel.com>
578 * elfxx-sparc.c (readonly_dynrelocs): Dump dynamic relocation
579 in read-only section with minfo.
580 (_bfd_sparc_elf_size_dynamic_sections): Likewise.
582 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
584 * elfxx-x86.h (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Update
587 2017-10-06 John Baldwin <jhb@FreeBSD.org>
589 * elf-bfd.h (struct elf_backend_data): Add
590 `elf_backend_grok_freebsd_prstatus'.
591 * elf.c (elfcore_grok_freebsd_note): Call
592 `elf_backend_grok_freebsd_prstatus' to handle NT_PRSTATUS if
594 * elfn32-mips.c (elf_n32_mips_grok_freebsd_prstatus): New
596 (elf_backend_grok_freebsd_prstatus): Define.
597 * elfxx-target.h (elf_backend_grok_freebsd_prstatus): Define.
598 (elfNN_bed): Initialize `elf_backend_grok_freebsd_prstatus'.
600 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
602 * elf32-i386.c (elf_i386_check_relocs): Replace has_got_reloc
603 and has_non_got_reloc with zero_undefweak.
604 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
605 * elfxx-x86.c (_bfd_x86_elf_link_hash_newfunc): Initialize
607 (_bfd_x86_elf_copy_indirect_symbol): Replace has_got_reloc and
608 has_non_got_reloc with zero_undefweak.
609 * elfxx-x86.h (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace
610 has_got_reloc and has_non_got_reloc with zero_undefweak.
611 (elf_x86_link_hash_entry): Likewise.
613 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
615 * elfxx-x86.h (COPY_INPUT_RELOC_P): Add "do/while(0);".
616 (VERIFY_COPY_RELOC): Likewise.
618 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
620 * elfxx-x86.h (VERIFY_COPY_RELOC): New.
621 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Use it.
622 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
624 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
626 * elfxx-x86.h (VERIFY_PLT_ENTRY): New.
627 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Use it.
628 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
630 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
632 * elfxx-x86.h (COPY_INPUT_RELOC_P): New.
633 * elf32-i386.c (elf_i386_relocate_section): Use it.
634 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
636 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
638 * elf32-i386.c (X86_SIZE_TYPE_P): New.
639 (elf_i386_relocate_section): Use GENERATE_DYNAMIC_RELOCATION_P.
640 * elf64-x86-64.c (X86_SIZE_TYPE_P): New.
641 (elf_x86_64_relocate_section): Use GENERATE_DYNAMIC_RELOCATION_P.
642 * elfxx-x86.h (GENERATE_DYNAMIC_RELOCATION_P): New.
644 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
646 * elfxx-x86.h (POINTER_LOCAL_IFUNC_P): New.
647 (PLT_LOCAL_IFUNC_P): Likewise.
648 * elf32-i386.c (elf_i386_relocate_section): Use them.
649 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
651 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
653 * elfxx-x86.h (GENERATE_RELATIVE_RELOC_P): New.
654 * elf32-i386.c (elf_i386_relocate_section): Use it.
655 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
657 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
659 * elfxx-x86.h (RESOLVED_LOCALLY_P): New.
660 * elf32-i386.c (elf_i386_relocate_section): Use it.
661 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
663 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
665 * elf32-i386.c (X86_PCREL_TYPE_P): New.
666 (elf_i386_check_relocs): Use NEED_DYNAMIC_RELOCATION_P.
667 * elf64-x86-64.c (IS_X86_64_PCREL_TYPE): Renamed to ...
668 (X86_PCREL_TYPE_P): This.
669 (elf_x86_64_check_relocs): Use NEED_DYNAMIC_RELOCATION_P.
670 Replace IS_X86_64_PCREL_TYPE with X86_PCREL_TYPE_P.
671 (elf_x86_64_relocate_section): Replace IS_X86_64_PCREL_TYPE with
673 * elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): New.
675 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
677 * elfxx-x86.h (TLS_TRANSITION_IE_TO_LE_P): New.
678 * elf32-i386.c (elf_i386_tls_transition): Use it.
679 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
681 2017-10-05 H.J. Lu <hongjiu.lu@intel.com>
683 * elf32-ppc.c (readonly_dynrelocs): Add a link_info argument.
684 Dump dynamic relocation in read-only section with minfo if
686 (ppc_elf_adjust_dynamic_symbol): Pass NULL to readonly_dynrelocs.
687 (maybe_set_textrel): Likewise.
688 (ppc_elf_size_dynamic_sections): Dump dynamic relocation in
689 read-only section with minfo.
691 2017-10-05 John Baldwin <jhb@FreeBSD.org>
693 * elf.c (elfcore_grok_freebsd_note): Handle NT_ARM_VFP.
695 2017-10-05 H.J. Lu <hongjiu.lu@intel.com>
697 * elf32-tilepro.c (readonly_dynrelocs): Dump dynamic relocation
698 in read-only section with minfo.
699 (tilepro_elf_size_dynamic_sections): Likewise.
700 * elfxx-tilegx.c (readonly_dynrelocs): Likewise.
701 (tilegx_elf_size_dynamic_sections): Likewise.
703 2017-10-05 Pedro Alves <palves@redhat.com>
706 * bfd.c (bfd_set_error): Revert 2017-10-04 change. Remove
707 ellipsis parameter. Split out bfd_error_on_input code to..
708 (bfd_set_input_error): .. New function.
709 * archive.c (_bfd_write_archive_contents): Use bfd_set_input_error.
710 * vms-lib.c (_bfd_vms_lib_write_archive_contents): Likewise.
711 * bfd-in2.h: Regenerate.
713 2017-10-05 Alan Modra <amodra@gmail.com>
715 * elflink.c (elf_link_input_bfd): Correct ctor/dtor in init_array/
716 fini_array error value.
718 2017-10-05 Alan Modra <amodra@gmail.com>
721 * elf.c (_bfd_elf_setup_sections): Don't trim reloc sections from
723 (_bfd_elf_init_reloc_shdr): Pass sec_hdr, use it to copy SHF_GROUP
725 (elf_fake_sections): Adjust calls. Exit immediately on failure.
726 (bfd_elf_set_group_contents): Add associated reloc section indices
729 2017-10-04 Alan Modra <amodra@gmail.com>
731 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't sort or
732 classify symbols for ELFv2.
734 2017-10-04 Pavel I. Kryukov <kryukov@frtk.ru>
737 * bfd.c (bfd_set_error): Avoid UB on passing arg to va_start that
738 undergoes default promotion.
739 * bfd-in2.h: Regenerate.
741 2017-10-02 Alan Modra <amodra@gmail.com>
743 * elf32-ppc.c (ppc_elf_relocate_section): Fix comment typo.
744 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
746 2017-10-01 Alan Modra <amodra@gmail.com>
749 * dwarf2.c (new_line_sorts_after): Remove end_sequence comparison.
750 (add_line_info): Always put end_sequence last.
752 2017-10-01 Alan Modra <amodra@gmail.com>
755 * dwarf2.c (read_section): Allocate buffer with extra byte for
756 bfd_simple_get_relocated_section_contents rather than copying
759 2017-09-29 Alan Modra <amodra@gmail.com>
761 * merge.c (merge_strings): Return FALSE on malloc failure.
762 (_bfd_merge_sections): Return failures from record_section and
765 2017-09-28 Alan Modra <amodra@gmail.com>
768 * elflink.c (_bfd_elf_merge_symbol): Set non_ir_ref_dynamic in
769 a case where plugin_notice isn't called.
771 2017-09-27 Kuan-Lin Chen <kuanlinchentw@gmail.com>
773 * elf32-nds32.c (nds32_elf_relax_section): Fix a tautological
776 2017-09-26 H.J. Lu <hongjiu.lu@intel.com>
779 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't pass
780 output_bfd to info->callbacks->minfo.
782 2017-09-26 Nick Clifton <nickc@redhat.com>
785 * elf64-x86-64.c (elf_x86_64_info_to_howto): Do not trigger an
786 assertion failure if elf_x86_64_rtype_to_howto has already issued
789 2017-09-26 Alan Modra <amodra@gmail.com>
792 * dwarf2.c (read_formatted_entries): Use read_attribute_value to
795 2017-09-26 Nick Clifton <nickc@redhat.com>
798 * dwarf2.c (read_formatted_entries): Fail early if we know that
799 the loop parsing data entries will overflow the end of the
802 2017-09-26 Alan Modra <amodra@gmail.com>
805 * dwarf2.c (struct comp_unit): Delete sec_info_ptr field.
806 (find_abstract_instance_name): Calculate DW_FORM_ref_addr relative
807 to stash->info_ptr_memory, and check die_ref is within that memory.
808 Set info_ptr_end correctly when another CU is refd. Check die_ref
809 for DW_FORM_ref4 etc. is within CU.
811 2017-09-26 Alan Modra <amodra@gmail.com>
814 * dwarf2.c (concat_filename): Return "<unknown>" on NULL filename.
815 (read_formatted_entries): Init "fe".
816 (decode_line_info <DW_LNE_define_file>): Use line_info_add_file_name.
818 2017-09-26 Alan Modra <amodra@gmail.com>
821 * dwarf2.c (decode_line_info): Ensure line_ptr stays within
822 bounds in inner loop.
824 2017-09-25 Alan Modra <amodra@gmail.com>
827 * dwarf1.c (parse_die): Sanity check pointer against section limit
828 before dereferencing.
829 (parse_line_table): Likewise.
831 2017-09-25 Alan Modra <amodra@gmail.com>
834 * dwarf2.c (scan_unit_for_symbols): Ignore DW_AT_name unless it
836 (parse_comp_unit): Likewise.
838 2017-09-25 Alan Modra <amodra@gmail.com>
841 * dwarf2.c (read_formatted_entries): Error on format_count zero.
843 2017-09-24 Alan Modra <amodra@gmail.com>
846 * opncls.c (bfd_get_debug_link_info_1): Properly check that crc is
847 within section bounds.
849 2017-09-24 Alan Modra <amodra@gmail.com>
852 * dwarf2.c (decode_line_info): Properly free line sequences on error.
854 2017-09-24 Alan Modra <amodra@gmail.com>
857 * dwarf2.c (find_abstract_instance_name): Add orig_info_ptr and
858 pname param. Return status. Make name const. Don't abort,
859 return an error. Formatting. Exit if current info_ptr matches
860 orig_info_ptr. Update callers.
861 (scan_unit_for_symbols): Start at nesting_level of zero. Make
862 nested_funcs an array of structs for extensibility. Formatting.
864 2017-09-24 Alan Modra <amodra@gmail.com>
867 * dwarf2.c (decode_line_info): Fail on lh.line_range of zero
868 rather than dividing by zero.
870 2017-09-24 Alan Modra <amodra@gmail.com>
873 * dwarf2.c (decode_line_info): Correct .debug_line unit_length check.
875 2017-09-24 Alan Modra <amodra@gmail.com>
878 * dwarf2.c (scan_unit_for_symbols): Check u.blk->data is non-NULL.
880 2017-09-24 Alan Modra <amodra@gmail.com>
883 * elf.c (_bfd_elf_slurp_version_tables): Test sh_info on
884 SHT_GNU_verneed section for sanity. Don't zalloc memory for
887 2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
890 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Guard against
893 2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
896 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Also return
897 -1 if bfd_canonicalize_dynamic_reloc returns 0.
899 2017-09-22 Pedro Alves <palves@redhat.com>
900 Alan Modra <amodra@gmail.com>
902 * version.h: Add comment.
904 2017-09-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
906 * elf.c (elfcore_grok_note): For the cases NT_S390_GS_CB and
907 NT_S390_GS_BC, correct the previously swapped invocations of
908 elfcore_grok_s390_gs_bc and elfcore_grok_s390_gs_cb.
910 2017-09-19 Alan Modra <amodra@gmail.com>
913 * elf64-ppc.c (ppc64_elf_build_stubs): Don't check glink_eh_frame
916 2017-09-19 Alan Modra <amodra@gmail.com>
919 * elflink.c (bfd_elf_size_dynamic_sections): Garbage collect
920 symbols before calculating verrefs. Don't renumber dynsyms
921 after gc. Exclude .gnu.version when zero or one dynsym.
922 Localize some vars and reindent.
924 2017-09-18 H.J. Lu <hongjiu.lu@intel.com>
927 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Check error
928 return from bfd_canonicalize_dynamic_reloc.
930 2017-09-15 Alan Modra <amodra@gmail.com>
933 * archive.c (bfd_ar_hdr_from_filesystem): Detect when status.st_size
934 overflows bfd_size_type.
936 2017-09-14 H.J. Lu <hongjiu.lu@intel.com>
939 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument
940 to indicate if conversion is performed.
941 (elf_i386_check_relocs): Cache section contents and relocations
942 if conversion is performed.
943 * elf64-x86-64.c (elf_x86_64_check_relocs): Cache section
944 contents and relocations if conversion is performed.
946 2017-09-14 Nick Clifton <nickc@redhat.com>
949 * peXXigen.c (pe_print_idata): Extend check for HintName vector
952 2017-09-13 H.J. Lu <hongjiu.lu@intel.com>
954 * elfxx-x86.h: Fix a typo in comments.
956 2017-09-09 Kamil Rytarowski <n54@gmx.com>
958 * elf32-nds32.c: Rename __BIT() to N32_BIT().
960 2017-09-09 Alan Modra <amodra@gmail.com>
962 * elf64-ppp.c (plt_stub_pad): Handle positive and negative
965 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
967 * elf32-i386.c (elf_i386_relocate_section): Update usage of
968 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
969 (elf_i386_finish_dynamic_symbol): Likewise.
970 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
971 (elf_x86_64_finish_dynamic_symbol): Likewise.
972 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Likewise.
973 (_bfd_x86_elf_fixup_symbol): Likewise.
975 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
977 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
978 check has_non_got_reloc.
980 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
983 * elf32-i386.c (elf_i386_convert_load_reloc): Check linker_def.
984 Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
985 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Check
986 linker_def. Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
987 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Set local_ref
988 and linker_def on __ehdr_start if it is referenced and not
990 (_bfd_x86_elf_link_symbol_references_local): Also set local_ref
991 and return TRUE when building executable, if a symbol has
992 non-GOT/non-PLT relocations in text section or there is no
994 * elfxx-x86.h (elf_x86_link_hash_entry): Add linker_def.
996 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
998 * elfxx-x86.h: Update comments.
1000 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
1002 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Replace
1003 elf_x86_plt_layout_table with elf_x86_init_table.
1004 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
1006 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties):
1008 * elfxx-x86.h (elf_x86_plt_layout_table): Renamed to ...
1009 (elf_x86_init_table): This.
1010 (_bfd_x86_elf_link_setup_gnu_properties): Replace
1011 elf_x86_plt_layout_table with elf_x86_init_table.
1013 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
1015 * configure.ac (bfd_backends): Don't add elf64-x86-64.lo nor
1016 elf64.lo together with elfxx-x86.lo for 64-bit BFD.
1017 * configure: Regenerated.
1018 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set r_info
1019 and r_sym fields of plt_layout.
1020 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
1022 * elfxx-x86.c (elf_x86_64_is_reloc_section): Remove BFD64 check.
1023 (_bfd_x86_elf_link_hash_table_create): Likewise. Don't set
1024 r_info nor r_sym fields.
1025 (_bfd_x86_elf_link_setup_gnu_properties): Set r_info and r_sym
1027 * elfxx-x86.h (elf_x86_plt_layout_table): Add r_info and r_sym.
1029 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
1031 * (_bfd_riscv_relax_align): Call bfd_set_error and
1032 print an error message when unable to relax a .align directive.
1034 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
1036 * elfnn-riscv.c (riscv_zero_pcrel_hi_reloc): New function.
1037 (riscv_record_pcrel_hi_reloc): Add absolute argument.
1038 (riscv_elf_relocate_section): Call riscv_zero_pcrel_hi_reloc for
1039 R_RISCV_PCREL_HI20 relocs, and pass the result to
1040 riscv_record_pcrel_hi_reloc.
1042 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
1044 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument,
1045 r_type_p. Remove the converted argument. Replace
1046 SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P. Return
1047 the new relocation type via r_type_p.
1048 (elf_i386_relocate_section): Likewise.
1049 (elf_i386_finish_dynamic_symbol): Likewise.
1050 (need_convert_load): Removed.
1051 (check_relocs_failed): Updated.
1052 (elf_i386_check_relocs): Call elf_i386_convert_load_reloc,
1053 instead of setting need_convert_load.
1054 (_bfd_i386_elf_convert_load): Removed.
1055 * elf64-x86-64.c (need_convert_load): Removed.
1056 (check_relocs_failed): Updated.
1057 (elf_x86_64_convert_load_reloc): Add an argument, r_type_p.
1058 Replace SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P.
1059 Return the new relocation type via r_type_p.
1060 (elf_x86_64_check_relocs): Call elf_x86_64_convert_load_reloc,
1061 instead of setting need_convert_load.
1062 (elf_x86_64_check_relocs): Don't check PIC if relocation has
1064 (_bfd_x86_64_elf_convert_load): Removed.
1065 (elf_x86_64_relocate_section): Replace SYMBOL_REFERENCES_LOCAL
1066 with SYMBOL_REFERENCES_LOCAL_P.
1067 (elf_x86_64_finish_dynamic_symbol): Likewise.
1068 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Don't
1070 (_bfd_x86_elf_size_dynamic_sections): Don't call convert_load.
1071 (_bfd_x86_elf_link_symbol_references_local): New function.
1072 * elfxx-x86.h (SYMBOL_REFERENCES_LOCAL_P): New.
1073 (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace elf.forced_local with
1074 SYMBOL_REFERENCES_LOCAL_P.
1075 (elf_x86_link_hash_entry): Add local_ref.
1076 (elf_x86_link_hash_table): Remove convert_load.
1077 (_bfd_i386_elf_convert_load): Removed.
1078 (_bfd_x86_64_elf_convert_load): Likewise.
1079 (_bfd_x86_elf_link_symbol_references_local): New.
1081 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
1083 * elf64-x86-64.c (R_X86_64_converted_reloc_bit): New.
1084 (elf_x86_64_info_to_howto): Get the real relocation type by
1085 masking out R_X86_64_converted_reloc_bit.
1086 (elf_x86_64_check_tls_transition): Get the real relocation type
1087 by masking out R_X86_64_converted_reloc_bit.
1088 (elf_x86_64_convert_load_reloc): Set R_X86_64_converted_reloc_bit
1089 instead of setting converted_reloc.
1090 (elf_x86_64_relocate_section): Check R_X86_64_converted_reloc_bit
1091 instead of converted_reloc. Get the real relocation type by
1092 masking out R_X86_64_converted_reloc_bit.
1093 (elf_x86_64_link_setup_gnu_properties): Verify that the value of
1094 R_X86_64_converted_reloc_bit is valid.
1095 * elfxx-x86.h (converted_reloc): Removed.
1097 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
1099 * elf32-i386.c (elf_i386_relocate_section): Don't change r_type
1100 when calling elf_i386_tls_transition. Don't use ELF32_R_TYPE
1101 to get the relocation type again.
1102 * elf64-x86-64.c (elf_x86_64_relocate_section): Don't change
1103 r_type when calling elf_x86_64_tls_transition. Don't use
1104 ELF32_R_TYPE to get the relocation type again.
1106 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
1108 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Properly set
1111 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
1113 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Remove the sec
1114 argument. Don't check relocation overflow. Avoid relocation
1115 overflow if --no-relax is used. Set converted_reloc on symbol
1116 if a GOTPCREL relocation is converted.
1117 (elf_x86_64_relocate_section): Issue a fatal error and suggest
1118 --no-relax if GOTPCREL relocation conversion leads to relocation
1120 * elfxx-x86.h (elf_x86_link_hash_entry): Add converted_reloc.
1122 2017-09-05 Alexander Fedotov <alexander.fedotov@nxp.com>
1123 Edmar Wienskoski <edmar.wienskoski@nxp.com
1125 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_VLE_ADDR20.
1126 (ppc_elf_check_relocs): Handle it.
1127 (ppc_elf_vle_split20): New function.
1128 (ppc_elf_relocate_section): Handle R_PPC_VLE_ADDR20.
1130 2017-09-03 H.J. Lu <hongjiu.lu@intel.com>
1133 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Set tlsdesc_plt
1134 for x86-64 if GOT_TLS_GDESC_P is true.
1136 2017-09-03 Alan Modra <amodra@gmail.com>
1139 * elfxx-x86.h (elf_x86_hash_table): Check is_elf_hash_table first.
1141 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1143 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1144 tls_get_addr for x86-64 in one place.
1146 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1148 * configure.ac (bfd_backends): Add elf64-x86-64.lo together
1149 with elfxx-x86.lo for 64-bit BFD.
1150 * configure: Regenerated.
1152 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1154 * elf32-i386.c (elf_i386_convert_load): Renamed to ...
1155 (_bfd_i386_elf_convert_load): This. Remove static.
1156 (elf_i386_size_dynamic_sections): Removed.
1157 (elf_backend_size_dynamic_sections): Likewise.
1158 * elf64-x86-64.c (elf_x86_64_convert_load): Renamed to ...
1159 (_bfd_x86_64_elf_convert_load): This. Remove static.
1160 (elf_x86_64_size_dynamic_sections): Removed.
1161 (elf_backend_size_dynamic_sections): Likewise.
1162 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): Renamed to ...
1163 (elf_x86_allocate_dynrelocs): This. Make it static.
1164 (_bfd_x86_elf_allocate_local_dynrelocs): Renamed to ...
1165 (elf_x86_allocate_local_dynreloc): This. Make it static.
1166 (elf_i386_is_reloc_section): New function.
1167 (elf_x86_64_is_reloc_section): Likewise.
1168 (_bfd_x86_elf_link_hash_table_create): Initialize convert_load,
1169 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
1170 Rearrange got_entry_size initialization.
1171 (_bfd_x86_elf_size_dynamic_sections): New function.
1172 * elfxx-x86.h (elf_x86_link_hash_table): Add convert_load,
1173 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
1174 (_bfd_i386_elf_convert_load): New.
1175 (_bfd_x86_64_elf_convert_load): Likewise.
1176 (_bfd_x86_elf_size_dynamic_sections): Likewise.
1177 (elf_backend_size_dynamic_sections): Likewise.
1178 (_bfd_x86_elf_allocate_dynrelocs): Removed.
1179 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
1181 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1183 * elfxx-x86.h (elf_x86_link_hash_table): Rearrange fields and
1186 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1188 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
1189 sgotplt_jump_table_size with elf_x86_compute_jump_table_size.
1191 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1193 * elf32-i386.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
1194 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Moved to ...
1195 * elfxx-x86.h (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
1196 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Here.
1197 * elf64-x86-64.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
1198 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Removed.
1200 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1202 * elf32-i386.c (elf_i386_allocate_dynrelocs): Removed.
1203 (elf_i386_allocate_local_dynrelocs): Likewise.
1204 (elf_i386_size_dynamic_sections): Replace
1205 elf_i386_allocate_dynrelocs/elf_i386_allocate_local_dynrelocs
1206 with _bfd_x86_elf_allocate_dynrelocs and
1207 _bfd_x86_elf_allocate_local_dynrelocs.
1208 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Removed.
1209 (elf_x86_64_allocate_local_dynrelocs): Likewise.
1210 (elf_x86_64_size_dynamic_sections): Replace
1211 elf_x86_64_allocate_dynrelocs/elf_x86_64_allocate_local_dynrelocs
1212 with _bfd_x86_elf_allocate_dynrelocs and
1213 _bfd_x86_elf_allocate_local_dynrelocs.
1214 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): New function.
1215 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
1216 * elfxx-x86.h (_bfd_x86_elf_allocate_dynrelocs): New prototype.
1217 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
1219 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1221 * elf32-i386.c (is_i386_elf): Removed.
1222 (elf_i386_check_relocs): Replace is_i386_elf with is_x86_elf.
1223 (elf_i386_size_dynamic_sections): Likewise.
1224 (elf_i386_relocate_section): Likewise.
1225 * elf64-x86-64.c (is_x86_64_elf): Removed.
1226 (elf_x86_64_check_relocs): Replace is_x86_64_elf with
1228 (elf_x86_64_size_dynamic_sections): Likewise.
1229 (elf_x86_64_relocate_section): Likewise.
1230 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1232 * elfxx-x86.h (elf_x86_link_hash_table): Add target_id.
1235 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1237 * elf32-i386.c (elf_i386_compute_jump_table_size): Removed.
1238 (elf_i386_allocate_dynrelocs): Replace
1239 elf_i386_compute_jump_table_size with
1240 elf_x86_compute_jump_table_size.
1241 (elf_i386_size_dynamic_sections): Likewise.
1242 * elf64-x86-64.c (elf_x86_64_compute_jump_table_size): Removed.
1243 (elf_x86_64_allocate_dynrelocs): Replace
1244 elf_x86_64_compute_jump_table_size with
1245 elf_x86_compute_jump_table_size.
1246 (elf_x86_64_size_dynamic_sections): Likewise.
1247 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1249 * elfxx-x86.h (elf_x86_link_hash_table): Add got_entry_size.
1250 (elf_x86_compute_jump_table_size): New.
1252 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1254 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1256 (_bfd_x86_elf_adjust_dynamic_symbol): Use sizeof_reloc.
1257 * elfxx-x86.h (elf_x86_link_hash_table): Add sizeof_reloc.
1259 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1261 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check VxWorks
1262 with htab->is_vxworks.
1263 (elf_i386_size_dynamic_sections): Likewise.
1264 (elf_i386_relocate_section): Likewise.
1265 (elf_i386_finish_dynamic_symbol): Likewise.
1266 (elf_i386_finish_dynamic_sections): Likewise.
1268 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1270 * elf32-i386.c (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
1271 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
1272 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Moved to ...
1273 * elfxx-x86.h (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
1274 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
1275 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Here.
1276 * elf64-x86-64.c (GOT_TLS_IE, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
1277 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Removed.
1279 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1282 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Check
1283 ELF_COMMON_DEF_P for common symbols.
1285 2017-09-02 Alan Modra <amodra@gmail.com>
1287 * elf-eh-frame.c (offset_adjust): Avoid false positive gcc warning.
1288 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Likewise.
1289 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
1291 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1293 * elf32-i386.c (elf_i386_gc_mark_hook): Removed.
1294 (elf_backend_gc_mark_hook): Likewise.
1295 * elf64-x86-64.c (elf_x86_64_gc_mark_hook): Likewise.
1296 (elf_backend_gc_mark_hook): Likewise.
1297 * elfxx-x86.c (_bfd_x86_elf_gc_mark_hook): New function.
1298 * elfxx-x86.h (_bfd_x86_elf_gc_mark_hook): New.
1299 (elf_backend_gc_mark_hook): Likewise.
1301 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1303 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Removed.
1304 (elf_backend_adjust_dynamic_symbol): Likewise.
1305 * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.
1306 (elf_backend_adjust_dynamic_symbol): Likewise.
1307 * elfxx-x86.c (_bfd_x86_elf_adjust_dynamic_symbol): New function.
1308 (_bfd_x86_elf_link_setup_gnu_properties): Copy is_vxworks.
1309 * elfxx-x86.h (elf_x86_link_hash_table): Add is_vxworks.
1310 (_bfd_x86_elf_adjust_dynamic_symbol): New.
1311 (elf_backend_adjust_dynamic_symbol): Likewise.
1313 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1315 * elfxx-x86.h (elf_x86_plt_layout_table): Fix a typo in
1318 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1320 * elf32-i386.c (elf_i386_mkobject): Removed.
1321 (bfd_elf32_mkobject): Likewise.
1322 * elf64-x86-64.c (elf_x86_64_mkobject): Likewise.
1323 (bfd_elf64_mkobject): Likewise.
1324 (bfd_elf32_mkobject): Likewise.
1325 * elfxx-x86.c (_bfd_x86_elf_mkobject): New function.
1326 * elfxx-x86.h (_bfd_x86_elf_mkobject): New.
1327 (bfd_elf64_mkobject): Likewise.
1328 (bfd_elf32_mkobject): Likewise.
1330 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1332 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Updated.
1333 Call _bfd_x86_elf_link_setup_gnu_properties.
1334 * elf64-x86-64.c (elf_x86_lazy_plt_layout): Initialize
1335 pic_plt0_entry and pic_plt_entry fields with the non-PIC PLT
1337 (elf_x86_64_non_lazy_plt): Likewise.
1338 (elf_x86_64_lazy_bnd_plt): Likewise.
1339 (elf_x86_64_non_lazy_bnd_plt): Likewise.
1340 (elf_x86_64_lazy_ibt_plt): Likewise.
1341 (elf_x32_lazy_ibt_plt): Likewise.
1342 (elf_x86_64_non_lazy_ibt_plt): Likewise.
1343 (elf_x32_non_lazy_ibt_plt): Likewise.
1344 (elf_x86_64_nacl_plt): Likewise.
1345 (elf_x86_64_link_setup_gnu_properties): Updated. Call
1346 _bfd_x86_elf_link_setup_gnu_properties.
1347 * elfxx-x86.c: Include elf-vxworks.h".
1348 (_bfd_x86_elf_link_setup_gnu_properties): New function.
1349 * elfxx-x86.h (elf_x86_lazy_plt_layout): Remove "for i386 only"
1350 comments for pic_plt0_entry and pic_plt_entry.
1351 (elf_x86_non_lazy_plt_layout): Likewise.
1352 (elf_x86_plt_layout_table): New.
1353 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
1355 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1358 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Create
1359 .eh_frame section for the second PLT.
1360 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Correct
1361 alignment of .eh_frame section for the second PLT.
1363 2017-09-01 Nick Clifton <nickc@redhat.com>
1366 * dwarf2.c (decode_line_info): Fix test for an overlong line info
1369 2017-09-01 Nick Clifton <nickc@redhat.com>
1372 * elf-attrs.c (_bfd_elf_parse_attributes): Ensure that the
1373 attribute buffer is NUL terminated.
1375 2017-08-31 Nick Clifton <nickc@redhat.com>
1378 * dwarf2.c (read_section): If necessary add a terminating NUL byte
1379 to dwarf string sections.
1381 2017-08-31 Alan Modra <amodra@gmail.com>
1383 * po/SRC-POTFILES.in: Regenerate.
1385 2017-08-31 Alan Modra <amodra@gmail.com>
1387 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Don't exit early
1388 for a section containing just a terminator. Allow multiple
1389 terminators at end of section.
1390 * elflink.c (bfd_elf_discard_info): Iterate over .eh_frame
1391 sections when not adding alignment. Assert on terminator in
1394 2017-08-31 Alan Modra <amodra@gmail.com>
1398 * elflink.c (bfd_elf_discard_info): Don't pad embedded zero
1401 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1403 * configure.ac (bfd_backends): Add elf64.lo together with
1404 elfxx-x86.lo for 64-bit BFD.
1405 * configure: Regenerated.
1407 2017-08-31 James Bowman <james.bowman@ftdichip.com>
1409 * elf32-ft32.c (ft32_elf_howto_table): Use complain_overflow_dont
1412 2017-08-31 Alan Modra <amodra@gmail.com>
1415 * opncls.c (bfd_close_all_done): Don't call bfd_cache_close
1416 before _close_and_cleanup. Call iovec->bclose after.
1417 (bfd_close): Remove code common to, and call, bfd_close_all_done.
1419 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1421 * elf32-i386.c (elf_i386_plt_type): Removed.
1422 (elf_i386_plt): Likewise.
1423 (elf_i386_get_synthetic_symtab): Updated. Call
1424 _bfd_x86_elf_get_synthetic_symtab.
1425 * elf64-x86-64.c (elf_x86_64_plt_type): Removed.
1426 (elf_x86_64_plt): Likewise.
1427 (elf_x86_64_get_synthetic_symtab): Updated. Call
1428 _bfd_x86_elf_get_synthetic_symtab.
1429 * elfxx-x86.c (elf_i386_get_plt_got_vma): New function.
1430 (elf_x86_64_get_plt_got_vma): Likewise.
1431 (elf_i386_valid_plt_reloc_p): Likewise.
1432 (elf_x86_64_valid_plt_reloc_p): Likewise.
1433 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
1434 * elfxx-x86.h (elf_x86_plt_type): New.
1435 (elf_x86_plt): Likewise.
1436 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
1438 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1440 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Check
1441 target_id instead of elf_machine_code.
1443 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1445 * elf32-i386.c (ELF_DYNAMIC_INTERPRETER): Removed.
1446 (elf_i386_lazy_plt_layout): Likewise.
1447 (elf_i386_non_lazy_plt_layout): Likewise.
1448 (elf_i386_plt_layout): Likewise.
1449 (elf_i386_link_hash_table): Likewise.
1450 (elf_i386_next_tls_desc_index): Likewise.
1451 (elf_i386_srelplt2): Likewise.
1452 (elf_i386_plt): Likewise.
1453 (elf_i386_lazy_plt): Likewise.
1454 (elf_i386_non_lazy_plt): Likewise.
1455 (elf_i386_link_hash_table_create): Likewise.
1456 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1457 (elf_i386_lazy_plt): Updated.
1458 (elf_i386_non_lazy_plt): Likewise.
1459 (elf_i386_lazy_ibt_plt): Likewise.
1460 (elf_i386_non_lazy_ibt_plt): Likewise.
1461 (elf_i386_allocate_dynrelocs): Likewise.
1462 (elf_i386_size_dynamic_sections): Likewise.
1463 (elf_i386_relocate_section): Likewise.
1464 (elf_i386_finish_dynamic_symbol): Likewise.
1465 (elf_i386_finish_dynamic_sections): Likewise.
1466 (elf_i386_get_synthetic_symtab): Likewise.
1467 (elf_i386_link_setup_gnu_properties): Likewise.
1468 (elf_i386_nacl_plt): Likewise.
1469 * elf64-x86-64.c (ABI_64_P): Removed.
1470 (ELF64_DYNAMIC_INTERPRETER): Likewise.
1471 (ELF32_DYNAMIC_INTERPRETER): Likewise.
1472 (elf_x86_64_lazy_plt_layout): Likewise.
1473 (elf_x86_64_non_lazy_plt_layout): Likewise.
1474 (elf_x86_64_plt_layout): Likewise.
1475 (elf_x86_64_link_hash_table): Likewise.
1476 (elf_x86_64_plt): Likewise.
1477 (elf_x86_64_lazy_plt): Likewise.
1478 (elf_x86_64_non_lazy_plt): Likewise.
1479 (elf_x86_64_link_hash_table_create): Likewise.
1480 (bfd_elf64_bfd_link_hash_table_create): Likewise.
1481 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1482 (elf_x86_64_lazy_plt): Updated.
1483 (elf_x86_64_non_lazy_plt): Likewise.
1484 (elf_x86_64_lazy_bnd_plt): Likewise.
1485 (elf_x86_64_non_lazy_bnd_plt): Likewise.
1486 (elf_x86_64_lazy_ibt_plt): Likewise.
1487 (elf_x32_lazy_ibt_plt): Likewise.
1488 (elf_x86_64_non_lazy_ibt_plt): Likewise.
1489 (elf_x32_non_lazy_ibt_plt): Likewise.
1490 (elf_x86_64_allocate_dynrelocs): Likewise.
1491 (elf_x86_64_size_dynamic_sections): Likewise.
1492 (elf_x86_64_relocate_section): Likewise.
1493 (elf_x86_64_finish_dynamic_symbol): Likewise.
1494 (elf_x86_64_finish_dynamic_sections): Likewise.
1495 (elf_x86_64_get_synthetic_symtab): Likewise.
1496 (elf_x86_64_link_setup_gnu_properties): Likewise.
1497 (elf_x86_64_nacl_plt): Likewise.
1498 * elfxx-x86.c: Include "objalloc.h", "elf/i386.h" and
1500 (ELF32_DYNAMIC_INTERPRETER): New.
1501 (ELF64_DYNAMIC_INTERPRETER): Likewise.
1502 (ELFX32_DYNAMIC_INTERPRETER): Likewise.
1503 (_bfd_x86_elf_link_hash_table_create): Likewise.
1504 (_bfd_x86_elf_link_hash_table_free): Renamed to ...
1505 (elf_x86_link_hash_table_free): This. Make it static.
1506 * elfxx-x86.h: Don't include "objalloc.h".
1508 (elf_x86_lazy_plt_layout): Likewise.
1509 (elf_x86_non_lazy_plt_layout): Likewise.
1510 (elf_x86_plt_layout): Likewise.
1511 (_bfd_x86_elf_link_hash_table_create): Likewise.
1512 (bfd_elf64_bfd_link_hash_table_create): Likewise.
1513 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1514 (elf_x86_link_hash_table): Add plt, lazy_plt, non_lazy_plt,
1515 srelplt2 and next_tls_desc_index.
1516 (_bfd_x86_elf_link_hash_table_free): Removed.
1518 2017-08-30 Maciej W. Rozycki <macro@imgtec.com>
1520 * elfxx-mips.c (mips_elf_perform_relocation): Correct microMIPS
1521 branch offset interpretation.
1523 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1526 * opncls.c (bfd_close_all_done): Call _close_and_cleanup.
1528 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1530 * elf64-x86-64.c (elf_x86_64_next_tls_desc_index): Removed.
1531 (elf_x86_64_srelplt2): Likewise.
1533 2017-08-30 Alan Modra <amodra@gmail.com>
1535 * elf64-ppc.c (struct ppc_link_hash_table): Add do_tls_opt.
1536 (ppc64_elf_tls_optimize): Set it.
1537 (ppc64_elf_relocate_section): Nop addis on TPREL16_HA, and convert
1538 insn on TPREL16_LO and TPREL16_LO_DS relocs to use r13 when
1539 addis would add zero.
1540 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add do_tls_opt.
1541 (ppc_elf_tls_optimize): Set it.
1542 (ppc_elf_relocate_section): Nop addis on TPREL16_HA, and convert
1543 insn on TPREL16_LO relocs to use r2 when addis would add zero.
1545 2017-08-30 Alan Modra <amodra@gmail.com>
1547 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing
1548 __tls_get_addr call sequences to LE, don't move the addi down
1549 to the nop. Replace the bl with addi and leave the nop alone.
1551 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1553 * elf32-i386.c (elf_i386_pie_finish_undefweak_symbol):
1555 * elf64-x86-64.c (elf_x86_64_finish_local_dynamic_symbol):
1557 (elf_x86_64_pie_finish_undefweak_symbol): Likewise.
1559 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1561 * Makefile.am (BFD32_BACKENDS): Add elfxx-x86.lo.
1562 (BFD64_BACKENDS): Likewise.
1563 (BFD32_BACKENDS_CFILES): Add elfxx-x86.c.
1564 (BFD64_BACKENDS_CFILES): Likewise.
1565 * Makefile.in: Regenerated.
1566 * configure.ac (bfd_backends): Add elfxx-x86.lo together with
1567 elf32-i386.lo and elf64-x86-64.lo.
1568 * configure: Regenerated.
1569 * elf32-i386.c: Include "elfxx-x86.h" instead of "sysdep.h",
1570 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
1571 "objalloc.h" and "hashtab.h".
1572 (ELIMINATE_COPY_RELOCS): Removed.
1573 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
1574 (SYMBOL_NO_COPYRELOC): Likewise.
1575 (elf_i386_link_hash_entry): Likewise.
1576 (GOT_UNKNOWN): Likewise.
1577 (GOT_NORMAL): Likewise.
1578 (GOT_TLS_GD): Likewise.
1579 (elf_i386_hash_entry): Likewise.
1580 (elf_i386_obj_tdata): Likewise.
1581 (elf_i386_tdata): Likewise.
1582 (elf_i386_local_got_tls_type): Likewise.
1583 (elf_i386_local_tlsdesc_gotent): Likewise.
1584 (elf_i386_hash_table): Likewise.
1585 (elf_i386_link_hash_newfunc): Likewise.
1586 (elf_i386_local_htab_hash): Likewise.
1587 (elf_i386_local_htab_eq): Likewise.
1588 (elf_i386_get_local_sym_hash): Likewise.
1589 (elf_i386_link_hash_table_free): Likewise.
1590 (elf_i386_copy_indirect_symbol): Likewise.
1591 (elf_i386_fixup_symbol): Likewise.
1592 (elf_i386_readonly_dynrelocs): Likewise.
1593 (elf_i386_always_size_sections): Likewise.
1594 (elf_i386_set_tls_module_base): Likewise.
1595 (elf_i386_dtpoff_base): Likewise.
1596 (compare_relocs): Likewise.
1597 (elf_i386_hash_symbol): Likewise.
1598 (elf_i386_parse_gnu_properties): Likewise.
1599 (elf_i386_merge_gnu_properties): Likewise.
1600 (elf_i386_link_check_relocs): Likewise.
1601 (elf_i386_merge_symbol_attribute): Likewise.
1602 (bfd_elf32_bfd_link_check_relocs): Likewise.
1603 (elf_backend_copy_indirect_symbol): Likewise.
1604 (elf_backend_always_size_sections): Likewise.
1605 (elf_backend_omit_section_dynsym): Likewise.
1606 (elf_backend_hash_symbol): Likewise.
1607 (elf_backend_fixup_symbol): Likewise.
1608 (elf_backend_parse_gnu_properties): Likewise.
1609 (elf_backend_merge_gnu_properties): Likewise.
1610 (elf_backend_merge_symbol_attribute): Likewise.
1611 (elf_i386_mkobject): Updated.
1612 (elf_i386_link_hash_table_create): Likewise.
1613 (elf_i386_check_tls_transition): Likewise.
1614 (elf_i386_tls_transition): Likewise.
1615 (elf_i386_convert_load_reloc): Likewise.
1616 (elf_i386_check_relocs): Likewise.
1617 (elf_i386_adjust_dynamic_symbol): Likewise.
1618 (elf_i386_allocate_dynrelocs): Likewise.
1619 (elf_i386_convert_load): Likewise.
1620 (elf_i386_size_dynamic_sections): Likewise.
1621 (elf_i386_relocate_section): Likewise.
1622 (elf_i386_finish_dynamic_symbol ): Likewise.
1623 (elf_i386_finish_dynamic_sections): Likewise.
1624 (elf_i386_output_arch_local_syms): Likewise.
1625 (elf_i386_get_synthetic_symtab): Likewise.
1626 (elf_i386_link_setup_gnu_properties): Likewise.
1627 (elf_i386_link_hash_table): Use elf_x86_link_hash_table, instead
1628 of elf_link_hash_table, as base.
1629 (elf_i386_next_tls_desc_index): New.
1630 (elf_i386_srelplt2): Likewise.
1631 (elf_i386_plt): Likewise.
1632 (elf_i386_lazy_plt): Likewise.
1633 (elf_i386_non_lazy_plt): Likewise.
1634 * elf32-x86-64.c: Include "elfxx-x86.h" instead of "sysdep.h",
1635 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
1636 "objalloc.h" and "hashtab.h".
1637 (ELIMINATE_COPY_RELOCS): Removed.
1638 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
1639 (SYMBOL_NO_COPYRELOC): Likewise.
1640 (elf_x86_64_link_hash_entry): Likewise.
1641 (GOT_UNKNOWN): Likewise.
1642 (GOT_NORMAL): Likewise.
1643 (GOT_TLS_GD): Likewise.
1644 (elf_x86_64_hash_entry): Likewise.
1645 (elf_x86_64_obj_tdata): Likewise.
1646 (elf_x86_64_tdata): Likewise.
1647 (elf_x86_64_local_got_tls_type): Likewise.
1648 (elf_x86_64_local_tlsdesc_gotent): Likewise.
1649 (elf_x86_64_hash_table): Likewise.
1650 (elf_x86_64_link_hash_newfunc): Likewise.
1651 (elf_x86_64_local_htab_hash): Likewise.
1652 (elf_x86_64_local_htab_eq): Likewise.
1653 (elf_x86_64_get_local_sym_hash): Likewise.
1654 (elf_x86_64_link_hash_table_free): Likewise.
1655 (elf_x86_64_copy_indirect_symbol): Likewise.
1656 (elf_x86_64_fixup_symbol): Likewise.
1657 (elf_x86_64_readonly_dynrelocs): Likewise.
1658 (elf_x86_64_always_size_sections): Likewise.
1659 (elf_x86_64_set_tls_module_base): Likewise.
1660 (elf_x86_64_dtpoff_base): Likewise.
1661 (compare_relocs): Likewise.
1662 (elf_x86_64_merge_symbol_attribute): Likewise.
1663 (elf_x86_64_hash_symbol): Likewise.
1664 (elf_x86_64_parse_gnu_properties): Likewise.
1665 (elf_x86_64_merge_gnu_properties): Likewise.
1666 (elf_x86_64_link_check_relocs): Likewise.
1667 (elf_backend_copy_indirect_symbol): Likewise.
1668 (elf_backend_always_size_sections): Likewise.
1669 (bfd_elf64_bfd_link_check_relocs): Likewise.
1670 (elf_backend_merge_symbol_attribute): Likewise.
1671 (elf_backend_hash_symbol): Likewise.
1672 (elf_backend_omit_section_dynsym): Likewise.
1673 (elf_backend_fixup_symbol): Likewise.
1674 (elf_backend_parse_gnu_properties): Likewise.
1675 (elf_backend_merge_gnu_properties): Likewise.
1676 (bfd_elf32_bfd_link_check_relocs): Likewise.
1677 (elf_x86_64_mkobject): Updated.
1678 (elf_x86_64_link_hash_table_create): Likewise.
1679 (elf_x86_64_check_tls_transition): Likewise.
1680 (elf_x86_64_tls_transition): Likewise.
1681 (elf_x86_64_convert_load_reloc): Likewise.
1682 (elf_x86_64_check_relocs): Likewise.
1683 (elf_x86_64_adjust_dynamic_symbol): Likewise.
1684 (elf_x86_64_allocate_dynrelocs): Likewise.
1685 (elf_x86_64_convert_load): Likewise.
1686 (elf_x86_64_size_dynamic_sections): Likewise.
1687 (elf_x86_64_relocate_section): Likewise.
1688 (elf_x86_64_finish_dynamic_symbol ): Likewise.
1689 (elf_x86_64_finish_dynamic_sections): Likewise.
1690 (elf_x86_64_output_arch_local_syms): Likewise.
1691 (elf_x86_64_get_synthetic_symtab): Likewise.
1692 (elf_x86_64_link_setup_gnu_properties): Likewise.
1693 (elf_x86_64_link_hash_table): Use elf_x86_link_hash_table,
1694 instead of elf_link_hash_table, as base.
1695 (elf_x86_64_next_tls_desc_index): New.
1696 (elf_x86_64_srelplt2): Likewise.
1697 (elf_x86_64_plt): Likewise.
1698 (elf_x86_64_lazy_plt): Likewise.
1699 (elf_x86_64_non_lazy_plt): Likewise.
1700 * elfxx-x86.c: New file.
1701 * elfxx-x86.h: Likewise.
1703 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1705 * elf32-i386.c (elf_i386_get_synthetic_symtab): Simplify bad
1707 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1709 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
1711 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check valid PLT
1712 sections before checking dynamic relocations and free invalid
1713 PLT section contents.
1714 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1716 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
1718 * elf-bfd.h (_bfd_elf_ifunc_get_synthetic_symtab): Removed.
1719 * elf-ifunc.c (_bfd_elf_ifunc_get_synthetic_symtab): Likewise.
1721 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
1724 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check for valid
1726 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1728 2017-08-27 H.J. Lu <hongjiu.lu@intel.com>
1730 * elf32-i386.c (elf_i386_link_hash_newfunc): Initialize
1732 * elf64-x86-64.c (elf_x86_64_link_hash_newfunc): Likewise.
1734 2017-08-26 H.J. Lu <hongjiu.lu@intel.com>
1737 * elf-bfd.h (elf_obj_tdata): Use ENUM_BITFIELD on object_id,
1738 dyn_lib_class and has_gnu_symbols. Change bad_symtab to bitfield.
1739 Add a has_no_copy_on_protected bitfield.
1740 (elf_has_no_copy_on_protected): New.
1741 * elf-properties.c (_bfd_elf_parse_gnu_properties): Set
1742 elf_has_no_copy_on_protected for GNU_PROPERTY_NO_COPY_ON_PROTECTED.
1743 (elf_merge_gnu_property_list): Likewise.
1744 (_bfd_elf_link_setup_gnu_properties): Set extern_protected_data
1745 to FALSE for elf_has_no_copy_on_protected.
1746 * elf32-i386.c (SYMBOL_NO_COPYRELOC): New.
1747 (elf_i386_link_hash_entry): Add def_protected.
1748 (elf_i386_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
1749 when checking info->nocopyreloc.
1750 (elf_i386_link_setup_gnu_properties): Don't set
1751 extern_protected_data here.
1752 (elf_i386_merge_symbol_attribute): New function.
1753 (elf_backend_merge_symbol_attribute): New.
1754 * elf64-x86-64.c (SYMBOL_NO_COPYRELOC): New.
1755 (elf_x86_64_link_hash_entry): Add def_protected.
1756 (elf_x86_64_need_pic): Report protected symbol for def_protected.
1757 (elf_x86_64_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
1758 when checking info->nocopyreloc.
1759 (elf_x86_64_relocate_section): Also check for R_X86_64_PC32
1760 relocation run-time overflow and unresolvable R_X86_64_32S
1761 relocation against protected data symbol defined in shared object
1762 with GNU_PROPERTY_NO_COPY_ON_PROTECTED.
1763 (elf_x86_64_link_setup_gnu_properties): Don't set
1764 extern_protected_data here.
1765 (elf_x86_64_merge_symbol_attribute): New function.
1766 (elf_backend_merge_symbol_attribute): New.
1768 2017-08-26 Alan Modra <amodra@gmail.com>
1770 * elf32-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
1771 (ppc_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
1772 (ppc_elf_relocate_section): Comment fix.
1773 * elf64-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
1774 (ppc64_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
1775 Support dynamic relocs for TPREL16 when non-pic too.
1776 (dec_dynrel_count): Adjust TPREL16 handling as per check_relocs.
1777 (ppc64_elf_relocate_section): Support dynamic relocs for TPREL16
1780 2017-08-25 H.J. Lu <hongjiu.lu@intel.com>
1782 * elf32-i386.c (elf_i386_link_hash_entry): Remove redundant
1783 "symbol" in comments.
1784 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Likewise.
1786 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
1789 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for
1790 R_X86_64_PC32 relocation run-time overflow and unresolvable
1791 R_X86_64_32S relocation with -z nocopyreloc.
1793 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
1795 * elf32-i386.c (elf_i386_check_relocs): Revert the last change.
1796 Undefined symbols may not have a type.
1797 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1799 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1801 * elf64-x86-64.c (elf_x86_64_need_pic): Add an argument for
1802 bfd_link_info. Report shared, PIE or PDE object based on
1804 (elf_x86_64_check_relocs): Update elf_x86_64_need_pic call.
1805 (elf_x86_64_relocate_section): Likewise.
1807 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1809 * elf32-i386.c (elf_i386_check_relocs): Increment PLT count only
1810 for function symbols.
1811 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1813 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
1815 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set
1816 extern_protected_data to FALSE if GNU_PROPERTY_NO_COPY_ON_PROTECTED
1817 is set on any input relocatable file.
1818 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
1820 2017-08-23 Alan Modra <amodra@gmail.com>
1823 * elf64-ppc.c (ensure_undef_dynamic): Rename from
1824 ensure_undefweak_dynamic. Handle undefined too.
1825 * elf32-ppc.c (ensure_undef_dynamic): Likewise.
1826 * elf32-hppa.c (ensure_undef_dynamic): Likewise.
1827 (allocate_dynrelocs): Discard undefined non-default visibility
1828 relocs first. Make undefined syms dynamic. Tidy goto.
1830 2017-08-21 Alan Modra <amodra@gmail.com>
1831 H.J. Lu <hongjiu.lu@intel.com>
1834 * elf-bfd.h (SYMBOLIC_BIND): Return TRUE for __start/__stop symbols.
1835 * elflink.c (bfd_elf_define_start_stop): Rewrite.
1837 2017-08-21 Hans-Peter Nilsson <hp@bitrange.com>
1840 * elf64-mmix.c (mmix_elf_relax_section): Correct handling of
1841 undefined weak symbols.
1843 2017-08-18 Nick Clifton <nickc@redhat.com>
1846 * tekhex.c (getsym): Fix check for source pointer walking off the
1847 end of the input buffer.
1849 2017-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
1852 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Skip IFUNC
1853 relocations in debug sections, change abort to _bfd_error_handler.
1855 2017-08-14 Nick Clifton <nickc@redhat.com>
1858 * elf.c (setup_group): Check for an empty or very small group
1860 * po/bfd.pot: Regenerate.
1862 2017-08-14 Alan Modra <amodra@gmail.com>
1865 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't add
1866 alignment padding here.
1867 * elflink.c (bfd_elf_discard_info): Add .eh_frame padding here
1868 in a reverse pass over sections.
1870 2017-08-11 H.J. Lu <hongjiu.lu@intel.com>
1873 * elf32-i386.c (elf_i386_get_synthetic_symtab): Allocate space
1874 for @plt suffixes first.
1875 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1877 2017-08-08 Nick Clifton <nickc@redhat.com>
1880 * elf-attrs.c (_bfd_elf_parse_attributes): Complain about very
1881 small section lengths.
1882 * elf.c (_bfd_elf_setup_sections): Skip empty entries in the group
1884 (elfcore_grok_freebsd_prstatus): Add checks to make sure that
1885 there is enough data present in the note.
1887 2017-08-08 Alan Modra <amodra@gmail.com>
1890 * elf32-microblaze.c (microblaze_elf_check_relocs): Don't bump
1891 got.refcount for GOTOFF relocs, just create .got section.
1893 2017-08-07 H.J. Lu <hongjiu.lu@intel.com>
1895 * elflink.c (elf_link_add_object_symbols): Move common symbol
1896 check after bed->common_definition.
1898 2017-08-07 Alan Modra <amodra@gmail.com>
1901 * elflink.c (bfd_elf_final_link): Don't segfault when sections
1902 needed to define various dynamic tags have been discarded.
1904 2017-08-07 Nick Clifton <nickc@redhat.com>
1907 * elf32-i386.c (elf_i386_link_setup_gnu_properties): If the dynobj
1908 has not been set then use the bfd returned by
1909 _bfd_elf_link_setup_gnu_properties. If that is null then search
1910 through all the input bfds selecting the first normal, ELF format
1912 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
1914 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
1916 * elf32-i386.c (elf_i386_link_hash_entry): Change tls_get_addr
1918 (elf_i386_link_hash_newfunc): Initialize tls_get_addr to 0.
1919 (elf_i386_check_tls_transition): Check tls_get_addr directly.
1920 (elf_i386_convert_load_reloc): Update tls_get_addr check.
1921 (elf_i386_link_check_relocs): New function.
1922 (bfd_elf32_bfd_link_check_relocs): New.
1923 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Change tls_get_addr
1925 (elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 0.
1926 (elf_x86_64_check_tls_transition): Check tls_get_addr directly.
1927 (elf_x86_64_convert_load_reloc): Update tls_get_addr check.
1928 (elf_x86_64_link_check_relocs): New function.
1929 (bfd_elf64_bfd_link_check_relocs): New.
1930 (bfd_elf32_bfd_link_check_relocs): Likewise.
1932 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
1935 * elflink.c (elf_link_add_object_symbols): Treat common symbol
1936 as undefined for --no-define-common.
1938 2017-08-05 Alan Modra <amodra@gmail.com>
1940 * elf32-hppa.c (elf32_hppa_set_gp): Don't require an
1941 hppa_link_hash_table.
1943 2017-08-02 Max Filippov <jcmvbkbc@gmail.com>
1945 * xtensa-isa.c (xtensa_isa_init): Don't update lookup table
1946 entries for sysregs with negative indices.
1948 2017-08-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1950 * elf32-s390.c (elf_s390_finish_dynamic_sections): Skip if it
1951 isn't the S/390 specific elf data.
1952 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
1954 2017-07-31 Kuan-Lin Chen <rufus@andestech.com>
1956 * elfxx-riscv.c (riscv_elf_add_sub_reloc): New function.
1957 * (howto_table) [R_RISCV_ADD8]: Use riscv_elf_add_sub_reloc.
1958 [R_RISCV_ADD16]: Likewise.
1959 [R_RISCV_ADD32]: Likewise.
1960 [R_RISCV_ADD64]: Likewise.
1961 [R_RISCV_SUB6]: Likewise.
1962 [R_RISCV_SUB8]: Likewise.
1963 [R_RISCV_SUB16]: Likewise.
1964 [R_RISCV_SUB32]: Likewise.
1965 [R_RISCV_SUB64]: Likewise.
1967 2017-07-31 Alan Modra <amodra@gmail.com>
1969 * elf64-ppc.c (ppc64_elf_tls_setup): Warn on --plt-localentry
1970 without ld.so checks.
1972 2017-07-29 Alan Modra <amodra@gmail.com>
1975 * elf64-ppc.c (struct ppc_link_hash_entry): Add non_zero_localentry.
1976 (ppc64_elf_merge_symbol): Set non_zero_localentry.
1977 (is_elfv2_localentry0): Test non_zero_localentry.
1978 (ppc64_elf_tls_setup): Default to --no-plt-localentry.
1980 2017-07-28 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1982 * elf32-s390.c (elf_s390_finish_dynamic_sections): Add NULL
1983 pointer check for htab->elf.irelplt.
1984 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
1986 2017-07-27 Nick Clifton <nickc@redhat.com>
1989 * mach-o.c (bfd_mach_o_read_symtab_strtab): Fail if the symtab
1991 * nlmcode.h (nlm_swap_auxiliary_headers_in): Replace assertion
1993 * section.c (bfd_make_section_with_flags): Fail if the name or bfd
1995 * vms-alpha.c (bfd_make_section_with_flags): Correct computation
1997 (evax_bfd_print_emh): Check for invalid string lengths.
1999 2017-07-25 Nick Clifton <nickc@redhat.com>
2001 * po/fr.po: Updated French translation.
2003 2017-07-25 Benjamin Green <bengreen5mx@gmail.com>
2006 * elf32-msp430.c (msp430_elf_relax_section): Allow conversion of
2007 16-bit absolute branches into 10-bit pc-relative branches on the
2008 MSP430 as well as the MSP430X.
2010 2017-07-25 Alan Modra <amodra@gmail.com>
2012 * elf64-ppc.c (struct map_stub): Add tls_get_addr_opt_bctrl.
2013 (stub_eh_frame_size): New function.
2014 (ppc_size_one_stub): Set group tls_get_addr_opt_bctrl.
2015 (group_sections): Init group tls_get_addr_opt_bctrl.
2016 (ppc64_elf_size_stubs): Update sizing and initialization of
2017 .eh_frame. Iteration over stubs via group list.
2018 (ppc64_elf_build_stubs): Iterate over stubs via group list.
2019 (ppc64_elf_finish_dynamic_sections): Update finalization of
2022 2017-07-24 Nick Clifton <nickc@redhat.com>
2025 * mach-o.c (bfd_mach_o_canonicalize_relocs): Pass the base address
2026 of the relocs to the canonicalize_one_reloc routine.
2027 * mach-o.h (struct bfd_mach_o_backend_data): Update the prototype
2028 for the _bfd_mach_o_canonicalize_one_reloc field.
2029 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add
2030 res_base parameter. Use to check for corrupt pair relocs.
2031 * mach-o-aarch64.c (bfd_mach_o_arm64_canonicalize_one_reloc):
2033 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc):
2035 * mach-o-x86-64.c (bfd_mach_o_x86_64_canonicalize_one_reloc):
2038 * vms-alpha.c (_bfd_vms_slurp_eihd): Make sure that there is
2039 enough data in the record before attempting to parse it.
2040 (_bfd_vms_slurp_eeom): Likewise.
2042 (_bfd_vms_slurp_egsd): Check for an invalid section index.
2043 (image_set_ptr): Likewise.
2044 (alpha_vms_slurp_relocs): Likewise.
2046 (alpha_vms_object_p): Check for a truncated record.
2048 2017-07-24 Nick Clifton <nickc@redhat.com>
2051 * reloc.c (_bfd_unrecognized_reloc): New function. Reports
2052 an unrecognized reloc and sets the bfd_error value.
2053 * libbfd.h: Regenerate.
2054 * elf32-arm.c (elf32_arm_final_link_relocate): Use the new
2056 * elf32-i386.c (elf_i386_relocate_section): Likewise.
2057 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
2058 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
2059 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.
2060 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
2062 2017-07-23 Alan Modra <amodra@gmail.com>
2064 * elf64-ppc.c (ppc64_elf_size_stubs): Correct advance to
2067 2017-07-19 Szabolcs Nagy <szabolcs.nagy@arm.com>
2070 * elfnn-aarch64.c (elfNN_aarch64_reloc_type_class): Return
2071 reloc_class_ifunc for ifunc symbols.
2073 2017-07-19 Nick Clifton <nickc@redhat.com>
2076 * archive.c (bfd_generic_archive_p): If the bfd does not have the
2077 correct magic bytes at the start, set the error to wrong format
2078 and clear the format selector before returning NULL.
2080 2017-07-19 Nick Clifton <nickc@redhat.com>
2083 * coff-rs6000.c (_bfd_strntol): New function.
2084 (_bfd_strntoll): New function.
2085 (GET_VALUE_IN_FIELD): New macro.
2086 (EQ_VALUE_IN_FIELD): new macro.
2087 (_bfd_xcoff_slurp_armap): Use new macros.
2088 (_bfd_xcoff_archive_p): Likewise.
2089 (_bfd_xcoff_read_ar_hdr): Likewise.
2090 (_bfd_xcoff_openr_next_archived_file): Likewise.
2091 (_bfd_xcoff_stat_arch_elt): Likewise.
2092 * coff64-rs6000.c (_bfd_strntol): New function.
2093 (_bfd_strntoll): New function.
2094 (GET_VALUE_IN_FIELD): New macro.
2095 (xcoff64_slurp_armap): Use new macros.
2097 2017-07-19 Claudiu Zissulescu <claziss@synopsys.com>
2098 John Eric Martin <John.Martin@emmicro-us.com>
2100 * bfd-in2.h: Regenerate.
2101 * libbfd.h: Regenerate.
2102 * elf32-arc.c (JLI): Define.
2103 * reloc.c: Add JLI relocations.
2105 2017-07-18 Nick Clifton <nickc@redhat.com>
2108 * coff-sh.c: Fix spelling typos.
2109 * compress.c: Likewise.
2110 * cpu-pdp11.c: Likewise.
2111 * ecofflink.c: Likewise.
2112 * elf-m10300.c: Likewise.
2114 * elf32-arm.c: Likewise.
2115 * elf32-m68k.c: Likewise.
2116 * elf32-nds32.c: Likewise.
2117 * elf32-ppc.c: Likewise.
2118 * elf32-sh.c: Likewise.
2119 * elf32-v850.c: Likewise.
2120 * elf64-ppc.c: Likewise.
2121 * elf64-x86-64.c: Likewise.
2122 * elflink.c: Likewise.
2123 * elfnn-aarch64.c: Likewise.
2124 * elfxx-mips.c: Likewise.
2126 * sunos.c: Likewise.
2127 * vms-alpha.c: Likewise.
2128 * xcofflink.c: Likewise.
2130 2017-07-18 Nick Clifton <nickc@redhat.com>
2133 * coffcode.h (handle_COMDAT): Replace abort with an error message
2136 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
2139 * elf64-x86-64.c (elf_x86_64_relocate_section): Limit PIC check
2142 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
2144 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
2146 2017-07-16 Alan Modra <amodra@gmail.com>
2148 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimize
2149 __tls_index GOT entries when using __tls_get_addr_opt stub.
2150 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2152 2017-07-12 Alan Modra <amodra@gmail.com>
2154 * po/es.po: Update from translationproject.org/latest/bfd/.
2155 * po/fi.po: Likewise.
2156 * po/fr.po: Likewise.
2157 * po/id.po: Likewise.
2158 * po/ja.po: Likewise.
2159 * po/ro.po: Likewise.
2160 * po/ru.po: Likewise.
2161 * po/sr.po: Likewise.
2162 * po/sv.po: Likewise.
2163 * po/tr.po: Likewise.
2164 * po/uk.po: Likewise.
2165 * po/vi.po: Likewise.
2166 * po/zh_CN.po: Likewise.
2167 * po/hr.po: New file from translationproject.org.
2168 * configure.ac (ALL_LINGUAS): Add hr. Sort.
2169 * configure: Regenerate.
2171 2017-07-12 Nick Clifton <nickc@redhat.com>
2173 Fix compile time warnings using gcc 7.1.1.
2174 * elf32-xtensa.c (elf_xtensa_get_plt_section): Increase length of
2176 (elf_xtensa_get_gotplt_section): Increase length of got_name
2178 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add a
2179 default return of FALSE.
2180 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc): Add a
2181 default return of FALSE.
2183 2017-07-12 Alan Modra <amodra@gmail.com>
2185 * binary.c (binary_set_section_contents): Don't print filepos in
2187 (coff_write_object_contents): Cast size_t for error message.
2188 (coff_slurp_line_table): Don't use bfd_vma symndx.
2189 (coff_slurp_reloc_table): Remove unneeded cast.
2190 * dwarf2.c (read_section): Cast bfd_int64_t to long long for
2192 (find_abstract_instance_name): Likewise.
2193 * elf32-arm.c (arm_type_of_stub): Correct error arg order.
2194 (bfd_elf32_arm_stm32l4xx_erratum_scan): Don't cast error arg.
2195 (elf32_arm_check_relocs): Make r_symndx an int.
2196 * elf32-cris.c (cris_elf_check_relocs): Delete extraneous %s in
2198 * elf32-metag.c (elf_metag_relocate_section): Delete extra error
2200 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Rewrite bogus
2202 * elf32-i386.c (elf_i386_check_relocs): Make r_symndx an int.
2203 * elf32-s390.c (elf_s390_check_relocs): Likewise.
2204 * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
2205 * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
2206 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
2207 * elf64-s390.c (elf_s390_check_relocs): Likewise.
2208 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
2209 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
2210 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
2211 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
2212 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
2213 * elf64-mmix.c (_bfd_mmix_after_linker_allocation): Cast size_t args
2214 and use %lu for error message.
2215 * elflink.c (elf_link_adjust_relocs): Delete extra error message arg.
2216 * mmo.c (mmo_scan): Make stab_loc a file_ptr. Cast expression for
2219 * elf32-arm.c (elf32_arm_tls_relax): Correct format string and args
2221 (elf32_arm_final_link_relocate): Likewise.
2222 * coff-arm.c (bfd_arm_process_before_allocation): Likewise.
2223 * coffcode.h (styp_to_sec_flags): Likewise.
2224 * cofflink.c (_bfd_coff_write_global_sym): Likewise.
2225 * ecoff.c (_bfd_ecoff_slurp_symbol_table): Likewise.
2226 * elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise.
2227 * elf32-bfin.c (bfinfdpic_check_relocs): Likewise.
2228 (elf32_bfin_merge_private_bfd_data): Likewise.
2229 * elf32-cris.c (cris_elf_relocate_section): Likewise.
2230 * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
2231 * elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise.
2232 (i370_elf_relocate_section): Likewise.
2233 * elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise.
2234 * elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise.
2235 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
2236 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
2237 * elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise.
2238 * elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise.
2239 * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
2240 * elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise.
2241 (_bfd_mips_elf_merge_private_bfd_data): Likewise.
2242 * ieee.c (ieee_write_id, read_id): Likewise.
2243 * mach-o.c (bfd_mach_o_write_contents): Likewise.
2244 (bfd_mach_o_layout_commands, bfd_mach_o_read_section_32): Likewise.
2245 (bfd_mach_o_read_section_64, bfd_mach_o_read_symtab_symbol): Likewise.
2246 (bfd_mach_o_read_command, bfd_mach_o_header_p): Likewise.
2247 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Likewise.
2248 * stabs.c (_bfd_link_section_stabs): Likewise.
2250 * coff-arm.c (coff_arm_relocate_section): Use L modifier in error
2252 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
2253 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
2254 * coff-rs6000.c (xcoff_reloc_type_toc): Likewise.
2255 * coff-sh.c (sh_relax_section): Likewise.
2256 (sh_relax_delete_bytes, sh_swap_insns): Likewise.
2257 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
2258 * coffcode.h (coff_slurp_reloc_table): Likewise.
2259 * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
2260 (_bfd_coff_read_string_table): Likewise.
2261 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
2262 * compress.c (bfd_get_full_section_contents): Likewise.
2263 * dwarf2.c (read_formatted_entries, decode_line_info): Likewise.
2264 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
2265 * elf.c (bfd_elf_string_from_elf_section): Likewise.
2266 * elf32-arc.c (arc_special_overflow_checks): Likewise.
2267 * elf32-arm.c (elf32_arm_tls_relax): Likewise.
2268 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Likewise.
2269 (elf32_arm_write_section): Likewise.
2270 * elf32-bfin.c (bfin_relocate_section): Likewise.
2271 (bfinfdpic_relocate_section): Likewise.
2272 * elf32-hppa.c (hppa_build_one_stub): Likewise.
2273 (final_link_relocate, elf32_hppa_relocate_section): Likewise.
2274 * elf32-i386.c (elf_i386_tls_transition): Likewise.
2275 (elf_i386_relocate_section): Likewise.
2276 * elf32-ip2k.c (ip2k_final_link_relocate): Likewise.
2277 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
2278 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
2279 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
2280 * elf32-metag.c (elf_metag_relocate_section): Likewise.
2281 * elf32-nds32.c (unrecognized_reloc_msg): Likewise.
2282 (nds32_elf_relax_longcall1, nds32_elf_relax_longcall2): Likewise.
2283 (nds32_elf_relax_longcall3, nds32_elf_relax_longjump1): Likewise.
2284 (nds32_elf_relax_longjump2, nds32_elf_relax_longjump3): Likewise.
2285 (nds32_elf_relax_longcall4, nds32_elf_relax_longcall5): Likewise.
2286 (nds32_elf_relax_longcall6, nds32_elf_relax_longjump4): Likewise.
2287 (nds32_elf_relax_longjump5, nds32_elf_relax_longjump6): Likewise.
2288 (nds32_elf_relax_longjump7, nds32_elf_relax_loadstore): Likewise.
2289 (nds32_elf_relax_ptr, nds32_elf_ex9_build_hash_table): Likewise.
2290 * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
2291 * elf32-rx.c (UNSAFE_FOR_PID): Likewise.
2292 * elf32-s390.c (invalid_tls_insn, elf_s390_relocate_section): Likewise.
2293 * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
2294 * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
2295 * elf32-sh.c (sh_elf_relax_section): Likewise.
2296 (sh_elf_relax_delete_bytes, sh_elf_swap_insns): Likewise.
2297 (sh_elf_relocate_section): Likewise.
2298 * elf32-sh64.c (shmedia_prepare_reloc): Likewise.
2299 * elf32-spu.c (spu_elf_relocate_section): Likewise.
2300 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
2301 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
2302 * elf32-v850.c (v850_elf_relax_section): Likewise.
2303 * elf32-vax.c (elf_vax_check_relocs): Likewise.
2304 (elf_vax_relocate_section): Likewise.
2305 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
2306 (extend_ebb_bounds_forward, extend_ebb_bounds_backward): Likewise.
2307 (compute_text_actions, compute_ebb_proposed_actions): Likewise.
2308 (do_fix_for_relocatable_link): Likewise.
2309 * elf64-alpha.c (elf64_alpha_relax_got_load): Likewise.
2310 (elf64_alpha_relax_with_lituse): Likewise.
2311 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Likewise.
2312 (elf_hppa_final_link_relocate): Likewise.
2313 * elf64-ia64-vms.c (elf64_ia64_relax_section): Likewise.
2314 (elf64_ia64_choose_gp, elf64_ia64_relocate_section): Likewise.
2315 (elf64_vms_link_add_object_symbols): Likewise.
2316 * elf64-mmix.c (mmix_elf_perform_relocation): Likewise.
2317 (mmix_final_link_relocate): Likewise.
2318 * elf64-s390.c (invalid_tls_insn): Likewise.
2319 (elf_s390_relocate_section): Likewise.
2320 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
2321 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
2322 (elf_x86_64_relocate_section): Likewise.
2323 * elfcode.h (elf_slurp_symbol_table): Likewise.
2324 * elfcore.h (elf_core_file_p): Likewise.
2325 * elflink.c (elf_link_read_relocs_from_section): Likewise.
2326 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
2327 (elfNN_aarch64_relocate_section): Likewise.
2328 * elfnn-ia64.c (elfNN_ia64_relax_section): Likewise.
2329 (elfNN_ia64_choose_gp, elfNN_ia64_relocate_section): Likewise.
2330 * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
2331 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
2332 (_bfd_mips_elf_relocate_section): Likewise.
2333 (_bfd_mips_elf_finish_dynamic_symbol, mips_finish_exec_plt): Likewise.
2334 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
2335 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
2336 * ieee.c (ieee_slurp_external_symbols): Likewise.
2337 * ihex.c (ihex_write_object_content): Likewise.
2338 * mach-o.c (bfd_mach_o_build_exec_seg_command): Likewise.
2339 * merge.c (_bfd_merged_section_offset): Likewise.
2340 * mmo.c (mmo_write_loc_chunk): Likewise.
2341 (mmo_write_object_contents): Likewise.
2342 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Likewise.
2343 * stabs.c (_bfd_link_section_stabs): Likewise.
2344 * xcofflink.c (xcoff_link_add_symbols, xcoff_find_tc0): Likewise.
2346 2017-07-11 Alan Modra <amodra@gmail.com>
2348 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo.
2350 2017-07-11 Alan Modra <amodra@gmail.com>
2352 * elf32-ppc.c (ppc_elf_relocate_section): Emit "unexpected
2353 instruction" error using _bfd_error_handler, not einfo.
2355 2017-07-10 Nick Clifton <nickc@redhat.com>
2357 * coffcode.h (coff_slurp_symbol_table): Do not include an entry
2358 for C_AIX_WEAKEXT if it has the same value as C_WEAKEXT.
2360 2017-07-07 John Baldwin <jhb@FreeBSD.org>
2362 * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PTLWPINFO.
2364 2017-07-07 Alan Modra <amodra@gmail.com>
2366 * coffcode.h (coff_slurp_symbol_table): Handle C_AIX_WEAKEXT.
2368 2017-07-07 Alan Modra <amodra@gmail.com>
2370 * bfd.c (_doprnt): Replace "L" with "ll" when printing bfd_vma
2371 as long long. Move code replacing "ll" with "I64", and simplify.
2373 2017-07-06 H.J. Lu <hongjiu.lu@intel.com>
2375 * bfd.c (_doprnt): Convert 'L' to 'l' when setting wide_width
2378 2017-07-05 H.J. Lu <hongjiu.lu@intel.com>
2380 * dwarf2.c (line_info_add_include_dir_stub): Replace time with
2382 (line_info_add_file_name): Likewise.
2383 (decode_line_info): Likewise.
2385 2017-07-04 Tristan Gingold <gingold@adacore.com>
2387 * version.m4: Bump version to 2.29.51
2388 * configure: Regenerate.
2390 2017-07-04 Jiong Wang <jiong.wang@arm.com>
2392 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Remove the
2393 sanity check at the head of this function.
2395 2017-07-04 Jan Kratochvil <jan.kratochvil@redhat.com>
2397 * dwarf2.c (struct dwarf2_debug): Add fields dwarf_line_str_buffer and
2398 dwarf_line_str_size.
2399 (struct attr_abbrev): Add field implicit_const.
2400 (dwarf_debug_sections): Add .debug_line_str.
2401 (enum dwarf_debug_section_enum): Add debug_line_str and debug_max.
2402 (dwarf_debug_section_assert): Add static assertion.
2403 (read_indirect_line_string): New.
2404 (read_abbrevs): Support DW_FORM_implicit_const.
2405 (is_str_attr): Support DW_FORM_line_strp.
2406 (read_attribute_value): Support DW_FORM_line_strp and
2407 DW_FORM_implicit_const.
2408 (read_attribute): Support DW_FORM_implicit_const.
2409 (line_info_add_include_dir, line_info_add_include_dir_stub):
2410 (line_info_add_file_name, read_formatted_entries): New.
2411 (decode_line_info, parse_comp_unit): Support DWARF 5.
2412 (_bfd_dwarf2_cleanup_debug_info): Free dwarf_line_str_buffer.
2414 2017-07-03 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
2416 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove the
2417 abort statement that was put for symbols that are not dynamic.
2419 2017-07-03 Tristan Gingold <gingold@adacore.com>
2421 * po/bfd.pot: Regenerate
2423 2017-07-03 Alan Modra <amodra@gmail.com>
2425 * bfd.c (_doprnt): Rewrite "ll" and "L" modifiers to "I64" for
2426 __MSVCRT__. Support "L" modifier for bfd_vma. Formatting.
2427 * elf.c (setup_group): Use "Lx" to print sh_size.
2428 (_bfd_elf_setup_sections): Remove unnecessary cast and print
2429 unknown section type in hex.
2430 (copy_special_section_fields): Style fix.
2431 (bfd_section_from_shdr): Correct format for sh_link. Use a
2432 common error message for all the variants of unrecognized
2434 (assign_file_positions_for_load_sections): Use "Lx" for lma
2435 adjust error message.
2436 (assign_file_positions_for_non_load_sections): Formatting.
2437 (rewrite_elf_program_header): Formatting. Use "Lx" for
2438 bfd_vma values in error messages.
2439 * elfcode.h (elf_slurp_reloc_table_from_section): Cast
2440 ELF_R_SYM value to type expected by format.
2441 * elflink.c (elf_link_read_relocs_from_section): Use "Lx"
2443 (elf_link_add_object_symbols): Use "Lu" for symbol sizes.
2444 (elf_link_input_bfd): Use "Lx" for r_info.
2445 (bfd_elf_gc_record_vtinherit): Use "Lx" for offset.
2447 2017-07-03 Alan Modra <amodra@gmail.com>
2449 * bfd.c (bfd_scan_vma): Don't use long long unless HAVE_LONG_LONG.
2450 * coff-rs6000.c (FMT20): Handle hosts with 64-bit long and
2451 Microsoft C library variant of long long format specifier.
2452 (PRINT20): Cast value to bfd_uint64_t not long long.
2453 * coffcode.h (coff_print_aux): Use BFD_VMA_FMT.
2454 * coff-x86_64.c (coff_amd64_reloc): Use bfd_uint64_t rather than
2455 long long. Don't cast to bfd_vma.
2456 * elf32-score.c (score3_bfd_getl48): Likewise.
2457 * vms-alpha.c (_bfd_vms_slurp_eisd): Likewise.
2459 2017-07-03 Alan Modra <amodra@gmail.com>
2461 * elf.c (_bfd_elf_print_private_bfd_data): Use BFD_VMA_FMT to
2463 (bfd_elf_print_symbol): Don't cast symbol->flags.
2464 (_bfd_elf_symbol_from_bfd_symbol): Likewise.
2465 * elf32-ppc.c (ppc_elf_begin_write_processing): Correct
2466 _bfd_error_handler argument order.
2467 (ppc_elf_merge_private_bfd_data): Don't cast flags.
2469 2017-07-03 Alan Modra <amodra@gmail.com>
2471 * configure.ac: Invoke AC_CHECK_TYPES for long long. Invoke
2472 AC_TYPE_LONG_DOUBLE.
2473 * configure: Regenerate.
2474 * config.in: Regenerate.
2476 2017-06-29 Andrew Waterman <andrew@sifive.com>
2478 * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Fix TLS copy
2481 2017-06-29 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
2483 * elfxx-sparc.c (allocate_dynrelocs): Don't make a symbol dynamic
2484 unless it is undefined weak.
2485 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Set the flag
2486 relative_reloc to direct non-dynamic symbols to R_SPARC_RELATIVE
2488 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): If symbol
2489 is not dynamic in PIC, abort.
2491 2017-06-29 Jiong Wang <jiong.wang@arm.com>
2494 * elfnn-aarch64.c (elfNN_aarch64_allocate_dynrelocs): Only make
2495 undefined weak symbols into dynamic.
2496 (elfNN_aarch64_final_link_relocate): Generate runtime RELATIVE
2497 relocation for non-dynamic symbols.
2498 (elfNN_aarch64_finish_dynamic_symbol): Add sanity check.
2500 2017-06-29 Jiong Wang <jiong.wang@arm.com>
2502 * elfnn-aarch64.c (aarch64_relocation_aginst_gp_p): New function.
2503 (elfNN_aarch64_final_link_relocate): Delete duplicated code for
2504 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15, BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
2505 BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
2506 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Optimize the
2509 2017-06-29 Andreas Arnez <arnez@linux.vnet.ibm.com>
2511 * elf-bfd.h (elfcore_write_s390_gs_cb): Add prototype.
2512 (elfcore_write_s390_gs_bc): Likewise.
2513 * elf.c (elfcore_grok_s390_gs_cb): New function.
2514 (elfcore_grok_s390_gs_bc): New function.
2515 (elfcore_grok_note): Call them.
2516 (elfcore_write_s390_gs_cb): New function.
2517 (elfcore_write_s390_gs_bc): New function.
2518 (elfcore_write_register_note): Call them.
2520 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
2522 * libbfd.c (_bfd_generic_get_section_contents): Don't call
2523 bfd_get_file_size. Check archive element size.
2524 (_bfd_generic_get_section_contents_in_window): Likewise.
2526 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
2528 * bfd-in2.h: Regenerated.
2529 * bfdio.c (bfd_get_size): Change return type to ufile_ptr.
2530 (bfd_get_file_size): Likewise.
2532 2017-06-28 Maciej W. Rozycki <macro@imgtec.com>
2533 Matthew Fortune <matthew.fortune@imgtec.com>
2535 * archures.c (bfd_mach_mips_interaptiv_mr2): New macro.
2536 * cpu-mips.c (I_interaptiv_mr2): New enum value.
2537 (arch_info_struct): Add "mips:interaptiv-mr2" entry.
2538 * elfxx-mips.c (_bfd_elf_mips_mach) <E_MIPS_MACH_IAMR2>: New
2540 (mips_set_isa_flags) <bfd_mach_mips_interaptiv_mr2>: Likewise.
2541 (bfd_mips_isa_ext) <bfd_mach_mips_interaptiv_mr2>: Likewise.
2542 (print_mips_isa_ext) <AFL_EXT_INTERAPTIV_MR2>: Likewise.
2543 (mips_mach_extensions): Add `bfd_mach_mipsisa32r3' and
2544 `bfd_mach_mips_interaptiv_mr2' entries.
2545 * bfd-in2.h: Regenerate.
2547 2017-06-27 Nick Clifton <nickc@redhat.com>
2549 * tekhex.c (pass_over): Revert accidental conversion of a local
2550 array to a static array.
2552 2017-06-27 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
2555 * elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Adjust
2556 reloc addend if necessary. Adjust diff only if
2557 shrinked_insn_address < end_address.
2559 2017-06-27 Alan Modra <amodra@gmail.com>
2562 * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
2563 (_bfd_generic_get_section_contents_in_window): Likewise.
2565 2017-06-26 Kuan-Lin Chen <rufus@andestech.com>
2567 * elfnn-riscv.c (perform_relocation): Support the new
2568 R_RISCV_32_PCREL relocation.
2569 (riscv_elf_relocate_section): Likewise.
2570 * elfxx-riscv.c (howto_table): Likewise.
2571 (riscv_reloc_map): Likewise.
2572 * bfd-in2.h (BFD_RELOC_RISCV_32_PCREL): New relocation.
2573 * libbfd.h: Regenerate.
2575 2017-06-27 Alan Modra <amodra@gmail.com>
2578 * libbfd.c (_bfd_generic_get_section_contents): Delete abort.
2579 Use unsigned file pointer type, and remove cast.
2580 * libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise.
2581 Add "count", not "sz".
2583 2017-06-26 Pedro Alves <palves@redhat.com>
2586 * libbfd.c (_bfd_generic_get_section_contents): Add "count", not
2589 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
2592 * libbfd.c (_bfd_generic_get_section_contents_in_window): Add
2595 2017-06-26 Maciej W. Rozycki <macro@imgtec.com>
2597 * cpu-mips.c (arch_info_struct): Mark the 4010 32-bit.
2598 * elfxx-mips.c (mips_set_isa_flags) <bfd_mach_mips4010>: Set
2599 E_MIPS_ARCH_2 rather than E_MIPS_ARCH_3 in `e_flags'.
2600 (mips_mach_extensions): Mark `bfd_mach_mips4010' as extending
2601 `bfd_mach_mips6000' rather than `bfd_mach_mips4000'.
2603 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
2606 * compress.c (bfd_get_full_section_contents): Don't check the
2608 * libbfd.c (_bfd_generic_get_section_contents): Check for and
2609 reject a section whose size + offset is greater than the size
2611 (_bfd_generic_get_section_contents_in_window): Likewise.
2613 2017-06-26 Nick Clifton <nickc@redhat.com>
2616 * tekhex.c (getvalue): Check for the source pointer exceeding the
2617 end pointer before the first byte is read.
2619 2017-06-26 Nick Clifton <nickc@redhat.com>
2622 * opncls.c (get_build_id): Check that the section is big enough
2623 to contain the whole note.
2624 * compress.c (bfd_get_full_section_contents): Check for and reject
2625 a section whose size is greater than the size of the entire file.
2626 * elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not
2627 contain a notes section.
2629 2017-06-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2631 * elf64-s390.c (elf_s390_additional_program_headers): Add NULL
2633 (elf_s390_modify_segment_map): Likewise.
2634 (bfd_elf_s390_set_options): Lisewise.
2636 2017-06-26 Alan Modra <amodra@gmail.com>
2638 * elflink.c (_bfd_elf_link_create_dynstrtab): Don't make dynobj
2640 (_bfd_elf_size_group_sections): Skip --just-syms bfds.
2641 (bfd_elf_size_dynamic_sections): Ignore .note.GNU-stack and
2642 .preinit_array on --just-syms bfds.
2643 (_bfd_elf_gc_mark_extra_sections): Skip --just-syms bfds.
2644 (elf_gc_sweep, bfd_elf_parse_eh_frame_entries): Likewise.
2645 (bfd_elf_gc_sections, bfd_elf_discard_info): Likewise.
2647 2017-06-25 Sergei Trofimovich <slyfox@gentoo.org>
2649 * elf.c (find_link): Bounds check "hint".
2651 2017-06-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
2653 * elf32-arm.c (using_thumb_only): Update list of architectures in
2654 BFD_ASSERT for which the logic is valid.
2655 (using_thumb2_bl): Likewise.
2656 (using_thumb2): Likewise and return true for ARMv8-R.
2657 (arch_has_arm_nop): Likewise.
2658 (tag_cpu_arch_combine): New v8r table for ARMv8-R Tag_CPU_arch
2659 merging logic. Update commentis for value 15 of v8m_baseline,
2660 v8m_mainline and v4t_plus_v6_m arrays. Use v8r array to decide
2661 merging of value 15 of Tag_CPU_arch.
2663 2017-06-23 Jiong Wang <jiong.wang@arm.com>
2665 * reloc.c (BFD_RELOC_AARCH64_ADR_GOTPAGE): Rename to
2666 BFD_RELOC_AARCH64_ADR_GOT_PAGE
2667 * bfd-in2.h: Regenerate.
2669 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2671 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Move
2672 the error_alignment label forward. Properly align program
2673 property note section.
2675 2017-06-22 Eric Christopher <echristo@gmail.com>
2677 * elf32-arm.c (elf32_arm_final_link_relocate): Use labs rather than
2678 abs to fix a truncation warning.
2680 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2682 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Resolve
2683 local undefined weak symbol to 0.
2684 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Likewise.
2686 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2688 * elf32-i386.c (elf_i386_merge_gnu_properties): If info->shstk
2689 is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
2690 (elf_i386_link_setup_gnu_properties): If info->shstk is set,
2691 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
2692 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): If
2693 info->shstk is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
2694 (elf_x86_64_link_setup_gnu_properties): If info->shstk is set,
2695 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
2697 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
2699 * elf32-i386.c (elf_i386_lazy_ibt_plt0_entry): New.
2700 (elf_i386_lazy_ibt_plt_entry): Likewise.
2701 (elf_i386_pic_lazy_ibt_plt0_entry): Likewise.
2702 (elf_i386_non_lazy_ibt_plt_entry): Likewise.
2703 (elf_i386_pic_non_lazy_ibt_plt_entry): Likewise.
2704 (elf_i386_eh_frame_lazy_ibt_plt): Likewise.
2705 (elf_i386_lazy_plt_layout): Likewise.
2706 (elf_i386_non_lazy_plt_layout): Likewise.
2707 (elf_i386_link_hash_entry): Add plt_second.
2708 (elf_i386_link_hash_table): Add plt_second and
2709 plt_second_eh_frame.
2710 (elf_i386_allocate_dynrelocs): Use the second PLT if needed.
2711 (elf_i386_size_dynamic_sections): Use .plt.got unwind info for
2712 the second PLT. Check the second PLT.
2713 (elf_i386_relocate_section): Use the second PLT to resolve
2714 PLT reference if needed.
2715 (elf_i386_finish_dynamic_symbol): Fill and use the second PLT if
2717 (elf_i386_finish_dynamic_sections): Set sh_entsize on the
2718 second PLT. Generate unwind info for the second PLT.
2719 (elf_i386_plt_type): Add plt_second.
2720 (elf_i386_get_synthetic_symtab): Support the second PLT.
2721 (elf_i386_parse_gnu_properties): Support
2722 GNU_PROPERTY_X86_FEATURE_1_AND.
2723 (elf_i386_merge_gnu_properties): Support
2724 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
2725 on GNU_PROPERTY_X86_FEATURE_1_IBT
2726 (elf_i386_link_setup_gnu_properties): If info->ibt is set,
2727 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
2728 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
2729 is set on all relocatable inputs.
2730 * elf64-x86-64.c (elf_x86_64_lazy_ibt_plt_entry): New.
2731 (elf_x32_lazy_ibt_plt_entry): Likewise.
2732 (elf_x86_64_non_lazy_ibt_plt_entry): Likewise.
2733 (elf_x32_non_lazy_ibt_plt_entry): Likewise.
2734 (elf_x86_64_eh_frame_lazy_ibt_plt): Likewise.
2735 (elf_x32_eh_frame_lazy_ibt_plt): Likewise.
2736 (elf_x86_64_lazy_ibt_plt): Likewise.
2737 (elf_x32_lazy_ibt_plt): Likewise.
2738 (elf_x86_64_non_lazy_ibt_plt): Likewise.
2739 (elf_x32_non_lazy_ibt_plt): Likewise.
2740 (elf_x86_64_get_synthetic_symtab): Support the second PLT.
2741 (elf_x86_64_parse_gnu_properties): Support
2742 GNU_PROPERTY_X86_FEATURE_1_AND.
2743 (elf_x86_64_merge_gnu_properties): Support
2744 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
2745 on GNU_PROPERTY_X86_FEATURE_1_IBT
2746 (elf_x86_64_link_setup_gnu_properties): If info->ibt is set,
2747 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
2748 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
2749 is set on all relocatable inputs.
2751 2017-06-22 Nick Clifton <nickc@redhat.com>
2754 * som.c (setup_sections): NUL terminate the space_strings buffer.
2755 Check that the space.name field does not index beyond the end of
2756 the space_strings buffer.
2758 2017-06-21 Nick Clifton <nickc@redhat.com>
2761 * coff-sh.c (sh_reloc): Check for an out of range reloc.
2763 2017-06-21 Nick Clifton <nickc@redhat.com>
2766 * vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as
2767 type of the size parameter.
2768 (_bfd_vms_save_counted_string): Add second parameter - the maximum
2769 length of the counted string.
2770 * vms.h (_bfd_vms_save_sized_string): Update prototype.
2771 (_bfd_vms_save_counted_string): Likewise.
2772 * vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to
2773 _bfd_vms_save_counted_string.
2774 (_bfd_vms_slurp_ehdr): Likewise.
2775 (_bfd_vms_slurp_egsd): Likewise.
2776 (Parse_module): Likewise.
2778 2017-06-21 Alan Modra <amodra@gmail.com>
2780 * elf64-ppc.c (ppc64_elf_size_stubs): Test for localentry:0 plt
2781 calls before tocsave calls.
2782 (ppc64_elf_relocate_section): Allow localentry:0 plt calls without
2785 2017-06-21 Nick Clifton <nickc@redhat.com>
2788 * reloc.c (bfd_generic_get_relocated_section_contents): Fail if
2789 bfd_get_full_section_contents returns no contents.
2791 2017-06-21 Nick Clifton <nickc@redhat.com>
2794 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized
2797 2017-06-21 Nick Clifton <nickc@redhat.com>
2800 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section
2802 (image_set_ptr): Likewise.
2803 (alpha_vms_fix_sec_rel): Likewise.
2804 (alpha_vms_slurp_relocs): Likewise.
2806 2017-06-21 Nick Clifton <nickc@redhat.com>
2809 * ieee.c (ieee_slurp_sections): Check for a NULL return from
2811 (ieee_archive_p): Likewise.
2812 (ieee_object_p): Likewise.
2814 2017-06-21 Nick Clifton <nickc@redhat.com>
2817 * elf.c (setup_group): Zero the group section pointer list after
2818 allocation so that loops can be caught. Check for NULL pointers
2819 when processing a group list.
2821 2017-06-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2823 * elf-s390.h: New file.
2824 * elf64-s390.c (struct elf_s390_link_hash_table): Add params
2826 (elf_s390_additional_program_headers): New function.
2827 (elf_s390_modify_segment_map): New function.
2828 (bfd_elf_s390_set_options): New function.
2829 (elf_backend_additional_program_headers)
2830 (elf_backend_modify_segment_map): Add macro definitions.
2832 2017-06-19 H.J. Lu <hongjiu.lu@intel.com>
2835 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
2836 the DYNAMIC bit instead of bfd_count_sections.
2838 2017-06-19 Nick Clifton <nickc@redhat.com>
2841 * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record
2843 (evax_bfd_print_eeom): Likewise.
2844 (evax_bfd_print_egsd): Check for an overlarge record length.
2845 (evax_bfd_print_etir): Likewise.
2847 2017-06-19 Nick Clifton <nickc@redhat.com>
2850 * libieee.h (struct common_header_type): Add end_p field.
2851 * ieee.c (this_byte_and_next): Do not advance input_p beyond
2853 (read_id): Check for a length that exceeds the remaining bytes in
2855 (ieee_seek): Initialise end_p.
2856 (ieee_archive_p): Likewise.
2857 (ieee_object_p): Likewise.
2859 2017-06-19 Nick Clifton <nickc@redhat.com>
2862 * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset
2863 before reading the EIHS structure entries.
2865 2017-06-19 Nick Clifton <nickc@redhat.com>
2868 * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for
2869 gsd_size. Check that there are enough bytes remaining to read the
2870 type and size of the next egsd. Check that the size of the egsd
2871 does not exceed the size of the record.
2873 2017-06-19 Alan Modra <amodra@gmail.com>
2875 * config.bfd: Correct targ_underscore for cris.
2877 2017-06-18 Alan Modra <amodra@gmail.com>
2879 * config.bfd: Correct targ_underscore for epiphany, ip2k,
2880 m32c, mn10200, pru, rl78, rx, crisv32 and v850.
2882 2017-06-16 Nick Clifton <nickc@redhat.com>
2884 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
2885 bucketlist is empty because there are no symbols to add to the
2888 2017-06-16 Alan Modra <amodra@gmail.com>
2894 * targets.c (struct bfd_target): Add _bfd_define_start_stop.
2895 (BFD_JUMP_TABLE_LINK): Likewise.
2896 * elf-bfd.h (bfd_elf_define_start_stop): Declare.
2897 * elflink.c (_bfd_elf_gc_mark_rsec): Update comment.
2898 (bfd_elf_define_start_stop): New function.
2899 * linker.c (bfd_generic_define_start_stop): New function.
2900 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init
2902 * aout-adobe.c (aout_32_bfd_define_start_stop): Define.
2903 * aout-target.h (MY_bfd_define_start_stop): Define.
2904 * aout-tic30.c (MY_bfd_define_start_stop): Define.
2905 * binary.c (binary_bfd_define_start_stop): Define.
2906 * bout.c (b_out_bfd_define_start_stop): Define.
2907 * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define.
2908 * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define.
2909 * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define.
2910 * coffcode.h (coff_bfd_define_start_stop): Define.
2911 * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define.
2912 * i386msdos.c (msdos_bfd_define_start_stop): Define.
2913 * i386os9k.c (os9k_bfd_define_start_stop): Define.
2914 * ieee.c (ieee_bfd_define_start_stop): Define.
2915 * ihex.c (ihex_bfd_define_start_stop): Define.
2916 * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define.
2917 * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define.
2918 * mmo.c (mmo_bfd_define_start_stop): Define.
2919 * nlm-target.h (nlm_bfd_define_start_stop): Define.
2920 * oasys.c (oasys_bfd_define_start_stop): Define.
2921 * pef.c (bfd_pef_bfd_define_start_stop): Define.
2922 * plugin.c (bfd_plugin_bfd_define_start_stop): Define.
2923 * ppcboot.c (ppcboot_bfd_define_start_stop): Define.
2924 * som.c (som_bfd_define_start_stop): Define.
2925 * srec.c (srec_bfd_define_start_stop): Define.
2926 * tekhex.c (tekhex_bfd_define_start_stop): Define.
2927 * versados.c (versados_bfd_define_start_stop): Define.
2928 * vms-alpha.c (vms_bfd_define_start_stop): Define.
2929 (alpha_vms_bfd_define_start_stop): Define.
2930 * xsym.c (bfd_sym_bfd_define_start_stop): Define.
2931 * bfd-in2.h: Regenerate.
2932 * libbfd.h: Regenerate.
2934 2017-06-16 Jiong Wang <jiong.wang@arm.com>
2936 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
2937 SYMBOL_REFERENCES_LOCAL.
2939 2017-06-15 Jiong Wang <jiong.wang@arm.com>
2942 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
2943 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
2944 runtime for if there needs copy relocation elimination.
2945 (need_copy_relocation_p): New function. Return true for symbol with
2946 pc-relative references and if it's against read-only sections.
2947 (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
2948 (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
2949 that are related with accessing external objects.
2950 (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change
2951 in elfNN_aarch64_check_relocs.
2953 2017-06-15 Nick Clifton <nickc@redhat.com>
2956 * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
2959 (ieee_archive_p): Likewise.
2961 2017-06-15 Nick Clifton <nickc@redhat.com>
2964 * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
2966 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
2968 * elf32-xtensa.c (elf_xtensa_be_plt_entry,
2969 elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays,
2970 keep both windowed and call0 ABI PLT definitions.
2971 (elf_xtensa_create_plt_entry): Use selected ABI to choose upper
2972 elf_xtensa_*_plt_entry endex.
2973 (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size.
2975 2017-06-14 Nick Clifton <nickc@redhat.com>
2978 * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
2981 2017-06-14 Nick Clifton <nickc@redhat.com>
2984 * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
2985 maximum value for the ascic pointer. Check that name processing
2986 does not read beyond this value.
2987 (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
2990 2017-06-14 Nick Clifton <nickc@redhat.com>
2993 * versados.c (versados_mkobject): Zero the allocated tdata structure.
2994 (process_otr): Check for an invalid offset in the otr structure.
2996 2017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
2998 * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
3000 2017-06-13 H.J. Lu <hongjiu.lu@intel.com>
3006 * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
3007 vtable field to a union.
3008 (_bfd_elf_is_start_stop): Removed.
3009 * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
3010 __start_SECNAME and __stop_SECNAME symbols.
3011 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
3012 * elflink.c (_bfd_elf_is_start_stop): Removed.
3013 (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
3014 _bfd_elf_is_start_stop.
3015 (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
3016 __stop_SECNAME symbols. Updated.
3017 (elf_gc_smash_unused_vtentry_relocs): Likewise.
3018 (bfd_elf_gc_record_vtinherit): Likewise.
3019 (bfd_elf_gc_record_vtentry): Likewise.
3021 2017-06-13 Nick Clifton <nickc@redhat.com>
3024 * elflink.c (elf_link_adjust_relocs): Generate an error when
3025 encountering a reloc against a symbol removed by garbage
3028 2017-06-12 H.J. Lu <hongjiu.lu@intel.com>
3030 * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
3031 to merge_gnu_properties.
3032 * elf-properties.c (elf_merge_gnu_properties): Add struct
3033 bfd_link_info * and pass it to merge_gnu_properties.
3034 (elf_merge_gnu_property_list): Add struct bfd_link_info *
3035 and pass it to elf_merge_gnu_properties.
3036 (_bfd_elf_link_setup_gnu_properties): Pass info to
3037 elf_merge_gnu_property_list.
3038 * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
3040 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
3042 2017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
3045 * binary.c (binary_set_section_contents): Scale lma by octets
3046 per byte to set filepos.
3048 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3050 * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
3053 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3055 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
3058 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3060 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
3061 patched section contents for TLS IE reloc.
3062 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
3064 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3066 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
3067 RELOC_FOR_GLOBAL_SYMBOL macro.
3069 2018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3071 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
3074 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3076 * config/tc-arc.c (md_undefined_symbol): Changed.
3077 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
3079 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3081 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
3084 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3086 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
3087 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
3089 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3091 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
3094 2017-06-08 Richard Earnshaw <rearnsha@arm.com>
3096 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
3097 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
3098 is non-zero. Add clarifying comments.
3100 2017-06-08 H.J. Lu <hongjiu.lu@intel.com>
3102 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
3103 name. Use local IFUNC symbol name string to report unsupported
3104 non-PIC call to IFUNC function.
3105 (elf_i386_relocate_section): Dump local IFUNC name with minfo
3106 when generating R_386_IRELATIVE relocation.
3107 (elf_i386_finish_dynamic_symbol): Likewise.
3108 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
3110 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
3111 when generating R_X86_64_IRELATIVE relocation.
3112 (elf_x86_64_finish_dynamic_symbol): Likewise.
3114 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
3116 * elf.c (setup_group): Make sure BFD sections are created for all
3117 group sections in the input file when processing SHF_GROUP
3119 (bfd_section_from_shdr): Avoid duplicating logic already
3120 implemented in `setup_group'.
3122 2017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
3125 * peXXigen.c (pe_print_idata): Use the address of the first thunk
3126 if the hint address is zero.
3128 2017-06-06 James Clarke <jrtc27@jrtc27.com>
3131 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
3132 ELF_COMMON_DEF_P for common symbols.
3134 2017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
3136 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
3137 SEC_GROUP sections as SEC_EXCLUDE.
3138 (bfd_elf_set_group_contents): Replace use of abort with an assert.
3139 (assign_section_numbers): Use resolve_section_groups flag instead
3140 of relocatable link type.
3141 (_bfd_elf_init_private_section_data): Use resolve_section_groups
3142 flag instead of checking the final_link flag for part of the
3143 checks in here. Fix white space as a result.
3144 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
3145 instead of relocatable link type.
3146 (bfd_elf_final_link): Likewise.
3148 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
3150 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
3152 * elf32-score.c (score_elf_final_link_relocate): Likewise.
3153 (s3_bfd_score_elf_check_relocs): Likewise.
3154 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
3155 (score_elf_final_link_relocate): Likewise.
3156 (s7_bfd_score_elf_check_relocs): Likewise.
3158 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
3160 * elflink.c (init_reloc_cookie_rels): Remove unused variable
3163 2017-06-06 Maciej W. Rozycki <macro@imgtec.com>
3165 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
3166 from `reloc_count' rather than decrementing it.
3167 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
3168 `reloc_count' by `int_rels_per_ext_rel'.
3169 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
3170 `reloc_count' by `int_rels_per_ext_rel' for last relocation
3171 entry determination.
3172 (s3_bfd_score_elf_check_relocs): Likewise.
3173 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
3174 (s7_bfd_score_elf_relocate_section): Likewise.
3175 (s7_bfd_score_elf_check_relocs): Likewise.
3176 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
3177 prototype and function.
3178 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
3179 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
3180 triple rather than once the sum of REL and RELA relocation entry
3182 (bfd_elf64_get_reloc_upper_bound): Remove macro.
3183 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
3184 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
3185 storage allocation size determination.
3186 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
3187 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
3188 by `int_rels_per_ext_rel' for last relocation entry
3190 (bfd_elf_final_link): Do not multiply `reloc_count' by
3191 `int_rels_per_ext_rel' for internal relocation storage
3192 allocation size determination.
3193 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
3194 `int_rels_per_ext_rel' for last relocation entry determination.
3195 (elf_gc_smash_unused_vtentry_relocs): Likewise.
3196 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
3197 (_bfd_mips_elf_relocate_section): Likewise.
3199 2017-06-05 Alan Modra <amodra@gmail.com>
3202 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
3204 2017-06-01 John Baldwin <jhb@FreeBSD.org>
3206 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
3207 determine structure sizes.
3208 (elfcore_grok_freebsd_prstatus): Likewise.
3210 2017-06-01 Alan Modra <amodra@gmail.com>
3212 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
3213 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
3215 (is_elfv2_localentry0): New function.
3216 (ppc64_elf_tls_setup): Default params->plt_localentry0.
3217 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
3218 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
3219 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
3220 optimized localentry:0 stubs.
3221 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
3222 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
3224 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
3226 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
3228 2017-05-30 Casey Smith <clegg89@gmail.com>
3231 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
3232 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
3234 2017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
3236 * cpu-arc.c (arc_compatible): New function.
3238 2017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
3240 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
3242 2017-05-30 H.J. Lu <hongjiu.lu@intel.com>
3245 * bfdio.c (bfd_get_file_size): New function.
3246 * bfd-in2.h: Regenerated.
3248 2017-05-23 Dilian Palauzov <git-dpa@aegee.org>
3250 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
3253 2017-05-22 H.J. Lu <hongjiu.lu@intel.com>
3255 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
3256 dynobj instead of htab->elf.dynobj.
3258 2017-05-19 Maciej W. Rozycki <macro@imgtec.com>
3260 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
3262 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
3263 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
3264 actual number of internal relocations retrieved. Adjust
3265 function description.
3266 (bfd_elf64_canonicalize_reloc): Remove macro.
3267 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
3269 2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
3271 * archures.c (bfd_mach_sparc_v9m8): Define.
3272 (bfd_mach_sparc_v8plusm8): Likewise.
3273 (bfd_mach_sparc_v9_p): Adjust to M8.
3274 (bfd_mach_sparc_64bit_p): Likewise.
3275 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
3276 bfd_mach_sparc_v8plusm8.
3277 * bfd-in2.h: Regenerated.
3278 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
3280 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
3281 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
3282 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
3284 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
3285 bfd_mach_sparc_v8plusm8.
3287 2017-05-19 Alan Modra <amodra@gmail.com>
3289 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
3290 debug and special sections when no non-note alloc sections in an
3293 2017-05-18 Alan Modra <amodra@gmail.com>
3295 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
3296 * elf-m10300.c: Likewise.
3298 * elf32-arc.c: Likewise.
3299 * elf32-bfin.c: Likewise.
3300 * elf32-m68k.c: Likewise.
3301 * elf32-nds32.c: Likewise.
3302 * elf32-tilepro.c: Likewise.
3303 * elflink.c: Likewise.
3304 * elfnn-aarch64.c: Likewise.
3305 * elfnn-riscv.c: Likewise.
3306 * elfxx-tilegx.c: Likewise.
3307 * mach-o.c: Likewise.
3308 * peXXigen.c: Likewise.
3309 * vms-alpha.c: Likewise.
3310 * vms-lib.c: Likewise.
3312 2017-05-17 H.J. Lu <hongjiu.lu@intel.com>
3315 * elflink.c (elf_gc_mark_debug_section): New function.
3316 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
3317 referenced by kept debug sections.
3319 2017-05-16 Alan Modra <amodra@gmail.com>
3321 * elf-m10300.c: Rename occurrences of non_ir_ref.
3322 * elf32-arm.c: Likewise.
3323 * elf32-bfin.c: Likewise.
3324 * elf32-cr16.c: Likewise.
3325 * elf32-cris.c: Likewise.
3326 * elf32-d10v.c: Likewise.
3327 * elf32-dlx.c: Likewise.
3328 * elf32-fr30.c: Likewise.
3329 * elf32-frv.c: Likewise.
3330 * elf32-hppa.c: Likewise.
3331 * elf32-i370.c: Likewise.
3332 * elf32-i386.c: Likewise.
3333 * elf32-iq2000.c: Likewise.
3334 * elf32-lm32.c: Likewise.
3335 * elf32-m32c.c: Likewise.
3336 * elf32-m32r.c: Likewise.
3337 * elf32-m68hc1x.c: Likewise.
3338 * elf32-m68k.c: Likewise.
3339 * elf32-mcore.c: Likewise.
3340 * elf32-metag.c: Likewise.
3341 * elf32-microblaze.c: Likewise.
3342 * elf32-moxie.c: Likewise.
3343 * elf32-msp430.c: Likewise.
3344 * elf32-mt.c: Likewise.
3345 * elf32-nios2.c: Likewise.
3346 * elf32-or1k.c: Likewise.
3347 * elf32-ppc.c: Likewise.
3348 * elf32-rl78.c: Likewise.
3349 * elf32-s390.c: Likewise.
3350 * elf32-score.c: Likewise.
3351 * elf32-score7.c: Likewise.
3352 * elf32-sh.c: Likewise.
3353 * elf32-tic6x.c: Likewise.
3354 * elf32-tilepro.c: Likewise.
3355 * elf32-v850.c: Likewise.
3356 * elf32-vax.c: Likewise.
3357 * elf32-xstormy16.c: Likewise.
3358 * elf32-xtensa.c: Likewise.
3359 * elf64-alpha.c: Likewise.
3360 * elf64-hppa.c: Likewise.
3361 * elf64-ia64-vms.c: Likewise.
3362 * elf64-mmix.c: Likewise.
3363 * elf64-ppc.c: Likewise.
3364 * elf64-s390.c: Likewise.
3365 * elf64-sh64.c: Likewise.
3366 * elf64-x86-64.c: Likewise.
3367 * elflink.c: Likewise.
3368 * elfnn-aarch64.c: Likewise.
3369 * elfnn-ia64.c: Likewise.
3370 * elfnn-riscv.c: Likewise.
3371 * elfxx-mips.c: Likewise.
3372 * elfxx-sparc.c: Likewise.
3373 * elfxx-tilegx.c: Likewise.
3374 * linker.c: Likewise.
3376 2017-05-16 Alan Modra <amodra@gmail.com>
3378 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
3379 * elflink.c (elf_link_add_object_symbols): Update to use
3381 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
3383 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
3385 2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
3387 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
3389 2017-05-12 H.J. Lu <hongjiu.lu@intel.com>
3391 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
3392 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
3394 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3396 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
3398 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
3400 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
3401 to plt_second/plt_second_eh_frame.
3402 (elf_x86_64_link_hash_newfunc): Updated.
3403 (elf_x86_64_allocate_dynrelocs): Likewise.
3404 (elf_x86_64_size_dynamic_sections): Likewise.
3405 (elf_x86_64_relocate_section): Likewise.
3406 (elf_x86_64_finish_dynamic_symbol): Likewise.
3407 (elf_x86_64_finish_dynamic_sections): Likewise.
3408 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
3409 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
3411 (elf_backend_setup_gnu_properties): Updated. Create the
3412 .plt.sec section instead of the .plt.sec section.
3414 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
3416 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
3417 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
3418 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
3420 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
3422 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
3423 (bfd_elf64_set_reloc): Define.
3424 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
3426 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
3428 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
3429 (struct bfd_target): New field _bfd_set_reloc.
3430 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
3431 * reloc.c (_bfd_generic_set_reloc): New function.
3432 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
3433 * nlm-target.h (nlm_set_reloc): Likewise.
3434 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
3435 * aout-tic30.c (MY_set_reloc): Likewise.
3436 * aout-target.h (MY_set_reloc): Likewise.
3437 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
3438 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
3439 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
3440 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
3441 * aout-adobe.c (aout_32_set_reloc): Likewise.
3442 * bout.c (b_out_set_reloc): Likewise.
3443 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
3444 * i386os9k.c (aout_32_set_reloc): Likewise.
3445 * ieee.c (ieee_set_reloc): Likewise.
3446 * oasys.c (oasys_set_reloc): Likewise.
3447 * som.c (som_set_reloc): Likewise.
3448 * versados.c (versados_set_reloc): Likewise.
3449 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
3450 _bfd_generic_set_reloc.
3451 (rs6000_xcoff64_aix_vec): LIkewise.
3452 * libbfd.c (_bfd_norelocs_set_reloc): New function.
3453 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
3454 * i386msdos.c (msdos_set_reloc): Define to
3455 _bfd_norelocs_set_reloc.
3456 * elfcode.h (elf_set_reloc): Define.
3457 * bfd-in2.h: Regenerated.
3459 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
3462 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
3463 for IFUNC function address.
3465 2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
3467 * elf32-arc.c (FEATURE_LIST_NAME): Define.
3468 (CONFLICT_LIST): Likewise.
3469 (opcode/arc-attrs.h): Include.
3470 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
3471 (arc_extract_features): New file.
3472 (arc_stralloc): Likewise.
3473 (arc_elf_merge_attributes): Likewise.
3474 (arc_elf_merge_private_bfd_data): Use object attributes.
3475 (bfd_arc_get_mach_from_attributes): New function.
3476 (arc_elf_object_p): Use object attributes.
3477 (arc_elf_final_write_processing): Likewise.
3478 (elf32_arc_obj_attrs_arg_type): New function.
3479 (elf32_arc_obj_attrs_handle_unknown): Likewise.
3480 (elf32_arc_section_from_shdr): Likewise.
3481 (elf_backend_obj_attrs_vendor): Define.
3482 (elf_backend_obj_attrs_section): Likewise.
3483 (elf_backend_obj_attrs_arg_type): Likewise.
3484 (elf_backend_obj_attrs_section_type): Likewise.
3485 (elf_backend_obj_attrs_handle_unknown): Likewise.
3486 (elf_backend_section_from_shdr): Likewise.
3488 2017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
3491 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
3492 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
3493 and the destination is a Thumb symbol.
3495 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
3497 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
3498 initializer to silence GCC 4.2.
3499 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
3501 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
3503 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
3504 (LAZY_PLT_ENTRY_SIZE): This.
3505 (NON_LAZY_PLT_ENTRY_SIZE): New.
3506 (elf_x86_64_plt0_entry): Renamed to ...
3507 (elf_x86_64_lazy_plt0_entry): This.
3508 (elf_x86_64_plt_entry): Renamed to ...
3509 (elf_x86_64_lazy_plt_entry): This.
3510 (elf_x86_64_bnd_plt0_entry): Renamed to ...
3511 (elf_x86_64_lazy_bnd_plt0_entry): This.
3512 (elf_x86_64_legacy_plt_entry): Removed.
3513 (elf_x86_64_bnd_plt_entry): Renamed to ...
3514 (elf_x86_64_lazy_bnd_plt_entry): This.
3515 (elf_x86_64_legacy_plt2_entry): Renamed to ...
3516 (elf_x86_64_non_lazy_plt_entry): This.
3517 (elf_x86_64_bnd_plt2_entry): Renamed to ...
3518 (elf_x86_64_non_lazy_bnd_plt_entry): This.
3519 (elf_x86_64_eh_frame_plt): Renamed to ...
3520 (elf_x86_64_eh_frame_lazy_plt): This.
3521 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
3522 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
3523 (elf_x86_64_eh_frame_plt_got): Renamed to ...
3524 (elf_x86_64_eh_frame_non_lazy_plt): This.
3525 (elf_x86_64_lazy_plt_layout): New.
3526 (elf_x86_64_non_lazy_plt_layout): Likewise.
3527 (elf_x86_64_plt_layout): Likewise.
3528 (elf_x86_64_backend_data): Remove PLT layout information. Add
3529 os for target system.
3530 (GET_PLT_ENTRY_SIZE): Removed.
3531 (elf_x86_64_lazy_plt): New.
3532 (elf_x86_64_non_lazy_plt): Likewise.
3533 (elf_x86_64_lazy_bnd_plt): Likewise.
3534 (elf_x86_64_non_lazy_bnd_plt): Likewise.
3535 (elf_x86-64_arch_bed): Updated.
3536 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
3537 (elf_x86_64_create_dynamic_sections): Removed.
3538 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
3539 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
3540 (elf_x86-64_adjust_dynamic_symbol): Updated.
3541 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
3542 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
3543 size for PLT0 if there is no PLT0. Get plt_entry_size from
3544 non_lazy_plt for non-lazy PLT entries.
3545 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
3546 from non_lazy_plt for non-lazy PLT entries.
3547 (elf_x86-64_relocate_section): Updated. Properly get PLT index
3548 if there is no PLT0.
3549 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
3550 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
3551 entries with non-lazy PLT layout. Don't fill the second and third
3552 slots in the PLT entry if there is no PLT0.
3553 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
3554 if there is no PLT0. Set sh_entsize on the .plt.got section.
3555 (compare_relocs): New.
3556 (elf_x86_64_plt_type): Likewise.
3557 (elf_x86_64_plt): Likewise.
3558 (elf_x86_64_nacl_plt): New. Forward declaration.
3559 (elf_x86_64_get_plt_sym_val): Removed.
3560 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
3561 against all dynamic relocations.
3562 (elf_x86_64_link_setup_gnu_properties): New function.
3563 (elf_backend_create_dynamic_sections): Updated.
3564 (elf_backend_setup_gnu_properties): New.
3565 (elf_x86_64_nacl_plt): New.
3566 (elf_x86_64_nacl_arch_bed): Updated.
3568 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
3570 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
3571 (LAZY_PLT_ENTRY_SIZE): This.
3572 (NON_LAZY_PLT_ENTRY_SIZE): New.
3573 (elf_i386_plt0_entry): Renamed to ...
3574 (elf_i386_lazy_plt0_entry): This.
3575 (elf_i386_plt_entry): Renamed to ...
3576 (elf_i386_lazy_plt_entry): This.
3577 (elf_i386_pic_plt0_entry): Renamed to ...
3578 (elf_i386_pic_lazy_plt0_entry): This.
3579 (elf_i386_pic_plt_entry): Renamed to ...
3580 (elf_i386_pic_lazy_plt_entry): This.
3581 (elf_i386_got_plt_entry): Renamed to ...
3582 (elf_i386_non_lazy_plt_entry): This.
3583 (elf_i386_pic_got_plt_entry): Renamed to ...
3584 (elf_i386_pic_non_lazy_plt_entry): This.
3585 (elf_i386_eh_frame_plt): Renamed to ...
3586 (elf_i386_eh_frame_lazy_plt): This.
3587 (elf_i386_eh_frame_plt_got): Renamed to ...
3588 (elf_i386_eh_frame_non_lazy_plt): This.
3589 (elf_i386_plt_layout): Renamed to ...
3590 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
3591 eh_frame_plt_got_size.
3592 (elf_i386_non_lazy_plt_layout): New.
3593 (elf_i386_plt_layout): Likewise.
3594 (elf_i386_non_lazy_plt): Likewise.
3595 (GET_PLT_ENTRY_SIZE): Removed.
3596 (elf_i386_plt): Renamed to ...
3597 (elf_i386_lazy_plt): This.
3598 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
3599 (elf_i386_arch_bed): Updated.
3600 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
3601 (elf_i386_create_dynamic_sections): Removed.
3602 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
3603 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
3604 (elf_i386_adjust_dynamic_symbol): Updated.
3605 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
3606 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
3607 size for PLT0 if there is no PLT0.
3608 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
3609 output section is discarded only if GOT isn't empty.
3610 (elf_i386_relocate_section): Updated. Properly get PLT index
3611 if there is no PLT0.
3612 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
3613 second and third slots in the PLT entry if there is no PLT0.
3614 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
3615 if there is no PLT0. Set sh_entsize on the .plt.got section.
3616 (elf_i386_nacl_plt): Forward declaration.
3617 (elf_i386_get_plt_sym_val): Removed.
3618 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
3619 against all dynamic relocations.
3620 (elf_i386_link_setup_gnu_properties): New function.
3621 (elf_backend_create_dynamic_sections): Updated.
3622 (elf_backend_setup_gnu_properties): New.
3623 (elf_i386_nacl_plt): Updated.
3624 (elf_i386_nacl_arch_bed): Likewise.
3625 (elf_i386_vxworks_arch_bed): Likewise.
3627 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
3629 * elflink.c (elf_output_implib): Remove executable flag from import
3631 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
3632 library is a relocatable object file.
3634 2017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
3637 * elf32-avr.c (avr_should_move_sym): New function.
3638 (avr_should_reduce_sym_size): Likewise.
3639 (avr_should_increase_sym_size): Likewise.
3640 (elf32_avr_relax_delete_bytes): Adjust symbol values
3641 and sizes by calling new functions.
3643 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
3645 * config.bfd (riscv32-*): Enable rv64.
3647 2017-05-02 Alan Modra <amodra@gmail.com>
3650 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
3651 rather than h->root.type == bfd_link_hash_new.
3652 (bfd_elf_record_link_assignment): Similarly, call
3653 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
3655 2017-04-29 Alan Modra <amodra@gmail.com>
3658 * reloc.c (reloc_offset_in_range): New function.
3659 (bfd_perform_relocation, bfd_install_relocation): Use it.
3660 (_bfd_final_link_relocate): Likewise.
3662 2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
3664 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
3665 before using .plt.got.
3666 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
3668 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3670 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
3671 instead of "+=" to update 0.
3673 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3675 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
3676 .plt.got section here.
3677 (elf_i386_check_relocs): Don't create the .plt.got section.
3678 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
3679 the .plt.got and .plt.bnd sections here.
3680 (elf_x86_64_check_relocs): Don't create the .plt.got nor
3683 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3685 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
3687 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
3688 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
3689 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
3690 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
3693 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3695 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
3697 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
3698 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
3699 the first relocatable ELF input with GNU properties.
3701 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
3703 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
3704 VxWorks for non-PIC.
3706 2017-04-27 Alan Modra <amodra@gmail.com>
3708 * elf-bfd.h (struct elf_backend_data): Make asection param of
3709 elf_backend_eh_frame_address_size const.
3710 (_bfd_elf_eh_frame_address_size): Likewise.
3711 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
3712 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
3713 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
3714 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
3715 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
3716 (next_cie_fde_offset): Constify params.
3717 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
3719 2017-04-27 Alan Modra <amodra@gmail.com>
3721 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
3722 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
3723 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
3725 (offset_adjust): New function.
3726 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
3727 (adjust_eh_frame_local_symbols): Likewise.
3728 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
3729 after changing anything. Return true if anything changed.
3730 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
3731 _bfd_elf_adjust_eh_frame_global_symbol for globals.
3733 2017-04-27 Alan Modra <amodra@gmail.com>
3735 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
3738 2017-04-27 Alan Modra <amodra@gmail.com>
3740 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
3741 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
3742 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
3743 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
3744 for undef and undefweak dyn_relocs.
3745 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
3746 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
3747 (allocate_got, allocate_dynrelocs): Likewise.
3748 (ppc64_elf_relocate_section): Likewise.
3750 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
3752 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
3753 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
3754 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
3755 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
3757 2017-04-26 Nick Clifton <nickc@redhat.com>
3760 * reloc.c (bfd_perform_relocation): Check for a negative address
3763 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
3766 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
3768 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
3769 (elf_backend_always_renumber_dynsyms): Define.
3770 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
3771 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
3772 * elflink.c (bfd_elf_size_dynamic_sections): Also call
3773 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
3775 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
3777 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
3779 * elflink.c (bfd_elf_size_dynamic_sections): Only call
3780 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
3781 sections have been created.
3783 2017-04-26 Nick Clifton <nickc@redhat.com>
3786 * compress.c (bfd_init_section_compress_status): Check the return
3787 value from bfd_malloc.
3789 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3791 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
3792 no_finish_dynamic_symbol.
3793 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
3795 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
3796 weak symbol, don't make it dynamic.
3797 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
3798 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
3799 relocation for GOT reference.
3800 (elf_x86_64_finish_dynamic_symbol): Abort if
3801 no_finish_dynamic_symbol isn't 0.
3803 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3806 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
3807 undefined weak symbol, don't make it dynamic.
3808 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
3809 set no_finish_dynamic_symbol and generate R_386_RELATIVE
3810 relocation for R_386_GOT32.
3812 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
3815 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
3817 2017-04-23 Alan Modra <amodra@gmail.com>
3820 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
3821 * elf.c (lcomm_sym): New.
3822 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
3823 * bfd-in2.h: Regenerate.
3825 2017-04-23 Alan Modra <amodra@gmail.com>
3828 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
3829 parameters and comment.
3830 (_bfd_elf_get_reloc_section): Delete.
3831 (_bfd_elf_plt_get_reloc_section): Declare.
3832 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
3833 New functions. Don't blindly skip over assumed .rel/.rela prefix.
3835 (_bfd_elf_get_reloc_section): ..here. Delete.
3836 (assign_section_numbers): Call elf_get_reloc_section.
3837 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
3838 * elfxx-target.h (elf_backend_get_reloc_section): Update.
3840 2017-04-23 Alan Modra <amodra@gmail.com>
3843 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
3846 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
3849 * elf32-i386.c (elf_i386_link_hash_entry): Add
3850 no_finish_dynamic_symbol.
3851 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
3852 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
3853 symbol, don't make it dynamic in PIE.
3854 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
3855 set no_finish_dynamic_symbol and generate R_386_RELATIVE
3856 relocation for R_386_GOT32
3857 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
3860 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
3864 * elflink.c (elf_link_add_object_symbols): Require
3865 --no-dynamic-linker with -E/--dynamic-list when creating
3868 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
3870 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
3873 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
3875 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
3876 dynamic symbol sorting.
3878 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
3881 * elflink.c (elf_link_add_object_symbols): Preserve
3882 dynamic_ref_after_ir_def when restoring the symbol table for
3883 unneeded dynamic object.
3885 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
3888 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
3889 on on undefined IFUNC symbol in the second PLT.
3891 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
3893 * peXXigen.c (pe_print_reloc): Correct chunk_end.
3895 2017-04-19 Alan Modra <amodra@gmail.com>
3897 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
3898 or make dynamic for info->dynamic_undefined_weak 0 and 1.
3899 * elf32-ppc.c:Formatting.
3900 (ensure_undefweak_dynamic): Don't make dynamic when
3901 info->dynamic_undefined_weak is zero.
3902 (allocate_dynrelocs): Discard undefweak dyn_relocs for
3903 info->dynamic_undefined_weak. Discard undef dyn_relocs when
3904 not default visibility. Discard undef and undefweak
3906 (ppc_elf_relocate_section): Adjust to suit.
3907 * elf64-ppc.c: Formatting.
3908 (ensure_undefweak_dynamic): Don't make dynamic when
3909 info->dynamic_undefined_weak is zero.
3910 (allocate_dynrelocs): Discard undefweak dyn_relocs for
3911 info->dynamic_undefined_weak. Discard them earlier.
3913 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
3916 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
3917 before generating the version definition section.
3919 2017-04-17 Alan Modra <amodra@gmail.com>
3921 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
3922 state when a regular object file defines a symbol with
3923 incompatible type to that defined by an earlier shared lib.
3925 2017-04-13 Alan Modra <amodra@gmail.com>
3927 * coffcode.h: Wrap some overly long _bfd_error_handler args.
3929 * elf32-arm.c: Likewise.
3930 * elf32-i386.c: Likewise.
3931 * elf32-mep.c: Likewise.
3932 * elf64-ia64-vms.c: Likewise.
3933 * elf64-x86-64.c: Likewise.
3934 * elflink.c: Likewise.
3935 * elfnn-ia64.c: Likewise.
3936 * elfxx-mips.c: Likewise.
3938 2017-04-13 Alan Modra <amodra@gmail.com>
3940 * aoutx.h: Use %B and %A in error messages throughout file.
3941 * aout-cris.c: Likewise.
3942 * archive.c: Likewise.
3943 * binary.c: Likewise.
3944 * coff-rs6000.c: Likewise.
3945 * coff-tic4x.c: Likewise.
3946 * coffcode.h: Likewise.
3947 * coffgen.c: Likewise.
3948 * cofflink.c: Likewise.
3949 * coffswap.h: Likewise.
3950 * cpu-arm.c: Likewise.
3951 * elf-eh-frame.c: Likewise.
3952 * elf-m10300.c: Likewise.
3954 * elf32-arc.c: Likewise.
3955 * elf32-arm.c: Likewise.
3956 * elf32-bfin.c: Likewise.
3957 * elf32-frv.c: Likewise.
3958 * elf32-iq2000.c: Likewise.
3959 * elf32-m32c.c: Likewise.
3960 * elf32-microblaze.c: Likewise.
3961 * elf32-nds32.c: Likewise.
3962 * elf32-rl78.c: Likewise.
3963 * elf32-rx.c: Likewise.
3964 * elf32-score.c: Likewise.
3965 * elf32-score7.c: Likewise.
3966 * elf32-sh64.c: Likewise.
3967 * elf32-v850.c: Likewise.
3968 * elf32-vax.c: Likewise.
3969 * elf32-visium.c: Likewise.
3970 * elf64-ia64-vms.c: Likewise.
3971 * elf64-mmix.c: Likewise.
3972 * elf64-sh64.c: Likewise.
3973 * elfcode.h: Likewise.
3974 * elfnn-aarch64.c: Likewise.
3975 * elfnn-ia64.c: Likewise.
3976 * elfxx-mips.c: Likewise.
3977 * hpux-core.c: Likewise.
3980 * linker.c: Likewise.
3981 * merge.c: Likewise.
3983 * oasys.c: Likewise.
3984 * pdp11.c: Likewise.
3985 * peXXigen.c: Likewise.
3986 * rs6000-core.c: Likewise.
3987 * vms-alpha.c: Likewise.
3988 * xcofflink.c: Likewise.
3990 2017-04-13 Alan Modra <amodra@gmail.com>
3992 * bfd.c (PRINT_TYPE): Define.
3993 (_doprnt): New function.
3994 (error_handler_internal): Use _doprnt.
3995 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
3996 calls in their natural order, throughout file.
3997 * coff-mcore.c: Likewise.
3998 * coff-ppc.c: Likewise.
3999 * coff-tic80.c: Likewise.
4000 * cofflink.c: Likewise.
4001 * elf-s390-common.c: Likewise.
4003 * elf32-arm.c: Likewise.
4004 * elf32-i386.c: Likewise.
4005 * elf32-m32r.c: Likewise.
4006 * elf32-msp430.c: Likewise.
4007 * elf32-spu.c: Likewise.
4008 * elf64-ia64-vms.c: Likewise.
4009 * elf64-sparc.c: Likewise.
4010 * elf64-x86-64.c: Likewise.
4011 * elflink.c: Likewise.
4012 * elfnn-aarch64.c: Likewise.
4013 * elfnn-ia64.c: Likewise.
4014 * elfxx-mips.c: Likewise.
4016 2017-04-13 Alan Modra <amodra@gmail.com>
4018 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
4019 branch veneers" error. Fix double space and format message.
4020 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
4021 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
4023 2017-04-13 Alan Modra <amodra@gmail.com>
4025 * bfd-in2.h: Regenerate.
4027 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
4029 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
4030 extra `\n' in warning/error messages.
4031 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
4032 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
4034 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
4036 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
4037 processor-specific properties with generic ELF target vector.
4039 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
4041 * elf32-sparc.c (elf_backend_fixup_symbol): New.
4042 * elf64-sparc.c (elf_backend_fixup_symbol): New.
4043 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
4044 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
4046 (link_hash_newfunc): Initialize has_got_reloc and
4048 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
4050 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
4052 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
4054 (_bfd_sparc_elf_fixup_symbol): New function.
4055 (allocate_dynrelocs): Don't allocate space for dynamic
4056 relocations and discard relocations against resolved undefined
4057 weak symbols in executable. Don't make resolved undefined weak
4058 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
4059 relocation against undefined weak symbols in PIE.
4060 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
4061 relocations against resolved undefined weak symbols in PIE
4062 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
4063 without ynamic PLT/GOT relocations for resolved undefined weak
4065 Don't generate dynamic relocation against resolved undefined
4066 weak symbol in executable.
4067 (pie_finish_undefweak_symbol): New function.
4068 (_bfd_sparc_elf_finish_dynamic_sections): Call
4069 pie_finish_undefweak_symbol on all symbols in PIE.
4070 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
4071 (_bfd_sparc_elf_fixup_symbol): New function.
4073 2017-04-10 Nick Clifton <nickc@redhat.com>
4075 * config.bfd: Remove ns32k from obsolete list.
4077 2017-04-10 Alan Modra <amodra@gmail.com>
4080 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
4081 (special_sections_i): Likewise for .init_array.
4082 (special_sections_p): Likewise for .preinit_array.
4084 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
4088 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
4089 ELF_COMMON_DEF_P for common symbols.
4090 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
4091 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
4092 * elflink.c (_bfd_elf_merge_symbol): Revert commits
4093 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
4094 07492f668d2173da7a2bda3707ff0985e0f460b6.
4096 2017-04-07 Pedro Alves <palves@redhat.com>
4098 * opncls.c (bfd_get_debug_link_info): Rename to...
4099 (bfd_get_debug_link_info_1): ... this. Change type of second
4100 parameter to void pointer. Adjust.
4101 (bfd_get_debug_link_info): Reimplement on top of
4102 bfd_get_debug_link_info_1.
4103 (separate_debug_file_exists, separate_alt_debug_file_exists):
4104 Change type of second parameter to void pointer. Adjust.
4105 (get_func_type, check_func_type): Change type of second parameter
4107 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
4108 the callback functions instead of passing the address of a local.
4109 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
4110 find_separate_debug_file.
4111 (get_alt_debug_link_info_shim): Change type of second parameter to
4112 void pointer. Adjust.
4113 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
4114 find_separate_debug_file.
4115 (get_build_id_name, bfd_boolean check_build_id_file): Change type
4116 of second parameter to void pointer. Adjust.
4117 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
4118 pointer local to find_separate_debug_file.
4120 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
4122 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
4123 external symbols with a definition.
4124 (_bfd_coff_gc_mark_extra_sections): Fix typo.
4126 2017-04-07 Alan Modra <amodra@gmail.com>
4128 * po/SRC-POTFILES.in: Regenerate.
4130 2017-04-05 Alan Modra <amodra@gmail.com>
4132 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
4135 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
4137 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
4138 numbers for DataDirectory entry indicies passed to
4141 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
4143 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
4144 each GNU_MBIND section and align GNU_MBIND section to page size.
4145 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
4146 segment for each GNU_MBIND section.
4147 (_bfd_elf_init_private_section_data): Copy sh_info from input
4148 for GNU_MBIND section.
4150 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
4152 * elfnn-riscv.c (GP_NAME): Delete.
4153 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
4154 (_bfd_riscv_relax_lui): Likewise.
4156 2017-04-04 Nick Clifton <nickc@redhat.com>
4159 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
4161 (bfd_elf_final_link): Only initialize the extended symbol index
4162 section if there are extended symbol tables to list.
4164 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
4166 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
4167 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
4168 * configure.ac (elf): Add elf-properties.lo.
4169 * Makefile.in: Regenerated.
4170 * configure: Likewise.
4171 * elf-bfd.h (elf_property_kind): New.
4172 (elf_property): Likewise.
4173 (elf_property_list): Likewise.
4174 (elf_properties): Likewise.
4175 (_bfd_elf_parse_gnu_properties): Likewise.
4176 (_bfd_elf_get_property): Likewise.
4177 (_bfd_elf_link_setup_gnu_properties): Likewise.
4178 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
4179 and setup_gnu_properties.
4180 (elf_obj_tdata): Add properties.
4181 * elf-properties.c: New file.
4182 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
4183 (elf_i386_merge_gnu_properties): Likewise.
4184 (elf_backend_parse_gnu_properties): Likewise.
4185 (elf_backend_merge_gnu_properties): Likewise.
4186 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
4187 (elf_x86_64_merge_gnu_properties): Likewise.
4188 (elf_backend_parse_gnu_properties): Likewise.
4189 (elf_backend_merge_gnu_properties): Likewise.
4190 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
4191 (elf_backend_parse_gnu_properties): Likewise.
4192 (elf_backend_setup_gnu_properties): Likewise.
4193 (elfNN_bed): Add elf_backend_parse_gnu_properties,
4194 elf_backend_merge_gnu_properties and
4195 elf_backend_setup_gnu_properties.
4197 2017-03-30 Pip Cet <pipcet@gmail.com>
4199 * elf32-wasm32.c: Add relocation code, two relocs.
4200 * reloc.c: Add wasm32 relocations.
4201 * libbfd.h: Regenerate.
4202 * bfd-in2.h: Regenerate.
4203 * bfd/po/bfd.pot: Regenerate.
4205 2017-03-29 Nick Clifton <nickc@redhat.com>
4208 * coff-bfd.h (struct coff_section_data): Add new fields:
4209 saved_bias and bias.
4210 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
4211 computed for PE binaries.
4212 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
4215 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
4218 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
4219 to handle a local symbol with a hash-symbol-entry; without PLT.
4220 Add BFD_ASSERT for an incidental case with GOT entry present.
4221 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
4222 isn't forced-or-set local.
4224 2017-03-27 Pip Cet <pipcet@gmail.com>
4226 * wasm-module.c: New file to support WebAssembly modules.
4227 * wasm-module.h: New file to support WebAssembly modules.
4228 * doc/webassembly.texi: Start documenting wasm-module.c.
4229 * config.bfd: Add wasm_vec.
4230 * targets.c: Likewise.
4231 * configure.ac: Likewise.
4232 * Makefile.am: Add entries for wasm-module.c.
4233 * Makefile.in: Regenerate.
4234 * configure: Regenerate.
4235 * po/SRC-POTFILES.in: Regenerate.
4237 2017-03-27 Pip Cet <pipcet@gmail.com>
4239 * cpu-wasm32.c: New file to support wasm32 architecture.
4240 * elf32-wasm32.c: New file to support wasm32 architecture.
4241 * Makefile.am: Add wasm32 architecture.
4242 * archures.c: Likewise.
4243 * config.bfd: Likewise.
4244 * configure.ac: Likewise.
4245 * targets.c: Likewise.
4246 * Makefile.in: Regenerate.
4247 * bfd-in2.h: Regenerate.
4248 * configure: Regenerate.
4249 * po/SRC-POTFILES.in: Regenerate.
4251 2017-03-20 Alan Modra <amodra@gmail.com>
4254 * elf64-ppc.c (compare_symbols): Stabilize sort.
4256 2017-03-18 Alan Modra <amodra@gmail.com>
4258 * elf64-ppc.c (struct ppc_link_hash_table): Add
4259 local_ifunc_resolver and maybe_local_ifunc_resolver.
4260 (ppc_build_one_stub): Set flags on emitting dynamic
4261 relocation to ifunc.
4262 (ppc64_elf_relocate_section): Likewise.
4263 (ppc64_elf_finish_dynamic_symbol): Likewise.
4264 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
4265 local dynamic relocs to ifuncs.
4266 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
4267 local_ifunc_resolver and maybe_local_ifunc_resolver.
4268 (ppc_elf_relocate_section): Set flag on emitting dynamic
4269 relocation to ifuncs.
4270 (ppc_elf_finish_dynamic_symbol): Likewise.
4271 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
4272 dynamic relocs to ifuncs.
4274 2017-03-13 Nick Clifton <nickc@redhat.com>
4277 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
4278 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
4279 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
4280 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
4281 * bfd-in2.h: Regenerate.
4282 * libbfd.h: Regenerate.
4283 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
4285 (IS_AARCH64_TLSDESC_RELOC): Likewise.
4286 (elfNN_aarch64_howto_table): Likewise.
4287 (aarch64_tls_transition_without_check): Likewise.
4288 (aarch64_reloc_got_type): Likewise.
4289 (elfNN_aarch64_final_link_relocate): Likewise.
4290 (elfNN_aarch64_tls_relax): Likewise.
4291 (elfNN_aarch64_relocate_section): Likewise.
4292 (elfNN_aarch64_gc_sweep_hook): Likewise.
4293 (elfNN_aarch64_check_relocs): Likewise.
4294 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
4295 (_bfd_aarch64_elf_resolve_relocation): Likewise.
4297 2017-03-11 Alan Modra <amodra@gmail.com>
4299 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
4300 parameter is in fact used. Whitespace fixes.
4301 * elf64-ppc.c: Likewise.
4303 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
4305 * rs6000-core.c (CORE_NEW): Simplify macro when
4306 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
4308 2017-03-07 Alan Modra <amodra@gmail.com>
4312 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
4315 2017-03-05 Alan Modra <amodra@gmail.com>
4317 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
4318 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
4319 (next_cie_fde_offset): New function.
4320 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
4321 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
4322 four bytes. Align CIEs to four or eight bytes depending on
4323 per_encoding_aligned8. Align FDEs according to their encoding.
4324 Pad last FDE to output section alignment.
4325 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
4327 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
4328 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
4329 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
4331 2017-03-02 Martin Bickel <binutils@ineranves.de>
4334 * elf.c (rewrite_elf_program_header): Do not issue a warning for
4335 empty segments which have a zero filesz, but a non-zero memsz.
4337 2017-03-02 Alan Modra <amodra@gmail.com>
4339 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
4341 2017-02-28 Alan Modra <amodra@gmail.com>
4343 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
4344 (ppc64_elf_relocate_section): Likewise.
4346 2017-02-28 Alan Modra <amodra@gmail.com>
4349 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
4350 rather than elf32_nios2_hash_table or elf_hash_table.
4351 (create_got_section): Likewise.
4352 (nios2_elf32_finish_dynamic_symbol): Likewise.
4353 (nios2_elf32_adjust_dynamic_symbol): Likewise.
4354 (nios2_elf32_size_dynamic_sections): Likewise.
4355 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
4356 vars. Use htab equivalents directly instead. Don't create
4357 all dynamic sections on needing just the GOT. Use a goto
4358 rather than a fall-through with reloc test. Ensure
4359 htab->dynobj is set when making dynamic sreloc section.
4360 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
4361 equivalent directly instead. Don't segfault on looking for
4362 .dynamic when dynamic sections have not been created. Don't
4363 segfault on .got.plt being discarded.
4364 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
4365 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
4366 fixme and another not so relevant comment.
4367 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
4368 already set, set hash table dynobj on creating .sbss.
4370 2017-02-28 Alan Modra <amodra@gmail.com>
4372 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
4373 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
4374 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
4375 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
4376 (ppc64_elf_relocate_section): Likewise.
4377 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
4378 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
4379 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
4380 * libbfd.h: Regenerate.
4381 * bfd-in2.h: Regenerate.
4383 2017-02-28 Alan Modra <amodra@gmail.com>
4385 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
4386 dynamic .data.rel.ro read-only.
4387 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
4388 rather than section flags when deciding where copy reloc goes.
4389 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
4390 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
4391 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
4392 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
4393 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
4394 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
4395 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
4396 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
4397 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
4398 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
4399 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
4400 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
4401 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
4402 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
4403 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
4404 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
4405 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
4406 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
4407 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
4409 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
4411 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
4412 `jalr $0, $25' instruction encoding.
4414 2017-02-27 Nick Clifton <nickc@redhat.com>
4417 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
4418 generating a seg-fault when encountering a symbol that has been
4419 deleted by garbage collection.
4421 2017-02-25 Alan Modra <amodra@gmail.com>
4423 * elf32-arc.c (struct dynamic_sections): Delete.
4424 (enum dyn_section_types): Delete.
4425 (dyn_section_names): Delete.
4426 (arc_create_dynamic_sections): Delete.
4427 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
4428 segfault on discarded .rela.plt section.
4429 (elf_arc_size_dynamic_sections): Formatting. Don't call
4430 arc_create_dynamic_sections. Don't allocate memory for sections
4431 handled by the generic linker. Correct code finding relocs in
4432 read-only sections. Set SEC_EXCLUDE on zero size .got,
4433 .got.plt, and .dynbss sections. Do set .interp for pies.
4435 2017-02-24 Andrew Waterman <andrew@sifive.com>
4437 * elfnn-riscv.c (GP_NAME): New macro.
4438 (riscv_global_pointer_value): Use it.
4439 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
4440 output section, consider only that section's alignment.
4442 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
4444 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
4445 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
4446 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
4447 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
4449 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
4451 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
4452 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
4455 2017-02-23 Alan Modra <amodra@gmail.com>
4458 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
4460 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
4461 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
4464 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
4467 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
4468 processing ahead of the call to `elf_gc_sweep_symbol'.
4470 2017-02-22 Nick Clifton <nickc@redhat.com>
4473 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
4474 created section 4-byte alignment.
4476 2017-02-22 Alan Modra <amodra@gmail.com>
4478 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
4479 on .got or .plt output section being discarded by script.
4480 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
4483 2017-02-21 Alan Modra <amodra@gmail.com>
4485 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
4486 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
4488 2017-02-20 Alan Modra <amodra@gmail.com>
4491 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
4492 if DT_RELSZ/DT_RELASZ is zero.
4494 2017-02-17 Nick Clifton <nickc@redhat.com>
4496 * compress.c (bfd_get_full_section_contents): Remember to reduce
4497 compressed size by the sizeof the compression header when
4498 decompressing the contents.
4500 2017-02-17 Pedro Alves <palves@redhat.com>
4502 * srec.c (Chunk): Rename to ...
4503 (_bfd_srec_len): ... this.
4504 (S3Forced): Rename to ...
4505 (_bfd_srec_forceS3): ... this.
4506 * objcopy.c: Adjust all references.
4508 2017-02-17 Pedro Alves <palves@redhat.com>
4510 * archive.c (bsd_write_armap): Rename to ...
4511 (_bfd_bsd_write_armap): ... this.
4512 (coff_write_armap): Rename to ...
4513 (_bfd_coff_write_armap): ... this.
4514 * libbfd-in.h (bsd_write_armap): Rename to ...
4515 (_bfd_bsd_write_armap): ... this.
4516 (coff_write_armap): Rename to ...
4517 (_bfd_coff_write_armap): ... this.
4518 * aout-target.h, aout-tic30.c: Adjust all users.
4519 * libbfd.h: Regenerate.
4521 2017-02-17 Pedro Alves <palves@redhat.com>
4523 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
4524 (warn_deprecated): Rename to ...
4525 (_bfd_warn_deprecated): ... this.
4526 * libbfd.c (warn_deprecated): Rename to ...
4527 (_bfd_warn_deprecated): ... this.
4528 * bfd-in2.h: Regenerate.
4530 2017-02-17 Pedro Alves <palves@redhat.com>
4532 * bfdio.c (real_ftell): Rename to ...
4533 (_bfd_real_ftell): ... this.
4534 (real_fseek): Rename to ...
4535 (_bfd_real_fseek): ... this.
4536 (real_fopen): Rename to ...
4537 (_bfd_real_fopen): ... this.
4538 * libbfd-in.h (real_ftell): Rename to ...
4539 (_bfd_real_ftell): ... this.
4540 (real_fseek): Rename to ...
4541 (_bfd_real_fseek): ... this.
4542 (real_fopen): Rename to ...
4543 (_bfd_real_fopen): ... this.
4544 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
4545 * libbfd.h: Regenerate.
4547 2017-02-17 Pedro Alves <palves@redhat.com>
4549 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
4550 * libbfd.c (read_unsigned_leb128): Rename to ...
4551 (_bfd_read_unsigned_leb128): ... this.
4552 (read_signed_leb128): Rename to ...
4553 (_bfd_read_signed_leb128): ... this.
4554 (safe_read_leb128): Rename to ...
4555 (_bfd_safe_read_leb128): ... this.
4556 * libbfd-in.h (read_unsigned_leb128): Rename to ...
4557 (_bfd_read_unsigned_leb128): ... this.
4558 (read_signed_leb128): Rename to ...
4559 (_bfd_read_signed_leb128): ... this.
4560 (safe_read_leb128): Rename to ...
4561 (_bfd_safe_read_leb128): ... this.
4562 * libbfd.h: Renegerate.
4564 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
4566 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
4567 before trying to fine matching file and line information.
4569 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
4571 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
4572 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
4573 not match current bfd, then reload debug information. Record bfd
4574 we're loading debug info for in the stash. If we have debug
4575 informatin in the cache then perform section placement before
4578 2017-02-16 Alan Modra <amodra@gmail.com>
4581 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
4582 * elfxx-target.h (elf_backend_no_page_alias): Define.
4583 (elfNN_bed): Init new field.
4584 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
4585 ensure PT_LOAD segment starts on a new page.
4586 * elf32-hppa.c (elf_backend_no_page_alias): Define.
4588 2017-02-16 Alan Modra <amodra@gmail.com>
4591 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
4594 2017-02-16 Jiong Wang <jiong.wang@arm.com>
4596 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
4597 * bfd-in2.h: Regenerated.
4599 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
4602 * elf32-i386.c (elf_i386_relocate_section): Allow
4603 "lea foo@GOT, %reg" in PIC.
4605 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
4608 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
4609 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
4610 error against local IFUNC symbol without a base register for
4613 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
4615 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
4616 `%P: %H:' with `info->callbacks->einfo'.
4617 (ppc_elf_relocate_section): Likewise.
4618 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
4619 (ppc64_elf_edit_toc): Likewise.
4620 (ppc64_elf_relocate_section): Likewise.
4622 2017-02-14 Alan Modra <amodra@gmail.com>
4624 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
4625 --gc-keep-exported, and test versioned field of sym rather than
4626 looking for @ in name.
4628 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
4630 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
4633 2017-02-13 Nick Clifton <nickc@redhat.com>
4636 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
4639 2017-02-07 Andrew Waterman <andrew@sifive.com>
4641 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
4642 entry size if PLT header is written.
4644 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
4646 Fix sparc64 dynamic relocation processing to use the dynamic
4648 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
4649 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
4652 2017-02-03 Nick Clifton <nickc@redhat.com>
4655 * coffcode.h (coff_write_object_contents): Enlarge size of
4656 s_name_buf in order to avoid compile time warning about possible
4658 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
4659 32-bits of insn value before printing into buffer.
4661 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4663 * elfxx-mips.c (mips_elf_hash_sort_data): Add
4664 `max_local_dynindx'.
4665 (mips_elf_sort_hash_table): Handle it.
4666 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
4667 symbols bump up `max_local_dynindx' rather than
4668 `max_non_got_dynindx'.
4670 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4672 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
4673 `min_got_dynindx', `max_unref_got_dynindx' and
4674 `max_non_got_dynindx' members to the `bfd_size_type' data type.
4675 (mips_elf_sort_hash_table): Adjust accordingly.
4677 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4679 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
4680 to access the hash table.
4682 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4684 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
4685 non-NULL `htab' to the beginning.
4687 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
4689 * elflink.c (elf_gc_sweep): Wrap overlong line.
4691 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
4693 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
4694 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
4695 * elfxx-mips.c (mips_elf_link_hash_table): Add
4696 `ignore_branch_isa' member.
4697 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
4698 in branch relocation calculation as an error if
4699 `ignore_branch_isa' has been set.
4700 (_bfd_mips_elf_insn32): Rename to...
4701 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
4702 parameter to `insn32' and add an `ignore_branch_isa' parameter.
4703 Handle the new parameter.
4705 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
4707 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
4708 local variable dynobj.
4711 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
4712 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
4713 executable from read-only sections into sdynrelro.
4714 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
4715 dynamic relocs in sdynrelro.
4716 (elf_backend_want_dynrelro): Define.
4718 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4720 * config.bfd (*-*-rtemsaout*): Mark as removed.
4722 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4724 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
4725 (arm-*-rtems*): Move to (arm*-*-eabi*).
4726 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
4727 (m68-*-rtems*): Move to (m68*-*-elf*).
4729 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
4731 * config.bfd (*-*-rtemscoff*): Mark as removed.
4733 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
4736 * elflink.c (bfd_elf_record_link_assignment): Revert last
4737 change and don't ever clear `forced_local'. Set `mark'
4739 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
4741 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
4742 (bfd_elf_size_dynamic_sections): ... here.
4743 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
4744 and set `mark' instead in `__tls_get_addr_opt' processing.
4745 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
4747 2017-01-24 Alan Modra <amodra@gmail.com>
4749 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
4750 where dynamic relocs are preferable. Allow ifunc too.
4751 (ensure_undefweak_dynamic): New function.
4752 (allocate_dynrelocs): Use it here. Move plt handling last and
4753 don't make symbols dynamic, simplifying loop. Only make undef
4754 weak symbols with GOT entries dynamic. Correct condition
4755 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
4756 comments. Remove goto.
4757 (ppc_elf_relocate_section): Correct test for using dynamic
4758 symbol on GOT relocs. Rearrange test for emitting GOT relocs
4759 to suit. Set up explicit tls_index entries and implicit GOT
4760 tls_index entries resolvable at link time for
4761 __tls_get_addr_opt. Simplify test to clear mem for prelink.
4762 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
4763 (ensure_undefweak_dynamic): New function.
4764 (allocate_dynrelocs): Use it here. Only make undef weak symbols
4765 with GOT entries dynamic. Remove unnecessary test of
4766 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
4767 (ppc64_elf_relocate_section): Correct test for using dynamic
4768 symbol on GOT relocs. Rearrange test for emitting GOT relocs
4769 to suit. Set up explicit tls_index entries and implicit GOT
4770 tls_index entries resolvable at link time for __tls_get_addr_opt.
4771 Simplify expression to clear mem for prelink.
4773 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
4775 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
4777 2017-01-20 Jiong Wang <jiong.wang@arm.com>
4779 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
4780 (elf_backend_hash_symbol): Define.
4782 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
4785 * elflink.c (bfd_elf_record_link_assignment): Clear any
4786 `forced_local' marking for DSO symbols that are not being
4789 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
4791 * elfnn-riscv.c (riscv_elf_object_p): New function.
4793 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
4796 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
4798 (elf_x86_64_check_relocs): Create .eh_frame section for the
4800 (elf_x86_64_size_dynamic_sections): Allocate and initialize
4801 .eh_frame section for the .plt.bnd section.
4802 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
4803 for the .plt.bnd section.
4805 2017-01-12 Nick Clifton <nickc@redhat.com>
4808 * opncls.c (find_separate_debug_file): Add include_dirs
4809 parameter. Only include the directory part of the bfd's filename
4810 in search paths if include_dirs is true. Add a couple of extra
4811 locations for looking for debug files.
4812 ( bfd_follow_gnu_debuglink): Update invocation of
4813 find_separate_debug_file.
4814 (bfd_follow_gnu_debugaltlink): Likewise.
4815 (get_build_id): New function: Finds the build-id of the given bfd.
4816 (get_build_id_name): New function: Computes the name of the
4817 separate debug info file for a bfd, based upon its build-id.
4818 (check_build_id_file): New function: Checks to see if a separate
4819 debug info file exists at the given location, and that its
4820 build-id matches that of the original bfd.
4821 (bfd_follow_build_id_debuglink): New function: Finds a separate
4822 debug info file for a given bfd by using the build-id method.
4823 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
4824 method of locating a separate debug info file before using the
4826 * bfd-in2.h: Regenerate.
4828 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
4831 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
4832 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
4833 elf_x86_64_eh_frame_plt_got.
4834 (elf_x86_64_size_dynamic_sections): Get unwind info from
4835 elf_x86_64_bnd_arch_bed for the BND PLT.
4837 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
4839 * config.bfd: Add entries for i686-redox and x86_64-redox.
4841 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4843 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
4845 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
4846 .eh_frame section to 4 bytes for x32.
4847 (elf_x86_64_check_relocs): Likewise.
4849 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4852 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
4853 (PLT_GOT_FDE_LENGTH): Likewise.
4854 (elf_i386_plt_layout): Add eh_frame_plt_got and
4855 eh_frame_plt_got_size.
4856 (elf_i386_plt): Updated.
4857 (elf_i386_link_hash_table): Add plt_got_eh_frame.
4858 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
4859 (elf_i386_size_dynamic_sections): Allocate and initialize
4860 .eh_frame section for .plt.got.
4861 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
4863 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
4864 eh_frame_plt_got_size.
4865 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
4866 (PLT_GOT_FDE_LENGTH): Likewise.
4867 (elf_x86_64_backend_data): Add eh_frame_plt_got and
4868 eh_frame_plt_got_size.
4869 (elf_x86_64_arch_bed): Updated.
4870 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
4871 eh_frame_plt_got_size.
4872 (elf_x86_64_nacl_arch_bed): Likewise.
4873 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
4874 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
4875 (elf_x86_64_size_dynamic_sections): Allocate and initialize
4876 .eh_frame section for .plt.got.
4877 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
4880 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
4882 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
4883 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
4885 2017-01-09 Nick Clifton <nickc@redhat.com>
4887 * dwarf2.c (lookup_address_in_function_table): Return early if
4888 there are no functions in the given comp unit, or if the high
4889 address of the last function in the comp unit is less than the
4892 2017-01-09 Nick Clifton <nickc@redhat.com>
4895 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
4896 message if there are too many symbols to load.
4898 2017-01-04 James Clarke <jrtc27@jrtc27.com>
4900 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
4901 if relocs are cached.
4903 2017-01-03 Rich Felker <bugdal@aerifal.cx>
4906 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
4907 for R_MICROBLAZE_GOTOFF_64.
4909 2017-01-03 Nick Clifton <nickc@redhat.com>
4911 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
4912 warning about using a possibly uninitialised variable.
4914 2017-01-02 Alan Modra <amodra@gmail.com>
4916 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
4917 (allocate_plt_static, allocate_dynrelocs): Use it.
4919 2017-01-02 Alan Modra <amodra@gmail.com>
4921 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
4922 .PARISC.unwind section.
4924 2017-01-02 Alan Modra <amodra@gmail.com>
4927 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
4928 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
4929 indirect to GOT pointer relative code edit.
4931 2017-01-02 Alan Modra <amodra@gmail.com>
4933 Update year range in copyright notice of all files.
4935 For older changes see ChangeLog-2016
4937 Copyright (C) 2017 Free Software Foundation, Inc.
4939 Copying and distribution of this file, with or without modification,
4940 are permitted in any medium without royalty provided the copyright
4941 notice and this notice are preserved.
4947 version-control: never