1 018-08-31 H.J. Lu <hongjiu.lu@intel.com>
4 * archures.c (bfd_arch_get_compatible): Allow an IR object with
7 2018-08-31 Alan Modra <amodra@gmail.com>
9 * elf64-ppc.c (num_relocs_for_offset): New function.
10 (emit_relocs_for_offset): New function.
11 (use_global_in_relocs): New function, split out from..
12 (ppc_build_one_stub): ..here. Output relocations for notoc stubs.
13 (ppc_size_one_stub): Calculate reloc count for notoc stubs.
14 (ppc64_elf_size_stubs): Don't count undefined syms in stub_globals.
16 2018-08-31 Alan Modra <amodra@gmail.com>
18 * reloc.c (BFD_RELOC_PPC64_REL16_HIGH, BFD_RELOC_PPC64_REL16_HIGHA),
19 (BFD_RELOC_PPC64_REL16_HIGHER, BFD_RELOC_PPC64_REL16_HIGHERA),
20 (BFD_RELOC_PPC64_REL16_HIGHEST, BFD_RELOC_PPC64_REL16_HIGHESTA):
22 * elf64-ppc.c (ppc64_elf_howto_raw): Add new REL16 howtos.
23 (ppc64_elf_reloc_type_lookup): Translate new REL16 relocs.
24 (ppc64_elf_check_relocs, ppc64_elf_relocate_section): Handle them.
25 * bfd-in2.h: Regenerate.
26 * libbfd.h: Regenerate.
28 2018-08-31 Alan Modra <amodra@gmail.com>
30 * elf64-ppc.c: Correct _notoc stub comments.
31 (ppc_build_one_stub): Simplify output of branch for notoc
32 long branch stub. Don't include label offset of 8 bytes in
33 "off" calculation for notoc plt stub. Don't emit insns to get pc.
34 (build_offset): Emit insns to get pc here instead.
35 (size_offset): Add 4 extra insns.
36 (plt_stub_size): Adjust for "off" and size_offset changes.
37 (ppc_size_one_stub): Rearrange code into a switch, duplicating
38 some to better match ppc_build_one_stub.
40 2018-08-29 Chenghua Xu <paul.hua.gm@gmail.com>
42 * archures.c (bfd_architecture): New machine
44 * bfd-in2.h (bfd_architecture): Likewise.
45 * cpu-mips.c (enum I_xxx): Likewise.
46 (arch_info_struct): Likewise.
47 * elfxx-mips.c (_bfd_elf_mips_mach): Handle
49 (mips_set_isa_flags): Likewise.
50 (mips_mach_extensions): Map bfd_mach_mips_gs264e to
51 bfd_mach_mips_gs464e extension.
53 2018-08-29 Chenghua Xu <paul.hua.gm@gmail.com>
55 * archures.c (bfd_architecture): New machine
57 * bfd-in2.h (bfd_architecture): Likewise.
58 * cpu-mips.c (enum I_xxx): Likewise.
59 (arch_info_struct): Likewise.
60 * elfxx-mips.c (_bfd_elf_mips_mach): Handle
62 (mips_set_isa_flags): Likewise.
63 (mips_mach_extensions): Map bfd_mach_mips_gs464e to
64 bfd_mach_mips_gs464 extension.
66 2018-08-29 Chenghua Xu <paul.hua.gm@gmail.com>
68 * archures.c (bfd_architecture): Rename
69 bfd_mach_mips_loongson_3a to bfd_mach_mips_gs464.
70 * bfd-in2.h (bfd_architecture): Likewise.
71 * cpu-mips.c (enum I_xxx): Likewise.
72 (arch_info_struct): Likewise.
73 * elfxx-mips.c (_bfd_elf_mips_mach): Likewise.
74 (mips_set_isa_flags): Likewise.
75 (mips_mach_extensions): Likewise.
76 (bfd_mips_isa_ext_mach): Likewise.
77 (bfd_mips_isa_ext): Likewise.
78 (print_mips_isa_ext): Delete AFL_EXT_LOONGSON_3A.
80 2018-08-29 Chenghua Xu <paul.hua.gm@gmail.com>
82 * elfxx-mips.c (print_mips_ases): Add Loongson EXT2 extension.
84 2018-08-29 Chenghua Xu <paul.hua.gm@gmail.com>
86 * elfxx-mips.c (infer_mips_abiflags): Use ases instead of
87 isa_ext for infer ABI flags.
88 (print_mips_ases): Add Loongson EXT extension.
90 2018-08-29 Chenghua Xu <paul.hua.gm@gmail.com>
92 * elfxx-mips.c (print_mips_ases): Add CAM extension.
94 2018-08-27 H.J. Lu <hongjiu.lu@intel.com>
96 * elfxx-x86.c (_bfd_x86_elf_parse_gnu_properties): Don't mask
97 out the GNU_PROPERTY_X86_UINT32_VALID bit.
99 2018-08-25 H.J. Lu <hongjiu.lu@intel.com>
102 * elf.c (_bfd_elf_get_symbol_version_string): Return
103 _("<corrupt>") for corrupt symbol version info.
105 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
107 * elfxx-x86.c (_bfd_x86_elf_parse_gnu_properties): Handle
108 X86_COMPAT_ISA_1_USED, X86_COMPAT_ISA_1_NEEDED,
109 X86_UINT32_AND_LO, X86_UINT32_AND_HI, X86_UINT32_OR_LO,
110 X86_UINT32_OR_HI, X86_UINT32_OR_AND_LO and X86_UINT32_OR_AND_HI
111 instead of X86_ISA_1_USED, X86_ISA_1_NEEDED and X86_FEATURE_1_AND.
112 (_bfd_x86_elf_merge_gnu_properties): Likewise.
113 (_bfd_x86_elf_link_setup_gnu_properties): Add X86_FEATURE_2_NEEDED
114 instead of X86_ISA_1_NEEDED.
115 (_bfd_x86_elf_link_fixup_gnu_properties): Handle
116 X86_COMPAT_ISA_1_USED, X86_COMPAT_ISA_1_NEEDED, X86_UINT32_AND_LO,
117 X86_UINT32_AND_HI, X86_UINT32_OR_LO, X86_UINT32_OR_HI,
118 X86_UINT32_OR_AND_LO and X86_UINT32_OR_AND_HI instead of
119 X86_ISA_1_USED, X86_ISA_1_NEEDED and X86_FEATURE_1_AND.
121 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
123 * elfxx-x86.c (_bfd_x86_elf_parse_gnu_properties): Mask out the
124 GNU_PROPERTY_X86_UINT32_VALID bit.
125 (_bfd_x86_elf_link_fixup_gnu_properties): Set the
126 GNU_PROPERTY_X86_UINT32_VALID bit for non-relocatable output.
128 2018-08-23 Zenith423 <zenith432@users.sourceforge.net>
131 * plugin.c (struct plugin_list_entry): New structure.
132 (plugin_list): New variable.
133 (try_load_plugin): Place opened plugins on a list. Ensure that
134 the refcount in the dynamic loader is kept at 1.
136 2018-08-23 Alan Modra <amodra@gmail.com>
138 * elf64-ppc.c (ppc64_elf_relocate_section): Revise "call lacks
141 2018-08-23 Nick Clifton <nickc@redhat.com>
143 * elf64-hppa.c (elf_hppa_final_link_relocate): Replace unworkable
144 code with an assertion.
146 2018-08-23 Nick Clifton <nickc@redhat.com>
149 * coffgen.c (coff_pointerize_aux): Add table_end parameter. Use
150 it to prevent walking off the end of the table.
151 (coff_get_normalized_symtab): Pass internal_end pointer to
154 2018-08-23 Alan Modra <amodra@gmail.com>
156 * elf64-ppc.c (ppc64_elf_relocate_section): Don't miss clearing
157 unresolved_reloc on ppc_stub_plt_call_notoc.
159 2018-08-22 H.J. Lu <hongjiu.lu@intel.com>
162 * development.sh (experimental): New.
164 2018-08-22 Helge Deller <deller@gmx.de>
165 Nick Clifton <nickc@redhat.com>
167 * elf-hppa.h (elf_hppa_fake_sections): Use SHT_PARISC_UNWIND as
168 the section type of the .PARISC.unwind section on 64-bit binaries
169 and SHT_PROGBITS for 32-bit binaries. Add a comment about it.
170 Add comment about the sh_entsize value.
172 2018-08-22 Rafeal Auler <rafaelauler@gmail.com>
175 * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Always update the
176 stub's target, since it may have been changed after the layout.
178 2018-08-21 John Darington <john@darrington.wattle.id.au>
180 * elf32-s12z.c (opru18_reloc): New function.
181 (elf_s12z_howto_table): Adjust Howto according to new knowledge.
183 2018-08-21 mephi42 <mephi42@gmail.com>
186 * mach-o.c (bfd_mach_o_mangle_symbols): Update n_type even if
187 data is already considered filled.
189 2018-08-21 Alan Modra <amodra@gmail.com>
191 * elf64-ppc.c (HOW): Define.
193 (ppc64_elf_howto_raw): Use HOW to initialize entries.
194 * elf32-ppc.c (HOW): Define.
195 (ppc_elf_howto_raw): Use HOW to initialize entries, updating
196 R_PPC_VLE_REL15 and R_PPC_VLE_REL24 to use bitpos=0.
198 2018-08-21 Alan Modra <amodra@gmail.com>
200 * reloc.c (reloc_howto_type): Typedef.
201 (bfd_symbol): Delete forward declaration.
202 (struct reloc_howto_struct): Add "negate" field. Make "size",
203 "bitsize", "rightshift", "bitpos", "complain_on_overflow",
204 "pc_relative", "partial_inplace", and "pcrel_offset" bitfields.
205 Rearrange for better packing. Revise comments.
206 (HOWTO): Map to rearranged reloc_howto_struct.
207 (bfd_get_reloc_size): Delete now unused cases.
208 (read_reloc, write_reloc): Likewise.
209 (apply_reloc, _bfd_relocate_contents): Test howto->negate
210 rather than howto->size < 0 for negated relocation values.
211 * coff-rs6000.c (xcoff_complain_overflow_bitfield_func): Avoid
212 signed/unsigned warning.
213 (xcoff_ppc_relocate_section): Delete "condition is always false"
215 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Likewise.
216 * cpu-ns32k.c (do_ns32k_reloc): Adjust to suit reloc_howto_struct
218 * vms-alpha.c (_bfd_vms_write_etir, alpha_vms_slurp_relocs): Use
219 size 16 for ALPHA_R_LINKAGE.
220 (alpha_howto_table <ALPHA_R_LINKAGE>): Set encoded size and
222 * bfd-in.h (reloc_howto_type): Delete.
223 * bfd-in2.h: Regenerate.
225 2018-08-21 Alan Modra <amodra@gmail.com>
227 * reloc.c (HOWTO): Revise comment.
228 (NEWHOWTO, HOWTO_PREPARE): Delete.
229 * coff-arm.c (coff_arm_reloc_type_lookup): Replace const struc
230 reloc_howto_struct with reloc_howto_type.
231 * ns32knetbsd.c (MY_bfd_reloc_type_lookup): Likewise.
232 * vms-alpha.c (alpha_vms_bfd_reloc_type_lookup): Likewise.
233 * elf-hppa.h (HOW): Define.
234 (elf_hppa_howto_table): Use it to simplify this table, correcting
235 name of R_PARISC_LTOFF16WF, R_PARISC_LTOFF_FPTR64, and
236 R_PARISC_LTOFF_FPTR16DF.
237 * elf32-mep.c (MEPREL): Use HOWTO.
238 * bfd-in2.h: Regenerate.
240 2018-08-20 Alan Modra <amodra@gmail.com>
242 * mmo.c (valid_mmo_symbol_character_set): Initialize and make
244 (mmo_init): Don't init valid_mmo_symbol_character_set.
246 2018-08-20 Alan Modra <amodra@gmail.com>
248 * rs6000-core.c (CORE_COMMONSZ): Balance parentheses in expression.
250 2018-08-17 H.J. Lu <hongjiu.lu@intel.com>
253 * elf-bfd.h (elf_backend_data): Add fixup_gnu_properties.
254 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Call
255 backend fixup_gnu_properties if it isn't NULL. Discard
256 .note.gnu.property section if all properties have been removed.
257 * elfxx-target.h (elf_backend_fixup_gnu_properties): New.
258 (elfNN_bed): Initialize fixup_gnu_properties.
259 * elfxx-x86.c (_bfd_x86_elf_link_fixup_gnu_properties): New
261 * elfxx-x86.h (_bfd_x86_elf_link_fixup_gnu_properties): New
263 (elf_backend_fixup_gnu_properties): New.
265 2018-08-16 Alan Modra <amodra@gmail.com>
267 * elf64-ppc.c: Correct ppc_stub_long_branch_notoc example.
270 2018-08-12 H.J. Lu <hongjiu.lu@intel.com>
273 * Makefile.am (BFD32_LIBS): Add elf-properties.lo.
274 (BFD32_LIBS_CFILES): Add elf-properties.c.
275 (BFD32_BACKENDS): Remove elf-properties.lo.
276 (BFD32_BACKENDS_CFILES): Remove elf-properties.c.
277 * configure.ac (elf): Remove elf-properties.lo.
278 * Makefile.in: Regenerated.
279 * configure: Likewise.
281 2018-08-11 H.J. Lu <hongjiu.lu@intel.com>
284 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Don't
285 add X86_ISA_1_NEEDED property only if existing properties won't
288 2018-08-11 Alan Modra <amodra@gmail.com>
290 * reloc.c (bfd_get_reloc_size): Sort switch.
291 (read_reloc, write_reloc, apply_reloc): New functions.
292 (bfd_perform_relocation, bfd_install_relocation): Use apply_reloc.
293 (_bfd_relocate_contents): Use read_reloc and write_reloc.
294 (_bfd_clear_contents): Likewise.
296 2018-08-11 John Darrington <john@darrington.wattle.id.au>
298 * reloc.c (_bfd_relocate_contents): Handle 3 byte relocs.
299 (_bfd_clear_contents): Likewise.
300 (bfd_perform_relocation): Likewise.
301 (bfd_install_relocation): Likewise.
303 2018-08-10 H.J. Lu <hongjiu.lu@intel.com>
306 * elflink.c (bfd_elf_record_link_assignment): Always clear
307 h->verinfo.verdef when overriding a dynamic definition.
309 2018-08-10 H.J. Lu <hongjiu.lu@intel.com>
312 * elf-properties.c (elf_get_gnu_property_section_size): Always
313 use align_size as pr_datasz for GNU_PROPERTY_STACK_SIZE.
314 (elf_write_gnu_properties): Likewise.
316 2018-08-08 H.J. Lu <hongjiu.lu@intel.com>
319 * bfd.c (bfd_convert_section_size): Check BFD_DECOMPRESS after
320 calling _bfd_elf_convert_gnu_property_size to convert
321 .note.gnu.property section size.
322 (bfd_convert_section_contents): Check BFD_DECOMPRESS after
323 calling _bfd_elf_convert_gnu_properties to convert
324 .note.gnu.property section.
325 * elf-bfd.h (_bfd_elf_convert_gnu_property_size): New prototype.
326 (_bfd_elf_convert_gnu_properties): Likewise.
327 * elf-properties.c (elf_get_gnu_property_section_size): New
329 (elf_write_gnu_properties): Likewise.
330 (_bfd_elf_convert_gnu_property_size): Likewise.
331 (_bfd_elf_convert_gnu_properties): Likewise.
332 (_bfd_elf_link_setup_gnu_properties): Use
333 elf_get_gnu_property_section_size and elf_write_gnu_properties.
335 2018-08-08 H.J. Lu <hongjiu.lu@intel.com>
338 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Remove
339 GNU_PROPERTY_X86_ISA_1_USED if an input file doesn't have it.
340 (_bfd_x86_elf_link_setup_gnu_properties): Adding the
341 GNU_PROPERTY_X86_ISA_1_NEEDED, instead of
342 GNU_PROPERTY_X86_ISA_1_USED, property.
344 2018-08-07 Alan Modra <amodra@gmail.com>
346 * elf64-ppc.c (struct map_stub): Delete tls_get_addr_opt_bctrl.
347 Add lr_restore, eh_size and eh_base.
348 (eh_advance, eh_advance_size): New functions.
349 (build_tls_get_addr_stub): Emit EH info for stub.
350 (ppc_build_one_stub): Likewise for _notoc stubs.
351 (ppc_size_one_stub): Size EH info for stub.
352 (group_sections): Init new map_stub fields.
353 (stub_eh_frame_size): Delete.
354 (ppc64_elf_size_stubs): Size EH info for stubs. Set up dummy EH
356 (ppc64_elf_build_stubs): Reinit new map_stub fields. Set FDE
357 offset to stub section here..
358 (ppc64_elf_finish_dynamic_sections): ..rather than here.
360 2018-08-07 Alan Modra <amodra@gmail.com>
362 * elf64-ppc.c (ppc64_elf_relocate_section): Don't skip first
363 instruction of __tls_get_addr_opt stub.
364 (plt_stub_size): Omit ALWAYS_EMIT_R2SAVE condition when
365 dealing with __tls_get_addr_opt stub.
366 (build_tls_get_addr_stub, ppc_size_one_stub): Likewise.
368 2018-08-06 Claudiu Zissulescu <claziss@synopsys.com>
370 * elf32-arc.c (arc_elf_merge_private_bfd_data): Complain about
371 efalgs only when in/out exists.
372 (elf32_arc_section_from_shdr): Don't complain about 0x0c
373 section type. It is mwdt compiler specific.
375 2018-08-06 Claudiu Zissulescu <claziss@synopsys.com>
377 * elf32-arc.c (arc_elf_merge_attributes): Fix merge attributes.
379 2018-08-06 Claudiu Zissulescu <claziss@synopsys.com>
381 * elf32-arc.c (arc_elf_merge_attributes): Handle
384 2018-08-05 Alan Modra <amodra@gmail.com>
386 * elf64-ppc.c (ADDI_R12_R11, ADDI_R12_R12, LIS_R12),
387 (ADDIS_R12_R11, ORIS_R12_R12_0, ORI_R12_R12_0),
388 (SLDI_R12_R12_32, LDX_R12_R11_R12, ADD_R12_R11_R12): Define.
389 (ppc64_elf_howto_raw): Add R_PPC64_REL24_NOTOC entry.
390 (ppc64_elf_reloc_type_lookup): Support R_PPC64_REL24_NOTOC.
391 (ppc_stub_type): Add ppc_stub_long_branch_notoc,
392 ppc_stub_long_branch_both, ppc_stub_plt_branch_notoc,
393 ppc_stub_plt_branch_both, ppc_stub_plt_call_notoc, and
394 ppc_stub_plt_call_both.
395 (is_branch_reloc): Add R_PPC64_REL24_NOTOC.
396 (build_offset, size_offset): New functions.
397 (plt_stub_size): Support plt_call_notoc and plt_call_both.
398 (ppc_build_one_stub, ppc_size_one_stub): Support new stubs.
399 (toc_adjusting_stub_needed): Handle R_PPC64_REL24_NOTOC.
400 (ppc64_elf_size_stubs): Likewise, and new stubs.
401 (ppc64_elf_build_stubs, ppc64_elf_relocate_section): Likewise.
402 * reloc.c: Add BFD_RELOC_PPC64_REL24_NOTOC.
403 * bfd-in2.h: Regenerate.
404 * libbfd.h: Regenerate.
406 2018-08-05 Alan Modra <amodra@gmail.com>
408 * elf64-ppc.c (ppc_build_one_stub): Lose "_r2off" in stub symbols.
410 2018-08-02 Jim Wilson <jimw@sifive.com>
412 * elfnn-riscv.c (riscv_elf_create_dynamic_sections): For .tdata.dyn,
413 add SEC_LINKER_CREATED flag.
415 2018-08-01 Nick Clifton <nickc@redhat.com>
417 * coff-rs6000.c (_bfd_xcoff_put_ldsymbol_name): Suppress warnings
418 about potentially truncated strncpy operations.
419 (_bfd_xcoff_put_symbol_name): Likewise.
421 * elf32-avr.c (avr_stub_name): Check for a NULL return from
424 2018-08-01 Zenith <zenith432@users.sourceforge.net>
427 * plugin.c (bfd_plugin_open_input): Close file descriptor if the
429 (try_claim): Always close the file descriptor at the end of the
431 (try_load_plugin): If a plugin has already been registered, then
432 skip the dlopen and onload steps and go straight to claiming the
433 file. If these is an error, close the plugin.
435 2018-08-01 Alan Modra <amodra@gmail.com>
437 * elf64-ppc.c (plt_stub_pad): Delay plt_stub_size call until needed.
438 (ppc_build_one_stub): Don't set stub_offset, instead assert that
439 it is sane. Don't adjust stub_offset for alignment. Adjust size
440 calculation. Use "targ" temp when calculating offsets.
441 (ppc_size_one_stub): Set stub_offset here. Use "targ" temp when
442 calculating offsets. Adjust for alignment before setting
443 tls_get_addr_opt_bctrl.
445 2018-08-01 Alan Modra <amodra@gmail.com>
447 * po/SRC-POTFILES.in: Regenerate.
449 2018-07-30 Nick Clifton <nickc@redhat.com>
452 * elf32-sh.c (sh_elf_relocate_section): When processing
453 translation relocs, fail if the relocation offset is too small.
454 Replace BFD_ASSERTs with more helpful error messages.
456 2018-07-30 Andrew Jenner <andrew@codesourcery.com>
458 * Makefile.am (ALL_MACHINES, ALL_MACHINES_CFILES): Add C-SKY.
459 (BFD32_BACKENDS, BFD_BACKENDS_CFILES): Likewise.
460 * Makefile.in: Regenerated.
461 * archures.c (enum bfd_architecture): Add bfd_arch_csky and
462 related bfd_mach defines.
463 (bfd_csky_arch): Declare.
464 (bfd_archures_list): Add C-SKY.
465 * bfd-in.h (elf32_csky_build_stubs): Declare.
466 (elf32_csky_size_stubs): Declare.
467 (elf32_csky_next_input_section: Declare.
468 (elf32_csky_setup_section_lists): Declare.
469 * bfd-in2.h: Regenerated.
470 * config.bfd: Add C-SKY.
471 * configure.ac: Likewise.
472 * configure: Regenerated.
473 * cpu-csky.c: New file.
474 * elf-bfd.h (enum elf_target_id): Add C-SKY.
475 * elf32-csky.c: New file.
476 * libbfd.h: Regenerated.
477 * reloc.c: Add C-SKY relocations.
478 * targets.c (csky_elf32_be_vec, csky_elf32_le_vec): Declare.
479 (_bfd_target_vector): Add C-SKY target vector entries.
481 2018-07-27 John Darrington <john@darrington.wattle.id.au>
483 * elf32-s12z.c (ELF_TARGET_ID): Don't define.
485 2018-07-27 John Darrington <john@darrington.wattle.id.au>
487 * libbfd.c (bfd_getb24, bfd_getl24): New functions.
488 (bfd_get_24, bfd_put_24): New macros.
489 * bfd-in2.h: Regenerate.
491 2018-07-27 John Darrington <john@darrington.wattle.id.au>
493 * elf32-s12z.c (s12z_elf_set_mach_from_flags): Remove comment.
495 2018-07-26 Alan Modra <amodra@gmail.com>
497 * elf64-ppc.c (ppc64_elf_size_stubs): Use a ppc_stub_long_branch_r2off
498 for calls to symbols with STO_PPC64_LOCAL_MASK bits set to 1.
500 2018-07-25 Alan Modra <amodra@gmail.com>
502 * elf32-ppc.c (ppc_elf_relax_section): Ignore common or undef locals.
503 Avoid trashing toff with added when used as a symbol index.
504 Ignore R_PPC_PLTREL24 addends in unused example code. Avoid
505 creating unnecessary fixups when relocatable.
507 2018-07-25 Alan Modra <amodra@gmail.com>
509 * elf32-arm.c (elf32_arm_nabi_write_core_note): Disable
510 -Wstringop-truncation warning for gcc-8.0 too.
511 * elf32-ppc.c (ppc_elf_write_core_note): Likewise.
512 * elf64-ppc.c (ppc64_elf_write_core_note): Likewise.
513 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise.
514 * elf32-s390.c (elf_s390_write_core_note): Comment fix.
515 * elf64-s390.c (elf_s390_write_core_note): Likewise.
517 2018-07-24 Alan Modra <amodra@gmail.com>
520 * dwarf2.c (dwarf_debug_section_enum): Fix comment typo.
521 * elf.c (bfd_section_from_shdr, elf_sort_sections): Likewise.
523 2018-07-23 Max Filippov <jcmvbkbc@gmail.com>
525 * elf32-xtensa.c (elf_xtensa_finish_dynamic_sections): Move
526 relocation sections consistency check to always check both
527 .rela.dyn and .rela.plt when they exist. Rearrange variable
528 definition and assignment places.
530 2018-07-23 Max Filippov <jcmvbkbc@gmail.com>
532 * elf32-xtensa.c (shrink_dynamic_reloc_sections): Shrink dynamic
533 relocations section for dynamic undefined weak symbols when
534 linking a shared object.
536 2018-07-23 Tom Tromey <tom@tromey.com>
538 * elf.c (bfd_get_elf_phdrs): Don't call memcpy with size 0.
540 2018-07-21 Eric Botcazou <ebotcazou@adacore.com>
542 * elf32-arm.c (elf32_arm_final_link_relocate) <R_ARM_GOT32>: Small
543 cleanup for the case of a global symbol that binds locally. Also
544 install a value in the GOT slot in the case of a local symbol in
547 2018-07-20 H.J. Lu <hongjiu.lu@intel.com>
550 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): If the
551 separate code program header is needed, make sure that the first
552 read-only PT_LOAD segment has no code by adding a
553 GNU_PROPERTY_X86_ISA_1_USED note.
555 2018-07-20 Chenghua Xu <paul.hua.gm@gmail.com>
556 Maciej W. Rozycki <macro@mips.com>
558 * elfxx-mips.c (print_mips_ases): Add MMI extension.
560 2018-07-20 Maciej W. Rozycki <macro@mips.com>
562 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Do not
563 create DT_REL, DT_RELSZ or DT_RELENT dynamic entries if the
564 dynamic relocation section will be discarded from output.
565 (_bfd_mips_elf_finish_dynamic_sections) <DT_RELSZ>: Assert that
566 the dynamic relocation section will be retained in output.
568 2018-07-18 Maciej W. Rozycki <macro@mips.com>
570 * xcofflink.c (xcoff_write_global_symbol): Fix symbol type
571 checks for defined weak symbols.
573 2018-07-17 Maciej W. Rozycki <macro@mips.com>
575 * elf32-nds32.c (nds32_elf_relax_loadstore): Use
576 `bfd_is_abs_symbol' rather than `bfd_is_abs_section' in checking
577 whether the symbol is absolute.
578 (nds32_elf_relax_lo12): Likewise.
579 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
580 (elfNN_aarch64_check_relocs): Likewise.
581 * xcofflink.c (xcoff_need_ldrel_p): Likewise.
582 (bfd_xcoff_import_symbol): Likewise.
583 (xcoff_write_global_symbol): Likewise.
585 2018-07-17 Maciej W. Rozycki <macro@mips.com>
587 * linker.c (bfd_is_abs_symbol): New macro.
588 * bfd-in2.h: Regenerate.
590 2018-07-16 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
592 * elf-bfd.h (elfcore_write_ppc_tar): Add prototype.
593 (elfcore_write_ppc_ppr): Likewise.
594 (elfcore_write_ppc_dscr): Likewise.
595 (elfcore_write_ppc_ebb): Likewise.
596 (elfcore_write_ppc_pmu): Likewise.
597 (elfcore_write_ppc_tm_cgpr): Likewise.
598 (elfcore_write_ppc_tm_cfpr): Likewise.
599 (elfcore_write_ppc_tm_cvmx): Likewise.
600 (elfcore_write_ppc_tm_cvsx): Likewise.
601 (elfcore_write_ppc_tm_spr): Likewise.
602 (elfcore_write_ppc_tm_ctar): Likewise.
603 (elfcore_write_ppc_tm_cppr): Likewise.
604 (elfcore_write_ppc_tm_cdscr): Likewise.
605 * elf.c (elfcore_write_ppc_tar): New function.
606 (elfcore_write_ppc_ppr): Likewise.
607 (elfcore_write_ppc_dscr): Likewise.
608 (elfcore_write_ppc_ebb): Likewise.
609 (elfcore_write_ppc_pmu): Likewise.
610 (elfcore_write_ppc_tm_cgpr): Likewise.
611 (elfcore_write_ppc_tm_cfpr): Likewise.
612 (elfcore_write_ppc_tm_cvmx): Likewise.
613 (elfcore_write_ppc_tm_cvsx): Likewise.
614 (elfcore_write_ppc_tm_spr): Likewise.
615 (elfcore_write_ppc_tm_ctar): Likewise.
616 (elfcore_write_ppc_tm_cppr): Likewise.
617 (elfcore_write_ppc_tm_cdscr): Likewise.
618 (elfcore_write_register_note): Call them.
619 (elfcore_grok_ppc_tar): New function.
620 (elfcore_grok_ppc_ppr): Likewise.
621 (elfcore_grok_ppc_dscr): Likewise.
622 (elfcore_grok_ppc_ebb): Likewise.
623 (elfcore_grok_ppc_pmu): Likewise.
624 (elfcore_grok_ppc_tm_cgpr): Likewise.
625 (elfcore_grok_ppc_tm_cfpr): Likewise.
626 (elfcore_grok_ppc_tm_cvmx): Likewise.
627 (elfcore_grok_ppc_tm_cvsx): Likewise.
628 (elfcore_grok_ppc_tm_spr): Likewise.
629 (elfcore_grok_ppc_tm_ctar): Likewise.
630 (elfcore_grok_ppc_tm_cppr): Likewise.
631 (elfcore_grok_ppc_tm_cdscr): Likewise.
632 (elfcore_grok_note): Call them.
634 2018-07-11 Maciej W. Rozycki <macro@mips.com>
636 * elfxx-mips.c (mips_tls_got_relocs): Use `bfd_link_dll' rather
637 than `!bfd_link_pic' in determining the dynamic symbol index.
638 Avoid the index of -1.
639 (mips_elf_initialize_tls_slots): Likewise. Flatten code by
640 moving `dyn' to the beginning of the function block.
642 2018-07-11 Maciej W. Rozycki <macro@mips.com>
643 Rich Felker <bugdal@aerifal.cx>
646 * elfxx-mips.c (mips_tls_got_relocs): Use `bfd_link_dll' rather
647 than `bfd_link_pic' to determine whether dynamic relocations are
649 (mips_elf_initialize_tls_slots): Likewise.
651 2018-07-10 Maciej W. Rozycki <macro@mips.com>
653 * elflink.c (bfd_elf_final_link): Rename `remove' local variable
656 2018-07-10 Alan Modra <amodra@gmail.com>
658 * elf32-xgate.h: Delete.
659 * elf32-xgate.c: Delete unnecessary forward declarations, add two
661 (xgate_elf_bfd_link_hash_table_create)
662 (xgate_elf_bfd_link_hash_table_free)
663 (xgate_elf_set_mach_from_flags, struct xgate_scan_param)
664 (stub_hash_newfunc, elf32_xgate_add_symbol_hook)
665 (elf32_xgate_setup_section_lists, elf32_xgate_size_stubs)
666 (elf32_xgate_build_stubs, elf32_xgate_check_relocs)
667 (elf32_xgate_relocate_section, _bfd_xgate_elf_set_private_flags)
668 (elf32_xgate_post_process_headers): Delete.
669 (elf32_xgate_backend_symbol_processing): New function.
670 (xgate_elf_ignore_reloc, xgate_elf_special_reloc)
671 (_bfd_xgate_elf_print_private_bfd_data): Make static.
672 (ELF_TARGET_ID, elf_info_to_howto, elf_backend_check_relocs)
673 (elf_backend_relocate_section, elf_backend_object_p)
674 (elf_backend_final_write_processing, elf_backend_can_gc_sections)
675 (elf_backend_post_process_headers, elf_backend_add_symbol_hook)
676 (bfd_elf32_bfd_link_hash_table_create)
677 (bfd_elf32_bfd_set_private_flags)
678 (xgate_stub_hash_lookup): Don't define.
679 (elf_backend_symbol_processing): Define.
680 * elf-bfd.h (elf_target_id): Delete XGATE_ELF_DATA.
682 2018-07-09 Maciej W. Rozycki <macro@mips.com>
684 * elfxx-mips.c (_bfd_mips_elf_adjust_dynamic_symbol): Don't set
685 `->needs_lazy_stub' if the stubs output section is the absolute
688 2018-07-09 H.J. Lu <hongjiu.lu@intel.com>
691 * configure.ac: Use changequote for "i[3-7]86-*-linux-*".
692 * configure: Regenerated.
694 2018-07-09 Alan Modra <amodra@gmail.com>
696 * elf32-m68hc1x.c (elf32_m68hc11_post_process_headers): Call
697 _bfd_elf_post_process_headers.
699 2018-07-06 Max Filippov <jcmvbkbc@gmail.com>
701 * elf32-xtensa.c (elf_xtensa_allocate_dynrelocs): Don't allocate
702 space for dynamic relocation for undefined weak symbol.
703 (elf_xtensa_relocate_section): Don't emit R_XTENSA_RELATIVE
704 relocation for undefined weak symbols.
705 (shrink_dynamic_reloc_sections): Don't shrink dynamic relocation
706 section for relocations against undefined weak symbols.
708 2018-07-06 Alan Hayward <alan.hayward@arm.com>
710 * elf.c (elfcore_grok_aarch_sve): New function.
711 (elfcore_grok_note): Check for Aarch64 SVE.
712 (elfcore_write_aarch_sve): New function.
713 (elfcore_write_register_note): Check for Aarch64 SVE.
714 * elf-bfd.h(elfcore_grok_aarch_sve): New declaration.
716 2018-07-06 Alan Modra <amodra@gmail.com>
718 * elf32-arm.c (elf32_arm_nabi_write_core_note): Don't use
719 DIAGNOTIC_PUSH and DIAGNOSTIC_POP unconditionally.
720 * elf32-ppc.c (ppc_elf_write_core_note): Likewise.
721 * elf32-s390.c (elf_s390_write_core_note): Likewise.
722 * elf64-ppc.c (ppc64_elf_write_core_note): Likewise.
723 * elf64-s390.c (elf_s390_write_core_note): Likewise.
724 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise.
726 2018-07-05 Jim Wilson <jimw@sifive.com>
728 * config.bfd (riscv32*-*-*): Renamed from riscv32-*-*.
729 (riscv64*-*-*): Likewise.
730 (riscv-*-*): Add as an alias for riscv32*-*-*.
732 2018-07-05 H.J. Lu <hongjiu.lu@intel.com>
735 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Remove x86
736 ISA properties with empty bits.
738 2018-07-05 Nick Clifton <nickc@redhat.com>
740 * po/ru.po: Updated Russian translation.
742 2018-07-05 Alan Modra <amodra@gmail.com>
744 * elf-bfd.h (_bfd_elf_ppc_merge_fp_attributes): Update prototype.
745 * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Return error
746 on mismatch. Remove "warning: " from messages. Track last bfd
748 (ppc_elf_merge_obj_attributes): Likewise. Handle status from
749 _bfd_elf_ppc_merge_fp_attributes.
750 * elf64-ppc.c (ppc64_elf_merge_private_bfd_data): Handle status
751 from _bfd_elf_ppc_merge_fp_attributes.
753 2018-07-04 H.J. Lu <hongjiu.lu@intel.com>
755 * Makefile.am (bfdinclude_HEADERS): Add $(INCDIR)/diagnostics.h.
756 * Makefile.in: Regenerated.
758 2018-07-03 Alan Modra <amodra@gmail.com>
760 * elflink.c (bfd_elf_final_link): Remove zero size .gnu.attributes
763 2018-07-03 Alan Modra <amodra@gmail.com>
765 * elf-bfd.h (ATTR_TYPE_FLAG_ERROR, ATTR_TYPE_HAS_ERROR): Define.
766 * elf-attrs.c (is_default_attr): Handle ATTR_TYPE_HAS_ERROR.
767 * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Use
768 ATTR_TYPE_FLAG_INT_VAL. Set ATTR_TYPE_HAS_ERROR on finding
769 incompatible attribute.
770 (ppc_elf_merge_obj_attributes): Likewise. Return
771 _bfd_elf_merge_object_attributes result.
772 * elf64-ppc.c (ppc64_elf_merge_private_bfd_data): Return
773 _bfd_elf_merge_object_attributes result.
775 2018-07-03 Alan Modra <amodra@gmail.com>
778 * elflink.c (_bfd_elf_fix_symbol_flags): Hide dynamic symbols
779 in discarded sections.
781 2018-07-02 Maciej W. Rozycki <macro@mips.com>
783 * elfxx-mips.c (_bfd_mips_elf_create_dynamic_sections): Set
784 `mark' for symbols created from `mips_elf_dynsym_rtproc_names'
787 2018-07-02 Maciej W. Rozycki <macro@mips.com>
789 * elf64-mips.c (micromips_elf64_howto_table_rel): Add
790 R_MICROMIPS_HI0_LO16, R_MICROMIPS_TLS_GD, R_MICROMIPS_TLS_LDM,
791 R_MICROMIPS_TLS_DTPREL_HI16, R_MICROMIPS_TLS_DTPREL_LO16,
792 R_MICROMIPS_TLS_GOTTPREL, R_MICROMIPS_TLS_TPREL_HI16,
793 R_MICROMIPS_TLS_TPREL_LO16, R_MICROMIPS_GPREL7_S2 and
794 R_MICROMIPS_PC23_S2 relocation entries.
795 (micromips_elf64_howto_table_rela): Likewise.
796 (micromips_reloc_map): Likewise.
797 * elfn32-mips.c (elf_micromips_howto_table_rel): Likewise.
798 (elf_micromips_howto_table_rela): Likewise.
799 (micromips_reloc_map): Likewise.
801 2018-07-02 H.J. Lu <hongjiu.lu@intel.com>
804 * elf64-x86-64.c (elf_x86_64_relocate_section): Clear the
805 R_X86_64_converted_reloc_bit bit.
807 2018-07-02 Jeff Muizelaar <jrmuizel@gmail.com>
808 Tom Tromey <tom@tromey.com>
812 * mach-o.c (bfd_mach_o_fat_close_and_cleanup): New function.
813 (bfd_mach_o_close_and_cleanup): Redefine.
814 * archive.c (_bfd_unlink_from_archive_parent): New function,
816 (_bfd_archive_close_and_cleanup): ..here.
817 (bfd_generic_archive_p): Do not clear archive's format.
818 * libbfd-in.h (_bfd_unlink_from_archive_parent): Declare.
819 * libbfd.h: Regenerate.
821 2018-07-02 Thomas Preud'homme <thomas.preudhomme@arm.com>
823 * archures.c (bfd_mach_arm_5TEJ, bfd_mach_arm_6, bfd_mach_arm_6KZ,
824 bfd_mach_arm_6T2, bfd_mach_arm_6K, bfd_mach_arm_7, bfd_mach_arm_6M,
825 bfd_mach_arm_6SM, bfd_mach_arm_7EM, bfd_mach_arm_8, bfd_mach_arm_8R,
826 bfd_mach_arm_8M_BASE, bfd_mach_arm_8M_MAIN): Define.
827 * bfd-in2.h: Regenerate.
828 * cpu-arm.c (arch_info_struct): Add entries for above new
830 * elf32-arm.c (bfd_arm_get_mach_from_attributes): Add Tag_CPU_arch to
831 bfd_mach_arm mapping logic for pre Armv4 and Armv5TEJ and later
832 architectures. Force assert failure for any new Tag_CPU_arch value.
834 2018-07-02 Thomas Preud'homme <thomas.preudhomme@arm.com>
836 * doc/bfdint.texi: Use command-line consistently when used in a
838 * doc/bfdsumm.texi: Likewise.
840 2018-06-29 Maciej W. Rozycki <macro@mips.com>
842 * elfxx-mips.c (allocate_dynrelocs): Remove extraneous symbol
843 visibility check made for undefined weak symbols.
845 2018-06-26 Nick Clifton <nickc@redhat.com>
847 * po/uk.po: Updated Ukranian translation.
849 2018-06-25 Nick Clifton <nickc@redhat.com>
851 * elfnn-aarch64.c (_bfd_aarch64_erratum_835769_stub_name): Check
852 for malloc returning NULL.
853 (_bfd_aarch64_erratum_843419_fixup): Check for
854 _bfd_aarch64_erratum_835769_stub_name returning NULL.
856 2018-06-24 Nick Clifton <nickc@redhat.com>
858 * po/bfd.pot: Regenerate.
860 2018-06-24 Nick Clifton <nickc@redhat.com>
862 * version.m4: Update version string to 2.31.51.
863 * configure: Regenerate.
865 2018-06-24 Nick Clifton <nickc@redhat.com>
869 2018-06-21 Maciej W. Rozycki <macro@mips.com>
871 * elfxx-mips.c (_bfd_mips_elf_compact_eh_encoding)
872 (_bfd_mips_elf_cant_unwind_opcode): Correct formatting.
874 2018-06-21 Maciej W. Rozycki <macro@mips.com>
876 * elfxx-mips.c (_bfd_mips_post_process_headers): Keep
877 EI_ABIVERSION setting together.
879 2018-06-21 Maciej W. Rozycki <macro@mips.com>
881 * elfxx-mips.c (MIPS_LIBC_ABI_DEFAULT, MIPS_LIBC_ABI_MIPS_PLT)
882 (MIPS_LIBC_ABI_UNIQUE, MIPS_LIBC_ABI_MIPS_O32_FP64)
883 (MIPS_LIBC_ABI_MAX): New enumeration constants.
884 (_bfd_mips_post_process_headers): Use them in place of magic
887 2018-06-21 Jim Wilson <jimw@sifive.com>
889 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Update comment.
890 Use SYMBOL_REFERENCES_LOCAL. Add asserts for h->got.offset.
892 2018-06-21 Alan Modra <amodra@gmail.com>
894 * doc/Makefile.am (AUTOMAKE_OPTIONS): Add "foreign".
895 * doc/Makefile.in: Regenerate.
897 2018-06-20 Renlin Li <renlin.li@arm.com>
899 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Use PG_OFFSET
900 to resolve BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC,
901 BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC,
902 BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC,
903 BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC,
904 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
905 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
906 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
907 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
909 2018-06-20 Nick Clifton <nickc@redhat.com>
912 * opncls.c (get_build_id): Check for a negative or excessive data
913 size in the build-id note.
915 2018-06-20 Nick Clifton <nickc@redhat.com>
918 * mach-o.c (cputype): New function.
919 (cpusubtype): New function.
920 (bfd_mach_o_bfd_print_private_data): New function. Dispalys the
921 values in the MACH-O file header.
922 (bfd_mach_o_bfd_copy_private_header_data): Copy the cputype and
923 cpusubtype fields from the input bfd's mach-o header to the output
925 * mach-o-target.c (bfd_mach_o_bfd_print_private_bfd_data):
926 Redefine to bfd_mach_o_bfd_print_private_data.
927 * mach-o.h (bfd_mach_o_bfd_print_private_bfd_data): Prototype.
929 2018-06-19 Maciej W. Rozycki <macro@mips.com>
932 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Verify the
933 `.got.plt' entry referred is in range.
934 (mips_finish_exec_plt): Correct the range check for `.got.plt'
935 start. Replace the assertion used for that with a proper error
938 2018-06-19 Maciej W. Rozycki <macro@mips.com>
940 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Fix
943 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
945 * Makefile.am (AUTOMAKE_OPTIONS): Remove 1.11.
946 (INCLUDES): Rename to ...
947 (AM_CPPFLAGS): ... this.
948 * configure.ac: Remove AC_PREREQ.
949 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove 1.9, cygnus, add
950 info-in-builddir no-texinfo.tex.
951 (info_TEXINFOS): Rename bfd.texinfo to bfd.texi.
952 * doc/bfd.texinfo: Rename to ...
953 * doc/bfd.texi: ... this.
954 * Makefile.in: Re-generate.
955 * aclocal.m4: Re-generate.
956 * config.in: Re-generate.
957 * configure: Re-generate.
958 * doc/Makefile.in: Re-generate.
960 2018-06-18 Mephi <mephi42@gmail.com>
963 * mach-o-x86-64.c (x86_64_howto_table): Add entry for
964 BFD_RELOC_MACH_O_X86_64_RELOC_TLV.
965 (bfd_mach_o_x86_64_canonicalize_one_reloc): Handle the new reloc.
966 (bfd_mach_o_x86_64_swap_reloc_out): Likewise.
967 * reloc.c (BFD_RELOC_MACH_O_X86_64_TV): New entry.
968 * bfd-in2.h: Regenerate.
969 * libbfd.h: Regenerate.
971 2018-06-14 Faraz Shahbazker <Faraz.Shahbazker@mips.com>
973 * elfxx-mips.c (print_mips_ases): Add GINV extension.
975 2018-06-14 H.J. Lu <hongjiu.lu@intel.com>
978 * elf.c (_bfd_elf_get_symbol_version_string): Check if the first
979 symbol version is base version.
981 2018-06-14 Alan Modra <amodra@gmail.com>
983 * elf-bfd.h (struct elf_link_hash_table): Add "dynamic_relocs".
984 * elflink.c (_bfd_elf_init_2_index_sections): Comment fix.
985 (_bfd_elf_add_dynamic_entry): Set "dynamic_relocs".
986 (_bfd_elf_link_renumber_dynsyms): Exclude all section symbols when
987 "dynamic_relocs" is not set.
988 * elfxx-mips.c (count_section_dynsyms): Likewise.
990 2018-06-14 Alan Modra <amodra@gmail.com>
993 * bfdio.c (bfd_seek): Optimize away seeks to current position.
995 2018-06-13 Scott Egerton <scott.egerton@imgtec.com>
996 Faraz Shahbazker <Faraz.Shahbazker@mips.com>
998 * elfxx-mips.c (print_mips_ases): Add CRC.
1000 2018-06-08 H.J. Lu <hongjiu.lu@intel.com>
1003 * elfxx-x86.c (elf_x86_hide_linker_defined): New function.
1004 (_bfd_x86_elf_link_check_relocs): Use it to hide hidden
1005 __bss_start, _end and _edata in shared libraries.
1007 2018-06-07 Alan Modra <amodra@gmail.com>
1009 * elf32-tic6x.c (elf32_tic6x_check_relocs): Reference
1010 __c6xabi_DSBT_BASE explicitly for R_C6000_SBR_* relocs.
1012 2018-06-05 Alan Modra <amodra@gmail.com>
1014 * bfd.c (struct bfd): Update comment on "where" usage.
1015 * bfdio.c (bfd_bwrite, bfd_stat): Use and update "iovec",
1016 "iostream", and "where" from containing archive file. Return
1017 error on NULL iovec.
1018 (bfd_bread): Similarly, and return error attempted out of
1019 bounds archive element access.
1020 (bfd_tell, bfd_flush): Use and update "iovec", "iostream", and
1021 "where" from containing archive file.
1022 (bfd_seek): Likewise. Return error on NULL iovec. Don't
1023 attempt to optimize away seeks. Don't paper over errors by
1025 (bfd_get_mtime): Call bfd_stat rather than iovec->bstat.
1026 (bfd_get_size): Likewise.
1027 (bfd_mmap): Operate on and use iovec of containing archive
1028 file. Return error on NULL iovec.
1029 * cache.c (bfd_cache_lookup_worker): Abort if working on
1030 archive element bfd.
1031 (cache_bread_1): Delete bfd parameter, add FILE* parameter.
1032 Don't ignore zero byte reads.
1033 (cache_bread): Look up FILE* in cache here. Error on NULL
1035 (cache_bwrite): Rename "where" to "from".
1036 (cache_bmmap): Don't handle archive elements.
1037 * coffcode.h (coff_slurp_line_table): Exit early on zero
1039 * bfd-in2.h: Regenerate.
1041 2018-06-05 Alan Modra <amodra@gmail.com>
1044 * plugin.c (bfd_plugin_open_input): Allow for possibility of
1045 nested archives. Open file again for plugin.
1046 (try_claim): Don't save and restore file position. Close file
1048 * sysdep.h (O_BINARY): Define.
1050 2018-06-04 Max Filippov <jcmvbkbc@gmail.com>
1052 * elf32-xtensa.c (xtensa_read_table_entries): Make global.
1053 (compute_fill_extra_space): Drop declaration. Rename function to
1054 xtensa_compute_fill_extra_space.
1055 (compute_ebb_actions, remove_dead_literal): Update references to
1056 compute_fill_extra_space.
1058 2018-06-04 Volodymyr Arbatov <arbatov@cadence.com>
1060 * elf32-xtensa.c (elf32xtensa_separate_props): New global
1062 (xtensa_add_names): New function.
1063 (xtensa_property_section_name): Add new parameter
1064 separate_sections, use it to choose property section name.
1065 (xtensa_get_separate_property_section): New function.
1066 (xtensa_get_property_section): Invoke
1067 xtensa_get_separate_property_section to get individual property
1068 section if it exists, common property section otherwise.
1069 (xtensa_make_property_section): Pass elf32xtensa_separate_props
1070 to xtensa_property_section_name.
1072 2018-06-04 H.J. Lu <hongjiu.lu@intel.com>
1075 * bfd-in.h: Include "diagnostics.h".
1076 * bfd-in2.h: Regenerated.
1077 * elf32-arm.c (elf32_arm_nabi_write_core_note): Use
1078 DIAGNOSTIC_PUSH, DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION and
1079 DIAGNOSTIC_POP to silence GCC 8.1 warnings with
1080 -Wstringop-truncation.
1081 * elf32-ppc.c (ppc_elf_write_core_note): Likewse.
1082 * elf32-s390.c (elf_s390_write_core_note): Likewse.
1083 * elf64-ppc.c (ppc64_elf_write_core_note): Likewse.
1084 * elf64-s390.c (elf_s390_write_core_note): Likewse.
1085 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewse.
1087 2018-06-03 Jim Wilson <jimw@sifive.com>
1090 * elfnn-riscv.c (riscv_elf_relocate_section) <R_RISCV_CALL>: Check
1091 for and handle an undefined weak with no PLT.
1094 * elfnn-riscv.c (riscv_relax_delete_bytes): Add versioned_hidden check
1095 to code that ignores duplicate symbols.
1097 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
1099 * version.m4: Bump version to 2.30.52
1100 * configure: Regenerated.
1102 2018-06-01 Alan Modra <amodra@gmail.com>
1104 * bfd.c (_bfd_error_handler): Arrange for this function to be
1105 declared in bfd-in2.h.
1106 * libbfd-in.h (_bfd_error_handler): Don't declare.
1107 * libbfd.h: Regenerate.
1108 * bfd-in2.h: Regenerate.
1110 2018-05-30 Amaan Cheval <amaan.cheval@gmail.com>
1112 * config.bfd (x86_64-*-*): Add pei-x86-64 target to x86_64-*-rtems*
1113 This is needed to generate UEFI application image files from ELFs.
1115 2018-05-28 H.J. Lu <hongjiu.lu@intel.com>
1117 * elf32-i386.c (elf_i386_lazy_plt): Add plt_tlsdesc_entry,
1118 plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset,
1119 plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and
1120 plt_tlsdesc_got2_insn_end for TLSDESC entry.
1121 (elf_i386_lazy_ibt_plt): Likewise.
1122 (elf_i386_nacl_plt): Likewise.
1123 * elf64-x86-64.c (tlsdesc_plt_entry): Moved and renamed to ...
1124 (elf_x86_64_tlsdesc_plt_entry): This.
1125 (elf_x86_64_lazy_plt): Add plt_tlsdesc_entry,
1126 plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset,
1127 plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and
1128 plt_tlsdesc_got2_insn_end for TLSDESC entry.
1129 (elf_x86_64_lazy_bnd_plt): Likewise.
1130 (elf_x86_64_lazy_ibt_plt): Likewise.
1131 (elf_x32_lazy_ibt_plt): Likewise.
1132 (elf_x86_64_nacl_plt): Likewise.
1133 (elf_x86_64_finish_dynamic_sections): Use plt_tlsdesc_entry,
1134 plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset,
1135 plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and
1136 plt_tlsdesc_got2_insn_end to update TLSDESC entry.
1137 * elfxx-x86.h (elf_x86_lazy_plt_layout): Update comments.
1138 Add plt_tlsdesc_entry, plt_tlsdesc_entry_size,
1139 plt_tlsdesc_got1_offset, plt_tlsdesc_got2_offset,
1140 plt_tlsdesc_got1_insn_end and plt_tlsdesc_got2_insn_end.
1141 (elf_x86_non_lazy_plt_layout): Update comments.
1142 (elf_x86_plt_layout): Likewise.
1144 2018-05-28 H.J. Lu <hongjiu.lu@intel.com>
1147 * elf-s390-common.c (elf_s390_add_symbol_hook): Removed.
1148 * elf32-arc.c (elf_arc_add_symbol_hook): Likewise.
1149 (elf_backend_add_symbol_hook): Likewise.
1150 * elf32-m68k.c (elf_m68k_add_symbol_hook): Likewise.
1151 (elf_backend_add_symbol_hook): Likewise.
1152 * elf32-s390.c (elf_backend_add_symbol_hook): Likewise.
1153 * elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise.
1154 (elf_backend_add_symbol_hook): Likewise.
1155 * elf64-s390.c (elf_backend_add_symbol_hook): Likewise.
1156 * elfxx-aarch64.c (_bfd_aarch64_elf_add_symbol_hook): Likewise.
1157 * elfxx-aarch64.h (_bfd_aarch64_elf_add_symbol_hook): Likewise.
1158 (elf_backend_add_symbol_hook): Likewise.
1159 * elf32-arm.c (elf32_arm_add_symbol_hook): Remove STT_GNU_IFUNC
1161 * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
1162 * elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise.
1163 * elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise.
1164 * elflink.c (elf_link_add_object_symbols): Set
1165 elf_gnu_symbol_ifunc for STT_GNU_IFUNC symbols.
1167 2018-05-26 H.J. Lu <hongjiu.lu@intel.com>
1170 * elf-bfd.h (_bfd_elf_link_hide_sym_by_version): New.
1171 * elflink.c (_bfd_elf_link_hide_versioned_symbol): New function.
1172 Extracted from _bfd_elf_link_assign_sym_version.
1173 (_bfd_elf_link_hide_sym_by_version): New function.
1174 (_bfd_elf_link_assign_sym_version): Use
1175 _bfd_elf_link_hide_versioned_symbol.
1176 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Call
1177 _bfd_elf_link_hide_sym_by_version instead of
1178 bfd_hide_sym_by_version. Don't check unversioned symbol.
1180 2018-05-25 Alan Modra <amodra@gmail.com>
1182 * Makefile.in: Regenerate.
1183 * po/SRC-POTFILES.in: Regenerate.
1185 2018-05-25 Alan Modra <amodra@gmail.com>
1187 * configure.ac (bfd_cv_hidden): Run test with -Werror in CFLAGS.
1188 * configure: Regenerate.
1190 2018-05-23 H.J. Lu <hongjiu.lu@intel.com>
1192 * elf64-ppc.c (ppc64_elf_write_core_note): Add ATTRIBUTE_NONSTRING
1195 2018-05-22 Alan Modra <amodra@gmail.com>
1198 * elf32-hppa.c (hppa_get_stub_entry): Return NULL when link_sec
1200 (elf32_hppa_size_stubs): Only create stubs for load, alloc, code
1202 (final_link_relocate): Revert last change.
1204 2018-05-22 Alan Modra <amodra@gmail.com>
1207 * elf32-hppa.c (final_link_relocate): Don't look for plt call
1208 stubs in non-alloc sections.
1210 2018-05-21 H.J. Lu <hongjiu.lu@intel.com>
1213 * aout-target.h (MY_bfd_link_hide_symbol): New.
1214 * aout-tic30.c (MY_bfd_link_hide_symbol): Likewise.
1215 * binary.c (binary_bfd_link_hide_symbol): Likewise.
1216 * coff-alpha.c (_bfd_ecoff_bfd_link_hide_symbol): Likewise.
1217 * coff-mips.c (_bfd_ecoff_bfd_link_hide_symbol): Likewise.
1218 * coff-rs6000.c (_bfd_xcoff_bfd_link_hide_symbol): Likewise.
1219 * coffcode.h (coff_bfd_link_hide_symbol): Likewise.
1220 * elf-bfd.h (_bfd_elf_link_hide_symbol): Likewise.
1221 * elfxx-target.h (bfd_elfNN_bfd_link_hide_symbol): Likewise.
1222 * i386msdos.c (msdos_bfd_link_hide_symbol): Likewise.
1223 * ihex.c (ihex_bfd_link_hide_symbol): Likewise.
1224 * libbfd-in.h (_bfd_nolink_bfd_link_hide_symbol): Likewise.
1225 * linker.c (_bfd_generic_link_hide_symbol): Likewise.
1226 (bfd_link_hide_symbol): Likewise.
1227 * mach-o-target.c (bfd_mach_o_bfd_link_hide_symbol): Likewise.
1228 * mmo.c (mmo_bfd_link_hide_symbol): Likewise.
1229 * pef.c (bfd_pef_bfd_link_hide_symbol): Likewise.
1230 * plugin.c (bfd_plugin_bfd_link_hide_symbol): Likewise.
1231 * ppcboot.c (ppcboot_bfd_link_hide_symbol): Likewise.
1232 * som.c (som_bfd_link_hide_symbol): Likewise.
1233 * srec.c (srec_bfd_link_hide_symbol): Likewise.
1234 * tekhex.c (tekhex_bfd_link_hide_symbol): Likewise.
1235 * vms-alpha.c (vms_bfd_link_hide_symbol): Likewise.
1236 (alpha_vms_bfd_link_hide_symbol): Likewise.
1237 * xsym.c (bfd_sym_bfd_link_hide_symbol): Likewise.
1238 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
1239 _bfd_generic_link_hide_symbol.
1240 (rs6000_xcoff64_aix_vec): Likewise.
1241 * elflink.c (bfd_elf_record_link_assignment): Don't make forced
1242 local symbol dynamic.
1243 (_bfd_elf_link_hide_symbol): New function.
1244 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
1245 check root.ldscript_def.
1246 * targets.c (bfd_target): Add _bfd_link_hide_symbol.
1247 (BFD_JUMP_TABLE_LINK): Add NAME##_bfd_link_hide_symbol.
1248 * bfd-in2.h: Regenerated.
1249 * libbfd.h: Likewise.
1251 2018-05-21 H.J. Lu <hongjiu.lu@intel.com>
1254 * elf.c (setup_group): Mark section in a section group with
1257 2018-05-18 H.J. Lu <hongjiu.lu@intel.com>
1260 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
1261 set eh->local_ref to 1 if a symbol is versioned and there is a
1264 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
1266 * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Handle
1269 2018-05-18 Jim Wilson <jimw@sifive.com>
1271 * elfnn-riscv.c (allocate_dynrelocs): Discard dynamic relocations if
1272 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1273 (riscv_elf_relocate_section): Don't generate dynamic relocation if
1274 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1275 (riscv_elf_finish_dynamic_symbol): Likewise.
1277 2018-05-18 John Darrington <john@darrington.wattle.id.au>
1279 * Makefile.am: Add s12z files.
1280 * Makefile.in: Regenerate.
1281 * archures.c: Add bfd_s12z_arch.
1282 * bfd-in.h: Add exports of bfd_putb24 and bfd_putl24.
1283 * bfd-in2.h: Regenerate.
1284 * config.bfd: Add s12z target.
1285 * configure.ac: Add s12z target.
1286 * configure: Regenerate.
1287 * cpu-s12z.c: New file.
1288 * elf32-s12z.c: New file.
1289 * libbfd.c (bfd_putb24): New function.
1290 (bfd_putl24): New function.
1291 * libbfd.h: Regenerate.
1292 * reloc.c: Add s12z relocations.
1293 (bfd_get_reloc_size): Handle size 5 relocs.
1294 * targets.c: Add s12z_elf32_vec.
1296 2018-05-18 H.J. Lu <hongjiu.lu@intel.com>
1299 * elf32-i386.c (elf_i386_relocate_section): Handle R_386_GOT32X
1301 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
1302 set eh->local_ref to 1 for linker defined symbols.
1304 2018-05-18 Alan Modra <amodra@gmail.com>
1307 * elf.c (setup_group): Formatting. Check that SHT_GROUP entries
1308 don't point at other SHT_GROUP sections. Set shdr corresponding
1309 to invalid entry, to NULL rather than section 0. Identify
1310 SHT_GROUP section index when reporting an error. Cope with NULL
1313 2018-05-18 Alan Modra <amodra@gmail.com>
1315 * libbfd-in.h (ATTRIBUTE_HIDDEN): Define and use throughout.
1316 * configure.ac (HAVE_HIDDEN): Check compiler support for hidden
1318 * libbfd.h: Regenerate.
1319 * configure: Regenerate.
1320 * config.in: Regenerate.
1322 2018-05-18 Alan Modra <amodra@gmail.com>
1324 * libbfd-in.h: Add include guard.
1325 * libcoff-in.h: Likewise.
1326 * doc/Makefile.am (libbfd.h, libcoff.h): Append another #endif.
1327 * doc/Makefile.in: Regenerate.
1328 * libbfd.h: Regenerate.
1329 * libcoff.h: Regenerate.
1331 2018-05-16 Maciej W. Rozycki <macro@mips.com>
1333 * elf32-nds32.c (nds32_convert_32_to_16): Preset `insn_type'.
1335 2018-05-16 Alan Modra <amodra@gmail.com>
1338 * format.c (struct bfd_preserve): Add section_id.
1339 (bfd_preserve_save, bfd_preserve_restore): Save and restore
1341 (bfd_reinit): Set _bfd_section_id.
1342 (bfd_check_format_matches): Put all matches of any priority into
1343 matching_vector. Save initial section id and start each attempted
1344 match at that section id.
1345 * libbfd-in.h (_bfd_section_id): Declare.
1346 * section.c (_bfd_section_id): Rename from section_id and make
1347 global. Adjust uses.
1348 (bfd_get_next_section_id): Delete.
1349 * elf64-ppc.c (ppc64_elf_setup_section_lists): Replace use of
1350 bfd_get_section_id with _bfd_section_id.
1351 * libbfd.h: Regenerate.
1352 * bfd-in2.h: Regenerate.
1354 2018-05-15 Christophe Guillon <christophe.guillon@st.com>
1356 * coffcode.h (coff_bigobj_swap_aux_in): Make sure that all fields
1357 of the aux structure are initialised.
1359 2018-05-15 Francois H. Theron <francois.theron@netronome.com>
1361 * targets.c: Wrap nfp_elf64_vec in BFD64 ifdef.
1363 2018-05-15 Nick Clifton <nickc@redhat.com>
1365 * po/pt.po: New Portuguese translation.
1366 * configure.ac (ALL_LINGUAS): Add pt.
1367 * configure: Regenerate.
1369 2018-05-14 H.J. Lu <hongjiu.lu@intel.com>
1372 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Don't issue
1373 an error on IFUNC pointer defined in PDE.
1374 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Call
1375 _bfd_x86_elf_link_fixup_ifunc_symbol.
1376 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
1377 * elfxx-x86.c (_bfd_x86_elf_link_fixup_ifunc_symbol): New
1379 * elfxx-x86.h (_bfd_x86_elf_link_fixup_ifunc_symbol): New.
1381 2018-05-14 H.J. Lu <hongjiu.lu@intel.com>
1384 * elfxx-x86.c (elf_x86_linker_defined): New function.
1385 (_bfd_x86_elf_link_check_relocs): Use it to mark __bss_start,
1386 _end and _edata locally defined within executables.
1388 2018-05-12 Alan Modra <amodra@gmail.com>
1391 * elf.c (rewrite_elf_program_header): Use segment_mark only for
1392 PT_LOAD headers. Delete first_matching_lma and first_suggested_lma.
1393 Instead make matching_lma and suggested_lma pointers to the
1394 sections. Align section vma and lma calculated from segment.
1395 Don't clear includes_phdrs or includes_filehdr based on p_paddr
1396 test. Try to handle alignment padding before first section by
1397 adjusting new segment lma down. Adjust PT_PHDR map p_paddr.
1399 2018-05-09 Dimitar Dimitrov <dimitar@dinux.eu>
1401 * elf32-pru.c (pru_elf32_do_ldi32_relocate): Make LDI32 relocation
1402 conformant to TI ABI.
1403 (pru_elf32_relax_section): Likewise.
1404 (pru_elf_relax_delete_bytes): Fix offsets for new LDI32 code.
1405 * elf32-pru.c (pru_elf32_do_ldi32_relocate): Ignore addend.
1406 (pru_elf32_pmem_relocate): Trap - should not get here.
1407 (pru_elf32_relocate_section): Add support for REL relocations.
1408 (elf_info_to_howto_rel): Enable REL.
1409 (elf_backend_may_use_rel_p): Likewise.
1410 (elf_backend_may_use_rela_p): Likewise.
1411 (elf_backend_default_use_rela_p): Likewise.
1413 2018-05-09 Alan Modra <amodra@gmail.com>
1416 * peXXigen.c (pe_print_edata): Correct minimum size.
1418 2018-05-09 Alan Modra <amodra@gmail.com>
1421 * peXXigen.c (pe_print_idata): Bound check hint_addr.
1423 2018-05-08 Nick Clifton <nickc@redhat.com>
1426 * elf.c (bfd_elf_get_str_section): Check for an excessively large
1428 * elf-attrs.c (_bfd_elf_parse_attributes): Issue an error if the
1429 attribute section is larger than the size of the file.
1431 2018-05-07 Alan Modra <amodra@gmail.com>
1433 * cofflink.c (_bfd_coff_link_input_bfd): Use memcmp rather than
1434 strncmp when checking for ".bf" special symbol.
1435 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Make pe_required_section_flags
1436 section name a char array, remove sentinal known_sections entry,
1437 and adjust loop over known_sections to suit. Use memcmp rather
1440 2018-05-04 Alan Modra <amodra@gmail.com>
1442 * elf-linux-core.h (struct elf_external_linux_prpsinfo32_ugid32),
1443 (struct elf_external_linux_prpsinfo32_ugid16),
1444 (struct elf_external_linux_prpsinfo64_ugid32),
1445 (struct elf_external_linux_prpsinfo64_ugid16): Add ATTRIBUTE_NONSTRING
1446 to pr_fname and pr_psargs fields. Remove GCC diagnostic pragmas.
1448 * elf.c (elfcore_write_prpsinfo): ..here. Indent nested preprocessor
1450 * elf32-arm.c (elf32_arm_nabi_write_core_note): Add ATTRIBUTE_NONSTRING
1452 * elf32-ppc.c (ppc_elf_write_core_note): Likewise.
1453 * elf32-s390.c (elf_s390_write_core_note): Likewise.
1454 * elf64-s390.c (elf_s390_write_core_note): Likewise.
1455 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise.
1456 * elf64-x86-64.c (elf_x86_64_write_core_note): Add GCC diagnostic
1458 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Use strnlen to avoid
1459 false positive gcc-8 warning.
1460 * cofflink.c (_bfd_coff_link_input_bfd): Likewise.
1462 2018-05-04 Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
1464 * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Fix the order
1465 of arguments when warning about different long double types.
1467 2018-05-03 Simon Atanasyan <simon@atanasyan.com>
1469 * elf32-mips.c: (elf32_mips_fixup_symbol): New function.
1470 (elf_backend_fixup_symbol): New macro.
1471 * elfxx-mips.c: (mips_elf_output_extsym): Discard _gp_disp
1473 (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
1475 2018-04-30 Francois H. Theron <francois.theron@netronome.com>
1477 * Makefile.am: Added NFP files to build.
1478 * archures.c: Added bfd_arch_nfp
1479 * config.bfd: Added NFP support.
1480 * configure.ac: Added NFP support.
1481 * cpu-nfp.c: New, for NFP support.
1482 * elf-bfd.h: Added elf_section_info()
1483 * elf64-nfp.c: New, for NFP support.
1484 * po/SRC-POTFILES.in: Added NFP source files.
1485 * targets.c: Added nfp_elf64_vec
1486 * bfd-in2.h: Regenerate.
1487 * Makefile.in: Regenerate.
1488 * configure: Regenerate.
1490 2018-04-27 Alan Modra <amodra@gmail.com>
1492 * bfd-in2.h: Regenerate.
1493 * libbfd.h: Regenerate.
1495 2018-04-27 Alan Modra <amodra@gmail.com>
1499 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't drop plt
1501 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Comment fixes.
1503 2018-04-26 Pedro Alves <palves@redhat.com>
1505 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't consider
1506 ifunc and non-ifunc symbols duplicates.
1508 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1509 Mickaël Guêné <mickael.guene@st.com>
1511 * elf32-arm.c (elf32_arm_fdpic_thumb_plt_entry): New.
1512 (elf32_arm_plt_needs_thumb_stub_p): Handle thumb-only case.
1513 (elf32_arm_populate_plt_entry): Likewise.
1514 (elf32_arm_output_plt_map_1): Likewise.
1515 (elf32_arm_output_arch_local_syms): Likewise.
1517 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1518 Mickaël Guêné <mickael.guene@st.com>
1520 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Handle
1521 _GLOBAL_OFFSET_TABLE_ in FDPIC mode.
1523 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1524 Mickaël Guêné <mickael.guene@st.com>
1526 * elf32-arm.c (bfd_elf32_arm_set_target_params): Handle FDPIC case
1529 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1530 Mickaël Guêné <mickael.guene@st.com>
1532 * elf32-arm.c (DEFAULT_STACK_SIZE): New.
1533 (elf32_arm_always_size_sections): Create stack segment.
1535 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1536 Mickaël Guêné <mickael.guene@st.com>
1538 * bfd-in2.h (BFD_RELOC_ARM_TLS_GD32_FDPIC)
1539 (BFD_RELOC_ARM_TLS_LDM32_FDPIC, BFD_RELOC_ARM_TLS_IE32_FDPIC): New
1541 * elf32-arm.c (elf32_arm_howto_table_2): Add R_ARM_TLS_GD32_FDPIC,
1542 R_ARM_TLS_LDM32_FDPIC, R_ARM_TLS_IE32_FDPIC relocations.
1543 (elf32_arm_reloc_map): Add R_ARM_TLS_GD32_FDPIC,
1544 R_ARM_TLS_LDM32_FDPIC, R_ARM_TLS_IE32_FDPIC.
1545 (struct elf32_arm_link_hash_table): Update comment.
1546 (elf32_arm_final_link_relocate): Handle TLS FDPIC relocations.
1547 (IS_ARM_TLS_RELOC): Likewise.
1548 (elf32_arm_check_relocs): Likewise.
1549 (allocate_dynrelocs_for_symbol): Likewise.
1550 (elf32_arm_size_dynamic_sections): Update comment.
1551 * reloc.c: Add BFD_RELOC_ARM_TLS_GD32_FDPIC,
1552 BFD_RELOC_ARM_TLS_LDM32_FDPIC, BFD_RELOC_ARM_TLS_IE32_FDPIC.
1554 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1555 Mickaël Guêné <mickael.guene@st.com>
1557 * elf32-arm.c (elf32_arm_fdpic_plt_entry): New.
1558 (elf32_arm_create_dynamic_sections): Handle FDPIC.
1559 (elf32_arm_allocate_plt_entry): Likewise.
1560 (elf32_arm_populate_plt_entry): Likewise.
1561 (elf32_arm_output_plt_map_1): Likewise.
1563 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1564 Mickaël Guêné <mickael.guene@st.com>
1566 * elf32-arm.c (struct fdpic_local): New.
1567 (elf_arm_obj_tdata): Add local_fdpic_cnts field.
1568 (elf32_arm_local_fdpic_cnts): New.
1569 (struct fdpic_global): New.
1570 (elf32_arm_link_hash_entry): Add fdpic_cnts field.
1571 (elf32_arm_link_hash_table): Add srofixup field.
1572 (arm_elf_add_rofixup): New.
1573 (arm_elf_fill_funcdesc): New.
1574 (elf32_arm_link_hash_newfunc): Handle fdpic_cnts.
1575 (elf32_arm_allocate_local_sym_info): Likewise.
1576 (create_got_section): Create .rofixup section.
1577 (elf32_arm_copy_indirect_symbol): Handle fdpic_cnts.
1578 (bfd_elf32_arm_set_target_params): Handle FDPIC.
1579 (elf32_arm_final_link_relocate): Likewise.
1580 (elf32_arm_check_relocs): Likewise.
1581 (allocate_dynrelocs_for_symbol): Likewise.
1582 (elf32_arm_size_dynamic_sections): Likewise.
1583 (elf32_arm_finish_dynamic_sections): Likewise.
1584 (elf32_arm_output_arch_local_syms): Likewise.
1585 (elf32_arm_fdpic_omit_section_dynsym): New.
1587 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1588 Mickaël Guêné <mickael.guene@st.com>
1590 * bfd-in2.c (BFD_RELOC_ARM_GOTFUNCDESC)
1591 (BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC)
1592 (BFD_RELOC_ARM_FUNCDESC_VALUE): New.
1593 * elf32-arm.c (elf32_arm_howto_table_2): Add R_ARM_GOTFUNCDESC,
1594 R_ARM_GOTOFFFUNCDESC, R_ARM_FUNCDESC, R_ARM_FUNCDESC_VALUE.
1595 (elf32_arm_howto_from_type): Take new members of
1596 elf32_arm_howto_table_2 into account.
1597 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_GOTFUNCDESC,
1598 BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC,
1599 BFD_RELOC_ARM_FUNCDESC_VALUE.
1600 * reloc.c: Add BFD_RELOC_ARM_GOTFUNCDESC,
1601 BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC,
1602 BFD_RELOC_ARM_FUNCDESC_VALUE.
1604 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1605 Mickaël Guêné <mickael.guene@st.com>
1607 * elf32-arm.c (elf32_arm_print_private_bfd_data): Support
1608 EF_ARM_PIC and ELFOSABI_ARM_FDPIC.
1609 (elf32_arm_post_process_headers): Support ELFOSABI_ARM_FDPIC.
1610 (ELF_OSABI): Define to ELFOSABI_ARM_FDPIC.
1612 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1613 Mickaël Guêné <mickael.guene@st.com>
1615 * config.bfd (arm*-*-linux-*): Add arm_elf32_fdpic_be_vec and
1616 arm_elf32_fdpic_le_vec to targ_selvecs. Accept
1617 arm*-*-uclinuxfdpiceabi.
1618 * configure.ac: Add support for arm_elf32_fdpic_be_vec and
1619 arm_elf32_fdpic_le_vec.
1620 * configure: Regenerate.
1621 * elf32-arm.c (struct elf32_arm_link_hash_table): Add fdpic_p.
1622 (elf32_arm_link_hash_table_create): Initialize fdpic_p.
1623 (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME, TARGET_BIG_SYM)
1624 (TARGET_BIG_NAME, elf_match_priority): Define for FDPIC targets.
1625 (elf32_arm_fdpic_link_hash_table_create): New.
1626 * targets.c (_bfd_target_vector): Add arm_elf32_fdpic_be_vec and
1627 arm_elf32_fdpic_le_vec.
1629 2018-04-25 Alan Modra <amodra@gmail.com>
1631 * elf-linux-core.h: Disable gcc-8 string truncation warning.
1632 * elf.c (elfcore_write_prpsinfo): Likewise.
1634 2018-04-25 Alan Modra <amodra@gmail.com>
1636 * Makefile.am: Remove arm-aout and arm-coff support.
1637 * config.bfd: Likewise.
1638 * configure.ac: Likewise.
1639 * targets.c: Likewise.
1640 * aout-arm.c: Delete.
1641 * armnetbsd.c: Delete.
1643 * Makefile.in: Regenerate.
1644 * configure: Regenerate.
1645 * po/SRC-POTFILES.in: Regenerate.
1647 2018-04-24 Nick Clifton <nickc@redhat.com>
1650 * elf.c (ignore_section_sym): Check for the output_section pointer
1651 being NULL before dereferencing it.
1654 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Check for
1655 a negative PE_DEBUG_DATA size before iterating over the debug data.
1657 2018-04-23 Alan Modra <amodra@gmail.com>
1659 * elf-linux-core.h: Revert last change.
1662 2018-04-23 Nick Clifton <nickc@redhat.com>
1665 * aoutx.h (aout_get_external_symbols): Allocate an extra byte at
1666 the end of the string table, and zero it.
1668 2018-04-23 Alan Modra <amodra@gmail.com>
1670 * elf-linux-core.h (swap_linux_prpsinfo32_ugid32_out): Disable
1671 gcc-8 string truncation warning.
1672 (swap_linux_prpsinfo32_ugid16_out): Likewise.
1673 (swap_linux_prpsinfo64_ugid32_out): Likewise.
1674 (swap_linux_prpsinfo64_ugid16_out): Likewise.
1675 * elf.c (elfcore_write_prpsinfo): Likewise.
1677 2018-04-23 Nick Clifton <nickc@redhat.com>
1680 * aoutx.h (aout_get_external_symbols): Allocate an extra byte at
1681 the end of the string table, and zero it.
1683 2018-04-20 Alan Modra <amodra@gmail.com>
1686 * elf32-hppa.c (got_relocs_needed): Add extra param to special
1687 case both dtprel and tprel relocs.
1688 (allocate_dynrelocs): Adjust conditions for got relocs.
1689 (elf32_hppa_relocate_section): Likewise for local sym got relocs.
1690 Emit dynamic relocs on TLS GOT entries for shared libraries,
1691 not when pic. Omit dynamic reloc on dtprel entry when local,
1692 and on tprel entry when local and executable.
1694 2018-04-19 Alan Modra <amodra@gmail.com>
1697 * elf32-hppa.c (elf32_hppa_size_stubs): Init "destination" to -1.
1698 (hppa_type_of_stub): Don't return a long branch stub for
1699 symbols other than those defined statically.
1701 2018-04-19 Alan Modra <amodra@gmail.com>
1703 * Makefile.am: Revert 2018-04-18 coff-mips changes.
1704 * config.bfd: Add back mips_ecoff_le_vec and mips_ecoff_be_vec
1705 to selvecs for mips targets change 2018-04-18.
1706 * configure.ac: Reinstate mips_ecoff_le_vec, mips_ecoff_be_vec
1707 and mips_ecoff_bele_vec.
1708 * targets.c: Likewise.
1709 * coff-mips.c: Resurrect.
1710 * Makefile.in: Regenerate.
1711 * configure: Regenerate.
1712 * po/SRC-POTFILES.in: Regenerate.
1714 2018-04-18 Alan Modra <amodra@gmail.com>
1716 * Makefile.am: Remove mips aout and coff support.
1717 * config.bfd: Likewise.
1718 * configure.ac: Likewise.
1719 * targets.c: Likewise.
1720 * coff-mips.c: Delete
1723 * pei-mips.c: Delete
1724 * Makefile.in: Regenerate.
1725 * configure: Regenerate.
1726 * po/SRC-POTFILES.in: Regenerate.
1728 2018-04-17 H.J. Lu <hongjiu.lu@intel.com>
1730 * elf32-i386.c (elf32_bed): Define before including
1732 * elf64-x86-64.c (elf64_bed): Define before including
1734 (elf32_bed): Define before including "elf32-target.h".
1736 2018-04-17 H.J. Lu <hongjiu.lu@intel.com>
1739 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Use a
1740 normal input file with compatible relocation.
1742 2018-04-18 Alan Modra <amodra@gmail.com>
1744 * Makefile.am: Remove support for assorted i386 aout and coff targets.
1745 * config.bfd: Likewise.
1746 * configure.ac: Likewise.
1747 * doc/bfdint.texi: Likewise.
1748 * targets.c: Likewise.
1749 * freebsd.h: Delete.
1750 * i386dynix.c: Delete.
1751 * i386freebsd.c: Delete.
1752 * i386linux.c: Delete.
1753 * i386mach3.c: Delete.
1754 * i386netbsd.c: Delete.
1755 * i386os9k.c: Delete.
1756 * Makefile.in: Regenerate.
1757 * configure: Regenerate.
1758 * po/SRC-POTFILES.in: Regenerate.
1760 2018-04-17 Andrew Sadek <andrew.sadek.se@gmail.com>
1762 Microblaze Target: PIC data text relative
1764 * bfd/reloc.c (2 new BFD relocations):
1765 BFD_RELOC_MICROBLAZE_64_TEXTPCREL &
1766 BFD_RELOC_MICROBLAZE_64_TEXTPCREL
1767 * bfd/bfd-in2.h: Regenerate
1768 * bfd/libbfd.h: Regenerate
1769 * bfd/elf32-microblaze.c (Handle new relocs): define 'HOWTO' of 3
1770 new relocs and handle them in both relocate and relax functions.
1771 (microblaze_elf_reloc_type_lookup): add mapping between for new
1773 (microblaze_elf_relocate_section): Handle new relocs in case of
1775 (microblaze_elf_relax_section): Handle new relocs for elf relaxation.
1777 2018-04-17 Nick Clifton <nickc@redhat.com>
1780 * aoutx.h (find_nearest_line): Check that the symbol name exists
1781 and is long enough, before attempting to see if it is for a .o
1783 * hash.c (bfd_hash_hash): Add an assertion that the string is not
1785 * linker.c (bfd_link_hash_lookup): Fail if the table or string are
1787 (_bfd_generic_link_add_archive_symbols): Fail if an archive entry
1791 * dwarf2.c (concat_filename): Check for a NULL table pointer.
1793 2018-04-16 Nick Clifton <nickc@redhat.com>
1796 * coffgen.c (coff_pointerize_aux): Check for an out of range
1799 2018-04-16 Alan Modra <amodra@gmail.com>
1801 * Makefile.am: Remove arm-epoc-pe support.
1802 * coff-arm.c: Likewise.
1803 * config.bfd: Likewise.
1804 * configure.ac: Likewise.
1805 * targets.c: Likewise.
1806 * epoc-pe-arm.c: Delete.
1807 * epoc-pei-arm.c: Delete.
1808 * Makefile.in: Regenerate.
1809 * configure: Regenerate.
1810 * po/SRC-POTFILES.in: Regenerate.
1812 2018-04-16 Alan Modra <amodra@gmail.com>
1814 * Makefile.am: Remove sparc-aout and sparc-coff support.
1815 * config.bfd: Likewise.
1816 * configure.ac: Likewise.
1817 * targets.c: Likewise.
1818 * aout-sparcle.c: Delete.
1820 * cf-sparclynx.c: Delete.
1821 * coff-sparc.c: Delete.
1823 * sparclinux.c: Delete.
1824 * sparclynx.c: Delete.
1825 * sparcnetbsd.c: Delete.
1827 * Makefile.in: Regenerate.
1828 * configure: Regenerate.
1829 * po/SRC-POTFILES.in: Regenerate.
1831 2018-04-16 Alan Modra <amodra@gmail.com>
1833 * Makefile.am: Remove m68k-aout and m68k-coff support.
1834 * aoutf1.h: Likewise.
1835 * aoutx.h: Likewise.
1836 * archive.c: Likewise.
1837 * bfd-in.h: Likewise.
1839 * coffcode.h: Likewise.
1840 * coffswap.h: Likewise.
1841 * config.bfd: Likewise.
1842 * configure.ac: Likewise.
1843 * configure.host: Likewise.
1844 * doc/bfd.texinfo: Likewise.
1845 * doc/bfdint.texi: Likewise.
1846 * freebsd.h: Likewise.
1847 * gen-aout.c: Likewise.
1848 * hpux-core.c: Likewise.
1849 * libaout.h: Likewise.
1850 * libbfd-in.h: Likewise.
1851 * pdp11.c: Likewise.
1852 * peicode.h: Likewise.
1853 * riscix.c: Likewise.
1854 * targets.c: Likewise.
1856 * coff-apollo.c: Delete.
1857 * coff-aux.c: Delete.
1858 * coff-m68k.c: Delete.
1859 * coff-svm68k.c: Delete.
1860 * coff-u68k.c: Delete.
1861 * hosts/delta68.h: Delete.
1862 * hosts/hp300bsd.h: Delete.
1863 * hosts/m68kaux.h: Delete.
1864 * hosts/news.h: Delete.
1865 * hp300bsd.c: Delete.
1866 * hp300hpux.c: Delete.
1867 * liboasys.h: Delete.
1868 * m68k4knetbsd.c: Delete.
1869 * m68klinux.c: Delete.
1870 * m68knetbsd.c: Delete.
1872 * versados.c: Delete.
1873 * Makefile.in: Regenerate.
1874 * bfd-in2.h: Regenerate.
1875 * configure: Regenerate.
1876 * libbfd.h: Regenerate.
1877 * po/SRC-POTFILES.in: Regenerate.
1879 2018-04-16 Alan Modra <amodra@gmail.com>
1881 * Makefile.am: Remove sh5 and sh64 support.
1882 * archures.c: Likewise.
1883 * config.bfd: Likewise.
1884 * configure.ac: Likewise.
1885 * cpu-sh.c: Likewise.
1886 * elf32-sh-relocs.h: Likewise.
1887 * elf32-sh.c: Likewise.
1888 * targets.c: Likewise.
1889 * elf32-sh64-com.c: Delete.
1890 * elf32-sh64.c: Delete.
1891 * elf32-sh64.h: Delete.
1892 * elf64-sh64.c: Delete.
1893 * Makefile.in: Regenerate.
1894 * bfd-in2.h: Regenerate.
1895 * configure: Regenerate.
1896 * po/SRC-POTFILES.in: Regenerate.
1898 2018-04-16 Alan Modra <amodra@gmail.com>
1900 * Makefile.am: Remove sh-symbianelf support.
1901 * config.bfd: Likewise.
1902 * configure.ac: Likewise.
1903 * targets.c: Likewise.
1904 * elf32-sh-symbian.c: Delete.
1905 * Makefile.in: Regenerate.
1906 * configure: Regenerate.
1907 * po/SRC-POTFILES.in: Regenerate.
1909 2018-04-16 Alan Modra <amodra@gmail.com>
1911 * Makefile.am: Remove vax-bsd and vax-ultrix support.
1912 * config.bfd: Likewise.
1913 * configure.ac: Likewise.
1914 * targets.c: Likewise.
1916 * Makefile.in: Regenerate.
1917 * configure: Regenerate.
1918 * po/SRC-POTFILES.in: Regenerate.
1920 2018-04-16 Alan Modra <amodra@gmail.com>
1922 * Makefile.am: Remove w65 support.
1923 * archures.c: Likewise.
1924 * coffcode.h: Likewise.
1925 * config.bfd: Likewise.
1926 * configure.ac: Likewise.
1927 * targets.c: Likewise.
1928 * coff-w65.c: Delete.
1929 * cpu-w65.c: Delete.
1930 * Makefile.in: Regenerate.
1931 * bfd-in2.h: Regenerate.
1932 * configure: Regenerate.
1933 * po/SRC-POTFILES.in: Regenerate.
1935 2018-04-16 Alan Modra <amodra@gmail.com>
1937 * Makefile.am: Remove we32k support.
1938 * archures.c: Likewise.
1939 * coffcode.h: Likewise.
1940 * config.bfd: Likewise.
1941 * configure.ac: Likewise.
1942 * targets.c: Likewise.
1943 * coff-we32k.c: Delete.
1944 * cpu-we32k.c: Delete.
1945 * Makefile.in: Regenerate.
1946 * bfd-in2.h: Regenerate.
1947 * configure: Regenerate.
1948 * po/SRC-POTFILES.in: Regenerate.
1950 2018-04-16 Alan Modra <amodra@gmail.com>
1952 * Makefile.am: Remove m88k support.
1953 * aoutx.h: Likewise.
1954 * archures.c: Likewise.
1955 * coffcode.h: Likewise.
1956 * coffswap.h: Likewise.
1957 * config.bfd: Likewise.
1958 * configure.ac: Likewise.
1959 * cpu-ns32k.c: Likewise.
1960 * elf32-nds32.c: Likewise.
1961 * mach-o.c: Likewise.
1962 * netbsd-core.c: Likewise.
1963 * reloc.c: Likewise.
1964 * targets.c: Likewise.
1965 * coff-m88k.c: Delete.
1966 * cpu-m88k.c: Delete.
1967 * elf32-m88k.c: Delete.
1968 * hosts/m88kmach3.h: Delete.
1969 * m88kmach3.c: Delete.
1970 * m88kopenbsd.c: Delete.
1971 * Makefile.in: Regenerate.
1972 * bfd-in2.h: Regenerate.
1973 * configure: Regenerate.
1974 * po/SRC-POTFILES.in: Regenerate.
1976 2018-04-16 Alan Modra <amodra@gmail.com>
1978 * Makefile.am: Remove i370 support.
1979 * archures.c: Likewise.
1980 * config.bfd: Likewise.
1981 * configure.ac: Likewise.
1982 * targets.c: Likewise.
1983 * cpu-i370.c: Delete.
1984 * elf32-i370.c: Delete.
1985 * Makefile.in: Regenerate.
1986 * bfd-in2.h: Regenerate.
1987 * configure: Regenerate.
1988 * po/SRC-POTFILES.in: Regenerate.
1990 2018-04-16 Alan Modra <amodra@gmail.com>
1992 * Makefile.am: Remove h8500 support.
1993 * archures.c: Likewise.
1994 * coffcode.h: Likewise.
1995 * config.bfd: Likewise.
1996 * configure.ac: Likewise.
1997 * targets.c: Likewise.
1998 * coff-h8500.c: Delete.
1999 * cpu-h8500.c: Delete.
2000 * Makefile.in: Regenerate.
2001 * bfd-in2.h: Regenerate.
2002 * configure: Regenerate.
2003 * po/SRC-POTFILES.in: Regenerate.
2005 2018-04-16 Alan Modra <amodra@gmail.com>
2007 * Makefile.am: Remove h8300-coff support.
2008 * coffcode.h: Likewise.
2009 * config.bfd: Likewise.
2010 * configure.ac: Likewise.
2011 * reloc16.c: Likewise.
2012 * targets.c: Likewise.
2013 * coff-h8300.c: Delete.
2014 * Makefile.in: Regenerate.
2015 * configure: Regenerate.
2016 * po/SRC-POTFILES.in: Regenerate.
2018 2018-04-16 Alan Modra <amodra@gmail.com>
2020 * Makefile.am: Remove IEEE 695 support.
2021 * archures.c: Likewise.
2023 * config.bfd: Likewise.
2024 * configure.ac: Likewise.
2025 * doc/bfd.texinfo: Likewise.
2026 * doc/bfdint.texi: Likewise.
2027 * doc/bfdsumm.texi: Likewise.
2028 * section.c: Likewise.
2029 * targets.c: Likewise.
2031 * libieee.h: Delete.
2032 * Makefile.in: Regenerate.
2033 * bfd-in2.h: Regenerate.
2034 * configure: Regenerate.
2035 * po/SRC-POTFILES.in: Regenerate.
2037 2018-04-16 Alan Modra <amodra@gmail.com>
2039 * config.bfd: Remove tandem support.
2041 2018-04-16 Alan Modra <amodra@gmail.com>
2043 * Makefile.am: Remove newsos3 support.
2044 * aoutx.h: Likewise.
2045 * config.bfd: Likewise.
2046 * configure.ac: Likewise.
2047 * targets.c: Likewise.
2048 * newsos3.c: Delete.
2049 * Makefile.in: Regenerate.
2050 * configure: Regenerate.
2051 * po/SRC-POTFILES.in: Regenerate.
2053 2018-04-16 Alan Modra <amodra@gmail.com>
2055 * Makefile.am: Remove netware support.
2056 * bfd-in.h: Likewise.
2058 * config.bfd: Likewise.
2059 * configure.ac: Likewise.
2060 * doc/bfdint.texi: Likewise.
2061 * ecoff.c: Likewise.
2062 * targets.c: Likewise.
2064 * nlm-target.h: Delete.
2066 * nlm32-alpha.c: Delete.
2067 * nlm32-i386.c: Delete.
2068 * nlm32-ppc.c: Delete.
2069 * nlm32-sparc.c: Delete.
2072 * nlmcode.h: Delete.
2073 * nlmswap.h: Delete.
2074 * Makefile.in: Regenerate.
2075 * bfd-in2.h: Regenerate.
2076 * configure: Regenerate.
2077 * po/SRC-POTFILES.in: Regenerate.
2079 2018-04-16 Alan Modra <amodra@gmail.com>
2081 * archures.c: Remove tahoe support.
2082 * config.bfd: Likewise.
2083 * configure.ac: Likewise.
2084 * hosts/tahoe.h: Delete.
2085 * bfd-in2.h: Regenerate.
2086 * configure: Regenerate.
2088 2018-04-14 Alan Modra <amodra@gmail.com>
2090 * elf-bfd.h (struct elf_backend_data): Add relropagesize.
2091 * elfxx-target.h (ELF_RELROPAGESIZE): Provide default and
2093 (elfNN_bed): Init relropagesize.
2094 * bfd.c (bfd_emul_get_commonpagesize): Add boolean param to
2095 select relropagesize.
2096 * elf32-ppc.c (ELF_COMMONPAGESIZE): Define as 0x1000.
2097 (ELF_RELROPAGESIZE): Define as ELF_MAXPAGESIZE.
2098 (ELF_MINPAGESIZE): Don't define.
2099 * elf64-ppc.c (ELF_COMMONPAGESIZE): Define as 0x1000.
2100 (ELF_RELROPAGESIZE): Define as ELF_MAXPAGESIZE.
2101 * bfd-in2.h: Regenerate.
2103 2018-04-14 Alan Modra <amodra@gmail.com>
2105 * elf32-ppc.c (ELF_MAXPAGESIZE, ELF_COMMONPAGESIZE): Don't depend
2106 on __QNXTARGET__ define.
2108 2018-04-14 Alan Modra <amodra@gmail.com>
2110 * config.bfd: Add powerpc-*-lynxos* and powerpc-*-windiss*
2113 2018-04-11 Alan Modra <amodra@gmail.com>
2115 * aout-adobe.c: Delete.
2117 * coff-i860.c: Delete.
2118 * coff-i960.c: Delete.
2119 * cpu-i860.c: Delete.
2120 * cpu-i960.c: Delete.
2121 * elf32-i860.c: Delete.
2122 * elf32-i960.c: Delete.
2123 * hosts/i860mach3.h: Delete.
2124 * Makefile.am: Remove i860, i960, bout, and adobe support.
2125 * archures.c: Remove i860 and i960 support.
2126 * coffcode.h: Likewise.
2127 * reloc.c: Likewise.
2128 * aoutx.h: Comment updates.
2129 * archive.c: Remove BOUT and i960 support.
2130 * bfd.c: Remove BOUT support.
2131 * coffswap.h: Remove i960 support.
2132 * config.bfd: Remove i860, i960 and adobe targets.
2133 * configure.ac: Remove adode, bout, i860, i960, icoff targets.
2134 * targets.c: Likewise.
2135 * ieee.c: Remove i960 support.
2136 * mach-o.c: Remove i860 support.
2137 * Makefile.in: Regenerate.
2138 * bfd-in2.h: Regenerate.
2139 * configure: Regenerate.
2140 * libbfd.h: Regenerate.
2141 * po/SRC-POTFILES.in: Regenerate.
2143 2018-04-09 Maciej W. Rozycki <macro@mips.com>
2145 * elf64-mips.c (mips_elf64_write_rel): Handle a NULL BFD pointer
2146 in the BFD symbol referred by the relocation.
2147 (mips_elf64_write_rela): Likewise.
2149 2018-04-09 Maciej W. Rozycki <macro@mips.com>
2151 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Issue an
2152 error for out-of-range `r_sym' values.
2154 2018-04-09 Alan Modra <amodra@gmail.com>
2156 * elf64-ppc.c (struct _ppc64_elf_section_data): Add has_pltcall field.
2157 (struct ppc_link_hash_table): Add can_convert_all_inline_plt.
2158 (ppc64_elf_check_relocs): Set has_pltcall.
2159 (ppc64_elf_adjust_dynamic_symbol): Discard some PLT entries.
2160 (ppc64_elf_inline_plt): New function.
2161 (ppc64_elf_size_dynamic_sections): Discard some PLT entries for locals.
2162 * elf64-ppc.h (ppc64_elf_inline_plt): Declare.
2163 * elf32-ppc.c (has_pltcall): Define.
2164 (struct ppc_elf_link_hash_table): Add can_convert_all_inline_plt.
2165 (ppc_elf_check_relocs): Set has_pltcall.
2166 (ppc_elf_inline_plt): New function.
2167 (ppc_elf_adjust_dynamic_symbol): Discard some PLT entries.
2168 (ppc_elf_size_dynamic_sections): Likewise.
2169 * elf32-ppc.h (ppc_elf_inline_plt): Declare.
2171 2018-04-09 Alan Modra <amodra@gmail.com>
2173 * elf32-ppc.c (ppc_elf_howto_raw): Add PLTSEQ and PLTCALL howtos.
2174 (is_plt_seq_reloc): New function.
2175 (ppc_elf_check_relocs): Handle PLTSEQ and PLTCALL relocs.
2176 (ppc_elf_tls_optimize): Handle inline plt call sequence.
2177 (ppc_elf_relax_section): Handle PLTCALL reloc.
2178 (ppc_elf_relocate_section): Nop out inline plt call sequence when
2180 * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_PLTSEQ and
2181 R_PPC64_PLTCALL entries. Comment R_PPC64_TOCSAVE.
2182 (has_tls_get_addr_call): Correct comment.
2183 (is_branch_reloc): Add PLTCALL.
2184 (is_plt_seq_reloc): New function.
2185 (ppc64_elf_check_relocs): Handle PLT16_LO_DS reloc. Set
2186 has_tls_reloc for R_PPC64_TLSGD and R_PPC64_TLSLD. Create plt
2187 entry for R_PPC64_PLTCALL.
2188 (ppc64_elf_tls_optimize): Handle inline plt call sequence.
2189 (ppc_type_of_stub): Handle PLTCALL reloc.
2190 (toc_adjusting_stub_needed): Likewise.
2191 (ppc64_elf_relocate_section): Set "can_plt_call" for PLTCALL
2192 reloc insn. Nop out inline plt call sequence when resolving
2193 locally. Handle __tls_get_addr inline plt call optimization.
2195 2018-04-09 Alan Modra <amodra@gmail.com>
2197 * elf64-ppc.c (LOCAL_PLT_ENTRY_SIZE): Define.
2198 (struct ppc_stub_hash_entry): Add symtype field.
2200 (struct ppc_link_hash_table): Add pltlocal and relpltlocal.
2201 (create_linkage_sections): Create pltlocal and relpltlocal.
2202 (ppc64_elf_check_relocs): Allow PLT relocs on local symbols.
2204 (ppc64_elf_adjust_dynamic_symbol): Keep PLT entries for inline calls.
2205 (allocate_dynrelocs): Allocate pltlocal and relpltlocal.
2206 (ppc64_elf_size_dynamic_sections): Size pltlocal and relpltlocal.
2207 Keep PLT entries for inline calls against locals.
2208 (ppc_build_one_stub): Use pltlocal as appropriate.
2209 (ppc_size_one_stub): Likewise.
2210 (ppc64_elf_size_stubs): Set symtype.
2211 (build_global_entry_stubs_and_plt): Init pltlocal and write
2212 relpltlocal for globals.
2213 (write_plt_relocs_for_local_syms): Likewise for local syms.
2214 (ppc64_elf_relocate_section): Support PLT for local syms.
2215 * elf32-ppc.c (PLT_KEEP): Define.
2216 (struct ppc_elf_link_hash_table): Add pltlocal and relpltlocal.
2217 (ppc_elf_create_glink): Create pltlocal and relpltlocal.
2218 (ppc_elf_check_relocs): Allow PLT relocs on local symbols.
2219 Set PLT_KEEP. Adjust update_local_sym_info call.
2220 (ppc_elf_adjust_dynamic_symbol): Keep PLT entries for inline calls.
2221 (allocate_dynrelocs): Allocate pltlocal and relpltlocal.
2222 (ppc_elf_size_dynamic_sections): Size pltlocal and relpltlocal.
2223 (ppc_elf_relocate_section): Support PLT16 relocs for local syms.
2224 (write_global_sym_plt): Init pltlocal and write relpltlocal.
2225 (ppc_finish_symbols): Likewise for locals.
2227 2018-04-09 Alan Modra <amodra@gmail.com>
2229 * elf64-ppc.c (ppc_build_one_stub): Move output of PLT relocs
2230 for local symbols to..
2231 (write_plt_relocs_for_local_syms): ..here. New function.
2232 (ppc64_elf_finish_dynamic_symbol): Move output of PLT relocs for
2234 (build_global_entry_stubs_and_plt): ..here. Rename from
2235 build_global_entry_stubs.
2236 (ppc64_elf_build_stubs): Always call build_global_entry_stubs_and_plt.
2237 Call write_plt_relocs_for_local_syms.
2238 * elf32-ppc.c (get_sym_h): New function.
2239 (ppc_elf_relax_section): Use get_sym_h.
2240 (ppc_elf_relocate_section): Move output of PLT relocs and glink
2241 stubs for local symbols to..
2242 (ppc_finish_symbols): ..here. New function.
2243 (ppc_elf_finish_dynamic_symbol): Move output of PLT relocs for
2245 (write_global_sym_plt): ..here. New function.
2246 * elf32-ppc.h (ppc_elf_modify_segment_map): Delete attribute.
2247 (ppc_finish_symbols): Declare.
2249 2018-04-09 Alan Modra <amodra@gmail.com>
2251 * elf32-ppc.c (ppc_elf_check_relocs): Handle PLT16 relocs.
2252 (ppc_elf_relocate_section): Likewise.
2253 * elf64-ppc.c (ppc64_elf_check_relocs): Handle PLT16_LO_DS.
2254 (ppc64_elf_relocate_section): Likewise. Correct PLT16
2255 resolution to plt entry relative to toc pointer.
2257 2018-04-09 Alan Modra <amodra@gmail.com>
2259 * elf64-ppc.c (TLS_TLS, TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL,
2260 TLS_TPRELGD, TLS_EXPLICIT): Renumber. Test TLS_TLS throughout
2261 file when other TLS flags are tested in a mask.
2262 (TLS_MARK, NON_GOT): Define.
2263 (PLT_IFUNC): Redefine, and test TLS_TLS throughout file as well.
2264 (update_local_sym_info): Don't create got entry when NON_GOT.
2265 (ppc64_elf_check_relocs): Pass NON_GOT with PLT_IFUNC.
2267 (get_tls_mask): Do toc lookup if tls_mask is just TLS_MARK.
2268 (ppc64_elf_relocate_section): Likewise.
2269 (ppc64_elf_tls_optimize): Don't attempt to optimize indirect
2270 __tls_get_addr calls lacking a marker reloc.
2271 * elf32-ppc.c (TLS_TLS, TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL,
2272 TLS_TPRELGD): Renumber. Update comment.
2273 (TLS_MARK, NON_GOT): Define.
2274 (PLT_IFUNC): Redefine, and test TLS_TLS throughout file as well.
2275 (update_local_sym_info): Don't create got entry when NON_GOT.
2276 (ppc_elf_check_relocs): Pass NON_GOT with PLT_IFUNC.
2278 (ppc_elf_tls_optimize): Don't attempt to optimize indirect
2279 __tls_get_addr calls lacking a marker reloc.
2281 2018-04-06 H.J. Lu <hongjiu.lu@intel.com>
2283 * elf64-x86-64.c (elf_x86_64_info_to_howto): Don't mask out
2284 R_X86_64_converted_reloc_bit.
2286 2018-04-05 H.J. Lu <hongjiu.lu@intel.com>
2289 * configure: Regenerated.
2291 2018-04-05 Alan Modra <amodra@gmail.com>
2293 * elf-hppa.h (elf_hppa_info_to_howto): Init howto to NULL.
2294 (elf_hppa_info_to_howto_rel): Likewise.
2296 2018-04-04 Maciej W. Rozycki <macro@mips.com>
2298 * elf-hppa.h (elf_hppa_info_to_howto): Also return
2299 unsuccessfully for unimplemented relocations.
2300 (elf_hppa_info_to_howto_rel): Likewise.
2302 2018-04-04 Maciej W. Rozycki <macro@mips.com>
2304 * elf32-i860.c (lookup_howto): Add `abfd' parameter. Set the
2305 `bfd_error_bad_value' error and call `_bfd_error_handler' on a
2306 howto lookup failure.
2307 (elf32_i860_reloc_type_lookup): Adjust `lookup_howto' call
2309 (elf32_i860_info_to_howto_rela): Likewise.
2310 (elf32_i860_relocate_splitn): Likewise.
2311 (elf32_i860_relocate_pc16): Likewise.
2312 (elf32_i860_relocate_pc26): Likewise.
2313 (elf32_i860_relocate_section): Likewise.
2315 2018-04-04 Maciej W. Rozycki <macro@mips.com>
2317 * elf32-visium.c (visium_info_to_howto_rela): Correct the range
2318 check for `visium_elf_howto_table' table access.
2320 2018-04-04 Maciej W. Rozycki <macro@mips.com>
2322 * elf32-iq2000.c (iq2000_info_to_howto_rela): Correct the range
2323 check for `iq2000_elf_howto_table' table access.
2325 2018-04-04 Maciej W. Rozycki <macro@mips.com>
2327 * elf32-frv.c (frv_info_to_howto_rela): Correct the range check
2328 for `elf32_frv_howto_table' table access.
2330 2018-04-04 Maciej W. Rozycki <macro@mips.com>
2332 * elf32-mips.c (mips_elf32_rtype_to_howto): Also return
2333 unsuccessfully for placeholder howtos.
2334 * elf64-mips.c (mips_elf64_rtype_to_howto): Likewise.
2335 * elfn32-mips.c (mips_elf_n32_rtype_to_howto): Likewise.
2337 2018-03-29 Maciej W. Rozycki <macro@mips.com>
2339 * elf32-mips.c (mips_info_to_howto_rel): Remove the calls to
2340 `_bfd_error_handler' and to set the `bfd_error_bad_value' error.
2342 2018-03-28 Maciej W. Rozycki <macro@mips.com>
2344 * elf-hppa.h (elf_hppa_info_to_howto_rel): Remove
2345 ATTRIBUTE_UNUSED from `abfd'.
2347 2018-03-28 Maciej W. Rozycki <macro@mips.com>
2349 * elf-hppa.h (elf_hppa_info_to_howto_rel): Correct
2350 `_bfd_error_handler' call formatting.
2352 2018-03-28 Maciej W. Rozycki <macro@mips.com>
2354 * elf32-mips.c (mips_info_to_howto_rel): Call
2355 `mips_elf32_rtype_to_howto' directly rather than via
2356 `->elf_backend_mips_rtype_to_howto'.
2358 2018-03-28 Renlin Li <renlin.li@arm.com>
2361 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Add cases for
2362 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12,
2363 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
2364 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12,
2365 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
2366 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12,
2367 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
2368 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12,
2369 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
2370 (elfNN_aarch64_final_link_relocate): Support new relocations.
2371 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Support new
2373 (_bfd_aarch64_elf_resolve_relocation): Support new relocations.
2375 2018-03-28 Renlin Li <renlin.li@arm.com>
2378 * reloc.c: Add BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12
2379 BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12_NC,
2380 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12,
2381 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
2382 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12,
2383 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
2384 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12,
2385 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
2386 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12,
2387 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
2388 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add table entry for
2389 TLSLE_LDST16_TPREL_LO12,
2390 TLSLE_LDST16_TPREL_LO12_NC,
2391 TLSLE_LDST32_TPREL_LO12,
2392 TLSLE_LDST32_TPREL_LO12_NC,
2393 TLSLE_LDST64_TPREL_LO12,
2394 TLSLE_LDST64_TPREL_LO12_NC,
2395 TLSLE_LDST8_TPREL_LO12,
2396 TLSLE_LDST8_TPREL_LO12_NC.
2397 * bfd-in2.h: Regenerated.
2398 * libbfd.h: Regenerated.
2400 2018-03-28 Eric Botcazou <ebotcazou@adacore.com>
2403 * elfxx-sparc.c (struct _bfd_sparc_elf_link_hash_entry): Add new flag
2404 has_old_style_got_reloc.
2405 (_bfd_sparc_elf_check_relocs) <GOT relocations>: Set it for old-style
2406 relocations. Fix a couple of long lines.
2407 (_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: Do not generate
2408 a R_SPARC_NONE for the GOT slot if the symbol is also subject to old-style
2411 2018-03-25 H.J. Lu <hongjiu.lu@intel.com>
2414 * elf64-x86-64.c (elf_x86_64_finish_dynamic_sections): Add
2415 ENDBR64 to the TLSDESC PLT entry.
2417 2018-03-21 Alan Modra <amodra@gmail.com>
2419 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Trim uninteresting
2420 symbols. Use size_t counts. Delete redundant opd test.
2422 2018-03-21 Alan Modra <amodra@gmail.com>
2424 * elf32-ppc.c (ppc_elf_tls_optimize): Delete locsyms.
2426 2018-03-21 Alan Modra <amodra@gmail.com>
2428 * elf32-ppc.c (struct ppc_elf_link_hash_entry): Make tls_mask
2430 (update_local_sym_info): Likewise for local_got_tls_masks.
2431 (ppc_elf_tls_optimize): Likewise for lgot_masks.
2433 2018-03-21 Alan Modra <amodra@gmail.com>
2435 * elf64-ppc.c (ppc_size_one_stub): Fix comment typo.
2436 (ppc64_elf_layout_multitoc): Allocate relocs for tprel as we
2437 do in size_dynamic_sections.
2439 2018-03-21 Alan Modra <amodra@gmail.com>
2441 * elf64-ppc.c (ppc64_elf_relocate_section): Don't access rel[1]
2442 without first checking array bounds.
2443 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2445 2018-03-20 H.J. Lu <hongjiu.lu@intel.com>
2448 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Set
2449 non_ir_ref_dynamic if a symbol is made dynamic by --dynamic-list.
2451 2018-03-19 Nick Clifton <nickc@redhat.com>
2453 * po/es.po: Updated Spanish translation.
2455 2018-03-15 Max Filippov <jcmvbkbc@gmail.com>
2457 * elf32-xtensa.c (xlate_map_entry): Change types of address
2458 fields from 'unsigned' to 'bfd_vma'.
2459 (xlate_offset_with_removed_text): Use struct xlate_map_entry as
2460 the key argument to bsearch. Allow offsets past the end of a
2461 section, use the last map entry for translation of such offsets.
2463 2018-03-15 Kuan-Lin Chen <kuanlinchentw@gmail.com>
2465 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Removed.
2466 Not support the target feature.
2467 (nds32_elf_ex9_itb_base): Likewise.
2468 (nds32_elf_ex9_import_table): Likewise.
2469 (nds32_elf_ex9_finish): Likewise.
2470 (nds32_elf_ex9_reloc_jmp): Likewise.
2471 (nds32_elf_get_insn_with_reg): Likewise.
2472 (nds32_get_local_syms): Likewise.
2473 (nds32_elf_ex9_replace_instruction): Likewise.
2474 (nds32_elf_ifc_calc): Likewise.
2475 (nds32_elf_ifc_finish): Likewise.
2476 (nds32_elf_ifc_replace): Likewise.
2477 (nds32_elf_ifc_reloc): Likewise.
2479 2018-03-14 Alan Modra <amodra@gmail.com>
2481 * elf64-ppc.c (sfpr_define): Adjust for stub_sec size having
2482 sfpr size added before defining alias symbols.
2483 (ppc64_elf_build_stubs): Add stub section padding before
2484 copying sfpr contents and defining save/restore alias symbols.
2486 2018-03-14 H.J. Lu <hongjiu.lu@intel.com>
2489 * elflink.c (elf_gc_mark_debug_section): Also check the local
2490 debug definition section.
2492 2018-03-13 Nick Clifton <nickc@redhat.com>
2495 * pei-x86_64.c (pex64_get_unwind_info): Change to a boolean
2496 function. Add an end address parameter. Check access of the data
2497 pointer to make sure that they do not extend beyond the end
2498 address. Return FALSE if any check fails. Add the end address
2499 pointer to the ui structure.
2500 (pex64_xdata_print_uwd_codes): Check accesses of the raw unwind
2501 codes to make sure that they do not extend beyond the end address
2502 pointer. Print an error message and return immediately if any
2505 2018-03-09 Nick Clifton <nickc@redhat.com>
2507 * elf64-s390.c (elf_s390_relocate_section): Move check for
2508 relocations against non-allocated sections to before the code that
2509 handles ifunc relocations.
2510 * elf32-s390.c (elf_s390_relocate_section): Likewise.
2511 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Treat
2512 relocs against IFUNC symbols in non-allocated sections as relocs
2513 against FUNC symbols.
2514 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
2516 2018-03-08 H.J. Lu <hongjiu.lu@intel.com>
2519 * elf32-i386.c (elf_i386_relocate_section): Treat relocation
2520 against IFUNC symbol in SHT_NOTE section without SHF_ALLOC as
2521 relocation against FUNC symbol.
2522 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
2524 2018-03-07 Renlin Li <renlin.li@arm.com>
2527 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Check absolute
2528 symbol, and don't emit relocation in specific case.
2530 2018-03-07 Alan Modra <amodra@gmail.com>
2532 * elf64-mips.c (mips_elf64_rtype_to_howto): Return NULL on error.
2533 (mips_elf64_slurp_one_reloc_table): Pass on error.
2535 2018-03-03 James Cowgill <james.cowgill@mips.com>
2536 Maciej W. Rozycki <macro@mips.com>
2539 * elfxx-mips.c (mips_elf_calculate_relocation): Only return
2540 after calling `undefined_symbol' hook if this is an error
2541 condition. Assume the value of 0 for the symbol requested
2544 2018-03-02 Jim Wilson <jimw@sifive.com>
2547 * elfnn-aarch64.c (_bfd_aarch64_resize_stubs): Add 8 bytes for branch
2548 and nop instead of 4.
2549 (elfNN_arch64_build_stubs): Add nop after branch. Increase size by
2552 2018-03-01 Jim Wilson <jimw@sifive.com>
2555 * elfnn-riscv.c (riscv_relax_delete_bytes): When adjust st_size, use
2556 else if instead of if.
2558 2018-03-01 Alan Modra <amodra@gmail.com>
2560 * elf32-ft32.c (ft32_info_to_howto_rela): Correct range test.
2562 2018-02-28 Alan Modra <amodra@gmail.com>
2565 * aoutx.h (swap_std_reloc_in): Correct r_index bound check.
2567 2018-02-28 Nick Clifton <nickc@redhat.com>
2571 * dwarf2.c (read_n_bytes): Replace size parameter with dwarf_block
2572 pointer. Drop unused abfd parameter. Check the size of the block
2573 before initialising the data field. Return the end pointer if the
2575 (read_attribute_value): Adjust invocations of read_n_bytes.
2578 * dwarf1.c (parse_die): Check the length of form blocks before
2579 advancing the data pointer.
2581 2018-02-28 Alan Modra <amodra@gmail.com>
2584 * aoutx.h (translate_symbol_table): Print an error message and set
2585 bfd_error on finding an invalid name string offset.
2587 2018-02-27 H.J. Lu <hongjiu.lu@intel.com>
2589 * config.in: Regenerated.
2590 * configure: Likewise.
2591 * configure.ac: Add --enable-separate-code.
2592 (DEFAULT_LD_Z_SEPARATE_CODE): New AC_DEFINE_UNQUOTED. Default
2593 to 1 for Linux/x86 targets,
2594 * elf64-x86-64.c (ELF_MAXPAGESIZE): Set to 0x1000 if
2595 DEFAULT_LD_Z_SEPARATE_CODE is 1.
2597 2018-02-27 Nick Clifton <nickc@redhat.com>
2599 * aout-cris.c (swap_ext_reloc_out): Standadize error/warning
2601 * elf-hppa.h (elf_hppa_info_to_howto_rel): Likewise.
2602 * elf32-i386.c (elf_i386_reloc_type_lookup): Likewise.
2603 * elf32-xtensa.c (elf_xtensa_reloc_type_lookup): Likewise.
2604 * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Likewise.
2605 * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise.
2606 * elf64-sh64.c (sh_elf64_info_to_howto): Likewise.
2607 * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise.
2608 * elfxx-sparc.c (_bfd_sparc_elf_reloc_type_lookup): Likewise.
2609 * elfxx-tilegx.c (tilegx_reloc_type_lookup): Likewise.
2612 * elf-bfd.h (struct elf_backend_data): Change the return type of
2613 the elf_info_to_howto and elf_info_to_howto_rel function pointers
2615 * elfcode.h (elf_slurp_reloc_table_from_section): Check the return
2616 value from the info_to_howto function and fail if that function
2618 * elf32-h8300.c (elf32_h8_relocate_section): Check return value
2619 from the info_to_howto function.
2620 (elf32_h8_relax_section): Likewise.
2621 * elf32-lm32.c (lm32_elf_relocate_section): Likewise.
2622 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
2623 * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise.
2624 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
2625 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
2626 * elf64-ia64-vms.c (elf64_ia64_relocate_section): Likewise.
2627 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Likewise.
2628 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
2629 * elfnn-ia64.c (elfNN_ia64_relocate_section): Likewise.
2630 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
2631 (riscv_elf_relocate_section): Likewise.
2632 * elf-hppa.h (elf_hppa_info_to_howto): Change return type to
2633 bfd_boolean. Issue an error message, set an error value and
2634 return FALSE if the reloc is not recognized.
2635 (elf_hppa_info_to_howto_rel): Likewise.
2636 * elf-m10200.c (mn10200_info_to_howto): Likewise.
2637 * elf-m10300.c (mn10300_info_to_howto): Likewise.
2638 * elf.c (_bfd_elf_no_info_to_howto): Likewise.
2639 * elf32-arc.c (arc_info_to_howto_rel): Likewise.
2640 * elf32-arm.c (elf32_arm_info_to_howto): Likewise.
2641 * elf32-avr.c (avr_info_to_howto_rela): Likewise.
2642 * elf32-bfin.c (bfin_info_to_howto): Likewise.
2643 * elf32-cr16.c (elf_cr16_info_to_howto): Likewise.
2644 * elf32-cr16c.c (elf_cr16c_info_to_howto): Likewise.
2645 * elf32-cris.c (elf_cr16c_info_to_howto_rel)
2646 (cris_info_to_howto_rela): Likewise.
2647 * elf32-crx.c (elf_crx_info_to_howto): Likewise.
2648 * elf32-d10v.c (d10v_info_to_howto_rel): Likewise.
2649 * elf32-d30v.c (d30v_info_to_howto_rel, d30v_info_to_howto_rela):
2651 * elf32-dlx.c (dlx_rtype_to_howto, elf32_dlx_info_to_howto)
2652 (elf32_dlx_info_to_howto_rel): Likewise.
2653 * elf32-epiphany.c (epiphany_info_to_howto_rela): Likewise.
2654 * elf32-fr30.c (fr30_info_to_howto_rela): Likewise.
2655 * elf32-frv.c (frv_info_to_howto_rela)
2656 (frvfdpic_info_to_howto_rel): Likewise.
2657 * elf32-ft32.c (ft32_info_to_howto_rela): Likewise.
2658 * elf32-gen.c (elf_generic_info_to_howto)
2659 (elf_generic_info_to_howto_rel): Likewise.
2660 * elf32-h8300.c (elf32_h8_info_to_howto)
2661 (elf32_h8_info_to_howto_rel): Likewise.
2662 * elf32-i370.c (i370_elf_info_to_howto): Likewise.
2663 * elf32-i386.c (elf_i386_reloc_type_lookup)
2664 (elf_i386_rtype_to_howto, elf_i386_info_to_howto_rel): Likewise.
2665 * elf32-i860.c (lookup_howto, elf32_i860_info_to_howto_rela):
2667 * elf32-i960.c (elf32_i960_info_to_howto_rel): Likewise.
2668 * elf32-ip2k.c (ip2k_info_to_howto_rela): Likewise.
2669 * elf32-iq2000.c (iq2000_info_to_howto_rela): Likewise.
2670 * elf32-lm32.c (lm32_info_to_howto_rela): Likewise.
2671 * elf32-m32c.c (m32c_info_to_howto_rela): Likewise.
2672 * elf32-m32r.c (m32r_info_to_howto_rel, m32r_info_to_howto):
2674 * elf32-m68hc11.c (m68hc11_info_to_howto_rel): Likewise.
2675 * elf32-m68hc12.c (m68hc11_info_to_howto_rel): Likewise.
2676 * elf32-m68k.c (rtype_to_howto): Likewise.
2677 * elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
2678 * elf32-mep.c (mep_info_to_howto_rela): Likewise.
2679 * elf32-metag.c (metag_info_to_howto_rela): Likewise.
2680 * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
2681 * elf32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela):
2683 * elf32-moxie.c (moxie_info_to_howto_rela): Likewise.
2684 * elf32-msp430.c (msp430_info_to_howto_rela): Likewise.
2685 * elf32-mt.c (mt_info_to_howto_rela): Likewise.
2686 * elf32-nds32.c (nds32_info_to_howto_rel, nds32_info_to_howto):
2688 * elf32-nios2.c (nios2_elf32_info_to_howto): Likewise.
2689 * elf32-or1k.c (or1k_info_to_howto_rela): Likewise.
2690 * elf32-pj.c (pj_elf_info_to_howto): Likewise.
2691 * elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
2692 * elf32-pru.c (pru_elf32_info_to_howto): Likewise.
2693 * elf32-rl78.c (rl78_info_to_howto_rela): Likewise.
2694 * elf32-rx.c (rx_info_to_howto_rela): Likewise.
2695 * elf32-s390.c (elf_s390_info_to_howto): Likewise.
2696 * elf32-score.c (s3_bfd_score_info_to_howto)
2697 (_bfd_score_info_to_howto): Likewise.
2698 * elf32-score7.c (s7_bfd_score_info_to_howto): Likewise.
2699 * elf32-sh.c (sh_elf_info_to_howto): Likewise.
2700 * elf32-spu.c (spu_elf_info_to_howto): Likewise.
2701 * elf32-tic6x.c (elf32_tic6x_info_to_howto)
2702 (elf32_tic6x_info_to_howto_rel): Likewise.
2703 * elf32-tilepro.c (tilepro_info_to_howto_rela): Likewise.
2704 * elf32-v850.c (v850_elf_info_to_howto_rel)
2705 (v850_elf_info_to_howto_rela, v800_elf_info_to_howto): Likewise.
2706 * elf32-vax.c (rtype_to_howto): Likewise.
2707 * elf32-visium.c (visium_info_to_howto_rela): Likewise.
2708 * elf32-wasm32.c (elf32_wasm32_rtype_to_howto)
2709 (elf32_wasm32_info_to_howto_rela): Likewise.
2710 * elf32-xc16x.c (elf32_xc16x_info_to_howto): Likewise.
2711 * elf32-xgate.c (xgate_info_to_howto_rel): Likewise.
2712 * elf32-xstormy16.c (xstormy16_info_to_howto_rela): Likewise.
2713 * elf32-xtensa.c (elf_xtensa_info_to_howto_rela): Likewise.
2714 * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
2715 * elf64-gen.c (elf_generic_info_to_howto)
2716 (elf_generic_info_to_howto_rel): Likewise.
2717 * elf64-ia64-vms.c (elf64_ia64_info_to_howto): Likewise.
2718 * elf64-mips.c (mips_elf64_info_to_howto_rela): Likewise.
2719 * elf64-mmix.c (mmix_info_to_howto_rela): Likewise.
2720 * elf64-ppc.c (ppc64_elf_info_to_howto): Likewise.
2721 * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise.
2722 * elf64-sh64.c (elf_s390_info_to_howto, sh_elf64_info_to_howto):
2724 * elf64-x86-64.c (elf_x86_64_info_to_howto): Likewise.
2725 * elfn32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela):
2727 * elfnn-aarch64.c (elfNN_aarch64_info_to_howto): Likewise.
2728 * elfnn-ia64.c (elfNN_ia64_info_to_howto): Likewise.
2729 * elfnn-riscv.c (riscv_info_to_howto_rela): Likewise.
2730 * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise.
2731 * elfxx-sparc.c (_bfd_sparc_elf_info_to_howto): Likewise.
2732 * elfxx-tilegx.c (tilegx_info_to_howto_rela): Likewise.
2733 * elf32-score.h (s7_bfd_score_info_to_howto): Update prototype.
2734 * elfxx-sparc.h (_bfd_sparc_elf_info_to_howto): Update prototype.
2735 * elfxx-tilegx.h (tilegx_info_to_howto_rela): Update prototype.
2736 * elfxx-target.h (elf_info_to_howto, elf_info_to_howto_rel):
2739 2018-02-26 Jim Wilson <jimw@sifive.com>
2740 Stephan Schreiber <info@fs-driver.org>
2743 * elfnn-ia64.c (elfNN_ia64_relax_section): After ia64_elf_relax_brl
2744 call, set changed_contents and changed_relocs. Likewise after
2745 successful ia64_elf_relax_br call.
2747 2018-02-26 Alan Modra <amodra@gmail.com>
2749 * elf.c (assign_file_positions_except_relocs): Don't segfault
2750 when actual number of phdrs is less than allocated. Delete
2751 outdated comment. Formatting.
2753 2018-02-26 Alan Modra <amodra@gmail.com>
2755 * elf-m10300.c, * elf-s390-common.c, * elf32-arc.c, * elf32-cris.c,
2756 * elf32-dlx.c, * elf32-frv.c, * elf32-i370.c, * elf32-lm32.c,
2757 * elf32-m32r.c, * elf32-m68hc1x.c, * elf32-m68k.c,
2758 * elf32-microblaze.c, * elf32-msp430.c, * elf32-nds32.c,
2759 * elf32-nios2.c, * elf32-or1k.c, * elf32-rl78.c, * elf32-rx.c,
2760 * elf32-score.c, * elf32-score7.c, * elf32-sh-symbian.c,
2761 * elf32-sh.c, * elf32-spu.c, * elf32-v850.c, * elf32-xtensa.c,
2762 * elf64-alpha.c, * elf64-ia64-vms.c, * elf64-mmix.c,
2763 * elf64-sh64.c, * elf64-sparc.c, * elfnn-ia64.c, * elfxx-tilegx.c,
2764 * mmo.c, * osf-core.c, * srec.c, * vms-alpha.c: Standardize
2765 error/warning messages.
2767 2018-02-26 Alan Modra <amodra@gmail.com>
2769 * archive.c, * bfd.c, * linker.c, * reloc.c, * stabs.c,
2770 * syms.c: Standardize error/warning messages.
2772 2018-02-26 Alan Modra <amodra@gmail.com>
2774 * aout-adobe.c, * aout-cris.c, * i386linux.c, * m68klinux.c,
2775 * sparclinux.c, * coff-alpha.c, * coff-arm.c, * coff-mcore.c,
2776 * coffcode.h, * coffgen.c, * cofflink.c, * ecoff.c, * pe-mips.c,
2777 * peXXigen.c, * peicode.h: Standardize error/warning messages.
2779 2018-02-26 Alan Modra <amodra@gmail.com>
2781 * elf32-arm.c, * elfnn-aarch64.c: Standardize error/warning messages.
2783 2018-02-26 Alan Modra <amodra@gmail.com>
2785 * elfxx-mips.c: Standardize error/warning messages.
2787 2018-02-26 Alan Modra <amodra@gmail.com>
2789 * dwarf2.c, * elf-attrs.c, * elf-eh-frame.c, * elf.c, * elf32-gen.c,
2790 * elflink.c: Standardize error/warning messages. Replace use of
2791 linker callback einfo with _bfd_error_handler when possible.
2793 2018-02-26 Alan Modra <amodra@gmail.com>
2795 * aoutx.h, * coff-alpha.c, * coff-i860.c, * coff-m68k.c,
2796 * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c,
2797 * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-w65.c,
2798 * elf-bfd.h, * elf-m10300.c, * elf.c, * elf32-avr.c, * elf32-bfin.c,
2799 * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c,
2800 * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c,
2801 * elf32-fr30.c, * elf32-frv.c, * elf32-i370.c, * elf32-i386.c,
2802 * elf32-i960.c, * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c,
2803 * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c,
2804 * elf32-m68k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c,
2805 * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c,
2806 * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-or1k.c,
2807 * elf32-pj.c, * elf32-ppc.c, * elf32-rl78.c, * elf32-rx.c,
2808 * elf32-s390.c, * elf32-sh.c, * elf32-spu.c, * elf32-tic6x.c,
2809 * elf32-v850.c, * elf32-vax.c, * elf32-visium.c, * elf32-wasm32.c,
2810 * elf32-xgate.c, * elf32-xtensa.c, * elf64-alpha.c,
2811 * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c,
2812 * elf64-ppc.c, * elf64-s390.c, * elf64-sparc.c, * elf64-x86-64.c,
2813 * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c,
2814 * elfnn-riscv.c, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-riscv.h,
2815 * elfxx-sparc.c, * elfxx-sparc.h, * reloc.c: Standardize
2816 unrecognized/unsupported reloc message.
2818 2018-02-26 Alan Modra <amodra@gmail.com>
2820 * elf32-ppc.c: Standardize error/warning messages. Use
2821 _bfd_error_handler rather than einfo when einfo features not used.
2822 * elf64-ppc.c: Likewise.
2824 2018-02-23 Alan Modra <amodra@gmail.com>
2827 * elf.c (assign_file_positions_for_non_load_sections): Remove RELRO
2828 segment if no matching LOAD segment.
2830 2018-02-23 Kuan-Lin Chen <kuanlinchentw@gmail.com>
2832 * elf32-nds32.h: Define mask for ict_model.
2834 2018-02-20 Jason Duerstock <jason.duerstock@gmail.com>
2836 * elfnn-ia64.c (elf_backend_can_gc_sections): Enable.
2838 2018-02-19 Maciej W. Rozycki <macro@mips.com>
2841 2018-01-12 Vlad Ivanov <vlad@ivanov.email>
2843 * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
2844 .reginfo section has wrong size.
2846 2018-02-19 Maciej W. Rozycki <macro@mips.com>
2848 * elfxx-mips.c (_bfd_mips_elf_always_size_sections): Set
2849 SEC_FIXED_SIZE and SEC_HAS_CONTENTS flags for `.reginfo' and
2850 `.MIPS.abiflags' sections.
2851 (_bfd_mips_elf_final_link): Avoid reading beyond `.reginfo'
2854 2018-02-19 Maciej W. Rozycki <macro@mips.com>
2856 * section.c (SEC_FIXED_SIZE): New macro.
2857 * bfd-in2.h: Regenerate.
2859 2018-02-19 Maciej W. Rozycki <macro@mips.com>
2861 * section.c (SEC_HAS_GOT_REF): Remove macro.
2862 * bfd-in2.h: Regenerate.
2864 2018-02-19 Alan Modra <amodra@gmail.com>
2866 * elf-attrs.c (_bfd_elf_parse_attributes): Correct _bfd_error_handler
2868 * elfxx-mips.c (_bfd_mips_elf_final_link): Likewise.
2869 * elfnn-riscv.c (_bfd_riscv_relax_align): Likewise.
2870 (_bfd_riscv_relax_pc): Likewise and fix typos.
2871 * libbfd-in.h (_bfd_error_handler): Add attribute printf.
2872 * libbfd.h: Regenerate.
2874 2018-02-19 Alan Modra <amodra@gmail.com>
2876 * dwarf2.c (read_section): Don't use 'll' format modifier.
2877 (find_abstract_instance): Likewise.
2878 * elfcore.h (elf_core_file_p): Likewise.
2880 2018-02-19 Alan Modra <amodra@gmail.com>
2882 * bfd-in.h: Include inttypes.h or if not available define
2883 PRId64, PRIu64 and PRIx64.
2884 * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Remove support for L
2885 modifier to print bfd_vma.
2886 * coff-arm.c, * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c,
2887 * coff-sh.c, * coff-tic80.c, * coffcode.h, * coffgen.c, * cofflink.c,
2888 * compress.c, * dwarf2.c, * elf-m10300.c, * elf.c, * elf32-arc.c,
2889 * elf32-arm.c, * elf32-bfin.c, * elf32-cris.c, * elf32-hppa.c,
2890 * elf32-i386.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32r.c,
2891 * elf32-m68k.c, * elf32-metag.c, * elf32-nds32.c, * elf32-nios2.c,
2892 * elf32-ppc.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c,
2893 * elf32-score7.c, * elf32-sh.c, * elf32-sh64.c, * elf32-spu.c,
2894 * elf32-tic6x.c, * elf32-tilepro.c, * elf32-v850.c, * elf32-vax.c,
2895 * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c,
2896 * elf64-mmix.c, * elf64-s390.c, * elf64-sh64.c, * elf64-x86-64.c,
2897 * elfcode.h, * elfcore.h, * elflink.c, * elfnn-aarch64.c,
2898 * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-mips.c, * elfxx-sparc.c,
2899 * elfxx-tilegx.c, * ieee.c, * ihex.c, * mach-o.c, * merge.c, * mmo.c,
2900 * peXXigen.c, * xcofflink.c: Replace use of Lx modifier with PRIx64,
2901 and cast input to uint64_t, and similarly for Ld and Lu.
2902 * bfd-in2.h: Regenerate.
2904 2018-02-19 Alan Modra <amodra@gmail.com>
2906 * elf32-arm.c, * elf32-hppa.c, * elf32-lm32.c, * elf32-m32r.c,
2907 * elf32-metag.c, * elf32-nds32.c, * elf32-or1k.c, * elf32-ppc.c,
2908 * elf32-s390.c, * elf32-sh.c, * elf32-tic6x.c, * elf32-tilepro.c,
2909 * elf64-ppc.c, * elf64-s390.c, * elflink.c, * elfnn-aarch64.c,
2910 * elfnn-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c,
2911 * reloc.c: Replace use of %R and %T in format strings passed to
2912 einfo and friends by %pR and %pT.
2914 2018-02-19 Alan Modra <amodra@gmail.com>
2916 * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Handle %pA and %pB in place
2918 * aout-adobe.c: Update all messages using %A and %B.
2919 * aout-cris.c: Likewise.
2920 * aoutx.h: Likewise.
2921 * archive.c: Likewise.
2922 * binary.c: Likewise.
2923 * cache.c: Likewise.
2924 * coff-alpha.c: Likewise.
2925 * coff-arm.c: Likewise.
2926 * coff-i860.c: Likewise.
2927 * coff-mcore.c: Likewise.
2928 * coff-ppc.c: Likewise.
2929 * coff-rs6000.c: Likewise.
2930 * coff-sh.c: Likewise.
2931 * coff-tic4x.c: Likewise.
2932 * coff-tic54x.c: Likewise.
2933 * coff-tic80.c: Likewise.
2934 * coff64-rs6000.c: Likewise.
2935 * coffcode.h: Likewise.
2936 * coffgen.c: Likewise.
2937 * cofflink.c: Likewise.
2938 * coffswap.h: Likewise.
2939 * compress.c: Likewise.
2940 * cpu-arm.c: Likewise.
2941 * ecoff.c: Likewise.
2942 * elf-attrs.c: Likewise.
2943 * elf-eh-frame.c: Likewise.
2944 * elf-ifunc.c: Likewise.
2945 * elf-m10300.c: Likewise.
2946 * elf-properties.c: Likewise.
2947 * elf-s390-common.c: Likewise.
2949 * elf32-arc.c: Likewise.
2950 * elf32-arm.c: Likewise.
2951 * elf32-avr.c: Likewise.
2952 * elf32-bfin.c: Likewise.
2953 * elf32-cr16.c: Likewise.
2954 * elf32-cr16c.c: Likewise.
2955 * elf32-cris.c: Likewise.
2956 * elf32-crx.c: Likewise.
2957 * elf32-d10v.c: Likewise.
2958 * elf32-d30v.c: Likewise.
2959 * elf32-epiphany.c: Likewise.
2960 * elf32-fr30.c: Likewise.
2961 * elf32-frv.c: Likewise.
2962 * elf32-gen.c: Likewise.
2963 * elf32-hppa.c: Likewise.
2964 * elf32-i370.c: Likewise.
2965 * elf32-i386.c: Likewise.
2966 * elf32-i960.c: Likewise.
2967 * elf32-ip2k.c: Likewise.
2968 * elf32-iq2000.c: Likewise.
2969 * elf32-lm32.c: Likewise.
2970 * elf32-m32c.c: Likewise.
2971 * elf32-m32r.c: Likewise.
2972 * elf32-m68hc11.c: Likewise.
2973 * elf32-m68hc12.c: Likewise.
2974 * elf32-m68hc1x.c: Likewise.
2975 * elf32-m68k.c: Likewise.
2976 * elf32-mcore.c: Likewise.
2977 * elf32-mep.c: Likewise.
2978 * elf32-metag.c: Likewise.
2979 * elf32-microblaze.c: Likewise.
2980 * elf32-moxie.c: Likewise.
2981 * elf32-msp430.c: Likewise.
2982 * elf32-mt.c: Likewise.
2983 * elf32-nds32.c: Likewise.
2984 * elf32-nios2.c: Likewise.
2985 * elf32-or1k.c: Likewise.
2986 * elf32-pj.c: Likewise.
2987 * elf32-ppc.c: Likewise.
2988 * elf32-rl78.c: Likewise.
2989 * elf32-rx.c: Likewise.
2990 * elf32-s390.c: Likewise.
2991 * elf32-score.c: Likewise.
2992 * elf32-score7.c: Likewise.
2993 * elf32-sh-symbian.c: Likewise.
2994 * elf32-sh.c: Likewise.
2995 * elf32-sh64.c: Likewise.
2996 * elf32-sparc.c: Likewise.
2997 * elf32-spu.c: Likewise.
2998 * elf32-tic6x.c: Likewise.
2999 * elf32-tilepro.c: Likewise.
3000 * elf32-v850.c: Likewise.
3001 * elf32-vax.c: Likewise.
3002 * elf32-visium.c: Likewise.
3003 * elf32-wasm32.c: Likewise.
3004 * elf32-xgate.c: Likewise.
3005 * elf32-xtensa.c: Likewise.
3006 * elf64-alpha.c: Likewise.
3007 * elf64-gen.c: Likewise.
3008 * elf64-hppa.c: Likewise.
3009 * elf64-ia64-vms.c: Likewise.
3010 * elf64-mmix.c: Likewise.
3011 * elf64-ppc.c: Likewise.
3012 * elf64-s390.c: Likewise.
3013 * elf64-sh64.c: Likewise.
3014 * elf64-sparc.c: Likewise.
3015 * elf64-x86-64.c: Likewise.
3016 * elfcode.h: Likewise.
3017 * elfcore.h: Likewise.
3018 * elflink.c: Likewise.
3019 * elfnn-aarch64.c: Likewise.
3020 * elfnn-ia64.c: Likewise.
3021 * elfnn-riscv.c: Likewise.
3022 * elfxx-mips.c: Likewise.
3023 * elfxx-sparc.c: Likewise.
3024 * elfxx-tilegx.c: Likewise.
3025 * elfxx-x86.c: Likewise.
3026 * hpux-core.c: Likewise.
3029 * libbfd.c: Likewise.
3030 * linker.c: Likewise.
3031 * mach-o.c: Likewise.
3032 * merge.c: Likewise.
3034 * oasys.c: Likewise.
3035 * pdp11.c: Likewise.
3036 * pe-mips.c: Likewise.
3037 * peXXigen.c: Likewise.
3038 * peicode.h: Likewise.
3039 * reloc.c: Likewise.
3040 * rs6000-core.c: Likewise.
3042 * stabs.c: Likewise.
3043 * vms-alpha.c: Likewise.
3044 * xcofflink.c: Likewise.
3046 2018-02-19 Alan Modra <amodra@gmail.com>
3049 * elf.c (IS_TBSS): Define.
3050 (_bfd_elf_map_sections_to_segments): Use IS_TBSS.
3051 (assign_file_positions_for_non_load_sections): Revert last change.
3052 Properly calculate load segment limits to compare against relro limits.
3054 2018-02-17 Alan Modra <amodra@gmail.com>
3057 * elf.c (assign_file_positions_for_non_load_sections): Ignore
3058 degenerate zero size PT_LOAD segments when finding one overlapping
3059 the PT_GNU_RELRO segment.
3061 2018-02-16 Alan Modra <amodra@gmail.com>
3063 * libbfd.c (_bfd_bool_bfd_false_error): Rename from bfd_false.
3064 (_bfd_bool_bfd_true): Rename from bfd_true.
3065 (_bfd_ptr_bfd_null_error): Rename from bfd_nullvoidptr.
3066 (_bfd_int_bfd_0): Rename from bfd_0.
3067 (_bfd_uint_bfd_0): Rename from bfd_0u.
3068 (_bfd_long_bfd_0): Rename from bfd_0l.
3069 (_bfd_long_bfd_n1_error): Rename from _bfd_n1.
3070 (_bfd_void_bfd): Rename from bfd_void.
3071 (_bfd_bool_bfd_false, _bfd_bool_bfd_asymbol_false),
3072 (_bfd_bool_bfd_link_false_error),
3073 (_bfd_bool_bfd_link_true, _bfd_bool_bfd_bfd_true),
3074 (_bfd_bool_bfd_uint_true, _bfd_bool_bfd_ptr_true),
3075 (_bfd_bool_bfd_asection_bfd_asection_true),
3076 (_bfd_bool_bfd_asymbol_bfd_asymbol_true),
3077 (_bfd_void_bfd_link, _bfd_void_bfd_asection): New functions.
3078 * archive.c (_bfd_noarchive_get_elt_at_index),
3079 (_bfd_noarchive_openr_next_archived_file),
3080 (_bfd_noarchive_construct_extended_name_table),
3081 (_bfd_noarchive_write_ar_hdr, _bfd_noarchive_truncate_arname),
3082 (_bfd_noarchive_write_armap): New functions.
3083 * archures.c (_bfd_nowrite_set_arch_mach): New function.
3084 * coff-alpha.c (alpha_ecoff_swap_coff_aux_in),
3085 (alpha_ecoff_swap_coff_sym_in, alpha_ecoff_swap_coff_lineno_in),
3086 (alpha_ecoff_swap_coff_aux_out, alpha_ecoff_swap_coff_sym_out),
3087 (alpha_ecoff_swap_coff_lineno_out),
3088 (alpha_ecoff_swap_coff_reloc_out): New functions.
3089 * coff-mips.c (mips_ecoff_swap_coff_aux_in),
3090 (mips_ecoff_swap_coff_sym_in, mips_ecoff_swap_coff_lineno_in),
3091 (mips_ecoff_swap_coff_aux_out, mips_ecoff_swap_coff_sym_out),
3092 (mips_ecoff_swap_coff_lineno_out),
3093 (mips_ecoff_swap_coff_reloc_out): New functions.
3094 * coffcode.h (coff_set_alignment_hook): Replace define with
3096 (symname_in_debug_hook): Likewise.
3097 * ecoff.c (_bfd_ecoff_set_alignment_hook): New function.
3098 * elfxx-target.h (elf_backend_allow_non_load_phdr): Default to 0.
3099 * elf.c (assign_file_positions_except_relocs): Test
3100 elf_backend_allow_non_load_phdr for NULL.
3101 * elflink.c (_bfd_elf_omit_section_dynsym_default): Rename from
3102 _bfd_elf_link_omit_section_dynsym. Update uses.
3103 (_bfd_elf_omit_section_dynsym_all): New function.
3104 * elf-bfd.h (_bfd_elf_link_omit_section_dynsym): Delete.
3105 (_bfd_elf_omit_section_dynsym_default): Declare.
3106 (_bfd_elf_omit_section_dynsym_all): Declare.
3107 * linker.c (_bfd_nolink_sizeof_headers, _bfd_nolink_bfd_relax_section),
3108 (_bfd_nolink_bfd_get_relocated_section_contents),
3109 (_bfd_nolink_bfd_lookup_section_flags),
3110 (_bfd_nolink_bfd_is_group_section, _bfd_nolink_bfd_discard_group),
3111 (_bfd_nolink_bfd_link_hash_table_create),
3112 (_bfd_nolink_bfd_link_just_syms),
3113 (_bfd_nolink_bfd_copy_link_hash_symbol_type),
3114 (_bfd_nolink_bfd_link_split_section),
3115 (_bfd_nolink_section_already_linked),
3116 (_bfd_nolink_bfd_define_common_symbol),
3117 (_bfd_nolink_bfd_define_start_stop): New functions.
3118 * reloc.c (_bfd_norelocs_bfd_reloc_type_lookup),
3119 (_bfd_norelocs_bfd_reloc_name_lookup),
3120 (_bfd_nodynamic_canonicalize_dynamic_reloc): New functions.
3121 * section.c (_bfd_nowrite_set_section_contents): New function.
3122 * syms.c (_bfd_nosymbols_canonicalize_symtab),
3123 (_bfd_nosymbols_print_symbol, _bfd_nosymbols_get_symbol_info),
3124 (_bfd_nosymbols_get_symbol_version_string),
3125 (_bfd_nosymbols_bfd_is_local_label_name),
3126 (_bfd_nosymbols_get_lineno, _bfd_nosymbols_find_nearest_line),
3127 (_bfd_nosymbols_find_line, _bfd_nosymbols_find_inliner_info),
3128 (_bfd_nosymbols_bfd_make_debug_symbol),
3129 ( _bfd_nosymbols_read_minisymbols),
3130 ( _bfd_nosymbols_minisymbol_to_symbol),
3131 (_bfd_nodynamic_get_synthetic_symtab): New functions.
3132 * libbfd-in.h: Declare new functions. Update existing defines,
3134 * aix386-core.c: Update to use new hooks. Formatting.
3135 * aout-adobe.c: Likewise.
3136 * aout-arm.c: Likewise.
3137 * aout-target.h: Likewise.
3138 * aout-tic30.c: Likewise.
3139 * aoutf1.h: Likewise.
3140 * binary.c: Likewise.
3142 * cisco-core.c: Likewise.
3143 * coff-alpha.c: Likewise.
3144 * coff-i386.c: Likewise.
3145 * coff-i860.c: Likewise.
3146 * coff-i960.c: Likewise.
3147 * coff-ia64.c: Likewise.
3148 * coff-mips.c: Likewise.
3149 * coff-ppc.c: Likewise.
3150 * coff-rs6000.c: Likewise.
3151 * coff-sh.c: Likewise.
3152 * coff-tic30.c: Likewise.
3153 * coff-tic54x.c: Likewise.
3154 * coff-x86_64.c: Likewise.
3155 * coff64-rs6000.c: Likewise.
3156 * coffcode.h: Likewise.
3157 * elf-m10300.c: Likewise.
3158 * elf32-cr16.c: Likewise.
3159 * elf32-lm32.c: Likewise.
3160 * elf32-m32r.c: Likewise.
3161 * elf32-metag.c: Likewise.
3162 * elf32-score.c: Likewise.
3163 * elf32-score7.c: Likewise.
3164 * elf32-tilepro.c: Likewise.
3165 * elf32-xstormy16.c: Likewise.
3166 * elf32-xtensa.c: Likewise.
3167 * elf64-alpha.c: Likewise.
3168 * elf64-hppa.c: Likewise.
3169 * elf64-ia64-vms.c: Likewise.
3170 * elf64-mmix.c: Likewise.
3171 * elf64-sh64.c: Likewise.
3172 * elfnn-ia64.c: Likewise.
3173 * elfxx-sparc.c: Likewise.
3174 * elfxx-target.h: Likewise.
3175 * elfxx-tilegx.c: Likewise.
3176 * elfxx-x86.h: Likewise.
3177 * hp300hpux.c: Likewise.
3178 * hppabsd-core.c: Likewise.
3179 * hpux-core.c: Likewise.
3180 * i386msdos.c: Likewise.
3181 * i386os9k.c: Likewise.
3184 * irix-core.c: Likewise.
3185 * libaout.h: Likewise.
3186 * libecoff.h: Likewise.
3187 * mach-o-target.c: Likewise.
3188 * mach-o.c: Likewise.
3189 * mipsbsd.c: Likewise.
3191 * netbsd-core.c: Likewise.
3192 * nlm-target.h: Likewise.
3193 * oasys.c: Likewise.
3194 * osf-core.c: Likewise.
3195 * pdp11.c: Likewise.
3196 * pe-mips.c: Likewise.
3197 * pe-x86_64.c: Likewise.
3199 * plugin.c: Likewise.
3200 * ppcboot.c: Likewise.
3201 * ptrace-core.c: Likewise.
3202 * sco5-core.c: Likewise.
3204 * sparclynx.c: Likewise.
3206 * tekhex.c: Likewise.
3207 * trad-core.c: Likewise.
3208 * verilog.c: Likewise.
3209 * versados.c: Likewise.
3210 * vms-alpha.c: Likewise.
3211 * vms-lib.c: Likewise.
3212 * wasm-module.c: Likewise.
3214 * libbfd.h: Regenerate.
3216 2018-02-15 Jim Wilson <jimw@sifive.com>
3218 * elfnn-riscv.c (_bfd_riscv_relax_section): Ifdef out check to ignore
3219 symbols whose section address is zero.
3221 * elfnn-riscv.c (riscv_elf_relocate_section): Use bfd_reloc_dangerous
3222 when pcrel_lo reloc has an addend. Use reloc_dangerous callback for
3223 bfd_reloc_dangerous. Use einfo instead of warning callback for errors.
3224 Add %X%P to error messages.
3226 2018-02-15 Eric Botcazou <ebotcazou@adacore.com>
3229 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
3230 Pass FALSE instead of TRUE as 'create' argument to bfd_link_hash_lookup
3231 and assert that the result of the call is not NULL.
3233 2018-02-14 Nick Clifton <nickc@redhat.com>
3236 Revert previous delta. Add extra casts to avoid compile time
3238 * libbfd-in.h (_bfd_generic_bfd_copy_private_bfd_data): Add extra
3239 cast to avoid warning from gcc v8 compiler.
3240 (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
3241 (_bfd_generic_bfd_set_private_flags): Likewise.
3242 (_bfd_generic_bfd_copy_private_section_data): Likewise.
3243 (_bfd_generic_bfd_copy_private_symbol_data): Likewise.
3244 (_bfd_generic_bfd_copy_private_header_data): Likewise.
3245 (_bfd_generic_bfd_print_private_bfd_data): Likewise.
3246 (_bfd_noarchive_construct_extended_name_table): Likewise.
3247 (_bfd_noarchive_truncate_arname): Likewise.
3248 (_bfd_noarchive_write_ar_hdr): Likewise.
3249 (_bfd_noarchive_get_elt_at_index): Likewise.
3250 (_bfd_nosymbols_canonicalize_symtab): Likewise.
3251 (_bfd_nosymbols_print_symbol): Likewise.
3252 (_bfd_nosymbols_get_symbol_info): Likewise.
3253 (_bfd_nosymbols_get_symbol_version_string): Likewise.
3254 (_bfd_nosymbols_bfd_is_local_label_name): Likewise.
3255 (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise.
3256 (_bfd_nosymbols_get_lineno): Likewise.
3257 (_bfd_nosymbols_find_nearest_line): Likewise.
3258 (_bfd_nosymbols_find_line): Likewise.
3259 (_bfd_nosymbols_find_inliner_info): Likewise.
3260 (_bfd_nosymbols_bfd_make_debug_symbol): Likewise.
3261 (_bfd_nosymbols_read_minisymbols): Likewise.
3262 (_bfd_nosymbols_minisymbol_to_symbol): Likewise.
3263 (_bfd_norelocs_bfd_reloc_type_lookup): Likewise.
3264 (_bfd_norelocs_bfd_reloc_name_lookup): Likewise.
3265 (_bfd_nowrite_set_arch_mach): Likewise.
3266 (_bfd_nowrite_set_section_contents): Likewise.
3267 (_bfd_nolink_sizeof_headers): Likewise.
3268 (_bfd_nolink_bfd_get_relocated_section_contents): Likewise.
3269 (_bfd_nolink_bfd_relax_section): Likewise.
3270 (_bfd_nolink_bfd_gc_sections): Likewise.
3271 (_bfd_nolink_bfd_lookup_section_flags): Likewise.
3272 (_bfd_nolink_bfd_merge_sections): Likewise.
3273 (_bfd_nolink_bfd_is_group_section): Likewise.
3274 (_bfd_nolink_bfd_discard_group): Likewise.
3275 (_bfd_nolink_bfd_link_hash_table_create): Likewise.
3276 (_bfd_nolink_bfd_link_add_symbols): Likewise.
3277 (_bfd_nolink_bfd_link_just_syms): Likewise.
3278 (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise.
3279 (_bfd_nolink_bfd_final_link): Likewise.
3280 (_bfd_nolink_bfd_link_split_section): Likewise.
3281 (_bfd_nolink_section_already_linked): Likewise.
3282 (_bfd_nolink_bfd_define_common_symbol): Likewise.
3283 (_bfd_nolink_bfd_define_start_stop): Likewise.
3284 (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise.
3285 (_bfd_nodynamic_get_synthetic_symtab): Likewise.
3286 (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise.
3287 (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise.
3288 * libbfd.c (bfd_false_any): Delete.
3289 (bfd_true_any, bfd_nullvoidptr_any, bfd_0_any): Delete.
3290 (bfd_0u_any, bfd_0l_any, _bfd_n1_any, bfd_void_any): Delete.
3291 * libbfd.h (extern): Regenerate
3292 * aout-target.h (MY_bfd_is_target_special_symbol): Add extra
3293 cast to avoid warning from gcc v8 compiler.
3294 * aout-tic30.c (tic30_aout_set_arch_mach): Likewise.
3295 * binary.c (binary_get_symbol_info): Likewise.
3296 * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
3297 * coff-mips.c (mips_ecoff_backend_data): Likewise.
3298 * coffcode.h (coff_set_alignment_hook): Likewise.
3299 (symname_in_debug_hook): Likewise.
3300 (bfd_coff_backend_data bigobj_swap_table): Likewise.
3301 * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise.
3302 * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise.
3303 * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise.
3304 * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise.
3305 * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise.
3306 * elf32-score.c (elf_backend_omit_section_dynsym): Likewise.
3307 * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise.
3308 * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise.
3309 * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise.
3310 * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise.
3311 * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise.
3312 * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise.
3313 * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise.
3314 * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise.
3315 * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise.
3316 * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise.
3317 (bfd_elfNN_bfd_make_debug_symbol): Likewise.
3318 (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
3319 (bfd_elfNN_bfd_set_private_flags): Likewise.
3320 (bfd_elfNN_bfd_is_target_special_symbol): Likewise.
3321 (elf_backend_init_index_section): Likewise.
3322 (elf_backend_allow_non_load_phdr): Likewise.
3323 * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise.
3324 * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise.
3325 * ieee.c (ieee_construct_extended_name_table): Likewise.
3326 (ieee_write_armap): Likewise.
3327 (ieee_write_ar_hdr): Likewise.
3328 (ieee_bfd_is_target_special_symbol): Likewise.
3329 * ihex.c (ihex_canonicalize_symtab): Likewise.
3330 (ihex_bfd_is_target_special_symbol): Likewise.
3331 * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise.
3332 * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise.
3333 (_bfd_ecoff_set_alignment_hook): Likewise.
3334 * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise.
3335 * mmo.c (mmo_bfd_is_target_special_symbol): Likewise.
3336 * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise.
3337 * oasys.c (oasys_construct_extended_name_table): Likewise.
3338 (oasys_write_armap): Likewise.
3339 (oasys_write_ar_hdr): Likewise.
3340 (oasys_bfd_is_target_special_symbol): Likewise.
3341 * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise.
3342 * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise.
3343 * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise.
3344 * som.c (som_bfd_is_target_special_symbol): Likewise.
3345 * srec.c (srec_bfd_is_target_special_symbol): Likewise.
3346 * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise.
3347 * verilog.c (verilog_bfd_is_target_special_symbol): Likewise.
3348 * versados.c (versados_bfd_is_target_special_symbol): Likewise.
3349 (versados_bfd_reloc_name_lookup): Likewise.
3350 * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise.
3351 (vms_bfd_define_start_stop): Likewise.
3352 (alpha_vms_bfd_is_target_special_symbol): Likewise.
3353 * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise.
3354 * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise.
3356 2018-02-14 H.J. Lu <hongjiu.lu@intel.com>
3359 * elf32-i386.c (elf_i386_check_relocs): Pass FALSE for non
3360 PC-relative PLT to NEED_DYNAMIC_RELOCATION_P.
3361 * elf64-x86-64.c (elf_x86_64_check_relocs): Create PLT for
3362 R_X86_64_PC32 reloc against dynamic function in data section.
3363 Pass TRUE for PC-relative PLT to NEED_DYNAMIC_RELOCATION_P.
3364 (elf_x86_64_relocate_section): Use PLT for R_X86_64_PC32 reloc
3365 against dynamic function in data section.
3366 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Use PLT in PIE as
3367 function address only if pcrel_plt is true.
3368 (_bfd_x86_elf_link_hash_table_create): Set pcrel_plt.
3369 * elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): Add PCREL_PLT for
3370 PC-relative PLT. If PLT is PC-relative, don't generate dynamic
3371 PC-relative relocation against a function definition in data
3372 secton in PIE. Remove the obsolete comments.
3373 (elf_x86_link_hash_table): Add pcrel_plt.
3375 2018-02-13 H.J. Lu <hongjiu.lu@intel.com>
3377 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Check bfd_link_dll,
3378 instead of bfd_link_pic, for building shared library.
3380 2018-02-13 H.J. Lu <hongjiu.lu@intel.com>
3383 * elf64-x86-64.c (is_32bit_relative_branch): Removed.
3384 (elf_x86_64_relocate_section): Check PIC relocations in PIE.
3385 Remove is_32bit_relative_branch usage. Disallow PC32 reloc
3386 against protected function in shared object.
3388 2018-02-13 Sergei Trofimovich <slyfox@inbox.ru>
3391 * po/ru.po: Fix typo in Russian translation.
3393 2018-02-13 Maciej W. Rozycki <macro@mips.com>
3395 * wasm-module.c (wasm_scan_name_function_section): Rename
3396 `index' local variable to `idx'.
3398 2018-02-13 Nick Clifton <nickc@redhat.com>
3401 Fix compile time warnings generated by gcc version 8.
3402 * libbfd-in.h: Remove extraneous text from prototypes.
3403 Add prototypes for bfd_false_any, bfd_true_any,
3404 bfd_nullvoidptr_any, bfd_0_any, bfd_0u_any, bfd_0l_any,
3405 bfd_n1_any, bfd_void_any.
3406 (_bfd_generic_bfd_copy_private_bfd_data): Use vararg based dummy
3408 (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
3409 (_bfd_generic_bfd_set_private_flags): Likewise.
3410 (_bfd_generic_bfd_copy_private_section_data): Likewise.
3411 (_bfd_generic_bfd_copy_private_symbol_data): Likewise.
3412 (_bfd_generic_bfd_copy_private_header_data): Likewise.
3413 (_bfd_generic_bfd_print_private_bfd_data): Likewise.
3414 (_bfd_noarchive_construct_extended_name_table): Likewise.
3415 (_bfd_noarchive_truncate_arname): Likewise.
3416 (_bfd_noarchive_write_ar_hdr): Likewise.
3417 (_bfd_noarchive_get_elt_at_index): Likewise.
3418 (_bfd_nosymbols_canonicalize_symtab): Likewise.
3419 (_bfd_nosymbols_print_symbol): Likewise.
3420 (_bfd_nosymbols_get_symbol_info): Likewise.
3421 (_bfd_nosymbols_get_symbol_version_string): Likewise.
3422 (_bfd_nosymbols_bfd_is_local_label_name): Likewise.
3423 (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise.
3424 (_bfd_nosymbols_get_lineno): Likewise.
3425 (_bfd_nosymbols_find_nearest_line): Likewise.
3426 (_bfd_nosymbols_find_line): Likewise.
3427 (_bfd_nosymbols_find_inliner_info): Likewise.
3428 (_bfd_nosymbols_bfd_make_debug_symbol): Likewise.
3429 (_bfd_nosymbols_read_minisymbols): Likewise.
3430 (_bfd_nosymbols_minisymbol_to_symbol): Likewise.
3431 (_bfd_norelocs_bfd_reloc_type_lookup): Likewise.
3432 (_bfd_norelocs_bfd_reloc_name_lookup): Likewise.
3433 (_bfd_nowrite_set_arch_mach): Likewise.
3434 (_bfd_nowrite_set_section_contents): Likewise.
3435 (_bfd_nolink_sizeof_headers): Likewise.
3436 (_bfd_nolink_bfd_get_relocated_section_contents): Likewise.
3437 (_bfd_nolink_bfd_relax_section): Likewise.
3438 (_bfd_nolink_bfd_gc_sections): Likewise.
3439 (_bfd_nolink_bfd_lookup_section_flags): Likewise.
3440 (_bfd_nolink_bfd_merge_sections): Likewise.
3441 (_bfd_nolink_bfd_is_group_section): Likewise.
3442 (_bfd_nolink_bfd_discard_group): Likewise.
3443 (_bfd_nolink_bfd_link_hash_table_create): Likewise.
3444 (_bfd_nolink_bfd_link_add_symbols): Likewise.
3445 (_bfd_nolink_bfd_link_just_syms): Likewise.
3446 (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise.
3447 (_bfd_nolink_bfd_final_link): Likewise.
3448 (_bfd_nolink_bfd_link_split_section): Likewise.
3449 (_bfd_nolink_section_already_linked): Likewise.
3450 (_bfd_nolink_bfd_define_common_symbol): Likewise.
3451 (_bfd_nolink_bfd_define_start_stop): Likewise.
3452 (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise.
3453 (_bfd_nodynamic_get_synthetic_symtab): Likewise.
3454 (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise.
3455 (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise.
3456 * libbfd.c (bfd_false_any): New function. Like bfd_false but
3457 accepts one or more arguments.
3458 (bfd_true_any): Likewise.
3459 (bfd_nullvoidptr_any): Likewise.
3460 (bfd_0_any): Likewise.
3461 (bfd_0u_any): Likewise.
3462 (bfd_0l_any): Likewise.
3463 (_bfd_n1_any): Likewise.
3464 (bfd_void_any): Likewise.
3465 * libbfd.h (extern): Regenerate
3466 * aout-target.h (MY_bfd_is_target_special_symbol): Use vararg
3467 based dummy function.
3468 * aout-tic30.c (tic30_aout_set_arch_mach): Likewise.
3469 * binary.c (binary_get_symbol_info): Likewise.
3470 * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
3471 * coff-mips.c (mips_ecoff_backend_data): Likewise.
3472 * coffcode.h (coff_set_alignment_hook): Likewise.
3473 (symname_in_debug_hook): Likewise.
3474 (bfd_coff_backend_data bigobj_swap_table): Likewise.
3475 * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise.
3476 * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise.
3477 * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise.
3478 * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise.
3479 * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise.
3480 * elf32-score.c (elf_backend_omit_section_dynsym): Likewise.
3481 * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise.
3482 * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise.
3483 * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise.
3484 * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise.
3485 * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise.
3486 * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise.
3487 * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise.
3488 * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise.
3489 * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise.
3490 * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise.
3491 (bfd_elfNN_bfd_make_debug_symbol): Likewise.
3492 (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
3493 (bfd_elfNN_bfd_set_private_flags): Likewise.
3494 (bfd_elfNN_bfd_is_target_special_symbol): Likewise.
3495 (elf_backend_init_index_section): Likewise.
3496 (elf_backend_allow_non_load_phdr): Likewise.
3497 * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise.
3498 * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise.
3499 * ieee.c (ieee_construct_extended_name_table): Likewise.
3500 (ieee_write_armap): Likewise.
3501 (ieee_write_ar_hdr): Likewise.
3502 (ieee_bfd_is_target_special_symbol): Likewise.
3503 * ihex.c (ihex_canonicalize_symtab): Likewise.
3504 (ihex_bfd_is_target_special_symbol): Likewise.
3505 * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise.
3506 * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise.
3507 (_bfd_ecoff_set_alignment_hook): Likewise.
3508 * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise.
3509 * mmo.c (mmo_bfd_is_target_special_symbol): Likewise.
3510 * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise.
3511 * oasys.c (oasys_construct_extended_name_table): Likewise.
3512 (oasys_write_armap): Likewise.
3513 (oasys_write_ar_hdr): Likewise.
3514 (oasys_bfd_is_target_special_symbol): Likewise.
3515 * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise.
3516 * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise.
3517 * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise.
3518 * som.c (som_bfd_is_target_special_symbol): Likewise.
3519 * srec.c (srec_bfd_is_target_special_symbol): Likewise.
3520 * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise.
3521 * verilog.c (verilog_bfd_is_target_special_symbol): Likewise.
3522 * versados.c (versados_bfd_is_target_special_symbol): Likewise.
3523 (versados_bfd_reloc_name_lookup): Likewise.
3524 * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise.
3525 (vms_bfd_define_start_stop): Likewise.
3526 (alpha_vms_bfd_is_target_special_symbol): Likewise.
3527 * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise.
3528 * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise.
3529 * elf32-arc.c (get_replace_function): Assign replacement function
3531 * elf32-i370.c (i370_noop): Update prototype.
3533 2018-02-13 Alan Modra <amodra@gmail.com>
3536 * elf.c (_bfd_elf_fixup_group_sections): Account for removed
3537 relocation sections. If size reduces to just the flag word,
3538 remove that too and mark with SEC_EXCLUDE.
3539 * elflink.c (bfd_elf_final_link): Strip empty group sections.
3541 2018-02-13 Alan Modra <amodra@gmail.com>
3544 * elf.c (assign_file_positions_for_non_load_sections): Rewrite
3547 2018-02-12 Zebediah Figura <z.figura12@gmail.com>
3549 * i386msdos.c (msdos_mkobject); New function.
3550 (msdos_object_p): New function.
3551 (i386_msdos_vec): Use msdos_object_p as the check_format
3553 * peicode.h: Rename external_PEI_DOS_hdr, DOSMAGIC, and
3554 NT_SIGNATURE to external_DOS_hdr, IMAGE_DOS_SIGNATURE, and
3556 * peXXigen.c: Likewise.
3557 * coff-ia64.c: Likewise.
3559 2018-02-12 Nick Clifton <nickc@redhat.com>
3561 * elf32-nds32.c (nds32_elf_relax_longjump3): Remove redundant
3563 * elf32-arc.c (elf_arc_relocate_section): Likewise.
3565 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
3567 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Reorder conditions.
3568 (sparc_elf_append_rela): Assert that there is enough room in section.
3569 (_bfd_sparc_elf_copy_indirect_symbol): Fix formatting.
3570 (_bfd_sparc_elf_adjust_dynamic_symbol): Minor tweak.
3571 (allocate_dynrelocs): Remove outdated comments and reorder conditions.
3572 For a symbol subject to a GOT relocation, reserve a slot in the
3573 relocation section if the symbol isn't dynamic and we are in PIC mode.
3574 (_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: If relocation
3575 is relaxed and a slot was reserved, generate a R_SPARC_NONE relocation.
3576 <R_SPARC_GOTDATA_OP_HIX22>: Adjust comments.
3577 <R_SPARC_PC10>: Reorder conditions. Remove always-false assertion.
3578 (_bfd_sparc_elf_finish_dynamic_symbol): Rename local_undefweak into
3579 resolved_to_zero. Do not generate a dynamic GOT relocation for an
3580 undefined weak symbol with non-default visibility. Remove superfluous
3581 'else' and fix formatting.
3583 2018-02-09 H.J. Lu <hongjiu.lu@intel.com>
3585 * elf32-i386.c (elf_i386_get_synthetic_symtab): Also handle
3587 (i386_elf32_sol2_vec): Don't declare.
3588 (elf_i386_link_setup_gnu_properties): Also handle is_solaris.
3589 Don't set need_global_offset_table.
3590 (elf_i386_solaris_arch_bed): New.
3591 (elf_backend_arch_data): Set to elf_i386_solaris_arch_bed for
3593 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Check
3594 target_os != is_nacl instead of target_os == is_normal.
3595 (x86_64_elf64_sol2_vec): Don't declare.
3596 (elf_x86_64_link_setup_gnu_properties): Check target_os !=
3597 is_nacl instead of target_os == is_normal. Don't set
3598 need_global_offset_table.
3599 (elf_x86_64_solaris_arch_bed): New.
3600 (elf_backend_arch_data): Set to elf_x86_64_solaris_arch_bed for
3602 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep
3603 _GLOBAL_OFFSET_TABLE_ for Solaris.
3604 (_bfd_x86_elf_link_setup_gnu_properties): Don't copy
3605 need_global_offset_table.
3606 * elfxx-x86.h (elf_x86_target_os): Add is_solaris.
3607 (elf_x86_link_hash_table): Remove need_global_offset_table.
3608 (elf_x86_init_table): Likewise.
3610 2018-02-08 H.J. Lu <hongjiu.lu@intel.com>
3612 * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
3614 (i386_elf32_sol2_vec): Declared.
3615 (elf_i386_link_setup_gnu_properties): Set
3616 need_global_offset_table with info->output_bfd->xvec.
3617 * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
3619 (x86_64_elf64_sol2_vec): Declared.
3620 (elf_x86_64_link_setup_gnu_properties): Set
3621 need_global_offset_table with info->output_bfd->xvec.
3623 2018-02-08 H.J. Lu <hongjiu.lu@intel.com>
3625 * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
3627 (elf_i386_link_setup_gnu_properties): Set need_global_offset_table
3629 * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
3631 (elf_x86_64_link_setup_gnu_properties): Set
3632 need_global_offset_table for Solaris.
3633 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep the
3634 unused _GLOBAL_OFFSET_TABLE_ for Solaris.
3635 (_bfd_x86_elf_link_setup_gnu_properties): Copy
3636 need_global_offset_table.
3637 * elfxx-x86.h (elf_x86_link_hash_table): Add
3638 need_global_offset_table.
3639 (elf_x86_init_table): Likewise.
3641 2018-02-08 Jim Wilson <jimw@sifive.com>
3643 * elfnn-riscv.c (riscv_elf_relocate_section): Add comment for previous
3646 2018-02-08 Nick Clifton <nickc@redhat.com>
3649 * elf.c (elf_parse_notes): Reject notes with excessuively large
3652 2018-02-07 Alan Modra <amodra@gmail.com>
3654 Revert 2018-01-17 Alan Modra <amodra@gmail.com>
3655 * elf32-ppc.c: Remove speculation barrier support.
3656 * elf32-ppc.h: Likewise.
3657 * elf64-ppc.c: Likewise.
3658 * elf64-ppc.h: Likewise.
3660 2018-02-06 Jim Wilson <jimw@sifive.com>
3662 * elfnn-riscv.c (riscv_elf_relocate_section): Return TRUE if used
3663 callback to report an error.
3665 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
3668 * elfxx-sparc.c (sparc_elf_tls_transition): Turn call to bfd_link_pic
3669 into call to !bfd_link_executable and tidy up.
3670 (_bfd_sparc_elf_check_relocs): Fix formatting and tidy up.
3671 <R_SPARC_TLS_LE_HIX22>: Turn call to bfd_link_pic into call to
3672 !bfd_link_executable.
3673 <R_SPARC_TLS_IE_HI22>: Likewise.
3674 <GOT relocations>: Remove useless code, tidy and merge related blocks.
3675 <R_SPARC_TLS_GD_CALL>: Turn call to bfd_link_pic into call to
3676 !bfd_link_executable.
3677 <R_SPARC_WPLT30>: Tidy up.
3678 (_bfd_sparc_elf_gc_mark_hook): Turn call to bfd_link_pic into call to
3679 !bfd_link_executable.
3680 (allocate_dynrelocs): Likewise.
3681 (_bfd_sparc_elf_relocate_section): Fix formatting and tidy up.
3682 <R_SPARC_TLS_GD_HI22>: Merge into...
3683 <R_SPARC_TLS_GD_LO10>: ...this. Adjust 4th argument in call to
3684 sparc_elf_tls_transition and remove redundant code.
3685 <R_SPARC_TLS_LDM_HI22>: Turn call to bfd_link_pic into call to
3686 !bfd_link_executable.
3687 <R_SPARC_TLS_LDO_HIX22>: Likewise.
3688 <R_SPARC_TLS_LE_HIX22>: Likewise. Tidy up.
3689 <R_SPARC_TLS_LDM_CALL>: Likewise.
3690 <R_SPARC_TLS_GD_CALL>: Likewise. Tidy up.
3691 <R_SPARC_TLS_GD_ADD>: Likewise.
3692 <R_SPARC_TLS_LDM_ADD>: Likewise.
3693 <R_SPARC_TLS_LDO_ADD>: Likewise.
3694 <R_SPARC_TLS_IE_LD>: Likewise.
3696 2018-02-06 Miloš Stojanović <milos.stojanovic@rt-rk.com>
3699 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): If the dwarf
3700 functions failed to find the function name, try the generic elf
3701 find function instead.
3703 2018-02-06 Sergio Durigan Junior <sergiodj@redhat.com>
3705 * coff-rs6000.c (xcoff_write_archive_contents_old): Use
3706 'memcpy' instead of 'strncpy' when writing the magic number.
3708 2018-02-06 Nick Clifton <nickc@redhat.com>
3711 * opncls.c (bfd_get_debug_link_info_1): Check the size of the
3712 section before attempting to read it in.
3713 (bfd_get_alt_debug_link_info): Likewise.
3715 2018-02-06 Paul Carroll <pcarroll@codesourcery.com>
3717 * bfd/dwarf2.c (find_abstract_name): Modified to return file and
3718 line information in addition to name, if they can be found.
3720 2018-02-05 Renlin Li <renlin.li@arm.com>
3723 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Relax the
3724 R_AARCH64_ABS32 and R_AARCH64_ABS16 for absolute symbol. Apply the
3725 check for writeable section as well.
3727 2018-02-05 H.J. Lu <hongjiu.lu@intel.com>
3730 * elf32-i386.c (elf_i386_check_relocs): Set got_referenced if
3731 _GLOBAL_OFFSET_TABLE_ is referenced or GOT is needed to resolve
3732 undefined weak symbol to 0.
3733 * elf64-x86-64.c (elf_x86_64_check_relocs): Set got_referenced
3734 if _GLOBAL_OFFSET_TABLE_ is referenced.
3735 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Check
3736 got_referenced instead of ref_regular_nonweak. Remove the
3737 unused _GLOBAL_OFFSET_TABLE_ from symbol table.
3738 * elfxx-x86.h (elf_x86_link_hash_table): Add got_referenced.
3740 2018-02-05 Maciej W. Rozycki <macro@mips.com>
3742 * elfnn-riscv.c (_bfd_riscv_relax_pc): Use `memset' to
3743 initialize `hi_reloc'.
3745 2018-02-05 Maciej W. Rozycki <macro@mips.com>
3747 * elfxx-mips.c (_bfd_mips_elf_section_processing): For
3748 SHT_MIPS_REGINFO sections don't assert the correct size and
3749 report an error instead.
3751 2018-02-05 Maciej W. Rozycki <macro@mips.com>
3753 * elf.c (_bfd_elf_write_object_contents): Propagate a failure
3754 status from `->elf_backend_section_processing'.
3756 2018-02-02 Jim Wilson <jimw@sifive.com>
3759 * elfnn-riscv.c (riscv_relax_delete_bytes): New parameter link_info.
3760 If link_info->wrap_hash, check for a duplicate symbol and ignore.
3761 (_bfd_riscv_relax_call, bfd_riscv_relax_lui, _bfd_riscv_relax_tls_le):
3762 Pass new argument to riscv_relax_delete_bytes.
3763 (_bfd_riscv_relax_align, _bfd_riscv_relax_delete): Likewise. Remove
3764 ATTRIBUTE_UNUSED from link_info parameter.
3766 2018-02-02 Alan Modra <amodra@gmail.com>
3768 * elf64-ppc.c (ppc64_elf_relocate_section): Don't relocate nops
3769 emitted for toc sequence optimization. Set and use "howto" later.
3771 2018-02-01 Simon Marchi <simon.marchi@ericsson.com>
3773 * elf64-ppc.c (ppc64_elf_archive_symbol_lookup): Avoid pointer
3774 arithmetic on NULL pointer.
3775 * elflink.c (_bfd_elf_archive_symbol_lookup,
3776 elf_link_add_archive_symbols): Likewise.
3778 2018-01-31 Michael Matz <matz@suse.de>
3780 * elflink.c (bfd_elf_define_start_stop): Fix check of
3783 2018-01-31 H.J. Lu <hongjiu.lu@intel.com>
3786 * elflink.c (bfd_elf_define_start_stop): Check if __start and
3787 __stop symbols are referenced by shared objects.
3789 2018-01-30 Alan Modra <amodra@gmail.com>
3792 * elf.c (_bfd_elf_map_sections_to_segments): Don't start a new
3793 segment when demand paged with lma on the same page. Test this
3794 before load/non-load, executable/non-executable,
3795 writable/non-writable tests and simplify. Delete bogus relro
3796 condition in writable/non-writable test. Delete outdated
3797 comment. Formatting.
3799 2018-01-30 Alan Modra <amodra@gmail.com>
3801 * elflink.c (bfd_elf_define_start_stop): Make __start and __stop
3804 2018-01-29 Alan Modra <amodra@gmail.com>
3807 * coffgen.c (coff_pointerize_aux): Ensure auxent tagndx is in
3808 range before converting to a symbol table pointer.
3810 2018-01-27 Nick Clifton <nickc@redhat.com>
3812 * po/ru.po: Updated Russian translation.
3814 2018-01-26 Alan Modra <amodra@gmail.com>
3816 * elflink.c (bfd_elf_define_start_stop): Override symbols when
3817 they are defined dynamically.
3819 2018-01-26 Alan Modra <amodra@gmail.com>
3821 * elf64-ppc.c (ppc64_elf_size_stubs): Iterate sizing when
3822 .branch_lt changes size.
3824 2018-01-25 Alan Modra <amodra@gmail.com>
3827 * elfcode.h (elf_object_p): Avoid integer overflow.
3829 2018-01-25 Eric Botcazou <ebotcazou@adacore.com>
3832 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
3833 Do a mere lookup of the __tls_get_addr symbol instead of adding it.
3836 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
3839 * elfxx-sparc.c (sparc_elf_tls_transition): Replace
3840 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
3841 bfd_link_executable for TLS check.
3842 (_bfd_sparc_elf_check_relocs): Likewise.
3843 (allocate_dynrelocs): Likewise.
3844 (_bfd_sparc_elf_relocate_section): Likewise.
3846 2018-01-24 Renlin Li <renlin.li@arm.com>
3848 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Add support for
3849 BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
3850 BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
3851 BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
3852 BFD_RELOC_AARCH64_MOVW_PREL_G3.
3853 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
3854 (_bfd_aarch64_elf_resolve_relocation): Likewise.
3856 2018-01-24 Renlin Li <renlin.li@arm.com>
3858 * reloc.c: Add BFD_RELOC_AARCH64_MOVW_PREL_G0,
3859 BFD_RELOC_AARCH64_MOVW_PREL_G0_NC, BFD_RELOC_AARCH64_MOVW_PREL_G1,
3860 BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, BFD_RELOC_AARCH64_MOVW_PREL_G2,
3861 BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, BFD_RELOC_AARCH64_MOVW_PREL_G3.
3862 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add entries for
3863 BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
3864 BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
3865 BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
3866 BFD_RELOC_AARCH64_MOVW_PREL_G3.
3867 * bfd-in2.h: Regenerate.
3868 * libbfd.h: Regenerate.
3870 2018-01-23 Maciej W. Rozycki <macro@mips.com>
3872 * elfxx-mips.c (_bfd_mips_elf_final_link): Update a stale
3873 `mips_elf32_section_processing' comment reference.
3875 2018-01-20 H.J. Lu <hongjiu.lu@intel.com>
3878 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Check the
3879 versioned __tls_get_addr symbol.
3881 2018-01-19 Nick Clifton <nickc@redhat.com>
3883 * po/fr.po: Updated French translation.
3885 2018-01-18 Alan Modra <amodra@gmail.com>
3887 * elf32-ppc.c (ppc_elf_create_glink): Correct alignment of .glink.
3888 * elf64-ppc.c (ppc64_elf_size_stubs): Handle negative plt_stub_align.
3889 (ppc64_elf_build_stubs): Likewise.
3891 2018-01-17 Nick Clifton <nickc@redhat.com>
3893 * po/ru.po: Updated Russian translation.
3894 * po/uk/po: Updated Ukranian translation.
3896 2018-01-17 Alan Modra <amodra@gmail.com>
3898 * elf64-ppc.c (ppc64_elf_build_stubs): Silence gcc warning.
3900 2018-01-17 Alan Modra <amodra@gmail.com>
3902 * elf32-ppc.c (GLINK_ENTRY_SIZE): Handle speculation barrier.
3903 (CRSETEQ, BEQCTRM): Define.
3904 (is_nonpic_glink_stub): Don't check bctr.
3905 (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
3906 (ppc_elf_relax_section): Size speculation barrier.
3907 (output_bctr): New function.
3908 (write_glink_stub): Use output_bctr.
3909 (ppc_elf_relocate_section): Use output_bctr for long branch stub.
3910 (ppc_elf_finish_dynamic_symbol): Likewise.
3911 (ppc_elf_finish_dynamic_sections): Use output_bctr.
3912 * elf32-ppc.h (struct ppc_elf_params): Add speculate_indirect_jumps.
3913 * elf64-ppc.c (CRSETEQ, BEQCTRM, BEQCTRLM): Define.
3914 (GLINK_PLTRESOLVE_SIZE): Size speculation barrier.
3915 (size_global_entry_stubs): Handle speculation barrier sizing.
3916 (plt_stub_size): Likewise.
3917 (output_bctr): New function.
3918 (build_plt_stub, build_tls_get_addr_stub): Output speculation
3920 (ppc_build_one_stub): Likewise for ppc_stub_plt_branch.
3921 (ppc_size_one_stub): Size speculation barrier in ppc_stub_plt_branch.
3922 (build_global_entry_stubs): Output speculation barrier.
3923 (ppc64_elf_build_stubs): Likewise in __glink_PLTresolve stub.
3924 * elf64-ppc.h (struct ppc64_elf_params): Add speculate_indirect_jumps.
3926 2018-01-17 Alan Modra <amodra@gmail.com>
3928 * elf32-ppc.c (GLINK_ENTRY_SIZE): Add parameters, handle
3929 __tls_get_addr_opt, and alignment sizing.
3930 (TLS_GET_ADDR_GLINK_SIZE): Delete.
3931 (is_nonpic_glink_stub): Don't use GLINK_ENTRY_SIZE.
3932 (ppc_elf_get_synthetic_symtab): Recognize stubs spaced at 4, 6,
3934 (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
3935 (allocate_dynrelocs): Use new GLINK_ENTRY_SIZE.
3936 (ppc_elf_size_dynamic_sections): Likewise. Size branch table
3938 (write_glink_stub): Handle __tls_get_addr_opt stub.
3939 Pad out to size given by GLINK_ENTRY_SIZE.
3940 (ppc_elf_relocate_section): Adjust write_glink_stub call.
3941 (ppc_elf_finish_dynamic_symbol): Likewise.
3942 (ppc_elf_finish_dynamic_sections): Write PLTresolve without using
3943 insn array since so many need rewriting.
3944 * elf32-ppc.h (struct ppc_elf_params): Add plt_stub_align.
3945 * elf64-ppc.c (GLINK_PLTRESOLVE_SIZE): Rename from
3946 GLINK_CALL_STUB_SIZE. Add htab param and evaluate to size without
3947 nops. Adjust all uses.
3948 (ppc64_elf_get_synthetic_symtab): Don't use GLINK_CALL_STUB_SIZE
3949 in glink_vma calculation.
3950 (struct ppc_link_hash_table): Add global_entry section pointer.
3951 (create_linkage_sections): Create separate section for global
3953 (PPC_LO, PPC_HI, PPC_HA): Move earlier.
3954 (size_global_entry_stubs): Handle sizing for aligned stubs.
3955 (ppc64_elf_size_dynamic_sections): Handle global_entry alloc,
3956 and don't stash end of glink branch table in rawsize.
3957 (ppc_build_one_stub): Rewrite stub size calculations.
3958 (build_global_entry_stubs): Use new section.
3959 (ppc64_elf_build_stubs): Don't pad __glink_PLTresolve with nops.
3960 Build lazy link stubs out to end of section. Build global entry
3961 stubs in new section.
3963 2018-01-15 Nick Clifton <nickc@redhat.com>
3965 * po/uk.po: Updated Ukranian translation.
3967 2018-01-13 Nick Clifton <nickc@redhat.com>
3969 * po/bfd.pot: Regenerated.
3971 2018-01-13 Nick Clifton <nickc@redhat.com>
3973 * version.m4: Bump version to 2.30.51
3974 * configure: Regenerate.
3976 2018-01-13 Nick Clifton <nickc@redhat.com>
3978 2.30 branch created.
3980 2018-01-12 Jens Widell <jl@opera.com>
3982 * elf.c (setup_group): Optimize search for group by remembering
3983 last found group and restarting search at that index.
3984 * elf-bfd.h (struct elf_obj_tdata): Add group_search_offset field.
3986 2018-01-12 Gunther Nikl <gnikl@users.sourceforge.net>
3988 * aoutx.h (aout_link_check_ar_symbols): Remove default and handle
3989 bfd_link_common_skip_none in switch.
3991 2018-01-12 Alan Modra <amodra@gmail.com>
3994 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Ignore dynamic
3995 references on forced local symbols.
3997 2018-01-12 Vlad Ivanov <vlad@ivanov.email>
3999 * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
4000 .reginfo section has wrong size.
4002 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
4005 * elf.c (_bfd_elf_map_sections_to_segments): When generating
4006 separate code and read-only data LOAD segments, create a new
4007 LOAD segment if the previous section contains text and the
4008 current section doesn't or vice versa. Don't put a writable
4009 section in a read-only segment if there is a RELRO segment.
4011 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
4014 * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Ignore dynamic
4015 references on forced local symbols.
4017 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
4020 * elflink.c (bfd_elf_gc_sections): Keep all PREINIT_ARRAY,
4021 INIT_ARRAY as well as FINI_ARRAY sections for ld -r --gc-section.
4023 2018-01-09 Kuan-Lin Chen <kuanlinchentw@gmail.com>
4026 * elf32-nds32.c (nds32_elf_relax_loadstore): Fix a typographical error.
4028 2018-01-03 John Baldwin <jhb@FreeBSD.org>
4030 * elf.c (elfcore_grok_freebsd_note): Handle
4031 NT_FREEBSD_PROCSTAT_PROC, NT_FREEBSD_PROCSTAT_FILES, and
4032 NT_FREEBSD_PROCSTAT_VMMAP.
4034 2018-01-03 Alan Modra <amodra@gmail.com>
4036 Update year range in copyright notice of all files.
4038 For older changes see ChangeLog-2017
4040 Copyright (C) 2018 Free Software Foundation, Inc.
4042 Copying and distribution of this file, with or without modification,
4043 are permitted in any medium without royalty provided the copyright
4044 notice and this notice are preserved.
4050 version-control: never