1 2018-09-04 Jose E. Marchesi <jose.marchesi@oracle.com>
3 * elfxx-sparc.c (_bfd_sparc_elf_info_to_howto): Do not issue an
4 error when an invalid relocation is passed; this is already done
5 by `_bfd_sparc_elf_info_to_howto_ptr'.
7 2018-09-04 Jose E. Marchesi <jose.marchesi@oracle.com>
9 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Issue an
10 error when an invalid symbol index is retrieved in ELF64_R_SYM of
11 a relocation seen in an input file.
13 2018-09-03 Jozef Lawrynowicz <jozef.l@mittosystems.com>
14 Alan Modra <amodra@gmail.com>
17 elf.c (copy_elf_program_header): When first segment contains
18 only the headers and SHT_NOBITS sections, use segment p_filesz
19 to calculate header and padding size. Use filepos of the first
22 018-08-31 H.J. Lu <hongjiu.lu@intel.com>
25 * archures.c (bfd_arch_get_compatible): Allow an IR object with
28 2018-08-31 Alan Modra <amodra@gmail.com>
30 * elf64-ppc.c (num_relocs_for_offset): New function.
31 (emit_relocs_for_offset): New function.
32 (use_global_in_relocs): New function, split out from..
33 (ppc_build_one_stub): ..here. Output relocations for notoc stubs.
34 (ppc_size_one_stub): Calculate reloc count for notoc stubs.
35 (ppc64_elf_size_stubs): Don't count undefined syms in stub_globals.
37 2018-08-31 Alan Modra <amodra@gmail.com>
39 * reloc.c (BFD_RELOC_PPC64_REL16_HIGH, BFD_RELOC_PPC64_REL16_HIGHA),
40 (BFD_RELOC_PPC64_REL16_HIGHER, BFD_RELOC_PPC64_REL16_HIGHERA),
41 (BFD_RELOC_PPC64_REL16_HIGHEST, BFD_RELOC_PPC64_REL16_HIGHESTA):
43 * elf64-ppc.c (ppc64_elf_howto_raw): Add new REL16 howtos.
44 (ppc64_elf_reloc_type_lookup): Translate new REL16 relocs.
45 (ppc64_elf_check_relocs, ppc64_elf_relocate_section): Handle them.
46 * bfd-in2.h: Regenerate.
47 * libbfd.h: Regenerate.
49 2018-08-31 Alan Modra <amodra@gmail.com>
51 * elf64-ppc.c: Correct _notoc stub comments.
52 (ppc_build_one_stub): Simplify output of branch for notoc
53 long branch stub. Don't include label offset of 8 bytes in
54 "off" calculation for notoc plt stub. Don't emit insns to get pc.
55 (build_offset): Emit insns to get pc here instead.
56 (size_offset): Add 4 extra insns.
57 (plt_stub_size): Adjust for "off" and size_offset changes.
58 (ppc_size_one_stub): Rearrange code into a switch, duplicating
59 some to better match ppc_build_one_stub.
61 2018-08-29 Chenghua Xu <paul.hua.gm@gmail.com>
63 * archures.c (bfd_architecture): New machine
65 * bfd-in2.h (bfd_architecture): Likewise.
66 * cpu-mips.c (enum I_xxx): Likewise.
67 (arch_info_struct): Likewise.
68 * elfxx-mips.c (_bfd_elf_mips_mach): Handle
70 (mips_set_isa_flags): Likewise.
71 (mips_mach_extensions): Map bfd_mach_mips_gs264e to
72 bfd_mach_mips_gs464e extension.
74 2018-08-29 Chenghua Xu <paul.hua.gm@gmail.com>
76 * archures.c (bfd_architecture): New machine
78 * bfd-in2.h (bfd_architecture): Likewise.
79 * cpu-mips.c (enum I_xxx): Likewise.
80 (arch_info_struct): Likewise.
81 * elfxx-mips.c (_bfd_elf_mips_mach): Handle
83 (mips_set_isa_flags): Likewise.
84 (mips_mach_extensions): Map bfd_mach_mips_gs464e to
85 bfd_mach_mips_gs464 extension.
87 2018-08-29 Chenghua Xu <paul.hua.gm@gmail.com>
89 * archures.c (bfd_architecture): Rename
90 bfd_mach_mips_loongson_3a to bfd_mach_mips_gs464.
91 * bfd-in2.h (bfd_architecture): Likewise.
92 * cpu-mips.c (enum I_xxx): Likewise.
93 (arch_info_struct): Likewise.
94 * elfxx-mips.c (_bfd_elf_mips_mach): Likewise.
95 (mips_set_isa_flags): Likewise.
96 (mips_mach_extensions): Likewise.
97 (bfd_mips_isa_ext_mach): Likewise.
98 (bfd_mips_isa_ext): Likewise.
99 (print_mips_isa_ext): Delete AFL_EXT_LOONGSON_3A.
101 2018-08-29 Chenghua Xu <paul.hua.gm@gmail.com>
103 * elfxx-mips.c (print_mips_ases): Add Loongson EXT2 extension.
105 2018-08-29 Chenghua Xu <paul.hua.gm@gmail.com>
107 * elfxx-mips.c (infer_mips_abiflags): Use ases instead of
108 isa_ext for infer ABI flags.
109 (print_mips_ases): Add Loongson EXT extension.
111 2018-08-29 Chenghua Xu <paul.hua.gm@gmail.com>
113 * elfxx-mips.c (print_mips_ases): Add CAM extension.
115 2018-08-27 H.J. Lu <hongjiu.lu@intel.com>
117 * elfxx-x86.c (_bfd_x86_elf_parse_gnu_properties): Don't mask
118 out the GNU_PROPERTY_X86_UINT32_VALID bit.
120 2018-08-25 H.J. Lu <hongjiu.lu@intel.com>
123 * elf.c (_bfd_elf_get_symbol_version_string): Return
124 _("<corrupt>") for corrupt symbol version info.
126 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
128 * elfxx-x86.c (_bfd_x86_elf_parse_gnu_properties): Handle
129 X86_COMPAT_ISA_1_USED, X86_COMPAT_ISA_1_NEEDED,
130 X86_UINT32_AND_LO, X86_UINT32_AND_HI, X86_UINT32_OR_LO,
131 X86_UINT32_OR_HI, X86_UINT32_OR_AND_LO and X86_UINT32_OR_AND_HI
132 instead of X86_ISA_1_USED, X86_ISA_1_NEEDED and X86_FEATURE_1_AND.
133 (_bfd_x86_elf_merge_gnu_properties): Likewise.
134 (_bfd_x86_elf_link_setup_gnu_properties): Add X86_FEATURE_2_NEEDED
135 instead of X86_ISA_1_NEEDED.
136 (_bfd_x86_elf_link_fixup_gnu_properties): Handle
137 X86_COMPAT_ISA_1_USED, X86_COMPAT_ISA_1_NEEDED, X86_UINT32_AND_LO,
138 X86_UINT32_AND_HI, X86_UINT32_OR_LO, X86_UINT32_OR_HI,
139 X86_UINT32_OR_AND_LO and X86_UINT32_OR_AND_HI instead of
140 X86_ISA_1_USED, X86_ISA_1_NEEDED and X86_FEATURE_1_AND.
142 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
144 * elfxx-x86.c (_bfd_x86_elf_parse_gnu_properties): Mask out the
145 GNU_PROPERTY_X86_UINT32_VALID bit.
146 (_bfd_x86_elf_link_fixup_gnu_properties): Set the
147 GNU_PROPERTY_X86_UINT32_VALID bit for non-relocatable output.
149 2018-08-23 Zenith423 <zenith432@users.sourceforge.net>
152 * plugin.c (struct plugin_list_entry): New structure.
153 (plugin_list): New variable.
154 (try_load_plugin): Place opened plugins on a list. Ensure that
155 the refcount in the dynamic loader is kept at 1.
157 2018-08-23 Alan Modra <amodra@gmail.com>
159 * elf64-ppc.c (ppc64_elf_relocate_section): Revise "call lacks
162 2018-08-23 Nick Clifton <nickc@redhat.com>
164 * elf64-hppa.c (elf_hppa_final_link_relocate): Replace unworkable
165 code with an assertion.
167 2018-08-23 Nick Clifton <nickc@redhat.com>
170 * coffgen.c (coff_pointerize_aux): Add table_end parameter. Use
171 it to prevent walking off the end of the table.
172 (coff_get_normalized_symtab): Pass internal_end pointer to
175 2018-08-23 Alan Modra <amodra@gmail.com>
177 * elf64-ppc.c (ppc64_elf_relocate_section): Don't miss clearing
178 unresolved_reloc on ppc_stub_plt_call_notoc.
180 2018-08-22 H.J. Lu <hongjiu.lu@intel.com>
183 * development.sh (experimental): New.
185 2018-08-22 Helge Deller <deller@gmx.de>
186 Nick Clifton <nickc@redhat.com>
188 * elf-hppa.h (elf_hppa_fake_sections): Use SHT_PARISC_UNWIND as
189 the section type of the .PARISC.unwind section on 64-bit binaries
190 and SHT_PROGBITS for 32-bit binaries. Add a comment about it.
191 Add comment about the sh_entsize value.
193 2018-08-22 Rafeal Auler <rafaelauler@gmail.com>
196 * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Always update the
197 stub's target, since it may have been changed after the layout.
199 2018-08-21 John Darington <john@darrington.wattle.id.au>
201 * elf32-s12z.c (opru18_reloc): New function.
202 (elf_s12z_howto_table): Adjust Howto according to new knowledge.
204 2018-08-21 mephi42 <mephi42@gmail.com>
207 * mach-o.c (bfd_mach_o_mangle_symbols): Update n_type even if
208 data is already considered filled.
210 2018-08-21 Alan Modra <amodra@gmail.com>
212 * elf64-ppc.c (HOW): Define.
214 (ppc64_elf_howto_raw): Use HOW to initialize entries.
215 * elf32-ppc.c (HOW): Define.
216 (ppc_elf_howto_raw): Use HOW to initialize entries, updating
217 R_PPC_VLE_REL15 and R_PPC_VLE_REL24 to use bitpos=0.
219 2018-08-21 Alan Modra <amodra@gmail.com>
221 * reloc.c (reloc_howto_type): Typedef.
222 (bfd_symbol): Delete forward declaration.
223 (struct reloc_howto_struct): Add "negate" field. Make "size",
224 "bitsize", "rightshift", "bitpos", "complain_on_overflow",
225 "pc_relative", "partial_inplace", and "pcrel_offset" bitfields.
226 Rearrange for better packing. Revise comments.
227 (HOWTO): Map to rearranged reloc_howto_struct.
228 (bfd_get_reloc_size): Delete now unused cases.
229 (read_reloc, write_reloc): Likewise.
230 (apply_reloc, _bfd_relocate_contents): Test howto->negate
231 rather than howto->size < 0 for negated relocation values.
232 * coff-rs6000.c (xcoff_complain_overflow_bitfield_func): Avoid
233 signed/unsigned warning.
234 (xcoff_ppc_relocate_section): Delete "condition is always false"
236 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Likewise.
237 * cpu-ns32k.c (do_ns32k_reloc): Adjust to suit reloc_howto_struct
239 * vms-alpha.c (_bfd_vms_write_etir, alpha_vms_slurp_relocs): Use
240 size 16 for ALPHA_R_LINKAGE.
241 (alpha_howto_table <ALPHA_R_LINKAGE>): Set encoded size and
243 * bfd-in.h (reloc_howto_type): Delete.
244 * bfd-in2.h: Regenerate.
246 2018-08-21 Alan Modra <amodra@gmail.com>
248 * reloc.c (HOWTO): Revise comment.
249 (NEWHOWTO, HOWTO_PREPARE): Delete.
250 * coff-arm.c (coff_arm_reloc_type_lookup): Replace const struc
251 reloc_howto_struct with reloc_howto_type.
252 * ns32knetbsd.c (MY_bfd_reloc_type_lookup): Likewise.
253 * vms-alpha.c (alpha_vms_bfd_reloc_type_lookup): Likewise.
254 * elf-hppa.h (HOW): Define.
255 (elf_hppa_howto_table): Use it to simplify this table, correcting
256 name of R_PARISC_LTOFF16WF, R_PARISC_LTOFF_FPTR64, and
257 R_PARISC_LTOFF_FPTR16DF.
258 * elf32-mep.c (MEPREL): Use HOWTO.
259 * bfd-in2.h: Regenerate.
261 2018-08-20 Alan Modra <amodra@gmail.com>
263 * mmo.c (valid_mmo_symbol_character_set): Initialize and make
265 (mmo_init): Don't init valid_mmo_symbol_character_set.
267 2018-08-20 Alan Modra <amodra@gmail.com>
269 * rs6000-core.c (CORE_COMMONSZ): Balance parentheses in expression.
271 2018-08-17 H.J. Lu <hongjiu.lu@intel.com>
274 * elf-bfd.h (elf_backend_data): Add fixup_gnu_properties.
275 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Call
276 backend fixup_gnu_properties if it isn't NULL. Discard
277 .note.gnu.property section if all properties have been removed.
278 * elfxx-target.h (elf_backend_fixup_gnu_properties): New.
279 (elfNN_bed): Initialize fixup_gnu_properties.
280 * elfxx-x86.c (_bfd_x86_elf_link_fixup_gnu_properties): New
282 * elfxx-x86.h (_bfd_x86_elf_link_fixup_gnu_properties): New
284 (elf_backend_fixup_gnu_properties): New.
286 2018-08-16 Alan Modra <amodra@gmail.com>
288 * elf64-ppc.c: Correct ppc_stub_long_branch_notoc example.
291 2018-08-12 H.J. Lu <hongjiu.lu@intel.com>
294 * Makefile.am (BFD32_LIBS): Add elf-properties.lo.
295 (BFD32_LIBS_CFILES): Add elf-properties.c.
296 (BFD32_BACKENDS): Remove elf-properties.lo.
297 (BFD32_BACKENDS_CFILES): Remove elf-properties.c.
298 * configure.ac (elf): Remove elf-properties.lo.
299 * Makefile.in: Regenerated.
300 * configure: Likewise.
302 2018-08-11 H.J. Lu <hongjiu.lu@intel.com>
305 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Don't
306 add X86_ISA_1_NEEDED property only if existing properties won't
309 2018-08-11 Alan Modra <amodra@gmail.com>
311 * reloc.c (bfd_get_reloc_size): Sort switch.
312 (read_reloc, write_reloc, apply_reloc): New functions.
313 (bfd_perform_relocation, bfd_install_relocation): Use apply_reloc.
314 (_bfd_relocate_contents): Use read_reloc and write_reloc.
315 (_bfd_clear_contents): Likewise.
317 2018-08-11 John Darrington <john@darrington.wattle.id.au>
319 * reloc.c (_bfd_relocate_contents): Handle 3 byte relocs.
320 (_bfd_clear_contents): Likewise.
321 (bfd_perform_relocation): Likewise.
322 (bfd_install_relocation): Likewise.
324 2018-08-10 H.J. Lu <hongjiu.lu@intel.com>
327 * elflink.c (bfd_elf_record_link_assignment): Always clear
328 h->verinfo.verdef when overriding a dynamic definition.
330 2018-08-10 H.J. Lu <hongjiu.lu@intel.com>
333 * elf-properties.c (elf_get_gnu_property_section_size): Always
334 use align_size as pr_datasz for GNU_PROPERTY_STACK_SIZE.
335 (elf_write_gnu_properties): Likewise.
337 2018-08-08 H.J. Lu <hongjiu.lu@intel.com>
340 * bfd.c (bfd_convert_section_size): Check BFD_DECOMPRESS after
341 calling _bfd_elf_convert_gnu_property_size to convert
342 .note.gnu.property section size.
343 (bfd_convert_section_contents): Check BFD_DECOMPRESS after
344 calling _bfd_elf_convert_gnu_properties to convert
345 .note.gnu.property section.
346 * elf-bfd.h (_bfd_elf_convert_gnu_property_size): New prototype.
347 (_bfd_elf_convert_gnu_properties): Likewise.
348 * elf-properties.c (elf_get_gnu_property_section_size): New
350 (elf_write_gnu_properties): Likewise.
351 (_bfd_elf_convert_gnu_property_size): Likewise.
352 (_bfd_elf_convert_gnu_properties): Likewise.
353 (_bfd_elf_link_setup_gnu_properties): Use
354 elf_get_gnu_property_section_size and elf_write_gnu_properties.
356 2018-08-08 H.J. Lu <hongjiu.lu@intel.com>
359 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Remove
360 GNU_PROPERTY_X86_ISA_1_USED if an input file doesn't have it.
361 (_bfd_x86_elf_link_setup_gnu_properties): Adding the
362 GNU_PROPERTY_X86_ISA_1_NEEDED, instead of
363 GNU_PROPERTY_X86_ISA_1_USED, property.
365 2018-08-07 Alan Modra <amodra@gmail.com>
367 * elf64-ppc.c (struct map_stub): Delete tls_get_addr_opt_bctrl.
368 Add lr_restore, eh_size and eh_base.
369 (eh_advance, eh_advance_size): New functions.
370 (build_tls_get_addr_stub): Emit EH info for stub.
371 (ppc_build_one_stub): Likewise for _notoc stubs.
372 (ppc_size_one_stub): Size EH info for stub.
373 (group_sections): Init new map_stub fields.
374 (stub_eh_frame_size): Delete.
375 (ppc64_elf_size_stubs): Size EH info for stubs. Set up dummy EH
377 (ppc64_elf_build_stubs): Reinit new map_stub fields. Set FDE
378 offset to stub section here..
379 (ppc64_elf_finish_dynamic_sections): ..rather than here.
381 2018-08-07 Alan Modra <amodra@gmail.com>
383 * elf64-ppc.c (ppc64_elf_relocate_section): Don't skip first
384 instruction of __tls_get_addr_opt stub.
385 (plt_stub_size): Omit ALWAYS_EMIT_R2SAVE condition when
386 dealing with __tls_get_addr_opt stub.
387 (build_tls_get_addr_stub, ppc_size_one_stub): Likewise.
389 2018-08-06 Claudiu Zissulescu <claziss@synopsys.com>
391 * elf32-arc.c (arc_elf_merge_private_bfd_data): Complain about
392 efalgs only when in/out exists.
393 (elf32_arc_section_from_shdr): Don't complain about 0x0c
394 section type. It is mwdt compiler specific.
396 2018-08-06 Claudiu Zissulescu <claziss@synopsys.com>
398 * elf32-arc.c (arc_elf_merge_attributes): Fix merge attributes.
400 2018-08-06 Claudiu Zissulescu <claziss@synopsys.com>
402 * elf32-arc.c (arc_elf_merge_attributes): Handle
405 2018-08-05 Alan Modra <amodra@gmail.com>
407 * elf64-ppc.c (ADDI_R12_R11, ADDI_R12_R12, LIS_R12),
408 (ADDIS_R12_R11, ORIS_R12_R12_0, ORI_R12_R12_0),
409 (SLDI_R12_R12_32, LDX_R12_R11_R12, ADD_R12_R11_R12): Define.
410 (ppc64_elf_howto_raw): Add R_PPC64_REL24_NOTOC entry.
411 (ppc64_elf_reloc_type_lookup): Support R_PPC64_REL24_NOTOC.
412 (ppc_stub_type): Add ppc_stub_long_branch_notoc,
413 ppc_stub_long_branch_both, ppc_stub_plt_branch_notoc,
414 ppc_stub_plt_branch_both, ppc_stub_plt_call_notoc, and
415 ppc_stub_plt_call_both.
416 (is_branch_reloc): Add R_PPC64_REL24_NOTOC.
417 (build_offset, size_offset): New functions.
418 (plt_stub_size): Support plt_call_notoc and plt_call_both.
419 (ppc_build_one_stub, ppc_size_one_stub): Support new stubs.
420 (toc_adjusting_stub_needed): Handle R_PPC64_REL24_NOTOC.
421 (ppc64_elf_size_stubs): Likewise, and new stubs.
422 (ppc64_elf_build_stubs, ppc64_elf_relocate_section): Likewise.
423 * reloc.c: Add BFD_RELOC_PPC64_REL24_NOTOC.
424 * bfd-in2.h: Regenerate.
425 * libbfd.h: Regenerate.
427 2018-08-05 Alan Modra <amodra@gmail.com>
429 * elf64-ppc.c (ppc_build_one_stub): Lose "_r2off" in stub symbols.
431 2018-08-02 Jim Wilson <jimw@sifive.com>
433 * elfnn-riscv.c (riscv_elf_create_dynamic_sections): For .tdata.dyn,
434 add SEC_LINKER_CREATED flag.
436 2018-08-01 Nick Clifton <nickc@redhat.com>
438 * coff-rs6000.c (_bfd_xcoff_put_ldsymbol_name): Suppress warnings
439 about potentially truncated strncpy operations.
440 (_bfd_xcoff_put_symbol_name): Likewise.
442 * elf32-avr.c (avr_stub_name): Check for a NULL return from
445 2018-08-01 Zenith <zenith432@users.sourceforge.net>
448 * plugin.c (bfd_plugin_open_input): Close file descriptor if the
450 (try_claim): Always close the file descriptor at the end of the
452 (try_load_plugin): If a plugin has already been registered, then
453 skip the dlopen and onload steps and go straight to claiming the
454 file. If these is an error, close the plugin.
456 2018-08-01 Alan Modra <amodra@gmail.com>
458 * elf64-ppc.c (plt_stub_pad): Delay plt_stub_size call until needed.
459 (ppc_build_one_stub): Don't set stub_offset, instead assert that
460 it is sane. Don't adjust stub_offset for alignment. Adjust size
461 calculation. Use "targ" temp when calculating offsets.
462 (ppc_size_one_stub): Set stub_offset here. Use "targ" temp when
463 calculating offsets. Adjust for alignment before setting
464 tls_get_addr_opt_bctrl.
466 2018-08-01 Alan Modra <amodra@gmail.com>
468 * po/SRC-POTFILES.in: Regenerate.
470 2018-07-30 Nick Clifton <nickc@redhat.com>
473 * elf32-sh.c (sh_elf_relocate_section): When processing
474 translation relocs, fail if the relocation offset is too small.
475 Replace BFD_ASSERTs with more helpful error messages.
477 2018-07-30 Andrew Jenner <andrew@codesourcery.com>
479 * Makefile.am (ALL_MACHINES, ALL_MACHINES_CFILES): Add C-SKY.
480 (BFD32_BACKENDS, BFD_BACKENDS_CFILES): Likewise.
481 * Makefile.in: Regenerated.
482 * archures.c (enum bfd_architecture): Add bfd_arch_csky and
483 related bfd_mach defines.
484 (bfd_csky_arch): Declare.
485 (bfd_archures_list): Add C-SKY.
486 * bfd-in.h (elf32_csky_build_stubs): Declare.
487 (elf32_csky_size_stubs): Declare.
488 (elf32_csky_next_input_section: Declare.
489 (elf32_csky_setup_section_lists): Declare.
490 * bfd-in2.h: Regenerated.
491 * config.bfd: Add C-SKY.
492 * configure.ac: Likewise.
493 * configure: Regenerated.
494 * cpu-csky.c: New file.
495 * elf-bfd.h (enum elf_target_id): Add C-SKY.
496 * elf32-csky.c: New file.
497 * libbfd.h: Regenerated.
498 * reloc.c: Add C-SKY relocations.
499 * targets.c (csky_elf32_be_vec, csky_elf32_le_vec): Declare.
500 (_bfd_target_vector): Add C-SKY target vector entries.
502 2018-07-27 John Darrington <john@darrington.wattle.id.au>
504 * elf32-s12z.c (ELF_TARGET_ID): Don't define.
506 2018-07-27 John Darrington <john@darrington.wattle.id.au>
508 * libbfd.c (bfd_getb24, bfd_getl24): New functions.
509 (bfd_get_24, bfd_put_24): New macros.
510 * bfd-in2.h: Regenerate.
512 2018-07-27 John Darrington <john@darrington.wattle.id.au>
514 * elf32-s12z.c (s12z_elf_set_mach_from_flags): Remove comment.
516 2018-07-26 Alan Modra <amodra@gmail.com>
518 * elf64-ppc.c (ppc64_elf_size_stubs): Use a ppc_stub_long_branch_r2off
519 for calls to symbols with STO_PPC64_LOCAL_MASK bits set to 1.
521 2018-07-25 Alan Modra <amodra@gmail.com>
523 * elf32-ppc.c (ppc_elf_relax_section): Ignore common or undef locals.
524 Avoid trashing toff with added when used as a symbol index.
525 Ignore R_PPC_PLTREL24 addends in unused example code. Avoid
526 creating unnecessary fixups when relocatable.
528 2018-07-25 Alan Modra <amodra@gmail.com>
530 * elf32-arm.c (elf32_arm_nabi_write_core_note): Disable
531 -Wstringop-truncation warning for gcc-8.0 too.
532 * elf32-ppc.c (ppc_elf_write_core_note): Likewise.
533 * elf64-ppc.c (ppc64_elf_write_core_note): Likewise.
534 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise.
535 * elf32-s390.c (elf_s390_write_core_note): Comment fix.
536 * elf64-s390.c (elf_s390_write_core_note): Likewise.
538 2018-07-24 Alan Modra <amodra@gmail.com>
541 * dwarf2.c (dwarf_debug_section_enum): Fix comment typo.
542 * elf.c (bfd_section_from_shdr, elf_sort_sections): Likewise.
544 2018-07-23 Max Filippov <jcmvbkbc@gmail.com>
546 * elf32-xtensa.c (elf_xtensa_finish_dynamic_sections): Move
547 relocation sections consistency check to always check both
548 .rela.dyn and .rela.plt when they exist. Rearrange variable
549 definition and assignment places.
551 2018-07-23 Max Filippov <jcmvbkbc@gmail.com>
553 * elf32-xtensa.c (shrink_dynamic_reloc_sections): Shrink dynamic
554 relocations section for dynamic undefined weak symbols when
555 linking a shared object.
557 2018-07-23 Tom Tromey <tom@tromey.com>
559 * elf.c (bfd_get_elf_phdrs): Don't call memcpy with size 0.
561 2018-07-21 Eric Botcazou <ebotcazou@adacore.com>
563 * elf32-arm.c (elf32_arm_final_link_relocate) <R_ARM_GOT32>: Small
564 cleanup for the case of a global symbol that binds locally. Also
565 install a value in the GOT slot in the case of a local symbol in
568 2018-07-20 H.J. Lu <hongjiu.lu@intel.com>
571 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): If the
572 separate code program header is needed, make sure that the first
573 read-only PT_LOAD segment has no code by adding a
574 GNU_PROPERTY_X86_ISA_1_USED note.
576 2018-07-20 Chenghua Xu <paul.hua.gm@gmail.com>
577 Maciej W. Rozycki <macro@mips.com>
579 * elfxx-mips.c (print_mips_ases): Add MMI extension.
581 2018-07-20 Maciej W. Rozycki <macro@mips.com>
583 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Do not
584 create DT_REL, DT_RELSZ or DT_RELENT dynamic entries if the
585 dynamic relocation section will be discarded from output.
586 (_bfd_mips_elf_finish_dynamic_sections) <DT_RELSZ>: Assert that
587 the dynamic relocation section will be retained in output.
589 2018-07-18 Maciej W. Rozycki <macro@mips.com>
591 * xcofflink.c (xcoff_write_global_symbol): Fix symbol type
592 checks for defined weak symbols.
594 2018-07-17 Maciej W. Rozycki <macro@mips.com>
596 * elf32-nds32.c (nds32_elf_relax_loadstore): Use
597 `bfd_is_abs_symbol' rather than `bfd_is_abs_section' in checking
598 whether the symbol is absolute.
599 (nds32_elf_relax_lo12): Likewise.
600 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
601 (elfNN_aarch64_check_relocs): Likewise.
602 * xcofflink.c (xcoff_need_ldrel_p): Likewise.
603 (bfd_xcoff_import_symbol): Likewise.
604 (xcoff_write_global_symbol): Likewise.
606 2018-07-17 Maciej W. Rozycki <macro@mips.com>
608 * linker.c (bfd_is_abs_symbol): New macro.
609 * bfd-in2.h: Regenerate.
611 2018-07-16 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
613 * elf-bfd.h (elfcore_write_ppc_tar): Add prototype.
614 (elfcore_write_ppc_ppr): Likewise.
615 (elfcore_write_ppc_dscr): Likewise.
616 (elfcore_write_ppc_ebb): Likewise.
617 (elfcore_write_ppc_pmu): Likewise.
618 (elfcore_write_ppc_tm_cgpr): Likewise.
619 (elfcore_write_ppc_tm_cfpr): Likewise.
620 (elfcore_write_ppc_tm_cvmx): Likewise.
621 (elfcore_write_ppc_tm_cvsx): Likewise.
622 (elfcore_write_ppc_tm_spr): Likewise.
623 (elfcore_write_ppc_tm_ctar): Likewise.
624 (elfcore_write_ppc_tm_cppr): Likewise.
625 (elfcore_write_ppc_tm_cdscr): Likewise.
626 * elf.c (elfcore_write_ppc_tar): New function.
627 (elfcore_write_ppc_ppr): Likewise.
628 (elfcore_write_ppc_dscr): Likewise.
629 (elfcore_write_ppc_ebb): Likewise.
630 (elfcore_write_ppc_pmu): Likewise.
631 (elfcore_write_ppc_tm_cgpr): Likewise.
632 (elfcore_write_ppc_tm_cfpr): Likewise.
633 (elfcore_write_ppc_tm_cvmx): Likewise.
634 (elfcore_write_ppc_tm_cvsx): Likewise.
635 (elfcore_write_ppc_tm_spr): Likewise.
636 (elfcore_write_ppc_tm_ctar): Likewise.
637 (elfcore_write_ppc_tm_cppr): Likewise.
638 (elfcore_write_ppc_tm_cdscr): Likewise.
639 (elfcore_write_register_note): Call them.
640 (elfcore_grok_ppc_tar): New function.
641 (elfcore_grok_ppc_ppr): Likewise.
642 (elfcore_grok_ppc_dscr): Likewise.
643 (elfcore_grok_ppc_ebb): Likewise.
644 (elfcore_grok_ppc_pmu): Likewise.
645 (elfcore_grok_ppc_tm_cgpr): Likewise.
646 (elfcore_grok_ppc_tm_cfpr): Likewise.
647 (elfcore_grok_ppc_tm_cvmx): Likewise.
648 (elfcore_grok_ppc_tm_cvsx): Likewise.
649 (elfcore_grok_ppc_tm_spr): Likewise.
650 (elfcore_grok_ppc_tm_ctar): Likewise.
651 (elfcore_grok_ppc_tm_cppr): Likewise.
652 (elfcore_grok_ppc_tm_cdscr): Likewise.
653 (elfcore_grok_note): Call them.
655 2018-07-11 Maciej W. Rozycki <macro@mips.com>
657 * elfxx-mips.c (mips_tls_got_relocs): Use `bfd_link_dll' rather
658 than `!bfd_link_pic' in determining the dynamic symbol index.
659 Avoid the index of -1.
660 (mips_elf_initialize_tls_slots): Likewise. Flatten code by
661 moving `dyn' to the beginning of the function block.
663 2018-07-11 Maciej W. Rozycki <macro@mips.com>
664 Rich Felker <bugdal@aerifal.cx>
667 * elfxx-mips.c (mips_tls_got_relocs): Use `bfd_link_dll' rather
668 than `bfd_link_pic' to determine whether dynamic relocations are
670 (mips_elf_initialize_tls_slots): Likewise.
672 2018-07-10 Maciej W. Rozycki <macro@mips.com>
674 * elflink.c (bfd_elf_final_link): Rename `remove' local variable
677 2018-07-10 Alan Modra <amodra@gmail.com>
679 * elf32-xgate.h: Delete.
680 * elf32-xgate.c: Delete unnecessary forward declarations, add two
682 (xgate_elf_bfd_link_hash_table_create)
683 (xgate_elf_bfd_link_hash_table_free)
684 (xgate_elf_set_mach_from_flags, struct xgate_scan_param)
685 (stub_hash_newfunc, elf32_xgate_add_symbol_hook)
686 (elf32_xgate_setup_section_lists, elf32_xgate_size_stubs)
687 (elf32_xgate_build_stubs, elf32_xgate_check_relocs)
688 (elf32_xgate_relocate_section, _bfd_xgate_elf_set_private_flags)
689 (elf32_xgate_post_process_headers): Delete.
690 (elf32_xgate_backend_symbol_processing): New function.
691 (xgate_elf_ignore_reloc, xgate_elf_special_reloc)
692 (_bfd_xgate_elf_print_private_bfd_data): Make static.
693 (ELF_TARGET_ID, elf_info_to_howto, elf_backend_check_relocs)
694 (elf_backend_relocate_section, elf_backend_object_p)
695 (elf_backend_final_write_processing, elf_backend_can_gc_sections)
696 (elf_backend_post_process_headers, elf_backend_add_symbol_hook)
697 (bfd_elf32_bfd_link_hash_table_create)
698 (bfd_elf32_bfd_set_private_flags)
699 (xgate_stub_hash_lookup): Don't define.
700 (elf_backend_symbol_processing): Define.
701 * elf-bfd.h (elf_target_id): Delete XGATE_ELF_DATA.
703 2018-07-09 Maciej W. Rozycki <macro@mips.com>
705 * elfxx-mips.c (_bfd_mips_elf_adjust_dynamic_symbol): Don't set
706 `->needs_lazy_stub' if the stubs output section is the absolute
709 2018-07-09 H.J. Lu <hongjiu.lu@intel.com>
712 * configure.ac: Use changequote for "i[3-7]86-*-linux-*".
713 * configure: Regenerated.
715 2018-07-09 Alan Modra <amodra@gmail.com>
717 * elf32-m68hc1x.c (elf32_m68hc11_post_process_headers): Call
718 _bfd_elf_post_process_headers.
720 2018-07-06 Max Filippov <jcmvbkbc@gmail.com>
722 * elf32-xtensa.c (elf_xtensa_allocate_dynrelocs): Don't allocate
723 space for dynamic relocation for undefined weak symbol.
724 (elf_xtensa_relocate_section): Don't emit R_XTENSA_RELATIVE
725 relocation for undefined weak symbols.
726 (shrink_dynamic_reloc_sections): Don't shrink dynamic relocation
727 section for relocations against undefined weak symbols.
729 2018-07-06 Alan Hayward <alan.hayward@arm.com>
731 * elf.c (elfcore_grok_aarch_sve): New function.
732 (elfcore_grok_note): Check for Aarch64 SVE.
733 (elfcore_write_aarch_sve): New function.
734 (elfcore_write_register_note): Check for Aarch64 SVE.
735 * elf-bfd.h(elfcore_grok_aarch_sve): New declaration.
737 2018-07-06 Alan Modra <amodra@gmail.com>
739 * elf32-arm.c (elf32_arm_nabi_write_core_note): Don't use
740 DIAGNOTIC_PUSH and DIAGNOSTIC_POP unconditionally.
741 * elf32-ppc.c (ppc_elf_write_core_note): Likewise.
742 * elf32-s390.c (elf_s390_write_core_note): Likewise.
743 * elf64-ppc.c (ppc64_elf_write_core_note): Likewise.
744 * elf64-s390.c (elf_s390_write_core_note): Likewise.
745 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise.
747 2018-07-05 Jim Wilson <jimw@sifive.com>
749 * config.bfd (riscv32*-*-*): Renamed from riscv32-*-*.
750 (riscv64*-*-*): Likewise.
751 (riscv-*-*): Add as an alias for riscv32*-*-*.
753 2018-07-05 H.J. Lu <hongjiu.lu@intel.com>
756 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Remove x86
757 ISA properties with empty bits.
759 2018-07-05 Nick Clifton <nickc@redhat.com>
761 * po/ru.po: Updated Russian translation.
763 2018-07-05 Alan Modra <amodra@gmail.com>
765 * elf-bfd.h (_bfd_elf_ppc_merge_fp_attributes): Update prototype.
766 * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Return error
767 on mismatch. Remove "warning: " from messages. Track last bfd
769 (ppc_elf_merge_obj_attributes): Likewise. Handle status from
770 _bfd_elf_ppc_merge_fp_attributes.
771 * elf64-ppc.c (ppc64_elf_merge_private_bfd_data): Handle status
772 from _bfd_elf_ppc_merge_fp_attributes.
774 2018-07-04 H.J. Lu <hongjiu.lu@intel.com>
776 * Makefile.am (bfdinclude_HEADERS): Add $(INCDIR)/diagnostics.h.
777 * Makefile.in: Regenerated.
779 2018-07-03 Alan Modra <amodra@gmail.com>
781 * elflink.c (bfd_elf_final_link): Remove zero size .gnu.attributes
784 2018-07-03 Alan Modra <amodra@gmail.com>
786 * elf-bfd.h (ATTR_TYPE_FLAG_ERROR, ATTR_TYPE_HAS_ERROR): Define.
787 * elf-attrs.c (is_default_attr): Handle ATTR_TYPE_HAS_ERROR.
788 * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Use
789 ATTR_TYPE_FLAG_INT_VAL. Set ATTR_TYPE_HAS_ERROR on finding
790 incompatible attribute.
791 (ppc_elf_merge_obj_attributes): Likewise. Return
792 _bfd_elf_merge_object_attributes result.
793 * elf64-ppc.c (ppc64_elf_merge_private_bfd_data): Return
794 _bfd_elf_merge_object_attributes result.
796 2018-07-03 Alan Modra <amodra@gmail.com>
799 * elflink.c (_bfd_elf_fix_symbol_flags): Hide dynamic symbols
800 in discarded sections.
802 2018-07-02 Maciej W. Rozycki <macro@mips.com>
804 * elfxx-mips.c (_bfd_mips_elf_create_dynamic_sections): Set
805 `mark' for symbols created from `mips_elf_dynsym_rtproc_names'
808 2018-07-02 Maciej W. Rozycki <macro@mips.com>
810 * elf64-mips.c (micromips_elf64_howto_table_rel): Add
811 R_MICROMIPS_HI0_LO16, R_MICROMIPS_TLS_GD, R_MICROMIPS_TLS_LDM,
812 R_MICROMIPS_TLS_DTPREL_HI16, R_MICROMIPS_TLS_DTPREL_LO16,
813 R_MICROMIPS_TLS_GOTTPREL, R_MICROMIPS_TLS_TPREL_HI16,
814 R_MICROMIPS_TLS_TPREL_LO16, R_MICROMIPS_GPREL7_S2 and
815 R_MICROMIPS_PC23_S2 relocation entries.
816 (micromips_elf64_howto_table_rela): Likewise.
817 (micromips_reloc_map): Likewise.
818 * elfn32-mips.c (elf_micromips_howto_table_rel): Likewise.
819 (elf_micromips_howto_table_rela): Likewise.
820 (micromips_reloc_map): Likewise.
822 2018-07-02 H.J. Lu <hongjiu.lu@intel.com>
825 * elf64-x86-64.c (elf_x86_64_relocate_section): Clear the
826 R_X86_64_converted_reloc_bit bit.
828 2018-07-02 Jeff Muizelaar <jrmuizel@gmail.com>
829 Tom Tromey <tom@tromey.com>
833 * mach-o.c (bfd_mach_o_fat_close_and_cleanup): New function.
834 (bfd_mach_o_close_and_cleanup): Redefine.
835 * archive.c (_bfd_unlink_from_archive_parent): New function,
837 (_bfd_archive_close_and_cleanup): ..here.
838 (bfd_generic_archive_p): Do not clear archive's format.
839 * libbfd-in.h (_bfd_unlink_from_archive_parent): Declare.
840 * libbfd.h: Regenerate.
842 2018-07-02 Thomas Preud'homme <thomas.preudhomme@arm.com>
844 * archures.c (bfd_mach_arm_5TEJ, bfd_mach_arm_6, bfd_mach_arm_6KZ,
845 bfd_mach_arm_6T2, bfd_mach_arm_6K, bfd_mach_arm_7, bfd_mach_arm_6M,
846 bfd_mach_arm_6SM, bfd_mach_arm_7EM, bfd_mach_arm_8, bfd_mach_arm_8R,
847 bfd_mach_arm_8M_BASE, bfd_mach_arm_8M_MAIN): Define.
848 * bfd-in2.h: Regenerate.
849 * cpu-arm.c (arch_info_struct): Add entries for above new
851 * elf32-arm.c (bfd_arm_get_mach_from_attributes): Add Tag_CPU_arch to
852 bfd_mach_arm mapping logic for pre Armv4 and Armv5TEJ and later
853 architectures. Force assert failure for any new Tag_CPU_arch value.
855 2018-07-02 Thomas Preud'homme <thomas.preudhomme@arm.com>
857 * doc/bfdint.texi: Use command-line consistently when used in a
859 * doc/bfdsumm.texi: Likewise.
861 2018-06-29 Maciej W. Rozycki <macro@mips.com>
863 * elfxx-mips.c (allocate_dynrelocs): Remove extraneous symbol
864 visibility check made for undefined weak symbols.
866 2018-06-26 Nick Clifton <nickc@redhat.com>
868 * po/uk.po: Updated Ukranian translation.
870 2018-06-25 Nick Clifton <nickc@redhat.com>
872 * elfnn-aarch64.c (_bfd_aarch64_erratum_835769_stub_name): Check
873 for malloc returning NULL.
874 (_bfd_aarch64_erratum_843419_fixup): Check for
875 _bfd_aarch64_erratum_835769_stub_name returning NULL.
877 2018-06-24 Nick Clifton <nickc@redhat.com>
879 * po/bfd.pot: Regenerate.
881 2018-06-24 Nick Clifton <nickc@redhat.com>
883 * version.m4: Update version string to 2.31.51.
884 * configure: Regenerate.
886 2018-06-24 Nick Clifton <nickc@redhat.com>
890 2018-06-21 Maciej W. Rozycki <macro@mips.com>
892 * elfxx-mips.c (_bfd_mips_elf_compact_eh_encoding)
893 (_bfd_mips_elf_cant_unwind_opcode): Correct formatting.
895 2018-06-21 Maciej W. Rozycki <macro@mips.com>
897 * elfxx-mips.c (_bfd_mips_post_process_headers): Keep
898 EI_ABIVERSION setting together.
900 2018-06-21 Maciej W. Rozycki <macro@mips.com>
902 * elfxx-mips.c (MIPS_LIBC_ABI_DEFAULT, MIPS_LIBC_ABI_MIPS_PLT)
903 (MIPS_LIBC_ABI_UNIQUE, MIPS_LIBC_ABI_MIPS_O32_FP64)
904 (MIPS_LIBC_ABI_MAX): New enumeration constants.
905 (_bfd_mips_post_process_headers): Use them in place of magic
908 2018-06-21 Jim Wilson <jimw@sifive.com>
910 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Update comment.
911 Use SYMBOL_REFERENCES_LOCAL. Add asserts for h->got.offset.
913 2018-06-21 Alan Modra <amodra@gmail.com>
915 * doc/Makefile.am (AUTOMAKE_OPTIONS): Add "foreign".
916 * doc/Makefile.in: Regenerate.
918 2018-06-20 Renlin Li <renlin.li@arm.com>
920 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Use PG_OFFSET
921 to resolve BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC,
922 BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC,
923 BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC,
924 BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC,
925 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
926 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
927 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
928 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
930 2018-06-20 Nick Clifton <nickc@redhat.com>
933 * opncls.c (get_build_id): Check for a negative or excessive data
934 size in the build-id note.
936 2018-06-20 Nick Clifton <nickc@redhat.com>
939 * mach-o.c (cputype): New function.
940 (cpusubtype): New function.
941 (bfd_mach_o_bfd_print_private_data): New function. Dispalys the
942 values in the MACH-O file header.
943 (bfd_mach_o_bfd_copy_private_header_data): Copy the cputype and
944 cpusubtype fields from the input bfd's mach-o header to the output
946 * mach-o-target.c (bfd_mach_o_bfd_print_private_bfd_data):
947 Redefine to bfd_mach_o_bfd_print_private_data.
948 * mach-o.h (bfd_mach_o_bfd_print_private_bfd_data): Prototype.
950 2018-06-19 Maciej W. Rozycki <macro@mips.com>
953 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Verify the
954 `.got.plt' entry referred is in range.
955 (mips_finish_exec_plt): Correct the range check for `.got.plt'
956 start. Replace the assertion used for that with a proper error
959 2018-06-19 Maciej W. Rozycki <macro@mips.com>
961 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Fix
964 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
966 * Makefile.am (AUTOMAKE_OPTIONS): Remove 1.11.
967 (INCLUDES): Rename to ...
968 (AM_CPPFLAGS): ... this.
969 * configure.ac: Remove AC_PREREQ.
970 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove 1.9, cygnus, add
971 info-in-builddir no-texinfo.tex.
972 (info_TEXINFOS): Rename bfd.texinfo to bfd.texi.
973 * doc/bfd.texinfo: Rename to ...
974 * doc/bfd.texi: ... this.
975 * Makefile.in: Re-generate.
976 * aclocal.m4: Re-generate.
977 * config.in: Re-generate.
978 * configure: Re-generate.
979 * doc/Makefile.in: Re-generate.
981 2018-06-18 Mephi <mephi42@gmail.com>
984 * mach-o-x86-64.c (x86_64_howto_table): Add entry for
985 BFD_RELOC_MACH_O_X86_64_RELOC_TLV.
986 (bfd_mach_o_x86_64_canonicalize_one_reloc): Handle the new reloc.
987 (bfd_mach_o_x86_64_swap_reloc_out): Likewise.
988 * reloc.c (BFD_RELOC_MACH_O_X86_64_TV): New entry.
989 * bfd-in2.h: Regenerate.
990 * libbfd.h: Regenerate.
992 2018-06-14 Faraz Shahbazker <Faraz.Shahbazker@mips.com>
994 * elfxx-mips.c (print_mips_ases): Add GINV extension.
996 2018-06-14 H.J. Lu <hongjiu.lu@intel.com>
999 * elf.c (_bfd_elf_get_symbol_version_string): Check if the first
1000 symbol version is base version.
1002 2018-06-14 Alan Modra <amodra@gmail.com>
1004 * elf-bfd.h (struct elf_link_hash_table): Add "dynamic_relocs".
1005 * elflink.c (_bfd_elf_init_2_index_sections): Comment fix.
1006 (_bfd_elf_add_dynamic_entry): Set "dynamic_relocs".
1007 (_bfd_elf_link_renumber_dynsyms): Exclude all section symbols when
1008 "dynamic_relocs" is not set.
1009 * elfxx-mips.c (count_section_dynsyms): Likewise.
1011 2018-06-14 Alan Modra <amodra@gmail.com>
1014 * bfdio.c (bfd_seek): Optimize away seeks to current position.
1016 2018-06-13 Scott Egerton <scott.egerton@imgtec.com>
1017 Faraz Shahbazker <Faraz.Shahbazker@mips.com>
1019 * elfxx-mips.c (print_mips_ases): Add CRC.
1021 2018-06-08 H.J. Lu <hongjiu.lu@intel.com>
1024 * elfxx-x86.c (elf_x86_hide_linker_defined): New function.
1025 (_bfd_x86_elf_link_check_relocs): Use it to hide hidden
1026 __bss_start, _end and _edata in shared libraries.
1028 2018-06-07 Alan Modra <amodra@gmail.com>
1030 * elf32-tic6x.c (elf32_tic6x_check_relocs): Reference
1031 __c6xabi_DSBT_BASE explicitly for R_C6000_SBR_* relocs.
1033 2018-06-05 Alan Modra <amodra@gmail.com>
1035 * bfd.c (struct bfd): Update comment on "where" usage.
1036 * bfdio.c (bfd_bwrite, bfd_stat): Use and update "iovec",
1037 "iostream", and "where" from containing archive file. Return
1038 error on NULL iovec.
1039 (bfd_bread): Similarly, and return error attempted out of
1040 bounds archive element access.
1041 (bfd_tell, bfd_flush): Use and update "iovec", "iostream", and
1042 "where" from containing archive file.
1043 (bfd_seek): Likewise. Return error on NULL iovec. Don't
1044 attempt to optimize away seeks. Don't paper over errors by
1046 (bfd_get_mtime): Call bfd_stat rather than iovec->bstat.
1047 (bfd_get_size): Likewise.
1048 (bfd_mmap): Operate on and use iovec of containing archive
1049 file. Return error on NULL iovec.
1050 * cache.c (bfd_cache_lookup_worker): Abort if working on
1051 archive element bfd.
1052 (cache_bread_1): Delete bfd parameter, add FILE* parameter.
1053 Don't ignore zero byte reads.
1054 (cache_bread): Look up FILE* in cache here. Error on NULL
1056 (cache_bwrite): Rename "where" to "from".
1057 (cache_bmmap): Don't handle archive elements.
1058 * coffcode.h (coff_slurp_line_table): Exit early on zero
1060 * bfd-in2.h: Regenerate.
1062 2018-06-05 Alan Modra <amodra@gmail.com>
1065 * plugin.c (bfd_plugin_open_input): Allow for possibility of
1066 nested archives. Open file again for plugin.
1067 (try_claim): Don't save and restore file position. Close file
1069 * sysdep.h (O_BINARY): Define.
1071 2018-06-04 Max Filippov <jcmvbkbc@gmail.com>
1073 * elf32-xtensa.c (xtensa_read_table_entries): Make global.
1074 (compute_fill_extra_space): Drop declaration. Rename function to
1075 xtensa_compute_fill_extra_space.
1076 (compute_ebb_actions, remove_dead_literal): Update references to
1077 compute_fill_extra_space.
1079 2018-06-04 Volodymyr Arbatov <arbatov@cadence.com>
1081 * elf32-xtensa.c (elf32xtensa_separate_props): New global
1083 (xtensa_add_names): New function.
1084 (xtensa_property_section_name): Add new parameter
1085 separate_sections, use it to choose property section name.
1086 (xtensa_get_separate_property_section): New function.
1087 (xtensa_get_property_section): Invoke
1088 xtensa_get_separate_property_section to get individual property
1089 section if it exists, common property section otherwise.
1090 (xtensa_make_property_section): Pass elf32xtensa_separate_props
1091 to xtensa_property_section_name.
1093 2018-06-04 H.J. Lu <hongjiu.lu@intel.com>
1096 * bfd-in.h: Include "diagnostics.h".
1097 * bfd-in2.h: Regenerated.
1098 * elf32-arm.c (elf32_arm_nabi_write_core_note): Use
1099 DIAGNOSTIC_PUSH, DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION and
1100 DIAGNOSTIC_POP to silence GCC 8.1 warnings with
1101 -Wstringop-truncation.
1102 * elf32-ppc.c (ppc_elf_write_core_note): Likewse.
1103 * elf32-s390.c (elf_s390_write_core_note): Likewse.
1104 * elf64-ppc.c (ppc64_elf_write_core_note): Likewse.
1105 * elf64-s390.c (elf_s390_write_core_note): Likewse.
1106 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewse.
1108 2018-06-03 Jim Wilson <jimw@sifive.com>
1111 * elfnn-riscv.c (riscv_elf_relocate_section) <R_RISCV_CALL>: Check
1112 for and handle an undefined weak with no PLT.
1115 * elfnn-riscv.c (riscv_relax_delete_bytes): Add versioned_hidden check
1116 to code that ignores duplicate symbols.
1118 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
1120 * version.m4: Bump version to 2.30.52
1121 * configure: Regenerated.
1123 2018-06-01 Alan Modra <amodra@gmail.com>
1125 * bfd.c (_bfd_error_handler): Arrange for this function to be
1126 declared in bfd-in2.h.
1127 * libbfd-in.h (_bfd_error_handler): Don't declare.
1128 * libbfd.h: Regenerate.
1129 * bfd-in2.h: Regenerate.
1131 2018-05-30 Amaan Cheval <amaan.cheval@gmail.com>
1133 * config.bfd (x86_64-*-*): Add pei-x86-64 target to x86_64-*-rtems*
1134 This is needed to generate UEFI application image files from ELFs.
1136 2018-05-28 H.J. Lu <hongjiu.lu@intel.com>
1138 * elf32-i386.c (elf_i386_lazy_plt): Add plt_tlsdesc_entry,
1139 plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset,
1140 plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and
1141 plt_tlsdesc_got2_insn_end for TLSDESC entry.
1142 (elf_i386_lazy_ibt_plt): Likewise.
1143 (elf_i386_nacl_plt): Likewise.
1144 * elf64-x86-64.c (tlsdesc_plt_entry): Moved and renamed to ...
1145 (elf_x86_64_tlsdesc_plt_entry): This.
1146 (elf_x86_64_lazy_plt): Add plt_tlsdesc_entry,
1147 plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset,
1148 plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and
1149 plt_tlsdesc_got2_insn_end for TLSDESC entry.
1150 (elf_x86_64_lazy_bnd_plt): Likewise.
1151 (elf_x86_64_lazy_ibt_plt): Likewise.
1152 (elf_x32_lazy_ibt_plt): Likewise.
1153 (elf_x86_64_nacl_plt): Likewise.
1154 (elf_x86_64_finish_dynamic_sections): Use plt_tlsdesc_entry,
1155 plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset,
1156 plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and
1157 plt_tlsdesc_got2_insn_end to update TLSDESC entry.
1158 * elfxx-x86.h (elf_x86_lazy_plt_layout): Update comments.
1159 Add plt_tlsdesc_entry, plt_tlsdesc_entry_size,
1160 plt_tlsdesc_got1_offset, plt_tlsdesc_got2_offset,
1161 plt_tlsdesc_got1_insn_end and plt_tlsdesc_got2_insn_end.
1162 (elf_x86_non_lazy_plt_layout): Update comments.
1163 (elf_x86_plt_layout): Likewise.
1165 2018-05-28 H.J. Lu <hongjiu.lu@intel.com>
1168 * elf-s390-common.c (elf_s390_add_symbol_hook): Removed.
1169 * elf32-arc.c (elf_arc_add_symbol_hook): Likewise.
1170 (elf_backend_add_symbol_hook): Likewise.
1171 * elf32-m68k.c (elf_m68k_add_symbol_hook): Likewise.
1172 (elf_backend_add_symbol_hook): Likewise.
1173 * elf32-s390.c (elf_backend_add_symbol_hook): Likewise.
1174 * elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise.
1175 (elf_backend_add_symbol_hook): Likewise.
1176 * elf64-s390.c (elf_backend_add_symbol_hook): Likewise.
1177 * elfxx-aarch64.c (_bfd_aarch64_elf_add_symbol_hook): Likewise.
1178 * elfxx-aarch64.h (_bfd_aarch64_elf_add_symbol_hook): Likewise.
1179 (elf_backend_add_symbol_hook): Likewise.
1180 * elf32-arm.c (elf32_arm_add_symbol_hook): Remove STT_GNU_IFUNC
1182 * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
1183 * elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise.
1184 * elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise.
1185 * elflink.c (elf_link_add_object_symbols): Set
1186 elf_gnu_symbol_ifunc for STT_GNU_IFUNC symbols.
1188 2018-05-26 H.J. Lu <hongjiu.lu@intel.com>
1191 * elf-bfd.h (_bfd_elf_link_hide_sym_by_version): New.
1192 * elflink.c (_bfd_elf_link_hide_versioned_symbol): New function.
1193 Extracted from _bfd_elf_link_assign_sym_version.
1194 (_bfd_elf_link_hide_sym_by_version): New function.
1195 (_bfd_elf_link_assign_sym_version): Use
1196 _bfd_elf_link_hide_versioned_symbol.
1197 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Call
1198 _bfd_elf_link_hide_sym_by_version instead of
1199 bfd_hide_sym_by_version. Don't check unversioned symbol.
1201 2018-05-25 Alan Modra <amodra@gmail.com>
1203 * Makefile.in: Regenerate.
1204 * po/SRC-POTFILES.in: Regenerate.
1206 2018-05-25 Alan Modra <amodra@gmail.com>
1208 * configure.ac (bfd_cv_hidden): Run test with -Werror in CFLAGS.
1209 * configure: Regenerate.
1211 2018-05-23 H.J. Lu <hongjiu.lu@intel.com>
1213 * elf64-ppc.c (ppc64_elf_write_core_note): Add ATTRIBUTE_NONSTRING
1216 2018-05-22 Alan Modra <amodra@gmail.com>
1219 * elf32-hppa.c (hppa_get_stub_entry): Return NULL when link_sec
1221 (elf32_hppa_size_stubs): Only create stubs for load, alloc, code
1223 (final_link_relocate): Revert last change.
1225 2018-05-22 Alan Modra <amodra@gmail.com>
1228 * elf32-hppa.c (final_link_relocate): Don't look for plt call
1229 stubs in non-alloc sections.
1231 2018-05-21 H.J. Lu <hongjiu.lu@intel.com>
1234 * aout-target.h (MY_bfd_link_hide_symbol): New.
1235 * aout-tic30.c (MY_bfd_link_hide_symbol): Likewise.
1236 * binary.c (binary_bfd_link_hide_symbol): Likewise.
1237 * coff-alpha.c (_bfd_ecoff_bfd_link_hide_symbol): Likewise.
1238 * coff-mips.c (_bfd_ecoff_bfd_link_hide_symbol): Likewise.
1239 * coff-rs6000.c (_bfd_xcoff_bfd_link_hide_symbol): Likewise.
1240 * coffcode.h (coff_bfd_link_hide_symbol): Likewise.
1241 * elf-bfd.h (_bfd_elf_link_hide_symbol): Likewise.
1242 * elfxx-target.h (bfd_elfNN_bfd_link_hide_symbol): Likewise.
1243 * i386msdos.c (msdos_bfd_link_hide_symbol): Likewise.
1244 * ihex.c (ihex_bfd_link_hide_symbol): Likewise.
1245 * libbfd-in.h (_bfd_nolink_bfd_link_hide_symbol): Likewise.
1246 * linker.c (_bfd_generic_link_hide_symbol): Likewise.
1247 (bfd_link_hide_symbol): Likewise.
1248 * mach-o-target.c (bfd_mach_o_bfd_link_hide_symbol): Likewise.
1249 * mmo.c (mmo_bfd_link_hide_symbol): Likewise.
1250 * pef.c (bfd_pef_bfd_link_hide_symbol): Likewise.
1251 * plugin.c (bfd_plugin_bfd_link_hide_symbol): Likewise.
1252 * ppcboot.c (ppcboot_bfd_link_hide_symbol): Likewise.
1253 * som.c (som_bfd_link_hide_symbol): Likewise.
1254 * srec.c (srec_bfd_link_hide_symbol): Likewise.
1255 * tekhex.c (tekhex_bfd_link_hide_symbol): Likewise.
1256 * vms-alpha.c (vms_bfd_link_hide_symbol): Likewise.
1257 (alpha_vms_bfd_link_hide_symbol): Likewise.
1258 * xsym.c (bfd_sym_bfd_link_hide_symbol): Likewise.
1259 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
1260 _bfd_generic_link_hide_symbol.
1261 (rs6000_xcoff64_aix_vec): Likewise.
1262 * elflink.c (bfd_elf_record_link_assignment): Don't make forced
1263 local symbol dynamic.
1264 (_bfd_elf_link_hide_symbol): New function.
1265 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
1266 check root.ldscript_def.
1267 * targets.c (bfd_target): Add _bfd_link_hide_symbol.
1268 (BFD_JUMP_TABLE_LINK): Add NAME##_bfd_link_hide_symbol.
1269 * bfd-in2.h: Regenerated.
1270 * libbfd.h: Likewise.
1272 2018-05-21 H.J. Lu <hongjiu.lu@intel.com>
1275 * elf.c (setup_group): Mark section in a section group with
1278 2018-05-18 H.J. Lu <hongjiu.lu@intel.com>
1281 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
1282 set eh->local_ref to 1 if a symbol is versioned and there is a
1285 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
1287 * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Handle
1290 2018-05-18 Jim Wilson <jimw@sifive.com>
1292 * elfnn-riscv.c (allocate_dynrelocs): Discard dynamic relocations if
1293 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1294 (riscv_elf_relocate_section): Don't generate dynamic relocation if
1295 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1296 (riscv_elf_finish_dynamic_symbol): Likewise.
1298 2018-05-18 John Darrington <john@darrington.wattle.id.au>
1300 * Makefile.am: Add s12z files.
1301 * Makefile.in: Regenerate.
1302 * archures.c: Add bfd_s12z_arch.
1303 * bfd-in.h: Add exports of bfd_putb24 and bfd_putl24.
1304 * bfd-in2.h: Regenerate.
1305 * config.bfd: Add s12z target.
1306 * configure.ac: Add s12z target.
1307 * configure: Regenerate.
1308 * cpu-s12z.c: New file.
1309 * elf32-s12z.c: New file.
1310 * libbfd.c (bfd_putb24): New function.
1311 (bfd_putl24): New function.
1312 * libbfd.h: Regenerate.
1313 * reloc.c: Add s12z relocations.
1314 (bfd_get_reloc_size): Handle size 5 relocs.
1315 * targets.c: Add s12z_elf32_vec.
1317 2018-05-18 H.J. Lu <hongjiu.lu@intel.com>
1320 * elf32-i386.c (elf_i386_relocate_section): Handle R_386_GOT32X
1322 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
1323 set eh->local_ref to 1 for linker defined symbols.
1325 2018-05-18 Alan Modra <amodra@gmail.com>
1328 * elf.c (setup_group): Formatting. Check that SHT_GROUP entries
1329 don't point at other SHT_GROUP sections. Set shdr corresponding
1330 to invalid entry, to NULL rather than section 0. Identify
1331 SHT_GROUP section index when reporting an error. Cope with NULL
1334 2018-05-18 Alan Modra <amodra@gmail.com>
1336 * libbfd-in.h (ATTRIBUTE_HIDDEN): Define and use throughout.
1337 * configure.ac (HAVE_HIDDEN): Check compiler support for hidden
1339 * libbfd.h: Regenerate.
1340 * configure: Regenerate.
1341 * config.in: Regenerate.
1343 2018-05-18 Alan Modra <amodra@gmail.com>
1345 * libbfd-in.h: Add include guard.
1346 * libcoff-in.h: Likewise.
1347 * doc/Makefile.am (libbfd.h, libcoff.h): Append another #endif.
1348 * doc/Makefile.in: Regenerate.
1349 * libbfd.h: Regenerate.
1350 * libcoff.h: Regenerate.
1352 2018-05-16 Maciej W. Rozycki <macro@mips.com>
1354 * elf32-nds32.c (nds32_convert_32_to_16): Preset `insn_type'.
1356 2018-05-16 Alan Modra <amodra@gmail.com>
1359 * format.c (struct bfd_preserve): Add section_id.
1360 (bfd_preserve_save, bfd_preserve_restore): Save and restore
1362 (bfd_reinit): Set _bfd_section_id.
1363 (bfd_check_format_matches): Put all matches of any priority into
1364 matching_vector. Save initial section id and start each attempted
1365 match at that section id.
1366 * libbfd-in.h (_bfd_section_id): Declare.
1367 * section.c (_bfd_section_id): Rename from section_id and make
1368 global. Adjust uses.
1369 (bfd_get_next_section_id): Delete.
1370 * elf64-ppc.c (ppc64_elf_setup_section_lists): Replace use of
1371 bfd_get_section_id with _bfd_section_id.
1372 * libbfd.h: Regenerate.
1373 * bfd-in2.h: Regenerate.
1375 2018-05-15 Christophe Guillon <christophe.guillon@st.com>
1377 * coffcode.h (coff_bigobj_swap_aux_in): Make sure that all fields
1378 of the aux structure are initialised.
1380 2018-05-15 Francois H. Theron <francois.theron@netronome.com>
1382 * targets.c: Wrap nfp_elf64_vec in BFD64 ifdef.
1384 2018-05-15 Nick Clifton <nickc@redhat.com>
1386 * po/pt.po: New Portuguese translation.
1387 * configure.ac (ALL_LINGUAS): Add pt.
1388 * configure: Regenerate.
1390 2018-05-14 H.J. Lu <hongjiu.lu@intel.com>
1393 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Don't issue
1394 an error on IFUNC pointer defined in PDE.
1395 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Call
1396 _bfd_x86_elf_link_fixup_ifunc_symbol.
1397 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
1398 * elfxx-x86.c (_bfd_x86_elf_link_fixup_ifunc_symbol): New
1400 * elfxx-x86.h (_bfd_x86_elf_link_fixup_ifunc_symbol): New.
1402 2018-05-14 H.J. Lu <hongjiu.lu@intel.com>
1405 * elfxx-x86.c (elf_x86_linker_defined): New function.
1406 (_bfd_x86_elf_link_check_relocs): Use it to mark __bss_start,
1407 _end and _edata locally defined within executables.
1409 2018-05-12 Alan Modra <amodra@gmail.com>
1412 * elf.c (rewrite_elf_program_header): Use segment_mark only for
1413 PT_LOAD headers. Delete first_matching_lma and first_suggested_lma.
1414 Instead make matching_lma and suggested_lma pointers to the
1415 sections. Align section vma and lma calculated from segment.
1416 Don't clear includes_phdrs or includes_filehdr based on p_paddr
1417 test. Try to handle alignment padding before first section by
1418 adjusting new segment lma down. Adjust PT_PHDR map p_paddr.
1420 2018-05-09 Dimitar Dimitrov <dimitar@dinux.eu>
1422 * elf32-pru.c (pru_elf32_do_ldi32_relocate): Make LDI32 relocation
1423 conformant to TI ABI.
1424 (pru_elf32_relax_section): Likewise.
1425 (pru_elf_relax_delete_bytes): Fix offsets for new LDI32 code.
1426 * elf32-pru.c (pru_elf32_do_ldi32_relocate): Ignore addend.
1427 (pru_elf32_pmem_relocate): Trap - should not get here.
1428 (pru_elf32_relocate_section): Add support for REL relocations.
1429 (elf_info_to_howto_rel): Enable REL.
1430 (elf_backend_may_use_rel_p): Likewise.
1431 (elf_backend_may_use_rela_p): Likewise.
1432 (elf_backend_default_use_rela_p): Likewise.
1434 2018-05-09 Alan Modra <amodra@gmail.com>
1437 * peXXigen.c (pe_print_edata): Correct minimum size.
1439 2018-05-09 Alan Modra <amodra@gmail.com>
1442 * peXXigen.c (pe_print_idata): Bound check hint_addr.
1444 2018-05-08 Nick Clifton <nickc@redhat.com>
1447 * elf.c (bfd_elf_get_str_section): Check for an excessively large
1449 * elf-attrs.c (_bfd_elf_parse_attributes): Issue an error if the
1450 attribute section is larger than the size of the file.
1452 2018-05-07 Alan Modra <amodra@gmail.com>
1454 * cofflink.c (_bfd_coff_link_input_bfd): Use memcmp rather than
1455 strncmp when checking for ".bf" special symbol.
1456 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Make pe_required_section_flags
1457 section name a char array, remove sentinal known_sections entry,
1458 and adjust loop over known_sections to suit. Use memcmp rather
1461 2018-05-04 Alan Modra <amodra@gmail.com>
1463 * elf-linux-core.h (struct elf_external_linux_prpsinfo32_ugid32),
1464 (struct elf_external_linux_prpsinfo32_ugid16),
1465 (struct elf_external_linux_prpsinfo64_ugid32),
1466 (struct elf_external_linux_prpsinfo64_ugid16): Add ATTRIBUTE_NONSTRING
1467 to pr_fname and pr_psargs fields. Remove GCC diagnostic pragmas.
1469 * elf.c (elfcore_write_prpsinfo): ..here. Indent nested preprocessor
1471 * elf32-arm.c (elf32_arm_nabi_write_core_note): Add ATTRIBUTE_NONSTRING
1473 * elf32-ppc.c (ppc_elf_write_core_note): Likewise.
1474 * elf32-s390.c (elf_s390_write_core_note): Likewise.
1475 * elf64-s390.c (elf_s390_write_core_note): Likewise.
1476 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise.
1477 * elf64-x86-64.c (elf_x86_64_write_core_note): Add GCC diagnostic
1479 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Use strnlen to avoid
1480 false positive gcc-8 warning.
1481 * cofflink.c (_bfd_coff_link_input_bfd): Likewise.
1483 2018-05-04 Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
1485 * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Fix the order
1486 of arguments when warning about different long double types.
1488 2018-05-03 Simon Atanasyan <simon@atanasyan.com>
1490 * elf32-mips.c: (elf32_mips_fixup_symbol): New function.
1491 (elf_backend_fixup_symbol): New macro.
1492 * elfxx-mips.c: (mips_elf_output_extsym): Discard _gp_disp
1494 (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
1496 2018-04-30 Francois H. Theron <francois.theron@netronome.com>
1498 * Makefile.am: Added NFP files to build.
1499 * archures.c: Added bfd_arch_nfp
1500 * config.bfd: Added NFP support.
1501 * configure.ac: Added NFP support.
1502 * cpu-nfp.c: New, for NFP support.
1503 * elf-bfd.h: Added elf_section_info()
1504 * elf64-nfp.c: New, for NFP support.
1505 * po/SRC-POTFILES.in: Added NFP source files.
1506 * targets.c: Added nfp_elf64_vec
1507 * bfd-in2.h: Regenerate.
1508 * Makefile.in: Regenerate.
1509 * configure: Regenerate.
1511 2018-04-27 Alan Modra <amodra@gmail.com>
1513 * bfd-in2.h: Regenerate.
1514 * libbfd.h: Regenerate.
1516 2018-04-27 Alan Modra <amodra@gmail.com>
1520 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't drop plt
1522 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Comment fixes.
1524 2018-04-26 Pedro Alves <palves@redhat.com>
1526 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't consider
1527 ifunc and non-ifunc symbols duplicates.
1529 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1530 Mickaël Guêné <mickael.guene@st.com>
1532 * elf32-arm.c (elf32_arm_fdpic_thumb_plt_entry): New.
1533 (elf32_arm_plt_needs_thumb_stub_p): Handle thumb-only case.
1534 (elf32_arm_populate_plt_entry): Likewise.
1535 (elf32_arm_output_plt_map_1): Likewise.
1536 (elf32_arm_output_arch_local_syms): Likewise.
1538 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1539 Mickaël Guêné <mickael.guene@st.com>
1541 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Handle
1542 _GLOBAL_OFFSET_TABLE_ in FDPIC mode.
1544 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1545 Mickaël Guêné <mickael.guene@st.com>
1547 * elf32-arm.c (bfd_elf32_arm_set_target_params): Handle FDPIC case
1550 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1551 Mickaël Guêné <mickael.guene@st.com>
1553 * elf32-arm.c (DEFAULT_STACK_SIZE): New.
1554 (elf32_arm_always_size_sections): Create stack segment.
1556 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1557 Mickaël Guêné <mickael.guene@st.com>
1559 * bfd-in2.h (BFD_RELOC_ARM_TLS_GD32_FDPIC)
1560 (BFD_RELOC_ARM_TLS_LDM32_FDPIC, BFD_RELOC_ARM_TLS_IE32_FDPIC): New
1562 * elf32-arm.c (elf32_arm_howto_table_2): Add R_ARM_TLS_GD32_FDPIC,
1563 R_ARM_TLS_LDM32_FDPIC, R_ARM_TLS_IE32_FDPIC relocations.
1564 (elf32_arm_reloc_map): Add R_ARM_TLS_GD32_FDPIC,
1565 R_ARM_TLS_LDM32_FDPIC, R_ARM_TLS_IE32_FDPIC.
1566 (struct elf32_arm_link_hash_table): Update comment.
1567 (elf32_arm_final_link_relocate): Handle TLS FDPIC relocations.
1568 (IS_ARM_TLS_RELOC): Likewise.
1569 (elf32_arm_check_relocs): Likewise.
1570 (allocate_dynrelocs_for_symbol): Likewise.
1571 (elf32_arm_size_dynamic_sections): Update comment.
1572 * reloc.c: Add BFD_RELOC_ARM_TLS_GD32_FDPIC,
1573 BFD_RELOC_ARM_TLS_LDM32_FDPIC, BFD_RELOC_ARM_TLS_IE32_FDPIC.
1575 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1576 Mickaël Guêné <mickael.guene@st.com>
1578 * elf32-arm.c (elf32_arm_fdpic_plt_entry): New.
1579 (elf32_arm_create_dynamic_sections): Handle FDPIC.
1580 (elf32_arm_allocate_plt_entry): Likewise.
1581 (elf32_arm_populate_plt_entry): Likewise.
1582 (elf32_arm_output_plt_map_1): Likewise.
1584 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1585 Mickaël Guêné <mickael.guene@st.com>
1587 * elf32-arm.c (struct fdpic_local): New.
1588 (elf_arm_obj_tdata): Add local_fdpic_cnts field.
1589 (elf32_arm_local_fdpic_cnts): New.
1590 (struct fdpic_global): New.
1591 (elf32_arm_link_hash_entry): Add fdpic_cnts field.
1592 (elf32_arm_link_hash_table): Add srofixup field.
1593 (arm_elf_add_rofixup): New.
1594 (arm_elf_fill_funcdesc): New.
1595 (elf32_arm_link_hash_newfunc): Handle fdpic_cnts.
1596 (elf32_arm_allocate_local_sym_info): Likewise.
1597 (create_got_section): Create .rofixup section.
1598 (elf32_arm_copy_indirect_symbol): Handle fdpic_cnts.
1599 (bfd_elf32_arm_set_target_params): Handle FDPIC.
1600 (elf32_arm_final_link_relocate): Likewise.
1601 (elf32_arm_check_relocs): Likewise.
1602 (allocate_dynrelocs_for_symbol): Likewise.
1603 (elf32_arm_size_dynamic_sections): Likewise.
1604 (elf32_arm_finish_dynamic_sections): Likewise.
1605 (elf32_arm_output_arch_local_syms): Likewise.
1606 (elf32_arm_fdpic_omit_section_dynsym): New.
1608 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1609 Mickaël Guêné <mickael.guene@st.com>
1611 * bfd-in2.c (BFD_RELOC_ARM_GOTFUNCDESC)
1612 (BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC)
1613 (BFD_RELOC_ARM_FUNCDESC_VALUE): New.
1614 * elf32-arm.c (elf32_arm_howto_table_2): Add R_ARM_GOTFUNCDESC,
1615 R_ARM_GOTOFFFUNCDESC, R_ARM_FUNCDESC, R_ARM_FUNCDESC_VALUE.
1616 (elf32_arm_howto_from_type): Take new members of
1617 elf32_arm_howto_table_2 into account.
1618 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_GOTFUNCDESC,
1619 BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC,
1620 BFD_RELOC_ARM_FUNCDESC_VALUE.
1621 * reloc.c: Add BFD_RELOC_ARM_GOTFUNCDESC,
1622 BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC,
1623 BFD_RELOC_ARM_FUNCDESC_VALUE.
1625 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1626 Mickaël Guêné <mickael.guene@st.com>
1628 * elf32-arm.c (elf32_arm_print_private_bfd_data): Support
1629 EF_ARM_PIC and ELFOSABI_ARM_FDPIC.
1630 (elf32_arm_post_process_headers): Support ELFOSABI_ARM_FDPIC.
1631 (ELF_OSABI): Define to ELFOSABI_ARM_FDPIC.
1633 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1634 Mickaël Guêné <mickael.guene@st.com>
1636 * config.bfd (arm*-*-linux-*): Add arm_elf32_fdpic_be_vec and
1637 arm_elf32_fdpic_le_vec to targ_selvecs. Accept
1638 arm*-*-uclinuxfdpiceabi.
1639 * configure.ac: Add support for arm_elf32_fdpic_be_vec and
1640 arm_elf32_fdpic_le_vec.
1641 * configure: Regenerate.
1642 * elf32-arm.c (struct elf32_arm_link_hash_table): Add fdpic_p.
1643 (elf32_arm_link_hash_table_create): Initialize fdpic_p.
1644 (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME, TARGET_BIG_SYM)
1645 (TARGET_BIG_NAME, elf_match_priority): Define for FDPIC targets.
1646 (elf32_arm_fdpic_link_hash_table_create): New.
1647 * targets.c (_bfd_target_vector): Add arm_elf32_fdpic_be_vec and
1648 arm_elf32_fdpic_le_vec.
1650 2018-04-25 Alan Modra <amodra@gmail.com>
1652 * elf-linux-core.h: Disable gcc-8 string truncation warning.
1653 * elf.c (elfcore_write_prpsinfo): Likewise.
1655 2018-04-25 Alan Modra <amodra@gmail.com>
1657 * Makefile.am: Remove arm-aout and arm-coff support.
1658 * config.bfd: Likewise.
1659 * configure.ac: Likewise.
1660 * targets.c: Likewise.
1661 * aout-arm.c: Delete.
1662 * armnetbsd.c: Delete.
1664 * Makefile.in: Regenerate.
1665 * configure: Regenerate.
1666 * po/SRC-POTFILES.in: Regenerate.
1668 2018-04-24 Nick Clifton <nickc@redhat.com>
1671 * elf.c (ignore_section_sym): Check for the output_section pointer
1672 being NULL before dereferencing it.
1675 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Check for
1676 a negative PE_DEBUG_DATA size before iterating over the debug data.
1678 2018-04-23 Alan Modra <amodra@gmail.com>
1680 * elf-linux-core.h: Revert last change.
1683 2018-04-23 Nick Clifton <nickc@redhat.com>
1686 * aoutx.h (aout_get_external_symbols): Allocate an extra byte at
1687 the end of the string table, and zero it.
1689 2018-04-23 Alan Modra <amodra@gmail.com>
1691 * elf-linux-core.h (swap_linux_prpsinfo32_ugid32_out): Disable
1692 gcc-8 string truncation warning.
1693 (swap_linux_prpsinfo32_ugid16_out): Likewise.
1694 (swap_linux_prpsinfo64_ugid32_out): Likewise.
1695 (swap_linux_prpsinfo64_ugid16_out): Likewise.
1696 * elf.c (elfcore_write_prpsinfo): Likewise.
1698 2018-04-23 Nick Clifton <nickc@redhat.com>
1701 * aoutx.h (aout_get_external_symbols): Allocate an extra byte at
1702 the end of the string table, and zero it.
1704 2018-04-20 Alan Modra <amodra@gmail.com>
1707 * elf32-hppa.c (got_relocs_needed): Add extra param to special
1708 case both dtprel and tprel relocs.
1709 (allocate_dynrelocs): Adjust conditions for got relocs.
1710 (elf32_hppa_relocate_section): Likewise for local sym got relocs.
1711 Emit dynamic relocs on TLS GOT entries for shared libraries,
1712 not when pic. Omit dynamic reloc on dtprel entry when local,
1713 and on tprel entry when local and executable.
1715 2018-04-19 Alan Modra <amodra@gmail.com>
1718 * elf32-hppa.c (elf32_hppa_size_stubs): Init "destination" to -1.
1719 (hppa_type_of_stub): Don't return a long branch stub for
1720 symbols other than those defined statically.
1722 2018-04-19 Alan Modra <amodra@gmail.com>
1724 * Makefile.am: Revert 2018-04-18 coff-mips changes.
1725 * config.bfd: Add back mips_ecoff_le_vec and mips_ecoff_be_vec
1726 to selvecs for mips targets change 2018-04-18.
1727 * configure.ac: Reinstate mips_ecoff_le_vec, mips_ecoff_be_vec
1728 and mips_ecoff_bele_vec.
1729 * targets.c: Likewise.
1730 * coff-mips.c: Resurrect.
1731 * Makefile.in: Regenerate.
1732 * configure: Regenerate.
1733 * po/SRC-POTFILES.in: Regenerate.
1735 2018-04-18 Alan Modra <amodra@gmail.com>
1737 * Makefile.am: Remove mips aout and coff support.
1738 * config.bfd: Likewise.
1739 * configure.ac: Likewise.
1740 * targets.c: Likewise.
1741 * coff-mips.c: Delete
1744 * pei-mips.c: Delete
1745 * Makefile.in: Regenerate.
1746 * configure: Regenerate.
1747 * po/SRC-POTFILES.in: Regenerate.
1749 2018-04-17 H.J. Lu <hongjiu.lu@intel.com>
1751 * elf32-i386.c (elf32_bed): Define before including
1753 * elf64-x86-64.c (elf64_bed): Define before including
1755 (elf32_bed): Define before including "elf32-target.h".
1757 2018-04-17 H.J. Lu <hongjiu.lu@intel.com>
1760 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Use a
1761 normal input file with compatible relocation.
1763 2018-04-18 Alan Modra <amodra@gmail.com>
1765 * Makefile.am: Remove support for assorted i386 aout and coff targets.
1766 * config.bfd: Likewise.
1767 * configure.ac: Likewise.
1768 * doc/bfdint.texi: Likewise.
1769 * targets.c: Likewise.
1770 * freebsd.h: Delete.
1771 * i386dynix.c: Delete.
1772 * i386freebsd.c: Delete.
1773 * i386linux.c: Delete.
1774 * i386mach3.c: Delete.
1775 * i386netbsd.c: Delete.
1776 * i386os9k.c: Delete.
1777 * Makefile.in: Regenerate.
1778 * configure: Regenerate.
1779 * po/SRC-POTFILES.in: Regenerate.
1781 2018-04-17 Andrew Sadek <andrew.sadek.se@gmail.com>
1783 Microblaze Target: PIC data text relative
1785 * bfd/reloc.c (2 new BFD relocations):
1786 BFD_RELOC_MICROBLAZE_64_TEXTPCREL &
1787 BFD_RELOC_MICROBLAZE_64_TEXTPCREL
1788 * bfd/bfd-in2.h: Regenerate
1789 * bfd/libbfd.h: Regenerate
1790 * bfd/elf32-microblaze.c (Handle new relocs): define 'HOWTO' of 3
1791 new relocs and handle them in both relocate and relax functions.
1792 (microblaze_elf_reloc_type_lookup): add mapping between for new
1794 (microblaze_elf_relocate_section): Handle new relocs in case of
1796 (microblaze_elf_relax_section): Handle new relocs for elf relaxation.
1798 2018-04-17 Nick Clifton <nickc@redhat.com>
1801 * aoutx.h (find_nearest_line): Check that the symbol name exists
1802 and is long enough, before attempting to see if it is for a .o
1804 * hash.c (bfd_hash_hash): Add an assertion that the string is not
1806 * linker.c (bfd_link_hash_lookup): Fail if the table or string are
1808 (_bfd_generic_link_add_archive_symbols): Fail if an archive entry
1812 * dwarf2.c (concat_filename): Check for a NULL table pointer.
1814 2018-04-16 Nick Clifton <nickc@redhat.com>
1817 * coffgen.c (coff_pointerize_aux): Check for an out of range
1820 2018-04-16 Alan Modra <amodra@gmail.com>
1822 * Makefile.am: Remove arm-epoc-pe support.
1823 * coff-arm.c: Likewise.
1824 * config.bfd: Likewise.
1825 * configure.ac: Likewise.
1826 * targets.c: Likewise.
1827 * epoc-pe-arm.c: Delete.
1828 * epoc-pei-arm.c: Delete.
1829 * Makefile.in: Regenerate.
1830 * configure: Regenerate.
1831 * po/SRC-POTFILES.in: Regenerate.
1833 2018-04-16 Alan Modra <amodra@gmail.com>
1835 * Makefile.am: Remove sparc-aout and sparc-coff support.
1836 * config.bfd: Likewise.
1837 * configure.ac: Likewise.
1838 * targets.c: Likewise.
1839 * aout-sparcle.c: Delete.
1841 * cf-sparclynx.c: Delete.
1842 * coff-sparc.c: Delete.
1844 * sparclinux.c: Delete.
1845 * sparclynx.c: Delete.
1846 * sparcnetbsd.c: Delete.
1848 * Makefile.in: Regenerate.
1849 * configure: Regenerate.
1850 * po/SRC-POTFILES.in: Regenerate.
1852 2018-04-16 Alan Modra <amodra@gmail.com>
1854 * Makefile.am: Remove m68k-aout and m68k-coff support.
1855 * aoutf1.h: Likewise.
1856 * aoutx.h: Likewise.
1857 * archive.c: Likewise.
1858 * bfd-in.h: Likewise.
1860 * coffcode.h: Likewise.
1861 * coffswap.h: Likewise.
1862 * config.bfd: Likewise.
1863 * configure.ac: Likewise.
1864 * configure.host: Likewise.
1865 * doc/bfd.texinfo: Likewise.
1866 * doc/bfdint.texi: Likewise.
1867 * freebsd.h: Likewise.
1868 * gen-aout.c: Likewise.
1869 * hpux-core.c: Likewise.
1870 * libaout.h: Likewise.
1871 * libbfd-in.h: Likewise.
1872 * pdp11.c: Likewise.
1873 * peicode.h: Likewise.
1874 * riscix.c: Likewise.
1875 * targets.c: Likewise.
1877 * coff-apollo.c: Delete.
1878 * coff-aux.c: Delete.
1879 * coff-m68k.c: Delete.
1880 * coff-svm68k.c: Delete.
1881 * coff-u68k.c: Delete.
1882 * hosts/delta68.h: Delete.
1883 * hosts/hp300bsd.h: Delete.
1884 * hosts/m68kaux.h: Delete.
1885 * hosts/news.h: Delete.
1886 * hp300bsd.c: Delete.
1887 * hp300hpux.c: Delete.
1888 * liboasys.h: Delete.
1889 * m68k4knetbsd.c: Delete.
1890 * m68klinux.c: Delete.
1891 * m68knetbsd.c: Delete.
1893 * versados.c: Delete.
1894 * Makefile.in: Regenerate.
1895 * bfd-in2.h: Regenerate.
1896 * configure: Regenerate.
1897 * libbfd.h: Regenerate.
1898 * po/SRC-POTFILES.in: Regenerate.
1900 2018-04-16 Alan Modra <amodra@gmail.com>
1902 * Makefile.am: Remove sh5 and sh64 support.
1903 * archures.c: Likewise.
1904 * config.bfd: Likewise.
1905 * configure.ac: Likewise.
1906 * cpu-sh.c: Likewise.
1907 * elf32-sh-relocs.h: Likewise.
1908 * elf32-sh.c: Likewise.
1909 * targets.c: Likewise.
1910 * elf32-sh64-com.c: Delete.
1911 * elf32-sh64.c: Delete.
1912 * elf32-sh64.h: Delete.
1913 * elf64-sh64.c: Delete.
1914 * Makefile.in: Regenerate.
1915 * bfd-in2.h: Regenerate.
1916 * configure: Regenerate.
1917 * po/SRC-POTFILES.in: Regenerate.
1919 2018-04-16 Alan Modra <amodra@gmail.com>
1921 * Makefile.am: Remove sh-symbianelf support.
1922 * config.bfd: Likewise.
1923 * configure.ac: Likewise.
1924 * targets.c: Likewise.
1925 * elf32-sh-symbian.c: Delete.
1926 * Makefile.in: Regenerate.
1927 * configure: Regenerate.
1928 * po/SRC-POTFILES.in: Regenerate.
1930 2018-04-16 Alan Modra <amodra@gmail.com>
1932 * Makefile.am: Remove vax-bsd and vax-ultrix support.
1933 * config.bfd: Likewise.
1934 * configure.ac: Likewise.
1935 * targets.c: Likewise.
1937 * Makefile.in: Regenerate.
1938 * configure: Regenerate.
1939 * po/SRC-POTFILES.in: Regenerate.
1941 2018-04-16 Alan Modra <amodra@gmail.com>
1943 * Makefile.am: Remove w65 support.
1944 * archures.c: Likewise.
1945 * coffcode.h: Likewise.
1946 * config.bfd: Likewise.
1947 * configure.ac: Likewise.
1948 * targets.c: Likewise.
1949 * coff-w65.c: Delete.
1950 * cpu-w65.c: Delete.
1951 * Makefile.in: Regenerate.
1952 * bfd-in2.h: Regenerate.
1953 * configure: Regenerate.
1954 * po/SRC-POTFILES.in: Regenerate.
1956 2018-04-16 Alan Modra <amodra@gmail.com>
1958 * Makefile.am: Remove we32k support.
1959 * archures.c: Likewise.
1960 * coffcode.h: Likewise.
1961 * config.bfd: Likewise.
1962 * configure.ac: Likewise.
1963 * targets.c: Likewise.
1964 * coff-we32k.c: Delete.
1965 * cpu-we32k.c: Delete.
1966 * Makefile.in: Regenerate.
1967 * bfd-in2.h: Regenerate.
1968 * configure: Regenerate.
1969 * po/SRC-POTFILES.in: Regenerate.
1971 2018-04-16 Alan Modra <amodra@gmail.com>
1973 * Makefile.am: Remove m88k support.
1974 * aoutx.h: Likewise.
1975 * archures.c: Likewise.
1976 * coffcode.h: Likewise.
1977 * coffswap.h: Likewise.
1978 * config.bfd: Likewise.
1979 * configure.ac: Likewise.
1980 * cpu-ns32k.c: Likewise.
1981 * elf32-nds32.c: Likewise.
1982 * mach-o.c: Likewise.
1983 * netbsd-core.c: Likewise.
1984 * reloc.c: Likewise.
1985 * targets.c: Likewise.
1986 * coff-m88k.c: Delete.
1987 * cpu-m88k.c: Delete.
1988 * elf32-m88k.c: Delete.
1989 * hosts/m88kmach3.h: Delete.
1990 * m88kmach3.c: Delete.
1991 * m88kopenbsd.c: Delete.
1992 * Makefile.in: Regenerate.
1993 * bfd-in2.h: Regenerate.
1994 * configure: Regenerate.
1995 * po/SRC-POTFILES.in: Regenerate.
1997 2018-04-16 Alan Modra <amodra@gmail.com>
1999 * Makefile.am: Remove i370 support.
2000 * archures.c: Likewise.
2001 * config.bfd: Likewise.
2002 * configure.ac: Likewise.
2003 * targets.c: Likewise.
2004 * cpu-i370.c: Delete.
2005 * elf32-i370.c: Delete.
2006 * Makefile.in: Regenerate.
2007 * bfd-in2.h: Regenerate.
2008 * configure: Regenerate.
2009 * po/SRC-POTFILES.in: Regenerate.
2011 2018-04-16 Alan Modra <amodra@gmail.com>
2013 * Makefile.am: Remove h8500 support.
2014 * archures.c: Likewise.
2015 * coffcode.h: Likewise.
2016 * config.bfd: Likewise.
2017 * configure.ac: Likewise.
2018 * targets.c: Likewise.
2019 * coff-h8500.c: Delete.
2020 * cpu-h8500.c: Delete.
2021 * Makefile.in: Regenerate.
2022 * bfd-in2.h: Regenerate.
2023 * configure: Regenerate.
2024 * po/SRC-POTFILES.in: Regenerate.
2026 2018-04-16 Alan Modra <amodra@gmail.com>
2028 * Makefile.am: Remove h8300-coff support.
2029 * coffcode.h: Likewise.
2030 * config.bfd: Likewise.
2031 * configure.ac: Likewise.
2032 * reloc16.c: Likewise.
2033 * targets.c: Likewise.
2034 * coff-h8300.c: Delete.
2035 * Makefile.in: Regenerate.
2036 * configure: Regenerate.
2037 * po/SRC-POTFILES.in: Regenerate.
2039 2018-04-16 Alan Modra <amodra@gmail.com>
2041 * Makefile.am: Remove IEEE 695 support.
2042 * archures.c: Likewise.
2044 * config.bfd: Likewise.
2045 * configure.ac: Likewise.
2046 * doc/bfd.texinfo: Likewise.
2047 * doc/bfdint.texi: Likewise.
2048 * doc/bfdsumm.texi: Likewise.
2049 * section.c: Likewise.
2050 * targets.c: Likewise.
2052 * libieee.h: Delete.
2053 * Makefile.in: Regenerate.
2054 * bfd-in2.h: Regenerate.
2055 * configure: Regenerate.
2056 * po/SRC-POTFILES.in: Regenerate.
2058 2018-04-16 Alan Modra <amodra@gmail.com>
2060 * config.bfd: Remove tandem support.
2062 2018-04-16 Alan Modra <amodra@gmail.com>
2064 * Makefile.am: Remove newsos3 support.
2065 * aoutx.h: Likewise.
2066 * config.bfd: Likewise.
2067 * configure.ac: Likewise.
2068 * targets.c: Likewise.
2069 * newsos3.c: Delete.
2070 * Makefile.in: Regenerate.
2071 * configure: Regenerate.
2072 * po/SRC-POTFILES.in: Regenerate.
2074 2018-04-16 Alan Modra <amodra@gmail.com>
2076 * Makefile.am: Remove netware support.
2077 * bfd-in.h: Likewise.
2079 * config.bfd: Likewise.
2080 * configure.ac: Likewise.
2081 * doc/bfdint.texi: Likewise.
2082 * ecoff.c: Likewise.
2083 * targets.c: Likewise.
2085 * nlm-target.h: Delete.
2087 * nlm32-alpha.c: Delete.
2088 * nlm32-i386.c: Delete.
2089 * nlm32-ppc.c: Delete.
2090 * nlm32-sparc.c: Delete.
2093 * nlmcode.h: Delete.
2094 * nlmswap.h: Delete.
2095 * Makefile.in: Regenerate.
2096 * bfd-in2.h: Regenerate.
2097 * configure: Regenerate.
2098 * po/SRC-POTFILES.in: Regenerate.
2100 2018-04-16 Alan Modra <amodra@gmail.com>
2102 * archures.c: Remove tahoe support.
2103 * config.bfd: Likewise.
2104 * configure.ac: Likewise.
2105 * hosts/tahoe.h: Delete.
2106 * bfd-in2.h: Regenerate.
2107 * configure: Regenerate.
2109 2018-04-14 Alan Modra <amodra@gmail.com>
2111 * elf-bfd.h (struct elf_backend_data): Add relropagesize.
2112 * elfxx-target.h (ELF_RELROPAGESIZE): Provide default and
2114 (elfNN_bed): Init relropagesize.
2115 * bfd.c (bfd_emul_get_commonpagesize): Add boolean param to
2116 select relropagesize.
2117 * elf32-ppc.c (ELF_COMMONPAGESIZE): Define as 0x1000.
2118 (ELF_RELROPAGESIZE): Define as ELF_MAXPAGESIZE.
2119 (ELF_MINPAGESIZE): Don't define.
2120 * elf64-ppc.c (ELF_COMMONPAGESIZE): Define as 0x1000.
2121 (ELF_RELROPAGESIZE): Define as ELF_MAXPAGESIZE.
2122 * bfd-in2.h: Regenerate.
2124 2018-04-14 Alan Modra <amodra@gmail.com>
2126 * elf32-ppc.c (ELF_MAXPAGESIZE, ELF_COMMONPAGESIZE): Don't depend
2127 on __QNXTARGET__ define.
2129 2018-04-14 Alan Modra <amodra@gmail.com>
2131 * config.bfd: Add powerpc-*-lynxos* and powerpc-*-windiss*
2134 2018-04-11 Alan Modra <amodra@gmail.com>
2136 * aout-adobe.c: Delete.
2138 * coff-i860.c: Delete.
2139 * coff-i960.c: Delete.
2140 * cpu-i860.c: Delete.
2141 * cpu-i960.c: Delete.
2142 * elf32-i860.c: Delete.
2143 * elf32-i960.c: Delete.
2144 * hosts/i860mach3.h: Delete.
2145 * Makefile.am: Remove i860, i960, bout, and adobe support.
2146 * archures.c: Remove i860 and i960 support.
2147 * coffcode.h: Likewise.
2148 * reloc.c: Likewise.
2149 * aoutx.h: Comment updates.
2150 * archive.c: Remove BOUT and i960 support.
2151 * bfd.c: Remove BOUT support.
2152 * coffswap.h: Remove i960 support.
2153 * config.bfd: Remove i860, i960 and adobe targets.
2154 * configure.ac: Remove adode, bout, i860, i960, icoff targets.
2155 * targets.c: Likewise.
2156 * ieee.c: Remove i960 support.
2157 * mach-o.c: Remove i860 support.
2158 * Makefile.in: Regenerate.
2159 * bfd-in2.h: Regenerate.
2160 * configure: Regenerate.
2161 * libbfd.h: Regenerate.
2162 * po/SRC-POTFILES.in: Regenerate.
2164 2018-04-09 Maciej W. Rozycki <macro@mips.com>
2166 * elf64-mips.c (mips_elf64_write_rel): Handle a NULL BFD pointer
2167 in the BFD symbol referred by the relocation.
2168 (mips_elf64_write_rela): Likewise.
2170 2018-04-09 Maciej W. Rozycki <macro@mips.com>
2172 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Issue an
2173 error for out-of-range `r_sym' values.
2175 2018-04-09 Alan Modra <amodra@gmail.com>
2177 * elf64-ppc.c (struct _ppc64_elf_section_data): Add has_pltcall field.
2178 (struct ppc_link_hash_table): Add can_convert_all_inline_plt.
2179 (ppc64_elf_check_relocs): Set has_pltcall.
2180 (ppc64_elf_adjust_dynamic_symbol): Discard some PLT entries.
2181 (ppc64_elf_inline_plt): New function.
2182 (ppc64_elf_size_dynamic_sections): Discard some PLT entries for locals.
2183 * elf64-ppc.h (ppc64_elf_inline_plt): Declare.
2184 * elf32-ppc.c (has_pltcall): Define.
2185 (struct ppc_elf_link_hash_table): Add can_convert_all_inline_plt.
2186 (ppc_elf_check_relocs): Set has_pltcall.
2187 (ppc_elf_inline_plt): New function.
2188 (ppc_elf_adjust_dynamic_symbol): Discard some PLT entries.
2189 (ppc_elf_size_dynamic_sections): Likewise.
2190 * elf32-ppc.h (ppc_elf_inline_plt): Declare.
2192 2018-04-09 Alan Modra <amodra@gmail.com>
2194 * elf32-ppc.c (ppc_elf_howto_raw): Add PLTSEQ and PLTCALL howtos.
2195 (is_plt_seq_reloc): New function.
2196 (ppc_elf_check_relocs): Handle PLTSEQ and PLTCALL relocs.
2197 (ppc_elf_tls_optimize): Handle inline plt call sequence.
2198 (ppc_elf_relax_section): Handle PLTCALL reloc.
2199 (ppc_elf_relocate_section): Nop out inline plt call sequence when
2201 * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_PLTSEQ and
2202 R_PPC64_PLTCALL entries. Comment R_PPC64_TOCSAVE.
2203 (has_tls_get_addr_call): Correct comment.
2204 (is_branch_reloc): Add PLTCALL.
2205 (is_plt_seq_reloc): New function.
2206 (ppc64_elf_check_relocs): Handle PLT16_LO_DS reloc. Set
2207 has_tls_reloc for R_PPC64_TLSGD and R_PPC64_TLSLD. Create plt
2208 entry for R_PPC64_PLTCALL.
2209 (ppc64_elf_tls_optimize): Handle inline plt call sequence.
2210 (ppc_type_of_stub): Handle PLTCALL reloc.
2211 (toc_adjusting_stub_needed): Likewise.
2212 (ppc64_elf_relocate_section): Set "can_plt_call" for PLTCALL
2213 reloc insn. Nop out inline plt call sequence when resolving
2214 locally. Handle __tls_get_addr inline plt call optimization.
2216 2018-04-09 Alan Modra <amodra@gmail.com>
2218 * elf64-ppc.c (LOCAL_PLT_ENTRY_SIZE): Define.
2219 (struct ppc_stub_hash_entry): Add symtype field.
2221 (struct ppc_link_hash_table): Add pltlocal and relpltlocal.
2222 (create_linkage_sections): Create pltlocal and relpltlocal.
2223 (ppc64_elf_check_relocs): Allow PLT relocs on local symbols.
2225 (ppc64_elf_adjust_dynamic_symbol): Keep PLT entries for inline calls.
2226 (allocate_dynrelocs): Allocate pltlocal and relpltlocal.
2227 (ppc64_elf_size_dynamic_sections): Size pltlocal and relpltlocal.
2228 Keep PLT entries for inline calls against locals.
2229 (ppc_build_one_stub): Use pltlocal as appropriate.
2230 (ppc_size_one_stub): Likewise.
2231 (ppc64_elf_size_stubs): Set symtype.
2232 (build_global_entry_stubs_and_plt): Init pltlocal and write
2233 relpltlocal for globals.
2234 (write_plt_relocs_for_local_syms): Likewise for local syms.
2235 (ppc64_elf_relocate_section): Support PLT for local syms.
2236 * elf32-ppc.c (PLT_KEEP): Define.
2237 (struct ppc_elf_link_hash_table): Add pltlocal and relpltlocal.
2238 (ppc_elf_create_glink): Create pltlocal and relpltlocal.
2239 (ppc_elf_check_relocs): Allow PLT relocs on local symbols.
2240 Set PLT_KEEP. Adjust update_local_sym_info call.
2241 (ppc_elf_adjust_dynamic_symbol): Keep PLT entries for inline calls.
2242 (allocate_dynrelocs): Allocate pltlocal and relpltlocal.
2243 (ppc_elf_size_dynamic_sections): Size pltlocal and relpltlocal.
2244 (ppc_elf_relocate_section): Support PLT16 relocs for local syms.
2245 (write_global_sym_plt): Init pltlocal and write relpltlocal.
2246 (ppc_finish_symbols): Likewise for locals.
2248 2018-04-09 Alan Modra <amodra@gmail.com>
2250 * elf64-ppc.c (ppc_build_one_stub): Move output of PLT relocs
2251 for local symbols to..
2252 (write_plt_relocs_for_local_syms): ..here. New function.
2253 (ppc64_elf_finish_dynamic_symbol): Move output of PLT relocs for
2255 (build_global_entry_stubs_and_plt): ..here. Rename from
2256 build_global_entry_stubs.
2257 (ppc64_elf_build_stubs): Always call build_global_entry_stubs_and_plt.
2258 Call write_plt_relocs_for_local_syms.
2259 * elf32-ppc.c (get_sym_h): New function.
2260 (ppc_elf_relax_section): Use get_sym_h.
2261 (ppc_elf_relocate_section): Move output of PLT relocs and glink
2262 stubs for local symbols to..
2263 (ppc_finish_symbols): ..here. New function.
2264 (ppc_elf_finish_dynamic_symbol): Move output of PLT relocs for
2266 (write_global_sym_plt): ..here. New function.
2267 * elf32-ppc.h (ppc_elf_modify_segment_map): Delete attribute.
2268 (ppc_finish_symbols): Declare.
2270 2018-04-09 Alan Modra <amodra@gmail.com>
2272 * elf32-ppc.c (ppc_elf_check_relocs): Handle PLT16 relocs.
2273 (ppc_elf_relocate_section): Likewise.
2274 * elf64-ppc.c (ppc64_elf_check_relocs): Handle PLT16_LO_DS.
2275 (ppc64_elf_relocate_section): Likewise. Correct PLT16
2276 resolution to plt entry relative to toc pointer.
2278 2018-04-09 Alan Modra <amodra@gmail.com>
2280 * elf64-ppc.c (TLS_TLS, TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL,
2281 TLS_TPRELGD, TLS_EXPLICIT): Renumber. Test TLS_TLS throughout
2282 file when other TLS flags are tested in a mask.
2283 (TLS_MARK, NON_GOT): Define.
2284 (PLT_IFUNC): Redefine, and test TLS_TLS throughout file as well.
2285 (update_local_sym_info): Don't create got entry when NON_GOT.
2286 (ppc64_elf_check_relocs): Pass NON_GOT with PLT_IFUNC.
2288 (get_tls_mask): Do toc lookup if tls_mask is just TLS_MARK.
2289 (ppc64_elf_relocate_section): Likewise.
2290 (ppc64_elf_tls_optimize): Don't attempt to optimize indirect
2291 __tls_get_addr calls lacking a marker reloc.
2292 * elf32-ppc.c (TLS_TLS, TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL,
2293 TLS_TPRELGD): Renumber. Update comment.
2294 (TLS_MARK, NON_GOT): Define.
2295 (PLT_IFUNC): Redefine, and test TLS_TLS throughout file as well.
2296 (update_local_sym_info): Don't create got entry when NON_GOT.
2297 (ppc_elf_check_relocs): Pass NON_GOT with PLT_IFUNC.
2299 (ppc_elf_tls_optimize): Don't attempt to optimize indirect
2300 __tls_get_addr calls lacking a marker reloc.
2302 2018-04-06 H.J. Lu <hongjiu.lu@intel.com>
2304 * elf64-x86-64.c (elf_x86_64_info_to_howto): Don't mask out
2305 R_X86_64_converted_reloc_bit.
2307 2018-04-05 H.J. Lu <hongjiu.lu@intel.com>
2310 * configure: Regenerated.
2312 2018-04-05 Alan Modra <amodra@gmail.com>
2314 * elf-hppa.h (elf_hppa_info_to_howto): Init howto to NULL.
2315 (elf_hppa_info_to_howto_rel): Likewise.
2317 2018-04-04 Maciej W. Rozycki <macro@mips.com>
2319 * elf-hppa.h (elf_hppa_info_to_howto): Also return
2320 unsuccessfully for unimplemented relocations.
2321 (elf_hppa_info_to_howto_rel): Likewise.
2323 2018-04-04 Maciej W. Rozycki <macro@mips.com>
2325 * elf32-i860.c (lookup_howto): Add `abfd' parameter. Set the
2326 `bfd_error_bad_value' error and call `_bfd_error_handler' on a
2327 howto lookup failure.
2328 (elf32_i860_reloc_type_lookup): Adjust `lookup_howto' call
2330 (elf32_i860_info_to_howto_rela): Likewise.
2331 (elf32_i860_relocate_splitn): Likewise.
2332 (elf32_i860_relocate_pc16): Likewise.
2333 (elf32_i860_relocate_pc26): Likewise.
2334 (elf32_i860_relocate_section): Likewise.
2336 2018-04-04 Maciej W. Rozycki <macro@mips.com>
2338 * elf32-visium.c (visium_info_to_howto_rela): Correct the range
2339 check for `visium_elf_howto_table' table access.
2341 2018-04-04 Maciej W. Rozycki <macro@mips.com>
2343 * elf32-iq2000.c (iq2000_info_to_howto_rela): Correct the range
2344 check for `iq2000_elf_howto_table' table access.
2346 2018-04-04 Maciej W. Rozycki <macro@mips.com>
2348 * elf32-frv.c (frv_info_to_howto_rela): Correct the range check
2349 for `elf32_frv_howto_table' table access.
2351 2018-04-04 Maciej W. Rozycki <macro@mips.com>
2353 * elf32-mips.c (mips_elf32_rtype_to_howto): Also return
2354 unsuccessfully for placeholder howtos.
2355 * elf64-mips.c (mips_elf64_rtype_to_howto): Likewise.
2356 * elfn32-mips.c (mips_elf_n32_rtype_to_howto): Likewise.
2358 2018-03-29 Maciej W. Rozycki <macro@mips.com>
2360 * elf32-mips.c (mips_info_to_howto_rel): Remove the calls to
2361 `_bfd_error_handler' and to set the `bfd_error_bad_value' error.
2363 2018-03-28 Maciej W. Rozycki <macro@mips.com>
2365 * elf-hppa.h (elf_hppa_info_to_howto_rel): Remove
2366 ATTRIBUTE_UNUSED from `abfd'.
2368 2018-03-28 Maciej W. Rozycki <macro@mips.com>
2370 * elf-hppa.h (elf_hppa_info_to_howto_rel): Correct
2371 `_bfd_error_handler' call formatting.
2373 2018-03-28 Maciej W. Rozycki <macro@mips.com>
2375 * elf32-mips.c (mips_info_to_howto_rel): Call
2376 `mips_elf32_rtype_to_howto' directly rather than via
2377 `->elf_backend_mips_rtype_to_howto'.
2379 2018-03-28 Renlin Li <renlin.li@arm.com>
2382 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Add cases for
2383 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12,
2384 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
2385 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12,
2386 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
2387 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12,
2388 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
2389 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12,
2390 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
2391 (elfNN_aarch64_final_link_relocate): Support new relocations.
2392 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Support new
2394 (_bfd_aarch64_elf_resolve_relocation): Support new relocations.
2396 2018-03-28 Renlin Li <renlin.li@arm.com>
2399 * reloc.c: Add BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12
2400 BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12_NC,
2401 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12,
2402 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
2403 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12,
2404 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
2405 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12,
2406 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
2407 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12,
2408 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
2409 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add table entry for
2410 TLSLE_LDST16_TPREL_LO12,
2411 TLSLE_LDST16_TPREL_LO12_NC,
2412 TLSLE_LDST32_TPREL_LO12,
2413 TLSLE_LDST32_TPREL_LO12_NC,
2414 TLSLE_LDST64_TPREL_LO12,
2415 TLSLE_LDST64_TPREL_LO12_NC,
2416 TLSLE_LDST8_TPREL_LO12,
2417 TLSLE_LDST8_TPREL_LO12_NC.
2418 * bfd-in2.h: Regenerated.
2419 * libbfd.h: Regenerated.
2421 2018-03-28 Eric Botcazou <ebotcazou@adacore.com>
2424 * elfxx-sparc.c (struct _bfd_sparc_elf_link_hash_entry): Add new flag
2425 has_old_style_got_reloc.
2426 (_bfd_sparc_elf_check_relocs) <GOT relocations>: Set it for old-style
2427 relocations. Fix a couple of long lines.
2428 (_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: Do not generate
2429 a R_SPARC_NONE for the GOT slot if the symbol is also subject to old-style
2432 2018-03-25 H.J. Lu <hongjiu.lu@intel.com>
2435 * elf64-x86-64.c (elf_x86_64_finish_dynamic_sections): Add
2436 ENDBR64 to the TLSDESC PLT entry.
2438 2018-03-21 Alan Modra <amodra@gmail.com>
2440 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Trim uninteresting
2441 symbols. Use size_t counts. Delete redundant opd test.
2443 2018-03-21 Alan Modra <amodra@gmail.com>
2445 * elf32-ppc.c (ppc_elf_tls_optimize): Delete locsyms.
2447 2018-03-21 Alan Modra <amodra@gmail.com>
2449 * elf32-ppc.c (struct ppc_elf_link_hash_entry): Make tls_mask
2451 (update_local_sym_info): Likewise for local_got_tls_masks.
2452 (ppc_elf_tls_optimize): Likewise for lgot_masks.
2454 2018-03-21 Alan Modra <amodra@gmail.com>
2456 * elf64-ppc.c (ppc_size_one_stub): Fix comment typo.
2457 (ppc64_elf_layout_multitoc): Allocate relocs for tprel as we
2458 do in size_dynamic_sections.
2460 2018-03-21 Alan Modra <amodra@gmail.com>
2462 * elf64-ppc.c (ppc64_elf_relocate_section): Don't access rel[1]
2463 without first checking array bounds.
2464 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2466 2018-03-20 H.J. Lu <hongjiu.lu@intel.com>
2469 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Set
2470 non_ir_ref_dynamic if a symbol is made dynamic by --dynamic-list.
2472 2018-03-19 Nick Clifton <nickc@redhat.com>
2474 * po/es.po: Updated Spanish translation.
2476 2018-03-15 Max Filippov <jcmvbkbc@gmail.com>
2478 * elf32-xtensa.c (xlate_map_entry): Change types of address
2479 fields from 'unsigned' to 'bfd_vma'.
2480 (xlate_offset_with_removed_text): Use struct xlate_map_entry as
2481 the key argument to bsearch. Allow offsets past the end of a
2482 section, use the last map entry for translation of such offsets.
2484 2018-03-15 Kuan-Lin Chen <kuanlinchentw@gmail.com>
2486 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Removed.
2487 Not support the target feature.
2488 (nds32_elf_ex9_itb_base): Likewise.
2489 (nds32_elf_ex9_import_table): Likewise.
2490 (nds32_elf_ex9_finish): Likewise.
2491 (nds32_elf_ex9_reloc_jmp): Likewise.
2492 (nds32_elf_get_insn_with_reg): Likewise.
2493 (nds32_get_local_syms): Likewise.
2494 (nds32_elf_ex9_replace_instruction): Likewise.
2495 (nds32_elf_ifc_calc): Likewise.
2496 (nds32_elf_ifc_finish): Likewise.
2497 (nds32_elf_ifc_replace): Likewise.
2498 (nds32_elf_ifc_reloc): Likewise.
2500 2018-03-14 Alan Modra <amodra@gmail.com>
2502 * elf64-ppc.c (sfpr_define): Adjust for stub_sec size having
2503 sfpr size added before defining alias symbols.
2504 (ppc64_elf_build_stubs): Add stub section padding before
2505 copying sfpr contents and defining save/restore alias symbols.
2507 2018-03-14 H.J. Lu <hongjiu.lu@intel.com>
2510 * elflink.c (elf_gc_mark_debug_section): Also check the local
2511 debug definition section.
2513 2018-03-13 Nick Clifton <nickc@redhat.com>
2516 * pei-x86_64.c (pex64_get_unwind_info): Change to a boolean
2517 function. Add an end address parameter. Check access of the data
2518 pointer to make sure that they do not extend beyond the end
2519 address. Return FALSE if any check fails. Add the end address
2520 pointer to the ui structure.
2521 (pex64_xdata_print_uwd_codes): Check accesses of the raw unwind
2522 codes to make sure that they do not extend beyond the end address
2523 pointer. Print an error message and return immediately if any
2526 2018-03-09 Nick Clifton <nickc@redhat.com>
2528 * elf64-s390.c (elf_s390_relocate_section): Move check for
2529 relocations against non-allocated sections to before the code that
2530 handles ifunc relocations.
2531 * elf32-s390.c (elf_s390_relocate_section): Likewise.
2532 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Treat
2533 relocs against IFUNC symbols in non-allocated sections as relocs
2534 against FUNC symbols.
2535 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
2537 2018-03-08 H.J. Lu <hongjiu.lu@intel.com>
2540 * elf32-i386.c (elf_i386_relocate_section): Treat relocation
2541 against IFUNC symbol in SHT_NOTE section without SHF_ALLOC as
2542 relocation against FUNC symbol.
2543 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
2545 2018-03-07 Renlin Li <renlin.li@arm.com>
2548 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Check absolute
2549 symbol, and don't emit relocation in specific case.
2551 2018-03-07 Alan Modra <amodra@gmail.com>
2553 * elf64-mips.c (mips_elf64_rtype_to_howto): Return NULL on error.
2554 (mips_elf64_slurp_one_reloc_table): Pass on error.
2556 2018-03-03 James Cowgill <james.cowgill@mips.com>
2557 Maciej W. Rozycki <macro@mips.com>
2560 * elfxx-mips.c (mips_elf_calculate_relocation): Only return
2561 after calling `undefined_symbol' hook if this is an error
2562 condition. Assume the value of 0 for the symbol requested
2565 2018-03-02 Jim Wilson <jimw@sifive.com>
2568 * elfnn-aarch64.c (_bfd_aarch64_resize_stubs): Add 8 bytes for branch
2569 and nop instead of 4.
2570 (elfNN_arch64_build_stubs): Add nop after branch. Increase size by
2573 2018-03-01 Jim Wilson <jimw@sifive.com>
2576 * elfnn-riscv.c (riscv_relax_delete_bytes): When adjust st_size, use
2577 else if instead of if.
2579 2018-03-01 Alan Modra <amodra@gmail.com>
2581 * elf32-ft32.c (ft32_info_to_howto_rela): Correct range test.
2583 2018-02-28 Alan Modra <amodra@gmail.com>
2586 * aoutx.h (swap_std_reloc_in): Correct r_index bound check.
2588 2018-02-28 Nick Clifton <nickc@redhat.com>
2592 * dwarf2.c (read_n_bytes): Replace size parameter with dwarf_block
2593 pointer. Drop unused abfd parameter. Check the size of the block
2594 before initialising the data field. Return the end pointer if the
2596 (read_attribute_value): Adjust invocations of read_n_bytes.
2599 * dwarf1.c (parse_die): Check the length of form blocks before
2600 advancing the data pointer.
2602 2018-02-28 Alan Modra <amodra@gmail.com>
2605 * aoutx.h (translate_symbol_table): Print an error message and set
2606 bfd_error on finding an invalid name string offset.
2608 2018-02-27 H.J. Lu <hongjiu.lu@intel.com>
2610 * config.in: Regenerated.
2611 * configure: Likewise.
2612 * configure.ac: Add --enable-separate-code.
2613 (DEFAULT_LD_Z_SEPARATE_CODE): New AC_DEFINE_UNQUOTED. Default
2614 to 1 for Linux/x86 targets,
2615 * elf64-x86-64.c (ELF_MAXPAGESIZE): Set to 0x1000 if
2616 DEFAULT_LD_Z_SEPARATE_CODE is 1.
2618 2018-02-27 Nick Clifton <nickc@redhat.com>
2620 * aout-cris.c (swap_ext_reloc_out): Standadize error/warning
2622 * elf-hppa.h (elf_hppa_info_to_howto_rel): Likewise.
2623 * elf32-i386.c (elf_i386_reloc_type_lookup): Likewise.
2624 * elf32-xtensa.c (elf_xtensa_reloc_type_lookup): Likewise.
2625 * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Likewise.
2626 * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise.
2627 * elf64-sh64.c (sh_elf64_info_to_howto): Likewise.
2628 * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise.
2629 * elfxx-sparc.c (_bfd_sparc_elf_reloc_type_lookup): Likewise.
2630 * elfxx-tilegx.c (tilegx_reloc_type_lookup): Likewise.
2633 * elf-bfd.h (struct elf_backend_data): Change the return type of
2634 the elf_info_to_howto and elf_info_to_howto_rel function pointers
2636 * elfcode.h (elf_slurp_reloc_table_from_section): Check the return
2637 value from the info_to_howto function and fail if that function
2639 * elf32-h8300.c (elf32_h8_relocate_section): Check return value
2640 from the info_to_howto function.
2641 (elf32_h8_relax_section): Likewise.
2642 * elf32-lm32.c (lm32_elf_relocate_section): Likewise.
2643 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
2644 * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise.
2645 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
2646 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
2647 * elf64-ia64-vms.c (elf64_ia64_relocate_section): Likewise.
2648 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Likewise.
2649 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
2650 * elfnn-ia64.c (elfNN_ia64_relocate_section): Likewise.
2651 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
2652 (riscv_elf_relocate_section): Likewise.
2653 * elf-hppa.h (elf_hppa_info_to_howto): Change return type to
2654 bfd_boolean. Issue an error message, set an error value and
2655 return FALSE if the reloc is not recognized.
2656 (elf_hppa_info_to_howto_rel): Likewise.
2657 * elf-m10200.c (mn10200_info_to_howto): Likewise.
2658 * elf-m10300.c (mn10300_info_to_howto): Likewise.
2659 * elf.c (_bfd_elf_no_info_to_howto): Likewise.
2660 * elf32-arc.c (arc_info_to_howto_rel): Likewise.
2661 * elf32-arm.c (elf32_arm_info_to_howto): Likewise.
2662 * elf32-avr.c (avr_info_to_howto_rela): Likewise.
2663 * elf32-bfin.c (bfin_info_to_howto): Likewise.
2664 * elf32-cr16.c (elf_cr16_info_to_howto): Likewise.
2665 * elf32-cr16c.c (elf_cr16c_info_to_howto): Likewise.
2666 * elf32-cris.c (elf_cr16c_info_to_howto_rel)
2667 (cris_info_to_howto_rela): Likewise.
2668 * elf32-crx.c (elf_crx_info_to_howto): Likewise.
2669 * elf32-d10v.c (d10v_info_to_howto_rel): Likewise.
2670 * elf32-d30v.c (d30v_info_to_howto_rel, d30v_info_to_howto_rela):
2672 * elf32-dlx.c (dlx_rtype_to_howto, elf32_dlx_info_to_howto)
2673 (elf32_dlx_info_to_howto_rel): Likewise.
2674 * elf32-epiphany.c (epiphany_info_to_howto_rela): Likewise.
2675 * elf32-fr30.c (fr30_info_to_howto_rela): Likewise.
2676 * elf32-frv.c (frv_info_to_howto_rela)
2677 (frvfdpic_info_to_howto_rel): Likewise.
2678 * elf32-ft32.c (ft32_info_to_howto_rela): Likewise.
2679 * elf32-gen.c (elf_generic_info_to_howto)
2680 (elf_generic_info_to_howto_rel): Likewise.
2681 * elf32-h8300.c (elf32_h8_info_to_howto)
2682 (elf32_h8_info_to_howto_rel): Likewise.
2683 * elf32-i370.c (i370_elf_info_to_howto): Likewise.
2684 * elf32-i386.c (elf_i386_reloc_type_lookup)
2685 (elf_i386_rtype_to_howto, elf_i386_info_to_howto_rel): Likewise.
2686 * elf32-i860.c (lookup_howto, elf32_i860_info_to_howto_rela):
2688 * elf32-i960.c (elf32_i960_info_to_howto_rel): Likewise.
2689 * elf32-ip2k.c (ip2k_info_to_howto_rela): Likewise.
2690 * elf32-iq2000.c (iq2000_info_to_howto_rela): Likewise.
2691 * elf32-lm32.c (lm32_info_to_howto_rela): Likewise.
2692 * elf32-m32c.c (m32c_info_to_howto_rela): Likewise.
2693 * elf32-m32r.c (m32r_info_to_howto_rel, m32r_info_to_howto):
2695 * elf32-m68hc11.c (m68hc11_info_to_howto_rel): Likewise.
2696 * elf32-m68hc12.c (m68hc11_info_to_howto_rel): Likewise.
2697 * elf32-m68k.c (rtype_to_howto): Likewise.
2698 * elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
2699 * elf32-mep.c (mep_info_to_howto_rela): Likewise.
2700 * elf32-metag.c (metag_info_to_howto_rela): Likewise.
2701 * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
2702 * elf32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela):
2704 * elf32-moxie.c (moxie_info_to_howto_rela): Likewise.
2705 * elf32-msp430.c (msp430_info_to_howto_rela): Likewise.
2706 * elf32-mt.c (mt_info_to_howto_rela): Likewise.
2707 * elf32-nds32.c (nds32_info_to_howto_rel, nds32_info_to_howto):
2709 * elf32-nios2.c (nios2_elf32_info_to_howto): Likewise.
2710 * elf32-or1k.c (or1k_info_to_howto_rela): Likewise.
2711 * elf32-pj.c (pj_elf_info_to_howto): Likewise.
2712 * elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
2713 * elf32-pru.c (pru_elf32_info_to_howto): Likewise.
2714 * elf32-rl78.c (rl78_info_to_howto_rela): Likewise.
2715 * elf32-rx.c (rx_info_to_howto_rela): Likewise.
2716 * elf32-s390.c (elf_s390_info_to_howto): Likewise.
2717 * elf32-score.c (s3_bfd_score_info_to_howto)
2718 (_bfd_score_info_to_howto): Likewise.
2719 * elf32-score7.c (s7_bfd_score_info_to_howto): Likewise.
2720 * elf32-sh.c (sh_elf_info_to_howto): Likewise.
2721 * elf32-spu.c (spu_elf_info_to_howto): Likewise.
2722 * elf32-tic6x.c (elf32_tic6x_info_to_howto)
2723 (elf32_tic6x_info_to_howto_rel): Likewise.
2724 * elf32-tilepro.c (tilepro_info_to_howto_rela): Likewise.
2725 * elf32-v850.c (v850_elf_info_to_howto_rel)
2726 (v850_elf_info_to_howto_rela, v800_elf_info_to_howto): Likewise.
2727 * elf32-vax.c (rtype_to_howto): Likewise.
2728 * elf32-visium.c (visium_info_to_howto_rela): Likewise.
2729 * elf32-wasm32.c (elf32_wasm32_rtype_to_howto)
2730 (elf32_wasm32_info_to_howto_rela): Likewise.
2731 * elf32-xc16x.c (elf32_xc16x_info_to_howto): Likewise.
2732 * elf32-xgate.c (xgate_info_to_howto_rel): Likewise.
2733 * elf32-xstormy16.c (xstormy16_info_to_howto_rela): Likewise.
2734 * elf32-xtensa.c (elf_xtensa_info_to_howto_rela): Likewise.
2735 * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
2736 * elf64-gen.c (elf_generic_info_to_howto)
2737 (elf_generic_info_to_howto_rel): Likewise.
2738 * elf64-ia64-vms.c (elf64_ia64_info_to_howto): Likewise.
2739 * elf64-mips.c (mips_elf64_info_to_howto_rela): Likewise.
2740 * elf64-mmix.c (mmix_info_to_howto_rela): Likewise.
2741 * elf64-ppc.c (ppc64_elf_info_to_howto): Likewise.
2742 * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise.
2743 * elf64-sh64.c (elf_s390_info_to_howto, sh_elf64_info_to_howto):
2745 * elf64-x86-64.c (elf_x86_64_info_to_howto): Likewise.
2746 * elfn32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela):
2748 * elfnn-aarch64.c (elfNN_aarch64_info_to_howto): Likewise.
2749 * elfnn-ia64.c (elfNN_ia64_info_to_howto): Likewise.
2750 * elfnn-riscv.c (riscv_info_to_howto_rela): Likewise.
2751 * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise.
2752 * elfxx-sparc.c (_bfd_sparc_elf_info_to_howto): Likewise.
2753 * elfxx-tilegx.c (tilegx_info_to_howto_rela): Likewise.
2754 * elf32-score.h (s7_bfd_score_info_to_howto): Update prototype.
2755 * elfxx-sparc.h (_bfd_sparc_elf_info_to_howto): Update prototype.
2756 * elfxx-tilegx.h (tilegx_info_to_howto_rela): Update prototype.
2757 * elfxx-target.h (elf_info_to_howto, elf_info_to_howto_rel):
2760 2018-02-26 Jim Wilson <jimw@sifive.com>
2761 Stephan Schreiber <info@fs-driver.org>
2764 * elfnn-ia64.c (elfNN_ia64_relax_section): After ia64_elf_relax_brl
2765 call, set changed_contents and changed_relocs. Likewise after
2766 successful ia64_elf_relax_br call.
2768 2018-02-26 Alan Modra <amodra@gmail.com>
2770 * elf.c (assign_file_positions_except_relocs): Don't segfault
2771 when actual number of phdrs is less than allocated. Delete
2772 outdated comment. Formatting.
2774 2018-02-26 Alan Modra <amodra@gmail.com>
2776 * elf-m10300.c, * elf-s390-common.c, * elf32-arc.c, * elf32-cris.c,
2777 * elf32-dlx.c, * elf32-frv.c, * elf32-i370.c, * elf32-lm32.c,
2778 * elf32-m32r.c, * elf32-m68hc1x.c, * elf32-m68k.c,
2779 * elf32-microblaze.c, * elf32-msp430.c, * elf32-nds32.c,
2780 * elf32-nios2.c, * elf32-or1k.c, * elf32-rl78.c, * elf32-rx.c,
2781 * elf32-score.c, * elf32-score7.c, * elf32-sh-symbian.c,
2782 * elf32-sh.c, * elf32-spu.c, * elf32-v850.c, * elf32-xtensa.c,
2783 * elf64-alpha.c, * elf64-ia64-vms.c, * elf64-mmix.c,
2784 * elf64-sh64.c, * elf64-sparc.c, * elfnn-ia64.c, * elfxx-tilegx.c,
2785 * mmo.c, * osf-core.c, * srec.c, * vms-alpha.c: Standardize
2786 error/warning messages.
2788 2018-02-26 Alan Modra <amodra@gmail.com>
2790 * archive.c, * bfd.c, * linker.c, * reloc.c, * stabs.c,
2791 * syms.c: Standardize error/warning messages.
2793 2018-02-26 Alan Modra <amodra@gmail.com>
2795 * aout-adobe.c, * aout-cris.c, * i386linux.c, * m68klinux.c,
2796 * sparclinux.c, * coff-alpha.c, * coff-arm.c, * coff-mcore.c,
2797 * coffcode.h, * coffgen.c, * cofflink.c, * ecoff.c, * pe-mips.c,
2798 * peXXigen.c, * peicode.h: Standardize error/warning messages.
2800 2018-02-26 Alan Modra <amodra@gmail.com>
2802 * elf32-arm.c, * elfnn-aarch64.c: Standardize error/warning messages.
2804 2018-02-26 Alan Modra <amodra@gmail.com>
2806 * elfxx-mips.c: Standardize error/warning messages.
2808 2018-02-26 Alan Modra <amodra@gmail.com>
2810 * dwarf2.c, * elf-attrs.c, * elf-eh-frame.c, * elf.c, * elf32-gen.c,
2811 * elflink.c: Standardize error/warning messages. Replace use of
2812 linker callback einfo with _bfd_error_handler when possible.
2814 2018-02-26 Alan Modra <amodra@gmail.com>
2816 * aoutx.h, * coff-alpha.c, * coff-i860.c, * coff-m68k.c,
2817 * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c,
2818 * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-w65.c,
2819 * elf-bfd.h, * elf-m10300.c, * elf.c, * elf32-avr.c, * elf32-bfin.c,
2820 * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c,
2821 * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c,
2822 * elf32-fr30.c, * elf32-frv.c, * elf32-i370.c, * elf32-i386.c,
2823 * elf32-i960.c, * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c,
2824 * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c,
2825 * elf32-m68k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c,
2826 * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c,
2827 * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-or1k.c,
2828 * elf32-pj.c, * elf32-ppc.c, * elf32-rl78.c, * elf32-rx.c,
2829 * elf32-s390.c, * elf32-sh.c, * elf32-spu.c, * elf32-tic6x.c,
2830 * elf32-v850.c, * elf32-vax.c, * elf32-visium.c, * elf32-wasm32.c,
2831 * elf32-xgate.c, * elf32-xtensa.c, * elf64-alpha.c,
2832 * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c,
2833 * elf64-ppc.c, * elf64-s390.c, * elf64-sparc.c, * elf64-x86-64.c,
2834 * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c,
2835 * elfnn-riscv.c, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-riscv.h,
2836 * elfxx-sparc.c, * elfxx-sparc.h, * reloc.c: Standardize
2837 unrecognized/unsupported reloc message.
2839 2018-02-26 Alan Modra <amodra@gmail.com>
2841 * elf32-ppc.c: Standardize error/warning messages. Use
2842 _bfd_error_handler rather than einfo when einfo features not used.
2843 * elf64-ppc.c: Likewise.
2845 2018-02-23 Alan Modra <amodra@gmail.com>
2848 * elf.c (assign_file_positions_for_non_load_sections): Remove RELRO
2849 segment if no matching LOAD segment.
2851 2018-02-23 Kuan-Lin Chen <kuanlinchentw@gmail.com>
2853 * elf32-nds32.h: Define mask for ict_model.
2855 2018-02-20 Jason Duerstock <jason.duerstock@gmail.com>
2857 * elfnn-ia64.c (elf_backend_can_gc_sections): Enable.
2859 2018-02-19 Maciej W. Rozycki <macro@mips.com>
2862 2018-01-12 Vlad Ivanov <vlad@ivanov.email>
2864 * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
2865 .reginfo section has wrong size.
2867 2018-02-19 Maciej W. Rozycki <macro@mips.com>
2869 * elfxx-mips.c (_bfd_mips_elf_always_size_sections): Set
2870 SEC_FIXED_SIZE and SEC_HAS_CONTENTS flags for `.reginfo' and
2871 `.MIPS.abiflags' sections.
2872 (_bfd_mips_elf_final_link): Avoid reading beyond `.reginfo'
2875 2018-02-19 Maciej W. Rozycki <macro@mips.com>
2877 * section.c (SEC_FIXED_SIZE): New macro.
2878 * bfd-in2.h: Regenerate.
2880 2018-02-19 Maciej W. Rozycki <macro@mips.com>
2882 * section.c (SEC_HAS_GOT_REF): Remove macro.
2883 * bfd-in2.h: Regenerate.
2885 2018-02-19 Alan Modra <amodra@gmail.com>
2887 * elf-attrs.c (_bfd_elf_parse_attributes): Correct _bfd_error_handler
2889 * elfxx-mips.c (_bfd_mips_elf_final_link): Likewise.
2890 * elfnn-riscv.c (_bfd_riscv_relax_align): Likewise.
2891 (_bfd_riscv_relax_pc): Likewise and fix typos.
2892 * libbfd-in.h (_bfd_error_handler): Add attribute printf.
2893 * libbfd.h: Regenerate.
2895 2018-02-19 Alan Modra <amodra@gmail.com>
2897 * dwarf2.c (read_section): Don't use 'll' format modifier.
2898 (find_abstract_instance): Likewise.
2899 * elfcore.h (elf_core_file_p): Likewise.
2901 2018-02-19 Alan Modra <amodra@gmail.com>
2903 * bfd-in.h: Include inttypes.h or if not available define
2904 PRId64, PRIu64 and PRIx64.
2905 * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Remove support for L
2906 modifier to print bfd_vma.
2907 * coff-arm.c, * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c,
2908 * coff-sh.c, * coff-tic80.c, * coffcode.h, * coffgen.c, * cofflink.c,
2909 * compress.c, * dwarf2.c, * elf-m10300.c, * elf.c, * elf32-arc.c,
2910 * elf32-arm.c, * elf32-bfin.c, * elf32-cris.c, * elf32-hppa.c,
2911 * elf32-i386.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32r.c,
2912 * elf32-m68k.c, * elf32-metag.c, * elf32-nds32.c, * elf32-nios2.c,
2913 * elf32-ppc.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c,
2914 * elf32-score7.c, * elf32-sh.c, * elf32-sh64.c, * elf32-spu.c,
2915 * elf32-tic6x.c, * elf32-tilepro.c, * elf32-v850.c, * elf32-vax.c,
2916 * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c,
2917 * elf64-mmix.c, * elf64-s390.c, * elf64-sh64.c, * elf64-x86-64.c,
2918 * elfcode.h, * elfcore.h, * elflink.c, * elfnn-aarch64.c,
2919 * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-mips.c, * elfxx-sparc.c,
2920 * elfxx-tilegx.c, * ieee.c, * ihex.c, * mach-o.c, * merge.c, * mmo.c,
2921 * peXXigen.c, * xcofflink.c: Replace use of Lx modifier with PRIx64,
2922 and cast input to uint64_t, and similarly for Ld and Lu.
2923 * bfd-in2.h: Regenerate.
2925 2018-02-19 Alan Modra <amodra@gmail.com>
2927 * elf32-arm.c, * elf32-hppa.c, * elf32-lm32.c, * elf32-m32r.c,
2928 * elf32-metag.c, * elf32-nds32.c, * elf32-or1k.c, * elf32-ppc.c,
2929 * elf32-s390.c, * elf32-sh.c, * elf32-tic6x.c, * elf32-tilepro.c,
2930 * elf64-ppc.c, * elf64-s390.c, * elflink.c, * elfnn-aarch64.c,
2931 * elfnn-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c,
2932 * reloc.c: Replace use of %R and %T in format strings passed to
2933 einfo and friends by %pR and %pT.
2935 2018-02-19 Alan Modra <amodra@gmail.com>
2937 * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Handle %pA and %pB in place
2939 * aout-adobe.c: Update all messages using %A and %B.
2940 * aout-cris.c: Likewise.
2941 * aoutx.h: Likewise.
2942 * archive.c: Likewise.
2943 * binary.c: Likewise.
2944 * cache.c: Likewise.
2945 * coff-alpha.c: Likewise.
2946 * coff-arm.c: Likewise.
2947 * coff-i860.c: Likewise.
2948 * coff-mcore.c: Likewise.
2949 * coff-ppc.c: Likewise.
2950 * coff-rs6000.c: Likewise.
2951 * coff-sh.c: Likewise.
2952 * coff-tic4x.c: Likewise.
2953 * coff-tic54x.c: Likewise.
2954 * coff-tic80.c: Likewise.
2955 * coff64-rs6000.c: Likewise.
2956 * coffcode.h: Likewise.
2957 * coffgen.c: Likewise.
2958 * cofflink.c: Likewise.
2959 * coffswap.h: Likewise.
2960 * compress.c: Likewise.
2961 * cpu-arm.c: Likewise.
2962 * ecoff.c: Likewise.
2963 * elf-attrs.c: Likewise.
2964 * elf-eh-frame.c: Likewise.
2965 * elf-ifunc.c: Likewise.
2966 * elf-m10300.c: Likewise.
2967 * elf-properties.c: Likewise.
2968 * elf-s390-common.c: Likewise.
2970 * elf32-arc.c: Likewise.
2971 * elf32-arm.c: Likewise.
2972 * elf32-avr.c: Likewise.
2973 * elf32-bfin.c: Likewise.
2974 * elf32-cr16.c: Likewise.
2975 * elf32-cr16c.c: Likewise.
2976 * elf32-cris.c: Likewise.
2977 * elf32-crx.c: Likewise.
2978 * elf32-d10v.c: Likewise.
2979 * elf32-d30v.c: Likewise.
2980 * elf32-epiphany.c: Likewise.
2981 * elf32-fr30.c: Likewise.
2982 * elf32-frv.c: Likewise.
2983 * elf32-gen.c: Likewise.
2984 * elf32-hppa.c: Likewise.
2985 * elf32-i370.c: Likewise.
2986 * elf32-i386.c: Likewise.
2987 * elf32-i960.c: Likewise.
2988 * elf32-ip2k.c: Likewise.
2989 * elf32-iq2000.c: Likewise.
2990 * elf32-lm32.c: Likewise.
2991 * elf32-m32c.c: Likewise.
2992 * elf32-m32r.c: Likewise.
2993 * elf32-m68hc11.c: Likewise.
2994 * elf32-m68hc12.c: Likewise.
2995 * elf32-m68hc1x.c: Likewise.
2996 * elf32-m68k.c: Likewise.
2997 * elf32-mcore.c: Likewise.
2998 * elf32-mep.c: Likewise.
2999 * elf32-metag.c: Likewise.
3000 * elf32-microblaze.c: Likewise.
3001 * elf32-moxie.c: Likewise.
3002 * elf32-msp430.c: Likewise.
3003 * elf32-mt.c: Likewise.
3004 * elf32-nds32.c: Likewise.
3005 * elf32-nios2.c: Likewise.
3006 * elf32-or1k.c: Likewise.
3007 * elf32-pj.c: Likewise.
3008 * elf32-ppc.c: Likewise.
3009 * elf32-rl78.c: Likewise.
3010 * elf32-rx.c: Likewise.
3011 * elf32-s390.c: Likewise.
3012 * elf32-score.c: Likewise.
3013 * elf32-score7.c: Likewise.
3014 * elf32-sh-symbian.c: Likewise.
3015 * elf32-sh.c: Likewise.
3016 * elf32-sh64.c: Likewise.
3017 * elf32-sparc.c: Likewise.
3018 * elf32-spu.c: Likewise.
3019 * elf32-tic6x.c: Likewise.
3020 * elf32-tilepro.c: Likewise.
3021 * elf32-v850.c: Likewise.
3022 * elf32-vax.c: Likewise.
3023 * elf32-visium.c: Likewise.
3024 * elf32-wasm32.c: Likewise.
3025 * elf32-xgate.c: Likewise.
3026 * elf32-xtensa.c: Likewise.
3027 * elf64-alpha.c: Likewise.
3028 * elf64-gen.c: Likewise.
3029 * elf64-hppa.c: Likewise.
3030 * elf64-ia64-vms.c: Likewise.
3031 * elf64-mmix.c: Likewise.
3032 * elf64-ppc.c: Likewise.
3033 * elf64-s390.c: Likewise.
3034 * elf64-sh64.c: Likewise.
3035 * elf64-sparc.c: Likewise.
3036 * elf64-x86-64.c: Likewise.
3037 * elfcode.h: Likewise.
3038 * elfcore.h: Likewise.
3039 * elflink.c: Likewise.
3040 * elfnn-aarch64.c: Likewise.
3041 * elfnn-ia64.c: Likewise.
3042 * elfnn-riscv.c: Likewise.
3043 * elfxx-mips.c: Likewise.
3044 * elfxx-sparc.c: Likewise.
3045 * elfxx-tilegx.c: Likewise.
3046 * elfxx-x86.c: Likewise.
3047 * hpux-core.c: Likewise.
3050 * libbfd.c: Likewise.
3051 * linker.c: Likewise.
3052 * mach-o.c: Likewise.
3053 * merge.c: Likewise.
3055 * oasys.c: Likewise.
3056 * pdp11.c: Likewise.
3057 * pe-mips.c: Likewise.
3058 * peXXigen.c: Likewise.
3059 * peicode.h: Likewise.
3060 * reloc.c: Likewise.
3061 * rs6000-core.c: Likewise.
3063 * stabs.c: Likewise.
3064 * vms-alpha.c: Likewise.
3065 * xcofflink.c: Likewise.
3067 2018-02-19 Alan Modra <amodra@gmail.com>
3070 * elf.c (IS_TBSS): Define.
3071 (_bfd_elf_map_sections_to_segments): Use IS_TBSS.
3072 (assign_file_positions_for_non_load_sections): Revert last change.
3073 Properly calculate load segment limits to compare against relro limits.
3075 2018-02-17 Alan Modra <amodra@gmail.com>
3078 * elf.c (assign_file_positions_for_non_load_sections): Ignore
3079 degenerate zero size PT_LOAD segments when finding one overlapping
3080 the PT_GNU_RELRO segment.
3082 2018-02-16 Alan Modra <amodra@gmail.com>
3084 * libbfd.c (_bfd_bool_bfd_false_error): Rename from bfd_false.
3085 (_bfd_bool_bfd_true): Rename from bfd_true.
3086 (_bfd_ptr_bfd_null_error): Rename from bfd_nullvoidptr.
3087 (_bfd_int_bfd_0): Rename from bfd_0.
3088 (_bfd_uint_bfd_0): Rename from bfd_0u.
3089 (_bfd_long_bfd_0): Rename from bfd_0l.
3090 (_bfd_long_bfd_n1_error): Rename from _bfd_n1.
3091 (_bfd_void_bfd): Rename from bfd_void.
3092 (_bfd_bool_bfd_false, _bfd_bool_bfd_asymbol_false),
3093 (_bfd_bool_bfd_link_false_error),
3094 (_bfd_bool_bfd_link_true, _bfd_bool_bfd_bfd_true),
3095 (_bfd_bool_bfd_uint_true, _bfd_bool_bfd_ptr_true),
3096 (_bfd_bool_bfd_asection_bfd_asection_true),
3097 (_bfd_bool_bfd_asymbol_bfd_asymbol_true),
3098 (_bfd_void_bfd_link, _bfd_void_bfd_asection): New functions.
3099 * archive.c (_bfd_noarchive_get_elt_at_index),
3100 (_bfd_noarchive_openr_next_archived_file),
3101 (_bfd_noarchive_construct_extended_name_table),
3102 (_bfd_noarchive_write_ar_hdr, _bfd_noarchive_truncate_arname),
3103 (_bfd_noarchive_write_armap): New functions.
3104 * archures.c (_bfd_nowrite_set_arch_mach): New function.
3105 * coff-alpha.c (alpha_ecoff_swap_coff_aux_in),
3106 (alpha_ecoff_swap_coff_sym_in, alpha_ecoff_swap_coff_lineno_in),
3107 (alpha_ecoff_swap_coff_aux_out, alpha_ecoff_swap_coff_sym_out),
3108 (alpha_ecoff_swap_coff_lineno_out),
3109 (alpha_ecoff_swap_coff_reloc_out): New functions.
3110 * coff-mips.c (mips_ecoff_swap_coff_aux_in),
3111 (mips_ecoff_swap_coff_sym_in, mips_ecoff_swap_coff_lineno_in),
3112 (mips_ecoff_swap_coff_aux_out, mips_ecoff_swap_coff_sym_out),
3113 (mips_ecoff_swap_coff_lineno_out),
3114 (mips_ecoff_swap_coff_reloc_out): New functions.
3115 * coffcode.h (coff_set_alignment_hook): Replace define with
3117 (symname_in_debug_hook): Likewise.
3118 * ecoff.c (_bfd_ecoff_set_alignment_hook): New function.
3119 * elfxx-target.h (elf_backend_allow_non_load_phdr): Default to 0.
3120 * elf.c (assign_file_positions_except_relocs): Test
3121 elf_backend_allow_non_load_phdr for NULL.
3122 * elflink.c (_bfd_elf_omit_section_dynsym_default): Rename from
3123 _bfd_elf_link_omit_section_dynsym. Update uses.
3124 (_bfd_elf_omit_section_dynsym_all): New function.
3125 * elf-bfd.h (_bfd_elf_link_omit_section_dynsym): Delete.
3126 (_bfd_elf_omit_section_dynsym_default): Declare.
3127 (_bfd_elf_omit_section_dynsym_all): Declare.
3128 * linker.c (_bfd_nolink_sizeof_headers, _bfd_nolink_bfd_relax_section),
3129 (_bfd_nolink_bfd_get_relocated_section_contents),
3130 (_bfd_nolink_bfd_lookup_section_flags),
3131 (_bfd_nolink_bfd_is_group_section, _bfd_nolink_bfd_discard_group),
3132 (_bfd_nolink_bfd_link_hash_table_create),
3133 (_bfd_nolink_bfd_link_just_syms),
3134 (_bfd_nolink_bfd_copy_link_hash_symbol_type),
3135 (_bfd_nolink_bfd_link_split_section),
3136 (_bfd_nolink_section_already_linked),
3137 (_bfd_nolink_bfd_define_common_symbol),
3138 (_bfd_nolink_bfd_define_start_stop): New functions.
3139 * reloc.c (_bfd_norelocs_bfd_reloc_type_lookup),
3140 (_bfd_norelocs_bfd_reloc_name_lookup),
3141 (_bfd_nodynamic_canonicalize_dynamic_reloc): New functions.
3142 * section.c (_bfd_nowrite_set_section_contents): New function.
3143 * syms.c (_bfd_nosymbols_canonicalize_symtab),
3144 (_bfd_nosymbols_print_symbol, _bfd_nosymbols_get_symbol_info),
3145 (_bfd_nosymbols_get_symbol_version_string),
3146 (_bfd_nosymbols_bfd_is_local_label_name),
3147 (_bfd_nosymbols_get_lineno, _bfd_nosymbols_find_nearest_line),
3148 (_bfd_nosymbols_find_line, _bfd_nosymbols_find_inliner_info),
3149 (_bfd_nosymbols_bfd_make_debug_symbol),
3150 ( _bfd_nosymbols_read_minisymbols),
3151 ( _bfd_nosymbols_minisymbol_to_symbol),
3152 (_bfd_nodynamic_get_synthetic_symtab): New functions.
3153 * libbfd-in.h: Declare new functions. Update existing defines,
3155 * aix386-core.c: Update to use new hooks. Formatting.
3156 * aout-adobe.c: Likewise.
3157 * aout-arm.c: Likewise.
3158 * aout-target.h: Likewise.
3159 * aout-tic30.c: Likewise.
3160 * aoutf1.h: Likewise.
3161 * binary.c: Likewise.
3163 * cisco-core.c: Likewise.
3164 * coff-alpha.c: Likewise.
3165 * coff-i386.c: Likewise.
3166 * coff-i860.c: Likewise.
3167 * coff-i960.c: Likewise.
3168 * coff-ia64.c: Likewise.
3169 * coff-mips.c: Likewise.
3170 * coff-ppc.c: Likewise.
3171 * coff-rs6000.c: Likewise.
3172 * coff-sh.c: Likewise.
3173 * coff-tic30.c: Likewise.
3174 * coff-tic54x.c: Likewise.
3175 * coff-x86_64.c: Likewise.
3176 * coff64-rs6000.c: Likewise.
3177 * coffcode.h: Likewise.
3178 * elf-m10300.c: Likewise.
3179 * elf32-cr16.c: Likewise.
3180 * elf32-lm32.c: Likewise.
3181 * elf32-m32r.c: Likewise.
3182 * elf32-metag.c: Likewise.
3183 * elf32-score.c: Likewise.
3184 * elf32-score7.c: Likewise.
3185 * elf32-tilepro.c: Likewise.
3186 * elf32-xstormy16.c: Likewise.
3187 * elf32-xtensa.c: Likewise.
3188 * elf64-alpha.c: Likewise.
3189 * elf64-hppa.c: Likewise.
3190 * elf64-ia64-vms.c: Likewise.
3191 * elf64-mmix.c: Likewise.
3192 * elf64-sh64.c: Likewise.
3193 * elfnn-ia64.c: Likewise.
3194 * elfxx-sparc.c: Likewise.
3195 * elfxx-target.h: Likewise.
3196 * elfxx-tilegx.c: Likewise.
3197 * elfxx-x86.h: Likewise.
3198 * hp300hpux.c: Likewise.
3199 * hppabsd-core.c: Likewise.
3200 * hpux-core.c: Likewise.
3201 * i386msdos.c: Likewise.
3202 * i386os9k.c: Likewise.
3205 * irix-core.c: Likewise.
3206 * libaout.h: Likewise.
3207 * libecoff.h: Likewise.
3208 * mach-o-target.c: Likewise.
3209 * mach-o.c: Likewise.
3210 * mipsbsd.c: Likewise.
3212 * netbsd-core.c: Likewise.
3213 * nlm-target.h: Likewise.
3214 * oasys.c: Likewise.
3215 * osf-core.c: Likewise.
3216 * pdp11.c: Likewise.
3217 * pe-mips.c: Likewise.
3218 * pe-x86_64.c: Likewise.
3220 * plugin.c: Likewise.
3221 * ppcboot.c: Likewise.
3222 * ptrace-core.c: Likewise.
3223 * sco5-core.c: Likewise.
3225 * sparclynx.c: Likewise.
3227 * tekhex.c: Likewise.
3228 * trad-core.c: Likewise.
3229 * verilog.c: Likewise.
3230 * versados.c: Likewise.
3231 * vms-alpha.c: Likewise.
3232 * vms-lib.c: Likewise.
3233 * wasm-module.c: Likewise.
3235 * libbfd.h: Regenerate.
3237 2018-02-15 Jim Wilson <jimw@sifive.com>
3239 * elfnn-riscv.c (_bfd_riscv_relax_section): Ifdef out check to ignore
3240 symbols whose section address is zero.
3242 * elfnn-riscv.c (riscv_elf_relocate_section): Use bfd_reloc_dangerous
3243 when pcrel_lo reloc has an addend. Use reloc_dangerous callback for
3244 bfd_reloc_dangerous. Use einfo instead of warning callback for errors.
3245 Add %X%P to error messages.
3247 2018-02-15 Eric Botcazou <ebotcazou@adacore.com>
3250 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
3251 Pass FALSE instead of TRUE as 'create' argument to bfd_link_hash_lookup
3252 and assert that the result of the call is not NULL.
3254 2018-02-14 Nick Clifton <nickc@redhat.com>
3257 Revert previous delta. Add extra casts to avoid compile time
3259 * libbfd-in.h (_bfd_generic_bfd_copy_private_bfd_data): Add extra
3260 cast to avoid warning from gcc v8 compiler.
3261 (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
3262 (_bfd_generic_bfd_set_private_flags): Likewise.
3263 (_bfd_generic_bfd_copy_private_section_data): Likewise.
3264 (_bfd_generic_bfd_copy_private_symbol_data): Likewise.
3265 (_bfd_generic_bfd_copy_private_header_data): Likewise.
3266 (_bfd_generic_bfd_print_private_bfd_data): Likewise.
3267 (_bfd_noarchive_construct_extended_name_table): Likewise.
3268 (_bfd_noarchive_truncate_arname): Likewise.
3269 (_bfd_noarchive_write_ar_hdr): Likewise.
3270 (_bfd_noarchive_get_elt_at_index): Likewise.
3271 (_bfd_nosymbols_canonicalize_symtab): Likewise.
3272 (_bfd_nosymbols_print_symbol): Likewise.
3273 (_bfd_nosymbols_get_symbol_info): Likewise.
3274 (_bfd_nosymbols_get_symbol_version_string): Likewise.
3275 (_bfd_nosymbols_bfd_is_local_label_name): Likewise.
3276 (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise.
3277 (_bfd_nosymbols_get_lineno): Likewise.
3278 (_bfd_nosymbols_find_nearest_line): Likewise.
3279 (_bfd_nosymbols_find_line): Likewise.
3280 (_bfd_nosymbols_find_inliner_info): Likewise.
3281 (_bfd_nosymbols_bfd_make_debug_symbol): Likewise.
3282 (_bfd_nosymbols_read_minisymbols): Likewise.
3283 (_bfd_nosymbols_minisymbol_to_symbol): Likewise.
3284 (_bfd_norelocs_bfd_reloc_type_lookup): Likewise.
3285 (_bfd_norelocs_bfd_reloc_name_lookup): Likewise.
3286 (_bfd_nowrite_set_arch_mach): Likewise.
3287 (_bfd_nowrite_set_section_contents): Likewise.
3288 (_bfd_nolink_sizeof_headers): Likewise.
3289 (_bfd_nolink_bfd_get_relocated_section_contents): Likewise.
3290 (_bfd_nolink_bfd_relax_section): Likewise.
3291 (_bfd_nolink_bfd_gc_sections): Likewise.
3292 (_bfd_nolink_bfd_lookup_section_flags): Likewise.
3293 (_bfd_nolink_bfd_merge_sections): Likewise.
3294 (_bfd_nolink_bfd_is_group_section): Likewise.
3295 (_bfd_nolink_bfd_discard_group): Likewise.
3296 (_bfd_nolink_bfd_link_hash_table_create): Likewise.
3297 (_bfd_nolink_bfd_link_add_symbols): Likewise.
3298 (_bfd_nolink_bfd_link_just_syms): Likewise.
3299 (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise.
3300 (_bfd_nolink_bfd_final_link): Likewise.
3301 (_bfd_nolink_bfd_link_split_section): Likewise.
3302 (_bfd_nolink_section_already_linked): Likewise.
3303 (_bfd_nolink_bfd_define_common_symbol): Likewise.
3304 (_bfd_nolink_bfd_define_start_stop): Likewise.
3305 (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise.
3306 (_bfd_nodynamic_get_synthetic_symtab): Likewise.
3307 (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise.
3308 (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise.
3309 * libbfd.c (bfd_false_any): Delete.
3310 (bfd_true_any, bfd_nullvoidptr_any, bfd_0_any): Delete.
3311 (bfd_0u_any, bfd_0l_any, _bfd_n1_any, bfd_void_any): Delete.
3312 * libbfd.h (extern): Regenerate
3313 * aout-target.h (MY_bfd_is_target_special_symbol): Add extra
3314 cast to avoid warning from gcc v8 compiler.
3315 * aout-tic30.c (tic30_aout_set_arch_mach): Likewise.
3316 * binary.c (binary_get_symbol_info): Likewise.
3317 * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
3318 * coff-mips.c (mips_ecoff_backend_data): Likewise.
3319 * coffcode.h (coff_set_alignment_hook): Likewise.
3320 (symname_in_debug_hook): Likewise.
3321 (bfd_coff_backend_data bigobj_swap_table): Likewise.
3322 * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise.
3323 * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise.
3324 * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise.
3325 * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise.
3326 * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise.
3327 * elf32-score.c (elf_backend_omit_section_dynsym): Likewise.
3328 * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise.
3329 * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise.
3330 * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise.
3331 * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise.
3332 * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise.
3333 * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise.
3334 * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise.
3335 * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise.
3336 * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise.
3337 * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise.
3338 (bfd_elfNN_bfd_make_debug_symbol): Likewise.
3339 (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
3340 (bfd_elfNN_bfd_set_private_flags): Likewise.
3341 (bfd_elfNN_bfd_is_target_special_symbol): Likewise.
3342 (elf_backend_init_index_section): Likewise.
3343 (elf_backend_allow_non_load_phdr): Likewise.
3344 * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise.
3345 * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise.
3346 * ieee.c (ieee_construct_extended_name_table): Likewise.
3347 (ieee_write_armap): Likewise.
3348 (ieee_write_ar_hdr): Likewise.
3349 (ieee_bfd_is_target_special_symbol): Likewise.
3350 * ihex.c (ihex_canonicalize_symtab): Likewise.
3351 (ihex_bfd_is_target_special_symbol): Likewise.
3352 * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise.
3353 * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise.
3354 (_bfd_ecoff_set_alignment_hook): Likewise.
3355 * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise.
3356 * mmo.c (mmo_bfd_is_target_special_symbol): Likewise.
3357 * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise.
3358 * oasys.c (oasys_construct_extended_name_table): Likewise.
3359 (oasys_write_armap): Likewise.
3360 (oasys_write_ar_hdr): Likewise.
3361 (oasys_bfd_is_target_special_symbol): Likewise.
3362 * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise.
3363 * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise.
3364 * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise.
3365 * som.c (som_bfd_is_target_special_symbol): Likewise.
3366 * srec.c (srec_bfd_is_target_special_symbol): Likewise.
3367 * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise.
3368 * verilog.c (verilog_bfd_is_target_special_symbol): Likewise.
3369 * versados.c (versados_bfd_is_target_special_symbol): Likewise.
3370 (versados_bfd_reloc_name_lookup): Likewise.
3371 * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise.
3372 (vms_bfd_define_start_stop): Likewise.
3373 (alpha_vms_bfd_is_target_special_symbol): Likewise.
3374 * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise.
3375 * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise.
3377 2018-02-14 H.J. Lu <hongjiu.lu@intel.com>
3380 * elf32-i386.c (elf_i386_check_relocs): Pass FALSE for non
3381 PC-relative PLT to NEED_DYNAMIC_RELOCATION_P.
3382 * elf64-x86-64.c (elf_x86_64_check_relocs): Create PLT for
3383 R_X86_64_PC32 reloc against dynamic function in data section.
3384 Pass TRUE for PC-relative PLT to NEED_DYNAMIC_RELOCATION_P.
3385 (elf_x86_64_relocate_section): Use PLT for R_X86_64_PC32 reloc
3386 against dynamic function in data section.
3387 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Use PLT in PIE as
3388 function address only if pcrel_plt is true.
3389 (_bfd_x86_elf_link_hash_table_create): Set pcrel_plt.
3390 * elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): Add PCREL_PLT for
3391 PC-relative PLT. If PLT is PC-relative, don't generate dynamic
3392 PC-relative relocation against a function definition in data
3393 secton in PIE. Remove the obsolete comments.
3394 (elf_x86_link_hash_table): Add pcrel_plt.
3396 2018-02-13 H.J. Lu <hongjiu.lu@intel.com>
3398 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Check bfd_link_dll,
3399 instead of bfd_link_pic, for building shared library.
3401 2018-02-13 H.J. Lu <hongjiu.lu@intel.com>
3404 * elf64-x86-64.c (is_32bit_relative_branch): Removed.
3405 (elf_x86_64_relocate_section): Check PIC relocations in PIE.
3406 Remove is_32bit_relative_branch usage. Disallow PC32 reloc
3407 against protected function in shared object.
3409 2018-02-13 Sergei Trofimovich <slyfox@inbox.ru>
3412 * po/ru.po: Fix typo in Russian translation.
3414 2018-02-13 Maciej W. Rozycki <macro@mips.com>
3416 * wasm-module.c (wasm_scan_name_function_section): Rename
3417 `index' local variable to `idx'.
3419 2018-02-13 Nick Clifton <nickc@redhat.com>
3422 Fix compile time warnings generated by gcc version 8.
3423 * libbfd-in.h: Remove extraneous text from prototypes.
3424 Add prototypes for bfd_false_any, bfd_true_any,
3425 bfd_nullvoidptr_any, bfd_0_any, bfd_0u_any, bfd_0l_any,
3426 bfd_n1_any, bfd_void_any.
3427 (_bfd_generic_bfd_copy_private_bfd_data): Use vararg based dummy
3429 (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
3430 (_bfd_generic_bfd_set_private_flags): Likewise.
3431 (_bfd_generic_bfd_copy_private_section_data): Likewise.
3432 (_bfd_generic_bfd_copy_private_symbol_data): Likewise.
3433 (_bfd_generic_bfd_copy_private_header_data): Likewise.
3434 (_bfd_generic_bfd_print_private_bfd_data): Likewise.
3435 (_bfd_noarchive_construct_extended_name_table): Likewise.
3436 (_bfd_noarchive_truncate_arname): Likewise.
3437 (_bfd_noarchive_write_ar_hdr): Likewise.
3438 (_bfd_noarchive_get_elt_at_index): Likewise.
3439 (_bfd_nosymbols_canonicalize_symtab): Likewise.
3440 (_bfd_nosymbols_print_symbol): Likewise.
3441 (_bfd_nosymbols_get_symbol_info): Likewise.
3442 (_bfd_nosymbols_get_symbol_version_string): Likewise.
3443 (_bfd_nosymbols_bfd_is_local_label_name): Likewise.
3444 (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise.
3445 (_bfd_nosymbols_get_lineno): Likewise.
3446 (_bfd_nosymbols_find_nearest_line): Likewise.
3447 (_bfd_nosymbols_find_line): Likewise.
3448 (_bfd_nosymbols_find_inliner_info): Likewise.
3449 (_bfd_nosymbols_bfd_make_debug_symbol): Likewise.
3450 (_bfd_nosymbols_read_minisymbols): Likewise.
3451 (_bfd_nosymbols_minisymbol_to_symbol): Likewise.
3452 (_bfd_norelocs_bfd_reloc_type_lookup): Likewise.
3453 (_bfd_norelocs_bfd_reloc_name_lookup): Likewise.
3454 (_bfd_nowrite_set_arch_mach): Likewise.
3455 (_bfd_nowrite_set_section_contents): Likewise.
3456 (_bfd_nolink_sizeof_headers): Likewise.
3457 (_bfd_nolink_bfd_get_relocated_section_contents): Likewise.
3458 (_bfd_nolink_bfd_relax_section): Likewise.
3459 (_bfd_nolink_bfd_gc_sections): Likewise.
3460 (_bfd_nolink_bfd_lookup_section_flags): Likewise.
3461 (_bfd_nolink_bfd_merge_sections): Likewise.
3462 (_bfd_nolink_bfd_is_group_section): Likewise.
3463 (_bfd_nolink_bfd_discard_group): Likewise.
3464 (_bfd_nolink_bfd_link_hash_table_create): Likewise.
3465 (_bfd_nolink_bfd_link_add_symbols): Likewise.
3466 (_bfd_nolink_bfd_link_just_syms): Likewise.
3467 (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise.
3468 (_bfd_nolink_bfd_final_link): Likewise.
3469 (_bfd_nolink_bfd_link_split_section): Likewise.
3470 (_bfd_nolink_section_already_linked): Likewise.
3471 (_bfd_nolink_bfd_define_common_symbol): Likewise.
3472 (_bfd_nolink_bfd_define_start_stop): Likewise.
3473 (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise.
3474 (_bfd_nodynamic_get_synthetic_symtab): Likewise.
3475 (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise.
3476 (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise.
3477 * libbfd.c (bfd_false_any): New function. Like bfd_false but
3478 accepts one or more arguments.
3479 (bfd_true_any): Likewise.
3480 (bfd_nullvoidptr_any): Likewise.
3481 (bfd_0_any): Likewise.
3482 (bfd_0u_any): Likewise.
3483 (bfd_0l_any): Likewise.
3484 (_bfd_n1_any): Likewise.
3485 (bfd_void_any): Likewise.
3486 * libbfd.h (extern): Regenerate
3487 * aout-target.h (MY_bfd_is_target_special_symbol): Use vararg
3488 based dummy function.
3489 * aout-tic30.c (tic30_aout_set_arch_mach): Likewise.
3490 * binary.c (binary_get_symbol_info): Likewise.
3491 * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
3492 * coff-mips.c (mips_ecoff_backend_data): Likewise.
3493 * coffcode.h (coff_set_alignment_hook): Likewise.
3494 (symname_in_debug_hook): Likewise.
3495 (bfd_coff_backend_data bigobj_swap_table): Likewise.
3496 * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise.
3497 * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise.
3498 * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise.
3499 * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise.
3500 * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise.
3501 * elf32-score.c (elf_backend_omit_section_dynsym): Likewise.
3502 * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise.
3503 * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise.
3504 * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise.
3505 * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise.
3506 * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise.
3507 * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise.
3508 * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise.
3509 * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise.
3510 * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise.
3511 * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise.
3512 (bfd_elfNN_bfd_make_debug_symbol): Likewise.
3513 (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
3514 (bfd_elfNN_bfd_set_private_flags): Likewise.
3515 (bfd_elfNN_bfd_is_target_special_symbol): Likewise.
3516 (elf_backend_init_index_section): Likewise.
3517 (elf_backend_allow_non_load_phdr): Likewise.
3518 * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise.
3519 * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise.
3520 * ieee.c (ieee_construct_extended_name_table): Likewise.
3521 (ieee_write_armap): Likewise.
3522 (ieee_write_ar_hdr): Likewise.
3523 (ieee_bfd_is_target_special_symbol): Likewise.
3524 * ihex.c (ihex_canonicalize_symtab): Likewise.
3525 (ihex_bfd_is_target_special_symbol): Likewise.
3526 * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise.
3527 * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise.
3528 (_bfd_ecoff_set_alignment_hook): Likewise.
3529 * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise.
3530 * mmo.c (mmo_bfd_is_target_special_symbol): Likewise.
3531 * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise.
3532 * oasys.c (oasys_construct_extended_name_table): Likewise.
3533 (oasys_write_armap): Likewise.
3534 (oasys_write_ar_hdr): Likewise.
3535 (oasys_bfd_is_target_special_symbol): Likewise.
3536 * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise.
3537 * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise.
3538 * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise.
3539 * som.c (som_bfd_is_target_special_symbol): Likewise.
3540 * srec.c (srec_bfd_is_target_special_symbol): Likewise.
3541 * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise.
3542 * verilog.c (verilog_bfd_is_target_special_symbol): Likewise.
3543 * versados.c (versados_bfd_is_target_special_symbol): Likewise.
3544 (versados_bfd_reloc_name_lookup): Likewise.
3545 * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise.
3546 (vms_bfd_define_start_stop): Likewise.
3547 (alpha_vms_bfd_is_target_special_symbol): Likewise.
3548 * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise.
3549 * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise.
3550 * elf32-arc.c (get_replace_function): Assign replacement function
3552 * elf32-i370.c (i370_noop): Update prototype.
3554 2018-02-13 Alan Modra <amodra@gmail.com>
3557 * elf.c (_bfd_elf_fixup_group_sections): Account for removed
3558 relocation sections. If size reduces to just the flag word,
3559 remove that too and mark with SEC_EXCLUDE.
3560 * elflink.c (bfd_elf_final_link): Strip empty group sections.
3562 2018-02-13 Alan Modra <amodra@gmail.com>
3565 * elf.c (assign_file_positions_for_non_load_sections): Rewrite
3568 2018-02-12 Zebediah Figura <z.figura12@gmail.com>
3570 * i386msdos.c (msdos_mkobject); New function.
3571 (msdos_object_p): New function.
3572 (i386_msdos_vec): Use msdos_object_p as the check_format
3574 * peicode.h: Rename external_PEI_DOS_hdr, DOSMAGIC, and
3575 NT_SIGNATURE to external_DOS_hdr, IMAGE_DOS_SIGNATURE, and
3577 * peXXigen.c: Likewise.
3578 * coff-ia64.c: Likewise.
3580 2018-02-12 Nick Clifton <nickc@redhat.com>
3582 * elf32-nds32.c (nds32_elf_relax_longjump3): Remove redundant
3584 * elf32-arc.c (elf_arc_relocate_section): Likewise.
3586 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
3588 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Reorder conditions.
3589 (sparc_elf_append_rela): Assert that there is enough room in section.
3590 (_bfd_sparc_elf_copy_indirect_symbol): Fix formatting.
3591 (_bfd_sparc_elf_adjust_dynamic_symbol): Minor tweak.
3592 (allocate_dynrelocs): Remove outdated comments and reorder conditions.
3593 For a symbol subject to a GOT relocation, reserve a slot in the
3594 relocation section if the symbol isn't dynamic and we are in PIC mode.
3595 (_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: If relocation
3596 is relaxed and a slot was reserved, generate a R_SPARC_NONE relocation.
3597 <R_SPARC_GOTDATA_OP_HIX22>: Adjust comments.
3598 <R_SPARC_PC10>: Reorder conditions. Remove always-false assertion.
3599 (_bfd_sparc_elf_finish_dynamic_symbol): Rename local_undefweak into
3600 resolved_to_zero. Do not generate a dynamic GOT relocation for an
3601 undefined weak symbol with non-default visibility. Remove superfluous
3602 'else' and fix formatting.
3604 2018-02-09 H.J. Lu <hongjiu.lu@intel.com>
3606 * elf32-i386.c (elf_i386_get_synthetic_symtab): Also handle
3608 (i386_elf32_sol2_vec): Don't declare.
3609 (elf_i386_link_setup_gnu_properties): Also handle is_solaris.
3610 Don't set need_global_offset_table.
3611 (elf_i386_solaris_arch_bed): New.
3612 (elf_backend_arch_data): Set to elf_i386_solaris_arch_bed for
3614 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Check
3615 target_os != is_nacl instead of target_os == is_normal.
3616 (x86_64_elf64_sol2_vec): Don't declare.
3617 (elf_x86_64_link_setup_gnu_properties): Check target_os !=
3618 is_nacl instead of target_os == is_normal. Don't set
3619 need_global_offset_table.
3620 (elf_x86_64_solaris_arch_bed): New.
3621 (elf_backend_arch_data): Set to elf_x86_64_solaris_arch_bed for
3623 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep
3624 _GLOBAL_OFFSET_TABLE_ for Solaris.
3625 (_bfd_x86_elf_link_setup_gnu_properties): Don't copy
3626 need_global_offset_table.
3627 * elfxx-x86.h (elf_x86_target_os): Add is_solaris.
3628 (elf_x86_link_hash_table): Remove need_global_offset_table.
3629 (elf_x86_init_table): Likewise.
3631 2018-02-08 H.J. Lu <hongjiu.lu@intel.com>
3633 * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
3635 (i386_elf32_sol2_vec): Declared.
3636 (elf_i386_link_setup_gnu_properties): Set
3637 need_global_offset_table with info->output_bfd->xvec.
3638 * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
3640 (x86_64_elf64_sol2_vec): Declared.
3641 (elf_x86_64_link_setup_gnu_properties): Set
3642 need_global_offset_table with info->output_bfd->xvec.
3644 2018-02-08 H.J. Lu <hongjiu.lu@intel.com>
3646 * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
3648 (elf_i386_link_setup_gnu_properties): Set need_global_offset_table
3650 * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
3652 (elf_x86_64_link_setup_gnu_properties): Set
3653 need_global_offset_table for Solaris.
3654 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep the
3655 unused _GLOBAL_OFFSET_TABLE_ for Solaris.
3656 (_bfd_x86_elf_link_setup_gnu_properties): Copy
3657 need_global_offset_table.
3658 * elfxx-x86.h (elf_x86_link_hash_table): Add
3659 need_global_offset_table.
3660 (elf_x86_init_table): Likewise.
3662 2018-02-08 Jim Wilson <jimw@sifive.com>
3664 * elfnn-riscv.c (riscv_elf_relocate_section): Add comment for previous
3667 2018-02-08 Nick Clifton <nickc@redhat.com>
3670 * elf.c (elf_parse_notes): Reject notes with excessuively large
3673 2018-02-07 Alan Modra <amodra@gmail.com>
3675 Revert 2018-01-17 Alan Modra <amodra@gmail.com>
3676 * elf32-ppc.c: Remove speculation barrier support.
3677 * elf32-ppc.h: Likewise.
3678 * elf64-ppc.c: Likewise.
3679 * elf64-ppc.h: Likewise.
3681 2018-02-06 Jim Wilson <jimw@sifive.com>
3683 * elfnn-riscv.c (riscv_elf_relocate_section): Return TRUE if used
3684 callback to report an error.
3686 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
3689 * elfxx-sparc.c (sparc_elf_tls_transition): Turn call to bfd_link_pic
3690 into call to !bfd_link_executable and tidy up.
3691 (_bfd_sparc_elf_check_relocs): Fix formatting and tidy up.
3692 <R_SPARC_TLS_LE_HIX22>: Turn call to bfd_link_pic into call to
3693 !bfd_link_executable.
3694 <R_SPARC_TLS_IE_HI22>: Likewise.
3695 <GOT relocations>: Remove useless code, tidy and merge related blocks.
3696 <R_SPARC_TLS_GD_CALL>: Turn call to bfd_link_pic into call to
3697 !bfd_link_executable.
3698 <R_SPARC_WPLT30>: Tidy up.
3699 (_bfd_sparc_elf_gc_mark_hook): Turn call to bfd_link_pic into call to
3700 !bfd_link_executable.
3701 (allocate_dynrelocs): Likewise.
3702 (_bfd_sparc_elf_relocate_section): Fix formatting and tidy up.
3703 <R_SPARC_TLS_GD_HI22>: Merge into...
3704 <R_SPARC_TLS_GD_LO10>: ...this. Adjust 4th argument in call to
3705 sparc_elf_tls_transition and remove redundant code.
3706 <R_SPARC_TLS_LDM_HI22>: Turn call to bfd_link_pic into call to
3707 !bfd_link_executable.
3708 <R_SPARC_TLS_LDO_HIX22>: Likewise.
3709 <R_SPARC_TLS_LE_HIX22>: Likewise. Tidy up.
3710 <R_SPARC_TLS_LDM_CALL>: Likewise.
3711 <R_SPARC_TLS_GD_CALL>: Likewise. Tidy up.
3712 <R_SPARC_TLS_GD_ADD>: Likewise.
3713 <R_SPARC_TLS_LDM_ADD>: Likewise.
3714 <R_SPARC_TLS_LDO_ADD>: Likewise.
3715 <R_SPARC_TLS_IE_LD>: Likewise.
3717 2018-02-06 Miloš Stojanović <milos.stojanovic@rt-rk.com>
3720 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): If the dwarf
3721 functions failed to find the function name, try the generic elf
3722 find function instead.
3724 2018-02-06 Sergio Durigan Junior <sergiodj@redhat.com>
3726 * coff-rs6000.c (xcoff_write_archive_contents_old): Use
3727 'memcpy' instead of 'strncpy' when writing the magic number.
3729 2018-02-06 Nick Clifton <nickc@redhat.com>
3732 * opncls.c (bfd_get_debug_link_info_1): Check the size of the
3733 section before attempting to read it in.
3734 (bfd_get_alt_debug_link_info): Likewise.
3736 2018-02-06 Paul Carroll <pcarroll@codesourcery.com>
3738 * bfd/dwarf2.c (find_abstract_name): Modified to return file and
3739 line information in addition to name, if they can be found.
3741 2018-02-05 Renlin Li <renlin.li@arm.com>
3744 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Relax the
3745 R_AARCH64_ABS32 and R_AARCH64_ABS16 for absolute symbol. Apply the
3746 check for writeable section as well.
3748 2018-02-05 H.J. Lu <hongjiu.lu@intel.com>
3751 * elf32-i386.c (elf_i386_check_relocs): Set got_referenced if
3752 _GLOBAL_OFFSET_TABLE_ is referenced or GOT is needed to resolve
3753 undefined weak symbol to 0.
3754 * elf64-x86-64.c (elf_x86_64_check_relocs): Set got_referenced
3755 if _GLOBAL_OFFSET_TABLE_ is referenced.
3756 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Check
3757 got_referenced instead of ref_regular_nonweak. Remove the
3758 unused _GLOBAL_OFFSET_TABLE_ from symbol table.
3759 * elfxx-x86.h (elf_x86_link_hash_table): Add got_referenced.
3761 2018-02-05 Maciej W. Rozycki <macro@mips.com>
3763 * elfnn-riscv.c (_bfd_riscv_relax_pc): Use `memset' to
3764 initialize `hi_reloc'.
3766 2018-02-05 Maciej W. Rozycki <macro@mips.com>
3768 * elfxx-mips.c (_bfd_mips_elf_section_processing): For
3769 SHT_MIPS_REGINFO sections don't assert the correct size and
3770 report an error instead.
3772 2018-02-05 Maciej W. Rozycki <macro@mips.com>
3774 * elf.c (_bfd_elf_write_object_contents): Propagate a failure
3775 status from `->elf_backend_section_processing'.
3777 2018-02-02 Jim Wilson <jimw@sifive.com>
3780 * elfnn-riscv.c (riscv_relax_delete_bytes): New parameter link_info.
3781 If link_info->wrap_hash, check for a duplicate symbol and ignore.
3782 (_bfd_riscv_relax_call, bfd_riscv_relax_lui, _bfd_riscv_relax_tls_le):
3783 Pass new argument to riscv_relax_delete_bytes.
3784 (_bfd_riscv_relax_align, _bfd_riscv_relax_delete): Likewise. Remove
3785 ATTRIBUTE_UNUSED from link_info parameter.
3787 2018-02-02 Alan Modra <amodra@gmail.com>
3789 * elf64-ppc.c (ppc64_elf_relocate_section): Don't relocate nops
3790 emitted for toc sequence optimization. Set and use "howto" later.
3792 2018-02-01 Simon Marchi <simon.marchi@ericsson.com>
3794 * elf64-ppc.c (ppc64_elf_archive_symbol_lookup): Avoid pointer
3795 arithmetic on NULL pointer.
3796 * elflink.c (_bfd_elf_archive_symbol_lookup,
3797 elf_link_add_archive_symbols): Likewise.
3799 2018-01-31 Michael Matz <matz@suse.de>
3801 * elflink.c (bfd_elf_define_start_stop): Fix check of
3804 2018-01-31 H.J. Lu <hongjiu.lu@intel.com>
3807 * elflink.c (bfd_elf_define_start_stop): Check if __start and
3808 __stop symbols are referenced by shared objects.
3810 2018-01-30 Alan Modra <amodra@gmail.com>
3813 * elf.c (_bfd_elf_map_sections_to_segments): Don't start a new
3814 segment when demand paged with lma on the same page. Test this
3815 before load/non-load, executable/non-executable,
3816 writable/non-writable tests and simplify. Delete bogus relro
3817 condition in writable/non-writable test. Delete outdated
3818 comment. Formatting.
3820 2018-01-30 Alan Modra <amodra@gmail.com>
3822 * elflink.c (bfd_elf_define_start_stop): Make __start and __stop
3825 2018-01-29 Alan Modra <amodra@gmail.com>
3828 * coffgen.c (coff_pointerize_aux): Ensure auxent tagndx is in
3829 range before converting to a symbol table pointer.
3831 2018-01-27 Nick Clifton <nickc@redhat.com>
3833 * po/ru.po: Updated Russian translation.
3835 2018-01-26 Alan Modra <amodra@gmail.com>
3837 * elflink.c (bfd_elf_define_start_stop): Override symbols when
3838 they are defined dynamically.
3840 2018-01-26 Alan Modra <amodra@gmail.com>
3842 * elf64-ppc.c (ppc64_elf_size_stubs): Iterate sizing when
3843 .branch_lt changes size.
3845 2018-01-25 Alan Modra <amodra@gmail.com>
3848 * elfcode.h (elf_object_p): Avoid integer overflow.
3850 2018-01-25 Eric Botcazou <ebotcazou@adacore.com>
3853 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
3854 Do a mere lookup of the __tls_get_addr symbol instead of adding it.
3857 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
3860 * elfxx-sparc.c (sparc_elf_tls_transition): Replace
3861 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
3862 bfd_link_executable for TLS check.
3863 (_bfd_sparc_elf_check_relocs): Likewise.
3864 (allocate_dynrelocs): Likewise.
3865 (_bfd_sparc_elf_relocate_section): Likewise.
3867 2018-01-24 Renlin Li <renlin.li@arm.com>
3869 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Add support for
3870 BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
3871 BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
3872 BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
3873 BFD_RELOC_AARCH64_MOVW_PREL_G3.
3874 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
3875 (_bfd_aarch64_elf_resolve_relocation): Likewise.
3877 2018-01-24 Renlin Li <renlin.li@arm.com>
3879 * reloc.c: Add BFD_RELOC_AARCH64_MOVW_PREL_G0,
3880 BFD_RELOC_AARCH64_MOVW_PREL_G0_NC, BFD_RELOC_AARCH64_MOVW_PREL_G1,
3881 BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, BFD_RELOC_AARCH64_MOVW_PREL_G2,
3882 BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, BFD_RELOC_AARCH64_MOVW_PREL_G3.
3883 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add entries for
3884 BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
3885 BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
3886 BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
3887 BFD_RELOC_AARCH64_MOVW_PREL_G3.
3888 * bfd-in2.h: Regenerate.
3889 * libbfd.h: Regenerate.
3891 2018-01-23 Maciej W. Rozycki <macro@mips.com>
3893 * elfxx-mips.c (_bfd_mips_elf_final_link): Update a stale
3894 `mips_elf32_section_processing' comment reference.
3896 2018-01-20 H.J. Lu <hongjiu.lu@intel.com>
3899 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Check the
3900 versioned __tls_get_addr symbol.
3902 2018-01-19 Nick Clifton <nickc@redhat.com>
3904 * po/fr.po: Updated French translation.
3906 2018-01-18 Alan Modra <amodra@gmail.com>
3908 * elf32-ppc.c (ppc_elf_create_glink): Correct alignment of .glink.
3909 * elf64-ppc.c (ppc64_elf_size_stubs): Handle negative plt_stub_align.
3910 (ppc64_elf_build_stubs): Likewise.
3912 2018-01-17 Nick Clifton <nickc@redhat.com>
3914 * po/ru.po: Updated Russian translation.
3915 * po/uk/po: Updated Ukranian translation.
3917 2018-01-17 Alan Modra <amodra@gmail.com>
3919 * elf64-ppc.c (ppc64_elf_build_stubs): Silence gcc warning.
3921 2018-01-17 Alan Modra <amodra@gmail.com>
3923 * elf32-ppc.c (GLINK_ENTRY_SIZE): Handle speculation barrier.
3924 (CRSETEQ, BEQCTRM): Define.
3925 (is_nonpic_glink_stub): Don't check bctr.
3926 (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
3927 (ppc_elf_relax_section): Size speculation barrier.
3928 (output_bctr): New function.
3929 (write_glink_stub): Use output_bctr.
3930 (ppc_elf_relocate_section): Use output_bctr for long branch stub.
3931 (ppc_elf_finish_dynamic_symbol): Likewise.
3932 (ppc_elf_finish_dynamic_sections): Use output_bctr.
3933 * elf32-ppc.h (struct ppc_elf_params): Add speculate_indirect_jumps.
3934 * elf64-ppc.c (CRSETEQ, BEQCTRM, BEQCTRLM): Define.
3935 (GLINK_PLTRESOLVE_SIZE): Size speculation barrier.
3936 (size_global_entry_stubs): Handle speculation barrier sizing.
3937 (plt_stub_size): Likewise.
3938 (output_bctr): New function.
3939 (build_plt_stub, build_tls_get_addr_stub): Output speculation
3941 (ppc_build_one_stub): Likewise for ppc_stub_plt_branch.
3942 (ppc_size_one_stub): Size speculation barrier in ppc_stub_plt_branch.
3943 (build_global_entry_stubs): Output speculation barrier.
3944 (ppc64_elf_build_stubs): Likewise in __glink_PLTresolve stub.
3945 * elf64-ppc.h (struct ppc64_elf_params): Add speculate_indirect_jumps.
3947 2018-01-17 Alan Modra <amodra@gmail.com>
3949 * elf32-ppc.c (GLINK_ENTRY_SIZE): Add parameters, handle
3950 __tls_get_addr_opt, and alignment sizing.
3951 (TLS_GET_ADDR_GLINK_SIZE): Delete.
3952 (is_nonpic_glink_stub): Don't use GLINK_ENTRY_SIZE.
3953 (ppc_elf_get_synthetic_symtab): Recognize stubs spaced at 4, 6,
3955 (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
3956 (allocate_dynrelocs): Use new GLINK_ENTRY_SIZE.
3957 (ppc_elf_size_dynamic_sections): Likewise. Size branch table
3959 (write_glink_stub): Handle __tls_get_addr_opt stub.
3960 Pad out to size given by GLINK_ENTRY_SIZE.
3961 (ppc_elf_relocate_section): Adjust write_glink_stub call.
3962 (ppc_elf_finish_dynamic_symbol): Likewise.
3963 (ppc_elf_finish_dynamic_sections): Write PLTresolve without using
3964 insn array since so many need rewriting.
3965 * elf32-ppc.h (struct ppc_elf_params): Add plt_stub_align.
3966 * elf64-ppc.c (GLINK_PLTRESOLVE_SIZE): Rename from
3967 GLINK_CALL_STUB_SIZE. Add htab param and evaluate to size without
3968 nops. Adjust all uses.
3969 (ppc64_elf_get_synthetic_symtab): Don't use GLINK_CALL_STUB_SIZE
3970 in glink_vma calculation.
3971 (struct ppc_link_hash_table): Add global_entry section pointer.
3972 (create_linkage_sections): Create separate section for global
3974 (PPC_LO, PPC_HI, PPC_HA): Move earlier.
3975 (size_global_entry_stubs): Handle sizing for aligned stubs.
3976 (ppc64_elf_size_dynamic_sections): Handle global_entry alloc,
3977 and don't stash end of glink branch table in rawsize.
3978 (ppc_build_one_stub): Rewrite stub size calculations.
3979 (build_global_entry_stubs): Use new section.
3980 (ppc64_elf_build_stubs): Don't pad __glink_PLTresolve with nops.
3981 Build lazy link stubs out to end of section. Build global entry
3982 stubs in new section.
3984 2018-01-15 Nick Clifton <nickc@redhat.com>
3986 * po/uk.po: Updated Ukranian translation.
3988 2018-01-13 Nick Clifton <nickc@redhat.com>
3990 * po/bfd.pot: Regenerated.
3992 2018-01-13 Nick Clifton <nickc@redhat.com>
3994 * version.m4: Bump version to 2.30.51
3995 * configure: Regenerate.
3997 2018-01-13 Nick Clifton <nickc@redhat.com>
3999 2.30 branch created.
4001 2018-01-12 Jens Widell <jl@opera.com>
4003 * elf.c (setup_group): Optimize search for group by remembering
4004 last found group and restarting search at that index.
4005 * elf-bfd.h (struct elf_obj_tdata): Add group_search_offset field.
4007 2018-01-12 Gunther Nikl <gnikl@users.sourceforge.net>
4009 * aoutx.h (aout_link_check_ar_symbols): Remove default and handle
4010 bfd_link_common_skip_none in switch.
4012 2018-01-12 Alan Modra <amodra@gmail.com>
4015 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Ignore dynamic
4016 references on forced local symbols.
4018 2018-01-12 Vlad Ivanov <vlad@ivanov.email>
4020 * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
4021 .reginfo section has wrong size.
4023 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
4026 * elf.c (_bfd_elf_map_sections_to_segments): When generating
4027 separate code and read-only data LOAD segments, create a new
4028 LOAD segment if the previous section contains text and the
4029 current section doesn't or vice versa. Don't put a writable
4030 section in a read-only segment if there is a RELRO segment.
4032 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
4035 * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Ignore dynamic
4036 references on forced local symbols.
4038 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
4041 * elflink.c (bfd_elf_gc_sections): Keep all PREINIT_ARRAY,
4042 INIT_ARRAY as well as FINI_ARRAY sections for ld -r --gc-section.
4044 2018-01-09 Kuan-Lin Chen <kuanlinchentw@gmail.com>
4047 * elf32-nds32.c (nds32_elf_relax_loadstore): Fix a typographical error.
4049 2018-01-03 John Baldwin <jhb@FreeBSD.org>
4051 * elf.c (elfcore_grok_freebsd_note): Handle
4052 NT_FREEBSD_PROCSTAT_PROC, NT_FREEBSD_PROCSTAT_FILES, and
4053 NT_FREEBSD_PROCSTAT_VMMAP.
4055 2018-01-03 Alan Modra <amodra@gmail.com>
4057 Update year range in copyright notice of all files.
4059 For older changes see ChangeLog-2017
4061 Copyright (C) 2018 Free Software Foundation, Inc.
4063 Copying and distribution of this file, with or without modification,
4064 are permitted in any medium without royalty provided the copyright
4065 notice and this notice are preserved.
4071 version-control: never