1 2018-08-21 Alan Modra <amodra@gmail.com>
3 * reloc.c (reloc_howto_type): Typedef.
4 (bfd_symbol): Delete forward declaration.
5 (struct reloc_howto_struct): Add "negate" field. Make "size",
6 "bitsize", "rightshift", "bitpos", "complain_on_overflow",
7 "pc_relative", "partial_inplace", and "pcrel_offset" bitfields.
8 Rearrange for better packing. Revise comments.
9 (HOWTO): Map to rearranged reloc_howto_struct.
10 (bfd_get_reloc_size): Delete now unused cases.
11 (read_reloc, write_reloc): Likewise.
12 (apply_reloc, _bfd_relocate_contents): Test howto->negate
13 rather than howto->size < 0 for negated relocation values.
14 * coff-rs6000.c (xcoff_complain_overflow_bitfield_func): Avoid
15 signed/unsigned warning.
16 (xcoff_ppc_relocate_section): Delete "condition is always false"
18 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Likewise.
19 * cpu-ns32k.c (do_ns32k_reloc): Adjust to suit reloc_howto_struct
21 * vms-alpha.c (_bfd_vms_write_etir, alpha_vms_slurp_relocs): Use
22 size 16 for ALPHA_R_LINKAGE.
23 (alpha_howto_table <ALPHA_R_LINKAGE>): Set encoded size and
25 * bfd-in.h (reloc_howto_type): Delete.
26 * bfd-in2.h: Regenerate.
28 2018-08-21 Alan Modra <amodra@gmail.com>
30 * reloc.c (HOWTO): Revise comment.
31 (NEWHOWTO, HOWTO_PREPARE): Delete.
32 * coff-arm.c (coff_arm_reloc_type_lookup): Replace const struc
33 reloc_howto_struct with reloc_howto_type.
34 * ns32knetbsd.c (MY_bfd_reloc_type_lookup): Likewise.
35 * vms-alpha.c (alpha_vms_bfd_reloc_type_lookup): Likewise.
36 * elf-hppa.h (HOW): Define.
37 (elf_hppa_howto_table): Use it to simplify this table, correcting
38 name of R_PARISC_LTOFF16WF, R_PARISC_LTOFF_FPTR64, and
39 R_PARISC_LTOFF_FPTR16DF.
40 * elf32-mep.c (MEPREL): Use HOWTO.
41 * bfd-in2.h: Regenerate.
43 2018-08-20 Alan Modra <amodra@gmail.com>
45 * mmo.c (valid_mmo_symbol_character_set): Initialize and make
47 (mmo_init): Don't init valid_mmo_symbol_character_set.
49 2018-08-20 Alan Modra <amodra@gmail.com>
51 * rs6000-core.c (CORE_COMMONSZ): Balance parentheses in expression.
53 2018-08-17 H.J. Lu <hongjiu.lu@intel.com>
56 * elf-bfd.h (elf_backend_data): Add fixup_gnu_properties.
57 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Call
58 backend fixup_gnu_properties if it isn't NULL. Discard
59 .note.gnu.property section if all properties have been removed.
60 * elfxx-target.h (elf_backend_fixup_gnu_properties): New.
61 (elfNN_bed): Initialize fixup_gnu_properties.
62 * elfxx-x86.c (_bfd_x86_elf_link_fixup_gnu_properties): New
64 * elfxx-x86.h (_bfd_x86_elf_link_fixup_gnu_properties): New
66 (elf_backend_fixup_gnu_properties): New.
68 2018-08-16 Alan Modra <amodra@gmail.com>
70 * elf64-ppc.c: Correct ppc_stub_long_branch_notoc example.
73 2018-08-12 H.J. Lu <hongjiu.lu@intel.com>
76 * Makefile.am (BFD32_LIBS): Add elf-properties.lo.
77 (BFD32_LIBS_CFILES): Add elf-properties.c.
78 (BFD32_BACKENDS): Remove elf-properties.lo.
79 (BFD32_BACKENDS_CFILES): Remove elf-properties.c.
80 * configure.ac (elf): Remove elf-properties.lo.
81 * Makefile.in: Regenerated.
82 * configure: Likewise.
84 2018-08-11 H.J. Lu <hongjiu.lu@intel.com>
87 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Don't
88 add X86_ISA_1_NEEDED property only if existing properties won't
91 2018-08-11 Alan Modra <amodra@gmail.com>
93 * reloc.c (bfd_get_reloc_size): Sort switch.
94 (read_reloc, write_reloc, apply_reloc): New functions.
95 (bfd_perform_relocation, bfd_install_relocation): Use apply_reloc.
96 (_bfd_relocate_contents): Use read_reloc and write_reloc.
97 (_bfd_clear_contents): Likewise.
99 2018-08-11 John Darrington <john@darrington.wattle.id.au>
101 * reloc.c (_bfd_relocate_contents): Handle 3 byte relocs.
102 (_bfd_clear_contents): Likewise.
103 (bfd_perform_relocation): Likewise.
104 (bfd_install_relocation): Likewise.
106 2018-08-10 H.J. Lu <hongjiu.lu@intel.com>
109 * elflink.c (bfd_elf_record_link_assignment): Always clear
110 h->verinfo.verdef when overriding a dynamic definition.
112 2018-08-10 H.J. Lu <hongjiu.lu@intel.com>
115 * elf-properties.c (elf_get_gnu_property_section_size): Always
116 use align_size as pr_datasz for GNU_PROPERTY_STACK_SIZE.
117 (elf_write_gnu_properties): Likewise.
119 2018-08-08 H.J. Lu <hongjiu.lu@intel.com>
122 * bfd.c (bfd_convert_section_size): Check BFD_DECOMPRESS after
123 calling _bfd_elf_convert_gnu_property_size to convert
124 .note.gnu.property section size.
125 (bfd_convert_section_contents): Check BFD_DECOMPRESS after
126 calling _bfd_elf_convert_gnu_properties to convert
127 .note.gnu.property section.
128 * elf-bfd.h (_bfd_elf_convert_gnu_property_size): New prototype.
129 (_bfd_elf_convert_gnu_properties): Likewise.
130 * elf-properties.c (elf_get_gnu_property_section_size): New
132 (elf_write_gnu_properties): Likewise.
133 (_bfd_elf_convert_gnu_property_size): Likewise.
134 (_bfd_elf_convert_gnu_properties): Likewise.
135 (_bfd_elf_link_setup_gnu_properties): Use
136 elf_get_gnu_property_section_size and elf_write_gnu_properties.
138 2018-08-08 H.J. Lu <hongjiu.lu@intel.com>
141 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Remove
142 GNU_PROPERTY_X86_ISA_1_USED if an input file doesn't have it.
143 (_bfd_x86_elf_link_setup_gnu_properties): Adding the
144 GNU_PROPERTY_X86_ISA_1_NEEDED, instead of
145 GNU_PROPERTY_X86_ISA_1_USED, property.
147 2018-08-07 Alan Modra <amodra@gmail.com>
149 * elf64-ppc.c (struct map_stub): Delete tls_get_addr_opt_bctrl.
150 Add lr_restore, eh_size and eh_base.
151 (eh_advance, eh_advance_size): New functions.
152 (build_tls_get_addr_stub): Emit EH info for stub.
153 (ppc_build_one_stub): Likewise for _notoc stubs.
154 (ppc_size_one_stub): Size EH info for stub.
155 (group_sections): Init new map_stub fields.
156 (stub_eh_frame_size): Delete.
157 (ppc64_elf_size_stubs): Size EH info for stubs. Set up dummy EH
159 (ppc64_elf_build_stubs): Reinit new map_stub fields. Set FDE
160 offset to stub section here..
161 (ppc64_elf_finish_dynamic_sections): ..rather than here.
163 2018-08-07 Alan Modra <amodra@gmail.com>
165 * elf64-ppc.c (ppc64_elf_relocate_section): Don't skip first
166 instruction of __tls_get_addr_opt stub.
167 (plt_stub_size): Omit ALWAYS_EMIT_R2SAVE condition when
168 dealing with __tls_get_addr_opt stub.
169 (build_tls_get_addr_stub, ppc_size_one_stub): Likewise.
171 2018-08-06 Claudiu Zissulescu <claziss@synopsys.com>
173 * elf32-arc.c (arc_elf_merge_private_bfd_data): Complain about
174 efalgs only when in/out exists.
175 (elf32_arc_section_from_shdr): Don't complain about 0x0c
176 section type. It is mwdt compiler specific.
178 2018-08-06 Claudiu Zissulescu <claziss@synopsys.com>
180 * elf32-arc.c (arc_elf_merge_attributes): Fix merge attributes.
182 2018-08-06 Claudiu Zissulescu <claziss@synopsys.com>
184 * elf32-arc.c (arc_elf_merge_attributes): Handle
187 2018-08-05 Alan Modra <amodra@gmail.com>
189 * elf64-ppc.c (ADDI_R12_R11, ADDI_R12_R12, LIS_R12),
190 (ADDIS_R12_R11, ORIS_R12_R12_0, ORI_R12_R12_0),
191 (SLDI_R12_R12_32, LDX_R12_R11_R12, ADD_R12_R11_R12): Define.
192 (ppc64_elf_howto_raw): Add R_PPC64_REL24_NOTOC entry.
193 (ppc64_elf_reloc_type_lookup): Support R_PPC64_REL24_NOTOC.
194 (ppc_stub_type): Add ppc_stub_long_branch_notoc,
195 ppc_stub_long_branch_both, ppc_stub_plt_branch_notoc,
196 ppc_stub_plt_branch_both, ppc_stub_plt_call_notoc, and
197 ppc_stub_plt_call_both.
198 (is_branch_reloc): Add R_PPC64_REL24_NOTOC.
199 (build_offset, size_offset): New functions.
200 (plt_stub_size): Support plt_call_notoc and plt_call_both.
201 (ppc_build_one_stub, ppc_size_one_stub): Support new stubs.
202 (toc_adjusting_stub_needed): Handle R_PPC64_REL24_NOTOC.
203 (ppc64_elf_size_stubs): Likewise, and new stubs.
204 (ppc64_elf_build_stubs, ppc64_elf_relocate_section): Likewise.
205 * reloc.c: Add BFD_RELOC_PPC64_REL24_NOTOC.
206 * bfd-in2.h: Regenerate.
207 * libbfd.h: Regenerate.
209 2018-08-05 Alan Modra <amodra@gmail.com>
211 * elf64-ppc.c (ppc_build_one_stub): Lose "_r2off" in stub symbols.
213 2018-08-02 Jim Wilson <jimw@sifive.com>
215 * elfnn-riscv.c (riscv_elf_create_dynamic_sections): For .tdata.dyn,
216 add SEC_LINKER_CREATED flag.
218 2018-08-01 Nick Clifton <nickc@redhat.com>
220 * coff-rs6000.c (_bfd_xcoff_put_ldsymbol_name): Suppress warnings
221 about potentially truncated strncpy operations.
222 (_bfd_xcoff_put_symbol_name): Likewise.
224 * elf32-avr.c (avr_stub_name): Check for a NULL return from
227 2018-08-01 Zenith <zenith432@users.sourceforge.net>
230 * plugin.c (bfd_plugin_open_input): Close file descriptor if the
232 (try_claim): Always close the file descriptor at the end of the
234 (try_load_plugin): If a plugin has already been registered, then
235 skip the dlopen and onload steps and go straight to claiming the
236 file. If these is an error, close the plugin.
238 2018-08-01 Alan Modra <amodra@gmail.com>
240 * elf64-ppc.c (plt_stub_pad): Delay plt_stub_size call until needed.
241 (ppc_build_one_stub): Don't set stub_offset, instead assert that
242 it is sane. Don't adjust stub_offset for alignment. Adjust size
243 calculation. Use "targ" temp when calculating offsets.
244 (ppc_size_one_stub): Set stub_offset here. Use "targ" temp when
245 calculating offsets. Adjust for alignment before setting
246 tls_get_addr_opt_bctrl.
248 2018-08-01 Alan Modra <amodra@gmail.com>
250 * po/SRC-POTFILES.in: Regenerate.
252 2018-07-30 Nick Clifton <nickc@redhat.com>
255 * elf32-sh.c (sh_elf_relocate_section): When processing
256 translation relocs, fail if the relocation offset is too small.
257 Replace BFD_ASSERTs with more helpful error messages.
259 2018-07-30 Andrew Jenner <andrew@codesourcery.com>
261 * Makefile.am (ALL_MACHINES, ALL_MACHINES_CFILES): Add C-SKY.
262 (BFD32_BACKENDS, BFD_BACKENDS_CFILES): Likewise.
263 * Makefile.in: Regenerated.
264 * archures.c (enum bfd_architecture): Add bfd_arch_csky and
265 related bfd_mach defines.
266 (bfd_csky_arch): Declare.
267 (bfd_archures_list): Add C-SKY.
268 * bfd-in.h (elf32_csky_build_stubs): Declare.
269 (elf32_csky_size_stubs): Declare.
270 (elf32_csky_next_input_section: Declare.
271 (elf32_csky_setup_section_lists): Declare.
272 * bfd-in2.h: Regenerated.
273 * config.bfd: Add C-SKY.
274 * configure.ac: Likewise.
275 * configure: Regenerated.
276 * cpu-csky.c: New file.
277 * elf-bfd.h (enum elf_target_id): Add C-SKY.
278 * elf32-csky.c: New file.
279 * libbfd.h: Regenerated.
280 * reloc.c: Add C-SKY relocations.
281 * targets.c (csky_elf32_be_vec, csky_elf32_le_vec): Declare.
282 (_bfd_target_vector): Add C-SKY target vector entries.
284 2018-07-27 John Darrington <john@darrington.wattle.id.au>
286 * elf32-s12z.c (ELF_TARGET_ID): Don't define.
288 2018-07-27 John Darrington <john@darrington.wattle.id.au>
290 * libbfd.c (bfd_getb24, bfd_getl24): New functions.
291 (bfd_get_24, bfd_put_24): New macros.
292 * bfd-in2.h: Regenerate.
294 2018-07-27 John Darrington <john@darrington.wattle.id.au>
296 * elf32-s12z.c (s12z_elf_set_mach_from_flags): Remove comment.
298 2018-07-26 Alan Modra <amodra@gmail.com>
300 * elf64-ppc.c (ppc64_elf_size_stubs): Use a ppc_stub_long_branch_r2off
301 for calls to symbols with STO_PPC64_LOCAL_MASK bits set to 1.
303 2018-07-25 Alan Modra <amodra@gmail.com>
305 * elf32-ppc.c (ppc_elf_relax_section): Ignore common or undef locals.
306 Avoid trashing toff with added when used as a symbol index.
307 Ignore R_PPC_PLTREL24 addends in unused example code. Avoid
308 creating unnecessary fixups when relocatable.
310 2018-07-25 Alan Modra <amodra@gmail.com>
312 * elf32-arm.c (elf32_arm_nabi_write_core_note): Disable
313 -Wstringop-truncation warning for gcc-8.0 too.
314 * elf32-ppc.c (ppc_elf_write_core_note): Likewise.
315 * elf64-ppc.c (ppc64_elf_write_core_note): Likewise.
316 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise.
317 * elf32-s390.c (elf_s390_write_core_note): Comment fix.
318 * elf64-s390.c (elf_s390_write_core_note): Likewise.
320 2018-07-24 Alan Modra <amodra@gmail.com>
323 * dwarf2.c (dwarf_debug_section_enum): Fix comment typo.
324 * elf.c (bfd_section_from_shdr, elf_sort_sections): Likewise.
326 2018-07-23 Max Filippov <jcmvbkbc@gmail.com>
328 * elf32-xtensa.c (elf_xtensa_finish_dynamic_sections): Move
329 relocation sections consistency check to always check both
330 .rela.dyn and .rela.plt when they exist. Rearrange variable
331 definition and assignment places.
333 2018-07-23 Max Filippov <jcmvbkbc@gmail.com>
335 * elf32-xtensa.c (shrink_dynamic_reloc_sections): Shrink dynamic
336 relocations section for dynamic undefined weak symbols when
337 linking a shared object.
339 2018-07-23 Tom Tromey <tom@tromey.com>
341 * elf.c (bfd_get_elf_phdrs): Don't call memcpy with size 0.
343 2018-07-21 Eric Botcazou <ebotcazou@adacore.com>
345 * elf32-arm.c (elf32_arm_final_link_relocate) <R_ARM_GOT32>: Small
346 cleanup for the case of a global symbol that binds locally. Also
347 install a value in the GOT slot in the case of a local symbol in
350 2018-07-20 H.J. Lu <hongjiu.lu@intel.com>
353 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): If the
354 separate code program header is needed, make sure that the first
355 read-only PT_LOAD segment has no code by adding a
356 GNU_PROPERTY_X86_ISA_1_USED note.
358 2018-07-20 Chenghua Xu <paul.hua.gm@gmail.com>
359 Maciej W. Rozycki <macro@mips.com>
361 * elfxx-mips.c (print_mips_ases): Add MMI extension.
363 2018-07-20 Maciej W. Rozycki <macro@mips.com>
365 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Do not
366 create DT_REL, DT_RELSZ or DT_RELENT dynamic entries if the
367 dynamic relocation section will be discarded from output.
368 (_bfd_mips_elf_finish_dynamic_sections) <DT_RELSZ>: Assert that
369 the dynamic relocation section will be retained in output.
371 2018-07-18 Maciej W. Rozycki <macro@mips.com>
373 * xcofflink.c (xcoff_write_global_symbol): Fix symbol type
374 checks for defined weak symbols.
376 2018-07-17 Maciej W. Rozycki <macro@mips.com>
378 * elf32-nds32.c (nds32_elf_relax_loadstore): Use
379 `bfd_is_abs_symbol' rather than `bfd_is_abs_section' in checking
380 whether the symbol is absolute.
381 (nds32_elf_relax_lo12): Likewise.
382 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
383 (elfNN_aarch64_check_relocs): Likewise.
384 * xcofflink.c (xcoff_need_ldrel_p): Likewise.
385 (bfd_xcoff_import_symbol): Likewise.
386 (xcoff_write_global_symbol): Likewise.
388 2018-07-17 Maciej W. Rozycki <macro@mips.com>
390 * linker.c (bfd_is_abs_symbol): New macro.
391 * bfd-in2.h: Regenerate.
393 2018-07-16 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
395 * elf-bfd.h (elfcore_write_ppc_tar): Add prototype.
396 (elfcore_write_ppc_ppr): Likewise.
397 (elfcore_write_ppc_dscr): Likewise.
398 (elfcore_write_ppc_ebb): Likewise.
399 (elfcore_write_ppc_pmu): Likewise.
400 (elfcore_write_ppc_tm_cgpr): Likewise.
401 (elfcore_write_ppc_tm_cfpr): Likewise.
402 (elfcore_write_ppc_tm_cvmx): Likewise.
403 (elfcore_write_ppc_tm_cvsx): Likewise.
404 (elfcore_write_ppc_tm_spr): Likewise.
405 (elfcore_write_ppc_tm_ctar): Likewise.
406 (elfcore_write_ppc_tm_cppr): Likewise.
407 (elfcore_write_ppc_tm_cdscr): Likewise.
408 * elf.c (elfcore_write_ppc_tar): New function.
409 (elfcore_write_ppc_ppr): Likewise.
410 (elfcore_write_ppc_dscr): Likewise.
411 (elfcore_write_ppc_ebb): Likewise.
412 (elfcore_write_ppc_pmu): Likewise.
413 (elfcore_write_ppc_tm_cgpr): Likewise.
414 (elfcore_write_ppc_tm_cfpr): Likewise.
415 (elfcore_write_ppc_tm_cvmx): Likewise.
416 (elfcore_write_ppc_tm_cvsx): Likewise.
417 (elfcore_write_ppc_tm_spr): Likewise.
418 (elfcore_write_ppc_tm_ctar): Likewise.
419 (elfcore_write_ppc_tm_cppr): Likewise.
420 (elfcore_write_ppc_tm_cdscr): Likewise.
421 (elfcore_write_register_note): Call them.
422 (elfcore_grok_ppc_tar): New function.
423 (elfcore_grok_ppc_ppr): Likewise.
424 (elfcore_grok_ppc_dscr): Likewise.
425 (elfcore_grok_ppc_ebb): Likewise.
426 (elfcore_grok_ppc_pmu): Likewise.
427 (elfcore_grok_ppc_tm_cgpr): Likewise.
428 (elfcore_grok_ppc_tm_cfpr): Likewise.
429 (elfcore_grok_ppc_tm_cvmx): Likewise.
430 (elfcore_grok_ppc_tm_cvsx): Likewise.
431 (elfcore_grok_ppc_tm_spr): Likewise.
432 (elfcore_grok_ppc_tm_ctar): Likewise.
433 (elfcore_grok_ppc_tm_cppr): Likewise.
434 (elfcore_grok_ppc_tm_cdscr): Likewise.
435 (elfcore_grok_note): Call them.
437 2018-07-11 Maciej W. Rozycki <macro@mips.com>
439 * elfxx-mips.c (mips_tls_got_relocs): Use `bfd_link_dll' rather
440 than `!bfd_link_pic' in determining the dynamic symbol index.
441 Avoid the index of -1.
442 (mips_elf_initialize_tls_slots): Likewise. Flatten code by
443 moving `dyn' to the beginning of the function block.
445 2018-07-11 Maciej W. Rozycki <macro@mips.com>
446 Rich Felker <bugdal@aerifal.cx>
449 * elfxx-mips.c (mips_tls_got_relocs): Use `bfd_link_dll' rather
450 than `bfd_link_pic' to determine whether dynamic relocations are
452 (mips_elf_initialize_tls_slots): Likewise.
454 2018-07-10 Maciej W. Rozycki <macro@mips.com>
456 * elflink.c (bfd_elf_final_link): Rename `remove' local variable
459 2018-07-10 Alan Modra <amodra@gmail.com>
461 * elf32-xgate.h: Delete.
462 * elf32-xgate.c: Delete unnecessary forward declarations, add two
464 (xgate_elf_bfd_link_hash_table_create)
465 (xgate_elf_bfd_link_hash_table_free)
466 (xgate_elf_set_mach_from_flags, struct xgate_scan_param)
467 (stub_hash_newfunc, elf32_xgate_add_symbol_hook)
468 (elf32_xgate_setup_section_lists, elf32_xgate_size_stubs)
469 (elf32_xgate_build_stubs, elf32_xgate_check_relocs)
470 (elf32_xgate_relocate_section, _bfd_xgate_elf_set_private_flags)
471 (elf32_xgate_post_process_headers): Delete.
472 (elf32_xgate_backend_symbol_processing): New function.
473 (xgate_elf_ignore_reloc, xgate_elf_special_reloc)
474 (_bfd_xgate_elf_print_private_bfd_data): Make static.
475 (ELF_TARGET_ID, elf_info_to_howto, elf_backend_check_relocs)
476 (elf_backend_relocate_section, elf_backend_object_p)
477 (elf_backend_final_write_processing, elf_backend_can_gc_sections)
478 (elf_backend_post_process_headers, elf_backend_add_symbol_hook)
479 (bfd_elf32_bfd_link_hash_table_create)
480 (bfd_elf32_bfd_set_private_flags)
481 (xgate_stub_hash_lookup): Don't define.
482 (elf_backend_symbol_processing): Define.
483 * elf-bfd.h (elf_target_id): Delete XGATE_ELF_DATA.
485 2018-07-09 Maciej W. Rozycki <macro@mips.com>
487 * elfxx-mips.c (_bfd_mips_elf_adjust_dynamic_symbol): Don't set
488 `->needs_lazy_stub' if the stubs output section is the absolute
491 2018-07-09 H.J. Lu <hongjiu.lu@intel.com>
494 * configure.ac: Use changequote for "i[3-7]86-*-linux-*".
495 * configure: Regenerated.
497 2018-07-09 Alan Modra <amodra@gmail.com>
499 * elf32-m68hc1x.c (elf32_m68hc11_post_process_headers): Call
500 _bfd_elf_post_process_headers.
502 2018-07-06 Max Filippov <jcmvbkbc@gmail.com>
504 * elf32-xtensa.c (elf_xtensa_allocate_dynrelocs): Don't allocate
505 space for dynamic relocation for undefined weak symbol.
506 (elf_xtensa_relocate_section): Don't emit R_XTENSA_RELATIVE
507 relocation for undefined weak symbols.
508 (shrink_dynamic_reloc_sections): Don't shrink dynamic relocation
509 section for relocations against undefined weak symbols.
511 2018-07-06 Alan Hayward <alan.hayward@arm.com>
513 * elf.c (elfcore_grok_aarch_sve): New function.
514 (elfcore_grok_note): Check for Aarch64 SVE.
515 (elfcore_write_aarch_sve): New function.
516 (elfcore_write_register_note): Check for Aarch64 SVE.
517 * elf-bfd.h(elfcore_grok_aarch_sve): New declaration.
519 2018-07-06 Alan Modra <amodra@gmail.com>
521 * elf32-arm.c (elf32_arm_nabi_write_core_note): Don't use
522 DIAGNOTIC_PUSH and DIAGNOSTIC_POP unconditionally.
523 * elf32-ppc.c (ppc_elf_write_core_note): Likewise.
524 * elf32-s390.c (elf_s390_write_core_note): Likewise.
525 * elf64-ppc.c (ppc64_elf_write_core_note): Likewise.
526 * elf64-s390.c (elf_s390_write_core_note): Likewise.
527 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise.
529 2018-07-05 Jim Wilson <jimw@sifive.com>
531 * config.bfd (riscv32*-*-*): Renamed from riscv32-*-*.
532 (riscv64*-*-*): Likewise.
533 (riscv-*-*): Add as an alias for riscv32*-*-*.
535 2018-07-05 H.J. Lu <hongjiu.lu@intel.com>
538 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Remove x86
539 ISA properties with empty bits.
541 2018-07-05 Nick Clifton <nickc@redhat.com>
543 * po/ru.po: Updated Russian translation.
545 2018-07-05 Alan Modra <amodra@gmail.com>
547 * elf-bfd.h (_bfd_elf_ppc_merge_fp_attributes): Update prototype.
548 * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Return error
549 on mismatch. Remove "warning: " from messages. Track last bfd
551 (ppc_elf_merge_obj_attributes): Likewise. Handle status from
552 _bfd_elf_ppc_merge_fp_attributes.
553 * elf64-ppc.c (ppc64_elf_merge_private_bfd_data): Handle status
554 from _bfd_elf_ppc_merge_fp_attributes.
556 2018-07-04 H.J. Lu <hongjiu.lu@intel.com>
558 * Makefile.am (bfdinclude_HEADERS): Add $(INCDIR)/diagnostics.h.
559 * Makefile.in: Regenerated.
561 2018-07-03 Alan Modra <amodra@gmail.com>
563 * elflink.c (bfd_elf_final_link): Remove zero size .gnu.attributes
566 2018-07-03 Alan Modra <amodra@gmail.com>
568 * elf-bfd.h (ATTR_TYPE_FLAG_ERROR, ATTR_TYPE_HAS_ERROR): Define.
569 * elf-attrs.c (is_default_attr): Handle ATTR_TYPE_HAS_ERROR.
570 * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Use
571 ATTR_TYPE_FLAG_INT_VAL. Set ATTR_TYPE_HAS_ERROR on finding
572 incompatible attribute.
573 (ppc_elf_merge_obj_attributes): Likewise. Return
574 _bfd_elf_merge_object_attributes result.
575 * elf64-ppc.c (ppc64_elf_merge_private_bfd_data): Return
576 _bfd_elf_merge_object_attributes result.
578 2018-07-03 Alan Modra <amodra@gmail.com>
581 * elflink.c (_bfd_elf_fix_symbol_flags): Hide dynamic symbols
582 in discarded sections.
584 2018-07-02 Maciej W. Rozycki <macro@mips.com>
586 * elfxx-mips.c (_bfd_mips_elf_create_dynamic_sections): Set
587 `mark' for symbols created from `mips_elf_dynsym_rtproc_names'
590 2018-07-02 Maciej W. Rozycki <macro@mips.com>
592 * elf64-mips.c (micromips_elf64_howto_table_rel): Add
593 R_MICROMIPS_HI0_LO16, R_MICROMIPS_TLS_GD, R_MICROMIPS_TLS_LDM,
594 R_MICROMIPS_TLS_DTPREL_HI16, R_MICROMIPS_TLS_DTPREL_LO16,
595 R_MICROMIPS_TLS_GOTTPREL, R_MICROMIPS_TLS_TPREL_HI16,
596 R_MICROMIPS_TLS_TPREL_LO16, R_MICROMIPS_GPREL7_S2 and
597 R_MICROMIPS_PC23_S2 relocation entries.
598 (micromips_elf64_howto_table_rela): Likewise.
599 (micromips_reloc_map): Likewise.
600 * elfn32-mips.c (elf_micromips_howto_table_rel): Likewise.
601 (elf_micromips_howto_table_rela): Likewise.
602 (micromips_reloc_map): Likewise.
604 2018-07-02 H.J. Lu <hongjiu.lu@intel.com>
607 * elf64-x86-64.c (elf_x86_64_relocate_section): Clear the
608 R_X86_64_converted_reloc_bit bit.
610 2018-07-02 Jeff Muizelaar <jrmuizel@gmail.com>
611 Tom Tromey <tom@tromey.com>
615 * mach-o.c (bfd_mach_o_fat_close_and_cleanup): New function.
616 (bfd_mach_o_close_and_cleanup): Redefine.
617 * archive.c (_bfd_unlink_from_archive_parent): New function,
619 (_bfd_archive_close_and_cleanup): ..here.
620 (bfd_generic_archive_p): Do not clear archive's format.
621 * libbfd-in.h (_bfd_unlink_from_archive_parent): Declare.
622 * libbfd.h: Regenerate.
624 2018-07-02 Thomas Preud'homme <thomas.preudhomme@arm.com>
626 * archures.c (bfd_mach_arm_5TEJ, bfd_mach_arm_6, bfd_mach_arm_6KZ,
627 bfd_mach_arm_6T2, bfd_mach_arm_6K, bfd_mach_arm_7, bfd_mach_arm_6M,
628 bfd_mach_arm_6SM, bfd_mach_arm_7EM, bfd_mach_arm_8, bfd_mach_arm_8R,
629 bfd_mach_arm_8M_BASE, bfd_mach_arm_8M_MAIN): Define.
630 * bfd-in2.h: Regenerate.
631 * cpu-arm.c (arch_info_struct): Add entries for above new
633 * elf32-arm.c (bfd_arm_get_mach_from_attributes): Add Tag_CPU_arch to
634 bfd_mach_arm mapping logic for pre Armv4 and Armv5TEJ and later
635 architectures. Force assert failure for any new Tag_CPU_arch value.
637 2018-07-02 Thomas Preud'homme <thomas.preudhomme@arm.com>
639 * doc/bfdint.texi: Use command-line consistently when used in a
641 * doc/bfdsumm.texi: Likewise.
643 2018-06-29 Maciej W. Rozycki <macro@mips.com>
645 * elfxx-mips.c (allocate_dynrelocs): Remove extraneous symbol
646 visibility check made for undefined weak symbols.
648 2018-06-26 Nick Clifton <nickc@redhat.com>
650 * po/uk.po: Updated Ukranian translation.
652 2018-06-25 Nick Clifton <nickc@redhat.com>
654 * elfnn-aarch64.c (_bfd_aarch64_erratum_835769_stub_name): Check
655 for malloc returning NULL.
656 (_bfd_aarch64_erratum_843419_fixup): Check for
657 _bfd_aarch64_erratum_835769_stub_name returning NULL.
659 2018-06-24 Nick Clifton <nickc@redhat.com>
661 * po/bfd.pot: Regenerate.
663 2018-06-24 Nick Clifton <nickc@redhat.com>
665 * version.m4: Update version string to 2.31.51.
666 * configure: Regenerate.
668 2018-06-24 Nick Clifton <nickc@redhat.com>
672 2018-06-21 Maciej W. Rozycki <macro@mips.com>
674 * elfxx-mips.c (_bfd_mips_elf_compact_eh_encoding)
675 (_bfd_mips_elf_cant_unwind_opcode): Correct formatting.
677 2018-06-21 Maciej W. Rozycki <macro@mips.com>
679 * elfxx-mips.c (_bfd_mips_post_process_headers): Keep
680 EI_ABIVERSION setting together.
682 2018-06-21 Maciej W. Rozycki <macro@mips.com>
684 * elfxx-mips.c (MIPS_LIBC_ABI_DEFAULT, MIPS_LIBC_ABI_MIPS_PLT)
685 (MIPS_LIBC_ABI_UNIQUE, MIPS_LIBC_ABI_MIPS_O32_FP64)
686 (MIPS_LIBC_ABI_MAX): New enumeration constants.
687 (_bfd_mips_post_process_headers): Use them in place of magic
690 2018-06-21 Jim Wilson <jimw@sifive.com>
692 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Update comment.
693 Use SYMBOL_REFERENCES_LOCAL. Add asserts for h->got.offset.
695 2018-06-21 Alan Modra <amodra@gmail.com>
697 * doc/Makefile.am (AUTOMAKE_OPTIONS): Add "foreign".
698 * doc/Makefile.in: Regenerate.
700 2018-06-20 Renlin Li <renlin.li@arm.com>
702 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Use PG_OFFSET
703 to resolve BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC,
704 BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC,
705 BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC,
706 BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC,
707 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
708 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
709 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
710 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
712 2018-06-20 Nick Clifton <nickc@redhat.com>
715 * opncls.c (get_build_id): Check for a negative or excessive data
716 size in the build-id note.
718 2018-06-20 Nick Clifton <nickc@redhat.com>
721 * mach-o.c (cputype): New function.
722 (cpusubtype): New function.
723 (bfd_mach_o_bfd_print_private_data): New function. Dispalys the
724 values in the MACH-O file header.
725 (bfd_mach_o_bfd_copy_private_header_data): Copy the cputype and
726 cpusubtype fields from the input bfd's mach-o header to the output
728 * mach-o-target.c (bfd_mach_o_bfd_print_private_bfd_data):
729 Redefine to bfd_mach_o_bfd_print_private_data.
730 * mach-o.h (bfd_mach_o_bfd_print_private_bfd_data): Prototype.
732 2018-06-19 Maciej W. Rozycki <macro@mips.com>
735 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Verify the
736 `.got.plt' entry referred is in range.
737 (mips_finish_exec_plt): Correct the range check for `.got.plt'
738 start. Replace the assertion used for that with a proper error
741 2018-06-19 Maciej W. Rozycki <macro@mips.com>
743 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Fix
746 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
748 * Makefile.am (AUTOMAKE_OPTIONS): Remove 1.11.
749 (INCLUDES): Rename to ...
750 (AM_CPPFLAGS): ... this.
751 * configure.ac: Remove AC_PREREQ.
752 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove 1.9, cygnus, add
753 info-in-builddir no-texinfo.tex.
754 (info_TEXINFOS): Rename bfd.texinfo to bfd.texi.
755 * doc/bfd.texinfo: Rename to ...
756 * doc/bfd.texi: ... this.
757 * Makefile.in: Re-generate.
758 * aclocal.m4: Re-generate.
759 * config.in: Re-generate.
760 * configure: Re-generate.
761 * doc/Makefile.in: Re-generate.
763 2018-06-18 Mephi <mephi42@gmail.com>
766 * mach-o-x86-64.c (x86_64_howto_table): Add entry for
767 BFD_RELOC_MACH_O_X86_64_RELOC_TLV.
768 (bfd_mach_o_x86_64_canonicalize_one_reloc): Handle the new reloc.
769 (bfd_mach_o_x86_64_swap_reloc_out): Likewise.
770 * reloc.c (BFD_RELOC_MACH_O_X86_64_TV): New entry.
771 * bfd-in2.h: Regenerate.
772 * libbfd.h: Regenerate.
774 2018-06-14 Faraz Shahbazker <Faraz.Shahbazker@mips.com>
776 * elfxx-mips.c (print_mips_ases): Add GINV extension.
778 2018-06-14 H.J. Lu <hongjiu.lu@intel.com>
781 * elf.c (_bfd_elf_get_symbol_version_string): Check if the first
782 symbol version is base version.
784 2018-06-14 Alan Modra <amodra@gmail.com>
786 * elf-bfd.h (struct elf_link_hash_table): Add "dynamic_relocs".
787 * elflink.c (_bfd_elf_init_2_index_sections): Comment fix.
788 (_bfd_elf_add_dynamic_entry): Set "dynamic_relocs".
789 (_bfd_elf_link_renumber_dynsyms): Exclude all section symbols when
790 "dynamic_relocs" is not set.
791 * elfxx-mips.c (count_section_dynsyms): Likewise.
793 2018-06-14 Alan Modra <amodra@gmail.com>
796 * bfdio.c (bfd_seek): Optimize away seeks to current position.
798 2018-06-13 Scott Egerton <scott.egerton@imgtec.com>
799 Faraz Shahbazker <Faraz.Shahbazker@mips.com>
801 * elfxx-mips.c (print_mips_ases): Add CRC.
803 2018-06-08 H.J. Lu <hongjiu.lu@intel.com>
806 * elfxx-x86.c (elf_x86_hide_linker_defined): New function.
807 (_bfd_x86_elf_link_check_relocs): Use it to hide hidden
808 __bss_start, _end and _edata in shared libraries.
810 2018-06-07 Alan Modra <amodra@gmail.com>
812 * elf32-tic6x.c (elf32_tic6x_check_relocs): Reference
813 __c6xabi_DSBT_BASE explicitly for R_C6000_SBR_* relocs.
815 2018-06-05 Alan Modra <amodra@gmail.com>
817 * bfd.c (struct bfd): Update comment on "where" usage.
818 * bfdio.c (bfd_bwrite, bfd_stat): Use and update "iovec",
819 "iostream", and "where" from containing archive file. Return
821 (bfd_bread): Similarly, and return error attempted out of
822 bounds archive element access.
823 (bfd_tell, bfd_flush): Use and update "iovec", "iostream", and
824 "where" from containing archive file.
825 (bfd_seek): Likewise. Return error on NULL iovec. Don't
826 attempt to optimize away seeks. Don't paper over errors by
828 (bfd_get_mtime): Call bfd_stat rather than iovec->bstat.
829 (bfd_get_size): Likewise.
830 (bfd_mmap): Operate on and use iovec of containing archive
831 file. Return error on NULL iovec.
832 * cache.c (bfd_cache_lookup_worker): Abort if working on
834 (cache_bread_1): Delete bfd parameter, add FILE* parameter.
835 Don't ignore zero byte reads.
836 (cache_bread): Look up FILE* in cache here. Error on NULL
838 (cache_bwrite): Rename "where" to "from".
839 (cache_bmmap): Don't handle archive elements.
840 * coffcode.h (coff_slurp_line_table): Exit early on zero
842 * bfd-in2.h: Regenerate.
844 2018-06-05 Alan Modra <amodra@gmail.com>
847 * plugin.c (bfd_plugin_open_input): Allow for possibility of
848 nested archives. Open file again for plugin.
849 (try_claim): Don't save and restore file position. Close file
851 * sysdep.h (O_BINARY): Define.
853 2018-06-04 Max Filippov <jcmvbkbc@gmail.com>
855 * elf32-xtensa.c (xtensa_read_table_entries): Make global.
856 (compute_fill_extra_space): Drop declaration. Rename function to
857 xtensa_compute_fill_extra_space.
858 (compute_ebb_actions, remove_dead_literal): Update references to
859 compute_fill_extra_space.
861 2018-06-04 Volodymyr Arbatov <arbatov@cadence.com>
863 * elf32-xtensa.c (elf32xtensa_separate_props): New global
865 (xtensa_add_names): New function.
866 (xtensa_property_section_name): Add new parameter
867 separate_sections, use it to choose property section name.
868 (xtensa_get_separate_property_section): New function.
869 (xtensa_get_property_section): Invoke
870 xtensa_get_separate_property_section to get individual property
871 section if it exists, common property section otherwise.
872 (xtensa_make_property_section): Pass elf32xtensa_separate_props
873 to xtensa_property_section_name.
875 2018-06-04 H.J. Lu <hongjiu.lu@intel.com>
878 * bfd-in.h: Include "diagnostics.h".
879 * bfd-in2.h: Regenerated.
880 * elf32-arm.c (elf32_arm_nabi_write_core_note): Use
881 DIAGNOSTIC_PUSH, DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION and
882 DIAGNOSTIC_POP to silence GCC 8.1 warnings with
883 -Wstringop-truncation.
884 * elf32-ppc.c (ppc_elf_write_core_note): Likewse.
885 * elf32-s390.c (elf_s390_write_core_note): Likewse.
886 * elf64-ppc.c (ppc64_elf_write_core_note): Likewse.
887 * elf64-s390.c (elf_s390_write_core_note): Likewse.
888 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewse.
890 2018-06-03 Jim Wilson <jimw@sifive.com>
893 * elfnn-riscv.c (riscv_elf_relocate_section) <R_RISCV_CALL>: Check
894 for and handle an undefined weak with no PLT.
897 * elfnn-riscv.c (riscv_relax_delete_bytes): Add versioned_hidden check
898 to code that ignores duplicate symbols.
900 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
902 * version.m4: Bump version to 2.30.52
903 * configure: Regenerated.
905 2018-06-01 Alan Modra <amodra@gmail.com>
907 * bfd.c (_bfd_error_handler): Arrange for this function to be
908 declared in bfd-in2.h.
909 * libbfd-in.h (_bfd_error_handler): Don't declare.
910 * libbfd.h: Regenerate.
911 * bfd-in2.h: Regenerate.
913 2018-05-30 Amaan Cheval <amaan.cheval@gmail.com>
915 * config.bfd (x86_64-*-*): Add pei-x86-64 target to x86_64-*-rtems*
916 This is needed to generate UEFI application image files from ELFs.
918 2018-05-28 H.J. Lu <hongjiu.lu@intel.com>
920 * elf32-i386.c (elf_i386_lazy_plt): Add plt_tlsdesc_entry,
921 plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset,
922 plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and
923 plt_tlsdesc_got2_insn_end for TLSDESC entry.
924 (elf_i386_lazy_ibt_plt): Likewise.
925 (elf_i386_nacl_plt): Likewise.
926 * elf64-x86-64.c (tlsdesc_plt_entry): Moved and renamed to ...
927 (elf_x86_64_tlsdesc_plt_entry): This.
928 (elf_x86_64_lazy_plt): Add plt_tlsdesc_entry,
929 plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset,
930 plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and
931 plt_tlsdesc_got2_insn_end for TLSDESC entry.
932 (elf_x86_64_lazy_bnd_plt): Likewise.
933 (elf_x86_64_lazy_ibt_plt): Likewise.
934 (elf_x32_lazy_ibt_plt): Likewise.
935 (elf_x86_64_nacl_plt): Likewise.
936 (elf_x86_64_finish_dynamic_sections): Use plt_tlsdesc_entry,
937 plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset,
938 plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and
939 plt_tlsdesc_got2_insn_end to update TLSDESC entry.
940 * elfxx-x86.h (elf_x86_lazy_plt_layout): Update comments.
941 Add plt_tlsdesc_entry, plt_tlsdesc_entry_size,
942 plt_tlsdesc_got1_offset, plt_tlsdesc_got2_offset,
943 plt_tlsdesc_got1_insn_end and plt_tlsdesc_got2_insn_end.
944 (elf_x86_non_lazy_plt_layout): Update comments.
945 (elf_x86_plt_layout): Likewise.
947 2018-05-28 H.J. Lu <hongjiu.lu@intel.com>
950 * elf-s390-common.c (elf_s390_add_symbol_hook): Removed.
951 * elf32-arc.c (elf_arc_add_symbol_hook): Likewise.
952 (elf_backend_add_symbol_hook): Likewise.
953 * elf32-m68k.c (elf_m68k_add_symbol_hook): Likewise.
954 (elf_backend_add_symbol_hook): Likewise.
955 * elf32-s390.c (elf_backend_add_symbol_hook): Likewise.
956 * elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise.
957 (elf_backend_add_symbol_hook): Likewise.
958 * elf64-s390.c (elf_backend_add_symbol_hook): Likewise.
959 * elfxx-aarch64.c (_bfd_aarch64_elf_add_symbol_hook): Likewise.
960 * elfxx-aarch64.h (_bfd_aarch64_elf_add_symbol_hook): Likewise.
961 (elf_backend_add_symbol_hook): Likewise.
962 * elf32-arm.c (elf32_arm_add_symbol_hook): Remove STT_GNU_IFUNC
964 * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
965 * elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise.
966 * elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise.
967 * elflink.c (elf_link_add_object_symbols): Set
968 elf_gnu_symbol_ifunc for STT_GNU_IFUNC symbols.
970 2018-05-26 H.J. Lu <hongjiu.lu@intel.com>
973 * elf-bfd.h (_bfd_elf_link_hide_sym_by_version): New.
974 * elflink.c (_bfd_elf_link_hide_versioned_symbol): New function.
975 Extracted from _bfd_elf_link_assign_sym_version.
976 (_bfd_elf_link_hide_sym_by_version): New function.
977 (_bfd_elf_link_assign_sym_version): Use
978 _bfd_elf_link_hide_versioned_symbol.
979 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Call
980 _bfd_elf_link_hide_sym_by_version instead of
981 bfd_hide_sym_by_version. Don't check unversioned symbol.
983 2018-05-25 Alan Modra <amodra@gmail.com>
985 * Makefile.in: Regenerate.
986 * po/SRC-POTFILES.in: Regenerate.
988 2018-05-25 Alan Modra <amodra@gmail.com>
990 * configure.ac (bfd_cv_hidden): Run test with -Werror in CFLAGS.
991 * configure: Regenerate.
993 2018-05-23 H.J. Lu <hongjiu.lu@intel.com>
995 * elf64-ppc.c (ppc64_elf_write_core_note): Add ATTRIBUTE_NONSTRING
998 2018-05-22 Alan Modra <amodra@gmail.com>
1001 * elf32-hppa.c (hppa_get_stub_entry): Return NULL when link_sec
1003 (elf32_hppa_size_stubs): Only create stubs for load, alloc, code
1005 (final_link_relocate): Revert last change.
1007 2018-05-22 Alan Modra <amodra@gmail.com>
1010 * elf32-hppa.c (final_link_relocate): Don't look for plt call
1011 stubs in non-alloc sections.
1013 2018-05-21 H.J. Lu <hongjiu.lu@intel.com>
1016 * aout-target.h (MY_bfd_link_hide_symbol): New.
1017 * aout-tic30.c (MY_bfd_link_hide_symbol): Likewise.
1018 * binary.c (binary_bfd_link_hide_symbol): Likewise.
1019 * coff-alpha.c (_bfd_ecoff_bfd_link_hide_symbol): Likewise.
1020 * coff-mips.c (_bfd_ecoff_bfd_link_hide_symbol): Likewise.
1021 * coff-rs6000.c (_bfd_xcoff_bfd_link_hide_symbol): Likewise.
1022 * coffcode.h (coff_bfd_link_hide_symbol): Likewise.
1023 * elf-bfd.h (_bfd_elf_link_hide_symbol): Likewise.
1024 * elfxx-target.h (bfd_elfNN_bfd_link_hide_symbol): Likewise.
1025 * i386msdos.c (msdos_bfd_link_hide_symbol): Likewise.
1026 * ihex.c (ihex_bfd_link_hide_symbol): Likewise.
1027 * libbfd-in.h (_bfd_nolink_bfd_link_hide_symbol): Likewise.
1028 * linker.c (_bfd_generic_link_hide_symbol): Likewise.
1029 (bfd_link_hide_symbol): Likewise.
1030 * mach-o-target.c (bfd_mach_o_bfd_link_hide_symbol): Likewise.
1031 * mmo.c (mmo_bfd_link_hide_symbol): Likewise.
1032 * pef.c (bfd_pef_bfd_link_hide_symbol): Likewise.
1033 * plugin.c (bfd_plugin_bfd_link_hide_symbol): Likewise.
1034 * ppcboot.c (ppcboot_bfd_link_hide_symbol): Likewise.
1035 * som.c (som_bfd_link_hide_symbol): Likewise.
1036 * srec.c (srec_bfd_link_hide_symbol): Likewise.
1037 * tekhex.c (tekhex_bfd_link_hide_symbol): Likewise.
1038 * vms-alpha.c (vms_bfd_link_hide_symbol): Likewise.
1039 (alpha_vms_bfd_link_hide_symbol): Likewise.
1040 * xsym.c (bfd_sym_bfd_link_hide_symbol): Likewise.
1041 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
1042 _bfd_generic_link_hide_symbol.
1043 (rs6000_xcoff64_aix_vec): Likewise.
1044 * elflink.c (bfd_elf_record_link_assignment): Don't make forced
1045 local symbol dynamic.
1046 (_bfd_elf_link_hide_symbol): New function.
1047 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
1048 check root.ldscript_def.
1049 * targets.c (bfd_target): Add _bfd_link_hide_symbol.
1050 (BFD_JUMP_TABLE_LINK): Add NAME##_bfd_link_hide_symbol.
1051 * bfd-in2.h: Regenerated.
1052 * libbfd.h: Likewise.
1054 2018-05-21 H.J. Lu <hongjiu.lu@intel.com>
1057 * elf.c (setup_group): Mark section in a section group with
1060 2018-05-18 H.J. Lu <hongjiu.lu@intel.com>
1063 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
1064 set eh->local_ref to 1 if a symbol is versioned and there is a
1067 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
1069 * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Handle
1072 2018-05-18 Jim Wilson <jimw@sifive.com>
1074 * elfnn-riscv.c (allocate_dynrelocs): Discard dynamic relocations if
1075 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1076 (riscv_elf_relocate_section): Don't generate dynamic relocation if
1077 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1078 (riscv_elf_finish_dynamic_symbol): Likewise.
1080 2018-05-18 John Darrington <john@darrington.wattle.id.au>
1082 * Makefile.am: Add s12z files.
1083 * Makefile.in: Regenerate.
1084 * archures.c: Add bfd_s12z_arch.
1085 * bfd-in.h: Add exports of bfd_putb24 and bfd_putl24.
1086 * bfd-in2.h: Regenerate.
1087 * config.bfd: Add s12z target.
1088 * configure.ac: Add s12z target.
1089 * configure: Regenerate.
1090 * cpu-s12z.c: New file.
1091 * elf32-s12z.c: New file.
1092 * libbfd.c (bfd_putb24): New function.
1093 (bfd_putl24): New function.
1094 * libbfd.h: Regenerate.
1095 * reloc.c: Add s12z relocations.
1096 (bfd_get_reloc_size): Handle size 5 relocs.
1097 * targets.c: Add s12z_elf32_vec.
1099 2018-05-18 H.J. Lu <hongjiu.lu@intel.com>
1102 * elf32-i386.c (elf_i386_relocate_section): Handle R_386_GOT32X
1104 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
1105 set eh->local_ref to 1 for linker defined symbols.
1107 2018-05-18 Alan Modra <amodra@gmail.com>
1110 * elf.c (setup_group): Formatting. Check that SHT_GROUP entries
1111 don't point at other SHT_GROUP sections. Set shdr corresponding
1112 to invalid entry, to NULL rather than section 0. Identify
1113 SHT_GROUP section index when reporting an error. Cope with NULL
1116 2018-05-18 Alan Modra <amodra@gmail.com>
1118 * libbfd-in.h (ATTRIBUTE_HIDDEN): Define and use throughout.
1119 * configure.ac (HAVE_HIDDEN): Check compiler support for hidden
1121 * libbfd.h: Regenerate.
1122 * configure: Regenerate.
1123 * config.in: Regenerate.
1125 2018-05-18 Alan Modra <amodra@gmail.com>
1127 * libbfd-in.h: Add include guard.
1128 * libcoff-in.h: Likewise.
1129 * doc/Makefile.am (libbfd.h, libcoff.h): Append another #endif.
1130 * doc/Makefile.in: Regenerate.
1131 * libbfd.h: Regenerate.
1132 * libcoff.h: Regenerate.
1134 2018-05-16 Maciej W. Rozycki <macro@mips.com>
1136 * elf32-nds32.c (nds32_convert_32_to_16): Preset `insn_type'.
1138 2018-05-16 Alan Modra <amodra@gmail.com>
1141 * format.c (struct bfd_preserve): Add section_id.
1142 (bfd_preserve_save, bfd_preserve_restore): Save and restore
1144 (bfd_reinit): Set _bfd_section_id.
1145 (bfd_check_format_matches): Put all matches of any priority into
1146 matching_vector. Save initial section id and start each attempted
1147 match at that section id.
1148 * libbfd-in.h (_bfd_section_id): Declare.
1149 * section.c (_bfd_section_id): Rename from section_id and make
1150 global. Adjust uses.
1151 (bfd_get_next_section_id): Delete.
1152 * elf64-ppc.c (ppc64_elf_setup_section_lists): Replace use of
1153 bfd_get_section_id with _bfd_section_id.
1154 * libbfd.h: Regenerate.
1155 * bfd-in2.h: Regenerate.
1157 2018-05-15 Christophe Guillon <christophe.guillon@st.com>
1159 * coffcode.h (coff_bigobj_swap_aux_in): Make sure that all fields
1160 of the aux structure are initialised.
1162 2018-05-15 Francois H. Theron <francois.theron@netronome.com>
1164 * targets.c: Wrap nfp_elf64_vec in BFD64 ifdef.
1166 2018-05-15 Nick Clifton <nickc@redhat.com>
1168 * po/pt.po: New Portuguese translation.
1169 * configure.ac (ALL_LINGUAS): Add pt.
1170 * configure: Regenerate.
1172 2018-05-14 H.J. Lu <hongjiu.lu@intel.com>
1175 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Don't issue
1176 an error on IFUNC pointer defined in PDE.
1177 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Call
1178 _bfd_x86_elf_link_fixup_ifunc_symbol.
1179 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
1180 * elfxx-x86.c (_bfd_x86_elf_link_fixup_ifunc_symbol): New
1182 * elfxx-x86.h (_bfd_x86_elf_link_fixup_ifunc_symbol): New.
1184 2018-05-14 H.J. Lu <hongjiu.lu@intel.com>
1187 * elfxx-x86.c (elf_x86_linker_defined): New function.
1188 (_bfd_x86_elf_link_check_relocs): Use it to mark __bss_start,
1189 _end and _edata locally defined within executables.
1191 2018-05-12 Alan Modra <amodra@gmail.com>
1194 * elf.c (rewrite_elf_program_header): Use segment_mark only for
1195 PT_LOAD headers. Delete first_matching_lma and first_suggested_lma.
1196 Instead make matching_lma and suggested_lma pointers to the
1197 sections. Align section vma and lma calculated from segment.
1198 Don't clear includes_phdrs or includes_filehdr based on p_paddr
1199 test. Try to handle alignment padding before first section by
1200 adjusting new segment lma down. Adjust PT_PHDR map p_paddr.
1202 2018-05-09 Dimitar Dimitrov <dimitar@dinux.eu>
1204 * elf32-pru.c (pru_elf32_do_ldi32_relocate): Make LDI32 relocation
1205 conformant to TI ABI.
1206 (pru_elf32_relax_section): Likewise.
1207 (pru_elf_relax_delete_bytes): Fix offsets for new LDI32 code.
1208 * elf32-pru.c (pru_elf32_do_ldi32_relocate): Ignore addend.
1209 (pru_elf32_pmem_relocate): Trap - should not get here.
1210 (pru_elf32_relocate_section): Add support for REL relocations.
1211 (elf_info_to_howto_rel): Enable REL.
1212 (elf_backend_may_use_rel_p): Likewise.
1213 (elf_backend_may_use_rela_p): Likewise.
1214 (elf_backend_default_use_rela_p): Likewise.
1216 2018-05-09 Alan Modra <amodra@gmail.com>
1219 * peXXigen.c (pe_print_edata): Correct minimum size.
1221 2018-05-09 Alan Modra <amodra@gmail.com>
1224 * peXXigen.c (pe_print_idata): Bound check hint_addr.
1226 2018-05-08 Nick Clifton <nickc@redhat.com>
1229 * elf.c (bfd_elf_get_str_section): Check for an excessively large
1231 * elf-attrs.c (_bfd_elf_parse_attributes): Issue an error if the
1232 attribute section is larger than the size of the file.
1234 2018-05-07 Alan Modra <amodra@gmail.com>
1236 * cofflink.c (_bfd_coff_link_input_bfd): Use memcmp rather than
1237 strncmp when checking for ".bf" special symbol.
1238 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Make pe_required_section_flags
1239 section name a char array, remove sentinal known_sections entry,
1240 and adjust loop over known_sections to suit. Use memcmp rather
1243 2018-05-04 Alan Modra <amodra@gmail.com>
1245 * elf-linux-core.h (struct elf_external_linux_prpsinfo32_ugid32),
1246 (struct elf_external_linux_prpsinfo32_ugid16),
1247 (struct elf_external_linux_prpsinfo64_ugid32),
1248 (struct elf_external_linux_prpsinfo64_ugid16): Add ATTRIBUTE_NONSTRING
1249 to pr_fname and pr_psargs fields. Remove GCC diagnostic pragmas.
1251 * elf.c (elfcore_write_prpsinfo): ..here. Indent nested preprocessor
1253 * elf32-arm.c (elf32_arm_nabi_write_core_note): Add ATTRIBUTE_NONSTRING
1255 * elf32-ppc.c (ppc_elf_write_core_note): Likewise.
1256 * elf32-s390.c (elf_s390_write_core_note): Likewise.
1257 * elf64-s390.c (elf_s390_write_core_note): Likewise.
1258 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise.
1259 * elf64-x86-64.c (elf_x86_64_write_core_note): Add GCC diagnostic
1261 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Use strnlen to avoid
1262 false positive gcc-8 warning.
1263 * cofflink.c (_bfd_coff_link_input_bfd): Likewise.
1265 2018-05-04 Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
1267 * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Fix the order
1268 of arguments when warning about different long double types.
1270 2018-05-03 Simon Atanasyan <simon@atanasyan.com>
1272 * elf32-mips.c: (elf32_mips_fixup_symbol): New function.
1273 (elf_backend_fixup_symbol): New macro.
1274 * elfxx-mips.c: (mips_elf_output_extsym): Discard _gp_disp
1276 (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
1278 2018-04-30 Francois H. Theron <francois.theron@netronome.com>
1280 * Makefile.am: Added NFP files to build.
1281 * archures.c: Added bfd_arch_nfp
1282 * config.bfd: Added NFP support.
1283 * configure.ac: Added NFP support.
1284 * cpu-nfp.c: New, for NFP support.
1285 * elf-bfd.h: Added elf_section_info()
1286 * elf64-nfp.c: New, for NFP support.
1287 * po/SRC-POTFILES.in: Added NFP source files.
1288 * targets.c: Added nfp_elf64_vec
1289 * bfd-in2.h: Regenerate.
1290 * Makefile.in: Regenerate.
1291 * configure: Regenerate.
1293 2018-04-27 Alan Modra <amodra@gmail.com>
1295 * bfd-in2.h: Regenerate.
1296 * libbfd.h: Regenerate.
1298 2018-04-27 Alan Modra <amodra@gmail.com>
1302 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't drop plt
1304 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Comment fixes.
1306 2018-04-26 Pedro Alves <palves@redhat.com>
1308 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't consider
1309 ifunc and non-ifunc symbols duplicates.
1311 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1312 Mickaël Guêné <mickael.guene@st.com>
1314 * elf32-arm.c (elf32_arm_fdpic_thumb_plt_entry): New.
1315 (elf32_arm_plt_needs_thumb_stub_p): Handle thumb-only case.
1316 (elf32_arm_populate_plt_entry): Likewise.
1317 (elf32_arm_output_plt_map_1): Likewise.
1318 (elf32_arm_output_arch_local_syms): Likewise.
1320 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1321 Mickaël Guêné <mickael.guene@st.com>
1323 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Handle
1324 _GLOBAL_OFFSET_TABLE_ in FDPIC mode.
1326 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1327 Mickaël Guêné <mickael.guene@st.com>
1329 * elf32-arm.c (bfd_elf32_arm_set_target_params): Handle FDPIC case
1332 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1333 Mickaël Guêné <mickael.guene@st.com>
1335 * elf32-arm.c (DEFAULT_STACK_SIZE): New.
1336 (elf32_arm_always_size_sections): Create stack segment.
1338 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1339 Mickaël Guêné <mickael.guene@st.com>
1341 * bfd-in2.h (BFD_RELOC_ARM_TLS_GD32_FDPIC)
1342 (BFD_RELOC_ARM_TLS_LDM32_FDPIC, BFD_RELOC_ARM_TLS_IE32_FDPIC): New
1344 * elf32-arm.c (elf32_arm_howto_table_2): Add R_ARM_TLS_GD32_FDPIC,
1345 R_ARM_TLS_LDM32_FDPIC, R_ARM_TLS_IE32_FDPIC relocations.
1346 (elf32_arm_reloc_map): Add R_ARM_TLS_GD32_FDPIC,
1347 R_ARM_TLS_LDM32_FDPIC, R_ARM_TLS_IE32_FDPIC.
1348 (struct elf32_arm_link_hash_table): Update comment.
1349 (elf32_arm_final_link_relocate): Handle TLS FDPIC relocations.
1350 (IS_ARM_TLS_RELOC): Likewise.
1351 (elf32_arm_check_relocs): Likewise.
1352 (allocate_dynrelocs_for_symbol): Likewise.
1353 (elf32_arm_size_dynamic_sections): Update comment.
1354 * reloc.c: Add BFD_RELOC_ARM_TLS_GD32_FDPIC,
1355 BFD_RELOC_ARM_TLS_LDM32_FDPIC, BFD_RELOC_ARM_TLS_IE32_FDPIC.
1357 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1358 Mickaël Guêné <mickael.guene@st.com>
1360 * elf32-arm.c (elf32_arm_fdpic_plt_entry): New.
1361 (elf32_arm_create_dynamic_sections): Handle FDPIC.
1362 (elf32_arm_allocate_plt_entry): Likewise.
1363 (elf32_arm_populate_plt_entry): Likewise.
1364 (elf32_arm_output_plt_map_1): Likewise.
1366 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1367 Mickaël Guêné <mickael.guene@st.com>
1369 * elf32-arm.c (struct fdpic_local): New.
1370 (elf_arm_obj_tdata): Add local_fdpic_cnts field.
1371 (elf32_arm_local_fdpic_cnts): New.
1372 (struct fdpic_global): New.
1373 (elf32_arm_link_hash_entry): Add fdpic_cnts field.
1374 (elf32_arm_link_hash_table): Add srofixup field.
1375 (arm_elf_add_rofixup): New.
1376 (arm_elf_fill_funcdesc): New.
1377 (elf32_arm_link_hash_newfunc): Handle fdpic_cnts.
1378 (elf32_arm_allocate_local_sym_info): Likewise.
1379 (create_got_section): Create .rofixup section.
1380 (elf32_arm_copy_indirect_symbol): Handle fdpic_cnts.
1381 (bfd_elf32_arm_set_target_params): Handle FDPIC.
1382 (elf32_arm_final_link_relocate): Likewise.
1383 (elf32_arm_check_relocs): Likewise.
1384 (allocate_dynrelocs_for_symbol): Likewise.
1385 (elf32_arm_size_dynamic_sections): Likewise.
1386 (elf32_arm_finish_dynamic_sections): Likewise.
1387 (elf32_arm_output_arch_local_syms): Likewise.
1388 (elf32_arm_fdpic_omit_section_dynsym): New.
1390 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1391 Mickaël Guêné <mickael.guene@st.com>
1393 * bfd-in2.c (BFD_RELOC_ARM_GOTFUNCDESC)
1394 (BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC)
1395 (BFD_RELOC_ARM_FUNCDESC_VALUE): New.
1396 * elf32-arm.c (elf32_arm_howto_table_2): Add R_ARM_GOTFUNCDESC,
1397 R_ARM_GOTOFFFUNCDESC, R_ARM_FUNCDESC, R_ARM_FUNCDESC_VALUE.
1398 (elf32_arm_howto_from_type): Take new members of
1399 elf32_arm_howto_table_2 into account.
1400 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_GOTFUNCDESC,
1401 BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC,
1402 BFD_RELOC_ARM_FUNCDESC_VALUE.
1403 * reloc.c: Add BFD_RELOC_ARM_GOTFUNCDESC,
1404 BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC,
1405 BFD_RELOC_ARM_FUNCDESC_VALUE.
1407 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1408 Mickaël Guêné <mickael.guene@st.com>
1410 * elf32-arm.c (elf32_arm_print_private_bfd_data): Support
1411 EF_ARM_PIC and ELFOSABI_ARM_FDPIC.
1412 (elf32_arm_post_process_headers): Support ELFOSABI_ARM_FDPIC.
1413 (ELF_OSABI): Define to ELFOSABI_ARM_FDPIC.
1415 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1416 Mickaël Guêné <mickael.guene@st.com>
1418 * config.bfd (arm*-*-linux-*): Add arm_elf32_fdpic_be_vec and
1419 arm_elf32_fdpic_le_vec to targ_selvecs. Accept
1420 arm*-*-uclinuxfdpiceabi.
1421 * configure.ac: Add support for arm_elf32_fdpic_be_vec and
1422 arm_elf32_fdpic_le_vec.
1423 * configure: Regenerate.
1424 * elf32-arm.c (struct elf32_arm_link_hash_table): Add fdpic_p.
1425 (elf32_arm_link_hash_table_create): Initialize fdpic_p.
1426 (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME, TARGET_BIG_SYM)
1427 (TARGET_BIG_NAME, elf_match_priority): Define for FDPIC targets.
1428 (elf32_arm_fdpic_link_hash_table_create): New.
1429 * targets.c (_bfd_target_vector): Add arm_elf32_fdpic_be_vec and
1430 arm_elf32_fdpic_le_vec.
1432 2018-04-25 Alan Modra <amodra@gmail.com>
1434 * elf-linux-core.h: Disable gcc-8 string truncation warning.
1435 * elf.c (elfcore_write_prpsinfo): Likewise.
1437 2018-04-25 Alan Modra <amodra@gmail.com>
1439 * Makefile.am: Remove arm-aout and arm-coff support.
1440 * config.bfd: Likewise.
1441 * configure.ac: Likewise.
1442 * targets.c: Likewise.
1443 * aout-arm.c: Delete.
1444 * armnetbsd.c: Delete.
1446 * Makefile.in: Regenerate.
1447 * configure: Regenerate.
1448 * po/SRC-POTFILES.in: Regenerate.
1450 2018-04-24 Nick Clifton <nickc@redhat.com>
1453 * elf.c (ignore_section_sym): Check for the output_section pointer
1454 being NULL before dereferencing it.
1457 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Check for
1458 a negative PE_DEBUG_DATA size before iterating over the debug data.
1460 2018-04-23 Alan Modra <amodra@gmail.com>
1462 * elf-linux-core.h: Revert last change.
1465 2018-04-23 Nick Clifton <nickc@redhat.com>
1468 * aoutx.h (aout_get_external_symbols): Allocate an extra byte at
1469 the end of the string table, and zero it.
1471 2018-04-23 Alan Modra <amodra@gmail.com>
1473 * elf-linux-core.h (swap_linux_prpsinfo32_ugid32_out): Disable
1474 gcc-8 string truncation warning.
1475 (swap_linux_prpsinfo32_ugid16_out): Likewise.
1476 (swap_linux_prpsinfo64_ugid32_out): Likewise.
1477 (swap_linux_prpsinfo64_ugid16_out): Likewise.
1478 * elf.c (elfcore_write_prpsinfo): Likewise.
1480 2018-04-23 Nick Clifton <nickc@redhat.com>
1483 * aoutx.h (aout_get_external_symbols): Allocate an extra byte at
1484 the end of the string table, and zero it.
1486 2018-04-20 Alan Modra <amodra@gmail.com>
1489 * elf32-hppa.c (got_relocs_needed): Add extra param to special
1490 case both dtprel and tprel relocs.
1491 (allocate_dynrelocs): Adjust conditions for got relocs.
1492 (elf32_hppa_relocate_section): Likewise for local sym got relocs.
1493 Emit dynamic relocs on TLS GOT entries for shared libraries,
1494 not when pic. Omit dynamic reloc on dtprel entry when local,
1495 and on tprel entry when local and executable.
1497 2018-04-19 Alan Modra <amodra@gmail.com>
1500 * elf32-hppa.c (elf32_hppa_size_stubs): Init "destination" to -1.
1501 (hppa_type_of_stub): Don't return a long branch stub for
1502 symbols other than those defined statically.
1504 2018-04-19 Alan Modra <amodra@gmail.com>
1506 * Makefile.am: Revert 2018-04-18 coff-mips changes.
1507 * config.bfd: Add back mips_ecoff_le_vec and mips_ecoff_be_vec
1508 to selvecs for mips targets change 2018-04-18.
1509 * configure.ac: Reinstate mips_ecoff_le_vec, mips_ecoff_be_vec
1510 and mips_ecoff_bele_vec.
1511 * targets.c: Likewise.
1512 * coff-mips.c: Resurrect.
1513 * Makefile.in: Regenerate.
1514 * configure: Regenerate.
1515 * po/SRC-POTFILES.in: Regenerate.
1517 2018-04-18 Alan Modra <amodra@gmail.com>
1519 * Makefile.am: Remove mips aout and coff support.
1520 * config.bfd: Likewise.
1521 * configure.ac: Likewise.
1522 * targets.c: Likewise.
1523 * coff-mips.c: Delete
1526 * pei-mips.c: Delete
1527 * Makefile.in: Regenerate.
1528 * configure: Regenerate.
1529 * po/SRC-POTFILES.in: Regenerate.
1531 2018-04-17 H.J. Lu <hongjiu.lu@intel.com>
1533 * elf32-i386.c (elf32_bed): Define before including
1535 * elf64-x86-64.c (elf64_bed): Define before including
1537 (elf32_bed): Define before including "elf32-target.h".
1539 2018-04-17 H.J. Lu <hongjiu.lu@intel.com>
1542 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Use a
1543 normal input file with compatible relocation.
1545 2018-04-18 Alan Modra <amodra@gmail.com>
1547 * Makefile.am: Remove support for assorted i386 aout and coff targets.
1548 * config.bfd: Likewise.
1549 * configure.ac: Likewise.
1550 * doc/bfdint.texi: Likewise.
1551 * targets.c: Likewise.
1552 * freebsd.h: Delete.
1553 * i386dynix.c: Delete.
1554 * i386freebsd.c: Delete.
1555 * i386linux.c: Delete.
1556 * i386mach3.c: Delete.
1557 * i386netbsd.c: Delete.
1558 * i386os9k.c: Delete.
1559 * Makefile.in: Regenerate.
1560 * configure: Regenerate.
1561 * po/SRC-POTFILES.in: Regenerate.
1563 2018-04-17 Andrew Sadek <andrew.sadek.se@gmail.com>
1565 Microblaze Target: PIC data text relative
1567 * bfd/reloc.c (2 new BFD relocations):
1568 BFD_RELOC_MICROBLAZE_64_TEXTPCREL &
1569 BFD_RELOC_MICROBLAZE_64_TEXTPCREL
1570 * bfd/bfd-in2.h: Regenerate
1571 * bfd/libbfd.h: Regenerate
1572 * bfd/elf32-microblaze.c (Handle new relocs): define 'HOWTO' of 3
1573 new relocs and handle them in both relocate and relax functions.
1574 (microblaze_elf_reloc_type_lookup): add mapping between for new
1576 (microblaze_elf_relocate_section): Handle new relocs in case of
1578 (microblaze_elf_relax_section): Handle new relocs for elf relaxation.
1580 2018-04-17 Nick Clifton <nickc@redhat.com>
1583 * aoutx.h (find_nearest_line): Check that the symbol name exists
1584 and is long enough, before attempting to see if it is for a .o
1586 * hash.c (bfd_hash_hash): Add an assertion that the string is not
1588 * linker.c (bfd_link_hash_lookup): Fail if the table or string are
1590 (_bfd_generic_link_add_archive_symbols): Fail if an archive entry
1594 * dwarf2.c (concat_filename): Check for a NULL table pointer.
1596 2018-04-16 Nick Clifton <nickc@redhat.com>
1599 * coffgen.c (coff_pointerize_aux): Check for an out of range
1602 2018-04-16 Alan Modra <amodra@gmail.com>
1604 * Makefile.am: Remove arm-epoc-pe support.
1605 * coff-arm.c: Likewise.
1606 * config.bfd: Likewise.
1607 * configure.ac: Likewise.
1608 * targets.c: Likewise.
1609 * epoc-pe-arm.c: Delete.
1610 * epoc-pei-arm.c: Delete.
1611 * Makefile.in: Regenerate.
1612 * configure: Regenerate.
1613 * po/SRC-POTFILES.in: Regenerate.
1615 2018-04-16 Alan Modra <amodra@gmail.com>
1617 * Makefile.am: Remove sparc-aout and sparc-coff support.
1618 * config.bfd: Likewise.
1619 * configure.ac: Likewise.
1620 * targets.c: Likewise.
1621 * aout-sparcle.c: Delete.
1623 * cf-sparclynx.c: Delete.
1624 * coff-sparc.c: Delete.
1626 * sparclinux.c: Delete.
1627 * sparclynx.c: Delete.
1628 * sparcnetbsd.c: Delete.
1630 * Makefile.in: Regenerate.
1631 * configure: Regenerate.
1632 * po/SRC-POTFILES.in: Regenerate.
1634 2018-04-16 Alan Modra <amodra@gmail.com>
1636 * Makefile.am: Remove m68k-aout and m68k-coff support.
1637 * aoutf1.h: Likewise.
1638 * aoutx.h: Likewise.
1639 * archive.c: Likewise.
1640 * bfd-in.h: Likewise.
1642 * coffcode.h: Likewise.
1643 * coffswap.h: Likewise.
1644 * config.bfd: Likewise.
1645 * configure.ac: Likewise.
1646 * configure.host: Likewise.
1647 * doc/bfd.texinfo: Likewise.
1648 * doc/bfdint.texi: Likewise.
1649 * freebsd.h: Likewise.
1650 * gen-aout.c: Likewise.
1651 * hpux-core.c: Likewise.
1652 * libaout.h: Likewise.
1653 * libbfd-in.h: Likewise.
1654 * pdp11.c: Likewise.
1655 * peicode.h: Likewise.
1656 * riscix.c: Likewise.
1657 * targets.c: Likewise.
1659 * coff-apollo.c: Delete.
1660 * coff-aux.c: Delete.
1661 * coff-m68k.c: Delete.
1662 * coff-svm68k.c: Delete.
1663 * coff-u68k.c: Delete.
1664 * hosts/delta68.h: Delete.
1665 * hosts/hp300bsd.h: Delete.
1666 * hosts/m68kaux.h: Delete.
1667 * hosts/news.h: Delete.
1668 * hp300bsd.c: Delete.
1669 * hp300hpux.c: Delete.
1670 * liboasys.h: Delete.
1671 * m68k4knetbsd.c: Delete.
1672 * m68klinux.c: Delete.
1673 * m68knetbsd.c: Delete.
1675 * versados.c: Delete.
1676 * Makefile.in: Regenerate.
1677 * bfd-in2.h: Regenerate.
1678 * configure: Regenerate.
1679 * libbfd.h: Regenerate.
1680 * po/SRC-POTFILES.in: Regenerate.
1682 2018-04-16 Alan Modra <amodra@gmail.com>
1684 * Makefile.am: Remove sh5 and sh64 support.
1685 * archures.c: Likewise.
1686 * config.bfd: Likewise.
1687 * configure.ac: Likewise.
1688 * cpu-sh.c: Likewise.
1689 * elf32-sh-relocs.h: Likewise.
1690 * elf32-sh.c: Likewise.
1691 * targets.c: Likewise.
1692 * elf32-sh64-com.c: Delete.
1693 * elf32-sh64.c: Delete.
1694 * elf32-sh64.h: Delete.
1695 * elf64-sh64.c: Delete.
1696 * Makefile.in: Regenerate.
1697 * bfd-in2.h: Regenerate.
1698 * configure: Regenerate.
1699 * po/SRC-POTFILES.in: Regenerate.
1701 2018-04-16 Alan Modra <amodra@gmail.com>
1703 * Makefile.am: Remove sh-symbianelf support.
1704 * config.bfd: Likewise.
1705 * configure.ac: Likewise.
1706 * targets.c: Likewise.
1707 * elf32-sh-symbian.c: Delete.
1708 * Makefile.in: Regenerate.
1709 * configure: Regenerate.
1710 * po/SRC-POTFILES.in: Regenerate.
1712 2018-04-16 Alan Modra <amodra@gmail.com>
1714 * Makefile.am: Remove vax-bsd and vax-ultrix support.
1715 * config.bfd: Likewise.
1716 * configure.ac: Likewise.
1717 * targets.c: Likewise.
1719 * Makefile.in: Regenerate.
1720 * configure: Regenerate.
1721 * po/SRC-POTFILES.in: Regenerate.
1723 2018-04-16 Alan Modra <amodra@gmail.com>
1725 * Makefile.am: Remove w65 support.
1726 * archures.c: Likewise.
1727 * coffcode.h: Likewise.
1728 * config.bfd: Likewise.
1729 * configure.ac: Likewise.
1730 * targets.c: Likewise.
1731 * coff-w65.c: Delete.
1732 * cpu-w65.c: Delete.
1733 * Makefile.in: Regenerate.
1734 * bfd-in2.h: Regenerate.
1735 * configure: Regenerate.
1736 * po/SRC-POTFILES.in: Regenerate.
1738 2018-04-16 Alan Modra <amodra@gmail.com>
1740 * Makefile.am: Remove we32k support.
1741 * archures.c: Likewise.
1742 * coffcode.h: Likewise.
1743 * config.bfd: Likewise.
1744 * configure.ac: Likewise.
1745 * targets.c: Likewise.
1746 * coff-we32k.c: Delete.
1747 * cpu-we32k.c: Delete.
1748 * Makefile.in: Regenerate.
1749 * bfd-in2.h: Regenerate.
1750 * configure: Regenerate.
1751 * po/SRC-POTFILES.in: Regenerate.
1753 2018-04-16 Alan Modra <amodra@gmail.com>
1755 * Makefile.am: Remove m88k support.
1756 * aoutx.h: Likewise.
1757 * archures.c: Likewise.
1758 * coffcode.h: Likewise.
1759 * coffswap.h: Likewise.
1760 * config.bfd: Likewise.
1761 * configure.ac: Likewise.
1762 * cpu-ns32k.c: Likewise.
1763 * elf32-nds32.c: Likewise.
1764 * mach-o.c: Likewise.
1765 * netbsd-core.c: Likewise.
1766 * reloc.c: Likewise.
1767 * targets.c: Likewise.
1768 * coff-m88k.c: Delete.
1769 * cpu-m88k.c: Delete.
1770 * elf32-m88k.c: Delete.
1771 * hosts/m88kmach3.h: Delete.
1772 * m88kmach3.c: Delete.
1773 * m88kopenbsd.c: Delete.
1774 * Makefile.in: Regenerate.
1775 * bfd-in2.h: Regenerate.
1776 * configure: Regenerate.
1777 * po/SRC-POTFILES.in: Regenerate.
1779 2018-04-16 Alan Modra <amodra@gmail.com>
1781 * Makefile.am: Remove i370 support.
1782 * archures.c: Likewise.
1783 * config.bfd: Likewise.
1784 * configure.ac: Likewise.
1785 * targets.c: Likewise.
1786 * cpu-i370.c: Delete.
1787 * elf32-i370.c: Delete.
1788 * Makefile.in: Regenerate.
1789 * bfd-in2.h: Regenerate.
1790 * configure: Regenerate.
1791 * po/SRC-POTFILES.in: Regenerate.
1793 2018-04-16 Alan Modra <amodra@gmail.com>
1795 * Makefile.am: Remove h8500 support.
1796 * archures.c: Likewise.
1797 * coffcode.h: Likewise.
1798 * config.bfd: Likewise.
1799 * configure.ac: Likewise.
1800 * targets.c: Likewise.
1801 * coff-h8500.c: Delete.
1802 * cpu-h8500.c: Delete.
1803 * Makefile.in: Regenerate.
1804 * bfd-in2.h: Regenerate.
1805 * configure: Regenerate.
1806 * po/SRC-POTFILES.in: Regenerate.
1808 2018-04-16 Alan Modra <amodra@gmail.com>
1810 * Makefile.am: Remove h8300-coff support.
1811 * coffcode.h: Likewise.
1812 * config.bfd: Likewise.
1813 * configure.ac: Likewise.
1814 * reloc16.c: Likewise.
1815 * targets.c: Likewise.
1816 * coff-h8300.c: Delete.
1817 * Makefile.in: Regenerate.
1818 * configure: Regenerate.
1819 * po/SRC-POTFILES.in: Regenerate.
1821 2018-04-16 Alan Modra <amodra@gmail.com>
1823 * Makefile.am: Remove IEEE 695 support.
1824 * archures.c: Likewise.
1826 * config.bfd: Likewise.
1827 * configure.ac: Likewise.
1828 * doc/bfd.texinfo: Likewise.
1829 * doc/bfdint.texi: Likewise.
1830 * doc/bfdsumm.texi: Likewise.
1831 * section.c: Likewise.
1832 * targets.c: Likewise.
1834 * libieee.h: Delete.
1835 * Makefile.in: Regenerate.
1836 * bfd-in2.h: Regenerate.
1837 * configure: Regenerate.
1838 * po/SRC-POTFILES.in: Regenerate.
1840 2018-04-16 Alan Modra <amodra@gmail.com>
1842 * config.bfd: Remove tandem support.
1844 2018-04-16 Alan Modra <amodra@gmail.com>
1846 * Makefile.am: Remove newsos3 support.
1847 * aoutx.h: Likewise.
1848 * config.bfd: Likewise.
1849 * configure.ac: Likewise.
1850 * targets.c: Likewise.
1851 * newsos3.c: Delete.
1852 * Makefile.in: Regenerate.
1853 * configure: Regenerate.
1854 * po/SRC-POTFILES.in: Regenerate.
1856 2018-04-16 Alan Modra <amodra@gmail.com>
1858 * Makefile.am: Remove netware support.
1859 * bfd-in.h: Likewise.
1861 * config.bfd: Likewise.
1862 * configure.ac: Likewise.
1863 * doc/bfdint.texi: Likewise.
1864 * ecoff.c: Likewise.
1865 * targets.c: Likewise.
1867 * nlm-target.h: Delete.
1869 * nlm32-alpha.c: Delete.
1870 * nlm32-i386.c: Delete.
1871 * nlm32-ppc.c: Delete.
1872 * nlm32-sparc.c: Delete.
1875 * nlmcode.h: Delete.
1876 * nlmswap.h: Delete.
1877 * Makefile.in: Regenerate.
1878 * bfd-in2.h: Regenerate.
1879 * configure: Regenerate.
1880 * po/SRC-POTFILES.in: Regenerate.
1882 2018-04-16 Alan Modra <amodra@gmail.com>
1884 * archures.c: Remove tahoe support.
1885 * config.bfd: Likewise.
1886 * configure.ac: Likewise.
1887 * hosts/tahoe.h: Delete.
1888 * bfd-in2.h: Regenerate.
1889 * configure: Regenerate.
1891 2018-04-14 Alan Modra <amodra@gmail.com>
1893 * elf-bfd.h (struct elf_backend_data): Add relropagesize.
1894 * elfxx-target.h (ELF_RELROPAGESIZE): Provide default and
1896 (elfNN_bed): Init relropagesize.
1897 * bfd.c (bfd_emul_get_commonpagesize): Add boolean param to
1898 select relropagesize.
1899 * elf32-ppc.c (ELF_COMMONPAGESIZE): Define as 0x1000.
1900 (ELF_RELROPAGESIZE): Define as ELF_MAXPAGESIZE.
1901 (ELF_MINPAGESIZE): Don't define.
1902 * elf64-ppc.c (ELF_COMMONPAGESIZE): Define as 0x1000.
1903 (ELF_RELROPAGESIZE): Define as ELF_MAXPAGESIZE.
1904 * bfd-in2.h: Regenerate.
1906 2018-04-14 Alan Modra <amodra@gmail.com>
1908 * elf32-ppc.c (ELF_MAXPAGESIZE, ELF_COMMONPAGESIZE): Don't depend
1909 on __QNXTARGET__ define.
1911 2018-04-14 Alan Modra <amodra@gmail.com>
1913 * config.bfd: Add powerpc-*-lynxos* and powerpc-*-windiss*
1916 2018-04-11 Alan Modra <amodra@gmail.com>
1918 * aout-adobe.c: Delete.
1920 * coff-i860.c: Delete.
1921 * coff-i960.c: Delete.
1922 * cpu-i860.c: Delete.
1923 * cpu-i960.c: Delete.
1924 * elf32-i860.c: Delete.
1925 * elf32-i960.c: Delete.
1926 * hosts/i860mach3.h: Delete.
1927 * Makefile.am: Remove i860, i960, bout, and adobe support.
1928 * archures.c: Remove i860 and i960 support.
1929 * coffcode.h: Likewise.
1930 * reloc.c: Likewise.
1931 * aoutx.h: Comment updates.
1932 * archive.c: Remove BOUT and i960 support.
1933 * bfd.c: Remove BOUT support.
1934 * coffswap.h: Remove i960 support.
1935 * config.bfd: Remove i860, i960 and adobe targets.
1936 * configure.ac: Remove adode, bout, i860, i960, icoff targets.
1937 * targets.c: Likewise.
1938 * ieee.c: Remove i960 support.
1939 * mach-o.c: Remove i860 support.
1940 * Makefile.in: Regenerate.
1941 * bfd-in2.h: Regenerate.
1942 * configure: Regenerate.
1943 * libbfd.h: Regenerate.
1944 * po/SRC-POTFILES.in: Regenerate.
1946 2018-04-09 Maciej W. Rozycki <macro@mips.com>
1948 * elf64-mips.c (mips_elf64_write_rel): Handle a NULL BFD pointer
1949 in the BFD symbol referred by the relocation.
1950 (mips_elf64_write_rela): Likewise.
1952 2018-04-09 Maciej W. Rozycki <macro@mips.com>
1954 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Issue an
1955 error for out-of-range `r_sym' values.
1957 2018-04-09 Alan Modra <amodra@gmail.com>
1959 * elf64-ppc.c (struct _ppc64_elf_section_data): Add has_pltcall field.
1960 (struct ppc_link_hash_table): Add can_convert_all_inline_plt.
1961 (ppc64_elf_check_relocs): Set has_pltcall.
1962 (ppc64_elf_adjust_dynamic_symbol): Discard some PLT entries.
1963 (ppc64_elf_inline_plt): New function.
1964 (ppc64_elf_size_dynamic_sections): Discard some PLT entries for locals.
1965 * elf64-ppc.h (ppc64_elf_inline_plt): Declare.
1966 * elf32-ppc.c (has_pltcall): Define.
1967 (struct ppc_elf_link_hash_table): Add can_convert_all_inline_plt.
1968 (ppc_elf_check_relocs): Set has_pltcall.
1969 (ppc_elf_inline_plt): New function.
1970 (ppc_elf_adjust_dynamic_symbol): Discard some PLT entries.
1971 (ppc_elf_size_dynamic_sections): Likewise.
1972 * elf32-ppc.h (ppc_elf_inline_plt): Declare.
1974 2018-04-09 Alan Modra <amodra@gmail.com>
1976 * elf32-ppc.c (ppc_elf_howto_raw): Add PLTSEQ and PLTCALL howtos.
1977 (is_plt_seq_reloc): New function.
1978 (ppc_elf_check_relocs): Handle PLTSEQ and PLTCALL relocs.
1979 (ppc_elf_tls_optimize): Handle inline plt call sequence.
1980 (ppc_elf_relax_section): Handle PLTCALL reloc.
1981 (ppc_elf_relocate_section): Nop out inline plt call sequence when
1983 * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_PLTSEQ and
1984 R_PPC64_PLTCALL entries. Comment R_PPC64_TOCSAVE.
1985 (has_tls_get_addr_call): Correct comment.
1986 (is_branch_reloc): Add PLTCALL.
1987 (is_plt_seq_reloc): New function.
1988 (ppc64_elf_check_relocs): Handle PLT16_LO_DS reloc. Set
1989 has_tls_reloc for R_PPC64_TLSGD and R_PPC64_TLSLD. Create plt
1990 entry for R_PPC64_PLTCALL.
1991 (ppc64_elf_tls_optimize): Handle inline plt call sequence.
1992 (ppc_type_of_stub): Handle PLTCALL reloc.
1993 (toc_adjusting_stub_needed): Likewise.
1994 (ppc64_elf_relocate_section): Set "can_plt_call" for PLTCALL
1995 reloc insn. Nop out inline plt call sequence when resolving
1996 locally. Handle __tls_get_addr inline plt call optimization.
1998 2018-04-09 Alan Modra <amodra@gmail.com>
2000 * elf64-ppc.c (LOCAL_PLT_ENTRY_SIZE): Define.
2001 (struct ppc_stub_hash_entry): Add symtype field.
2003 (struct ppc_link_hash_table): Add pltlocal and relpltlocal.
2004 (create_linkage_sections): Create pltlocal and relpltlocal.
2005 (ppc64_elf_check_relocs): Allow PLT relocs on local symbols.
2007 (ppc64_elf_adjust_dynamic_symbol): Keep PLT entries for inline calls.
2008 (allocate_dynrelocs): Allocate pltlocal and relpltlocal.
2009 (ppc64_elf_size_dynamic_sections): Size pltlocal and relpltlocal.
2010 Keep PLT entries for inline calls against locals.
2011 (ppc_build_one_stub): Use pltlocal as appropriate.
2012 (ppc_size_one_stub): Likewise.
2013 (ppc64_elf_size_stubs): Set symtype.
2014 (build_global_entry_stubs_and_plt): Init pltlocal and write
2015 relpltlocal for globals.
2016 (write_plt_relocs_for_local_syms): Likewise for local syms.
2017 (ppc64_elf_relocate_section): Support PLT for local syms.
2018 * elf32-ppc.c (PLT_KEEP): Define.
2019 (struct ppc_elf_link_hash_table): Add pltlocal and relpltlocal.
2020 (ppc_elf_create_glink): Create pltlocal and relpltlocal.
2021 (ppc_elf_check_relocs): Allow PLT relocs on local symbols.
2022 Set PLT_KEEP. Adjust update_local_sym_info call.
2023 (ppc_elf_adjust_dynamic_symbol): Keep PLT entries for inline calls.
2024 (allocate_dynrelocs): Allocate pltlocal and relpltlocal.
2025 (ppc_elf_size_dynamic_sections): Size pltlocal and relpltlocal.
2026 (ppc_elf_relocate_section): Support PLT16 relocs for local syms.
2027 (write_global_sym_plt): Init pltlocal and write relpltlocal.
2028 (ppc_finish_symbols): Likewise for locals.
2030 2018-04-09 Alan Modra <amodra@gmail.com>
2032 * elf64-ppc.c (ppc_build_one_stub): Move output of PLT relocs
2033 for local symbols to..
2034 (write_plt_relocs_for_local_syms): ..here. New function.
2035 (ppc64_elf_finish_dynamic_symbol): Move output of PLT relocs for
2037 (build_global_entry_stubs_and_plt): ..here. Rename from
2038 build_global_entry_stubs.
2039 (ppc64_elf_build_stubs): Always call build_global_entry_stubs_and_plt.
2040 Call write_plt_relocs_for_local_syms.
2041 * elf32-ppc.c (get_sym_h): New function.
2042 (ppc_elf_relax_section): Use get_sym_h.
2043 (ppc_elf_relocate_section): Move output of PLT relocs and glink
2044 stubs for local symbols to..
2045 (ppc_finish_symbols): ..here. New function.
2046 (ppc_elf_finish_dynamic_symbol): Move output of PLT relocs for
2048 (write_global_sym_plt): ..here. New function.
2049 * elf32-ppc.h (ppc_elf_modify_segment_map): Delete attribute.
2050 (ppc_finish_symbols): Declare.
2052 2018-04-09 Alan Modra <amodra@gmail.com>
2054 * elf32-ppc.c (ppc_elf_check_relocs): Handle PLT16 relocs.
2055 (ppc_elf_relocate_section): Likewise.
2056 * elf64-ppc.c (ppc64_elf_check_relocs): Handle PLT16_LO_DS.
2057 (ppc64_elf_relocate_section): Likewise. Correct PLT16
2058 resolution to plt entry relative to toc pointer.
2060 2018-04-09 Alan Modra <amodra@gmail.com>
2062 * elf64-ppc.c (TLS_TLS, TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL,
2063 TLS_TPRELGD, TLS_EXPLICIT): Renumber. Test TLS_TLS throughout
2064 file when other TLS flags are tested in a mask.
2065 (TLS_MARK, NON_GOT): Define.
2066 (PLT_IFUNC): Redefine, and test TLS_TLS throughout file as well.
2067 (update_local_sym_info): Don't create got entry when NON_GOT.
2068 (ppc64_elf_check_relocs): Pass NON_GOT with PLT_IFUNC.
2070 (get_tls_mask): Do toc lookup if tls_mask is just TLS_MARK.
2071 (ppc64_elf_relocate_section): Likewise.
2072 (ppc64_elf_tls_optimize): Don't attempt to optimize indirect
2073 __tls_get_addr calls lacking a marker reloc.
2074 * elf32-ppc.c (TLS_TLS, TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL,
2075 TLS_TPRELGD): Renumber. Update comment.
2076 (TLS_MARK, NON_GOT): Define.
2077 (PLT_IFUNC): Redefine, and test TLS_TLS throughout file as well.
2078 (update_local_sym_info): Don't create got entry when NON_GOT.
2079 (ppc_elf_check_relocs): Pass NON_GOT with PLT_IFUNC.
2081 (ppc_elf_tls_optimize): Don't attempt to optimize indirect
2082 __tls_get_addr calls lacking a marker reloc.
2084 2018-04-06 H.J. Lu <hongjiu.lu@intel.com>
2086 * elf64-x86-64.c (elf_x86_64_info_to_howto): Don't mask out
2087 R_X86_64_converted_reloc_bit.
2089 2018-04-05 H.J. Lu <hongjiu.lu@intel.com>
2092 * configure: Regenerated.
2094 2018-04-05 Alan Modra <amodra@gmail.com>
2096 * elf-hppa.h (elf_hppa_info_to_howto): Init howto to NULL.
2097 (elf_hppa_info_to_howto_rel): Likewise.
2099 2018-04-04 Maciej W. Rozycki <macro@mips.com>
2101 * elf-hppa.h (elf_hppa_info_to_howto): Also return
2102 unsuccessfully for unimplemented relocations.
2103 (elf_hppa_info_to_howto_rel): Likewise.
2105 2018-04-04 Maciej W. Rozycki <macro@mips.com>
2107 * elf32-i860.c (lookup_howto): Add `abfd' parameter. Set the
2108 `bfd_error_bad_value' error and call `_bfd_error_handler' on a
2109 howto lookup failure.
2110 (elf32_i860_reloc_type_lookup): Adjust `lookup_howto' call
2112 (elf32_i860_info_to_howto_rela): Likewise.
2113 (elf32_i860_relocate_splitn): Likewise.
2114 (elf32_i860_relocate_pc16): Likewise.
2115 (elf32_i860_relocate_pc26): Likewise.
2116 (elf32_i860_relocate_section): Likewise.
2118 2018-04-04 Maciej W. Rozycki <macro@mips.com>
2120 * elf32-visium.c (visium_info_to_howto_rela): Correct the range
2121 check for `visium_elf_howto_table' table access.
2123 2018-04-04 Maciej W. Rozycki <macro@mips.com>
2125 * elf32-iq2000.c (iq2000_info_to_howto_rela): Correct the range
2126 check for `iq2000_elf_howto_table' table access.
2128 2018-04-04 Maciej W. Rozycki <macro@mips.com>
2130 * elf32-frv.c (frv_info_to_howto_rela): Correct the range check
2131 for `elf32_frv_howto_table' table access.
2133 2018-04-04 Maciej W. Rozycki <macro@mips.com>
2135 * elf32-mips.c (mips_elf32_rtype_to_howto): Also return
2136 unsuccessfully for placeholder howtos.
2137 * elf64-mips.c (mips_elf64_rtype_to_howto): Likewise.
2138 * elfn32-mips.c (mips_elf_n32_rtype_to_howto): Likewise.
2140 2018-03-29 Maciej W. Rozycki <macro@mips.com>
2142 * elf32-mips.c (mips_info_to_howto_rel): Remove the calls to
2143 `_bfd_error_handler' and to set the `bfd_error_bad_value' error.
2145 2018-03-28 Maciej W. Rozycki <macro@mips.com>
2147 * elf-hppa.h (elf_hppa_info_to_howto_rel): Remove
2148 ATTRIBUTE_UNUSED from `abfd'.
2150 2018-03-28 Maciej W. Rozycki <macro@mips.com>
2152 * elf-hppa.h (elf_hppa_info_to_howto_rel): Correct
2153 `_bfd_error_handler' call formatting.
2155 2018-03-28 Maciej W. Rozycki <macro@mips.com>
2157 * elf32-mips.c (mips_info_to_howto_rel): Call
2158 `mips_elf32_rtype_to_howto' directly rather than via
2159 `->elf_backend_mips_rtype_to_howto'.
2161 2018-03-28 Renlin Li <renlin.li@arm.com>
2164 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Add cases for
2165 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12,
2166 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
2167 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12,
2168 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
2169 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12,
2170 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
2171 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12,
2172 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
2173 (elfNN_aarch64_final_link_relocate): Support new relocations.
2174 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Support new
2176 (_bfd_aarch64_elf_resolve_relocation): Support new relocations.
2178 2018-03-28 Renlin Li <renlin.li@arm.com>
2181 * reloc.c: Add BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12
2182 BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12_NC,
2183 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12,
2184 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
2185 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12,
2186 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
2187 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12,
2188 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
2189 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12,
2190 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
2191 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add table entry for
2192 TLSLE_LDST16_TPREL_LO12,
2193 TLSLE_LDST16_TPREL_LO12_NC,
2194 TLSLE_LDST32_TPREL_LO12,
2195 TLSLE_LDST32_TPREL_LO12_NC,
2196 TLSLE_LDST64_TPREL_LO12,
2197 TLSLE_LDST64_TPREL_LO12_NC,
2198 TLSLE_LDST8_TPREL_LO12,
2199 TLSLE_LDST8_TPREL_LO12_NC.
2200 * bfd-in2.h: Regenerated.
2201 * libbfd.h: Regenerated.
2203 2018-03-28 Eric Botcazou <ebotcazou@adacore.com>
2206 * elfxx-sparc.c (struct _bfd_sparc_elf_link_hash_entry): Add new flag
2207 has_old_style_got_reloc.
2208 (_bfd_sparc_elf_check_relocs) <GOT relocations>: Set it for old-style
2209 relocations. Fix a couple of long lines.
2210 (_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: Do not generate
2211 a R_SPARC_NONE for the GOT slot if the symbol is also subject to old-style
2214 2018-03-25 H.J. Lu <hongjiu.lu@intel.com>
2217 * elf64-x86-64.c (elf_x86_64_finish_dynamic_sections): Add
2218 ENDBR64 to the TLSDESC PLT entry.
2220 2018-03-21 Alan Modra <amodra@gmail.com>
2222 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Trim uninteresting
2223 symbols. Use size_t counts. Delete redundant opd test.
2225 2018-03-21 Alan Modra <amodra@gmail.com>
2227 * elf32-ppc.c (ppc_elf_tls_optimize): Delete locsyms.
2229 2018-03-21 Alan Modra <amodra@gmail.com>
2231 * elf32-ppc.c (struct ppc_elf_link_hash_entry): Make tls_mask
2233 (update_local_sym_info): Likewise for local_got_tls_masks.
2234 (ppc_elf_tls_optimize): Likewise for lgot_masks.
2236 2018-03-21 Alan Modra <amodra@gmail.com>
2238 * elf64-ppc.c (ppc_size_one_stub): Fix comment typo.
2239 (ppc64_elf_layout_multitoc): Allocate relocs for tprel as we
2240 do in size_dynamic_sections.
2242 2018-03-21 Alan Modra <amodra@gmail.com>
2244 * elf64-ppc.c (ppc64_elf_relocate_section): Don't access rel[1]
2245 without first checking array bounds.
2246 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2248 2018-03-20 H.J. Lu <hongjiu.lu@intel.com>
2251 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Set
2252 non_ir_ref_dynamic if a symbol is made dynamic by --dynamic-list.
2254 2018-03-19 Nick Clifton <nickc@redhat.com>
2256 * po/es.po: Updated Spanish translation.
2258 2018-03-15 Max Filippov <jcmvbkbc@gmail.com>
2260 * elf32-xtensa.c (xlate_map_entry): Change types of address
2261 fields from 'unsigned' to 'bfd_vma'.
2262 (xlate_offset_with_removed_text): Use struct xlate_map_entry as
2263 the key argument to bsearch. Allow offsets past the end of a
2264 section, use the last map entry for translation of such offsets.
2266 2018-03-15 Kuan-Lin Chen <kuanlinchentw@gmail.com>
2268 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Removed.
2269 Not support the target feature.
2270 (nds32_elf_ex9_itb_base): Likewise.
2271 (nds32_elf_ex9_import_table): Likewise.
2272 (nds32_elf_ex9_finish): Likewise.
2273 (nds32_elf_ex9_reloc_jmp): Likewise.
2274 (nds32_elf_get_insn_with_reg): Likewise.
2275 (nds32_get_local_syms): Likewise.
2276 (nds32_elf_ex9_replace_instruction): Likewise.
2277 (nds32_elf_ifc_calc): Likewise.
2278 (nds32_elf_ifc_finish): Likewise.
2279 (nds32_elf_ifc_replace): Likewise.
2280 (nds32_elf_ifc_reloc): Likewise.
2282 2018-03-14 Alan Modra <amodra@gmail.com>
2284 * elf64-ppc.c (sfpr_define): Adjust for stub_sec size having
2285 sfpr size added before defining alias symbols.
2286 (ppc64_elf_build_stubs): Add stub section padding before
2287 copying sfpr contents and defining save/restore alias symbols.
2289 2018-03-14 H.J. Lu <hongjiu.lu@intel.com>
2292 * elflink.c (elf_gc_mark_debug_section): Also check the local
2293 debug definition section.
2295 2018-03-13 Nick Clifton <nickc@redhat.com>
2298 * pei-x86_64.c (pex64_get_unwind_info): Change to a boolean
2299 function. Add an end address parameter. Check access of the data
2300 pointer to make sure that they do not extend beyond the end
2301 address. Return FALSE if any check fails. Add the end address
2302 pointer to the ui structure.
2303 (pex64_xdata_print_uwd_codes): Check accesses of the raw unwind
2304 codes to make sure that they do not extend beyond the end address
2305 pointer. Print an error message and return immediately if any
2308 2018-03-09 Nick Clifton <nickc@redhat.com>
2310 * elf64-s390.c (elf_s390_relocate_section): Move check for
2311 relocations against non-allocated sections to before the code that
2312 handles ifunc relocations.
2313 * elf32-s390.c (elf_s390_relocate_section): Likewise.
2314 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Treat
2315 relocs against IFUNC symbols in non-allocated sections as relocs
2316 against FUNC symbols.
2317 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
2319 2018-03-08 H.J. Lu <hongjiu.lu@intel.com>
2322 * elf32-i386.c (elf_i386_relocate_section): Treat relocation
2323 against IFUNC symbol in SHT_NOTE section without SHF_ALLOC as
2324 relocation against FUNC symbol.
2325 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
2327 2018-03-07 Renlin Li <renlin.li@arm.com>
2330 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Check absolute
2331 symbol, and don't emit relocation in specific case.
2333 2018-03-07 Alan Modra <amodra@gmail.com>
2335 * elf64-mips.c (mips_elf64_rtype_to_howto): Return NULL on error.
2336 (mips_elf64_slurp_one_reloc_table): Pass on error.
2338 2018-03-03 James Cowgill <james.cowgill@mips.com>
2339 Maciej W. Rozycki <macro@mips.com>
2342 * elfxx-mips.c (mips_elf_calculate_relocation): Only return
2343 after calling `undefined_symbol' hook if this is an error
2344 condition. Assume the value of 0 for the symbol requested
2347 2018-03-02 Jim Wilson <jimw@sifive.com>
2350 * elfnn-aarch64.c (_bfd_aarch64_resize_stubs): Add 8 bytes for branch
2351 and nop instead of 4.
2352 (elfNN_arch64_build_stubs): Add nop after branch. Increase size by
2355 2018-03-01 Jim Wilson <jimw@sifive.com>
2358 * elfnn-riscv.c (riscv_relax_delete_bytes): When adjust st_size, use
2359 else if instead of if.
2361 2018-03-01 Alan Modra <amodra@gmail.com>
2363 * elf32-ft32.c (ft32_info_to_howto_rela): Correct range test.
2365 2018-02-28 Alan Modra <amodra@gmail.com>
2368 * aoutx.h (swap_std_reloc_in): Correct r_index bound check.
2370 2018-02-28 Nick Clifton <nickc@redhat.com>
2374 * dwarf2.c (read_n_bytes): Replace size parameter with dwarf_block
2375 pointer. Drop unused abfd parameter. Check the size of the block
2376 before initialising the data field. Return the end pointer if the
2378 (read_attribute_value): Adjust invocations of read_n_bytes.
2381 * dwarf1.c (parse_die): Check the length of form blocks before
2382 advancing the data pointer.
2384 2018-02-28 Alan Modra <amodra@gmail.com>
2387 * aoutx.h (translate_symbol_table): Print an error message and set
2388 bfd_error on finding an invalid name string offset.
2390 2018-02-27 H.J. Lu <hongjiu.lu@intel.com>
2392 * config.in: Regenerated.
2393 * configure: Likewise.
2394 * configure.ac: Add --enable-separate-code.
2395 (DEFAULT_LD_Z_SEPARATE_CODE): New AC_DEFINE_UNQUOTED. Default
2396 to 1 for Linux/x86 targets,
2397 * elf64-x86-64.c (ELF_MAXPAGESIZE): Set to 0x1000 if
2398 DEFAULT_LD_Z_SEPARATE_CODE is 1.
2400 2018-02-27 Nick Clifton <nickc@redhat.com>
2402 * aout-cris.c (swap_ext_reloc_out): Standadize error/warning
2404 * elf-hppa.h (elf_hppa_info_to_howto_rel): Likewise.
2405 * elf32-i386.c (elf_i386_reloc_type_lookup): Likewise.
2406 * elf32-xtensa.c (elf_xtensa_reloc_type_lookup): Likewise.
2407 * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Likewise.
2408 * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise.
2409 * elf64-sh64.c (sh_elf64_info_to_howto): Likewise.
2410 * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise.
2411 * elfxx-sparc.c (_bfd_sparc_elf_reloc_type_lookup): Likewise.
2412 * elfxx-tilegx.c (tilegx_reloc_type_lookup): Likewise.
2415 * elf-bfd.h (struct elf_backend_data): Change the return type of
2416 the elf_info_to_howto and elf_info_to_howto_rel function pointers
2418 * elfcode.h (elf_slurp_reloc_table_from_section): Check the return
2419 value from the info_to_howto function and fail if that function
2421 * elf32-h8300.c (elf32_h8_relocate_section): Check return value
2422 from the info_to_howto function.
2423 (elf32_h8_relax_section): Likewise.
2424 * elf32-lm32.c (lm32_elf_relocate_section): Likewise.
2425 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
2426 * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise.
2427 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
2428 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
2429 * elf64-ia64-vms.c (elf64_ia64_relocate_section): Likewise.
2430 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Likewise.
2431 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
2432 * elfnn-ia64.c (elfNN_ia64_relocate_section): Likewise.
2433 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
2434 (riscv_elf_relocate_section): Likewise.
2435 * elf-hppa.h (elf_hppa_info_to_howto): Change return type to
2436 bfd_boolean. Issue an error message, set an error value and
2437 return FALSE if the reloc is not recognized.
2438 (elf_hppa_info_to_howto_rel): Likewise.
2439 * elf-m10200.c (mn10200_info_to_howto): Likewise.
2440 * elf-m10300.c (mn10300_info_to_howto): Likewise.
2441 * elf.c (_bfd_elf_no_info_to_howto): Likewise.
2442 * elf32-arc.c (arc_info_to_howto_rel): Likewise.
2443 * elf32-arm.c (elf32_arm_info_to_howto): Likewise.
2444 * elf32-avr.c (avr_info_to_howto_rela): Likewise.
2445 * elf32-bfin.c (bfin_info_to_howto): Likewise.
2446 * elf32-cr16.c (elf_cr16_info_to_howto): Likewise.
2447 * elf32-cr16c.c (elf_cr16c_info_to_howto): Likewise.
2448 * elf32-cris.c (elf_cr16c_info_to_howto_rel)
2449 (cris_info_to_howto_rela): Likewise.
2450 * elf32-crx.c (elf_crx_info_to_howto): Likewise.
2451 * elf32-d10v.c (d10v_info_to_howto_rel): Likewise.
2452 * elf32-d30v.c (d30v_info_to_howto_rel, d30v_info_to_howto_rela):
2454 * elf32-dlx.c (dlx_rtype_to_howto, elf32_dlx_info_to_howto)
2455 (elf32_dlx_info_to_howto_rel): Likewise.
2456 * elf32-epiphany.c (epiphany_info_to_howto_rela): Likewise.
2457 * elf32-fr30.c (fr30_info_to_howto_rela): Likewise.
2458 * elf32-frv.c (frv_info_to_howto_rela)
2459 (frvfdpic_info_to_howto_rel): Likewise.
2460 * elf32-ft32.c (ft32_info_to_howto_rela): Likewise.
2461 * elf32-gen.c (elf_generic_info_to_howto)
2462 (elf_generic_info_to_howto_rel): Likewise.
2463 * elf32-h8300.c (elf32_h8_info_to_howto)
2464 (elf32_h8_info_to_howto_rel): Likewise.
2465 * elf32-i370.c (i370_elf_info_to_howto): Likewise.
2466 * elf32-i386.c (elf_i386_reloc_type_lookup)
2467 (elf_i386_rtype_to_howto, elf_i386_info_to_howto_rel): Likewise.
2468 * elf32-i860.c (lookup_howto, elf32_i860_info_to_howto_rela):
2470 * elf32-i960.c (elf32_i960_info_to_howto_rel): Likewise.
2471 * elf32-ip2k.c (ip2k_info_to_howto_rela): Likewise.
2472 * elf32-iq2000.c (iq2000_info_to_howto_rela): Likewise.
2473 * elf32-lm32.c (lm32_info_to_howto_rela): Likewise.
2474 * elf32-m32c.c (m32c_info_to_howto_rela): Likewise.
2475 * elf32-m32r.c (m32r_info_to_howto_rel, m32r_info_to_howto):
2477 * elf32-m68hc11.c (m68hc11_info_to_howto_rel): Likewise.
2478 * elf32-m68hc12.c (m68hc11_info_to_howto_rel): Likewise.
2479 * elf32-m68k.c (rtype_to_howto): Likewise.
2480 * elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
2481 * elf32-mep.c (mep_info_to_howto_rela): Likewise.
2482 * elf32-metag.c (metag_info_to_howto_rela): Likewise.
2483 * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
2484 * elf32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela):
2486 * elf32-moxie.c (moxie_info_to_howto_rela): Likewise.
2487 * elf32-msp430.c (msp430_info_to_howto_rela): Likewise.
2488 * elf32-mt.c (mt_info_to_howto_rela): Likewise.
2489 * elf32-nds32.c (nds32_info_to_howto_rel, nds32_info_to_howto):
2491 * elf32-nios2.c (nios2_elf32_info_to_howto): Likewise.
2492 * elf32-or1k.c (or1k_info_to_howto_rela): Likewise.
2493 * elf32-pj.c (pj_elf_info_to_howto): Likewise.
2494 * elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
2495 * elf32-pru.c (pru_elf32_info_to_howto): Likewise.
2496 * elf32-rl78.c (rl78_info_to_howto_rela): Likewise.
2497 * elf32-rx.c (rx_info_to_howto_rela): Likewise.
2498 * elf32-s390.c (elf_s390_info_to_howto): Likewise.
2499 * elf32-score.c (s3_bfd_score_info_to_howto)
2500 (_bfd_score_info_to_howto): Likewise.
2501 * elf32-score7.c (s7_bfd_score_info_to_howto): Likewise.
2502 * elf32-sh.c (sh_elf_info_to_howto): Likewise.
2503 * elf32-spu.c (spu_elf_info_to_howto): Likewise.
2504 * elf32-tic6x.c (elf32_tic6x_info_to_howto)
2505 (elf32_tic6x_info_to_howto_rel): Likewise.
2506 * elf32-tilepro.c (tilepro_info_to_howto_rela): Likewise.
2507 * elf32-v850.c (v850_elf_info_to_howto_rel)
2508 (v850_elf_info_to_howto_rela, v800_elf_info_to_howto): Likewise.
2509 * elf32-vax.c (rtype_to_howto): Likewise.
2510 * elf32-visium.c (visium_info_to_howto_rela): Likewise.
2511 * elf32-wasm32.c (elf32_wasm32_rtype_to_howto)
2512 (elf32_wasm32_info_to_howto_rela): Likewise.
2513 * elf32-xc16x.c (elf32_xc16x_info_to_howto): Likewise.
2514 * elf32-xgate.c (xgate_info_to_howto_rel): Likewise.
2515 * elf32-xstormy16.c (xstormy16_info_to_howto_rela): Likewise.
2516 * elf32-xtensa.c (elf_xtensa_info_to_howto_rela): Likewise.
2517 * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
2518 * elf64-gen.c (elf_generic_info_to_howto)
2519 (elf_generic_info_to_howto_rel): Likewise.
2520 * elf64-ia64-vms.c (elf64_ia64_info_to_howto): Likewise.
2521 * elf64-mips.c (mips_elf64_info_to_howto_rela): Likewise.
2522 * elf64-mmix.c (mmix_info_to_howto_rela): Likewise.
2523 * elf64-ppc.c (ppc64_elf_info_to_howto): Likewise.
2524 * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise.
2525 * elf64-sh64.c (elf_s390_info_to_howto, sh_elf64_info_to_howto):
2527 * elf64-x86-64.c (elf_x86_64_info_to_howto): Likewise.
2528 * elfn32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela):
2530 * elfnn-aarch64.c (elfNN_aarch64_info_to_howto): Likewise.
2531 * elfnn-ia64.c (elfNN_ia64_info_to_howto): Likewise.
2532 * elfnn-riscv.c (riscv_info_to_howto_rela): Likewise.
2533 * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise.
2534 * elfxx-sparc.c (_bfd_sparc_elf_info_to_howto): Likewise.
2535 * elfxx-tilegx.c (tilegx_info_to_howto_rela): Likewise.
2536 * elf32-score.h (s7_bfd_score_info_to_howto): Update prototype.
2537 * elfxx-sparc.h (_bfd_sparc_elf_info_to_howto): Update prototype.
2538 * elfxx-tilegx.h (tilegx_info_to_howto_rela): Update prototype.
2539 * elfxx-target.h (elf_info_to_howto, elf_info_to_howto_rel):
2542 2018-02-26 Jim Wilson <jimw@sifive.com>
2543 Stephan Schreiber <info@fs-driver.org>
2546 * elfnn-ia64.c (elfNN_ia64_relax_section): After ia64_elf_relax_brl
2547 call, set changed_contents and changed_relocs. Likewise after
2548 successful ia64_elf_relax_br call.
2550 2018-02-26 Alan Modra <amodra@gmail.com>
2552 * elf.c (assign_file_positions_except_relocs): Don't segfault
2553 when actual number of phdrs is less than allocated. Delete
2554 outdated comment. Formatting.
2556 2018-02-26 Alan Modra <amodra@gmail.com>
2558 * elf-m10300.c, * elf-s390-common.c, * elf32-arc.c, * elf32-cris.c,
2559 * elf32-dlx.c, * elf32-frv.c, * elf32-i370.c, * elf32-lm32.c,
2560 * elf32-m32r.c, * elf32-m68hc1x.c, * elf32-m68k.c,
2561 * elf32-microblaze.c, * elf32-msp430.c, * elf32-nds32.c,
2562 * elf32-nios2.c, * elf32-or1k.c, * elf32-rl78.c, * elf32-rx.c,
2563 * elf32-score.c, * elf32-score7.c, * elf32-sh-symbian.c,
2564 * elf32-sh.c, * elf32-spu.c, * elf32-v850.c, * elf32-xtensa.c,
2565 * elf64-alpha.c, * elf64-ia64-vms.c, * elf64-mmix.c,
2566 * elf64-sh64.c, * elf64-sparc.c, * elfnn-ia64.c, * elfxx-tilegx.c,
2567 * mmo.c, * osf-core.c, * srec.c, * vms-alpha.c: Standardize
2568 error/warning messages.
2570 2018-02-26 Alan Modra <amodra@gmail.com>
2572 * archive.c, * bfd.c, * linker.c, * reloc.c, * stabs.c,
2573 * syms.c: Standardize error/warning messages.
2575 2018-02-26 Alan Modra <amodra@gmail.com>
2577 * aout-adobe.c, * aout-cris.c, * i386linux.c, * m68klinux.c,
2578 * sparclinux.c, * coff-alpha.c, * coff-arm.c, * coff-mcore.c,
2579 * coffcode.h, * coffgen.c, * cofflink.c, * ecoff.c, * pe-mips.c,
2580 * peXXigen.c, * peicode.h: Standardize error/warning messages.
2582 2018-02-26 Alan Modra <amodra@gmail.com>
2584 * elf32-arm.c, * elfnn-aarch64.c: Standardize error/warning messages.
2586 2018-02-26 Alan Modra <amodra@gmail.com>
2588 * elfxx-mips.c: Standardize error/warning messages.
2590 2018-02-26 Alan Modra <amodra@gmail.com>
2592 * dwarf2.c, * elf-attrs.c, * elf-eh-frame.c, * elf.c, * elf32-gen.c,
2593 * elflink.c: Standardize error/warning messages. Replace use of
2594 linker callback einfo with _bfd_error_handler when possible.
2596 2018-02-26 Alan Modra <amodra@gmail.com>
2598 * aoutx.h, * coff-alpha.c, * coff-i860.c, * coff-m68k.c,
2599 * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c,
2600 * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-w65.c,
2601 * elf-bfd.h, * elf-m10300.c, * elf.c, * elf32-avr.c, * elf32-bfin.c,
2602 * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c,
2603 * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c,
2604 * elf32-fr30.c, * elf32-frv.c, * elf32-i370.c, * elf32-i386.c,
2605 * elf32-i960.c, * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c,
2606 * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c,
2607 * elf32-m68k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c,
2608 * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c,
2609 * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-or1k.c,
2610 * elf32-pj.c, * elf32-ppc.c, * elf32-rl78.c, * elf32-rx.c,
2611 * elf32-s390.c, * elf32-sh.c, * elf32-spu.c, * elf32-tic6x.c,
2612 * elf32-v850.c, * elf32-vax.c, * elf32-visium.c, * elf32-wasm32.c,
2613 * elf32-xgate.c, * elf32-xtensa.c, * elf64-alpha.c,
2614 * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c,
2615 * elf64-ppc.c, * elf64-s390.c, * elf64-sparc.c, * elf64-x86-64.c,
2616 * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c,
2617 * elfnn-riscv.c, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-riscv.h,
2618 * elfxx-sparc.c, * elfxx-sparc.h, * reloc.c: Standardize
2619 unrecognized/unsupported reloc message.
2621 2018-02-26 Alan Modra <amodra@gmail.com>
2623 * elf32-ppc.c: Standardize error/warning messages. Use
2624 _bfd_error_handler rather than einfo when einfo features not used.
2625 * elf64-ppc.c: Likewise.
2627 2018-02-23 Alan Modra <amodra@gmail.com>
2630 * elf.c (assign_file_positions_for_non_load_sections): Remove RELRO
2631 segment if no matching LOAD segment.
2633 2018-02-23 Kuan-Lin Chen <kuanlinchentw@gmail.com>
2635 * elf32-nds32.h: Define mask for ict_model.
2637 2018-02-20 Jason Duerstock <jason.duerstock@gmail.com>
2639 * elfnn-ia64.c (elf_backend_can_gc_sections): Enable.
2641 2018-02-19 Maciej W. Rozycki <macro@mips.com>
2644 2018-01-12 Vlad Ivanov <vlad@ivanov.email>
2646 * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
2647 .reginfo section has wrong size.
2649 2018-02-19 Maciej W. Rozycki <macro@mips.com>
2651 * elfxx-mips.c (_bfd_mips_elf_always_size_sections): Set
2652 SEC_FIXED_SIZE and SEC_HAS_CONTENTS flags for `.reginfo' and
2653 `.MIPS.abiflags' sections.
2654 (_bfd_mips_elf_final_link): Avoid reading beyond `.reginfo'
2657 2018-02-19 Maciej W. Rozycki <macro@mips.com>
2659 * section.c (SEC_FIXED_SIZE): New macro.
2660 * bfd-in2.h: Regenerate.
2662 2018-02-19 Maciej W. Rozycki <macro@mips.com>
2664 * section.c (SEC_HAS_GOT_REF): Remove macro.
2665 * bfd-in2.h: Regenerate.
2667 2018-02-19 Alan Modra <amodra@gmail.com>
2669 * elf-attrs.c (_bfd_elf_parse_attributes): Correct _bfd_error_handler
2671 * elfxx-mips.c (_bfd_mips_elf_final_link): Likewise.
2672 * elfnn-riscv.c (_bfd_riscv_relax_align): Likewise.
2673 (_bfd_riscv_relax_pc): Likewise and fix typos.
2674 * libbfd-in.h (_bfd_error_handler): Add attribute printf.
2675 * libbfd.h: Regenerate.
2677 2018-02-19 Alan Modra <amodra@gmail.com>
2679 * dwarf2.c (read_section): Don't use 'll' format modifier.
2680 (find_abstract_instance): Likewise.
2681 * elfcore.h (elf_core_file_p): Likewise.
2683 2018-02-19 Alan Modra <amodra@gmail.com>
2685 * bfd-in.h: Include inttypes.h or if not available define
2686 PRId64, PRIu64 and PRIx64.
2687 * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Remove support for L
2688 modifier to print bfd_vma.
2689 * coff-arm.c, * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c,
2690 * coff-sh.c, * coff-tic80.c, * coffcode.h, * coffgen.c, * cofflink.c,
2691 * compress.c, * dwarf2.c, * elf-m10300.c, * elf.c, * elf32-arc.c,
2692 * elf32-arm.c, * elf32-bfin.c, * elf32-cris.c, * elf32-hppa.c,
2693 * elf32-i386.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32r.c,
2694 * elf32-m68k.c, * elf32-metag.c, * elf32-nds32.c, * elf32-nios2.c,
2695 * elf32-ppc.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c,
2696 * elf32-score7.c, * elf32-sh.c, * elf32-sh64.c, * elf32-spu.c,
2697 * elf32-tic6x.c, * elf32-tilepro.c, * elf32-v850.c, * elf32-vax.c,
2698 * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c,
2699 * elf64-mmix.c, * elf64-s390.c, * elf64-sh64.c, * elf64-x86-64.c,
2700 * elfcode.h, * elfcore.h, * elflink.c, * elfnn-aarch64.c,
2701 * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-mips.c, * elfxx-sparc.c,
2702 * elfxx-tilegx.c, * ieee.c, * ihex.c, * mach-o.c, * merge.c, * mmo.c,
2703 * peXXigen.c, * xcofflink.c: Replace use of Lx modifier with PRIx64,
2704 and cast input to uint64_t, and similarly for Ld and Lu.
2705 * bfd-in2.h: Regenerate.
2707 2018-02-19 Alan Modra <amodra@gmail.com>
2709 * elf32-arm.c, * elf32-hppa.c, * elf32-lm32.c, * elf32-m32r.c,
2710 * elf32-metag.c, * elf32-nds32.c, * elf32-or1k.c, * elf32-ppc.c,
2711 * elf32-s390.c, * elf32-sh.c, * elf32-tic6x.c, * elf32-tilepro.c,
2712 * elf64-ppc.c, * elf64-s390.c, * elflink.c, * elfnn-aarch64.c,
2713 * elfnn-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c,
2714 * reloc.c: Replace use of %R and %T in format strings passed to
2715 einfo and friends by %pR and %pT.
2717 2018-02-19 Alan Modra <amodra@gmail.com>
2719 * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Handle %pA and %pB in place
2721 * aout-adobe.c: Update all messages using %A and %B.
2722 * aout-cris.c: Likewise.
2723 * aoutx.h: Likewise.
2724 * archive.c: Likewise.
2725 * binary.c: Likewise.
2726 * cache.c: Likewise.
2727 * coff-alpha.c: Likewise.
2728 * coff-arm.c: Likewise.
2729 * coff-i860.c: Likewise.
2730 * coff-mcore.c: Likewise.
2731 * coff-ppc.c: Likewise.
2732 * coff-rs6000.c: Likewise.
2733 * coff-sh.c: Likewise.
2734 * coff-tic4x.c: Likewise.
2735 * coff-tic54x.c: Likewise.
2736 * coff-tic80.c: Likewise.
2737 * coff64-rs6000.c: Likewise.
2738 * coffcode.h: Likewise.
2739 * coffgen.c: Likewise.
2740 * cofflink.c: Likewise.
2741 * coffswap.h: Likewise.
2742 * compress.c: Likewise.
2743 * cpu-arm.c: Likewise.
2744 * ecoff.c: Likewise.
2745 * elf-attrs.c: Likewise.
2746 * elf-eh-frame.c: Likewise.
2747 * elf-ifunc.c: Likewise.
2748 * elf-m10300.c: Likewise.
2749 * elf-properties.c: Likewise.
2750 * elf-s390-common.c: Likewise.
2752 * elf32-arc.c: Likewise.
2753 * elf32-arm.c: Likewise.
2754 * elf32-avr.c: Likewise.
2755 * elf32-bfin.c: Likewise.
2756 * elf32-cr16.c: Likewise.
2757 * elf32-cr16c.c: Likewise.
2758 * elf32-cris.c: Likewise.
2759 * elf32-crx.c: Likewise.
2760 * elf32-d10v.c: Likewise.
2761 * elf32-d30v.c: Likewise.
2762 * elf32-epiphany.c: Likewise.
2763 * elf32-fr30.c: Likewise.
2764 * elf32-frv.c: Likewise.
2765 * elf32-gen.c: Likewise.
2766 * elf32-hppa.c: Likewise.
2767 * elf32-i370.c: Likewise.
2768 * elf32-i386.c: Likewise.
2769 * elf32-i960.c: Likewise.
2770 * elf32-ip2k.c: Likewise.
2771 * elf32-iq2000.c: Likewise.
2772 * elf32-lm32.c: Likewise.
2773 * elf32-m32c.c: Likewise.
2774 * elf32-m32r.c: Likewise.
2775 * elf32-m68hc11.c: Likewise.
2776 * elf32-m68hc12.c: Likewise.
2777 * elf32-m68hc1x.c: Likewise.
2778 * elf32-m68k.c: Likewise.
2779 * elf32-mcore.c: Likewise.
2780 * elf32-mep.c: Likewise.
2781 * elf32-metag.c: Likewise.
2782 * elf32-microblaze.c: Likewise.
2783 * elf32-moxie.c: Likewise.
2784 * elf32-msp430.c: Likewise.
2785 * elf32-mt.c: Likewise.
2786 * elf32-nds32.c: Likewise.
2787 * elf32-nios2.c: Likewise.
2788 * elf32-or1k.c: Likewise.
2789 * elf32-pj.c: Likewise.
2790 * elf32-ppc.c: Likewise.
2791 * elf32-rl78.c: Likewise.
2792 * elf32-rx.c: Likewise.
2793 * elf32-s390.c: Likewise.
2794 * elf32-score.c: Likewise.
2795 * elf32-score7.c: Likewise.
2796 * elf32-sh-symbian.c: Likewise.
2797 * elf32-sh.c: Likewise.
2798 * elf32-sh64.c: Likewise.
2799 * elf32-sparc.c: Likewise.
2800 * elf32-spu.c: Likewise.
2801 * elf32-tic6x.c: Likewise.
2802 * elf32-tilepro.c: Likewise.
2803 * elf32-v850.c: Likewise.
2804 * elf32-vax.c: Likewise.
2805 * elf32-visium.c: Likewise.
2806 * elf32-wasm32.c: Likewise.
2807 * elf32-xgate.c: Likewise.
2808 * elf32-xtensa.c: Likewise.
2809 * elf64-alpha.c: Likewise.
2810 * elf64-gen.c: Likewise.
2811 * elf64-hppa.c: Likewise.
2812 * elf64-ia64-vms.c: Likewise.
2813 * elf64-mmix.c: Likewise.
2814 * elf64-ppc.c: Likewise.
2815 * elf64-s390.c: Likewise.
2816 * elf64-sh64.c: Likewise.
2817 * elf64-sparc.c: Likewise.
2818 * elf64-x86-64.c: Likewise.
2819 * elfcode.h: Likewise.
2820 * elfcore.h: Likewise.
2821 * elflink.c: Likewise.
2822 * elfnn-aarch64.c: Likewise.
2823 * elfnn-ia64.c: Likewise.
2824 * elfnn-riscv.c: Likewise.
2825 * elfxx-mips.c: Likewise.
2826 * elfxx-sparc.c: Likewise.
2827 * elfxx-tilegx.c: Likewise.
2828 * elfxx-x86.c: Likewise.
2829 * hpux-core.c: Likewise.
2832 * libbfd.c: Likewise.
2833 * linker.c: Likewise.
2834 * mach-o.c: Likewise.
2835 * merge.c: Likewise.
2837 * oasys.c: Likewise.
2838 * pdp11.c: Likewise.
2839 * pe-mips.c: Likewise.
2840 * peXXigen.c: Likewise.
2841 * peicode.h: Likewise.
2842 * reloc.c: Likewise.
2843 * rs6000-core.c: Likewise.
2845 * stabs.c: Likewise.
2846 * vms-alpha.c: Likewise.
2847 * xcofflink.c: Likewise.
2849 2018-02-19 Alan Modra <amodra@gmail.com>
2852 * elf.c (IS_TBSS): Define.
2853 (_bfd_elf_map_sections_to_segments): Use IS_TBSS.
2854 (assign_file_positions_for_non_load_sections): Revert last change.
2855 Properly calculate load segment limits to compare against relro limits.
2857 2018-02-17 Alan Modra <amodra@gmail.com>
2860 * elf.c (assign_file_positions_for_non_load_sections): Ignore
2861 degenerate zero size PT_LOAD segments when finding one overlapping
2862 the PT_GNU_RELRO segment.
2864 2018-02-16 Alan Modra <amodra@gmail.com>
2866 * libbfd.c (_bfd_bool_bfd_false_error): Rename from bfd_false.
2867 (_bfd_bool_bfd_true): Rename from bfd_true.
2868 (_bfd_ptr_bfd_null_error): Rename from bfd_nullvoidptr.
2869 (_bfd_int_bfd_0): Rename from bfd_0.
2870 (_bfd_uint_bfd_0): Rename from bfd_0u.
2871 (_bfd_long_bfd_0): Rename from bfd_0l.
2872 (_bfd_long_bfd_n1_error): Rename from _bfd_n1.
2873 (_bfd_void_bfd): Rename from bfd_void.
2874 (_bfd_bool_bfd_false, _bfd_bool_bfd_asymbol_false),
2875 (_bfd_bool_bfd_link_false_error),
2876 (_bfd_bool_bfd_link_true, _bfd_bool_bfd_bfd_true),
2877 (_bfd_bool_bfd_uint_true, _bfd_bool_bfd_ptr_true),
2878 (_bfd_bool_bfd_asection_bfd_asection_true),
2879 (_bfd_bool_bfd_asymbol_bfd_asymbol_true),
2880 (_bfd_void_bfd_link, _bfd_void_bfd_asection): New functions.
2881 * archive.c (_bfd_noarchive_get_elt_at_index),
2882 (_bfd_noarchive_openr_next_archived_file),
2883 (_bfd_noarchive_construct_extended_name_table),
2884 (_bfd_noarchive_write_ar_hdr, _bfd_noarchive_truncate_arname),
2885 (_bfd_noarchive_write_armap): New functions.
2886 * archures.c (_bfd_nowrite_set_arch_mach): New function.
2887 * coff-alpha.c (alpha_ecoff_swap_coff_aux_in),
2888 (alpha_ecoff_swap_coff_sym_in, alpha_ecoff_swap_coff_lineno_in),
2889 (alpha_ecoff_swap_coff_aux_out, alpha_ecoff_swap_coff_sym_out),
2890 (alpha_ecoff_swap_coff_lineno_out),
2891 (alpha_ecoff_swap_coff_reloc_out): New functions.
2892 * coff-mips.c (mips_ecoff_swap_coff_aux_in),
2893 (mips_ecoff_swap_coff_sym_in, mips_ecoff_swap_coff_lineno_in),
2894 (mips_ecoff_swap_coff_aux_out, mips_ecoff_swap_coff_sym_out),
2895 (mips_ecoff_swap_coff_lineno_out),
2896 (mips_ecoff_swap_coff_reloc_out): New functions.
2897 * coffcode.h (coff_set_alignment_hook): Replace define with
2899 (symname_in_debug_hook): Likewise.
2900 * ecoff.c (_bfd_ecoff_set_alignment_hook): New function.
2901 * elfxx-target.h (elf_backend_allow_non_load_phdr): Default to 0.
2902 * elf.c (assign_file_positions_except_relocs): Test
2903 elf_backend_allow_non_load_phdr for NULL.
2904 * elflink.c (_bfd_elf_omit_section_dynsym_default): Rename from
2905 _bfd_elf_link_omit_section_dynsym. Update uses.
2906 (_bfd_elf_omit_section_dynsym_all): New function.
2907 * elf-bfd.h (_bfd_elf_link_omit_section_dynsym): Delete.
2908 (_bfd_elf_omit_section_dynsym_default): Declare.
2909 (_bfd_elf_omit_section_dynsym_all): Declare.
2910 * linker.c (_bfd_nolink_sizeof_headers, _bfd_nolink_bfd_relax_section),
2911 (_bfd_nolink_bfd_get_relocated_section_contents),
2912 (_bfd_nolink_bfd_lookup_section_flags),
2913 (_bfd_nolink_bfd_is_group_section, _bfd_nolink_bfd_discard_group),
2914 (_bfd_nolink_bfd_link_hash_table_create),
2915 (_bfd_nolink_bfd_link_just_syms),
2916 (_bfd_nolink_bfd_copy_link_hash_symbol_type),
2917 (_bfd_nolink_bfd_link_split_section),
2918 (_bfd_nolink_section_already_linked),
2919 (_bfd_nolink_bfd_define_common_symbol),
2920 (_bfd_nolink_bfd_define_start_stop): New functions.
2921 * reloc.c (_bfd_norelocs_bfd_reloc_type_lookup),
2922 (_bfd_norelocs_bfd_reloc_name_lookup),
2923 (_bfd_nodynamic_canonicalize_dynamic_reloc): New functions.
2924 * section.c (_bfd_nowrite_set_section_contents): New function.
2925 * syms.c (_bfd_nosymbols_canonicalize_symtab),
2926 (_bfd_nosymbols_print_symbol, _bfd_nosymbols_get_symbol_info),
2927 (_bfd_nosymbols_get_symbol_version_string),
2928 (_bfd_nosymbols_bfd_is_local_label_name),
2929 (_bfd_nosymbols_get_lineno, _bfd_nosymbols_find_nearest_line),
2930 (_bfd_nosymbols_find_line, _bfd_nosymbols_find_inliner_info),
2931 (_bfd_nosymbols_bfd_make_debug_symbol),
2932 ( _bfd_nosymbols_read_minisymbols),
2933 ( _bfd_nosymbols_minisymbol_to_symbol),
2934 (_bfd_nodynamic_get_synthetic_symtab): New functions.
2935 * libbfd-in.h: Declare new functions. Update existing defines,
2937 * aix386-core.c: Update to use new hooks. Formatting.
2938 * aout-adobe.c: Likewise.
2939 * aout-arm.c: Likewise.
2940 * aout-target.h: Likewise.
2941 * aout-tic30.c: Likewise.
2942 * aoutf1.h: Likewise.
2943 * binary.c: Likewise.
2945 * cisco-core.c: Likewise.
2946 * coff-alpha.c: Likewise.
2947 * coff-i386.c: Likewise.
2948 * coff-i860.c: Likewise.
2949 * coff-i960.c: Likewise.
2950 * coff-ia64.c: Likewise.
2951 * coff-mips.c: Likewise.
2952 * coff-ppc.c: Likewise.
2953 * coff-rs6000.c: Likewise.
2954 * coff-sh.c: Likewise.
2955 * coff-tic30.c: Likewise.
2956 * coff-tic54x.c: Likewise.
2957 * coff-x86_64.c: Likewise.
2958 * coff64-rs6000.c: Likewise.
2959 * coffcode.h: Likewise.
2960 * elf-m10300.c: Likewise.
2961 * elf32-cr16.c: Likewise.
2962 * elf32-lm32.c: Likewise.
2963 * elf32-m32r.c: Likewise.
2964 * elf32-metag.c: Likewise.
2965 * elf32-score.c: Likewise.
2966 * elf32-score7.c: Likewise.
2967 * elf32-tilepro.c: Likewise.
2968 * elf32-xstormy16.c: Likewise.
2969 * elf32-xtensa.c: Likewise.
2970 * elf64-alpha.c: Likewise.
2971 * elf64-hppa.c: Likewise.
2972 * elf64-ia64-vms.c: Likewise.
2973 * elf64-mmix.c: Likewise.
2974 * elf64-sh64.c: Likewise.
2975 * elfnn-ia64.c: Likewise.
2976 * elfxx-sparc.c: Likewise.
2977 * elfxx-target.h: Likewise.
2978 * elfxx-tilegx.c: Likewise.
2979 * elfxx-x86.h: Likewise.
2980 * hp300hpux.c: Likewise.
2981 * hppabsd-core.c: Likewise.
2982 * hpux-core.c: Likewise.
2983 * i386msdos.c: Likewise.
2984 * i386os9k.c: Likewise.
2987 * irix-core.c: Likewise.
2988 * libaout.h: Likewise.
2989 * libecoff.h: Likewise.
2990 * mach-o-target.c: Likewise.
2991 * mach-o.c: Likewise.
2992 * mipsbsd.c: Likewise.
2994 * netbsd-core.c: Likewise.
2995 * nlm-target.h: Likewise.
2996 * oasys.c: Likewise.
2997 * osf-core.c: Likewise.
2998 * pdp11.c: Likewise.
2999 * pe-mips.c: Likewise.
3000 * pe-x86_64.c: Likewise.
3002 * plugin.c: Likewise.
3003 * ppcboot.c: Likewise.
3004 * ptrace-core.c: Likewise.
3005 * sco5-core.c: Likewise.
3007 * sparclynx.c: Likewise.
3009 * tekhex.c: Likewise.
3010 * trad-core.c: Likewise.
3011 * verilog.c: Likewise.
3012 * versados.c: Likewise.
3013 * vms-alpha.c: Likewise.
3014 * vms-lib.c: Likewise.
3015 * wasm-module.c: Likewise.
3017 * libbfd.h: Regenerate.
3019 2018-02-15 Jim Wilson <jimw@sifive.com>
3021 * elfnn-riscv.c (_bfd_riscv_relax_section): Ifdef out check to ignore
3022 symbols whose section address is zero.
3024 * elfnn-riscv.c (riscv_elf_relocate_section): Use bfd_reloc_dangerous
3025 when pcrel_lo reloc has an addend. Use reloc_dangerous callback for
3026 bfd_reloc_dangerous. Use einfo instead of warning callback for errors.
3027 Add %X%P to error messages.
3029 2018-02-15 Eric Botcazou <ebotcazou@adacore.com>
3032 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
3033 Pass FALSE instead of TRUE as 'create' argument to bfd_link_hash_lookup
3034 and assert that the result of the call is not NULL.
3036 2018-02-14 Nick Clifton <nickc@redhat.com>
3039 Revert previous delta. Add extra casts to avoid compile time
3041 * libbfd-in.h (_bfd_generic_bfd_copy_private_bfd_data): Add extra
3042 cast to avoid warning from gcc v8 compiler.
3043 (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
3044 (_bfd_generic_bfd_set_private_flags): Likewise.
3045 (_bfd_generic_bfd_copy_private_section_data): Likewise.
3046 (_bfd_generic_bfd_copy_private_symbol_data): Likewise.
3047 (_bfd_generic_bfd_copy_private_header_data): Likewise.
3048 (_bfd_generic_bfd_print_private_bfd_data): Likewise.
3049 (_bfd_noarchive_construct_extended_name_table): Likewise.
3050 (_bfd_noarchive_truncate_arname): Likewise.
3051 (_bfd_noarchive_write_ar_hdr): Likewise.
3052 (_bfd_noarchive_get_elt_at_index): Likewise.
3053 (_bfd_nosymbols_canonicalize_symtab): Likewise.
3054 (_bfd_nosymbols_print_symbol): Likewise.
3055 (_bfd_nosymbols_get_symbol_info): Likewise.
3056 (_bfd_nosymbols_get_symbol_version_string): Likewise.
3057 (_bfd_nosymbols_bfd_is_local_label_name): Likewise.
3058 (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise.
3059 (_bfd_nosymbols_get_lineno): Likewise.
3060 (_bfd_nosymbols_find_nearest_line): Likewise.
3061 (_bfd_nosymbols_find_line): Likewise.
3062 (_bfd_nosymbols_find_inliner_info): Likewise.
3063 (_bfd_nosymbols_bfd_make_debug_symbol): Likewise.
3064 (_bfd_nosymbols_read_minisymbols): Likewise.
3065 (_bfd_nosymbols_minisymbol_to_symbol): Likewise.
3066 (_bfd_norelocs_bfd_reloc_type_lookup): Likewise.
3067 (_bfd_norelocs_bfd_reloc_name_lookup): Likewise.
3068 (_bfd_nowrite_set_arch_mach): Likewise.
3069 (_bfd_nowrite_set_section_contents): Likewise.
3070 (_bfd_nolink_sizeof_headers): Likewise.
3071 (_bfd_nolink_bfd_get_relocated_section_contents): Likewise.
3072 (_bfd_nolink_bfd_relax_section): Likewise.
3073 (_bfd_nolink_bfd_gc_sections): Likewise.
3074 (_bfd_nolink_bfd_lookup_section_flags): Likewise.
3075 (_bfd_nolink_bfd_merge_sections): Likewise.
3076 (_bfd_nolink_bfd_is_group_section): Likewise.
3077 (_bfd_nolink_bfd_discard_group): Likewise.
3078 (_bfd_nolink_bfd_link_hash_table_create): Likewise.
3079 (_bfd_nolink_bfd_link_add_symbols): Likewise.
3080 (_bfd_nolink_bfd_link_just_syms): Likewise.
3081 (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise.
3082 (_bfd_nolink_bfd_final_link): Likewise.
3083 (_bfd_nolink_bfd_link_split_section): Likewise.
3084 (_bfd_nolink_section_already_linked): Likewise.
3085 (_bfd_nolink_bfd_define_common_symbol): Likewise.
3086 (_bfd_nolink_bfd_define_start_stop): Likewise.
3087 (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise.
3088 (_bfd_nodynamic_get_synthetic_symtab): Likewise.
3089 (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise.
3090 (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise.
3091 * libbfd.c (bfd_false_any): Delete.
3092 (bfd_true_any, bfd_nullvoidptr_any, bfd_0_any): Delete.
3093 (bfd_0u_any, bfd_0l_any, _bfd_n1_any, bfd_void_any): Delete.
3094 * libbfd.h (extern): Regenerate
3095 * aout-target.h (MY_bfd_is_target_special_symbol): Add extra
3096 cast to avoid warning from gcc v8 compiler.
3097 * aout-tic30.c (tic30_aout_set_arch_mach): Likewise.
3098 * binary.c (binary_get_symbol_info): Likewise.
3099 * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
3100 * coff-mips.c (mips_ecoff_backend_data): Likewise.
3101 * coffcode.h (coff_set_alignment_hook): Likewise.
3102 (symname_in_debug_hook): Likewise.
3103 (bfd_coff_backend_data bigobj_swap_table): Likewise.
3104 * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise.
3105 * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise.
3106 * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise.
3107 * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise.
3108 * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise.
3109 * elf32-score.c (elf_backend_omit_section_dynsym): Likewise.
3110 * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise.
3111 * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise.
3112 * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise.
3113 * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise.
3114 * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise.
3115 * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise.
3116 * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise.
3117 * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise.
3118 * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise.
3119 * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise.
3120 (bfd_elfNN_bfd_make_debug_symbol): Likewise.
3121 (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
3122 (bfd_elfNN_bfd_set_private_flags): Likewise.
3123 (bfd_elfNN_bfd_is_target_special_symbol): Likewise.
3124 (elf_backend_init_index_section): Likewise.
3125 (elf_backend_allow_non_load_phdr): Likewise.
3126 * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise.
3127 * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise.
3128 * ieee.c (ieee_construct_extended_name_table): Likewise.
3129 (ieee_write_armap): Likewise.
3130 (ieee_write_ar_hdr): Likewise.
3131 (ieee_bfd_is_target_special_symbol): Likewise.
3132 * ihex.c (ihex_canonicalize_symtab): Likewise.
3133 (ihex_bfd_is_target_special_symbol): Likewise.
3134 * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise.
3135 * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise.
3136 (_bfd_ecoff_set_alignment_hook): Likewise.
3137 * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise.
3138 * mmo.c (mmo_bfd_is_target_special_symbol): Likewise.
3139 * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise.
3140 * oasys.c (oasys_construct_extended_name_table): Likewise.
3141 (oasys_write_armap): Likewise.
3142 (oasys_write_ar_hdr): Likewise.
3143 (oasys_bfd_is_target_special_symbol): Likewise.
3144 * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise.
3145 * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise.
3146 * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise.
3147 * som.c (som_bfd_is_target_special_symbol): Likewise.
3148 * srec.c (srec_bfd_is_target_special_symbol): Likewise.
3149 * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise.
3150 * verilog.c (verilog_bfd_is_target_special_symbol): Likewise.
3151 * versados.c (versados_bfd_is_target_special_symbol): Likewise.
3152 (versados_bfd_reloc_name_lookup): Likewise.
3153 * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise.
3154 (vms_bfd_define_start_stop): Likewise.
3155 (alpha_vms_bfd_is_target_special_symbol): Likewise.
3156 * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise.
3157 * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise.
3159 2018-02-14 H.J. Lu <hongjiu.lu@intel.com>
3162 * elf32-i386.c (elf_i386_check_relocs): Pass FALSE for non
3163 PC-relative PLT to NEED_DYNAMIC_RELOCATION_P.
3164 * elf64-x86-64.c (elf_x86_64_check_relocs): Create PLT for
3165 R_X86_64_PC32 reloc against dynamic function in data section.
3166 Pass TRUE for PC-relative PLT to NEED_DYNAMIC_RELOCATION_P.
3167 (elf_x86_64_relocate_section): Use PLT for R_X86_64_PC32 reloc
3168 against dynamic function in data section.
3169 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Use PLT in PIE as
3170 function address only if pcrel_plt is true.
3171 (_bfd_x86_elf_link_hash_table_create): Set pcrel_plt.
3172 * elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): Add PCREL_PLT for
3173 PC-relative PLT. If PLT is PC-relative, don't generate dynamic
3174 PC-relative relocation against a function definition in data
3175 secton in PIE. Remove the obsolete comments.
3176 (elf_x86_link_hash_table): Add pcrel_plt.
3178 2018-02-13 H.J. Lu <hongjiu.lu@intel.com>
3180 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Check bfd_link_dll,
3181 instead of bfd_link_pic, for building shared library.
3183 2018-02-13 H.J. Lu <hongjiu.lu@intel.com>
3186 * elf64-x86-64.c (is_32bit_relative_branch): Removed.
3187 (elf_x86_64_relocate_section): Check PIC relocations in PIE.
3188 Remove is_32bit_relative_branch usage. Disallow PC32 reloc
3189 against protected function in shared object.
3191 2018-02-13 Sergei Trofimovich <slyfox@inbox.ru>
3194 * po/ru.po: Fix typo in Russian translation.
3196 2018-02-13 Maciej W. Rozycki <macro@mips.com>
3198 * wasm-module.c (wasm_scan_name_function_section): Rename
3199 `index' local variable to `idx'.
3201 2018-02-13 Nick Clifton <nickc@redhat.com>
3204 Fix compile time warnings generated by gcc version 8.
3205 * libbfd-in.h: Remove extraneous text from prototypes.
3206 Add prototypes for bfd_false_any, bfd_true_any,
3207 bfd_nullvoidptr_any, bfd_0_any, bfd_0u_any, bfd_0l_any,
3208 bfd_n1_any, bfd_void_any.
3209 (_bfd_generic_bfd_copy_private_bfd_data): Use vararg based dummy
3211 (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
3212 (_bfd_generic_bfd_set_private_flags): Likewise.
3213 (_bfd_generic_bfd_copy_private_section_data): Likewise.
3214 (_bfd_generic_bfd_copy_private_symbol_data): Likewise.
3215 (_bfd_generic_bfd_copy_private_header_data): Likewise.
3216 (_bfd_generic_bfd_print_private_bfd_data): Likewise.
3217 (_bfd_noarchive_construct_extended_name_table): Likewise.
3218 (_bfd_noarchive_truncate_arname): Likewise.
3219 (_bfd_noarchive_write_ar_hdr): Likewise.
3220 (_bfd_noarchive_get_elt_at_index): Likewise.
3221 (_bfd_nosymbols_canonicalize_symtab): Likewise.
3222 (_bfd_nosymbols_print_symbol): Likewise.
3223 (_bfd_nosymbols_get_symbol_info): Likewise.
3224 (_bfd_nosymbols_get_symbol_version_string): Likewise.
3225 (_bfd_nosymbols_bfd_is_local_label_name): Likewise.
3226 (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise.
3227 (_bfd_nosymbols_get_lineno): Likewise.
3228 (_bfd_nosymbols_find_nearest_line): Likewise.
3229 (_bfd_nosymbols_find_line): Likewise.
3230 (_bfd_nosymbols_find_inliner_info): Likewise.
3231 (_bfd_nosymbols_bfd_make_debug_symbol): Likewise.
3232 (_bfd_nosymbols_read_minisymbols): Likewise.
3233 (_bfd_nosymbols_minisymbol_to_symbol): Likewise.
3234 (_bfd_norelocs_bfd_reloc_type_lookup): Likewise.
3235 (_bfd_norelocs_bfd_reloc_name_lookup): Likewise.
3236 (_bfd_nowrite_set_arch_mach): Likewise.
3237 (_bfd_nowrite_set_section_contents): Likewise.
3238 (_bfd_nolink_sizeof_headers): Likewise.
3239 (_bfd_nolink_bfd_get_relocated_section_contents): Likewise.
3240 (_bfd_nolink_bfd_relax_section): Likewise.
3241 (_bfd_nolink_bfd_gc_sections): Likewise.
3242 (_bfd_nolink_bfd_lookup_section_flags): Likewise.
3243 (_bfd_nolink_bfd_merge_sections): Likewise.
3244 (_bfd_nolink_bfd_is_group_section): Likewise.
3245 (_bfd_nolink_bfd_discard_group): Likewise.
3246 (_bfd_nolink_bfd_link_hash_table_create): Likewise.
3247 (_bfd_nolink_bfd_link_add_symbols): Likewise.
3248 (_bfd_nolink_bfd_link_just_syms): Likewise.
3249 (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise.
3250 (_bfd_nolink_bfd_final_link): Likewise.
3251 (_bfd_nolink_bfd_link_split_section): Likewise.
3252 (_bfd_nolink_section_already_linked): Likewise.
3253 (_bfd_nolink_bfd_define_common_symbol): Likewise.
3254 (_bfd_nolink_bfd_define_start_stop): Likewise.
3255 (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise.
3256 (_bfd_nodynamic_get_synthetic_symtab): Likewise.
3257 (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise.
3258 (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise.
3259 * libbfd.c (bfd_false_any): New function. Like bfd_false but
3260 accepts one or more arguments.
3261 (bfd_true_any): Likewise.
3262 (bfd_nullvoidptr_any): Likewise.
3263 (bfd_0_any): Likewise.
3264 (bfd_0u_any): Likewise.
3265 (bfd_0l_any): Likewise.
3266 (_bfd_n1_any): Likewise.
3267 (bfd_void_any): Likewise.
3268 * libbfd.h (extern): Regenerate
3269 * aout-target.h (MY_bfd_is_target_special_symbol): Use vararg
3270 based dummy function.
3271 * aout-tic30.c (tic30_aout_set_arch_mach): Likewise.
3272 * binary.c (binary_get_symbol_info): Likewise.
3273 * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
3274 * coff-mips.c (mips_ecoff_backend_data): Likewise.
3275 * coffcode.h (coff_set_alignment_hook): Likewise.
3276 (symname_in_debug_hook): Likewise.
3277 (bfd_coff_backend_data bigobj_swap_table): Likewise.
3278 * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise.
3279 * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise.
3280 * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise.
3281 * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise.
3282 * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise.
3283 * elf32-score.c (elf_backend_omit_section_dynsym): Likewise.
3284 * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise.
3285 * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise.
3286 * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise.
3287 * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise.
3288 * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise.
3289 * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise.
3290 * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise.
3291 * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise.
3292 * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise.
3293 * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise.
3294 (bfd_elfNN_bfd_make_debug_symbol): Likewise.
3295 (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
3296 (bfd_elfNN_bfd_set_private_flags): Likewise.
3297 (bfd_elfNN_bfd_is_target_special_symbol): Likewise.
3298 (elf_backend_init_index_section): Likewise.
3299 (elf_backend_allow_non_load_phdr): Likewise.
3300 * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise.
3301 * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise.
3302 * ieee.c (ieee_construct_extended_name_table): Likewise.
3303 (ieee_write_armap): Likewise.
3304 (ieee_write_ar_hdr): Likewise.
3305 (ieee_bfd_is_target_special_symbol): Likewise.
3306 * ihex.c (ihex_canonicalize_symtab): Likewise.
3307 (ihex_bfd_is_target_special_symbol): Likewise.
3308 * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise.
3309 * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise.
3310 (_bfd_ecoff_set_alignment_hook): Likewise.
3311 * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise.
3312 * mmo.c (mmo_bfd_is_target_special_symbol): Likewise.
3313 * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise.
3314 * oasys.c (oasys_construct_extended_name_table): Likewise.
3315 (oasys_write_armap): Likewise.
3316 (oasys_write_ar_hdr): Likewise.
3317 (oasys_bfd_is_target_special_symbol): Likewise.
3318 * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise.
3319 * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise.
3320 * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise.
3321 * som.c (som_bfd_is_target_special_symbol): Likewise.
3322 * srec.c (srec_bfd_is_target_special_symbol): Likewise.
3323 * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise.
3324 * verilog.c (verilog_bfd_is_target_special_symbol): Likewise.
3325 * versados.c (versados_bfd_is_target_special_symbol): Likewise.
3326 (versados_bfd_reloc_name_lookup): Likewise.
3327 * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise.
3328 (vms_bfd_define_start_stop): Likewise.
3329 (alpha_vms_bfd_is_target_special_symbol): Likewise.
3330 * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise.
3331 * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise.
3332 * elf32-arc.c (get_replace_function): Assign replacement function
3334 * elf32-i370.c (i370_noop): Update prototype.
3336 2018-02-13 Alan Modra <amodra@gmail.com>
3339 * elf.c (_bfd_elf_fixup_group_sections): Account for removed
3340 relocation sections. If size reduces to just the flag word,
3341 remove that too and mark with SEC_EXCLUDE.
3342 * elflink.c (bfd_elf_final_link): Strip empty group sections.
3344 2018-02-13 Alan Modra <amodra@gmail.com>
3347 * elf.c (assign_file_positions_for_non_load_sections): Rewrite
3350 2018-02-12 Zebediah Figura <z.figura12@gmail.com>
3352 * i386msdos.c (msdos_mkobject); New function.
3353 (msdos_object_p): New function.
3354 (i386_msdos_vec): Use msdos_object_p as the check_format
3356 * peicode.h: Rename external_PEI_DOS_hdr, DOSMAGIC, and
3357 NT_SIGNATURE to external_DOS_hdr, IMAGE_DOS_SIGNATURE, and
3359 * peXXigen.c: Likewise.
3360 * coff-ia64.c: Likewise.
3362 2018-02-12 Nick Clifton <nickc@redhat.com>
3364 * elf32-nds32.c (nds32_elf_relax_longjump3): Remove redundant
3366 * elf32-arc.c (elf_arc_relocate_section): Likewise.
3368 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
3370 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Reorder conditions.
3371 (sparc_elf_append_rela): Assert that there is enough room in section.
3372 (_bfd_sparc_elf_copy_indirect_symbol): Fix formatting.
3373 (_bfd_sparc_elf_adjust_dynamic_symbol): Minor tweak.
3374 (allocate_dynrelocs): Remove outdated comments and reorder conditions.
3375 For a symbol subject to a GOT relocation, reserve a slot in the
3376 relocation section if the symbol isn't dynamic and we are in PIC mode.
3377 (_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: If relocation
3378 is relaxed and a slot was reserved, generate a R_SPARC_NONE relocation.
3379 <R_SPARC_GOTDATA_OP_HIX22>: Adjust comments.
3380 <R_SPARC_PC10>: Reorder conditions. Remove always-false assertion.
3381 (_bfd_sparc_elf_finish_dynamic_symbol): Rename local_undefweak into
3382 resolved_to_zero. Do not generate a dynamic GOT relocation for an
3383 undefined weak symbol with non-default visibility. Remove superfluous
3384 'else' and fix formatting.
3386 2018-02-09 H.J. Lu <hongjiu.lu@intel.com>
3388 * elf32-i386.c (elf_i386_get_synthetic_symtab): Also handle
3390 (i386_elf32_sol2_vec): Don't declare.
3391 (elf_i386_link_setup_gnu_properties): Also handle is_solaris.
3392 Don't set need_global_offset_table.
3393 (elf_i386_solaris_arch_bed): New.
3394 (elf_backend_arch_data): Set to elf_i386_solaris_arch_bed for
3396 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Check
3397 target_os != is_nacl instead of target_os == is_normal.
3398 (x86_64_elf64_sol2_vec): Don't declare.
3399 (elf_x86_64_link_setup_gnu_properties): Check target_os !=
3400 is_nacl instead of target_os == is_normal. Don't set
3401 need_global_offset_table.
3402 (elf_x86_64_solaris_arch_bed): New.
3403 (elf_backend_arch_data): Set to elf_x86_64_solaris_arch_bed for
3405 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep
3406 _GLOBAL_OFFSET_TABLE_ for Solaris.
3407 (_bfd_x86_elf_link_setup_gnu_properties): Don't copy
3408 need_global_offset_table.
3409 * elfxx-x86.h (elf_x86_target_os): Add is_solaris.
3410 (elf_x86_link_hash_table): Remove need_global_offset_table.
3411 (elf_x86_init_table): Likewise.
3413 2018-02-08 H.J. Lu <hongjiu.lu@intel.com>
3415 * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
3417 (i386_elf32_sol2_vec): Declared.
3418 (elf_i386_link_setup_gnu_properties): Set
3419 need_global_offset_table with info->output_bfd->xvec.
3420 * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
3422 (x86_64_elf64_sol2_vec): Declared.
3423 (elf_x86_64_link_setup_gnu_properties): Set
3424 need_global_offset_table with info->output_bfd->xvec.
3426 2018-02-08 H.J. Lu <hongjiu.lu@intel.com>
3428 * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
3430 (elf_i386_link_setup_gnu_properties): Set need_global_offset_table
3432 * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
3434 (elf_x86_64_link_setup_gnu_properties): Set
3435 need_global_offset_table for Solaris.
3436 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep the
3437 unused _GLOBAL_OFFSET_TABLE_ for Solaris.
3438 (_bfd_x86_elf_link_setup_gnu_properties): Copy
3439 need_global_offset_table.
3440 * elfxx-x86.h (elf_x86_link_hash_table): Add
3441 need_global_offset_table.
3442 (elf_x86_init_table): Likewise.
3444 2018-02-08 Jim Wilson <jimw@sifive.com>
3446 * elfnn-riscv.c (riscv_elf_relocate_section): Add comment for previous
3449 2018-02-08 Nick Clifton <nickc@redhat.com>
3452 * elf.c (elf_parse_notes): Reject notes with excessuively large
3455 2018-02-07 Alan Modra <amodra@gmail.com>
3457 Revert 2018-01-17 Alan Modra <amodra@gmail.com>
3458 * elf32-ppc.c: Remove speculation barrier support.
3459 * elf32-ppc.h: Likewise.
3460 * elf64-ppc.c: Likewise.
3461 * elf64-ppc.h: Likewise.
3463 2018-02-06 Jim Wilson <jimw@sifive.com>
3465 * elfnn-riscv.c (riscv_elf_relocate_section): Return TRUE if used
3466 callback to report an error.
3468 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
3471 * elfxx-sparc.c (sparc_elf_tls_transition): Turn call to bfd_link_pic
3472 into call to !bfd_link_executable and tidy up.
3473 (_bfd_sparc_elf_check_relocs): Fix formatting and tidy up.
3474 <R_SPARC_TLS_LE_HIX22>: Turn call to bfd_link_pic into call to
3475 !bfd_link_executable.
3476 <R_SPARC_TLS_IE_HI22>: Likewise.
3477 <GOT relocations>: Remove useless code, tidy and merge related blocks.
3478 <R_SPARC_TLS_GD_CALL>: Turn call to bfd_link_pic into call to
3479 !bfd_link_executable.
3480 <R_SPARC_WPLT30>: Tidy up.
3481 (_bfd_sparc_elf_gc_mark_hook): Turn call to bfd_link_pic into call to
3482 !bfd_link_executable.
3483 (allocate_dynrelocs): Likewise.
3484 (_bfd_sparc_elf_relocate_section): Fix formatting and tidy up.
3485 <R_SPARC_TLS_GD_HI22>: Merge into...
3486 <R_SPARC_TLS_GD_LO10>: ...this. Adjust 4th argument in call to
3487 sparc_elf_tls_transition and remove redundant code.
3488 <R_SPARC_TLS_LDM_HI22>: Turn call to bfd_link_pic into call to
3489 !bfd_link_executable.
3490 <R_SPARC_TLS_LDO_HIX22>: Likewise.
3491 <R_SPARC_TLS_LE_HIX22>: Likewise. Tidy up.
3492 <R_SPARC_TLS_LDM_CALL>: Likewise.
3493 <R_SPARC_TLS_GD_CALL>: Likewise. Tidy up.
3494 <R_SPARC_TLS_GD_ADD>: Likewise.
3495 <R_SPARC_TLS_LDM_ADD>: Likewise.
3496 <R_SPARC_TLS_LDO_ADD>: Likewise.
3497 <R_SPARC_TLS_IE_LD>: Likewise.
3499 2018-02-06 Miloš Stojanović <milos.stojanovic@rt-rk.com>
3502 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): If the dwarf
3503 functions failed to find the function name, try the generic elf
3504 find function instead.
3506 2018-02-06 Sergio Durigan Junior <sergiodj@redhat.com>
3508 * coff-rs6000.c (xcoff_write_archive_contents_old): Use
3509 'memcpy' instead of 'strncpy' when writing the magic number.
3511 2018-02-06 Nick Clifton <nickc@redhat.com>
3514 * opncls.c (bfd_get_debug_link_info_1): Check the size of the
3515 section before attempting to read it in.
3516 (bfd_get_alt_debug_link_info): Likewise.
3518 2018-02-06 Paul Carroll <pcarroll@codesourcery.com>
3520 * bfd/dwarf2.c (find_abstract_name): Modified to return file and
3521 line information in addition to name, if they can be found.
3523 2018-02-05 Renlin Li <renlin.li@arm.com>
3526 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Relax the
3527 R_AARCH64_ABS32 and R_AARCH64_ABS16 for absolute symbol. Apply the
3528 check for writeable section as well.
3530 2018-02-05 H.J. Lu <hongjiu.lu@intel.com>
3533 * elf32-i386.c (elf_i386_check_relocs): Set got_referenced if
3534 _GLOBAL_OFFSET_TABLE_ is referenced or GOT is needed to resolve
3535 undefined weak symbol to 0.
3536 * elf64-x86-64.c (elf_x86_64_check_relocs): Set got_referenced
3537 if _GLOBAL_OFFSET_TABLE_ is referenced.
3538 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Check
3539 got_referenced instead of ref_regular_nonweak. Remove the
3540 unused _GLOBAL_OFFSET_TABLE_ from symbol table.
3541 * elfxx-x86.h (elf_x86_link_hash_table): Add got_referenced.
3543 2018-02-05 Maciej W. Rozycki <macro@mips.com>
3545 * elfnn-riscv.c (_bfd_riscv_relax_pc): Use `memset' to
3546 initialize `hi_reloc'.
3548 2018-02-05 Maciej W. Rozycki <macro@mips.com>
3550 * elfxx-mips.c (_bfd_mips_elf_section_processing): For
3551 SHT_MIPS_REGINFO sections don't assert the correct size and
3552 report an error instead.
3554 2018-02-05 Maciej W. Rozycki <macro@mips.com>
3556 * elf.c (_bfd_elf_write_object_contents): Propagate a failure
3557 status from `->elf_backend_section_processing'.
3559 2018-02-02 Jim Wilson <jimw@sifive.com>
3562 * elfnn-riscv.c (riscv_relax_delete_bytes): New parameter link_info.
3563 If link_info->wrap_hash, check for a duplicate symbol and ignore.
3564 (_bfd_riscv_relax_call, bfd_riscv_relax_lui, _bfd_riscv_relax_tls_le):
3565 Pass new argument to riscv_relax_delete_bytes.
3566 (_bfd_riscv_relax_align, _bfd_riscv_relax_delete): Likewise. Remove
3567 ATTRIBUTE_UNUSED from link_info parameter.
3569 2018-02-02 Alan Modra <amodra@gmail.com>
3571 * elf64-ppc.c (ppc64_elf_relocate_section): Don't relocate nops
3572 emitted for toc sequence optimization. Set and use "howto" later.
3574 2018-02-01 Simon Marchi <simon.marchi@ericsson.com>
3576 * elf64-ppc.c (ppc64_elf_archive_symbol_lookup): Avoid pointer
3577 arithmetic on NULL pointer.
3578 * elflink.c (_bfd_elf_archive_symbol_lookup,
3579 elf_link_add_archive_symbols): Likewise.
3581 2018-01-31 Michael Matz <matz@suse.de>
3583 * elflink.c (bfd_elf_define_start_stop): Fix check of
3586 2018-01-31 H.J. Lu <hongjiu.lu@intel.com>
3589 * elflink.c (bfd_elf_define_start_stop): Check if __start and
3590 __stop symbols are referenced by shared objects.
3592 2018-01-30 Alan Modra <amodra@gmail.com>
3595 * elf.c (_bfd_elf_map_sections_to_segments): Don't start a new
3596 segment when demand paged with lma on the same page. Test this
3597 before load/non-load, executable/non-executable,
3598 writable/non-writable tests and simplify. Delete bogus relro
3599 condition in writable/non-writable test. Delete outdated
3600 comment. Formatting.
3602 2018-01-30 Alan Modra <amodra@gmail.com>
3604 * elflink.c (bfd_elf_define_start_stop): Make __start and __stop
3607 2018-01-29 Alan Modra <amodra@gmail.com>
3610 * coffgen.c (coff_pointerize_aux): Ensure auxent tagndx is in
3611 range before converting to a symbol table pointer.
3613 2018-01-27 Nick Clifton <nickc@redhat.com>
3615 * po/ru.po: Updated Russian translation.
3617 2018-01-26 Alan Modra <amodra@gmail.com>
3619 * elflink.c (bfd_elf_define_start_stop): Override symbols when
3620 they are defined dynamically.
3622 2018-01-26 Alan Modra <amodra@gmail.com>
3624 * elf64-ppc.c (ppc64_elf_size_stubs): Iterate sizing when
3625 .branch_lt changes size.
3627 2018-01-25 Alan Modra <amodra@gmail.com>
3630 * elfcode.h (elf_object_p): Avoid integer overflow.
3632 2018-01-25 Eric Botcazou <ebotcazou@adacore.com>
3635 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
3636 Do a mere lookup of the __tls_get_addr symbol instead of adding it.
3639 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
3642 * elfxx-sparc.c (sparc_elf_tls_transition): Replace
3643 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
3644 bfd_link_executable for TLS check.
3645 (_bfd_sparc_elf_check_relocs): Likewise.
3646 (allocate_dynrelocs): Likewise.
3647 (_bfd_sparc_elf_relocate_section): Likewise.
3649 2018-01-24 Renlin Li <renlin.li@arm.com>
3651 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Add support for
3652 BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
3653 BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
3654 BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
3655 BFD_RELOC_AARCH64_MOVW_PREL_G3.
3656 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
3657 (_bfd_aarch64_elf_resolve_relocation): Likewise.
3659 2018-01-24 Renlin Li <renlin.li@arm.com>
3661 * reloc.c: Add BFD_RELOC_AARCH64_MOVW_PREL_G0,
3662 BFD_RELOC_AARCH64_MOVW_PREL_G0_NC, BFD_RELOC_AARCH64_MOVW_PREL_G1,
3663 BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, BFD_RELOC_AARCH64_MOVW_PREL_G2,
3664 BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, BFD_RELOC_AARCH64_MOVW_PREL_G3.
3665 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add entries for
3666 BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
3667 BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
3668 BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
3669 BFD_RELOC_AARCH64_MOVW_PREL_G3.
3670 * bfd-in2.h: Regenerate.
3671 * libbfd.h: Regenerate.
3673 2018-01-23 Maciej W. Rozycki <macro@mips.com>
3675 * elfxx-mips.c (_bfd_mips_elf_final_link): Update a stale
3676 `mips_elf32_section_processing' comment reference.
3678 2018-01-20 H.J. Lu <hongjiu.lu@intel.com>
3681 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Check the
3682 versioned __tls_get_addr symbol.
3684 2018-01-19 Nick Clifton <nickc@redhat.com>
3686 * po/fr.po: Updated French translation.
3688 2018-01-18 Alan Modra <amodra@gmail.com>
3690 * elf32-ppc.c (ppc_elf_create_glink): Correct alignment of .glink.
3691 * elf64-ppc.c (ppc64_elf_size_stubs): Handle negative plt_stub_align.
3692 (ppc64_elf_build_stubs): Likewise.
3694 2018-01-17 Nick Clifton <nickc@redhat.com>
3696 * po/ru.po: Updated Russian translation.
3697 * po/uk/po: Updated Ukranian translation.
3699 2018-01-17 Alan Modra <amodra@gmail.com>
3701 * elf64-ppc.c (ppc64_elf_build_stubs): Silence gcc warning.
3703 2018-01-17 Alan Modra <amodra@gmail.com>
3705 * elf32-ppc.c (GLINK_ENTRY_SIZE): Handle speculation barrier.
3706 (CRSETEQ, BEQCTRM): Define.
3707 (is_nonpic_glink_stub): Don't check bctr.
3708 (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
3709 (ppc_elf_relax_section): Size speculation barrier.
3710 (output_bctr): New function.
3711 (write_glink_stub): Use output_bctr.
3712 (ppc_elf_relocate_section): Use output_bctr for long branch stub.
3713 (ppc_elf_finish_dynamic_symbol): Likewise.
3714 (ppc_elf_finish_dynamic_sections): Use output_bctr.
3715 * elf32-ppc.h (struct ppc_elf_params): Add speculate_indirect_jumps.
3716 * elf64-ppc.c (CRSETEQ, BEQCTRM, BEQCTRLM): Define.
3717 (GLINK_PLTRESOLVE_SIZE): Size speculation barrier.
3718 (size_global_entry_stubs): Handle speculation barrier sizing.
3719 (plt_stub_size): Likewise.
3720 (output_bctr): New function.
3721 (build_plt_stub, build_tls_get_addr_stub): Output speculation
3723 (ppc_build_one_stub): Likewise for ppc_stub_plt_branch.
3724 (ppc_size_one_stub): Size speculation barrier in ppc_stub_plt_branch.
3725 (build_global_entry_stubs): Output speculation barrier.
3726 (ppc64_elf_build_stubs): Likewise in __glink_PLTresolve stub.
3727 * elf64-ppc.h (struct ppc64_elf_params): Add speculate_indirect_jumps.
3729 2018-01-17 Alan Modra <amodra@gmail.com>
3731 * elf32-ppc.c (GLINK_ENTRY_SIZE): Add parameters, handle
3732 __tls_get_addr_opt, and alignment sizing.
3733 (TLS_GET_ADDR_GLINK_SIZE): Delete.
3734 (is_nonpic_glink_stub): Don't use GLINK_ENTRY_SIZE.
3735 (ppc_elf_get_synthetic_symtab): Recognize stubs spaced at 4, 6,
3737 (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
3738 (allocate_dynrelocs): Use new GLINK_ENTRY_SIZE.
3739 (ppc_elf_size_dynamic_sections): Likewise. Size branch table
3741 (write_glink_stub): Handle __tls_get_addr_opt stub.
3742 Pad out to size given by GLINK_ENTRY_SIZE.
3743 (ppc_elf_relocate_section): Adjust write_glink_stub call.
3744 (ppc_elf_finish_dynamic_symbol): Likewise.
3745 (ppc_elf_finish_dynamic_sections): Write PLTresolve without using
3746 insn array since so many need rewriting.
3747 * elf32-ppc.h (struct ppc_elf_params): Add plt_stub_align.
3748 * elf64-ppc.c (GLINK_PLTRESOLVE_SIZE): Rename from
3749 GLINK_CALL_STUB_SIZE. Add htab param and evaluate to size without
3750 nops. Adjust all uses.
3751 (ppc64_elf_get_synthetic_symtab): Don't use GLINK_CALL_STUB_SIZE
3752 in glink_vma calculation.
3753 (struct ppc_link_hash_table): Add global_entry section pointer.
3754 (create_linkage_sections): Create separate section for global
3756 (PPC_LO, PPC_HI, PPC_HA): Move earlier.
3757 (size_global_entry_stubs): Handle sizing for aligned stubs.
3758 (ppc64_elf_size_dynamic_sections): Handle global_entry alloc,
3759 and don't stash end of glink branch table in rawsize.
3760 (ppc_build_one_stub): Rewrite stub size calculations.
3761 (build_global_entry_stubs): Use new section.
3762 (ppc64_elf_build_stubs): Don't pad __glink_PLTresolve with nops.
3763 Build lazy link stubs out to end of section. Build global entry
3764 stubs in new section.
3766 2018-01-15 Nick Clifton <nickc@redhat.com>
3768 * po/uk.po: Updated Ukranian translation.
3770 2018-01-13 Nick Clifton <nickc@redhat.com>
3772 * po/bfd.pot: Regenerated.
3774 2018-01-13 Nick Clifton <nickc@redhat.com>
3776 * version.m4: Bump version to 2.30.51
3777 * configure: Regenerate.
3779 2018-01-13 Nick Clifton <nickc@redhat.com>
3781 2.30 branch created.
3783 2018-01-12 Jens Widell <jl@opera.com>
3785 * elf.c (setup_group): Optimize search for group by remembering
3786 last found group and restarting search at that index.
3787 * elf-bfd.h (struct elf_obj_tdata): Add group_search_offset field.
3789 2018-01-12 Gunther Nikl <gnikl@users.sourceforge.net>
3791 * aoutx.h (aout_link_check_ar_symbols): Remove default and handle
3792 bfd_link_common_skip_none in switch.
3794 2018-01-12 Alan Modra <amodra@gmail.com>
3797 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Ignore dynamic
3798 references on forced local symbols.
3800 2018-01-12 Vlad Ivanov <vlad@ivanov.email>
3802 * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
3803 .reginfo section has wrong size.
3805 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
3808 * elf.c (_bfd_elf_map_sections_to_segments): When generating
3809 separate code and read-only data LOAD segments, create a new
3810 LOAD segment if the previous section contains text and the
3811 current section doesn't or vice versa. Don't put a writable
3812 section in a read-only segment if there is a RELRO segment.
3814 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
3817 * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Ignore dynamic
3818 references on forced local symbols.
3820 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
3823 * elflink.c (bfd_elf_gc_sections): Keep all PREINIT_ARRAY,
3824 INIT_ARRAY as well as FINI_ARRAY sections for ld -r --gc-section.
3826 2018-01-09 Kuan-Lin Chen <kuanlinchentw@gmail.com>
3829 * elf32-nds32.c (nds32_elf_relax_loadstore): Fix a typographical error.
3831 2018-01-03 John Baldwin <jhb@FreeBSD.org>
3833 * elf.c (elfcore_grok_freebsd_note): Handle
3834 NT_FREEBSD_PROCSTAT_PROC, NT_FREEBSD_PROCSTAT_FILES, and
3835 NT_FREEBSD_PROCSTAT_VMMAP.
3837 2018-01-03 Alan Modra <amodra@gmail.com>
3839 Update year range in copyright notice of all files.
3841 For older changes see ChangeLog-2017
3843 Copyright (C) 2018 Free Software Foundation, Inc.
3845 Copying and distribution of this file, with or without modification,
3846 are permitted in any medium without royalty provided the copyright
3847 notice and this notice are preserved.
3853 version-control: never