1 2018-08-21 Alan Modra <amodra@gmail.com>
3 * reloc.c (HOWTO): Revise comment.
4 (NEWHOWTO, HOWTO_PREPARE): Delete.
5 * coff-arm.c (coff_arm_reloc_type_lookup): Replace const struc
6 reloc_howto_struct with reloc_howto_type.
7 * ns32knetbsd.c (MY_bfd_reloc_type_lookup): Likewise.
8 * vms-alpha.c (alpha_vms_bfd_reloc_type_lookup): Likewise.
9 * elf-hppa.h (HOW): Define.
10 (elf_hppa_howto_table): Use it to simplify this table, correcting
11 name of R_PARISC_LTOFF16WF, R_PARISC_LTOFF_FPTR64, and
12 R_PARISC_LTOFF_FPTR16DF.
13 * elf32-mep.c (MEPREL): Use HOWTO.
14 * bfd-in2.h: Regenerate.
16 2018-08-20 Alan Modra <amodra@gmail.com>
18 * mmo.c (valid_mmo_symbol_character_set): Initialize and make
20 (mmo_init): Don't init valid_mmo_symbol_character_set.
22 2018-08-20 Alan Modra <amodra@gmail.com>
24 * rs6000-core.c (CORE_COMMONSZ): Balance parentheses in expression.
26 2018-08-17 H.J. Lu <hongjiu.lu@intel.com>
29 * elf-bfd.h (elf_backend_data): Add fixup_gnu_properties.
30 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Call
31 backend fixup_gnu_properties if it isn't NULL. Discard
32 .note.gnu.property section if all properties have been removed.
33 * elfxx-target.h (elf_backend_fixup_gnu_properties): New.
34 (elfNN_bed): Initialize fixup_gnu_properties.
35 * elfxx-x86.c (_bfd_x86_elf_link_fixup_gnu_properties): New
37 * elfxx-x86.h (_bfd_x86_elf_link_fixup_gnu_properties): New
39 (elf_backend_fixup_gnu_properties): New.
41 2018-08-16 Alan Modra <amodra@gmail.com>
43 * elf64-ppc.c: Correct ppc_stub_long_branch_notoc example.
46 2018-08-12 H.J. Lu <hongjiu.lu@intel.com>
49 * Makefile.am (BFD32_LIBS): Add elf-properties.lo.
50 (BFD32_LIBS_CFILES): Add elf-properties.c.
51 (BFD32_BACKENDS): Remove elf-properties.lo.
52 (BFD32_BACKENDS_CFILES): Remove elf-properties.c.
53 * configure.ac (elf): Remove elf-properties.lo.
54 * Makefile.in: Regenerated.
55 * configure: Likewise.
57 2018-08-11 H.J. Lu <hongjiu.lu@intel.com>
60 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Don't
61 add X86_ISA_1_NEEDED property only if existing properties won't
64 2018-08-11 Alan Modra <amodra@gmail.com>
66 * reloc.c (bfd_get_reloc_size): Sort switch.
67 (read_reloc, write_reloc, apply_reloc): New functions.
68 (bfd_perform_relocation, bfd_install_relocation): Use apply_reloc.
69 (_bfd_relocate_contents): Use read_reloc and write_reloc.
70 (_bfd_clear_contents): Likewise.
72 2018-08-11 John Darrington <john@darrington.wattle.id.au>
74 * reloc.c (_bfd_relocate_contents): Handle 3 byte relocs.
75 (_bfd_clear_contents): Likewise.
76 (bfd_perform_relocation): Likewise.
77 (bfd_install_relocation): Likewise.
79 2018-08-10 H.J. Lu <hongjiu.lu@intel.com>
82 * elflink.c (bfd_elf_record_link_assignment): Always clear
83 h->verinfo.verdef when overriding a dynamic definition.
85 2018-08-10 H.J. Lu <hongjiu.lu@intel.com>
88 * elf-properties.c (elf_get_gnu_property_section_size): Always
89 use align_size as pr_datasz for GNU_PROPERTY_STACK_SIZE.
90 (elf_write_gnu_properties): Likewise.
92 2018-08-08 H.J. Lu <hongjiu.lu@intel.com>
95 * bfd.c (bfd_convert_section_size): Check BFD_DECOMPRESS after
96 calling _bfd_elf_convert_gnu_property_size to convert
97 .note.gnu.property section size.
98 (bfd_convert_section_contents): Check BFD_DECOMPRESS after
99 calling _bfd_elf_convert_gnu_properties to convert
100 .note.gnu.property section.
101 * elf-bfd.h (_bfd_elf_convert_gnu_property_size): New prototype.
102 (_bfd_elf_convert_gnu_properties): Likewise.
103 * elf-properties.c (elf_get_gnu_property_section_size): New
105 (elf_write_gnu_properties): Likewise.
106 (_bfd_elf_convert_gnu_property_size): Likewise.
107 (_bfd_elf_convert_gnu_properties): Likewise.
108 (_bfd_elf_link_setup_gnu_properties): Use
109 elf_get_gnu_property_section_size and elf_write_gnu_properties.
111 2018-08-08 H.J. Lu <hongjiu.lu@intel.com>
114 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Remove
115 GNU_PROPERTY_X86_ISA_1_USED if an input file doesn't have it.
116 (_bfd_x86_elf_link_setup_gnu_properties): Adding the
117 GNU_PROPERTY_X86_ISA_1_NEEDED, instead of
118 GNU_PROPERTY_X86_ISA_1_USED, property.
120 2018-08-07 Alan Modra <amodra@gmail.com>
122 * elf64-ppc.c (struct map_stub): Delete tls_get_addr_opt_bctrl.
123 Add lr_restore, eh_size and eh_base.
124 (eh_advance, eh_advance_size): New functions.
125 (build_tls_get_addr_stub): Emit EH info for stub.
126 (ppc_build_one_stub): Likewise for _notoc stubs.
127 (ppc_size_one_stub): Size EH info for stub.
128 (group_sections): Init new map_stub fields.
129 (stub_eh_frame_size): Delete.
130 (ppc64_elf_size_stubs): Size EH info for stubs. Set up dummy EH
132 (ppc64_elf_build_stubs): Reinit new map_stub fields. Set FDE
133 offset to stub section here..
134 (ppc64_elf_finish_dynamic_sections): ..rather than here.
136 2018-08-07 Alan Modra <amodra@gmail.com>
138 * elf64-ppc.c (ppc64_elf_relocate_section): Don't skip first
139 instruction of __tls_get_addr_opt stub.
140 (plt_stub_size): Omit ALWAYS_EMIT_R2SAVE condition when
141 dealing with __tls_get_addr_opt stub.
142 (build_tls_get_addr_stub, ppc_size_one_stub): Likewise.
144 2018-08-06 Claudiu Zissulescu <claziss@synopsys.com>
146 * elf32-arc.c (arc_elf_merge_private_bfd_data): Complain about
147 efalgs only when in/out exists.
148 (elf32_arc_section_from_shdr): Don't complain about 0x0c
149 section type. It is mwdt compiler specific.
151 2018-08-06 Claudiu Zissulescu <claziss@synopsys.com>
153 * elf32-arc.c (arc_elf_merge_attributes): Fix merge attributes.
155 2018-08-06 Claudiu Zissulescu <claziss@synopsys.com>
157 * elf32-arc.c (arc_elf_merge_attributes): Handle
160 2018-08-05 Alan Modra <amodra@gmail.com>
162 * elf64-ppc.c (ADDI_R12_R11, ADDI_R12_R12, LIS_R12),
163 (ADDIS_R12_R11, ORIS_R12_R12_0, ORI_R12_R12_0),
164 (SLDI_R12_R12_32, LDX_R12_R11_R12, ADD_R12_R11_R12): Define.
165 (ppc64_elf_howto_raw): Add R_PPC64_REL24_NOTOC entry.
166 (ppc64_elf_reloc_type_lookup): Support R_PPC64_REL24_NOTOC.
167 (ppc_stub_type): Add ppc_stub_long_branch_notoc,
168 ppc_stub_long_branch_both, ppc_stub_plt_branch_notoc,
169 ppc_stub_plt_branch_both, ppc_stub_plt_call_notoc, and
170 ppc_stub_plt_call_both.
171 (is_branch_reloc): Add R_PPC64_REL24_NOTOC.
172 (build_offset, size_offset): New functions.
173 (plt_stub_size): Support plt_call_notoc and plt_call_both.
174 (ppc_build_one_stub, ppc_size_one_stub): Support new stubs.
175 (toc_adjusting_stub_needed): Handle R_PPC64_REL24_NOTOC.
176 (ppc64_elf_size_stubs): Likewise, and new stubs.
177 (ppc64_elf_build_stubs, ppc64_elf_relocate_section): Likewise.
178 * reloc.c: Add BFD_RELOC_PPC64_REL24_NOTOC.
179 * bfd-in2.h: Regenerate.
180 * libbfd.h: Regenerate.
182 2018-08-05 Alan Modra <amodra@gmail.com>
184 * elf64-ppc.c (ppc_build_one_stub): Lose "_r2off" in stub symbols.
186 2018-08-02 Jim Wilson <jimw@sifive.com>
188 * elfnn-riscv.c (riscv_elf_create_dynamic_sections): For .tdata.dyn,
189 add SEC_LINKER_CREATED flag.
191 2018-08-01 Nick Clifton <nickc@redhat.com>
193 * coff-rs6000.c (_bfd_xcoff_put_ldsymbol_name): Suppress warnings
194 about potentially truncated strncpy operations.
195 (_bfd_xcoff_put_symbol_name): Likewise.
197 * elf32-avr.c (avr_stub_name): Check for a NULL return from
200 2018-08-01 Zenith <zenith432@users.sourceforge.net>
203 * plugin.c (bfd_plugin_open_input): Close file descriptor if the
205 (try_claim): Always close the file descriptor at the end of the
207 (try_load_plugin): If a plugin has already been registered, then
208 skip the dlopen and onload steps and go straight to claiming the
209 file. If these is an error, close the plugin.
211 2018-08-01 Alan Modra <amodra@gmail.com>
213 * elf64-ppc.c (plt_stub_pad): Delay plt_stub_size call until needed.
214 (ppc_build_one_stub): Don't set stub_offset, instead assert that
215 it is sane. Don't adjust stub_offset for alignment. Adjust size
216 calculation. Use "targ" temp when calculating offsets.
217 (ppc_size_one_stub): Set stub_offset here. Use "targ" temp when
218 calculating offsets. Adjust for alignment before setting
219 tls_get_addr_opt_bctrl.
221 2018-08-01 Alan Modra <amodra@gmail.com>
223 * po/SRC-POTFILES.in: Regenerate.
225 2018-07-30 Nick Clifton <nickc@redhat.com>
228 * elf32-sh.c (sh_elf_relocate_section): When processing
229 translation relocs, fail if the relocation offset is too small.
230 Replace BFD_ASSERTs with more helpful error messages.
232 2018-07-30 Andrew Jenner <andrew@codesourcery.com>
234 * Makefile.am (ALL_MACHINES, ALL_MACHINES_CFILES): Add C-SKY.
235 (BFD32_BACKENDS, BFD_BACKENDS_CFILES): Likewise.
236 * Makefile.in: Regenerated.
237 * archures.c (enum bfd_architecture): Add bfd_arch_csky and
238 related bfd_mach defines.
239 (bfd_csky_arch): Declare.
240 (bfd_archures_list): Add C-SKY.
241 * bfd-in.h (elf32_csky_build_stubs): Declare.
242 (elf32_csky_size_stubs): Declare.
243 (elf32_csky_next_input_section: Declare.
244 (elf32_csky_setup_section_lists): Declare.
245 * bfd-in2.h: Regenerated.
246 * config.bfd: Add C-SKY.
247 * configure.ac: Likewise.
248 * configure: Regenerated.
249 * cpu-csky.c: New file.
250 * elf-bfd.h (enum elf_target_id): Add C-SKY.
251 * elf32-csky.c: New file.
252 * libbfd.h: Regenerated.
253 * reloc.c: Add C-SKY relocations.
254 * targets.c (csky_elf32_be_vec, csky_elf32_le_vec): Declare.
255 (_bfd_target_vector): Add C-SKY target vector entries.
257 2018-07-27 John Darrington <john@darrington.wattle.id.au>
259 * elf32-s12z.c (ELF_TARGET_ID): Don't define.
261 2018-07-27 John Darrington <john@darrington.wattle.id.au>
263 * libbfd.c (bfd_getb24, bfd_getl24): New functions.
264 (bfd_get_24, bfd_put_24): New macros.
265 * bfd-in2.h: Regenerate.
267 2018-07-27 John Darrington <john@darrington.wattle.id.au>
269 * elf32-s12z.c (s12z_elf_set_mach_from_flags): Remove comment.
271 2018-07-26 Alan Modra <amodra@gmail.com>
273 * elf64-ppc.c (ppc64_elf_size_stubs): Use a ppc_stub_long_branch_r2off
274 for calls to symbols with STO_PPC64_LOCAL_MASK bits set to 1.
276 2018-07-25 Alan Modra <amodra@gmail.com>
278 * elf32-ppc.c (ppc_elf_relax_section): Ignore common or undef locals.
279 Avoid trashing toff with added when used as a symbol index.
280 Ignore R_PPC_PLTREL24 addends in unused example code. Avoid
281 creating unnecessary fixups when relocatable.
283 2018-07-25 Alan Modra <amodra@gmail.com>
285 * elf32-arm.c (elf32_arm_nabi_write_core_note): Disable
286 -Wstringop-truncation warning for gcc-8.0 too.
287 * elf32-ppc.c (ppc_elf_write_core_note): Likewise.
288 * elf64-ppc.c (ppc64_elf_write_core_note): Likewise.
289 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise.
290 * elf32-s390.c (elf_s390_write_core_note): Comment fix.
291 * elf64-s390.c (elf_s390_write_core_note): Likewise.
293 2018-07-24 Alan Modra <amodra@gmail.com>
296 * dwarf2.c (dwarf_debug_section_enum): Fix comment typo.
297 * elf.c (bfd_section_from_shdr, elf_sort_sections): Likewise.
299 2018-07-23 Max Filippov <jcmvbkbc@gmail.com>
301 * elf32-xtensa.c (elf_xtensa_finish_dynamic_sections): Move
302 relocation sections consistency check to always check both
303 .rela.dyn and .rela.plt when they exist. Rearrange variable
304 definition and assignment places.
306 2018-07-23 Max Filippov <jcmvbkbc@gmail.com>
308 * elf32-xtensa.c (shrink_dynamic_reloc_sections): Shrink dynamic
309 relocations section for dynamic undefined weak symbols when
310 linking a shared object.
312 2018-07-23 Tom Tromey <tom@tromey.com>
314 * elf.c (bfd_get_elf_phdrs): Don't call memcpy with size 0.
316 2018-07-21 Eric Botcazou <ebotcazou@adacore.com>
318 * elf32-arm.c (elf32_arm_final_link_relocate) <R_ARM_GOT32>: Small
319 cleanup for the case of a global symbol that binds locally. Also
320 install a value in the GOT slot in the case of a local symbol in
323 2018-07-20 H.J. Lu <hongjiu.lu@intel.com>
326 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): If the
327 separate code program header is needed, make sure that the first
328 read-only PT_LOAD segment has no code by adding a
329 GNU_PROPERTY_X86_ISA_1_USED note.
331 2018-07-20 Chenghua Xu <paul.hua.gm@gmail.com>
332 Maciej W. Rozycki <macro@mips.com>
334 * elfxx-mips.c (print_mips_ases): Add MMI extension.
336 2018-07-20 Maciej W. Rozycki <macro@mips.com>
338 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Do not
339 create DT_REL, DT_RELSZ or DT_RELENT dynamic entries if the
340 dynamic relocation section will be discarded from output.
341 (_bfd_mips_elf_finish_dynamic_sections) <DT_RELSZ>: Assert that
342 the dynamic relocation section will be retained in output.
344 2018-07-18 Maciej W. Rozycki <macro@mips.com>
346 * xcofflink.c (xcoff_write_global_symbol): Fix symbol type
347 checks for defined weak symbols.
349 2018-07-17 Maciej W. Rozycki <macro@mips.com>
351 * elf32-nds32.c (nds32_elf_relax_loadstore): Use
352 `bfd_is_abs_symbol' rather than `bfd_is_abs_section' in checking
353 whether the symbol is absolute.
354 (nds32_elf_relax_lo12): Likewise.
355 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
356 (elfNN_aarch64_check_relocs): Likewise.
357 * xcofflink.c (xcoff_need_ldrel_p): Likewise.
358 (bfd_xcoff_import_symbol): Likewise.
359 (xcoff_write_global_symbol): Likewise.
361 2018-07-17 Maciej W. Rozycki <macro@mips.com>
363 * linker.c (bfd_is_abs_symbol): New macro.
364 * bfd-in2.h: Regenerate.
366 2018-07-16 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
368 * elf-bfd.h (elfcore_write_ppc_tar): Add prototype.
369 (elfcore_write_ppc_ppr): Likewise.
370 (elfcore_write_ppc_dscr): Likewise.
371 (elfcore_write_ppc_ebb): Likewise.
372 (elfcore_write_ppc_pmu): Likewise.
373 (elfcore_write_ppc_tm_cgpr): Likewise.
374 (elfcore_write_ppc_tm_cfpr): Likewise.
375 (elfcore_write_ppc_tm_cvmx): Likewise.
376 (elfcore_write_ppc_tm_cvsx): Likewise.
377 (elfcore_write_ppc_tm_spr): Likewise.
378 (elfcore_write_ppc_tm_ctar): Likewise.
379 (elfcore_write_ppc_tm_cppr): Likewise.
380 (elfcore_write_ppc_tm_cdscr): Likewise.
381 * elf.c (elfcore_write_ppc_tar): New function.
382 (elfcore_write_ppc_ppr): Likewise.
383 (elfcore_write_ppc_dscr): Likewise.
384 (elfcore_write_ppc_ebb): Likewise.
385 (elfcore_write_ppc_pmu): Likewise.
386 (elfcore_write_ppc_tm_cgpr): Likewise.
387 (elfcore_write_ppc_tm_cfpr): Likewise.
388 (elfcore_write_ppc_tm_cvmx): Likewise.
389 (elfcore_write_ppc_tm_cvsx): Likewise.
390 (elfcore_write_ppc_tm_spr): Likewise.
391 (elfcore_write_ppc_tm_ctar): Likewise.
392 (elfcore_write_ppc_tm_cppr): Likewise.
393 (elfcore_write_ppc_tm_cdscr): Likewise.
394 (elfcore_write_register_note): Call them.
395 (elfcore_grok_ppc_tar): New function.
396 (elfcore_grok_ppc_ppr): Likewise.
397 (elfcore_grok_ppc_dscr): Likewise.
398 (elfcore_grok_ppc_ebb): Likewise.
399 (elfcore_grok_ppc_pmu): Likewise.
400 (elfcore_grok_ppc_tm_cgpr): Likewise.
401 (elfcore_grok_ppc_tm_cfpr): Likewise.
402 (elfcore_grok_ppc_tm_cvmx): Likewise.
403 (elfcore_grok_ppc_tm_cvsx): Likewise.
404 (elfcore_grok_ppc_tm_spr): Likewise.
405 (elfcore_grok_ppc_tm_ctar): Likewise.
406 (elfcore_grok_ppc_tm_cppr): Likewise.
407 (elfcore_grok_ppc_tm_cdscr): Likewise.
408 (elfcore_grok_note): Call them.
410 2018-07-11 Maciej W. Rozycki <macro@mips.com>
412 * elfxx-mips.c (mips_tls_got_relocs): Use `bfd_link_dll' rather
413 than `!bfd_link_pic' in determining the dynamic symbol index.
414 Avoid the index of -1.
415 (mips_elf_initialize_tls_slots): Likewise. Flatten code by
416 moving `dyn' to the beginning of the function block.
418 2018-07-11 Maciej W. Rozycki <macro@mips.com>
419 Rich Felker <bugdal@aerifal.cx>
422 * elfxx-mips.c (mips_tls_got_relocs): Use `bfd_link_dll' rather
423 than `bfd_link_pic' to determine whether dynamic relocations are
425 (mips_elf_initialize_tls_slots): Likewise.
427 2018-07-10 Maciej W. Rozycki <macro@mips.com>
429 * elflink.c (bfd_elf_final_link): Rename `remove' local variable
432 2018-07-10 Alan Modra <amodra@gmail.com>
434 * elf32-xgate.h: Delete.
435 * elf32-xgate.c: Delete unnecessary forward declarations, add two
437 (xgate_elf_bfd_link_hash_table_create)
438 (xgate_elf_bfd_link_hash_table_free)
439 (xgate_elf_set_mach_from_flags, struct xgate_scan_param)
440 (stub_hash_newfunc, elf32_xgate_add_symbol_hook)
441 (elf32_xgate_setup_section_lists, elf32_xgate_size_stubs)
442 (elf32_xgate_build_stubs, elf32_xgate_check_relocs)
443 (elf32_xgate_relocate_section, _bfd_xgate_elf_set_private_flags)
444 (elf32_xgate_post_process_headers): Delete.
445 (elf32_xgate_backend_symbol_processing): New function.
446 (xgate_elf_ignore_reloc, xgate_elf_special_reloc)
447 (_bfd_xgate_elf_print_private_bfd_data): Make static.
448 (ELF_TARGET_ID, elf_info_to_howto, elf_backend_check_relocs)
449 (elf_backend_relocate_section, elf_backend_object_p)
450 (elf_backend_final_write_processing, elf_backend_can_gc_sections)
451 (elf_backend_post_process_headers, elf_backend_add_symbol_hook)
452 (bfd_elf32_bfd_link_hash_table_create)
453 (bfd_elf32_bfd_set_private_flags)
454 (xgate_stub_hash_lookup): Don't define.
455 (elf_backend_symbol_processing): Define.
456 * elf-bfd.h (elf_target_id): Delete XGATE_ELF_DATA.
458 2018-07-09 Maciej W. Rozycki <macro@mips.com>
460 * elfxx-mips.c (_bfd_mips_elf_adjust_dynamic_symbol): Don't set
461 `->needs_lazy_stub' if the stubs output section is the absolute
464 2018-07-09 H.J. Lu <hongjiu.lu@intel.com>
467 * configure.ac: Use changequote for "i[3-7]86-*-linux-*".
468 * configure: Regenerated.
470 2018-07-09 Alan Modra <amodra@gmail.com>
472 * elf32-m68hc1x.c (elf32_m68hc11_post_process_headers): Call
473 _bfd_elf_post_process_headers.
475 2018-07-06 Max Filippov <jcmvbkbc@gmail.com>
477 * elf32-xtensa.c (elf_xtensa_allocate_dynrelocs): Don't allocate
478 space for dynamic relocation for undefined weak symbol.
479 (elf_xtensa_relocate_section): Don't emit R_XTENSA_RELATIVE
480 relocation for undefined weak symbols.
481 (shrink_dynamic_reloc_sections): Don't shrink dynamic relocation
482 section for relocations against undefined weak symbols.
484 2018-07-06 Alan Hayward <alan.hayward@arm.com>
486 * elf.c (elfcore_grok_aarch_sve): New function.
487 (elfcore_grok_note): Check for Aarch64 SVE.
488 (elfcore_write_aarch_sve): New function.
489 (elfcore_write_register_note): Check for Aarch64 SVE.
490 * elf-bfd.h(elfcore_grok_aarch_sve): New declaration.
492 2018-07-06 Alan Modra <amodra@gmail.com>
494 * elf32-arm.c (elf32_arm_nabi_write_core_note): Don't use
495 DIAGNOTIC_PUSH and DIAGNOSTIC_POP unconditionally.
496 * elf32-ppc.c (ppc_elf_write_core_note): Likewise.
497 * elf32-s390.c (elf_s390_write_core_note): Likewise.
498 * elf64-ppc.c (ppc64_elf_write_core_note): Likewise.
499 * elf64-s390.c (elf_s390_write_core_note): Likewise.
500 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise.
502 2018-07-05 Jim Wilson <jimw@sifive.com>
504 * config.bfd (riscv32*-*-*): Renamed from riscv32-*-*.
505 (riscv64*-*-*): Likewise.
506 (riscv-*-*): Add as an alias for riscv32*-*-*.
508 2018-07-05 H.J. Lu <hongjiu.lu@intel.com>
511 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Remove x86
512 ISA properties with empty bits.
514 2018-07-05 Nick Clifton <nickc@redhat.com>
516 * po/ru.po: Updated Russian translation.
518 2018-07-05 Alan Modra <amodra@gmail.com>
520 * elf-bfd.h (_bfd_elf_ppc_merge_fp_attributes): Update prototype.
521 * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Return error
522 on mismatch. Remove "warning: " from messages. Track last bfd
524 (ppc_elf_merge_obj_attributes): Likewise. Handle status from
525 _bfd_elf_ppc_merge_fp_attributes.
526 * elf64-ppc.c (ppc64_elf_merge_private_bfd_data): Handle status
527 from _bfd_elf_ppc_merge_fp_attributes.
529 2018-07-04 H.J. Lu <hongjiu.lu@intel.com>
531 * Makefile.am (bfdinclude_HEADERS): Add $(INCDIR)/diagnostics.h.
532 * Makefile.in: Regenerated.
534 2018-07-03 Alan Modra <amodra@gmail.com>
536 * elflink.c (bfd_elf_final_link): Remove zero size .gnu.attributes
539 2018-07-03 Alan Modra <amodra@gmail.com>
541 * elf-bfd.h (ATTR_TYPE_FLAG_ERROR, ATTR_TYPE_HAS_ERROR): Define.
542 * elf-attrs.c (is_default_attr): Handle ATTR_TYPE_HAS_ERROR.
543 * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Use
544 ATTR_TYPE_FLAG_INT_VAL. Set ATTR_TYPE_HAS_ERROR on finding
545 incompatible attribute.
546 (ppc_elf_merge_obj_attributes): Likewise. Return
547 _bfd_elf_merge_object_attributes result.
548 * elf64-ppc.c (ppc64_elf_merge_private_bfd_data): Return
549 _bfd_elf_merge_object_attributes result.
551 2018-07-03 Alan Modra <amodra@gmail.com>
554 * elflink.c (_bfd_elf_fix_symbol_flags): Hide dynamic symbols
555 in discarded sections.
557 2018-07-02 Maciej W. Rozycki <macro@mips.com>
559 * elfxx-mips.c (_bfd_mips_elf_create_dynamic_sections): Set
560 `mark' for symbols created from `mips_elf_dynsym_rtproc_names'
563 2018-07-02 Maciej W. Rozycki <macro@mips.com>
565 * elf64-mips.c (micromips_elf64_howto_table_rel): Add
566 R_MICROMIPS_HI0_LO16, R_MICROMIPS_TLS_GD, R_MICROMIPS_TLS_LDM,
567 R_MICROMIPS_TLS_DTPREL_HI16, R_MICROMIPS_TLS_DTPREL_LO16,
568 R_MICROMIPS_TLS_GOTTPREL, R_MICROMIPS_TLS_TPREL_HI16,
569 R_MICROMIPS_TLS_TPREL_LO16, R_MICROMIPS_GPREL7_S2 and
570 R_MICROMIPS_PC23_S2 relocation entries.
571 (micromips_elf64_howto_table_rela): Likewise.
572 (micromips_reloc_map): Likewise.
573 * elfn32-mips.c (elf_micromips_howto_table_rel): Likewise.
574 (elf_micromips_howto_table_rela): Likewise.
575 (micromips_reloc_map): Likewise.
577 2018-07-02 H.J. Lu <hongjiu.lu@intel.com>
580 * elf64-x86-64.c (elf_x86_64_relocate_section): Clear the
581 R_X86_64_converted_reloc_bit bit.
583 2018-07-02 Jeff Muizelaar <jrmuizel@gmail.com>
584 Tom Tromey <tom@tromey.com>
588 * mach-o.c (bfd_mach_o_fat_close_and_cleanup): New function.
589 (bfd_mach_o_close_and_cleanup): Redefine.
590 * archive.c (_bfd_unlink_from_archive_parent): New function,
592 (_bfd_archive_close_and_cleanup): ..here.
593 (bfd_generic_archive_p): Do not clear archive's format.
594 * libbfd-in.h (_bfd_unlink_from_archive_parent): Declare.
595 * libbfd.h: Regenerate.
597 2018-07-02 Thomas Preud'homme <thomas.preudhomme@arm.com>
599 * archures.c (bfd_mach_arm_5TEJ, bfd_mach_arm_6, bfd_mach_arm_6KZ,
600 bfd_mach_arm_6T2, bfd_mach_arm_6K, bfd_mach_arm_7, bfd_mach_arm_6M,
601 bfd_mach_arm_6SM, bfd_mach_arm_7EM, bfd_mach_arm_8, bfd_mach_arm_8R,
602 bfd_mach_arm_8M_BASE, bfd_mach_arm_8M_MAIN): Define.
603 * bfd-in2.h: Regenerate.
604 * cpu-arm.c (arch_info_struct): Add entries for above new
606 * elf32-arm.c (bfd_arm_get_mach_from_attributes): Add Tag_CPU_arch to
607 bfd_mach_arm mapping logic for pre Armv4 and Armv5TEJ and later
608 architectures. Force assert failure for any new Tag_CPU_arch value.
610 2018-07-02 Thomas Preud'homme <thomas.preudhomme@arm.com>
612 * doc/bfdint.texi: Use command-line consistently when used in a
614 * doc/bfdsumm.texi: Likewise.
616 2018-06-29 Maciej W. Rozycki <macro@mips.com>
618 * elfxx-mips.c (allocate_dynrelocs): Remove extraneous symbol
619 visibility check made for undefined weak symbols.
621 2018-06-26 Nick Clifton <nickc@redhat.com>
623 * po/uk.po: Updated Ukranian translation.
625 2018-06-25 Nick Clifton <nickc@redhat.com>
627 * elfnn-aarch64.c (_bfd_aarch64_erratum_835769_stub_name): Check
628 for malloc returning NULL.
629 (_bfd_aarch64_erratum_843419_fixup): Check for
630 _bfd_aarch64_erratum_835769_stub_name returning NULL.
632 2018-06-24 Nick Clifton <nickc@redhat.com>
634 * po/bfd.pot: Regenerate.
636 2018-06-24 Nick Clifton <nickc@redhat.com>
638 * version.m4: Update version string to 2.31.51.
639 * configure: Regenerate.
641 2018-06-24 Nick Clifton <nickc@redhat.com>
645 2018-06-21 Maciej W. Rozycki <macro@mips.com>
647 * elfxx-mips.c (_bfd_mips_elf_compact_eh_encoding)
648 (_bfd_mips_elf_cant_unwind_opcode): Correct formatting.
650 2018-06-21 Maciej W. Rozycki <macro@mips.com>
652 * elfxx-mips.c (_bfd_mips_post_process_headers): Keep
653 EI_ABIVERSION setting together.
655 2018-06-21 Maciej W. Rozycki <macro@mips.com>
657 * elfxx-mips.c (MIPS_LIBC_ABI_DEFAULT, MIPS_LIBC_ABI_MIPS_PLT)
658 (MIPS_LIBC_ABI_UNIQUE, MIPS_LIBC_ABI_MIPS_O32_FP64)
659 (MIPS_LIBC_ABI_MAX): New enumeration constants.
660 (_bfd_mips_post_process_headers): Use them in place of magic
663 2018-06-21 Jim Wilson <jimw@sifive.com>
665 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Update comment.
666 Use SYMBOL_REFERENCES_LOCAL. Add asserts for h->got.offset.
668 2018-06-21 Alan Modra <amodra@gmail.com>
670 * doc/Makefile.am (AUTOMAKE_OPTIONS): Add "foreign".
671 * doc/Makefile.in: Regenerate.
673 2018-06-20 Renlin Li <renlin.li@arm.com>
675 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Use PG_OFFSET
676 to resolve BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC,
677 BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC,
678 BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC,
679 BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC,
680 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
681 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
682 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
683 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
685 2018-06-20 Nick Clifton <nickc@redhat.com>
688 * opncls.c (get_build_id): Check for a negative or excessive data
689 size in the build-id note.
691 2018-06-20 Nick Clifton <nickc@redhat.com>
694 * mach-o.c (cputype): New function.
695 (cpusubtype): New function.
696 (bfd_mach_o_bfd_print_private_data): New function. Dispalys the
697 values in the MACH-O file header.
698 (bfd_mach_o_bfd_copy_private_header_data): Copy the cputype and
699 cpusubtype fields from the input bfd's mach-o header to the output
701 * mach-o-target.c (bfd_mach_o_bfd_print_private_bfd_data):
702 Redefine to bfd_mach_o_bfd_print_private_data.
703 * mach-o.h (bfd_mach_o_bfd_print_private_bfd_data): Prototype.
705 2018-06-19 Maciej W. Rozycki <macro@mips.com>
708 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Verify the
709 `.got.plt' entry referred is in range.
710 (mips_finish_exec_plt): Correct the range check for `.got.plt'
711 start. Replace the assertion used for that with a proper error
714 2018-06-19 Maciej W. Rozycki <macro@mips.com>
716 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Fix
719 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
721 * Makefile.am (AUTOMAKE_OPTIONS): Remove 1.11.
722 (INCLUDES): Rename to ...
723 (AM_CPPFLAGS): ... this.
724 * configure.ac: Remove AC_PREREQ.
725 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove 1.9, cygnus, add
726 info-in-builddir no-texinfo.tex.
727 (info_TEXINFOS): Rename bfd.texinfo to bfd.texi.
728 * doc/bfd.texinfo: Rename to ...
729 * doc/bfd.texi: ... this.
730 * Makefile.in: Re-generate.
731 * aclocal.m4: Re-generate.
732 * config.in: Re-generate.
733 * configure: Re-generate.
734 * doc/Makefile.in: Re-generate.
736 2018-06-18 Mephi <mephi42@gmail.com>
739 * mach-o-x86-64.c (x86_64_howto_table): Add entry for
740 BFD_RELOC_MACH_O_X86_64_RELOC_TLV.
741 (bfd_mach_o_x86_64_canonicalize_one_reloc): Handle the new reloc.
742 (bfd_mach_o_x86_64_swap_reloc_out): Likewise.
743 * reloc.c (BFD_RELOC_MACH_O_X86_64_TV): New entry.
744 * bfd-in2.h: Regenerate.
745 * libbfd.h: Regenerate.
747 2018-06-14 Faraz Shahbazker <Faraz.Shahbazker@mips.com>
749 * elfxx-mips.c (print_mips_ases): Add GINV extension.
751 2018-06-14 H.J. Lu <hongjiu.lu@intel.com>
754 * elf.c (_bfd_elf_get_symbol_version_string): Check if the first
755 symbol version is base version.
757 2018-06-14 Alan Modra <amodra@gmail.com>
759 * elf-bfd.h (struct elf_link_hash_table): Add "dynamic_relocs".
760 * elflink.c (_bfd_elf_init_2_index_sections): Comment fix.
761 (_bfd_elf_add_dynamic_entry): Set "dynamic_relocs".
762 (_bfd_elf_link_renumber_dynsyms): Exclude all section symbols when
763 "dynamic_relocs" is not set.
764 * elfxx-mips.c (count_section_dynsyms): Likewise.
766 2018-06-14 Alan Modra <amodra@gmail.com>
769 * bfdio.c (bfd_seek): Optimize away seeks to current position.
771 2018-06-13 Scott Egerton <scott.egerton@imgtec.com>
772 Faraz Shahbazker <Faraz.Shahbazker@mips.com>
774 * elfxx-mips.c (print_mips_ases): Add CRC.
776 2018-06-08 H.J. Lu <hongjiu.lu@intel.com>
779 * elfxx-x86.c (elf_x86_hide_linker_defined): New function.
780 (_bfd_x86_elf_link_check_relocs): Use it to hide hidden
781 __bss_start, _end and _edata in shared libraries.
783 2018-06-07 Alan Modra <amodra@gmail.com>
785 * elf32-tic6x.c (elf32_tic6x_check_relocs): Reference
786 __c6xabi_DSBT_BASE explicitly for R_C6000_SBR_* relocs.
788 2018-06-05 Alan Modra <amodra@gmail.com>
790 * bfd.c (struct bfd): Update comment on "where" usage.
791 * bfdio.c (bfd_bwrite, bfd_stat): Use and update "iovec",
792 "iostream", and "where" from containing archive file. Return
794 (bfd_bread): Similarly, and return error attempted out of
795 bounds archive element access.
796 (bfd_tell, bfd_flush): Use and update "iovec", "iostream", and
797 "where" from containing archive file.
798 (bfd_seek): Likewise. Return error on NULL iovec. Don't
799 attempt to optimize away seeks. Don't paper over errors by
801 (bfd_get_mtime): Call bfd_stat rather than iovec->bstat.
802 (bfd_get_size): Likewise.
803 (bfd_mmap): Operate on and use iovec of containing archive
804 file. Return error on NULL iovec.
805 * cache.c (bfd_cache_lookup_worker): Abort if working on
807 (cache_bread_1): Delete bfd parameter, add FILE* parameter.
808 Don't ignore zero byte reads.
809 (cache_bread): Look up FILE* in cache here. Error on NULL
811 (cache_bwrite): Rename "where" to "from".
812 (cache_bmmap): Don't handle archive elements.
813 * coffcode.h (coff_slurp_line_table): Exit early on zero
815 * bfd-in2.h: Regenerate.
817 2018-06-05 Alan Modra <amodra@gmail.com>
820 * plugin.c (bfd_plugin_open_input): Allow for possibility of
821 nested archives. Open file again for plugin.
822 (try_claim): Don't save and restore file position. Close file
824 * sysdep.h (O_BINARY): Define.
826 2018-06-04 Max Filippov <jcmvbkbc@gmail.com>
828 * elf32-xtensa.c (xtensa_read_table_entries): Make global.
829 (compute_fill_extra_space): Drop declaration. Rename function to
830 xtensa_compute_fill_extra_space.
831 (compute_ebb_actions, remove_dead_literal): Update references to
832 compute_fill_extra_space.
834 2018-06-04 Volodymyr Arbatov <arbatov@cadence.com>
836 * elf32-xtensa.c (elf32xtensa_separate_props): New global
838 (xtensa_add_names): New function.
839 (xtensa_property_section_name): Add new parameter
840 separate_sections, use it to choose property section name.
841 (xtensa_get_separate_property_section): New function.
842 (xtensa_get_property_section): Invoke
843 xtensa_get_separate_property_section to get individual property
844 section if it exists, common property section otherwise.
845 (xtensa_make_property_section): Pass elf32xtensa_separate_props
846 to xtensa_property_section_name.
848 2018-06-04 H.J. Lu <hongjiu.lu@intel.com>
851 * bfd-in.h: Include "diagnostics.h".
852 * bfd-in2.h: Regenerated.
853 * elf32-arm.c (elf32_arm_nabi_write_core_note): Use
854 DIAGNOSTIC_PUSH, DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION and
855 DIAGNOSTIC_POP to silence GCC 8.1 warnings with
856 -Wstringop-truncation.
857 * elf32-ppc.c (ppc_elf_write_core_note): Likewse.
858 * elf32-s390.c (elf_s390_write_core_note): Likewse.
859 * elf64-ppc.c (ppc64_elf_write_core_note): Likewse.
860 * elf64-s390.c (elf_s390_write_core_note): Likewse.
861 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewse.
863 2018-06-03 Jim Wilson <jimw@sifive.com>
866 * elfnn-riscv.c (riscv_elf_relocate_section) <R_RISCV_CALL>: Check
867 for and handle an undefined weak with no PLT.
870 * elfnn-riscv.c (riscv_relax_delete_bytes): Add versioned_hidden check
871 to code that ignores duplicate symbols.
873 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
875 * version.m4: Bump version to 2.30.52
876 * configure: Regenerated.
878 2018-06-01 Alan Modra <amodra@gmail.com>
880 * bfd.c (_bfd_error_handler): Arrange for this function to be
881 declared in bfd-in2.h.
882 * libbfd-in.h (_bfd_error_handler): Don't declare.
883 * libbfd.h: Regenerate.
884 * bfd-in2.h: Regenerate.
886 2018-05-30 Amaan Cheval <amaan.cheval@gmail.com>
888 * config.bfd (x86_64-*-*): Add pei-x86-64 target to x86_64-*-rtems*
889 This is needed to generate UEFI application image files from ELFs.
891 2018-05-28 H.J. Lu <hongjiu.lu@intel.com>
893 * elf32-i386.c (elf_i386_lazy_plt): Add plt_tlsdesc_entry,
894 plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset,
895 plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and
896 plt_tlsdesc_got2_insn_end for TLSDESC entry.
897 (elf_i386_lazy_ibt_plt): Likewise.
898 (elf_i386_nacl_plt): Likewise.
899 * elf64-x86-64.c (tlsdesc_plt_entry): Moved and renamed to ...
900 (elf_x86_64_tlsdesc_plt_entry): This.
901 (elf_x86_64_lazy_plt): Add plt_tlsdesc_entry,
902 plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset,
903 plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and
904 plt_tlsdesc_got2_insn_end for TLSDESC entry.
905 (elf_x86_64_lazy_bnd_plt): Likewise.
906 (elf_x86_64_lazy_ibt_plt): Likewise.
907 (elf_x32_lazy_ibt_plt): Likewise.
908 (elf_x86_64_nacl_plt): Likewise.
909 (elf_x86_64_finish_dynamic_sections): Use plt_tlsdesc_entry,
910 plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset,
911 plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and
912 plt_tlsdesc_got2_insn_end to update TLSDESC entry.
913 * elfxx-x86.h (elf_x86_lazy_plt_layout): Update comments.
914 Add plt_tlsdesc_entry, plt_tlsdesc_entry_size,
915 plt_tlsdesc_got1_offset, plt_tlsdesc_got2_offset,
916 plt_tlsdesc_got1_insn_end and plt_tlsdesc_got2_insn_end.
917 (elf_x86_non_lazy_plt_layout): Update comments.
918 (elf_x86_plt_layout): Likewise.
920 2018-05-28 H.J. Lu <hongjiu.lu@intel.com>
923 * elf-s390-common.c (elf_s390_add_symbol_hook): Removed.
924 * elf32-arc.c (elf_arc_add_symbol_hook): Likewise.
925 (elf_backend_add_symbol_hook): Likewise.
926 * elf32-m68k.c (elf_m68k_add_symbol_hook): Likewise.
927 (elf_backend_add_symbol_hook): Likewise.
928 * elf32-s390.c (elf_backend_add_symbol_hook): Likewise.
929 * elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise.
930 (elf_backend_add_symbol_hook): Likewise.
931 * elf64-s390.c (elf_backend_add_symbol_hook): Likewise.
932 * elfxx-aarch64.c (_bfd_aarch64_elf_add_symbol_hook): Likewise.
933 * elfxx-aarch64.h (_bfd_aarch64_elf_add_symbol_hook): Likewise.
934 (elf_backend_add_symbol_hook): Likewise.
935 * elf32-arm.c (elf32_arm_add_symbol_hook): Remove STT_GNU_IFUNC
937 * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
938 * elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise.
939 * elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise.
940 * elflink.c (elf_link_add_object_symbols): Set
941 elf_gnu_symbol_ifunc for STT_GNU_IFUNC symbols.
943 2018-05-26 H.J. Lu <hongjiu.lu@intel.com>
946 * elf-bfd.h (_bfd_elf_link_hide_sym_by_version): New.
947 * elflink.c (_bfd_elf_link_hide_versioned_symbol): New function.
948 Extracted from _bfd_elf_link_assign_sym_version.
949 (_bfd_elf_link_hide_sym_by_version): New function.
950 (_bfd_elf_link_assign_sym_version): Use
951 _bfd_elf_link_hide_versioned_symbol.
952 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Call
953 _bfd_elf_link_hide_sym_by_version instead of
954 bfd_hide_sym_by_version. Don't check unversioned symbol.
956 2018-05-25 Alan Modra <amodra@gmail.com>
958 * Makefile.in: Regenerate.
959 * po/SRC-POTFILES.in: Regenerate.
961 2018-05-25 Alan Modra <amodra@gmail.com>
963 * configure.ac (bfd_cv_hidden): Run test with -Werror in CFLAGS.
964 * configure: Regenerate.
966 2018-05-23 H.J. Lu <hongjiu.lu@intel.com>
968 * elf64-ppc.c (ppc64_elf_write_core_note): Add ATTRIBUTE_NONSTRING
971 2018-05-22 Alan Modra <amodra@gmail.com>
974 * elf32-hppa.c (hppa_get_stub_entry): Return NULL when link_sec
976 (elf32_hppa_size_stubs): Only create stubs for load, alloc, code
978 (final_link_relocate): Revert last change.
980 2018-05-22 Alan Modra <amodra@gmail.com>
983 * elf32-hppa.c (final_link_relocate): Don't look for plt call
984 stubs in non-alloc sections.
986 2018-05-21 H.J. Lu <hongjiu.lu@intel.com>
989 * aout-target.h (MY_bfd_link_hide_symbol): New.
990 * aout-tic30.c (MY_bfd_link_hide_symbol): Likewise.
991 * binary.c (binary_bfd_link_hide_symbol): Likewise.
992 * coff-alpha.c (_bfd_ecoff_bfd_link_hide_symbol): Likewise.
993 * coff-mips.c (_bfd_ecoff_bfd_link_hide_symbol): Likewise.
994 * coff-rs6000.c (_bfd_xcoff_bfd_link_hide_symbol): Likewise.
995 * coffcode.h (coff_bfd_link_hide_symbol): Likewise.
996 * elf-bfd.h (_bfd_elf_link_hide_symbol): Likewise.
997 * elfxx-target.h (bfd_elfNN_bfd_link_hide_symbol): Likewise.
998 * i386msdos.c (msdos_bfd_link_hide_symbol): Likewise.
999 * ihex.c (ihex_bfd_link_hide_symbol): Likewise.
1000 * libbfd-in.h (_bfd_nolink_bfd_link_hide_symbol): Likewise.
1001 * linker.c (_bfd_generic_link_hide_symbol): Likewise.
1002 (bfd_link_hide_symbol): Likewise.
1003 * mach-o-target.c (bfd_mach_o_bfd_link_hide_symbol): Likewise.
1004 * mmo.c (mmo_bfd_link_hide_symbol): Likewise.
1005 * pef.c (bfd_pef_bfd_link_hide_symbol): Likewise.
1006 * plugin.c (bfd_plugin_bfd_link_hide_symbol): Likewise.
1007 * ppcboot.c (ppcboot_bfd_link_hide_symbol): Likewise.
1008 * som.c (som_bfd_link_hide_symbol): Likewise.
1009 * srec.c (srec_bfd_link_hide_symbol): Likewise.
1010 * tekhex.c (tekhex_bfd_link_hide_symbol): Likewise.
1011 * vms-alpha.c (vms_bfd_link_hide_symbol): Likewise.
1012 (alpha_vms_bfd_link_hide_symbol): Likewise.
1013 * xsym.c (bfd_sym_bfd_link_hide_symbol): Likewise.
1014 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
1015 _bfd_generic_link_hide_symbol.
1016 (rs6000_xcoff64_aix_vec): Likewise.
1017 * elflink.c (bfd_elf_record_link_assignment): Don't make forced
1018 local symbol dynamic.
1019 (_bfd_elf_link_hide_symbol): New function.
1020 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
1021 check root.ldscript_def.
1022 * targets.c (bfd_target): Add _bfd_link_hide_symbol.
1023 (BFD_JUMP_TABLE_LINK): Add NAME##_bfd_link_hide_symbol.
1024 * bfd-in2.h: Regenerated.
1025 * libbfd.h: Likewise.
1027 2018-05-21 H.J. Lu <hongjiu.lu@intel.com>
1030 * elf.c (setup_group): Mark section in a section group with
1033 2018-05-18 H.J. Lu <hongjiu.lu@intel.com>
1036 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
1037 set eh->local_ref to 1 if a symbol is versioned and there is a
1040 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
1042 * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Handle
1045 2018-05-18 Jim Wilson <jimw@sifive.com>
1047 * elfnn-riscv.c (allocate_dynrelocs): Discard dynamic relocations if
1048 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1049 (riscv_elf_relocate_section): Don't generate dynamic relocation if
1050 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1051 (riscv_elf_finish_dynamic_symbol): Likewise.
1053 2018-05-18 John Darrington <john@darrington.wattle.id.au>
1055 * Makefile.am: Add s12z files.
1056 * Makefile.in: Regenerate.
1057 * archures.c: Add bfd_s12z_arch.
1058 * bfd-in.h: Add exports of bfd_putb24 and bfd_putl24.
1059 * bfd-in2.h: Regenerate.
1060 * config.bfd: Add s12z target.
1061 * configure.ac: Add s12z target.
1062 * configure: Regenerate.
1063 * cpu-s12z.c: New file.
1064 * elf32-s12z.c: New file.
1065 * libbfd.c (bfd_putb24): New function.
1066 (bfd_putl24): New function.
1067 * libbfd.h: Regenerate.
1068 * reloc.c: Add s12z relocations.
1069 (bfd_get_reloc_size): Handle size 5 relocs.
1070 * targets.c: Add s12z_elf32_vec.
1072 2018-05-18 H.J. Lu <hongjiu.lu@intel.com>
1075 * elf32-i386.c (elf_i386_relocate_section): Handle R_386_GOT32X
1077 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
1078 set eh->local_ref to 1 for linker defined symbols.
1080 2018-05-18 Alan Modra <amodra@gmail.com>
1083 * elf.c (setup_group): Formatting. Check that SHT_GROUP entries
1084 don't point at other SHT_GROUP sections. Set shdr corresponding
1085 to invalid entry, to NULL rather than section 0. Identify
1086 SHT_GROUP section index when reporting an error. Cope with NULL
1089 2018-05-18 Alan Modra <amodra@gmail.com>
1091 * libbfd-in.h (ATTRIBUTE_HIDDEN): Define and use throughout.
1092 * configure.ac (HAVE_HIDDEN): Check compiler support for hidden
1094 * libbfd.h: Regenerate.
1095 * configure: Regenerate.
1096 * config.in: Regenerate.
1098 2018-05-18 Alan Modra <amodra@gmail.com>
1100 * libbfd-in.h: Add include guard.
1101 * libcoff-in.h: Likewise.
1102 * doc/Makefile.am (libbfd.h, libcoff.h): Append another #endif.
1103 * doc/Makefile.in: Regenerate.
1104 * libbfd.h: Regenerate.
1105 * libcoff.h: Regenerate.
1107 2018-05-16 Maciej W. Rozycki <macro@mips.com>
1109 * elf32-nds32.c (nds32_convert_32_to_16): Preset `insn_type'.
1111 2018-05-16 Alan Modra <amodra@gmail.com>
1114 * format.c (struct bfd_preserve): Add section_id.
1115 (bfd_preserve_save, bfd_preserve_restore): Save and restore
1117 (bfd_reinit): Set _bfd_section_id.
1118 (bfd_check_format_matches): Put all matches of any priority into
1119 matching_vector. Save initial section id and start each attempted
1120 match at that section id.
1121 * libbfd-in.h (_bfd_section_id): Declare.
1122 * section.c (_bfd_section_id): Rename from section_id and make
1123 global. Adjust uses.
1124 (bfd_get_next_section_id): Delete.
1125 * elf64-ppc.c (ppc64_elf_setup_section_lists): Replace use of
1126 bfd_get_section_id with _bfd_section_id.
1127 * libbfd.h: Regenerate.
1128 * bfd-in2.h: Regenerate.
1130 2018-05-15 Christophe Guillon <christophe.guillon@st.com>
1132 * coffcode.h (coff_bigobj_swap_aux_in): Make sure that all fields
1133 of the aux structure are initialised.
1135 2018-05-15 Francois H. Theron <francois.theron@netronome.com>
1137 * targets.c: Wrap nfp_elf64_vec in BFD64 ifdef.
1139 2018-05-15 Nick Clifton <nickc@redhat.com>
1141 * po/pt.po: New Portuguese translation.
1142 * configure.ac (ALL_LINGUAS): Add pt.
1143 * configure: Regenerate.
1145 2018-05-14 H.J. Lu <hongjiu.lu@intel.com>
1148 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Don't issue
1149 an error on IFUNC pointer defined in PDE.
1150 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Call
1151 _bfd_x86_elf_link_fixup_ifunc_symbol.
1152 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
1153 * elfxx-x86.c (_bfd_x86_elf_link_fixup_ifunc_symbol): New
1155 * elfxx-x86.h (_bfd_x86_elf_link_fixup_ifunc_symbol): New.
1157 2018-05-14 H.J. Lu <hongjiu.lu@intel.com>
1160 * elfxx-x86.c (elf_x86_linker_defined): New function.
1161 (_bfd_x86_elf_link_check_relocs): Use it to mark __bss_start,
1162 _end and _edata locally defined within executables.
1164 2018-05-12 Alan Modra <amodra@gmail.com>
1167 * elf.c (rewrite_elf_program_header): Use segment_mark only for
1168 PT_LOAD headers. Delete first_matching_lma and first_suggested_lma.
1169 Instead make matching_lma and suggested_lma pointers to the
1170 sections. Align section vma and lma calculated from segment.
1171 Don't clear includes_phdrs or includes_filehdr based on p_paddr
1172 test. Try to handle alignment padding before first section by
1173 adjusting new segment lma down. Adjust PT_PHDR map p_paddr.
1175 2018-05-09 Dimitar Dimitrov <dimitar@dinux.eu>
1177 * elf32-pru.c (pru_elf32_do_ldi32_relocate): Make LDI32 relocation
1178 conformant to TI ABI.
1179 (pru_elf32_relax_section): Likewise.
1180 (pru_elf_relax_delete_bytes): Fix offsets for new LDI32 code.
1181 * elf32-pru.c (pru_elf32_do_ldi32_relocate): Ignore addend.
1182 (pru_elf32_pmem_relocate): Trap - should not get here.
1183 (pru_elf32_relocate_section): Add support for REL relocations.
1184 (elf_info_to_howto_rel): Enable REL.
1185 (elf_backend_may_use_rel_p): Likewise.
1186 (elf_backend_may_use_rela_p): Likewise.
1187 (elf_backend_default_use_rela_p): Likewise.
1189 2018-05-09 Alan Modra <amodra@gmail.com>
1192 * peXXigen.c (pe_print_edata): Correct minimum size.
1194 2018-05-09 Alan Modra <amodra@gmail.com>
1197 * peXXigen.c (pe_print_idata): Bound check hint_addr.
1199 2018-05-08 Nick Clifton <nickc@redhat.com>
1202 * elf.c (bfd_elf_get_str_section): Check for an excessively large
1204 * elf-attrs.c (_bfd_elf_parse_attributes): Issue an error if the
1205 attribute section is larger than the size of the file.
1207 2018-05-07 Alan Modra <amodra@gmail.com>
1209 * cofflink.c (_bfd_coff_link_input_bfd): Use memcmp rather than
1210 strncmp when checking for ".bf" special symbol.
1211 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Make pe_required_section_flags
1212 section name a char array, remove sentinal known_sections entry,
1213 and adjust loop over known_sections to suit. Use memcmp rather
1216 2018-05-04 Alan Modra <amodra@gmail.com>
1218 * elf-linux-core.h (struct elf_external_linux_prpsinfo32_ugid32),
1219 (struct elf_external_linux_prpsinfo32_ugid16),
1220 (struct elf_external_linux_prpsinfo64_ugid32),
1221 (struct elf_external_linux_prpsinfo64_ugid16): Add ATTRIBUTE_NONSTRING
1222 to pr_fname and pr_psargs fields. Remove GCC diagnostic pragmas.
1224 * elf.c (elfcore_write_prpsinfo): ..here. Indent nested preprocessor
1226 * elf32-arm.c (elf32_arm_nabi_write_core_note): Add ATTRIBUTE_NONSTRING
1228 * elf32-ppc.c (ppc_elf_write_core_note): Likewise.
1229 * elf32-s390.c (elf_s390_write_core_note): Likewise.
1230 * elf64-s390.c (elf_s390_write_core_note): Likewise.
1231 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise.
1232 * elf64-x86-64.c (elf_x86_64_write_core_note): Add GCC diagnostic
1234 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Use strnlen to avoid
1235 false positive gcc-8 warning.
1236 * cofflink.c (_bfd_coff_link_input_bfd): Likewise.
1238 2018-05-04 Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
1240 * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Fix the order
1241 of arguments when warning about different long double types.
1243 2018-05-03 Simon Atanasyan <simon@atanasyan.com>
1245 * elf32-mips.c: (elf32_mips_fixup_symbol): New function.
1246 (elf_backend_fixup_symbol): New macro.
1247 * elfxx-mips.c: (mips_elf_output_extsym): Discard _gp_disp
1249 (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
1251 2018-04-30 Francois H. Theron <francois.theron@netronome.com>
1253 * Makefile.am: Added NFP files to build.
1254 * archures.c: Added bfd_arch_nfp
1255 * config.bfd: Added NFP support.
1256 * configure.ac: Added NFP support.
1257 * cpu-nfp.c: New, for NFP support.
1258 * elf-bfd.h: Added elf_section_info()
1259 * elf64-nfp.c: New, for NFP support.
1260 * po/SRC-POTFILES.in: Added NFP source files.
1261 * targets.c: Added nfp_elf64_vec
1262 * bfd-in2.h: Regenerate.
1263 * Makefile.in: Regenerate.
1264 * configure: Regenerate.
1266 2018-04-27 Alan Modra <amodra@gmail.com>
1268 * bfd-in2.h: Regenerate.
1269 * libbfd.h: Regenerate.
1271 2018-04-27 Alan Modra <amodra@gmail.com>
1275 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't drop plt
1277 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Comment fixes.
1279 2018-04-26 Pedro Alves <palves@redhat.com>
1281 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't consider
1282 ifunc and non-ifunc symbols duplicates.
1284 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1285 Mickaël Guêné <mickael.guene@st.com>
1287 * elf32-arm.c (elf32_arm_fdpic_thumb_plt_entry): New.
1288 (elf32_arm_plt_needs_thumb_stub_p): Handle thumb-only case.
1289 (elf32_arm_populate_plt_entry): Likewise.
1290 (elf32_arm_output_plt_map_1): Likewise.
1291 (elf32_arm_output_arch_local_syms): Likewise.
1293 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1294 Mickaël Guêné <mickael.guene@st.com>
1296 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Handle
1297 _GLOBAL_OFFSET_TABLE_ in FDPIC mode.
1299 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1300 Mickaël Guêné <mickael.guene@st.com>
1302 * elf32-arm.c (bfd_elf32_arm_set_target_params): Handle FDPIC case
1305 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1306 Mickaël Guêné <mickael.guene@st.com>
1308 * elf32-arm.c (DEFAULT_STACK_SIZE): New.
1309 (elf32_arm_always_size_sections): Create stack segment.
1311 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1312 Mickaël Guêné <mickael.guene@st.com>
1314 * bfd-in2.h (BFD_RELOC_ARM_TLS_GD32_FDPIC)
1315 (BFD_RELOC_ARM_TLS_LDM32_FDPIC, BFD_RELOC_ARM_TLS_IE32_FDPIC): New
1317 * elf32-arm.c (elf32_arm_howto_table_2): Add R_ARM_TLS_GD32_FDPIC,
1318 R_ARM_TLS_LDM32_FDPIC, R_ARM_TLS_IE32_FDPIC relocations.
1319 (elf32_arm_reloc_map): Add R_ARM_TLS_GD32_FDPIC,
1320 R_ARM_TLS_LDM32_FDPIC, R_ARM_TLS_IE32_FDPIC.
1321 (struct elf32_arm_link_hash_table): Update comment.
1322 (elf32_arm_final_link_relocate): Handle TLS FDPIC relocations.
1323 (IS_ARM_TLS_RELOC): Likewise.
1324 (elf32_arm_check_relocs): Likewise.
1325 (allocate_dynrelocs_for_symbol): Likewise.
1326 (elf32_arm_size_dynamic_sections): Update comment.
1327 * reloc.c: Add BFD_RELOC_ARM_TLS_GD32_FDPIC,
1328 BFD_RELOC_ARM_TLS_LDM32_FDPIC, BFD_RELOC_ARM_TLS_IE32_FDPIC.
1330 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1331 Mickaël Guêné <mickael.guene@st.com>
1333 * elf32-arm.c (elf32_arm_fdpic_plt_entry): New.
1334 (elf32_arm_create_dynamic_sections): Handle FDPIC.
1335 (elf32_arm_allocate_plt_entry): Likewise.
1336 (elf32_arm_populate_plt_entry): Likewise.
1337 (elf32_arm_output_plt_map_1): Likewise.
1339 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1340 Mickaël Guêné <mickael.guene@st.com>
1342 * elf32-arm.c (struct fdpic_local): New.
1343 (elf_arm_obj_tdata): Add local_fdpic_cnts field.
1344 (elf32_arm_local_fdpic_cnts): New.
1345 (struct fdpic_global): New.
1346 (elf32_arm_link_hash_entry): Add fdpic_cnts field.
1347 (elf32_arm_link_hash_table): Add srofixup field.
1348 (arm_elf_add_rofixup): New.
1349 (arm_elf_fill_funcdesc): New.
1350 (elf32_arm_link_hash_newfunc): Handle fdpic_cnts.
1351 (elf32_arm_allocate_local_sym_info): Likewise.
1352 (create_got_section): Create .rofixup section.
1353 (elf32_arm_copy_indirect_symbol): Handle fdpic_cnts.
1354 (bfd_elf32_arm_set_target_params): Handle FDPIC.
1355 (elf32_arm_final_link_relocate): Likewise.
1356 (elf32_arm_check_relocs): Likewise.
1357 (allocate_dynrelocs_for_symbol): Likewise.
1358 (elf32_arm_size_dynamic_sections): Likewise.
1359 (elf32_arm_finish_dynamic_sections): Likewise.
1360 (elf32_arm_output_arch_local_syms): Likewise.
1361 (elf32_arm_fdpic_omit_section_dynsym): New.
1363 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1364 Mickaël Guêné <mickael.guene@st.com>
1366 * bfd-in2.c (BFD_RELOC_ARM_GOTFUNCDESC)
1367 (BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC)
1368 (BFD_RELOC_ARM_FUNCDESC_VALUE): New.
1369 * elf32-arm.c (elf32_arm_howto_table_2): Add R_ARM_GOTFUNCDESC,
1370 R_ARM_GOTOFFFUNCDESC, R_ARM_FUNCDESC, R_ARM_FUNCDESC_VALUE.
1371 (elf32_arm_howto_from_type): Take new members of
1372 elf32_arm_howto_table_2 into account.
1373 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_GOTFUNCDESC,
1374 BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC,
1375 BFD_RELOC_ARM_FUNCDESC_VALUE.
1376 * reloc.c: Add BFD_RELOC_ARM_GOTFUNCDESC,
1377 BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC,
1378 BFD_RELOC_ARM_FUNCDESC_VALUE.
1380 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1381 Mickaël Guêné <mickael.guene@st.com>
1383 * elf32-arm.c (elf32_arm_print_private_bfd_data): Support
1384 EF_ARM_PIC and ELFOSABI_ARM_FDPIC.
1385 (elf32_arm_post_process_headers): Support ELFOSABI_ARM_FDPIC.
1386 (ELF_OSABI): Define to ELFOSABI_ARM_FDPIC.
1388 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1389 Mickaël Guêné <mickael.guene@st.com>
1391 * config.bfd (arm*-*-linux-*): Add arm_elf32_fdpic_be_vec and
1392 arm_elf32_fdpic_le_vec to targ_selvecs. Accept
1393 arm*-*-uclinuxfdpiceabi.
1394 * configure.ac: Add support for arm_elf32_fdpic_be_vec and
1395 arm_elf32_fdpic_le_vec.
1396 * configure: Regenerate.
1397 * elf32-arm.c (struct elf32_arm_link_hash_table): Add fdpic_p.
1398 (elf32_arm_link_hash_table_create): Initialize fdpic_p.
1399 (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME, TARGET_BIG_SYM)
1400 (TARGET_BIG_NAME, elf_match_priority): Define for FDPIC targets.
1401 (elf32_arm_fdpic_link_hash_table_create): New.
1402 * targets.c (_bfd_target_vector): Add arm_elf32_fdpic_be_vec and
1403 arm_elf32_fdpic_le_vec.
1405 2018-04-25 Alan Modra <amodra@gmail.com>
1407 * elf-linux-core.h: Disable gcc-8 string truncation warning.
1408 * elf.c (elfcore_write_prpsinfo): Likewise.
1410 2018-04-25 Alan Modra <amodra@gmail.com>
1412 * Makefile.am: Remove arm-aout and arm-coff support.
1413 * config.bfd: Likewise.
1414 * configure.ac: Likewise.
1415 * targets.c: Likewise.
1416 * aout-arm.c: Delete.
1417 * armnetbsd.c: Delete.
1419 * Makefile.in: Regenerate.
1420 * configure: Regenerate.
1421 * po/SRC-POTFILES.in: Regenerate.
1423 2018-04-24 Nick Clifton <nickc@redhat.com>
1426 * elf.c (ignore_section_sym): Check for the output_section pointer
1427 being NULL before dereferencing it.
1430 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Check for
1431 a negative PE_DEBUG_DATA size before iterating over the debug data.
1433 2018-04-23 Alan Modra <amodra@gmail.com>
1435 * elf-linux-core.h: Revert last change.
1438 2018-04-23 Nick Clifton <nickc@redhat.com>
1441 * aoutx.h (aout_get_external_symbols): Allocate an extra byte at
1442 the end of the string table, and zero it.
1444 2018-04-23 Alan Modra <amodra@gmail.com>
1446 * elf-linux-core.h (swap_linux_prpsinfo32_ugid32_out): Disable
1447 gcc-8 string truncation warning.
1448 (swap_linux_prpsinfo32_ugid16_out): Likewise.
1449 (swap_linux_prpsinfo64_ugid32_out): Likewise.
1450 (swap_linux_prpsinfo64_ugid16_out): Likewise.
1451 * elf.c (elfcore_write_prpsinfo): Likewise.
1453 2018-04-23 Nick Clifton <nickc@redhat.com>
1456 * aoutx.h (aout_get_external_symbols): Allocate an extra byte at
1457 the end of the string table, and zero it.
1459 2018-04-20 Alan Modra <amodra@gmail.com>
1462 * elf32-hppa.c (got_relocs_needed): Add extra param to special
1463 case both dtprel and tprel relocs.
1464 (allocate_dynrelocs): Adjust conditions for got relocs.
1465 (elf32_hppa_relocate_section): Likewise for local sym got relocs.
1466 Emit dynamic relocs on TLS GOT entries for shared libraries,
1467 not when pic. Omit dynamic reloc on dtprel entry when local,
1468 and on tprel entry when local and executable.
1470 2018-04-19 Alan Modra <amodra@gmail.com>
1473 * elf32-hppa.c (elf32_hppa_size_stubs): Init "destination" to -1.
1474 (hppa_type_of_stub): Don't return a long branch stub for
1475 symbols other than those defined statically.
1477 2018-04-19 Alan Modra <amodra@gmail.com>
1479 * Makefile.am: Revert 2018-04-18 coff-mips changes.
1480 * config.bfd: Add back mips_ecoff_le_vec and mips_ecoff_be_vec
1481 to selvecs for mips targets change 2018-04-18.
1482 * configure.ac: Reinstate mips_ecoff_le_vec, mips_ecoff_be_vec
1483 and mips_ecoff_bele_vec.
1484 * targets.c: Likewise.
1485 * coff-mips.c: Resurrect.
1486 * Makefile.in: Regenerate.
1487 * configure: Regenerate.
1488 * po/SRC-POTFILES.in: Regenerate.
1490 2018-04-18 Alan Modra <amodra@gmail.com>
1492 * Makefile.am: Remove mips aout and coff support.
1493 * config.bfd: Likewise.
1494 * configure.ac: Likewise.
1495 * targets.c: Likewise.
1496 * coff-mips.c: Delete
1499 * pei-mips.c: Delete
1500 * Makefile.in: Regenerate.
1501 * configure: Regenerate.
1502 * po/SRC-POTFILES.in: Regenerate.
1504 2018-04-17 H.J. Lu <hongjiu.lu@intel.com>
1506 * elf32-i386.c (elf32_bed): Define before including
1508 * elf64-x86-64.c (elf64_bed): Define before including
1510 (elf32_bed): Define before including "elf32-target.h".
1512 2018-04-17 H.J. Lu <hongjiu.lu@intel.com>
1515 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Use a
1516 normal input file with compatible relocation.
1518 2018-04-18 Alan Modra <amodra@gmail.com>
1520 * Makefile.am: Remove support for assorted i386 aout and coff targets.
1521 * config.bfd: Likewise.
1522 * configure.ac: Likewise.
1523 * doc/bfdint.texi: Likewise.
1524 * targets.c: Likewise.
1525 * freebsd.h: Delete.
1526 * i386dynix.c: Delete.
1527 * i386freebsd.c: Delete.
1528 * i386linux.c: Delete.
1529 * i386mach3.c: Delete.
1530 * i386netbsd.c: Delete.
1531 * i386os9k.c: Delete.
1532 * Makefile.in: Regenerate.
1533 * configure: Regenerate.
1534 * po/SRC-POTFILES.in: Regenerate.
1536 2018-04-17 Andrew Sadek <andrew.sadek.se@gmail.com>
1538 Microblaze Target: PIC data text relative
1540 * bfd/reloc.c (2 new BFD relocations):
1541 BFD_RELOC_MICROBLAZE_64_TEXTPCREL &
1542 BFD_RELOC_MICROBLAZE_64_TEXTPCREL
1543 * bfd/bfd-in2.h: Regenerate
1544 * bfd/libbfd.h: Regenerate
1545 * bfd/elf32-microblaze.c (Handle new relocs): define 'HOWTO' of 3
1546 new relocs and handle them in both relocate and relax functions.
1547 (microblaze_elf_reloc_type_lookup): add mapping between for new
1549 (microblaze_elf_relocate_section): Handle new relocs in case of
1551 (microblaze_elf_relax_section): Handle new relocs for elf relaxation.
1553 2018-04-17 Nick Clifton <nickc@redhat.com>
1556 * aoutx.h (find_nearest_line): Check that the symbol name exists
1557 and is long enough, before attempting to see if it is for a .o
1559 * hash.c (bfd_hash_hash): Add an assertion that the string is not
1561 * linker.c (bfd_link_hash_lookup): Fail if the table or string are
1563 (_bfd_generic_link_add_archive_symbols): Fail if an archive entry
1567 * dwarf2.c (concat_filename): Check for a NULL table pointer.
1569 2018-04-16 Nick Clifton <nickc@redhat.com>
1572 * coffgen.c (coff_pointerize_aux): Check for an out of range
1575 2018-04-16 Alan Modra <amodra@gmail.com>
1577 * Makefile.am: Remove arm-epoc-pe support.
1578 * coff-arm.c: Likewise.
1579 * config.bfd: Likewise.
1580 * configure.ac: Likewise.
1581 * targets.c: Likewise.
1582 * epoc-pe-arm.c: Delete.
1583 * epoc-pei-arm.c: Delete.
1584 * Makefile.in: Regenerate.
1585 * configure: Regenerate.
1586 * po/SRC-POTFILES.in: Regenerate.
1588 2018-04-16 Alan Modra <amodra@gmail.com>
1590 * Makefile.am: Remove sparc-aout and sparc-coff support.
1591 * config.bfd: Likewise.
1592 * configure.ac: Likewise.
1593 * targets.c: Likewise.
1594 * aout-sparcle.c: Delete.
1596 * cf-sparclynx.c: Delete.
1597 * coff-sparc.c: Delete.
1599 * sparclinux.c: Delete.
1600 * sparclynx.c: Delete.
1601 * sparcnetbsd.c: Delete.
1603 * Makefile.in: Regenerate.
1604 * configure: Regenerate.
1605 * po/SRC-POTFILES.in: Regenerate.
1607 2018-04-16 Alan Modra <amodra@gmail.com>
1609 * Makefile.am: Remove m68k-aout and m68k-coff support.
1610 * aoutf1.h: Likewise.
1611 * aoutx.h: Likewise.
1612 * archive.c: Likewise.
1613 * bfd-in.h: Likewise.
1615 * coffcode.h: Likewise.
1616 * coffswap.h: Likewise.
1617 * config.bfd: Likewise.
1618 * configure.ac: Likewise.
1619 * configure.host: Likewise.
1620 * doc/bfd.texinfo: Likewise.
1621 * doc/bfdint.texi: Likewise.
1622 * freebsd.h: Likewise.
1623 * gen-aout.c: Likewise.
1624 * hpux-core.c: Likewise.
1625 * libaout.h: Likewise.
1626 * libbfd-in.h: Likewise.
1627 * pdp11.c: Likewise.
1628 * peicode.h: Likewise.
1629 * riscix.c: Likewise.
1630 * targets.c: Likewise.
1632 * coff-apollo.c: Delete.
1633 * coff-aux.c: Delete.
1634 * coff-m68k.c: Delete.
1635 * coff-svm68k.c: Delete.
1636 * coff-u68k.c: Delete.
1637 * hosts/delta68.h: Delete.
1638 * hosts/hp300bsd.h: Delete.
1639 * hosts/m68kaux.h: Delete.
1640 * hosts/news.h: Delete.
1641 * hp300bsd.c: Delete.
1642 * hp300hpux.c: Delete.
1643 * liboasys.h: Delete.
1644 * m68k4knetbsd.c: Delete.
1645 * m68klinux.c: Delete.
1646 * m68knetbsd.c: Delete.
1648 * versados.c: Delete.
1649 * Makefile.in: Regenerate.
1650 * bfd-in2.h: Regenerate.
1651 * configure: Regenerate.
1652 * libbfd.h: Regenerate.
1653 * po/SRC-POTFILES.in: Regenerate.
1655 2018-04-16 Alan Modra <amodra@gmail.com>
1657 * Makefile.am: Remove sh5 and sh64 support.
1658 * archures.c: Likewise.
1659 * config.bfd: Likewise.
1660 * configure.ac: Likewise.
1661 * cpu-sh.c: Likewise.
1662 * elf32-sh-relocs.h: Likewise.
1663 * elf32-sh.c: Likewise.
1664 * targets.c: Likewise.
1665 * elf32-sh64-com.c: Delete.
1666 * elf32-sh64.c: Delete.
1667 * elf32-sh64.h: Delete.
1668 * elf64-sh64.c: Delete.
1669 * Makefile.in: Regenerate.
1670 * bfd-in2.h: Regenerate.
1671 * configure: Regenerate.
1672 * po/SRC-POTFILES.in: Regenerate.
1674 2018-04-16 Alan Modra <amodra@gmail.com>
1676 * Makefile.am: Remove sh-symbianelf support.
1677 * config.bfd: Likewise.
1678 * configure.ac: Likewise.
1679 * targets.c: Likewise.
1680 * elf32-sh-symbian.c: Delete.
1681 * Makefile.in: Regenerate.
1682 * configure: Regenerate.
1683 * po/SRC-POTFILES.in: Regenerate.
1685 2018-04-16 Alan Modra <amodra@gmail.com>
1687 * Makefile.am: Remove vax-bsd and vax-ultrix support.
1688 * config.bfd: Likewise.
1689 * configure.ac: Likewise.
1690 * targets.c: Likewise.
1692 * Makefile.in: Regenerate.
1693 * configure: Regenerate.
1694 * po/SRC-POTFILES.in: Regenerate.
1696 2018-04-16 Alan Modra <amodra@gmail.com>
1698 * Makefile.am: Remove w65 support.
1699 * archures.c: Likewise.
1700 * coffcode.h: Likewise.
1701 * config.bfd: Likewise.
1702 * configure.ac: Likewise.
1703 * targets.c: Likewise.
1704 * coff-w65.c: Delete.
1705 * cpu-w65.c: Delete.
1706 * Makefile.in: Regenerate.
1707 * bfd-in2.h: Regenerate.
1708 * configure: Regenerate.
1709 * po/SRC-POTFILES.in: Regenerate.
1711 2018-04-16 Alan Modra <amodra@gmail.com>
1713 * Makefile.am: Remove we32k support.
1714 * archures.c: Likewise.
1715 * coffcode.h: Likewise.
1716 * config.bfd: Likewise.
1717 * configure.ac: Likewise.
1718 * targets.c: Likewise.
1719 * coff-we32k.c: Delete.
1720 * cpu-we32k.c: Delete.
1721 * Makefile.in: Regenerate.
1722 * bfd-in2.h: Regenerate.
1723 * configure: Regenerate.
1724 * po/SRC-POTFILES.in: Regenerate.
1726 2018-04-16 Alan Modra <amodra@gmail.com>
1728 * Makefile.am: Remove m88k support.
1729 * aoutx.h: Likewise.
1730 * archures.c: Likewise.
1731 * coffcode.h: Likewise.
1732 * coffswap.h: Likewise.
1733 * config.bfd: Likewise.
1734 * configure.ac: Likewise.
1735 * cpu-ns32k.c: Likewise.
1736 * elf32-nds32.c: Likewise.
1737 * mach-o.c: Likewise.
1738 * netbsd-core.c: Likewise.
1739 * reloc.c: Likewise.
1740 * targets.c: Likewise.
1741 * coff-m88k.c: Delete.
1742 * cpu-m88k.c: Delete.
1743 * elf32-m88k.c: Delete.
1744 * hosts/m88kmach3.h: Delete.
1745 * m88kmach3.c: Delete.
1746 * m88kopenbsd.c: Delete.
1747 * Makefile.in: Regenerate.
1748 * bfd-in2.h: Regenerate.
1749 * configure: Regenerate.
1750 * po/SRC-POTFILES.in: Regenerate.
1752 2018-04-16 Alan Modra <amodra@gmail.com>
1754 * Makefile.am: Remove i370 support.
1755 * archures.c: Likewise.
1756 * config.bfd: Likewise.
1757 * configure.ac: Likewise.
1758 * targets.c: Likewise.
1759 * cpu-i370.c: Delete.
1760 * elf32-i370.c: Delete.
1761 * Makefile.in: Regenerate.
1762 * bfd-in2.h: Regenerate.
1763 * configure: Regenerate.
1764 * po/SRC-POTFILES.in: Regenerate.
1766 2018-04-16 Alan Modra <amodra@gmail.com>
1768 * Makefile.am: Remove h8500 support.
1769 * archures.c: Likewise.
1770 * coffcode.h: Likewise.
1771 * config.bfd: Likewise.
1772 * configure.ac: Likewise.
1773 * targets.c: Likewise.
1774 * coff-h8500.c: Delete.
1775 * cpu-h8500.c: Delete.
1776 * Makefile.in: Regenerate.
1777 * bfd-in2.h: Regenerate.
1778 * configure: Regenerate.
1779 * po/SRC-POTFILES.in: Regenerate.
1781 2018-04-16 Alan Modra <amodra@gmail.com>
1783 * Makefile.am: Remove h8300-coff support.
1784 * coffcode.h: Likewise.
1785 * config.bfd: Likewise.
1786 * configure.ac: Likewise.
1787 * reloc16.c: Likewise.
1788 * targets.c: Likewise.
1789 * coff-h8300.c: Delete.
1790 * Makefile.in: Regenerate.
1791 * configure: Regenerate.
1792 * po/SRC-POTFILES.in: Regenerate.
1794 2018-04-16 Alan Modra <amodra@gmail.com>
1796 * Makefile.am: Remove IEEE 695 support.
1797 * archures.c: Likewise.
1799 * config.bfd: Likewise.
1800 * configure.ac: Likewise.
1801 * doc/bfd.texinfo: Likewise.
1802 * doc/bfdint.texi: Likewise.
1803 * doc/bfdsumm.texi: Likewise.
1804 * section.c: Likewise.
1805 * targets.c: Likewise.
1807 * libieee.h: Delete.
1808 * Makefile.in: Regenerate.
1809 * bfd-in2.h: Regenerate.
1810 * configure: Regenerate.
1811 * po/SRC-POTFILES.in: Regenerate.
1813 2018-04-16 Alan Modra <amodra@gmail.com>
1815 * config.bfd: Remove tandem support.
1817 2018-04-16 Alan Modra <amodra@gmail.com>
1819 * Makefile.am: Remove newsos3 support.
1820 * aoutx.h: Likewise.
1821 * config.bfd: Likewise.
1822 * configure.ac: Likewise.
1823 * targets.c: Likewise.
1824 * newsos3.c: Delete.
1825 * Makefile.in: Regenerate.
1826 * configure: Regenerate.
1827 * po/SRC-POTFILES.in: Regenerate.
1829 2018-04-16 Alan Modra <amodra@gmail.com>
1831 * Makefile.am: Remove netware support.
1832 * bfd-in.h: Likewise.
1834 * config.bfd: Likewise.
1835 * configure.ac: Likewise.
1836 * doc/bfdint.texi: Likewise.
1837 * ecoff.c: Likewise.
1838 * targets.c: Likewise.
1840 * nlm-target.h: Delete.
1842 * nlm32-alpha.c: Delete.
1843 * nlm32-i386.c: Delete.
1844 * nlm32-ppc.c: Delete.
1845 * nlm32-sparc.c: Delete.
1848 * nlmcode.h: Delete.
1849 * nlmswap.h: Delete.
1850 * Makefile.in: Regenerate.
1851 * bfd-in2.h: Regenerate.
1852 * configure: Regenerate.
1853 * po/SRC-POTFILES.in: Regenerate.
1855 2018-04-16 Alan Modra <amodra@gmail.com>
1857 * archures.c: Remove tahoe support.
1858 * config.bfd: Likewise.
1859 * configure.ac: Likewise.
1860 * hosts/tahoe.h: Delete.
1861 * bfd-in2.h: Regenerate.
1862 * configure: Regenerate.
1864 2018-04-14 Alan Modra <amodra@gmail.com>
1866 * elf-bfd.h (struct elf_backend_data): Add relropagesize.
1867 * elfxx-target.h (ELF_RELROPAGESIZE): Provide default and
1869 (elfNN_bed): Init relropagesize.
1870 * bfd.c (bfd_emul_get_commonpagesize): Add boolean param to
1871 select relropagesize.
1872 * elf32-ppc.c (ELF_COMMONPAGESIZE): Define as 0x1000.
1873 (ELF_RELROPAGESIZE): Define as ELF_MAXPAGESIZE.
1874 (ELF_MINPAGESIZE): Don't define.
1875 * elf64-ppc.c (ELF_COMMONPAGESIZE): Define as 0x1000.
1876 (ELF_RELROPAGESIZE): Define as ELF_MAXPAGESIZE.
1877 * bfd-in2.h: Regenerate.
1879 2018-04-14 Alan Modra <amodra@gmail.com>
1881 * elf32-ppc.c (ELF_MAXPAGESIZE, ELF_COMMONPAGESIZE): Don't depend
1882 on __QNXTARGET__ define.
1884 2018-04-14 Alan Modra <amodra@gmail.com>
1886 * config.bfd: Add powerpc-*-lynxos* and powerpc-*-windiss*
1889 2018-04-11 Alan Modra <amodra@gmail.com>
1891 * aout-adobe.c: Delete.
1893 * coff-i860.c: Delete.
1894 * coff-i960.c: Delete.
1895 * cpu-i860.c: Delete.
1896 * cpu-i960.c: Delete.
1897 * elf32-i860.c: Delete.
1898 * elf32-i960.c: Delete.
1899 * hosts/i860mach3.h: Delete.
1900 * Makefile.am: Remove i860, i960, bout, and adobe support.
1901 * archures.c: Remove i860 and i960 support.
1902 * coffcode.h: Likewise.
1903 * reloc.c: Likewise.
1904 * aoutx.h: Comment updates.
1905 * archive.c: Remove BOUT and i960 support.
1906 * bfd.c: Remove BOUT support.
1907 * coffswap.h: Remove i960 support.
1908 * config.bfd: Remove i860, i960 and adobe targets.
1909 * configure.ac: Remove adode, bout, i860, i960, icoff targets.
1910 * targets.c: Likewise.
1911 * ieee.c: Remove i960 support.
1912 * mach-o.c: Remove i860 support.
1913 * Makefile.in: Regenerate.
1914 * bfd-in2.h: Regenerate.
1915 * configure: Regenerate.
1916 * libbfd.h: Regenerate.
1917 * po/SRC-POTFILES.in: Regenerate.
1919 2018-04-09 Maciej W. Rozycki <macro@mips.com>
1921 * elf64-mips.c (mips_elf64_write_rel): Handle a NULL BFD pointer
1922 in the BFD symbol referred by the relocation.
1923 (mips_elf64_write_rela): Likewise.
1925 2018-04-09 Maciej W. Rozycki <macro@mips.com>
1927 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Issue an
1928 error for out-of-range `r_sym' values.
1930 2018-04-09 Alan Modra <amodra@gmail.com>
1932 * elf64-ppc.c (struct _ppc64_elf_section_data): Add has_pltcall field.
1933 (struct ppc_link_hash_table): Add can_convert_all_inline_plt.
1934 (ppc64_elf_check_relocs): Set has_pltcall.
1935 (ppc64_elf_adjust_dynamic_symbol): Discard some PLT entries.
1936 (ppc64_elf_inline_plt): New function.
1937 (ppc64_elf_size_dynamic_sections): Discard some PLT entries for locals.
1938 * elf64-ppc.h (ppc64_elf_inline_plt): Declare.
1939 * elf32-ppc.c (has_pltcall): Define.
1940 (struct ppc_elf_link_hash_table): Add can_convert_all_inline_plt.
1941 (ppc_elf_check_relocs): Set has_pltcall.
1942 (ppc_elf_inline_plt): New function.
1943 (ppc_elf_adjust_dynamic_symbol): Discard some PLT entries.
1944 (ppc_elf_size_dynamic_sections): Likewise.
1945 * elf32-ppc.h (ppc_elf_inline_plt): Declare.
1947 2018-04-09 Alan Modra <amodra@gmail.com>
1949 * elf32-ppc.c (ppc_elf_howto_raw): Add PLTSEQ and PLTCALL howtos.
1950 (is_plt_seq_reloc): New function.
1951 (ppc_elf_check_relocs): Handle PLTSEQ and PLTCALL relocs.
1952 (ppc_elf_tls_optimize): Handle inline plt call sequence.
1953 (ppc_elf_relax_section): Handle PLTCALL reloc.
1954 (ppc_elf_relocate_section): Nop out inline plt call sequence when
1956 * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_PLTSEQ and
1957 R_PPC64_PLTCALL entries. Comment R_PPC64_TOCSAVE.
1958 (has_tls_get_addr_call): Correct comment.
1959 (is_branch_reloc): Add PLTCALL.
1960 (is_plt_seq_reloc): New function.
1961 (ppc64_elf_check_relocs): Handle PLT16_LO_DS reloc. Set
1962 has_tls_reloc for R_PPC64_TLSGD and R_PPC64_TLSLD. Create plt
1963 entry for R_PPC64_PLTCALL.
1964 (ppc64_elf_tls_optimize): Handle inline plt call sequence.
1965 (ppc_type_of_stub): Handle PLTCALL reloc.
1966 (toc_adjusting_stub_needed): Likewise.
1967 (ppc64_elf_relocate_section): Set "can_plt_call" for PLTCALL
1968 reloc insn. Nop out inline plt call sequence when resolving
1969 locally. Handle __tls_get_addr inline plt call optimization.
1971 2018-04-09 Alan Modra <amodra@gmail.com>
1973 * elf64-ppc.c (LOCAL_PLT_ENTRY_SIZE): Define.
1974 (struct ppc_stub_hash_entry): Add symtype field.
1976 (struct ppc_link_hash_table): Add pltlocal and relpltlocal.
1977 (create_linkage_sections): Create pltlocal and relpltlocal.
1978 (ppc64_elf_check_relocs): Allow PLT relocs on local symbols.
1980 (ppc64_elf_adjust_dynamic_symbol): Keep PLT entries for inline calls.
1981 (allocate_dynrelocs): Allocate pltlocal and relpltlocal.
1982 (ppc64_elf_size_dynamic_sections): Size pltlocal and relpltlocal.
1983 Keep PLT entries for inline calls against locals.
1984 (ppc_build_one_stub): Use pltlocal as appropriate.
1985 (ppc_size_one_stub): Likewise.
1986 (ppc64_elf_size_stubs): Set symtype.
1987 (build_global_entry_stubs_and_plt): Init pltlocal and write
1988 relpltlocal for globals.
1989 (write_plt_relocs_for_local_syms): Likewise for local syms.
1990 (ppc64_elf_relocate_section): Support PLT for local syms.
1991 * elf32-ppc.c (PLT_KEEP): Define.
1992 (struct ppc_elf_link_hash_table): Add pltlocal and relpltlocal.
1993 (ppc_elf_create_glink): Create pltlocal and relpltlocal.
1994 (ppc_elf_check_relocs): Allow PLT relocs on local symbols.
1995 Set PLT_KEEP. Adjust update_local_sym_info call.
1996 (ppc_elf_adjust_dynamic_symbol): Keep PLT entries for inline calls.
1997 (allocate_dynrelocs): Allocate pltlocal and relpltlocal.
1998 (ppc_elf_size_dynamic_sections): Size pltlocal and relpltlocal.
1999 (ppc_elf_relocate_section): Support PLT16 relocs for local syms.
2000 (write_global_sym_plt): Init pltlocal and write relpltlocal.
2001 (ppc_finish_symbols): Likewise for locals.
2003 2018-04-09 Alan Modra <amodra@gmail.com>
2005 * elf64-ppc.c (ppc_build_one_stub): Move output of PLT relocs
2006 for local symbols to..
2007 (write_plt_relocs_for_local_syms): ..here. New function.
2008 (ppc64_elf_finish_dynamic_symbol): Move output of PLT relocs for
2010 (build_global_entry_stubs_and_plt): ..here. Rename from
2011 build_global_entry_stubs.
2012 (ppc64_elf_build_stubs): Always call build_global_entry_stubs_and_plt.
2013 Call write_plt_relocs_for_local_syms.
2014 * elf32-ppc.c (get_sym_h): New function.
2015 (ppc_elf_relax_section): Use get_sym_h.
2016 (ppc_elf_relocate_section): Move output of PLT relocs and glink
2017 stubs for local symbols to..
2018 (ppc_finish_symbols): ..here. New function.
2019 (ppc_elf_finish_dynamic_symbol): Move output of PLT relocs for
2021 (write_global_sym_plt): ..here. New function.
2022 * elf32-ppc.h (ppc_elf_modify_segment_map): Delete attribute.
2023 (ppc_finish_symbols): Declare.
2025 2018-04-09 Alan Modra <amodra@gmail.com>
2027 * elf32-ppc.c (ppc_elf_check_relocs): Handle PLT16 relocs.
2028 (ppc_elf_relocate_section): Likewise.
2029 * elf64-ppc.c (ppc64_elf_check_relocs): Handle PLT16_LO_DS.
2030 (ppc64_elf_relocate_section): Likewise. Correct PLT16
2031 resolution to plt entry relative to toc pointer.
2033 2018-04-09 Alan Modra <amodra@gmail.com>
2035 * elf64-ppc.c (TLS_TLS, TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL,
2036 TLS_TPRELGD, TLS_EXPLICIT): Renumber. Test TLS_TLS throughout
2037 file when other TLS flags are tested in a mask.
2038 (TLS_MARK, NON_GOT): Define.
2039 (PLT_IFUNC): Redefine, and test TLS_TLS throughout file as well.
2040 (update_local_sym_info): Don't create got entry when NON_GOT.
2041 (ppc64_elf_check_relocs): Pass NON_GOT with PLT_IFUNC.
2043 (get_tls_mask): Do toc lookup if tls_mask is just TLS_MARK.
2044 (ppc64_elf_relocate_section): Likewise.
2045 (ppc64_elf_tls_optimize): Don't attempt to optimize indirect
2046 __tls_get_addr calls lacking a marker reloc.
2047 * elf32-ppc.c (TLS_TLS, TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL,
2048 TLS_TPRELGD): Renumber. Update comment.
2049 (TLS_MARK, NON_GOT): Define.
2050 (PLT_IFUNC): Redefine, and test TLS_TLS throughout file as well.
2051 (update_local_sym_info): Don't create got entry when NON_GOT.
2052 (ppc_elf_check_relocs): Pass NON_GOT with PLT_IFUNC.
2054 (ppc_elf_tls_optimize): Don't attempt to optimize indirect
2055 __tls_get_addr calls lacking a marker reloc.
2057 2018-04-06 H.J. Lu <hongjiu.lu@intel.com>
2059 * elf64-x86-64.c (elf_x86_64_info_to_howto): Don't mask out
2060 R_X86_64_converted_reloc_bit.
2062 2018-04-05 H.J. Lu <hongjiu.lu@intel.com>
2065 * configure: Regenerated.
2067 2018-04-05 Alan Modra <amodra@gmail.com>
2069 * elf-hppa.h (elf_hppa_info_to_howto): Init howto to NULL.
2070 (elf_hppa_info_to_howto_rel): Likewise.
2072 2018-04-04 Maciej W. Rozycki <macro@mips.com>
2074 * elf-hppa.h (elf_hppa_info_to_howto): Also return
2075 unsuccessfully for unimplemented relocations.
2076 (elf_hppa_info_to_howto_rel): Likewise.
2078 2018-04-04 Maciej W. Rozycki <macro@mips.com>
2080 * elf32-i860.c (lookup_howto): Add `abfd' parameter. Set the
2081 `bfd_error_bad_value' error and call `_bfd_error_handler' on a
2082 howto lookup failure.
2083 (elf32_i860_reloc_type_lookup): Adjust `lookup_howto' call
2085 (elf32_i860_info_to_howto_rela): Likewise.
2086 (elf32_i860_relocate_splitn): Likewise.
2087 (elf32_i860_relocate_pc16): Likewise.
2088 (elf32_i860_relocate_pc26): Likewise.
2089 (elf32_i860_relocate_section): Likewise.
2091 2018-04-04 Maciej W. Rozycki <macro@mips.com>
2093 * elf32-visium.c (visium_info_to_howto_rela): Correct the range
2094 check for `visium_elf_howto_table' table access.
2096 2018-04-04 Maciej W. Rozycki <macro@mips.com>
2098 * elf32-iq2000.c (iq2000_info_to_howto_rela): Correct the range
2099 check for `iq2000_elf_howto_table' table access.
2101 2018-04-04 Maciej W. Rozycki <macro@mips.com>
2103 * elf32-frv.c (frv_info_to_howto_rela): Correct the range check
2104 for `elf32_frv_howto_table' table access.
2106 2018-04-04 Maciej W. Rozycki <macro@mips.com>
2108 * elf32-mips.c (mips_elf32_rtype_to_howto): Also return
2109 unsuccessfully for placeholder howtos.
2110 * elf64-mips.c (mips_elf64_rtype_to_howto): Likewise.
2111 * elfn32-mips.c (mips_elf_n32_rtype_to_howto): Likewise.
2113 2018-03-29 Maciej W. Rozycki <macro@mips.com>
2115 * elf32-mips.c (mips_info_to_howto_rel): Remove the calls to
2116 `_bfd_error_handler' and to set the `bfd_error_bad_value' error.
2118 2018-03-28 Maciej W. Rozycki <macro@mips.com>
2120 * elf-hppa.h (elf_hppa_info_to_howto_rel): Remove
2121 ATTRIBUTE_UNUSED from `abfd'.
2123 2018-03-28 Maciej W. Rozycki <macro@mips.com>
2125 * elf-hppa.h (elf_hppa_info_to_howto_rel): Correct
2126 `_bfd_error_handler' call formatting.
2128 2018-03-28 Maciej W. Rozycki <macro@mips.com>
2130 * elf32-mips.c (mips_info_to_howto_rel): Call
2131 `mips_elf32_rtype_to_howto' directly rather than via
2132 `->elf_backend_mips_rtype_to_howto'.
2134 2018-03-28 Renlin Li <renlin.li@arm.com>
2137 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Add cases for
2138 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12,
2139 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
2140 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12,
2141 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
2142 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12,
2143 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
2144 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12,
2145 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
2146 (elfNN_aarch64_final_link_relocate): Support new relocations.
2147 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Support new
2149 (_bfd_aarch64_elf_resolve_relocation): Support new relocations.
2151 2018-03-28 Renlin Li <renlin.li@arm.com>
2154 * reloc.c: Add BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12
2155 BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12_NC,
2156 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12,
2157 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
2158 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12,
2159 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
2160 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12,
2161 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
2162 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12,
2163 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
2164 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add table entry for
2165 TLSLE_LDST16_TPREL_LO12,
2166 TLSLE_LDST16_TPREL_LO12_NC,
2167 TLSLE_LDST32_TPREL_LO12,
2168 TLSLE_LDST32_TPREL_LO12_NC,
2169 TLSLE_LDST64_TPREL_LO12,
2170 TLSLE_LDST64_TPREL_LO12_NC,
2171 TLSLE_LDST8_TPREL_LO12,
2172 TLSLE_LDST8_TPREL_LO12_NC.
2173 * bfd-in2.h: Regenerated.
2174 * libbfd.h: Regenerated.
2176 2018-03-28 Eric Botcazou <ebotcazou@adacore.com>
2179 * elfxx-sparc.c (struct _bfd_sparc_elf_link_hash_entry): Add new flag
2180 has_old_style_got_reloc.
2181 (_bfd_sparc_elf_check_relocs) <GOT relocations>: Set it for old-style
2182 relocations. Fix a couple of long lines.
2183 (_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: Do not generate
2184 a R_SPARC_NONE for the GOT slot if the symbol is also subject to old-style
2187 2018-03-25 H.J. Lu <hongjiu.lu@intel.com>
2190 * elf64-x86-64.c (elf_x86_64_finish_dynamic_sections): Add
2191 ENDBR64 to the TLSDESC PLT entry.
2193 2018-03-21 Alan Modra <amodra@gmail.com>
2195 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Trim uninteresting
2196 symbols. Use size_t counts. Delete redundant opd test.
2198 2018-03-21 Alan Modra <amodra@gmail.com>
2200 * elf32-ppc.c (ppc_elf_tls_optimize): Delete locsyms.
2202 2018-03-21 Alan Modra <amodra@gmail.com>
2204 * elf32-ppc.c (struct ppc_elf_link_hash_entry): Make tls_mask
2206 (update_local_sym_info): Likewise for local_got_tls_masks.
2207 (ppc_elf_tls_optimize): Likewise for lgot_masks.
2209 2018-03-21 Alan Modra <amodra@gmail.com>
2211 * elf64-ppc.c (ppc_size_one_stub): Fix comment typo.
2212 (ppc64_elf_layout_multitoc): Allocate relocs for tprel as we
2213 do in size_dynamic_sections.
2215 2018-03-21 Alan Modra <amodra@gmail.com>
2217 * elf64-ppc.c (ppc64_elf_relocate_section): Don't access rel[1]
2218 without first checking array bounds.
2219 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2221 2018-03-20 H.J. Lu <hongjiu.lu@intel.com>
2224 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Set
2225 non_ir_ref_dynamic if a symbol is made dynamic by --dynamic-list.
2227 2018-03-19 Nick Clifton <nickc@redhat.com>
2229 * po/es.po: Updated Spanish translation.
2231 2018-03-15 Max Filippov <jcmvbkbc@gmail.com>
2233 * elf32-xtensa.c (xlate_map_entry): Change types of address
2234 fields from 'unsigned' to 'bfd_vma'.
2235 (xlate_offset_with_removed_text): Use struct xlate_map_entry as
2236 the key argument to bsearch. Allow offsets past the end of a
2237 section, use the last map entry for translation of such offsets.
2239 2018-03-15 Kuan-Lin Chen <kuanlinchentw@gmail.com>
2241 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Removed.
2242 Not support the target feature.
2243 (nds32_elf_ex9_itb_base): Likewise.
2244 (nds32_elf_ex9_import_table): Likewise.
2245 (nds32_elf_ex9_finish): Likewise.
2246 (nds32_elf_ex9_reloc_jmp): Likewise.
2247 (nds32_elf_get_insn_with_reg): Likewise.
2248 (nds32_get_local_syms): Likewise.
2249 (nds32_elf_ex9_replace_instruction): Likewise.
2250 (nds32_elf_ifc_calc): Likewise.
2251 (nds32_elf_ifc_finish): Likewise.
2252 (nds32_elf_ifc_replace): Likewise.
2253 (nds32_elf_ifc_reloc): Likewise.
2255 2018-03-14 Alan Modra <amodra@gmail.com>
2257 * elf64-ppc.c (sfpr_define): Adjust for stub_sec size having
2258 sfpr size added before defining alias symbols.
2259 (ppc64_elf_build_stubs): Add stub section padding before
2260 copying sfpr contents and defining save/restore alias symbols.
2262 2018-03-14 H.J. Lu <hongjiu.lu@intel.com>
2265 * elflink.c (elf_gc_mark_debug_section): Also check the local
2266 debug definition section.
2268 2018-03-13 Nick Clifton <nickc@redhat.com>
2271 * pei-x86_64.c (pex64_get_unwind_info): Change to a boolean
2272 function. Add an end address parameter. Check access of the data
2273 pointer to make sure that they do not extend beyond the end
2274 address. Return FALSE if any check fails. Add the end address
2275 pointer to the ui structure.
2276 (pex64_xdata_print_uwd_codes): Check accesses of the raw unwind
2277 codes to make sure that they do not extend beyond the end address
2278 pointer. Print an error message and return immediately if any
2281 2018-03-09 Nick Clifton <nickc@redhat.com>
2283 * elf64-s390.c (elf_s390_relocate_section): Move check for
2284 relocations against non-allocated sections to before the code that
2285 handles ifunc relocations.
2286 * elf32-s390.c (elf_s390_relocate_section): Likewise.
2287 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Treat
2288 relocs against IFUNC symbols in non-allocated sections as relocs
2289 against FUNC symbols.
2290 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
2292 2018-03-08 H.J. Lu <hongjiu.lu@intel.com>
2295 * elf32-i386.c (elf_i386_relocate_section): Treat relocation
2296 against IFUNC symbol in SHT_NOTE section without SHF_ALLOC as
2297 relocation against FUNC symbol.
2298 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
2300 2018-03-07 Renlin Li <renlin.li@arm.com>
2303 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Check absolute
2304 symbol, and don't emit relocation in specific case.
2306 2018-03-07 Alan Modra <amodra@gmail.com>
2308 * elf64-mips.c (mips_elf64_rtype_to_howto): Return NULL on error.
2309 (mips_elf64_slurp_one_reloc_table): Pass on error.
2311 2018-03-03 James Cowgill <james.cowgill@mips.com>
2312 Maciej W. Rozycki <macro@mips.com>
2315 * elfxx-mips.c (mips_elf_calculate_relocation): Only return
2316 after calling `undefined_symbol' hook if this is an error
2317 condition. Assume the value of 0 for the symbol requested
2320 2018-03-02 Jim Wilson <jimw@sifive.com>
2323 * elfnn-aarch64.c (_bfd_aarch64_resize_stubs): Add 8 bytes for branch
2324 and nop instead of 4.
2325 (elfNN_arch64_build_stubs): Add nop after branch. Increase size by
2328 2018-03-01 Jim Wilson <jimw@sifive.com>
2331 * elfnn-riscv.c (riscv_relax_delete_bytes): When adjust st_size, use
2332 else if instead of if.
2334 2018-03-01 Alan Modra <amodra@gmail.com>
2336 * elf32-ft32.c (ft32_info_to_howto_rela): Correct range test.
2338 2018-02-28 Alan Modra <amodra@gmail.com>
2341 * aoutx.h (swap_std_reloc_in): Correct r_index bound check.
2343 2018-02-28 Nick Clifton <nickc@redhat.com>
2347 * dwarf2.c (read_n_bytes): Replace size parameter with dwarf_block
2348 pointer. Drop unused abfd parameter. Check the size of the block
2349 before initialising the data field. Return the end pointer if the
2351 (read_attribute_value): Adjust invocations of read_n_bytes.
2354 * dwarf1.c (parse_die): Check the length of form blocks before
2355 advancing the data pointer.
2357 2018-02-28 Alan Modra <amodra@gmail.com>
2360 * aoutx.h (translate_symbol_table): Print an error message and set
2361 bfd_error on finding an invalid name string offset.
2363 2018-02-27 H.J. Lu <hongjiu.lu@intel.com>
2365 * config.in: Regenerated.
2366 * configure: Likewise.
2367 * configure.ac: Add --enable-separate-code.
2368 (DEFAULT_LD_Z_SEPARATE_CODE): New AC_DEFINE_UNQUOTED. Default
2369 to 1 for Linux/x86 targets,
2370 * elf64-x86-64.c (ELF_MAXPAGESIZE): Set to 0x1000 if
2371 DEFAULT_LD_Z_SEPARATE_CODE is 1.
2373 2018-02-27 Nick Clifton <nickc@redhat.com>
2375 * aout-cris.c (swap_ext_reloc_out): Standadize error/warning
2377 * elf-hppa.h (elf_hppa_info_to_howto_rel): Likewise.
2378 * elf32-i386.c (elf_i386_reloc_type_lookup): Likewise.
2379 * elf32-xtensa.c (elf_xtensa_reloc_type_lookup): Likewise.
2380 * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Likewise.
2381 * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise.
2382 * elf64-sh64.c (sh_elf64_info_to_howto): Likewise.
2383 * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise.
2384 * elfxx-sparc.c (_bfd_sparc_elf_reloc_type_lookup): Likewise.
2385 * elfxx-tilegx.c (tilegx_reloc_type_lookup): Likewise.
2388 * elf-bfd.h (struct elf_backend_data): Change the return type of
2389 the elf_info_to_howto and elf_info_to_howto_rel function pointers
2391 * elfcode.h (elf_slurp_reloc_table_from_section): Check the return
2392 value from the info_to_howto function and fail if that function
2394 * elf32-h8300.c (elf32_h8_relocate_section): Check return value
2395 from the info_to_howto function.
2396 (elf32_h8_relax_section): Likewise.
2397 * elf32-lm32.c (lm32_elf_relocate_section): Likewise.
2398 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
2399 * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise.
2400 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
2401 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
2402 * elf64-ia64-vms.c (elf64_ia64_relocate_section): Likewise.
2403 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Likewise.
2404 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
2405 * elfnn-ia64.c (elfNN_ia64_relocate_section): Likewise.
2406 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
2407 (riscv_elf_relocate_section): Likewise.
2408 * elf-hppa.h (elf_hppa_info_to_howto): Change return type to
2409 bfd_boolean. Issue an error message, set an error value and
2410 return FALSE if the reloc is not recognized.
2411 (elf_hppa_info_to_howto_rel): Likewise.
2412 * elf-m10200.c (mn10200_info_to_howto): Likewise.
2413 * elf-m10300.c (mn10300_info_to_howto): Likewise.
2414 * elf.c (_bfd_elf_no_info_to_howto): Likewise.
2415 * elf32-arc.c (arc_info_to_howto_rel): Likewise.
2416 * elf32-arm.c (elf32_arm_info_to_howto): Likewise.
2417 * elf32-avr.c (avr_info_to_howto_rela): Likewise.
2418 * elf32-bfin.c (bfin_info_to_howto): Likewise.
2419 * elf32-cr16.c (elf_cr16_info_to_howto): Likewise.
2420 * elf32-cr16c.c (elf_cr16c_info_to_howto): Likewise.
2421 * elf32-cris.c (elf_cr16c_info_to_howto_rel)
2422 (cris_info_to_howto_rela): Likewise.
2423 * elf32-crx.c (elf_crx_info_to_howto): Likewise.
2424 * elf32-d10v.c (d10v_info_to_howto_rel): Likewise.
2425 * elf32-d30v.c (d30v_info_to_howto_rel, d30v_info_to_howto_rela):
2427 * elf32-dlx.c (dlx_rtype_to_howto, elf32_dlx_info_to_howto)
2428 (elf32_dlx_info_to_howto_rel): Likewise.
2429 * elf32-epiphany.c (epiphany_info_to_howto_rela): Likewise.
2430 * elf32-fr30.c (fr30_info_to_howto_rela): Likewise.
2431 * elf32-frv.c (frv_info_to_howto_rela)
2432 (frvfdpic_info_to_howto_rel): Likewise.
2433 * elf32-ft32.c (ft32_info_to_howto_rela): Likewise.
2434 * elf32-gen.c (elf_generic_info_to_howto)
2435 (elf_generic_info_to_howto_rel): Likewise.
2436 * elf32-h8300.c (elf32_h8_info_to_howto)
2437 (elf32_h8_info_to_howto_rel): Likewise.
2438 * elf32-i370.c (i370_elf_info_to_howto): Likewise.
2439 * elf32-i386.c (elf_i386_reloc_type_lookup)
2440 (elf_i386_rtype_to_howto, elf_i386_info_to_howto_rel): Likewise.
2441 * elf32-i860.c (lookup_howto, elf32_i860_info_to_howto_rela):
2443 * elf32-i960.c (elf32_i960_info_to_howto_rel): Likewise.
2444 * elf32-ip2k.c (ip2k_info_to_howto_rela): Likewise.
2445 * elf32-iq2000.c (iq2000_info_to_howto_rela): Likewise.
2446 * elf32-lm32.c (lm32_info_to_howto_rela): Likewise.
2447 * elf32-m32c.c (m32c_info_to_howto_rela): Likewise.
2448 * elf32-m32r.c (m32r_info_to_howto_rel, m32r_info_to_howto):
2450 * elf32-m68hc11.c (m68hc11_info_to_howto_rel): Likewise.
2451 * elf32-m68hc12.c (m68hc11_info_to_howto_rel): Likewise.
2452 * elf32-m68k.c (rtype_to_howto): Likewise.
2453 * elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
2454 * elf32-mep.c (mep_info_to_howto_rela): Likewise.
2455 * elf32-metag.c (metag_info_to_howto_rela): Likewise.
2456 * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
2457 * elf32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela):
2459 * elf32-moxie.c (moxie_info_to_howto_rela): Likewise.
2460 * elf32-msp430.c (msp430_info_to_howto_rela): Likewise.
2461 * elf32-mt.c (mt_info_to_howto_rela): Likewise.
2462 * elf32-nds32.c (nds32_info_to_howto_rel, nds32_info_to_howto):
2464 * elf32-nios2.c (nios2_elf32_info_to_howto): Likewise.
2465 * elf32-or1k.c (or1k_info_to_howto_rela): Likewise.
2466 * elf32-pj.c (pj_elf_info_to_howto): Likewise.
2467 * elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
2468 * elf32-pru.c (pru_elf32_info_to_howto): Likewise.
2469 * elf32-rl78.c (rl78_info_to_howto_rela): Likewise.
2470 * elf32-rx.c (rx_info_to_howto_rela): Likewise.
2471 * elf32-s390.c (elf_s390_info_to_howto): Likewise.
2472 * elf32-score.c (s3_bfd_score_info_to_howto)
2473 (_bfd_score_info_to_howto): Likewise.
2474 * elf32-score7.c (s7_bfd_score_info_to_howto): Likewise.
2475 * elf32-sh.c (sh_elf_info_to_howto): Likewise.
2476 * elf32-spu.c (spu_elf_info_to_howto): Likewise.
2477 * elf32-tic6x.c (elf32_tic6x_info_to_howto)
2478 (elf32_tic6x_info_to_howto_rel): Likewise.
2479 * elf32-tilepro.c (tilepro_info_to_howto_rela): Likewise.
2480 * elf32-v850.c (v850_elf_info_to_howto_rel)
2481 (v850_elf_info_to_howto_rela, v800_elf_info_to_howto): Likewise.
2482 * elf32-vax.c (rtype_to_howto): Likewise.
2483 * elf32-visium.c (visium_info_to_howto_rela): Likewise.
2484 * elf32-wasm32.c (elf32_wasm32_rtype_to_howto)
2485 (elf32_wasm32_info_to_howto_rela): Likewise.
2486 * elf32-xc16x.c (elf32_xc16x_info_to_howto): Likewise.
2487 * elf32-xgate.c (xgate_info_to_howto_rel): Likewise.
2488 * elf32-xstormy16.c (xstormy16_info_to_howto_rela): Likewise.
2489 * elf32-xtensa.c (elf_xtensa_info_to_howto_rela): Likewise.
2490 * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
2491 * elf64-gen.c (elf_generic_info_to_howto)
2492 (elf_generic_info_to_howto_rel): Likewise.
2493 * elf64-ia64-vms.c (elf64_ia64_info_to_howto): Likewise.
2494 * elf64-mips.c (mips_elf64_info_to_howto_rela): Likewise.
2495 * elf64-mmix.c (mmix_info_to_howto_rela): Likewise.
2496 * elf64-ppc.c (ppc64_elf_info_to_howto): Likewise.
2497 * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise.
2498 * elf64-sh64.c (elf_s390_info_to_howto, sh_elf64_info_to_howto):
2500 * elf64-x86-64.c (elf_x86_64_info_to_howto): Likewise.
2501 * elfn32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela):
2503 * elfnn-aarch64.c (elfNN_aarch64_info_to_howto): Likewise.
2504 * elfnn-ia64.c (elfNN_ia64_info_to_howto): Likewise.
2505 * elfnn-riscv.c (riscv_info_to_howto_rela): Likewise.
2506 * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise.
2507 * elfxx-sparc.c (_bfd_sparc_elf_info_to_howto): Likewise.
2508 * elfxx-tilegx.c (tilegx_info_to_howto_rela): Likewise.
2509 * elf32-score.h (s7_bfd_score_info_to_howto): Update prototype.
2510 * elfxx-sparc.h (_bfd_sparc_elf_info_to_howto): Update prototype.
2511 * elfxx-tilegx.h (tilegx_info_to_howto_rela): Update prototype.
2512 * elfxx-target.h (elf_info_to_howto, elf_info_to_howto_rel):
2515 2018-02-26 Jim Wilson <jimw@sifive.com>
2516 Stephan Schreiber <info@fs-driver.org>
2519 * elfnn-ia64.c (elfNN_ia64_relax_section): After ia64_elf_relax_brl
2520 call, set changed_contents and changed_relocs. Likewise after
2521 successful ia64_elf_relax_br call.
2523 2018-02-26 Alan Modra <amodra@gmail.com>
2525 * elf.c (assign_file_positions_except_relocs): Don't segfault
2526 when actual number of phdrs is less than allocated. Delete
2527 outdated comment. Formatting.
2529 2018-02-26 Alan Modra <amodra@gmail.com>
2531 * elf-m10300.c, * elf-s390-common.c, * elf32-arc.c, * elf32-cris.c,
2532 * elf32-dlx.c, * elf32-frv.c, * elf32-i370.c, * elf32-lm32.c,
2533 * elf32-m32r.c, * elf32-m68hc1x.c, * elf32-m68k.c,
2534 * elf32-microblaze.c, * elf32-msp430.c, * elf32-nds32.c,
2535 * elf32-nios2.c, * elf32-or1k.c, * elf32-rl78.c, * elf32-rx.c,
2536 * elf32-score.c, * elf32-score7.c, * elf32-sh-symbian.c,
2537 * elf32-sh.c, * elf32-spu.c, * elf32-v850.c, * elf32-xtensa.c,
2538 * elf64-alpha.c, * elf64-ia64-vms.c, * elf64-mmix.c,
2539 * elf64-sh64.c, * elf64-sparc.c, * elfnn-ia64.c, * elfxx-tilegx.c,
2540 * mmo.c, * osf-core.c, * srec.c, * vms-alpha.c: Standardize
2541 error/warning messages.
2543 2018-02-26 Alan Modra <amodra@gmail.com>
2545 * archive.c, * bfd.c, * linker.c, * reloc.c, * stabs.c,
2546 * syms.c: Standardize error/warning messages.
2548 2018-02-26 Alan Modra <amodra@gmail.com>
2550 * aout-adobe.c, * aout-cris.c, * i386linux.c, * m68klinux.c,
2551 * sparclinux.c, * coff-alpha.c, * coff-arm.c, * coff-mcore.c,
2552 * coffcode.h, * coffgen.c, * cofflink.c, * ecoff.c, * pe-mips.c,
2553 * peXXigen.c, * peicode.h: Standardize error/warning messages.
2555 2018-02-26 Alan Modra <amodra@gmail.com>
2557 * elf32-arm.c, * elfnn-aarch64.c: Standardize error/warning messages.
2559 2018-02-26 Alan Modra <amodra@gmail.com>
2561 * elfxx-mips.c: Standardize error/warning messages.
2563 2018-02-26 Alan Modra <amodra@gmail.com>
2565 * dwarf2.c, * elf-attrs.c, * elf-eh-frame.c, * elf.c, * elf32-gen.c,
2566 * elflink.c: Standardize error/warning messages. Replace use of
2567 linker callback einfo with _bfd_error_handler when possible.
2569 2018-02-26 Alan Modra <amodra@gmail.com>
2571 * aoutx.h, * coff-alpha.c, * coff-i860.c, * coff-m68k.c,
2572 * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c,
2573 * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-w65.c,
2574 * elf-bfd.h, * elf-m10300.c, * elf.c, * elf32-avr.c, * elf32-bfin.c,
2575 * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c,
2576 * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c,
2577 * elf32-fr30.c, * elf32-frv.c, * elf32-i370.c, * elf32-i386.c,
2578 * elf32-i960.c, * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c,
2579 * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c,
2580 * elf32-m68k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c,
2581 * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c,
2582 * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-or1k.c,
2583 * elf32-pj.c, * elf32-ppc.c, * elf32-rl78.c, * elf32-rx.c,
2584 * elf32-s390.c, * elf32-sh.c, * elf32-spu.c, * elf32-tic6x.c,
2585 * elf32-v850.c, * elf32-vax.c, * elf32-visium.c, * elf32-wasm32.c,
2586 * elf32-xgate.c, * elf32-xtensa.c, * elf64-alpha.c,
2587 * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c,
2588 * elf64-ppc.c, * elf64-s390.c, * elf64-sparc.c, * elf64-x86-64.c,
2589 * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c,
2590 * elfnn-riscv.c, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-riscv.h,
2591 * elfxx-sparc.c, * elfxx-sparc.h, * reloc.c: Standardize
2592 unrecognized/unsupported reloc message.
2594 2018-02-26 Alan Modra <amodra@gmail.com>
2596 * elf32-ppc.c: Standardize error/warning messages. Use
2597 _bfd_error_handler rather than einfo when einfo features not used.
2598 * elf64-ppc.c: Likewise.
2600 2018-02-23 Alan Modra <amodra@gmail.com>
2603 * elf.c (assign_file_positions_for_non_load_sections): Remove RELRO
2604 segment if no matching LOAD segment.
2606 2018-02-23 Kuan-Lin Chen <kuanlinchentw@gmail.com>
2608 * elf32-nds32.h: Define mask for ict_model.
2610 2018-02-20 Jason Duerstock <jason.duerstock@gmail.com>
2612 * elfnn-ia64.c (elf_backend_can_gc_sections): Enable.
2614 2018-02-19 Maciej W. Rozycki <macro@mips.com>
2617 2018-01-12 Vlad Ivanov <vlad@ivanov.email>
2619 * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
2620 .reginfo section has wrong size.
2622 2018-02-19 Maciej W. Rozycki <macro@mips.com>
2624 * elfxx-mips.c (_bfd_mips_elf_always_size_sections): Set
2625 SEC_FIXED_SIZE and SEC_HAS_CONTENTS flags for `.reginfo' and
2626 `.MIPS.abiflags' sections.
2627 (_bfd_mips_elf_final_link): Avoid reading beyond `.reginfo'
2630 2018-02-19 Maciej W. Rozycki <macro@mips.com>
2632 * section.c (SEC_FIXED_SIZE): New macro.
2633 * bfd-in2.h: Regenerate.
2635 2018-02-19 Maciej W. Rozycki <macro@mips.com>
2637 * section.c (SEC_HAS_GOT_REF): Remove macro.
2638 * bfd-in2.h: Regenerate.
2640 2018-02-19 Alan Modra <amodra@gmail.com>
2642 * elf-attrs.c (_bfd_elf_parse_attributes): Correct _bfd_error_handler
2644 * elfxx-mips.c (_bfd_mips_elf_final_link): Likewise.
2645 * elfnn-riscv.c (_bfd_riscv_relax_align): Likewise.
2646 (_bfd_riscv_relax_pc): Likewise and fix typos.
2647 * libbfd-in.h (_bfd_error_handler): Add attribute printf.
2648 * libbfd.h: Regenerate.
2650 2018-02-19 Alan Modra <amodra@gmail.com>
2652 * dwarf2.c (read_section): Don't use 'll' format modifier.
2653 (find_abstract_instance): Likewise.
2654 * elfcore.h (elf_core_file_p): Likewise.
2656 2018-02-19 Alan Modra <amodra@gmail.com>
2658 * bfd-in.h: Include inttypes.h or if not available define
2659 PRId64, PRIu64 and PRIx64.
2660 * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Remove support for L
2661 modifier to print bfd_vma.
2662 * coff-arm.c, * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c,
2663 * coff-sh.c, * coff-tic80.c, * coffcode.h, * coffgen.c, * cofflink.c,
2664 * compress.c, * dwarf2.c, * elf-m10300.c, * elf.c, * elf32-arc.c,
2665 * elf32-arm.c, * elf32-bfin.c, * elf32-cris.c, * elf32-hppa.c,
2666 * elf32-i386.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32r.c,
2667 * elf32-m68k.c, * elf32-metag.c, * elf32-nds32.c, * elf32-nios2.c,
2668 * elf32-ppc.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c,
2669 * elf32-score7.c, * elf32-sh.c, * elf32-sh64.c, * elf32-spu.c,
2670 * elf32-tic6x.c, * elf32-tilepro.c, * elf32-v850.c, * elf32-vax.c,
2671 * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c,
2672 * elf64-mmix.c, * elf64-s390.c, * elf64-sh64.c, * elf64-x86-64.c,
2673 * elfcode.h, * elfcore.h, * elflink.c, * elfnn-aarch64.c,
2674 * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-mips.c, * elfxx-sparc.c,
2675 * elfxx-tilegx.c, * ieee.c, * ihex.c, * mach-o.c, * merge.c, * mmo.c,
2676 * peXXigen.c, * xcofflink.c: Replace use of Lx modifier with PRIx64,
2677 and cast input to uint64_t, and similarly for Ld and Lu.
2678 * bfd-in2.h: Regenerate.
2680 2018-02-19 Alan Modra <amodra@gmail.com>
2682 * elf32-arm.c, * elf32-hppa.c, * elf32-lm32.c, * elf32-m32r.c,
2683 * elf32-metag.c, * elf32-nds32.c, * elf32-or1k.c, * elf32-ppc.c,
2684 * elf32-s390.c, * elf32-sh.c, * elf32-tic6x.c, * elf32-tilepro.c,
2685 * elf64-ppc.c, * elf64-s390.c, * elflink.c, * elfnn-aarch64.c,
2686 * elfnn-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c,
2687 * reloc.c: Replace use of %R and %T in format strings passed to
2688 einfo and friends by %pR and %pT.
2690 2018-02-19 Alan Modra <amodra@gmail.com>
2692 * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Handle %pA and %pB in place
2694 * aout-adobe.c: Update all messages using %A and %B.
2695 * aout-cris.c: Likewise.
2696 * aoutx.h: Likewise.
2697 * archive.c: Likewise.
2698 * binary.c: Likewise.
2699 * cache.c: Likewise.
2700 * coff-alpha.c: Likewise.
2701 * coff-arm.c: Likewise.
2702 * coff-i860.c: Likewise.
2703 * coff-mcore.c: Likewise.
2704 * coff-ppc.c: Likewise.
2705 * coff-rs6000.c: Likewise.
2706 * coff-sh.c: Likewise.
2707 * coff-tic4x.c: Likewise.
2708 * coff-tic54x.c: Likewise.
2709 * coff-tic80.c: Likewise.
2710 * coff64-rs6000.c: Likewise.
2711 * coffcode.h: Likewise.
2712 * coffgen.c: Likewise.
2713 * cofflink.c: Likewise.
2714 * coffswap.h: Likewise.
2715 * compress.c: Likewise.
2716 * cpu-arm.c: Likewise.
2717 * ecoff.c: Likewise.
2718 * elf-attrs.c: Likewise.
2719 * elf-eh-frame.c: Likewise.
2720 * elf-ifunc.c: Likewise.
2721 * elf-m10300.c: Likewise.
2722 * elf-properties.c: Likewise.
2723 * elf-s390-common.c: Likewise.
2725 * elf32-arc.c: Likewise.
2726 * elf32-arm.c: Likewise.
2727 * elf32-avr.c: Likewise.
2728 * elf32-bfin.c: Likewise.
2729 * elf32-cr16.c: Likewise.
2730 * elf32-cr16c.c: Likewise.
2731 * elf32-cris.c: Likewise.
2732 * elf32-crx.c: Likewise.
2733 * elf32-d10v.c: Likewise.
2734 * elf32-d30v.c: Likewise.
2735 * elf32-epiphany.c: Likewise.
2736 * elf32-fr30.c: Likewise.
2737 * elf32-frv.c: Likewise.
2738 * elf32-gen.c: Likewise.
2739 * elf32-hppa.c: Likewise.
2740 * elf32-i370.c: Likewise.
2741 * elf32-i386.c: Likewise.
2742 * elf32-i960.c: Likewise.
2743 * elf32-ip2k.c: Likewise.
2744 * elf32-iq2000.c: Likewise.
2745 * elf32-lm32.c: Likewise.
2746 * elf32-m32c.c: Likewise.
2747 * elf32-m32r.c: Likewise.
2748 * elf32-m68hc11.c: Likewise.
2749 * elf32-m68hc12.c: Likewise.
2750 * elf32-m68hc1x.c: Likewise.
2751 * elf32-m68k.c: Likewise.
2752 * elf32-mcore.c: Likewise.
2753 * elf32-mep.c: Likewise.
2754 * elf32-metag.c: Likewise.
2755 * elf32-microblaze.c: Likewise.
2756 * elf32-moxie.c: Likewise.
2757 * elf32-msp430.c: Likewise.
2758 * elf32-mt.c: Likewise.
2759 * elf32-nds32.c: Likewise.
2760 * elf32-nios2.c: Likewise.
2761 * elf32-or1k.c: Likewise.
2762 * elf32-pj.c: Likewise.
2763 * elf32-ppc.c: Likewise.
2764 * elf32-rl78.c: Likewise.
2765 * elf32-rx.c: Likewise.
2766 * elf32-s390.c: Likewise.
2767 * elf32-score.c: Likewise.
2768 * elf32-score7.c: Likewise.
2769 * elf32-sh-symbian.c: Likewise.
2770 * elf32-sh.c: Likewise.
2771 * elf32-sh64.c: Likewise.
2772 * elf32-sparc.c: Likewise.
2773 * elf32-spu.c: Likewise.
2774 * elf32-tic6x.c: Likewise.
2775 * elf32-tilepro.c: Likewise.
2776 * elf32-v850.c: Likewise.
2777 * elf32-vax.c: Likewise.
2778 * elf32-visium.c: Likewise.
2779 * elf32-wasm32.c: Likewise.
2780 * elf32-xgate.c: Likewise.
2781 * elf32-xtensa.c: Likewise.
2782 * elf64-alpha.c: Likewise.
2783 * elf64-gen.c: Likewise.
2784 * elf64-hppa.c: Likewise.
2785 * elf64-ia64-vms.c: Likewise.
2786 * elf64-mmix.c: Likewise.
2787 * elf64-ppc.c: Likewise.
2788 * elf64-s390.c: Likewise.
2789 * elf64-sh64.c: Likewise.
2790 * elf64-sparc.c: Likewise.
2791 * elf64-x86-64.c: Likewise.
2792 * elfcode.h: Likewise.
2793 * elfcore.h: Likewise.
2794 * elflink.c: Likewise.
2795 * elfnn-aarch64.c: Likewise.
2796 * elfnn-ia64.c: Likewise.
2797 * elfnn-riscv.c: Likewise.
2798 * elfxx-mips.c: Likewise.
2799 * elfxx-sparc.c: Likewise.
2800 * elfxx-tilegx.c: Likewise.
2801 * elfxx-x86.c: Likewise.
2802 * hpux-core.c: Likewise.
2805 * libbfd.c: Likewise.
2806 * linker.c: Likewise.
2807 * mach-o.c: Likewise.
2808 * merge.c: Likewise.
2810 * oasys.c: Likewise.
2811 * pdp11.c: Likewise.
2812 * pe-mips.c: Likewise.
2813 * peXXigen.c: Likewise.
2814 * peicode.h: Likewise.
2815 * reloc.c: Likewise.
2816 * rs6000-core.c: Likewise.
2818 * stabs.c: Likewise.
2819 * vms-alpha.c: Likewise.
2820 * xcofflink.c: Likewise.
2822 2018-02-19 Alan Modra <amodra@gmail.com>
2825 * elf.c (IS_TBSS): Define.
2826 (_bfd_elf_map_sections_to_segments): Use IS_TBSS.
2827 (assign_file_positions_for_non_load_sections): Revert last change.
2828 Properly calculate load segment limits to compare against relro limits.
2830 2018-02-17 Alan Modra <amodra@gmail.com>
2833 * elf.c (assign_file_positions_for_non_load_sections): Ignore
2834 degenerate zero size PT_LOAD segments when finding one overlapping
2835 the PT_GNU_RELRO segment.
2837 2018-02-16 Alan Modra <amodra@gmail.com>
2839 * libbfd.c (_bfd_bool_bfd_false_error): Rename from bfd_false.
2840 (_bfd_bool_bfd_true): Rename from bfd_true.
2841 (_bfd_ptr_bfd_null_error): Rename from bfd_nullvoidptr.
2842 (_bfd_int_bfd_0): Rename from bfd_0.
2843 (_bfd_uint_bfd_0): Rename from bfd_0u.
2844 (_bfd_long_bfd_0): Rename from bfd_0l.
2845 (_bfd_long_bfd_n1_error): Rename from _bfd_n1.
2846 (_bfd_void_bfd): Rename from bfd_void.
2847 (_bfd_bool_bfd_false, _bfd_bool_bfd_asymbol_false),
2848 (_bfd_bool_bfd_link_false_error),
2849 (_bfd_bool_bfd_link_true, _bfd_bool_bfd_bfd_true),
2850 (_bfd_bool_bfd_uint_true, _bfd_bool_bfd_ptr_true),
2851 (_bfd_bool_bfd_asection_bfd_asection_true),
2852 (_bfd_bool_bfd_asymbol_bfd_asymbol_true),
2853 (_bfd_void_bfd_link, _bfd_void_bfd_asection): New functions.
2854 * archive.c (_bfd_noarchive_get_elt_at_index),
2855 (_bfd_noarchive_openr_next_archived_file),
2856 (_bfd_noarchive_construct_extended_name_table),
2857 (_bfd_noarchive_write_ar_hdr, _bfd_noarchive_truncate_arname),
2858 (_bfd_noarchive_write_armap): New functions.
2859 * archures.c (_bfd_nowrite_set_arch_mach): New function.
2860 * coff-alpha.c (alpha_ecoff_swap_coff_aux_in),
2861 (alpha_ecoff_swap_coff_sym_in, alpha_ecoff_swap_coff_lineno_in),
2862 (alpha_ecoff_swap_coff_aux_out, alpha_ecoff_swap_coff_sym_out),
2863 (alpha_ecoff_swap_coff_lineno_out),
2864 (alpha_ecoff_swap_coff_reloc_out): New functions.
2865 * coff-mips.c (mips_ecoff_swap_coff_aux_in),
2866 (mips_ecoff_swap_coff_sym_in, mips_ecoff_swap_coff_lineno_in),
2867 (mips_ecoff_swap_coff_aux_out, mips_ecoff_swap_coff_sym_out),
2868 (mips_ecoff_swap_coff_lineno_out),
2869 (mips_ecoff_swap_coff_reloc_out): New functions.
2870 * coffcode.h (coff_set_alignment_hook): Replace define with
2872 (symname_in_debug_hook): Likewise.
2873 * ecoff.c (_bfd_ecoff_set_alignment_hook): New function.
2874 * elfxx-target.h (elf_backend_allow_non_load_phdr): Default to 0.
2875 * elf.c (assign_file_positions_except_relocs): Test
2876 elf_backend_allow_non_load_phdr for NULL.
2877 * elflink.c (_bfd_elf_omit_section_dynsym_default): Rename from
2878 _bfd_elf_link_omit_section_dynsym. Update uses.
2879 (_bfd_elf_omit_section_dynsym_all): New function.
2880 * elf-bfd.h (_bfd_elf_link_omit_section_dynsym): Delete.
2881 (_bfd_elf_omit_section_dynsym_default): Declare.
2882 (_bfd_elf_omit_section_dynsym_all): Declare.
2883 * linker.c (_bfd_nolink_sizeof_headers, _bfd_nolink_bfd_relax_section),
2884 (_bfd_nolink_bfd_get_relocated_section_contents),
2885 (_bfd_nolink_bfd_lookup_section_flags),
2886 (_bfd_nolink_bfd_is_group_section, _bfd_nolink_bfd_discard_group),
2887 (_bfd_nolink_bfd_link_hash_table_create),
2888 (_bfd_nolink_bfd_link_just_syms),
2889 (_bfd_nolink_bfd_copy_link_hash_symbol_type),
2890 (_bfd_nolink_bfd_link_split_section),
2891 (_bfd_nolink_section_already_linked),
2892 (_bfd_nolink_bfd_define_common_symbol),
2893 (_bfd_nolink_bfd_define_start_stop): New functions.
2894 * reloc.c (_bfd_norelocs_bfd_reloc_type_lookup),
2895 (_bfd_norelocs_bfd_reloc_name_lookup),
2896 (_bfd_nodynamic_canonicalize_dynamic_reloc): New functions.
2897 * section.c (_bfd_nowrite_set_section_contents): New function.
2898 * syms.c (_bfd_nosymbols_canonicalize_symtab),
2899 (_bfd_nosymbols_print_symbol, _bfd_nosymbols_get_symbol_info),
2900 (_bfd_nosymbols_get_symbol_version_string),
2901 (_bfd_nosymbols_bfd_is_local_label_name),
2902 (_bfd_nosymbols_get_lineno, _bfd_nosymbols_find_nearest_line),
2903 (_bfd_nosymbols_find_line, _bfd_nosymbols_find_inliner_info),
2904 (_bfd_nosymbols_bfd_make_debug_symbol),
2905 ( _bfd_nosymbols_read_minisymbols),
2906 ( _bfd_nosymbols_minisymbol_to_symbol),
2907 (_bfd_nodynamic_get_synthetic_symtab): New functions.
2908 * libbfd-in.h: Declare new functions. Update existing defines,
2910 * aix386-core.c: Update to use new hooks. Formatting.
2911 * aout-adobe.c: Likewise.
2912 * aout-arm.c: Likewise.
2913 * aout-target.h: Likewise.
2914 * aout-tic30.c: Likewise.
2915 * aoutf1.h: Likewise.
2916 * binary.c: Likewise.
2918 * cisco-core.c: Likewise.
2919 * coff-alpha.c: Likewise.
2920 * coff-i386.c: Likewise.
2921 * coff-i860.c: Likewise.
2922 * coff-i960.c: Likewise.
2923 * coff-ia64.c: Likewise.
2924 * coff-mips.c: Likewise.
2925 * coff-ppc.c: Likewise.
2926 * coff-rs6000.c: Likewise.
2927 * coff-sh.c: Likewise.
2928 * coff-tic30.c: Likewise.
2929 * coff-tic54x.c: Likewise.
2930 * coff-x86_64.c: Likewise.
2931 * coff64-rs6000.c: Likewise.
2932 * coffcode.h: Likewise.
2933 * elf-m10300.c: Likewise.
2934 * elf32-cr16.c: Likewise.
2935 * elf32-lm32.c: Likewise.
2936 * elf32-m32r.c: Likewise.
2937 * elf32-metag.c: Likewise.
2938 * elf32-score.c: Likewise.
2939 * elf32-score7.c: Likewise.
2940 * elf32-tilepro.c: Likewise.
2941 * elf32-xstormy16.c: Likewise.
2942 * elf32-xtensa.c: Likewise.
2943 * elf64-alpha.c: Likewise.
2944 * elf64-hppa.c: Likewise.
2945 * elf64-ia64-vms.c: Likewise.
2946 * elf64-mmix.c: Likewise.
2947 * elf64-sh64.c: Likewise.
2948 * elfnn-ia64.c: Likewise.
2949 * elfxx-sparc.c: Likewise.
2950 * elfxx-target.h: Likewise.
2951 * elfxx-tilegx.c: Likewise.
2952 * elfxx-x86.h: Likewise.
2953 * hp300hpux.c: Likewise.
2954 * hppabsd-core.c: Likewise.
2955 * hpux-core.c: Likewise.
2956 * i386msdos.c: Likewise.
2957 * i386os9k.c: Likewise.
2960 * irix-core.c: Likewise.
2961 * libaout.h: Likewise.
2962 * libecoff.h: Likewise.
2963 * mach-o-target.c: Likewise.
2964 * mach-o.c: Likewise.
2965 * mipsbsd.c: Likewise.
2967 * netbsd-core.c: Likewise.
2968 * nlm-target.h: Likewise.
2969 * oasys.c: Likewise.
2970 * osf-core.c: Likewise.
2971 * pdp11.c: Likewise.
2972 * pe-mips.c: Likewise.
2973 * pe-x86_64.c: Likewise.
2975 * plugin.c: Likewise.
2976 * ppcboot.c: Likewise.
2977 * ptrace-core.c: Likewise.
2978 * sco5-core.c: Likewise.
2980 * sparclynx.c: Likewise.
2982 * tekhex.c: Likewise.
2983 * trad-core.c: Likewise.
2984 * verilog.c: Likewise.
2985 * versados.c: Likewise.
2986 * vms-alpha.c: Likewise.
2987 * vms-lib.c: Likewise.
2988 * wasm-module.c: Likewise.
2990 * libbfd.h: Regenerate.
2992 2018-02-15 Jim Wilson <jimw@sifive.com>
2994 * elfnn-riscv.c (_bfd_riscv_relax_section): Ifdef out check to ignore
2995 symbols whose section address is zero.
2997 * elfnn-riscv.c (riscv_elf_relocate_section): Use bfd_reloc_dangerous
2998 when pcrel_lo reloc has an addend. Use reloc_dangerous callback for
2999 bfd_reloc_dangerous. Use einfo instead of warning callback for errors.
3000 Add %X%P to error messages.
3002 2018-02-15 Eric Botcazou <ebotcazou@adacore.com>
3005 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
3006 Pass FALSE instead of TRUE as 'create' argument to bfd_link_hash_lookup
3007 and assert that the result of the call is not NULL.
3009 2018-02-14 Nick Clifton <nickc@redhat.com>
3012 Revert previous delta. Add extra casts to avoid compile time
3014 * libbfd-in.h (_bfd_generic_bfd_copy_private_bfd_data): Add extra
3015 cast to avoid warning from gcc v8 compiler.
3016 (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
3017 (_bfd_generic_bfd_set_private_flags): Likewise.
3018 (_bfd_generic_bfd_copy_private_section_data): Likewise.
3019 (_bfd_generic_bfd_copy_private_symbol_data): Likewise.
3020 (_bfd_generic_bfd_copy_private_header_data): Likewise.
3021 (_bfd_generic_bfd_print_private_bfd_data): Likewise.
3022 (_bfd_noarchive_construct_extended_name_table): Likewise.
3023 (_bfd_noarchive_truncate_arname): Likewise.
3024 (_bfd_noarchive_write_ar_hdr): Likewise.
3025 (_bfd_noarchive_get_elt_at_index): Likewise.
3026 (_bfd_nosymbols_canonicalize_symtab): Likewise.
3027 (_bfd_nosymbols_print_symbol): Likewise.
3028 (_bfd_nosymbols_get_symbol_info): Likewise.
3029 (_bfd_nosymbols_get_symbol_version_string): Likewise.
3030 (_bfd_nosymbols_bfd_is_local_label_name): Likewise.
3031 (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise.
3032 (_bfd_nosymbols_get_lineno): Likewise.
3033 (_bfd_nosymbols_find_nearest_line): Likewise.
3034 (_bfd_nosymbols_find_line): Likewise.
3035 (_bfd_nosymbols_find_inliner_info): Likewise.
3036 (_bfd_nosymbols_bfd_make_debug_symbol): Likewise.
3037 (_bfd_nosymbols_read_minisymbols): Likewise.
3038 (_bfd_nosymbols_minisymbol_to_symbol): Likewise.
3039 (_bfd_norelocs_bfd_reloc_type_lookup): Likewise.
3040 (_bfd_norelocs_bfd_reloc_name_lookup): Likewise.
3041 (_bfd_nowrite_set_arch_mach): Likewise.
3042 (_bfd_nowrite_set_section_contents): Likewise.
3043 (_bfd_nolink_sizeof_headers): Likewise.
3044 (_bfd_nolink_bfd_get_relocated_section_contents): Likewise.
3045 (_bfd_nolink_bfd_relax_section): Likewise.
3046 (_bfd_nolink_bfd_gc_sections): Likewise.
3047 (_bfd_nolink_bfd_lookup_section_flags): Likewise.
3048 (_bfd_nolink_bfd_merge_sections): Likewise.
3049 (_bfd_nolink_bfd_is_group_section): Likewise.
3050 (_bfd_nolink_bfd_discard_group): Likewise.
3051 (_bfd_nolink_bfd_link_hash_table_create): Likewise.
3052 (_bfd_nolink_bfd_link_add_symbols): Likewise.
3053 (_bfd_nolink_bfd_link_just_syms): Likewise.
3054 (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise.
3055 (_bfd_nolink_bfd_final_link): Likewise.
3056 (_bfd_nolink_bfd_link_split_section): Likewise.
3057 (_bfd_nolink_section_already_linked): Likewise.
3058 (_bfd_nolink_bfd_define_common_symbol): Likewise.
3059 (_bfd_nolink_bfd_define_start_stop): Likewise.
3060 (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise.
3061 (_bfd_nodynamic_get_synthetic_symtab): Likewise.
3062 (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise.
3063 (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise.
3064 * libbfd.c (bfd_false_any): Delete.
3065 (bfd_true_any, bfd_nullvoidptr_any, bfd_0_any): Delete.
3066 (bfd_0u_any, bfd_0l_any, _bfd_n1_any, bfd_void_any): Delete.
3067 * libbfd.h (extern): Regenerate
3068 * aout-target.h (MY_bfd_is_target_special_symbol): Add extra
3069 cast to avoid warning from gcc v8 compiler.
3070 * aout-tic30.c (tic30_aout_set_arch_mach): Likewise.
3071 * binary.c (binary_get_symbol_info): Likewise.
3072 * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
3073 * coff-mips.c (mips_ecoff_backend_data): Likewise.
3074 * coffcode.h (coff_set_alignment_hook): Likewise.
3075 (symname_in_debug_hook): Likewise.
3076 (bfd_coff_backend_data bigobj_swap_table): Likewise.
3077 * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise.
3078 * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise.
3079 * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise.
3080 * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise.
3081 * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise.
3082 * elf32-score.c (elf_backend_omit_section_dynsym): Likewise.
3083 * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise.
3084 * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise.
3085 * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise.
3086 * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise.
3087 * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise.
3088 * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise.
3089 * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise.
3090 * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise.
3091 * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise.
3092 * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise.
3093 (bfd_elfNN_bfd_make_debug_symbol): Likewise.
3094 (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
3095 (bfd_elfNN_bfd_set_private_flags): Likewise.
3096 (bfd_elfNN_bfd_is_target_special_symbol): Likewise.
3097 (elf_backend_init_index_section): Likewise.
3098 (elf_backend_allow_non_load_phdr): Likewise.
3099 * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise.
3100 * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise.
3101 * ieee.c (ieee_construct_extended_name_table): Likewise.
3102 (ieee_write_armap): Likewise.
3103 (ieee_write_ar_hdr): Likewise.
3104 (ieee_bfd_is_target_special_symbol): Likewise.
3105 * ihex.c (ihex_canonicalize_symtab): Likewise.
3106 (ihex_bfd_is_target_special_symbol): Likewise.
3107 * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise.
3108 * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise.
3109 (_bfd_ecoff_set_alignment_hook): Likewise.
3110 * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise.
3111 * mmo.c (mmo_bfd_is_target_special_symbol): Likewise.
3112 * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise.
3113 * oasys.c (oasys_construct_extended_name_table): Likewise.
3114 (oasys_write_armap): Likewise.
3115 (oasys_write_ar_hdr): Likewise.
3116 (oasys_bfd_is_target_special_symbol): Likewise.
3117 * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise.
3118 * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise.
3119 * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise.
3120 * som.c (som_bfd_is_target_special_symbol): Likewise.
3121 * srec.c (srec_bfd_is_target_special_symbol): Likewise.
3122 * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise.
3123 * verilog.c (verilog_bfd_is_target_special_symbol): Likewise.
3124 * versados.c (versados_bfd_is_target_special_symbol): Likewise.
3125 (versados_bfd_reloc_name_lookup): Likewise.
3126 * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise.
3127 (vms_bfd_define_start_stop): Likewise.
3128 (alpha_vms_bfd_is_target_special_symbol): Likewise.
3129 * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise.
3130 * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise.
3132 2018-02-14 H.J. Lu <hongjiu.lu@intel.com>
3135 * elf32-i386.c (elf_i386_check_relocs): Pass FALSE for non
3136 PC-relative PLT to NEED_DYNAMIC_RELOCATION_P.
3137 * elf64-x86-64.c (elf_x86_64_check_relocs): Create PLT for
3138 R_X86_64_PC32 reloc against dynamic function in data section.
3139 Pass TRUE for PC-relative PLT to NEED_DYNAMIC_RELOCATION_P.
3140 (elf_x86_64_relocate_section): Use PLT for R_X86_64_PC32 reloc
3141 against dynamic function in data section.
3142 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Use PLT in PIE as
3143 function address only if pcrel_plt is true.
3144 (_bfd_x86_elf_link_hash_table_create): Set pcrel_plt.
3145 * elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): Add PCREL_PLT for
3146 PC-relative PLT. If PLT is PC-relative, don't generate dynamic
3147 PC-relative relocation against a function definition in data
3148 secton in PIE. Remove the obsolete comments.
3149 (elf_x86_link_hash_table): Add pcrel_plt.
3151 2018-02-13 H.J. Lu <hongjiu.lu@intel.com>
3153 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Check bfd_link_dll,
3154 instead of bfd_link_pic, for building shared library.
3156 2018-02-13 H.J. Lu <hongjiu.lu@intel.com>
3159 * elf64-x86-64.c (is_32bit_relative_branch): Removed.
3160 (elf_x86_64_relocate_section): Check PIC relocations in PIE.
3161 Remove is_32bit_relative_branch usage. Disallow PC32 reloc
3162 against protected function in shared object.
3164 2018-02-13 Sergei Trofimovich <slyfox@inbox.ru>
3167 * po/ru.po: Fix typo in Russian translation.
3169 2018-02-13 Maciej W. Rozycki <macro@mips.com>
3171 * wasm-module.c (wasm_scan_name_function_section): Rename
3172 `index' local variable to `idx'.
3174 2018-02-13 Nick Clifton <nickc@redhat.com>
3177 Fix compile time warnings generated by gcc version 8.
3178 * libbfd-in.h: Remove extraneous text from prototypes.
3179 Add prototypes for bfd_false_any, bfd_true_any,
3180 bfd_nullvoidptr_any, bfd_0_any, bfd_0u_any, bfd_0l_any,
3181 bfd_n1_any, bfd_void_any.
3182 (_bfd_generic_bfd_copy_private_bfd_data): Use vararg based dummy
3184 (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
3185 (_bfd_generic_bfd_set_private_flags): Likewise.
3186 (_bfd_generic_bfd_copy_private_section_data): Likewise.
3187 (_bfd_generic_bfd_copy_private_symbol_data): Likewise.
3188 (_bfd_generic_bfd_copy_private_header_data): Likewise.
3189 (_bfd_generic_bfd_print_private_bfd_data): Likewise.
3190 (_bfd_noarchive_construct_extended_name_table): Likewise.
3191 (_bfd_noarchive_truncate_arname): Likewise.
3192 (_bfd_noarchive_write_ar_hdr): Likewise.
3193 (_bfd_noarchive_get_elt_at_index): Likewise.
3194 (_bfd_nosymbols_canonicalize_symtab): Likewise.
3195 (_bfd_nosymbols_print_symbol): Likewise.
3196 (_bfd_nosymbols_get_symbol_info): Likewise.
3197 (_bfd_nosymbols_get_symbol_version_string): Likewise.
3198 (_bfd_nosymbols_bfd_is_local_label_name): Likewise.
3199 (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise.
3200 (_bfd_nosymbols_get_lineno): Likewise.
3201 (_bfd_nosymbols_find_nearest_line): Likewise.
3202 (_bfd_nosymbols_find_line): Likewise.
3203 (_bfd_nosymbols_find_inliner_info): Likewise.
3204 (_bfd_nosymbols_bfd_make_debug_symbol): Likewise.
3205 (_bfd_nosymbols_read_minisymbols): Likewise.
3206 (_bfd_nosymbols_minisymbol_to_symbol): Likewise.
3207 (_bfd_norelocs_bfd_reloc_type_lookup): Likewise.
3208 (_bfd_norelocs_bfd_reloc_name_lookup): Likewise.
3209 (_bfd_nowrite_set_arch_mach): Likewise.
3210 (_bfd_nowrite_set_section_contents): Likewise.
3211 (_bfd_nolink_sizeof_headers): Likewise.
3212 (_bfd_nolink_bfd_get_relocated_section_contents): Likewise.
3213 (_bfd_nolink_bfd_relax_section): Likewise.
3214 (_bfd_nolink_bfd_gc_sections): Likewise.
3215 (_bfd_nolink_bfd_lookup_section_flags): Likewise.
3216 (_bfd_nolink_bfd_merge_sections): Likewise.
3217 (_bfd_nolink_bfd_is_group_section): Likewise.
3218 (_bfd_nolink_bfd_discard_group): Likewise.
3219 (_bfd_nolink_bfd_link_hash_table_create): Likewise.
3220 (_bfd_nolink_bfd_link_add_symbols): Likewise.
3221 (_bfd_nolink_bfd_link_just_syms): Likewise.
3222 (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise.
3223 (_bfd_nolink_bfd_final_link): Likewise.
3224 (_bfd_nolink_bfd_link_split_section): Likewise.
3225 (_bfd_nolink_section_already_linked): Likewise.
3226 (_bfd_nolink_bfd_define_common_symbol): Likewise.
3227 (_bfd_nolink_bfd_define_start_stop): Likewise.
3228 (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise.
3229 (_bfd_nodynamic_get_synthetic_symtab): Likewise.
3230 (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise.
3231 (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise.
3232 * libbfd.c (bfd_false_any): New function. Like bfd_false but
3233 accepts one or more arguments.
3234 (bfd_true_any): Likewise.
3235 (bfd_nullvoidptr_any): Likewise.
3236 (bfd_0_any): Likewise.
3237 (bfd_0u_any): Likewise.
3238 (bfd_0l_any): Likewise.
3239 (_bfd_n1_any): Likewise.
3240 (bfd_void_any): Likewise.
3241 * libbfd.h (extern): Regenerate
3242 * aout-target.h (MY_bfd_is_target_special_symbol): Use vararg
3243 based dummy function.
3244 * aout-tic30.c (tic30_aout_set_arch_mach): Likewise.
3245 * binary.c (binary_get_symbol_info): Likewise.
3246 * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
3247 * coff-mips.c (mips_ecoff_backend_data): Likewise.
3248 * coffcode.h (coff_set_alignment_hook): Likewise.
3249 (symname_in_debug_hook): Likewise.
3250 (bfd_coff_backend_data bigobj_swap_table): Likewise.
3251 * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise.
3252 * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise.
3253 * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise.
3254 * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise.
3255 * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise.
3256 * elf32-score.c (elf_backend_omit_section_dynsym): Likewise.
3257 * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise.
3258 * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise.
3259 * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise.
3260 * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise.
3261 * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise.
3262 * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise.
3263 * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise.
3264 * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise.
3265 * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise.
3266 * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise.
3267 (bfd_elfNN_bfd_make_debug_symbol): Likewise.
3268 (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
3269 (bfd_elfNN_bfd_set_private_flags): Likewise.
3270 (bfd_elfNN_bfd_is_target_special_symbol): Likewise.
3271 (elf_backend_init_index_section): Likewise.
3272 (elf_backend_allow_non_load_phdr): Likewise.
3273 * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise.
3274 * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise.
3275 * ieee.c (ieee_construct_extended_name_table): Likewise.
3276 (ieee_write_armap): Likewise.
3277 (ieee_write_ar_hdr): Likewise.
3278 (ieee_bfd_is_target_special_symbol): Likewise.
3279 * ihex.c (ihex_canonicalize_symtab): Likewise.
3280 (ihex_bfd_is_target_special_symbol): Likewise.
3281 * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise.
3282 * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise.
3283 (_bfd_ecoff_set_alignment_hook): Likewise.
3284 * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise.
3285 * mmo.c (mmo_bfd_is_target_special_symbol): Likewise.
3286 * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise.
3287 * oasys.c (oasys_construct_extended_name_table): Likewise.
3288 (oasys_write_armap): Likewise.
3289 (oasys_write_ar_hdr): Likewise.
3290 (oasys_bfd_is_target_special_symbol): Likewise.
3291 * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise.
3292 * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise.
3293 * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise.
3294 * som.c (som_bfd_is_target_special_symbol): Likewise.
3295 * srec.c (srec_bfd_is_target_special_symbol): Likewise.
3296 * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise.
3297 * verilog.c (verilog_bfd_is_target_special_symbol): Likewise.
3298 * versados.c (versados_bfd_is_target_special_symbol): Likewise.
3299 (versados_bfd_reloc_name_lookup): Likewise.
3300 * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise.
3301 (vms_bfd_define_start_stop): Likewise.
3302 (alpha_vms_bfd_is_target_special_symbol): Likewise.
3303 * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise.
3304 * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise.
3305 * elf32-arc.c (get_replace_function): Assign replacement function
3307 * elf32-i370.c (i370_noop): Update prototype.
3309 2018-02-13 Alan Modra <amodra@gmail.com>
3312 * elf.c (_bfd_elf_fixup_group_sections): Account for removed
3313 relocation sections. If size reduces to just the flag word,
3314 remove that too and mark with SEC_EXCLUDE.
3315 * elflink.c (bfd_elf_final_link): Strip empty group sections.
3317 2018-02-13 Alan Modra <amodra@gmail.com>
3320 * elf.c (assign_file_positions_for_non_load_sections): Rewrite
3323 2018-02-12 Zebediah Figura <z.figura12@gmail.com>
3325 * i386msdos.c (msdos_mkobject); New function.
3326 (msdos_object_p): New function.
3327 (i386_msdos_vec): Use msdos_object_p as the check_format
3329 * peicode.h: Rename external_PEI_DOS_hdr, DOSMAGIC, and
3330 NT_SIGNATURE to external_DOS_hdr, IMAGE_DOS_SIGNATURE, and
3332 * peXXigen.c: Likewise.
3333 * coff-ia64.c: Likewise.
3335 2018-02-12 Nick Clifton <nickc@redhat.com>
3337 * elf32-nds32.c (nds32_elf_relax_longjump3): Remove redundant
3339 * elf32-arc.c (elf_arc_relocate_section): Likewise.
3341 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
3343 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Reorder conditions.
3344 (sparc_elf_append_rela): Assert that there is enough room in section.
3345 (_bfd_sparc_elf_copy_indirect_symbol): Fix formatting.
3346 (_bfd_sparc_elf_adjust_dynamic_symbol): Minor tweak.
3347 (allocate_dynrelocs): Remove outdated comments and reorder conditions.
3348 For a symbol subject to a GOT relocation, reserve a slot in the
3349 relocation section if the symbol isn't dynamic and we are in PIC mode.
3350 (_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: If relocation
3351 is relaxed and a slot was reserved, generate a R_SPARC_NONE relocation.
3352 <R_SPARC_GOTDATA_OP_HIX22>: Adjust comments.
3353 <R_SPARC_PC10>: Reorder conditions. Remove always-false assertion.
3354 (_bfd_sparc_elf_finish_dynamic_symbol): Rename local_undefweak into
3355 resolved_to_zero. Do not generate a dynamic GOT relocation for an
3356 undefined weak symbol with non-default visibility. Remove superfluous
3357 'else' and fix formatting.
3359 2018-02-09 H.J. Lu <hongjiu.lu@intel.com>
3361 * elf32-i386.c (elf_i386_get_synthetic_symtab): Also handle
3363 (i386_elf32_sol2_vec): Don't declare.
3364 (elf_i386_link_setup_gnu_properties): Also handle is_solaris.
3365 Don't set need_global_offset_table.
3366 (elf_i386_solaris_arch_bed): New.
3367 (elf_backend_arch_data): Set to elf_i386_solaris_arch_bed for
3369 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Check
3370 target_os != is_nacl instead of target_os == is_normal.
3371 (x86_64_elf64_sol2_vec): Don't declare.
3372 (elf_x86_64_link_setup_gnu_properties): Check target_os !=
3373 is_nacl instead of target_os == is_normal. Don't set
3374 need_global_offset_table.
3375 (elf_x86_64_solaris_arch_bed): New.
3376 (elf_backend_arch_data): Set to elf_x86_64_solaris_arch_bed for
3378 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep
3379 _GLOBAL_OFFSET_TABLE_ for Solaris.
3380 (_bfd_x86_elf_link_setup_gnu_properties): Don't copy
3381 need_global_offset_table.
3382 * elfxx-x86.h (elf_x86_target_os): Add is_solaris.
3383 (elf_x86_link_hash_table): Remove need_global_offset_table.
3384 (elf_x86_init_table): Likewise.
3386 2018-02-08 H.J. Lu <hongjiu.lu@intel.com>
3388 * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
3390 (i386_elf32_sol2_vec): Declared.
3391 (elf_i386_link_setup_gnu_properties): Set
3392 need_global_offset_table with info->output_bfd->xvec.
3393 * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
3395 (x86_64_elf64_sol2_vec): Declared.
3396 (elf_x86_64_link_setup_gnu_properties): Set
3397 need_global_offset_table with info->output_bfd->xvec.
3399 2018-02-08 H.J. Lu <hongjiu.lu@intel.com>
3401 * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
3403 (elf_i386_link_setup_gnu_properties): Set need_global_offset_table
3405 * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
3407 (elf_x86_64_link_setup_gnu_properties): Set
3408 need_global_offset_table for Solaris.
3409 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep the
3410 unused _GLOBAL_OFFSET_TABLE_ for Solaris.
3411 (_bfd_x86_elf_link_setup_gnu_properties): Copy
3412 need_global_offset_table.
3413 * elfxx-x86.h (elf_x86_link_hash_table): Add
3414 need_global_offset_table.
3415 (elf_x86_init_table): Likewise.
3417 2018-02-08 Jim Wilson <jimw@sifive.com>
3419 * elfnn-riscv.c (riscv_elf_relocate_section): Add comment for previous
3422 2018-02-08 Nick Clifton <nickc@redhat.com>
3425 * elf.c (elf_parse_notes): Reject notes with excessuively large
3428 2018-02-07 Alan Modra <amodra@gmail.com>
3430 Revert 2018-01-17 Alan Modra <amodra@gmail.com>
3431 * elf32-ppc.c: Remove speculation barrier support.
3432 * elf32-ppc.h: Likewise.
3433 * elf64-ppc.c: Likewise.
3434 * elf64-ppc.h: Likewise.
3436 2018-02-06 Jim Wilson <jimw@sifive.com>
3438 * elfnn-riscv.c (riscv_elf_relocate_section): Return TRUE if used
3439 callback to report an error.
3441 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
3444 * elfxx-sparc.c (sparc_elf_tls_transition): Turn call to bfd_link_pic
3445 into call to !bfd_link_executable and tidy up.
3446 (_bfd_sparc_elf_check_relocs): Fix formatting and tidy up.
3447 <R_SPARC_TLS_LE_HIX22>: Turn call to bfd_link_pic into call to
3448 !bfd_link_executable.
3449 <R_SPARC_TLS_IE_HI22>: Likewise.
3450 <GOT relocations>: Remove useless code, tidy and merge related blocks.
3451 <R_SPARC_TLS_GD_CALL>: Turn call to bfd_link_pic into call to
3452 !bfd_link_executable.
3453 <R_SPARC_WPLT30>: Tidy up.
3454 (_bfd_sparc_elf_gc_mark_hook): Turn call to bfd_link_pic into call to
3455 !bfd_link_executable.
3456 (allocate_dynrelocs): Likewise.
3457 (_bfd_sparc_elf_relocate_section): Fix formatting and tidy up.
3458 <R_SPARC_TLS_GD_HI22>: Merge into...
3459 <R_SPARC_TLS_GD_LO10>: ...this. Adjust 4th argument in call to
3460 sparc_elf_tls_transition and remove redundant code.
3461 <R_SPARC_TLS_LDM_HI22>: Turn call to bfd_link_pic into call to
3462 !bfd_link_executable.
3463 <R_SPARC_TLS_LDO_HIX22>: Likewise.
3464 <R_SPARC_TLS_LE_HIX22>: Likewise. Tidy up.
3465 <R_SPARC_TLS_LDM_CALL>: Likewise.
3466 <R_SPARC_TLS_GD_CALL>: Likewise. Tidy up.
3467 <R_SPARC_TLS_GD_ADD>: Likewise.
3468 <R_SPARC_TLS_LDM_ADD>: Likewise.
3469 <R_SPARC_TLS_LDO_ADD>: Likewise.
3470 <R_SPARC_TLS_IE_LD>: Likewise.
3472 2018-02-06 Miloš Stojanović <milos.stojanovic@rt-rk.com>
3475 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): If the dwarf
3476 functions failed to find the function name, try the generic elf
3477 find function instead.
3479 2018-02-06 Sergio Durigan Junior <sergiodj@redhat.com>
3481 * coff-rs6000.c (xcoff_write_archive_contents_old): Use
3482 'memcpy' instead of 'strncpy' when writing the magic number.
3484 2018-02-06 Nick Clifton <nickc@redhat.com>
3487 * opncls.c (bfd_get_debug_link_info_1): Check the size of the
3488 section before attempting to read it in.
3489 (bfd_get_alt_debug_link_info): Likewise.
3491 2018-02-06 Paul Carroll <pcarroll@codesourcery.com>
3493 * bfd/dwarf2.c (find_abstract_name): Modified to return file and
3494 line information in addition to name, if they can be found.
3496 2018-02-05 Renlin Li <renlin.li@arm.com>
3499 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Relax the
3500 R_AARCH64_ABS32 and R_AARCH64_ABS16 for absolute symbol. Apply the
3501 check for writeable section as well.
3503 2018-02-05 H.J. Lu <hongjiu.lu@intel.com>
3506 * elf32-i386.c (elf_i386_check_relocs): Set got_referenced if
3507 _GLOBAL_OFFSET_TABLE_ is referenced or GOT is needed to resolve
3508 undefined weak symbol to 0.
3509 * elf64-x86-64.c (elf_x86_64_check_relocs): Set got_referenced
3510 if _GLOBAL_OFFSET_TABLE_ is referenced.
3511 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Check
3512 got_referenced instead of ref_regular_nonweak. Remove the
3513 unused _GLOBAL_OFFSET_TABLE_ from symbol table.
3514 * elfxx-x86.h (elf_x86_link_hash_table): Add got_referenced.
3516 2018-02-05 Maciej W. Rozycki <macro@mips.com>
3518 * elfnn-riscv.c (_bfd_riscv_relax_pc): Use `memset' to
3519 initialize `hi_reloc'.
3521 2018-02-05 Maciej W. Rozycki <macro@mips.com>
3523 * elfxx-mips.c (_bfd_mips_elf_section_processing): For
3524 SHT_MIPS_REGINFO sections don't assert the correct size and
3525 report an error instead.
3527 2018-02-05 Maciej W. Rozycki <macro@mips.com>
3529 * elf.c (_bfd_elf_write_object_contents): Propagate a failure
3530 status from `->elf_backend_section_processing'.
3532 2018-02-02 Jim Wilson <jimw@sifive.com>
3535 * elfnn-riscv.c (riscv_relax_delete_bytes): New parameter link_info.
3536 If link_info->wrap_hash, check for a duplicate symbol and ignore.
3537 (_bfd_riscv_relax_call, bfd_riscv_relax_lui, _bfd_riscv_relax_tls_le):
3538 Pass new argument to riscv_relax_delete_bytes.
3539 (_bfd_riscv_relax_align, _bfd_riscv_relax_delete): Likewise. Remove
3540 ATTRIBUTE_UNUSED from link_info parameter.
3542 2018-02-02 Alan Modra <amodra@gmail.com>
3544 * elf64-ppc.c (ppc64_elf_relocate_section): Don't relocate nops
3545 emitted for toc sequence optimization. Set and use "howto" later.
3547 2018-02-01 Simon Marchi <simon.marchi@ericsson.com>
3549 * elf64-ppc.c (ppc64_elf_archive_symbol_lookup): Avoid pointer
3550 arithmetic on NULL pointer.
3551 * elflink.c (_bfd_elf_archive_symbol_lookup,
3552 elf_link_add_archive_symbols): Likewise.
3554 2018-01-31 Michael Matz <matz@suse.de>
3556 * elflink.c (bfd_elf_define_start_stop): Fix check of
3559 2018-01-31 H.J. Lu <hongjiu.lu@intel.com>
3562 * elflink.c (bfd_elf_define_start_stop): Check if __start and
3563 __stop symbols are referenced by shared objects.
3565 2018-01-30 Alan Modra <amodra@gmail.com>
3568 * elf.c (_bfd_elf_map_sections_to_segments): Don't start a new
3569 segment when demand paged with lma on the same page. Test this
3570 before load/non-load, executable/non-executable,
3571 writable/non-writable tests and simplify. Delete bogus relro
3572 condition in writable/non-writable test. Delete outdated
3573 comment. Formatting.
3575 2018-01-30 Alan Modra <amodra@gmail.com>
3577 * elflink.c (bfd_elf_define_start_stop): Make __start and __stop
3580 2018-01-29 Alan Modra <amodra@gmail.com>
3583 * coffgen.c (coff_pointerize_aux): Ensure auxent tagndx is in
3584 range before converting to a symbol table pointer.
3586 2018-01-27 Nick Clifton <nickc@redhat.com>
3588 * po/ru.po: Updated Russian translation.
3590 2018-01-26 Alan Modra <amodra@gmail.com>
3592 * elflink.c (bfd_elf_define_start_stop): Override symbols when
3593 they are defined dynamically.
3595 2018-01-26 Alan Modra <amodra@gmail.com>
3597 * elf64-ppc.c (ppc64_elf_size_stubs): Iterate sizing when
3598 .branch_lt changes size.
3600 2018-01-25 Alan Modra <amodra@gmail.com>
3603 * elfcode.h (elf_object_p): Avoid integer overflow.
3605 2018-01-25 Eric Botcazou <ebotcazou@adacore.com>
3608 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
3609 Do a mere lookup of the __tls_get_addr symbol instead of adding it.
3612 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
3615 * elfxx-sparc.c (sparc_elf_tls_transition): Replace
3616 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
3617 bfd_link_executable for TLS check.
3618 (_bfd_sparc_elf_check_relocs): Likewise.
3619 (allocate_dynrelocs): Likewise.
3620 (_bfd_sparc_elf_relocate_section): Likewise.
3622 2018-01-24 Renlin Li <renlin.li@arm.com>
3624 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Add support for
3625 BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
3626 BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
3627 BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
3628 BFD_RELOC_AARCH64_MOVW_PREL_G3.
3629 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
3630 (_bfd_aarch64_elf_resolve_relocation): Likewise.
3632 2018-01-24 Renlin Li <renlin.li@arm.com>
3634 * reloc.c: Add BFD_RELOC_AARCH64_MOVW_PREL_G0,
3635 BFD_RELOC_AARCH64_MOVW_PREL_G0_NC, BFD_RELOC_AARCH64_MOVW_PREL_G1,
3636 BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, BFD_RELOC_AARCH64_MOVW_PREL_G2,
3637 BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, BFD_RELOC_AARCH64_MOVW_PREL_G3.
3638 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add entries for
3639 BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
3640 BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
3641 BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
3642 BFD_RELOC_AARCH64_MOVW_PREL_G3.
3643 * bfd-in2.h: Regenerate.
3644 * libbfd.h: Regenerate.
3646 2018-01-23 Maciej W. Rozycki <macro@mips.com>
3648 * elfxx-mips.c (_bfd_mips_elf_final_link): Update a stale
3649 `mips_elf32_section_processing' comment reference.
3651 2018-01-20 H.J. Lu <hongjiu.lu@intel.com>
3654 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Check the
3655 versioned __tls_get_addr symbol.
3657 2018-01-19 Nick Clifton <nickc@redhat.com>
3659 * po/fr.po: Updated French translation.
3661 2018-01-18 Alan Modra <amodra@gmail.com>
3663 * elf32-ppc.c (ppc_elf_create_glink): Correct alignment of .glink.
3664 * elf64-ppc.c (ppc64_elf_size_stubs): Handle negative plt_stub_align.
3665 (ppc64_elf_build_stubs): Likewise.
3667 2018-01-17 Nick Clifton <nickc@redhat.com>
3669 * po/ru.po: Updated Russian translation.
3670 * po/uk/po: Updated Ukranian translation.
3672 2018-01-17 Alan Modra <amodra@gmail.com>
3674 * elf64-ppc.c (ppc64_elf_build_stubs): Silence gcc warning.
3676 2018-01-17 Alan Modra <amodra@gmail.com>
3678 * elf32-ppc.c (GLINK_ENTRY_SIZE): Handle speculation barrier.
3679 (CRSETEQ, BEQCTRM): Define.
3680 (is_nonpic_glink_stub): Don't check bctr.
3681 (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
3682 (ppc_elf_relax_section): Size speculation barrier.
3683 (output_bctr): New function.
3684 (write_glink_stub): Use output_bctr.
3685 (ppc_elf_relocate_section): Use output_bctr for long branch stub.
3686 (ppc_elf_finish_dynamic_symbol): Likewise.
3687 (ppc_elf_finish_dynamic_sections): Use output_bctr.
3688 * elf32-ppc.h (struct ppc_elf_params): Add speculate_indirect_jumps.
3689 * elf64-ppc.c (CRSETEQ, BEQCTRM, BEQCTRLM): Define.
3690 (GLINK_PLTRESOLVE_SIZE): Size speculation barrier.
3691 (size_global_entry_stubs): Handle speculation barrier sizing.
3692 (plt_stub_size): Likewise.
3693 (output_bctr): New function.
3694 (build_plt_stub, build_tls_get_addr_stub): Output speculation
3696 (ppc_build_one_stub): Likewise for ppc_stub_plt_branch.
3697 (ppc_size_one_stub): Size speculation barrier in ppc_stub_plt_branch.
3698 (build_global_entry_stubs): Output speculation barrier.
3699 (ppc64_elf_build_stubs): Likewise in __glink_PLTresolve stub.
3700 * elf64-ppc.h (struct ppc64_elf_params): Add speculate_indirect_jumps.
3702 2018-01-17 Alan Modra <amodra@gmail.com>
3704 * elf32-ppc.c (GLINK_ENTRY_SIZE): Add parameters, handle
3705 __tls_get_addr_opt, and alignment sizing.
3706 (TLS_GET_ADDR_GLINK_SIZE): Delete.
3707 (is_nonpic_glink_stub): Don't use GLINK_ENTRY_SIZE.
3708 (ppc_elf_get_synthetic_symtab): Recognize stubs spaced at 4, 6,
3710 (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
3711 (allocate_dynrelocs): Use new GLINK_ENTRY_SIZE.
3712 (ppc_elf_size_dynamic_sections): Likewise. Size branch table
3714 (write_glink_stub): Handle __tls_get_addr_opt stub.
3715 Pad out to size given by GLINK_ENTRY_SIZE.
3716 (ppc_elf_relocate_section): Adjust write_glink_stub call.
3717 (ppc_elf_finish_dynamic_symbol): Likewise.
3718 (ppc_elf_finish_dynamic_sections): Write PLTresolve without using
3719 insn array since so many need rewriting.
3720 * elf32-ppc.h (struct ppc_elf_params): Add plt_stub_align.
3721 * elf64-ppc.c (GLINK_PLTRESOLVE_SIZE): Rename from
3722 GLINK_CALL_STUB_SIZE. Add htab param and evaluate to size without
3723 nops. Adjust all uses.
3724 (ppc64_elf_get_synthetic_symtab): Don't use GLINK_CALL_STUB_SIZE
3725 in glink_vma calculation.
3726 (struct ppc_link_hash_table): Add global_entry section pointer.
3727 (create_linkage_sections): Create separate section for global
3729 (PPC_LO, PPC_HI, PPC_HA): Move earlier.
3730 (size_global_entry_stubs): Handle sizing for aligned stubs.
3731 (ppc64_elf_size_dynamic_sections): Handle global_entry alloc,
3732 and don't stash end of glink branch table in rawsize.
3733 (ppc_build_one_stub): Rewrite stub size calculations.
3734 (build_global_entry_stubs): Use new section.
3735 (ppc64_elf_build_stubs): Don't pad __glink_PLTresolve with nops.
3736 Build lazy link stubs out to end of section. Build global entry
3737 stubs in new section.
3739 2018-01-15 Nick Clifton <nickc@redhat.com>
3741 * po/uk.po: Updated Ukranian translation.
3743 2018-01-13 Nick Clifton <nickc@redhat.com>
3745 * po/bfd.pot: Regenerated.
3747 2018-01-13 Nick Clifton <nickc@redhat.com>
3749 * version.m4: Bump version to 2.30.51
3750 * configure: Regenerate.
3752 2018-01-13 Nick Clifton <nickc@redhat.com>
3754 2.30 branch created.
3756 2018-01-12 Jens Widell <jl@opera.com>
3758 * elf.c (setup_group): Optimize search for group by remembering
3759 last found group and restarting search at that index.
3760 * elf-bfd.h (struct elf_obj_tdata): Add group_search_offset field.
3762 2018-01-12 Gunther Nikl <gnikl@users.sourceforge.net>
3764 * aoutx.h (aout_link_check_ar_symbols): Remove default and handle
3765 bfd_link_common_skip_none in switch.
3767 2018-01-12 Alan Modra <amodra@gmail.com>
3770 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Ignore dynamic
3771 references on forced local symbols.
3773 2018-01-12 Vlad Ivanov <vlad@ivanov.email>
3775 * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
3776 .reginfo section has wrong size.
3778 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
3781 * elf.c (_bfd_elf_map_sections_to_segments): When generating
3782 separate code and read-only data LOAD segments, create a new
3783 LOAD segment if the previous section contains text and the
3784 current section doesn't or vice versa. Don't put a writable
3785 section in a read-only segment if there is a RELRO segment.
3787 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
3790 * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Ignore dynamic
3791 references on forced local symbols.
3793 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
3796 * elflink.c (bfd_elf_gc_sections): Keep all PREINIT_ARRAY,
3797 INIT_ARRAY as well as FINI_ARRAY sections for ld -r --gc-section.
3799 2018-01-09 Kuan-Lin Chen <kuanlinchentw@gmail.com>
3802 * elf32-nds32.c (nds32_elf_relax_loadstore): Fix a typographical error.
3804 2018-01-03 John Baldwin <jhb@FreeBSD.org>
3806 * elf.c (elfcore_grok_freebsd_note): Handle
3807 NT_FREEBSD_PROCSTAT_PROC, NT_FREEBSD_PROCSTAT_FILES, and
3808 NT_FREEBSD_PROCSTAT_VMMAP.
3810 2018-01-03 Alan Modra <amodra@gmail.com>
3812 Update year range in copyright notice of all files.
3814 For older changes see ChangeLog-2017
3816 Copyright (C) 2018 Free Software Foundation, Inc.
3818 Copying and distribution of this file, with or without modification,
3819 are permitted in any medium without royalty provided the copyright
3820 notice and this notice are preserved.
3826 version-control: never