1 2018-08-31 Alan Modra <amodra@gmail.com>
3 * elf64-ppc.c (num_relocs_for_offset): New function.
4 (emit_relocs_for_offset): New function.
5 (use_global_in_relocs): New function, split out from..
6 (ppc_build_one_stub): ..here. Output relocations for notoc stubs.
7 (ppc_size_one_stub): Calculate reloc count for notoc stubs.
8 (ppc64_elf_size_stubs): Don't count undefined syms in stub_globals.
10 2018-08-31 Alan Modra <amodra@gmail.com>
12 * reloc.c (BFD_RELOC_PPC64_REL16_HIGH, BFD_RELOC_PPC64_REL16_HIGHA),
13 (BFD_RELOC_PPC64_REL16_HIGHER, BFD_RELOC_PPC64_REL16_HIGHERA),
14 (BFD_RELOC_PPC64_REL16_HIGHEST, BFD_RELOC_PPC64_REL16_HIGHESTA):
16 * elf64-ppc.c (ppc64_elf_howto_raw): Add new REL16 howtos.
17 (ppc64_elf_reloc_type_lookup): Translate new REL16 relocs.
18 (ppc64_elf_check_relocs, ppc64_elf_relocate_section): Handle them.
19 * bfd-in2.h: Regenerate.
20 * libbfd.h: Regenerate.
22 2018-08-31 Alan Modra <amodra@gmail.com>
24 * elf64-ppc.c: Correct _notoc stub comments.
25 (ppc_build_one_stub): Simplify output of branch for notoc
26 long branch stub. Don't include label offset of 8 bytes in
27 "off" calculation for notoc plt stub. Don't emit insns to get pc.
28 (build_offset): Emit insns to get pc here instead.
29 (size_offset): Add 4 extra insns.
30 (plt_stub_size): Adjust for "off" and size_offset changes.
31 (ppc_size_one_stub): Rearrange code into a switch, duplicating
32 some to better match ppc_build_one_stub.
34 2018-08-29 Chenghua Xu <paul.hua.gm@gmail.com>
36 * archures.c (bfd_architecture): New machine
38 * bfd-in2.h (bfd_architecture): Likewise.
39 * cpu-mips.c (enum I_xxx): Likewise.
40 (arch_info_struct): Likewise.
41 * elfxx-mips.c (_bfd_elf_mips_mach): Handle
43 (mips_set_isa_flags): Likewise.
44 (mips_mach_extensions): Map bfd_mach_mips_gs264e to
45 bfd_mach_mips_gs464e extension.
47 2018-08-29 Chenghua Xu <paul.hua.gm@gmail.com>
49 * archures.c (bfd_architecture): New machine
51 * bfd-in2.h (bfd_architecture): Likewise.
52 * cpu-mips.c (enum I_xxx): Likewise.
53 (arch_info_struct): Likewise.
54 * elfxx-mips.c (_bfd_elf_mips_mach): Handle
56 (mips_set_isa_flags): Likewise.
57 (mips_mach_extensions): Map bfd_mach_mips_gs464e to
58 bfd_mach_mips_gs464 extension.
60 2018-08-29 Chenghua Xu <paul.hua.gm@gmail.com>
62 * archures.c (bfd_architecture): Rename
63 bfd_mach_mips_loongson_3a to bfd_mach_mips_gs464.
64 * bfd-in2.h (bfd_architecture): Likewise.
65 * cpu-mips.c (enum I_xxx): Likewise.
66 (arch_info_struct): Likewise.
67 * elfxx-mips.c (_bfd_elf_mips_mach): Likewise.
68 (mips_set_isa_flags): Likewise.
69 (mips_mach_extensions): Likewise.
70 (bfd_mips_isa_ext_mach): Likewise.
71 (bfd_mips_isa_ext): Likewise.
72 (print_mips_isa_ext): Delete AFL_EXT_LOONGSON_3A.
74 2018-08-29 Chenghua Xu <paul.hua.gm@gmail.com>
76 * elfxx-mips.c (print_mips_ases): Add Loongson EXT2 extension.
78 2018-08-29 Chenghua Xu <paul.hua.gm@gmail.com>
80 * elfxx-mips.c (infer_mips_abiflags): Use ases instead of
81 isa_ext for infer ABI flags.
82 (print_mips_ases): Add Loongson EXT extension.
84 2018-08-29 Chenghua Xu <paul.hua.gm@gmail.com>
86 * elfxx-mips.c (print_mips_ases): Add CAM extension.
88 2018-08-27 H.J. Lu <hongjiu.lu@intel.com>
90 * elfxx-x86.c (_bfd_x86_elf_parse_gnu_properties): Don't mask
91 out the GNU_PROPERTY_X86_UINT32_VALID bit.
93 2018-08-25 H.J. Lu <hongjiu.lu@intel.com>
96 * elf.c (_bfd_elf_get_symbol_version_string): Return
97 _("<corrupt>") for corrupt symbol version info.
99 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
101 * elfxx-x86.c (_bfd_x86_elf_parse_gnu_properties): Handle
102 X86_COMPAT_ISA_1_USED, X86_COMPAT_ISA_1_NEEDED,
103 X86_UINT32_AND_LO, X86_UINT32_AND_HI, X86_UINT32_OR_LO,
104 X86_UINT32_OR_HI, X86_UINT32_OR_AND_LO and X86_UINT32_OR_AND_HI
105 instead of X86_ISA_1_USED, X86_ISA_1_NEEDED and X86_FEATURE_1_AND.
106 (_bfd_x86_elf_merge_gnu_properties): Likewise.
107 (_bfd_x86_elf_link_setup_gnu_properties): Add X86_FEATURE_2_NEEDED
108 instead of X86_ISA_1_NEEDED.
109 (_bfd_x86_elf_link_fixup_gnu_properties): Handle
110 X86_COMPAT_ISA_1_USED, X86_COMPAT_ISA_1_NEEDED, X86_UINT32_AND_LO,
111 X86_UINT32_AND_HI, X86_UINT32_OR_LO, X86_UINT32_OR_HI,
112 X86_UINT32_OR_AND_LO and X86_UINT32_OR_AND_HI instead of
113 X86_ISA_1_USED, X86_ISA_1_NEEDED and X86_FEATURE_1_AND.
115 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
117 * elfxx-x86.c (_bfd_x86_elf_parse_gnu_properties): Mask out the
118 GNU_PROPERTY_X86_UINT32_VALID bit.
119 (_bfd_x86_elf_link_fixup_gnu_properties): Set the
120 GNU_PROPERTY_X86_UINT32_VALID bit for non-relocatable output.
122 2018-08-23 Zenith423 <zenith432@users.sourceforge.net>
125 * plugin.c (struct plugin_list_entry): New structure.
126 (plugin_list): New variable.
127 (try_load_plugin): Place opened plugins on a list. Ensure that
128 the refcount in the dynamic loader is kept at 1.
130 2018-08-23 Alan Modra <amodra@gmail.com>
132 * elf64-ppc.c (ppc64_elf_relocate_section): Revise "call lacks
135 2018-08-23 Nick Clifton <nickc@redhat.com>
137 * elf64-hppa.c (elf_hppa_final_link_relocate): Replace unworkable
138 code with an assertion.
140 2018-08-23 Nick Clifton <nickc@redhat.com>
143 * coffgen.c (coff_pointerize_aux): Add table_end parameter. Use
144 it to prevent walking off the end of the table.
145 (coff_get_normalized_symtab): Pass internal_end pointer to
148 2018-08-23 Alan Modra <amodra@gmail.com>
150 * elf64-ppc.c (ppc64_elf_relocate_section): Don't miss clearing
151 unresolved_reloc on ppc_stub_plt_call_notoc.
153 2018-08-22 H.J. Lu <hongjiu.lu@intel.com>
156 * development.sh (experimental): New.
158 2018-08-22 Helge Deller <deller@gmx.de>
159 Nick Clifton <nickc@redhat.com>
161 * elf-hppa.h (elf_hppa_fake_sections): Use SHT_PARISC_UNWIND as
162 the section type of the .PARISC.unwind section on 64-bit binaries
163 and SHT_PROGBITS for 32-bit binaries. Add a comment about it.
164 Add comment about the sh_entsize value.
166 2018-08-22 Rafeal Auler <rafaelauler@gmail.com>
169 * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Always update the
170 stub's target, since it may have been changed after the layout.
172 2018-08-21 John Darington <john@darrington.wattle.id.au>
174 * elf32-s12z.c (opru18_reloc): New function.
175 (elf_s12z_howto_table): Adjust Howto according to new knowledge.
177 2018-08-21 mephi42 <mephi42@gmail.com>
180 * mach-o.c (bfd_mach_o_mangle_symbols): Update n_type even if
181 data is already considered filled.
183 2018-08-21 Alan Modra <amodra@gmail.com>
185 * elf64-ppc.c (HOW): Define.
187 (ppc64_elf_howto_raw): Use HOW to initialize entries.
188 * elf32-ppc.c (HOW): Define.
189 (ppc_elf_howto_raw): Use HOW to initialize entries, updating
190 R_PPC_VLE_REL15 and R_PPC_VLE_REL24 to use bitpos=0.
192 2018-08-21 Alan Modra <amodra@gmail.com>
194 * reloc.c (reloc_howto_type): Typedef.
195 (bfd_symbol): Delete forward declaration.
196 (struct reloc_howto_struct): Add "negate" field. Make "size",
197 "bitsize", "rightshift", "bitpos", "complain_on_overflow",
198 "pc_relative", "partial_inplace", and "pcrel_offset" bitfields.
199 Rearrange for better packing. Revise comments.
200 (HOWTO): Map to rearranged reloc_howto_struct.
201 (bfd_get_reloc_size): Delete now unused cases.
202 (read_reloc, write_reloc): Likewise.
203 (apply_reloc, _bfd_relocate_contents): Test howto->negate
204 rather than howto->size < 0 for negated relocation values.
205 * coff-rs6000.c (xcoff_complain_overflow_bitfield_func): Avoid
206 signed/unsigned warning.
207 (xcoff_ppc_relocate_section): Delete "condition is always false"
209 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Likewise.
210 * cpu-ns32k.c (do_ns32k_reloc): Adjust to suit reloc_howto_struct
212 * vms-alpha.c (_bfd_vms_write_etir, alpha_vms_slurp_relocs): Use
213 size 16 for ALPHA_R_LINKAGE.
214 (alpha_howto_table <ALPHA_R_LINKAGE>): Set encoded size and
216 * bfd-in.h (reloc_howto_type): Delete.
217 * bfd-in2.h: Regenerate.
219 2018-08-21 Alan Modra <amodra@gmail.com>
221 * reloc.c (HOWTO): Revise comment.
222 (NEWHOWTO, HOWTO_PREPARE): Delete.
223 * coff-arm.c (coff_arm_reloc_type_lookup): Replace const struc
224 reloc_howto_struct with reloc_howto_type.
225 * ns32knetbsd.c (MY_bfd_reloc_type_lookup): Likewise.
226 * vms-alpha.c (alpha_vms_bfd_reloc_type_lookup): Likewise.
227 * elf-hppa.h (HOW): Define.
228 (elf_hppa_howto_table): Use it to simplify this table, correcting
229 name of R_PARISC_LTOFF16WF, R_PARISC_LTOFF_FPTR64, and
230 R_PARISC_LTOFF_FPTR16DF.
231 * elf32-mep.c (MEPREL): Use HOWTO.
232 * bfd-in2.h: Regenerate.
234 2018-08-20 Alan Modra <amodra@gmail.com>
236 * mmo.c (valid_mmo_symbol_character_set): Initialize and make
238 (mmo_init): Don't init valid_mmo_symbol_character_set.
240 2018-08-20 Alan Modra <amodra@gmail.com>
242 * rs6000-core.c (CORE_COMMONSZ): Balance parentheses in expression.
244 2018-08-17 H.J. Lu <hongjiu.lu@intel.com>
247 * elf-bfd.h (elf_backend_data): Add fixup_gnu_properties.
248 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Call
249 backend fixup_gnu_properties if it isn't NULL. Discard
250 .note.gnu.property section if all properties have been removed.
251 * elfxx-target.h (elf_backend_fixup_gnu_properties): New.
252 (elfNN_bed): Initialize fixup_gnu_properties.
253 * elfxx-x86.c (_bfd_x86_elf_link_fixup_gnu_properties): New
255 * elfxx-x86.h (_bfd_x86_elf_link_fixup_gnu_properties): New
257 (elf_backend_fixup_gnu_properties): New.
259 2018-08-16 Alan Modra <amodra@gmail.com>
261 * elf64-ppc.c: Correct ppc_stub_long_branch_notoc example.
264 2018-08-12 H.J. Lu <hongjiu.lu@intel.com>
267 * Makefile.am (BFD32_LIBS): Add elf-properties.lo.
268 (BFD32_LIBS_CFILES): Add elf-properties.c.
269 (BFD32_BACKENDS): Remove elf-properties.lo.
270 (BFD32_BACKENDS_CFILES): Remove elf-properties.c.
271 * configure.ac (elf): Remove elf-properties.lo.
272 * Makefile.in: Regenerated.
273 * configure: Likewise.
275 2018-08-11 H.J. Lu <hongjiu.lu@intel.com>
278 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Don't
279 add X86_ISA_1_NEEDED property only if existing properties won't
282 2018-08-11 Alan Modra <amodra@gmail.com>
284 * reloc.c (bfd_get_reloc_size): Sort switch.
285 (read_reloc, write_reloc, apply_reloc): New functions.
286 (bfd_perform_relocation, bfd_install_relocation): Use apply_reloc.
287 (_bfd_relocate_contents): Use read_reloc and write_reloc.
288 (_bfd_clear_contents): Likewise.
290 2018-08-11 John Darrington <john@darrington.wattle.id.au>
292 * reloc.c (_bfd_relocate_contents): Handle 3 byte relocs.
293 (_bfd_clear_contents): Likewise.
294 (bfd_perform_relocation): Likewise.
295 (bfd_install_relocation): Likewise.
297 2018-08-10 H.J. Lu <hongjiu.lu@intel.com>
300 * elflink.c (bfd_elf_record_link_assignment): Always clear
301 h->verinfo.verdef when overriding a dynamic definition.
303 2018-08-10 H.J. Lu <hongjiu.lu@intel.com>
306 * elf-properties.c (elf_get_gnu_property_section_size): Always
307 use align_size as pr_datasz for GNU_PROPERTY_STACK_SIZE.
308 (elf_write_gnu_properties): Likewise.
310 2018-08-08 H.J. Lu <hongjiu.lu@intel.com>
313 * bfd.c (bfd_convert_section_size): Check BFD_DECOMPRESS after
314 calling _bfd_elf_convert_gnu_property_size to convert
315 .note.gnu.property section size.
316 (bfd_convert_section_contents): Check BFD_DECOMPRESS after
317 calling _bfd_elf_convert_gnu_properties to convert
318 .note.gnu.property section.
319 * elf-bfd.h (_bfd_elf_convert_gnu_property_size): New prototype.
320 (_bfd_elf_convert_gnu_properties): Likewise.
321 * elf-properties.c (elf_get_gnu_property_section_size): New
323 (elf_write_gnu_properties): Likewise.
324 (_bfd_elf_convert_gnu_property_size): Likewise.
325 (_bfd_elf_convert_gnu_properties): Likewise.
326 (_bfd_elf_link_setup_gnu_properties): Use
327 elf_get_gnu_property_section_size and elf_write_gnu_properties.
329 2018-08-08 H.J. Lu <hongjiu.lu@intel.com>
332 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Remove
333 GNU_PROPERTY_X86_ISA_1_USED if an input file doesn't have it.
334 (_bfd_x86_elf_link_setup_gnu_properties): Adding the
335 GNU_PROPERTY_X86_ISA_1_NEEDED, instead of
336 GNU_PROPERTY_X86_ISA_1_USED, property.
338 2018-08-07 Alan Modra <amodra@gmail.com>
340 * elf64-ppc.c (struct map_stub): Delete tls_get_addr_opt_bctrl.
341 Add lr_restore, eh_size and eh_base.
342 (eh_advance, eh_advance_size): New functions.
343 (build_tls_get_addr_stub): Emit EH info for stub.
344 (ppc_build_one_stub): Likewise for _notoc stubs.
345 (ppc_size_one_stub): Size EH info for stub.
346 (group_sections): Init new map_stub fields.
347 (stub_eh_frame_size): Delete.
348 (ppc64_elf_size_stubs): Size EH info for stubs. Set up dummy EH
350 (ppc64_elf_build_stubs): Reinit new map_stub fields. Set FDE
351 offset to stub section here..
352 (ppc64_elf_finish_dynamic_sections): ..rather than here.
354 2018-08-07 Alan Modra <amodra@gmail.com>
356 * elf64-ppc.c (ppc64_elf_relocate_section): Don't skip first
357 instruction of __tls_get_addr_opt stub.
358 (plt_stub_size): Omit ALWAYS_EMIT_R2SAVE condition when
359 dealing with __tls_get_addr_opt stub.
360 (build_tls_get_addr_stub, ppc_size_one_stub): Likewise.
362 2018-08-06 Claudiu Zissulescu <claziss@synopsys.com>
364 * elf32-arc.c (arc_elf_merge_private_bfd_data): Complain about
365 efalgs only when in/out exists.
366 (elf32_arc_section_from_shdr): Don't complain about 0x0c
367 section type. It is mwdt compiler specific.
369 2018-08-06 Claudiu Zissulescu <claziss@synopsys.com>
371 * elf32-arc.c (arc_elf_merge_attributes): Fix merge attributes.
373 2018-08-06 Claudiu Zissulescu <claziss@synopsys.com>
375 * elf32-arc.c (arc_elf_merge_attributes): Handle
378 2018-08-05 Alan Modra <amodra@gmail.com>
380 * elf64-ppc.c (ADDI_R12_R11, ADDI_R12_R12, LIS_R12),
381 (ADDIS_R12_R11, ORIS_R12_R12_0, ORI_R12_R12_0),
382 (SLDI_R12_R12_32, LDX_R12_R11_R12, ADD_R12_R11_R12): Define.
383 (ppc64_elf_howto_raw): Add R_PPC64_REL24_NOTOC entry.
384 (ppc64_elf_reloc_type_lookup): Support R_PPC64_REL24_NOTOC.
385 (ppc_stub_type): Add ppc_stub_long_branch_notoc,
386 ppc_stub_long_branch_both, ppc_stub_plt_branch_notoc,
387 ppc_stub_plt_branch_both, ppc_stub_plt_call_notoc, and
388 ppc_stub_plt_call_both.
389 (is_branch_reloc): Add R_PPC64_REL24_NOTOC.
390 (build_offset, size_offset): New functions.
391 (plt_stub_size): Support plt_call_notoc and plt_call_both.
392 (ppc_build_one_stub, ppc_size_one_stub): Support new stubs.
393 (toc_adjusting_stub_needed): Handle R_PPC64_REL24_NOTOC.
394 (ppc64_elf_size_stubs): Likewise, and new stubs.
395 (ppc64_elf_build_stubs, ppc64_elf_relocate_section): Likewise.
396 * reloc.c: Add BFD_RELOC_PPC64_REL24_NOTOC.
397 * bfd-in2.h: Regenerate.
398 * libbfd.h: Regenerate.
400 2018-08-05 Alan Modra <amodra@gmail.com>
402 * elf64-ppc.c (ppc_build_one_stub): Lose "_r2off" in stub symbols.
404 2018-08-02 Jim Wilson <jimw@sifive.com>
406 * elfnn-riscv.c (riscv_elf_create_dynamic_sections): For .tdata.dyn,
407 add SEC_LINKER_CREATED flag.
409 2018-08-01 Nick Clifton <nickc@redhat.com>
411 * coff-rs6000.c (_bfd_xcoff_put_ldsymbol_name): Suppress warnings
412 about potentially truncated strncpy operations.
413 (_bfd_xcoff_put_symbol_name): Likewise.
415 * elf32-avr.c (avr_stub_name): Check for a NULL return from
418 2018-08-01 Zenith <zenith432@users.sourceforge.net>
421 * plugin.c (bfd_plugin_open_input): Close file descriptor if the
423 (try_claim): Always close the file descriptor at the end of the
425 (try_load_plugin): If a plugin has already been registered, then
426 skip the dlopen and onload steps and go straight to claiming the
427 file. If these is an error, close the plugin.
429 2018-08-01 Alan Modra <amodra@gmail.com>
431 * elf64-ppc.c (plt_stub_pad): Delay plt_stub_size call until needed.
432 (ppc_build_one_stub): Don't set stub_offset, instead assert that
433 it is sane. Don't adjust stub_offset for alignment. Adjust size
434 calculation. Use "targ" temp when calculating offsets.
435 (ppc_size_one_stub): Set stub_offset here. Use "targ" temp when
436 calculating offsets. Adjust for alignment before setting
437 tls_get_addr_opt_bctrl.
439 2018-08-01 Alan Modra <amodra@gmail.com>
441 * po/SRC-POTFILES.in: Regenerate.
443 2018-07-30 Nick Clifton <nickc@redhat.com>
446 * elf32-sh.c (sh_elf_relocate_section): When processing
447 translation relocs, fail if the relocation offset is too small.
448 Replace BFD_ASSERTs with more helpful error messages.
450 2018-07-30 Andrew Jenner <andrew@codesourcery.com>
452 * Makefile.am (ALL_MACHINES, ALL_MACHINES_CFILES): Add C-SKY.
453 (BFD32_BACKENDS, BFD_BACKENDS_CFILES): Likewise.
454 * Makefile.in: Regenerated.
455 * archures.c (enum bfd_architecture): Add bfd_arch_csky and
456 related bfd_mach defines.
457 (bfd_csky_arch): Declare.
458 (bfd_archures_list): Add C-SKY.
459 * bfd-in.h (elf32_csky_build_stubs): Declare.
460 (elf32_csky_size_stubs): Declare.
461 (elf32_csky_next_input_section: Declare.
462 (elf32_csky_setup_section_lists): Declare.
463 * bfd-in2.h: Regenerated.
464 * config.bfd: Add C-SKY.
465 * configure.ac: Likewise.
466 * configure: Regenerated.
467 * cpu-csky.c: New file.
468 * elf-bfd.h (enum elf_target_id): Add C-SKY.
469 * elf32-csky.c: New file.
470 * libbfd.h: Regenerated.
471 * reloc.c: Add C-SKY relocations.
472 * targets.c (csky_elf32_be_vec, csky_elf32_le_vec): Declare.
473 (_bfd_target_vector): Add C-SKY target vector entries.
475 2018-07-27 John Darrington <john@darrington.wattle.id.au>
477 * elf32-s12z.c (ELF_TARGET_ID): Don't define.
479 2018-07-27 John Darrington <john@darrington.wattle.id.au>
481 * libbfd.c (bfd_getb24, bfd_getl24): New functions.
482 (bfd_get_24, bfd_put_24): New macros.
483 * bfd-in2.h: Regenerate.
485 2018-07-27 John Darrington <john@darrington.wattle.id.au>
487 * elf32-s12z.c (s12z_elf_set_mach_from_flags): Remove comment.
489 2018-07-26 Alan Modra <amodra@gmail.com>
491 * elf64-ppc.c (ppc64_elf_size_stubs): Use a ppc_stub_long_branch_r2off
492 for calls to symbols with STO_PPC64_LOCAL_MASK bits set to 1.
494 2018-07-25 Alan Modra <amodra@gmail.com>
496 * elf32-ppc.c (ppc_elf_relax_section): Ignore common or undef locals.
497 Avoid trashing toff with added when used as a symbol index.
498 Ignore R_PPC_PLTREL24 addends in unused example code. Avoid
499 creating unnecessary fixups when relocatable.
501 2018-07-25 Alan Modra <amodra@gmail.com>
503 * elf32-arm.c (elf32_arm_nabi_write_core_note): Disable
504 -Wstringop-truncation warning for gcc-8.0 too.
505 * elf32-ppc.c (ppc_elf_write_core_note): Likewise.
506 * elf64-ppc.c (ppc64_elf_write_core_note): Likewise.
507 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise.
508 * elf32-s390.c (elf_s390_write_core_note): Comment fix.
509 * elf64-s390.c (elf_s390_write_core_note): Likewise.
511 2018-07-24 Alan Modra <amodra@gmail.com>
514 * dwarf2.c (dwarf_debug_section_enum): Fix comment typo.
515 * elf.c (bfd_section_from_shdr, elf_sort_sections): Likewise.
517 2018-07-23 Max Filippov <jcmvbkbc@gmail.com>
519 * elf32-xtensa.c (elf_xtensa_finish_dynamic_sections): Move
520 relocation sections consistency check to always check both
521 .rela.dyn and .rela.plt when they exist. Rearrange variable
522 definition and assignment places.
524 2018-07-23 Max Filippov <jcmvbkbc@gmail.com>
526 * elf32-xtensa.c (shrink_dynamic_reloc_sections): Shrink dynamic
527 relocations section for dynamic undefined weak symbols when
528 linking a shared object.
530 2018-07-23 Tom Tromey <tom@tromey.com>
532 * elf.c (bfd_get_elf_phdrs): Don't call memcpy with size 0.
534 2018-07-21 Eric Botcazou <ebotcazou@adacore.com>
536 * elf32-arm.c (elf32_arm_final_link_relocate) <R_ARM_GOT32>: Small
537 cleanup for the case of a global symbol that binds locally. Also
538 install a value in the GOT slot in the case of a local symbol in
541 2018-07-20 H.J. Lu <hongjiu.lu@intel.com>
544 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): If the
545 separate code program header is needed, make sure that the first
546 read-only PT_LOAD segment has no code by adding a
547 GNU_PROPERTY_X86_ISA_1_USED note.
549 2018-07-20 Chenghua Xu <paul.hua.gm@gmail.com>
550 Maciej W. Rozycki <macro@mips.com>
552 * elfxx-mips.c (print_mips_ases): Add MMI extension.
554 2018-07-20 Maciej W. Rozycki <macro@mips.com>
556 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Do not
557 create DT_REL, DT_RELSZ or DT_RELENT dynamic entries if the
558 dynamic relocation section will be discarded from output.
559 (_bfd_mips_elf_finish_dynamic_sections) <DT_RELSZ>: Assert that
560 the dynamic relocation section will be retained in output.
562 2018-07-18 Maciej W. Rozycki <macro@mips.com>
564 * xcofflink.c (xcoff_write_global_symbol): Fix symbol type
565 checks for defined weak symbols.
567 2018-07-17 Maciej W. Rozycki <macro@mips.com>
569 * elf32-nds32.c (nds32_elf_relax_loadstore): Use
570 `bfd_is_abs_symbol' rather than `bfd_is_abs_section' in checking
571 whether the symbol is absolute.
572 (nds32_elf_relax_lo12): Likewise.
573 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
574 (elfNN_aarch64_check_relocs): Likewise.
575 * xcofflink.c (xcoff_need_ldrel_p): Likewise.
576 (bfd_xcoff_import_symbol): Likewise.
577 (xcoff_write_global_symbol): Likewise.
579 2018-07-17 Maciej W. Rozycki <macro@mips.com>
581 * linker.c (bfd_is_abs_symbol): New macro.
582 * bfd-in2.h: Regenerate.
584 2018-07-16 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
586 * elf-bfd.h (elfcore_write_ppc_tar): Add prototype.
587 (elfcore_write_ppc_ppr): Likewise.
588 (elfcore_write_ppc_dscr): Likewise.
589 (elfcore_write_ppc_ebb): Likewise.
590 (elfcore_write_ppc_pmu): Likewise.
591 (elfcore_write_ppc_tm_cgpr): Likewise.
592 (elfcore_write_ppc_tm_cfpr): Likewise.
593 (elfcore_write_ppc_tm_cvmx): Likewise.
594 (elfcore_write_ppc_tm_cvsx): Likewise.
595 (elfcore_write_ppc_tm_spr): Likewise.
596 (elfcore_write_ppc_tm_ctar): Likewise.
597 (elfcore_write_ppc_tm_cppr): Likewise.
598 (elfcore_write_ppc_tm_cdscr): Likewise.
599 * elf.c (elfcore_write_ppc_tar): New function.
600 (elfcore_write_ppc_ppr): Likewise.
601 (elfcore_write_ppc_dscr): Likewise.
602 (elfcore_write_ppc_ebb): Likewise.
603 (elfcore_write_ppc_pmu): Likewise.
604 (elfcore_write_ppc_tm_cgpr): Likewise.
605 (elfcore_write_ppc_tm_cfpr): Likewise.
606 (elfcore_write_ppc_tm_cvmx): Likewise.
607 (elfcore_write_ppc_tm_cvsx): Likewise.
608 (elfcore_write_ppc_tm_spr): Likewise.
609 (elfcore_write_ppc_tm_ctar): Likewise.
610 (elfcore_write_ppc_tm_cppr): Likewise.
611 (elfcore_write_ppc_tm_cdscr): Likewise.
612 (elfcore_write_register_note): Call them.
613 (elfcore_grok_ppc_tar): New function.
614 (elfcore_grok_ppc_ppr): Likewise.
615 (elfcore_grok_ppc_dscr): Likewise.
616 (elfcore_grok_ppc_ebb): Likewise.
617 (elfcore_grok_ppc_pmu): Likewise.
618 (elfcore_grok_ppc_tm_cgpr): Likewise.
619 (elfcore_grok_ppc_tm_cfpr): Likewise.
620 (elfcore_grok_ppc_tm_cvmx): Likewise.
621 (elfcore_grok_ppc_tm_cvsx): Likewise.
622 (elfcore_grok_ppc_tm_spr): Likewise.
623 (elfcore_grok_ppc_tm_ctar): Likewise.
624 (elfcore_grok_ppc_tm_cppr): Likewise.
625 (elfcore_grok_ppc_tm_cdscr): Likewise.
626 (elfcore_grok_note): Call them.
628 2018-07-11 Maciej W. Rozycki <macro@mips.com>
630 * elfxx-mips.c (mips_tls_got_relocs): Use `bfd_link_dll' rather
631 than `!bfd_link_pic' in determining the dynamic symbol index.
632 Avoid the index of -1.
633 (mips_elf_initialize_tls_slots): Likewise. Flatten code by
634 moving `dyn' to the beginning of the function block.
636 2018-07-11 Maciej W. Rozycki <macro@mips.com>
637 Rich Felker <bugdal@aerifal.cx>
640 * elfxx-mips.c (mips_tls_got_relocs): Use `bfd_link_dll' rather
641 than `bfd_link_pic' to determine whether dynamic relocations are
643 (mips_elf_initialize_tls_slots): Likewise.
645 2018-07-10 Maciej W. Rozycki <macro@mips.com>
647 * elflink.c (bfd_elf_final_link): Rename `remove' local variable
650 2018-07-10 Alan Modra <amodra@gmail.com>
652 * elf32-xgate.h: Delete.
653 * elf32-xgate.c: Delete unnecessary forward declarations, add two
655 (xgate_elf_bfd_link_hash_table_create)
656 (xgate_elf_bfd_link_hash_table_free)
657 (xgate_elf_set_mach_from_flags, struct xgate_scan_param)
658 (stub_hash_newfunc, elf32_xgate_add_symbol_hook)
659 (elf32_xgate_setup_section_lists, elf32_xgate_size_stubs)
660 (elf32_xgate_build_stubs, elf32_xgate_check_relocs)
661 (elf32_xgate_relocate_section, _bfd_xgate_elf_set_private_flags)
662 (elf32_xgate_post_process_headers): Delete.
663 (elf32_xgate_backend_symbol_processing): New function.
664 (xgate_elf_ignore_reloc, xgate_elf_special_reloc)
665 (_bfd_xgate_elf_print_private_bfd_data): Make static.
666 (ELF_TARGET_ID, elf_info_to_howto, elf_backend_check_relocs)
667 (elf_backend_relocate_section, elf_backend_object_p)
668 (elf_backend_final_write_processing, elf_backend_can_gc_sections)
669 (elf_backend_post_process_headers, elf_backend_add_symbol_hook)
670 (bfd_elf32_bfd_link_hash_table_create)
671 (bfd_elf32_bfd_set_private_flags)
672 (xgate_stub_hash_lookup): Don't define.
673 (elf_backend_symbol_processing): Define.
674 * elf-bfd.h (elf_target_id): Delete XGATE_ELF_DATA.
676 2018-07-09 Maciej W. Rozycki <macro@mips.com>
678 * elfxx-mips.c (_bfd_mips_elf_adjust_dynamic_symbol): Don't set
679 `->needs_lazy_stub' if the stubs output section is the absolute
682 2018-07-09 H.J. Lu <hongjiu.lu@intel.com>
685 * configure.ac: Use changequote for "i[3-7]86-*-linux-*".
686 * configure: Regenerated.
688 2018-07-09 Alan Modra <amodra@gmail.com>
690 * elf32-m68hc1x.c (elf32_m68hc11_post_process_headers): Call
691 _bfd_elf_post_process_headers.
693 2018-07-06 Max Filippov <jcmvbkbc@gmail.com>
695 * elf32-xtensa.c (elf_xtensa_allocate_dynrelocs): Don't allocate
696 space for dynamic relocation for undefined weak symbol.
697 (elf_xtensa_relocate_section): Don't emit R_XTENSA_RELATIVE
698 relocation for undefined weak symbols.
699 (shrink_dynamic_reloc_sections): Don't shrink dynamic relocation
700 section for relocations against undefined weak symbols.
702 2018-07-06 Alan Hayward <alan.hayward@arm.com>
704 * elf.c (elfcore_grok_aarch_sve): New function.
705 (elfcore_grok_note): Check for Aarch64 SVE.
706 (elfcore_write_aarch_sve): New function.
707 (elfcore_write_register_note): Check for Aarch64 SVE.
708 * elf-bfd.h(elfcore_grok_aarch_sve): New declaration.
710 2018-07-06 Alan Modra <amodra@gmail.com>
712 * elf32-arm.c (elf32_arm_nabi_write_core_note): Don't use
713 DIAGNOTIC_PUSH and DIAGNOSTIC_POP unconditionally.
714 * elf32-ppc.c (ppc_elf_write_core_note): Likewise.
715 * elf32-s390.c (elf_s390_write_core_note): Likewise.
716 * elf64-ppc.c (ppc64_elf_write_core_note): Likewise.
717 * elf64-s390.c (elf_s390_write_core_note): Likewise.
718 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise.
720 2018-07-05 Jim Wilson <jimw@sifive.com>
722 * config.bfd (riscv32*-*-*): Renamed from riscv32-*-*.
723 (riscv64*-*-*): Likewise.
724 (riscv-*-*): Add as an alias for riscv32*-*-*.
726 2018-07-05 H.J. Lu <hongjiu.lu@intel.com>
729 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Remove x86
730 ISA properties with empty bits.
732 2018-07-05 Nick Clifton <nickc@redhat.com>
734 * po/ru.po: Updated Russian translation.
736 2018-07-05 Alan Modra <amodra@gmail.com>
738 * elf-bfd.h (_bfd_elf_ppc_merge_fp_attributes): Update prototype.
739 * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Return error
740 on mismatch. Remove "warning: " from messages. Track last bfd
742 (ppc_elf_merge_obj_attributes): Likewise. Handle status from
743 _bfd_elf_ppc_merge_fp_attributes.
744 * elf64-ppc.c (ppc64_elf_merge_private_bfd_data): Handle status
745 from _bfd_elf_ppc_merge_fp_attributes.
747 2018-07-04 H.J. Lu <hongjiu.lu@intel.com>
749 * Makefile.am (bfdinclude_HEADERS): Add $(INCDIR)/diagnostics.h.
750 * Makefile.in: Regenerated.
752 2018-07-03 Alan Modra <amodra@gmail.com>
754 * elflink.c (bfd_elf_final_link): Remove zero size .gnu.attributes
757 2018-07-03 Alan Modra <amodra@gmail.com>
759 * elf-bfd.h (ATTR_TYPE_FLAG_ERROR, ATTR_TYPE_HAS_ERROR): Define.
760 * elf-attrs.c (is_default_attr): Handle ATTR_TYPE_HAS_ERROR.
761 * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Use
762 ATTR_TYPE_FLAG_INT_VAL. Set ATTR_TYPE_HAS_ERROR on finding
763 incompatible attribute.
764 (ppc_elf_merge_obj_attributes): Likewise. Return
765 _bfd_elf_merge_object_attributes result.
766 * elf64-ppc.c (ppc64_elf_merge_private_bfd_data): Return
767 _bfd_elf_merge_object_attributes result.
769 2018-07-03 Alan Modra <amodra@gmail.com>
772 * elflink.c (_bfd_elf_fix_symbol_flags): Hide dynamic symbols
773 in discarded sections.
775 2018-07-02 Maciej W. Rozycki <macro@mips.com>
777 * elfxx-mips.c (_bfd_mips_elf_create_dynamic_sections): Set
778 `mark' for symbols created from `mips_elf_dynsym_rtproc_names'
781 2018-07-02 Maciej W. Rozycki <macro@mips.com>
783 * elf64-mips.c (micromips_elf64_howto_table_rel): Add
784 R_MICROMIPS_HI0_LO16, R_MICROMIPS_TLS_GD, R_MICROMIPS_TLS_LDM,
785 R_MICROMIPS_TLS_DTPREL_HI16, R_MICROMIPS_TLS_DTPREL_LO16,
786 R_MICROMIPS_TLS_GOTTPREL, R_MICROMIPS_TLS_TPREL_HI16,
787 R_MICROMIPS_TLS_TPREL_LO16, R_MICROMIPS_GPREL7_S2 and
788 R_MICROMIPS_PC23_S2 relocation entries.
789 (micromips_elf64_howto_table_rela): Likewise.
790 (micromips_reloc_map): Likewise.
791 * elfn32-mips.c (elf_micromips_howto_table_rel): Likewise.
792 (elf_micromips_howto_table_rela): Likewise.
793 (micromips_reloc_map): Likewise.
795 2018-07-02 H.J. Lu <hongjiu.lu@intel.com>
798 * elf64-x86-64.c (elf_x86_64_relocate_section): Clear the
799 R_X86_64_converted_reloc_bit bit.
801 2018-07-02 Jeff Muizelaar <jrmuizel@gmail.com>
802 Tom Tromey <tom@tromey.com>
806 * mach-o.c (bfd_mach_o_fat_close_and_cleanup): New function.
807 (bfd_mach_o_close_and_cleanup): Redefine.
808 * archive.c (_bfd_unlink_from_archive_parent): New function,
810 (_bfd_archive_close_and_cleanup): ..here.
811 (bfd_generic_archive_p): Do not clear archive's format.
812 * libbfd-in.h (_bfd_unlink_from_archive_parent): Declare.
813 * libbfd.h: Regenerate.
815 2018-07-02 Thomas Preud'homme <thomas.preudhomme@arm.com>
817 * archures.c (bfd_mach_arm_5TEJ, bfd_mach_arm_6, bfd_mach_arm_6KZ,
818 bfd_mach_arm_6T2, bfd_mach_arm_6K, bfd_mach_arm_7, bfd_mach_arm_6M,
819 bfd_mach_arm_6SM, bfd_mach_arm_7EM, bfd_mach_arm_8, bfd_mach_arm_8R,
820 bfd_mach_arm_8M_BASE, bfd_mach_arm_8M_MAIN): Define.
821 * bfd-in2.h: Regenerate.
822 * cpu-arm.c (arch_info_struct): Add entries for above new
824 * elf32-arm.c (bfd_arm_get_mach_from_attributes): Add Tag_CPU_arch to
825 bfd_mach_arm mapping logic for pre Armv4 and Armv5TEJ and later
826 architectures. Force assert failure for any new Tag_CPU_arch value.
828 2018-07-02 Thomas Preud'homme <thomas.preudhomme@arm.com>
830 * doc/bfdint.texi: Use command-line consistently when used in a
832 * doc/bfdsumm.texi: Likewise.
834 2018-06-29 Maciej W. Rozycki <macro@mips.com>
836 * elfxx-mips.c (allocate_dynrelocs): Remove extraneous symbol
837 visibility check made for undefined weak symbols.
839 2018-06-26 Nick Clifton <nickc@redhat.com>
841 * po/uk.po: Updated Ukranian translation.
843 2018-06-25 Nick Clifton <nickc@redhat.com>
845 * elfnn-aarch64.c (_bfd_aarch64_erratum_835769_stub_name): Check
846 for malloc returning NULL.
847 (_bfd_aarch64_erratum_843419_fixup): Check for
848 _bfd_aarch64_erratum_835769_stub_name returning NULL.
850 2018-06-24 Nick Clifton <nickc@redhat.com>
852 * po/bfd.pot: Regenerate.
854 2018-06-24 Nick Clifton <nickc@redhat.com>
856 * version.m4: Update version string to 2.31.51.
857 * configure: Regenerate.
859 2018-06-24 Nick Clifton <nickc@redhat.com>
863 2018-06-21 Maciej W. Rozycki <macro@mips.com>
865 * elfxx-mips.c (_bfd_mips_elf_compact_eh_encoding)
866 (_bfd_mips_elf_cant_unwind_opcode): Correct formatting.
868 2018-06-21 Maciej W. Rozycki <macro@mips.com>
870 * elfxx-mips.c (_bfd_mips_post_process_headers): Keep
871 EI_ABIVERSION setting together.
873 2018-06-21 Maciej W. Rozycki <macro@mips.com>
875 * elfxx-mips.c (MIPS_LIBC_ABI_DEFAULT, MIPS_LIBC_ABI_MIPS_PLT)
876 (MIPS_LIBC_ABI_UNIQUE, MIPS_LIBC_ABI_MIPS_O32_FP64)
877 (MIPS_LIBC_ABI_MAX): New enumeration constants.
878 (_bfd_mips_post_process_headers): Use them in place of magic
881 2018-06-21 Jim Wilson <jimw@sifive.com>
883 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Update comment.
884 Use SYMBOL_REFERENCES_LOCAL. Add asserts for h->got.offset.
886 2018-06-21 Alan Modra <amodra@gmail.com>
888 * doc/Makefile.am (AUTOMAKE_OPTIONS): Add "foreign".
889 * doc/Makefile.in: Regenerate.
891 2018-06-20 Renlin Li <renlin.li@arm.com>
893 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Use PG_OFFSET
894 to resolve BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC,
895 BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC,
896 BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC,
897 BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC,
898 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
899 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
900 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
901 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
903 2018-06-20 Nick Clifton <nickc@redhat.com>
906 * opncls.c (get_build_id): Check for a negative or excessive data
907 size in the build-id note.
909 2018-06-20 Nick Clifton <nickc@redhat.com>
912 * mach-o.c (cputype): New function.
913 (cpusubtype): New function.
914 (bfd_mach_o_bfd_print_private_data): New function. Dispalys the
915 values in the MACH-O file header.
916 (bfd_mach_o_bfd_copy_private_header_data): Copy the cputype and
917 cpusubtype fields from the input bfd's mach-o header to the output
919 * mach-o-target.c (bfd_mach_o_bfd_print_private_bfd_data):
920 Redefine to bfd_mach_o_bfd_print_private_data.
921 * mach-o.h (bfd_mach_o_bfd_print_private_bfd_data): Prototype.
923 2018-06-19 Maciej W. Rozycki <macro@mips.com>
926 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Verify the
927 `.got.plt' entry referred is in range.
928 (mips_finish_exec_plt): Correct the range check for `.got.plt'
929 start. Replace the assertion used for that with a proper error
932 2018-06-19 Maciej W. Rozycki <macro@mips.com>
934 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Fix
937 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
939 * Makefile.am (AUTOMAKE_OPTIONS): Remove 1.11.
940 (INCLUDES): Rename to ...
941 (AM_CPPFLAGS): ... this.
942 * configure.ac: Remove AC_PREREQ.
943 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove 1.9, cygnus, add
944 info-in-builddir no-texinfo.tex.
945 (info_TEXINFOS): Rename bfd.texinfo to bfd.texi.
946 * doc/bfd.texinfo: Rename to ...
947 * doc/bfd.texi: ... this.
948 * Makefile.in: Re-generate.
949 * aclocal.m4: Re-generate.
950 * config.in: Re-generate.
951 * configure: Re-generate.
952 * doc/Makefile.in: Re-generate.
954 2018-06-18 Mephi <mephi42@gmail.com>
957 * mach-o-x86-64.c (x86_64_howto_table): Add entry for
958 BFD_RELOC_MACH_O_X86_64_RELOC_TLV.
959 (bfd_mach_o_x86_64_canonicalize_one_reloc): Handle the new reloc.
960 (bfd_mach_o_x86_64_swap_reloc_out): Likewise.
961 * reloc.c (BFD_RELOC_MACH_O_X86_64_TV): New entry.
962 * bfd-in2.h: Regenerate.
963 * libbfd.h: Regenerate.
965 2018-06-14 Faraz Shahbazker <Faraz.Shahbazker@mips.com>
967 * elfxx-mips.c (print_mips_ases): Add GINV extension.
969 2018-06-14 H.J. Lu <hongjiu.lu@intel.com>
972 * elf.c (_bfd_elf_get_symbol_version_string): Check if the first
973 symbol version is base version.
975 2018-06-14 Alan Modra <amodra@gmail.com>
977 * elf-bfd.h (struct elf_link_hash_table): Add "dynamic_relocs".
978 * elflink.c (_bfd_elf_init_2_index_sections): Comment fix.
979 (_bfd_elf_add_dynamic_entry): Set "dynamic_relocs".
980 (_bfd_elf_link_renumber_dynsyms): Exclude all section symbols when
981 "dynamic_relocs" is not set.
982 * elfxx-mips.c (count_section_dynsyms): Likewise.
984 2018-06-14 Alan Modra <amodra@gmail.com>
987 * bfdio.c (bfd_seek): Optimize away seeks to current position.
989 2018-06-13 Scott Egerton <scott.egerton@imgtec.com>
990 Faraz Shahbazker <Faraz.Shahbazker@mips.com>
992 * elfxx-mips.c (print_mips_ases): Add CRC.
994 2018-06-08 H.J. Lu <hongjiu.lu@intel.com>
997 * elfxx-x86.c (elf_x86_hide_linker_defined): New function.
998 (_bfd_x86_elf_link_check_relocs): Use it to hide hidden
999 __bss_start, _end and _edata in shared libraries.
1001 2018-06-07 Alan Modra <amodra@gmail.com>
1003 * elf32-tic6x.c (elf32_tic6x_check_relocs): Reference
1004 __c6xabi_DSBT_BASE explicitly for R_C6000_SBR_* relocs.
1006 2018-06-05 Alan Modra <amodra@gmail.com>
1008 * bfd.c (struct bfd): Update comment on "where" usage.
1009 * bfdio.c (bfd_bwrite, bfd_stat): Use and update "iovec",
1010 "iostream", and "where" from containing archive file. Return
1011 error on NULL iovec.
1012 (bfd_bread): Similarly, and return error attempted out of
1013 bounds archive element access.
1014 (bfd_tell, bfd_flush): Use and update "iovec", "iostream", and
1015 "where" from containing archive file.
1016 (bfd_seek): Likewise. Return error on NULL iovec. Don't
1017 attempt to optimize away seeks. Don't paper over errors by
1019 (bfd_get_mtime): Call bfd_stat rather than iovec->bstat.
1020 (bfd_get_size): Likewise.
1021 (bfd_mmap): Operate on and use iovec of containing archive
1022 file. Return error on NULL iovec.
1023 * cache.c (bfd_cache_lookup_worker): Abort if working on
1024 archive element bfd.
1025 (cache_bread_1): Delete bfd parameter, add FILE* parameter.
1026 Don't ignore zero byte reads.
1027 (cache_bread): Look up FILE* in cache here. Error on NULL
1029 (cache_bwrite): Rename "where" to "from".
1030 (cache_bmmap): Don't handle archive elements.
1031 * coffcode.h (coff_slurp_line_table): Exit early on zero
1033 * bfd-in2.h: Regenerate.
1035 2018-06-05 Alan Modra <amodra@gmail.com>
1038 * plugin.c (bfd_plugin_open_input): Allow for possibility of
1039 nested archives. Open file again for plugin.
1040 (try_claim): Don't save and restore file position. Close file
1042 * sysdep.h (O_BINARY): Define.
1044 2018-06-04 Max Filippov <jcmvbkbc@gmail.com>
1046 * elf32-xtensa.c (xtensa_read_table_entries): Make global.
1047 (compute_fill_extra_space): Drop declaration. Rename function to
1048 xtensa_compute_fill_extra_space.
1049 (compute_ebb_actions, remove_dead_literal): Update references to
1050 compute_fill_extra_space.
1052 2018-06-04 Volodymyr Arbatov <arbatov@cadence.com>
1054 * elf32-xtensa.c (elf32xtensa_separate_props): New global
1056 (xtensa_add_names): New function.
1057 (xtensa_property_section_name): Add new parameter
1058 separate_sections, use it to choose property section name.
1059 (xtensa_get_separate_property_section): New function.
1060 (xtensa_get_property_section): Invoke
1061 xtensa_get_separate_property_section to get individual property
1062 section if it exists, common property section otherwise.
1063 (xtensa_make_property_section): Pass elf32xtensa_separate_props
1064 to xtensa_property_section_name.
1066 2018-06-04 H.J. Lu <hongjiu.lu@intel.com>
1069 * bfd-in.h: Include "diagnostics.h".
1070 * bfd-in2.h: Regenerated.
1071 * elf32-arm.c (elf32_arm_nabi_write_core_note): Use
1072 DIAGNOSTIC_PUSH, DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION and
1073 DIAGNOSTIC_POP to silence GCC 8.1 warnings with
1074 -Wstringop-truncation.
1075 * elf32-ppc.c (ppc_elf_write_core_note): Likewse.
1076 * elf32-s390.c (elf_s390_write_core_note): Likewse.
1077 * elf64-ppc.c (ppc64_elf_write_core_note): Likewse.
1078 * elf64-s390.c (elf_s390_write_core_note): Likewse.
1079 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewse.
1081 2018-06-03 Jim Wilson <jimw@sifive.com>
1084 * elfnn-riscv.c (riscv_elf_relocate_section) <R_RISCV_CALL>: Check
1085 for and handle an undefined weak with no PLT.
1088 * elfnn-riscv.c (riscv_relax_delete_bytes): Add versioned_hidden check
1089 to code that ignores duplicate symbols.
1091 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
1093 * version.m4: Bump version to 2.30.52
1094 * configure: Regenerated.
1096 2018-06-01 Alan Modra <amodra@gmail.com>
1098 * bfd.c (_bfd_error_handler): Arrange for this function to be
1099 declared in bfd-in2.h.
1100 * libbfd-in.h (_bfd_error_handler): Don't declare.
1101 * libbfd.h: Regenerate.
1102 * bfd-in2.h: Regenerate.
1104 2018-05-30 Amaan Cheval <amaan.cheval@gmail.com>
1106 * config.bfd (x86_64-*-*): Add pei-x86-64 target to x86_64-*-rtems*
1107 This is needed to generate UEFI application image files from ELFs.
1109 2018-05-28 H.J. Lu <hongjiu.lu@intel.com>
1111 * elf32-i386.c (elf_i386_lazy_plt): Add plt_tlsdesc_entry,
1112 plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset,
1113 plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and
1114 plt_tlsdesc_got2_insn_end for TLSDESC entry.
1115 (elf_i386_lazy_ibt_plt): Likewise.
1116 (elf_i386_nacl_plt): Likewise.
1117 * elf64-x86-64.c (tlsdesc_plt_entry): Moved and renamed to ...
1118 (elf_x86_64_tlsdesc_plt_entry): This.
1119 (elf_x86_64_lazy_plt): Add plt_tlsdesc_entry,
1120 plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset,
1121 plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and
1122 plt_tlsdesc_got2_insn_end for TLSDESC entry.
1123 (elf_x86_64_lazy_bnd_plt): Likewise.
1124 (elf_x86_64_lazy_ibt_plt): Likewise.
1125 (elf_x32_lazy_ibt_plt): Likewise.
1126 (elf_x86_64_nacl_plt): Likewise.
1127 (elf_x86_64_finish_dynamic_sections): Use plt_tlsdesc_entry,
1128 plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset,
1129 plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and
1130 plt_tlsdesc_got2_insn_end to update TLSDESC entry.
1131 * elfxx-x86.h (elf_x86_lazy_plt_layout): Update comments.
1132 Add plt_tlsdesc_entry, plt_tlsdesc_entry_size,
1133 plt_tlsdesc_got1_offset, plt_tlsdesc_got2_offset,
1134 plt_tlsdesc_got1_insn_end and plt_tlsdesc_got2_insn_end.
1135 (elf_x86_non_lazy_plt_layout): Update comments.
1136 (elf_x86_plt_layout): Likewise.
1138 2018-05-28 H.J. Lu <hongjiu.lu@intel.com>
1141 * elf-s390-common.c (elf_s390_add_symbol_hook): Removed.
1142 * elf32-arc.c (elf_arc_add_symbol_hook): Likewise.
1143 (elf_backend_add_symbol_hook): Likewise.
1144 * elf32-m68k.c (elf_m68k_add_symbol_hook): Likewise.
1145 (elf_backend_add_symbol_hook): Likewise.
1146 * elf32-s390.c (elf_backend_add_symbol_hook): Likewise.
1147 * elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise.
1148 (elf_backend_add_symbol_hook): Likewise.
1149 * elf64-s390.c (elf_backend_add_symbol_hook): Likewise.
1150 * elfxx-aarch64.c (_bfd_aarch64_elf_add_symbol_hook): Likewise.
1151 * elfxx-aarch64.h (_bfd_aarch64_elf_add_symbol_hook): Likewise.
1152 (elf_backend_add_symbol_hook): Likewise.
1153 * elf32-arm.c (elf32_arm_add_symbol_hook): Remove STT_GNU_IFUNC
1155 * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
1156 * elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise.
1157 * elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise.
1158 * elflink.c (elf_link_add_object_symbols): Set
1159 elf_gnu_symbol_ifunc for STT_GNU_IFUNC symbols.
1161 2018-05-26 H.J. Lu <hongjiu.lu@intel.com>
1164 * elf-bfd.h (_bfd_elf_link_hide_sym_by_version): New.
1165 * elflink.c (_bfd_elf_link_hide_versioned_symbol): New function.
1166 Extracted from _bfd_elf_link_assign_sym_version.
1167 (_bfd_elf_link_hide_sym_by_version): New function.
1168 (_bfd_elf_link_assign_sym_version): Use
1169 _bfd_elf_link_hide_versioned_symbol.
1170 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Call
1171 _bfd_elf_link_hide_sym_by_version instead of
1172 bfd_hide_sym_by_version. Don't check unversioned symbol.
1174 2018-05-25 Alan Modra <amodra@gmail.com>
1176 * Makefile.in: Regenerate.
1177 * po/SRC-POTFILES.in: Regenerate.
1179 2018-05-25 Alan Modra <amodra@gmail.com>
1181 * configure.ac (bfd_cv_hidden): Run test with -Werror in CFLAGS.
1182 * configure: Regenerate.
1184 2018-05-23 H.J. Lu <hongjiu.lu@intel.com>
1186 * elf64-ppc.c (ppc64_elf_write_core_note): Add ATTRIBUTE_NONSTRING
1189 2018-05-22 Alan Modra <amodra@gmail.com>
1192 * elf32-hppa.c (hppa_get_stub_entry): Return NULL when link_sec
1194 (elf32_hppa_size_stubs): Only create stubs for load, alloc, code
1196 (final_link_relocate): Revert last change.
1198 2018-05-22 Alan Modra <amodra@gmail.com>
1201 * elf32-hppa.c (final_link_relocate): Don't look for plt call
1202 stubs in non-alloc sections.
1204 2018-05-21 H.J. Lu <hongjiu.lu@intel.com>
1207 * aout-target.h (MY_bfd_link_hide_symbol): New.
1208 * aout-tic30.c (MY_bfd_link_hide_symbol): Likewise.
1209 * binary.c (binary_bfd_link_hide_symbol): Likewise.
1210 * coff-alpha.c (_bfd_ecoff_bfd_link_hide_symbol): Likewise.
1211 * coff-mips.c (_bfd_ecoff_bfd_link_hide_symbol): Likewise.
1212 * coff-rs6000.c (_bfd_xcoff_bfd_link_hide_symbol): Likewise.
1213 * coffcode.h (coff_bfd_link_hide_symbol): Likewise.
1214 * elf-bfd.h (_bfd_elf_link_hide_symbol): Likewise.
1215 * elfxx-target.h (bfd_elfNN_bfd_link_hide_symbol): Likewise.
1216 * i386msdos.c (msdos_bfd_link_hide_symbol): Likewise.
1217 * ihex.c (ihex_bfd_link_hide_symbol): Likewise.
1218 * libbfd-in.h (_bfd_nolink_bfd_link_hide_symbol): Likewise.
1219 * linker.c (_bfd_generic_link_hide_symbol): Likewise.
1220 (bfd_link_hide_symbol): Likewise.
1221 * mach-o-target.c (bfd_mach_o_bfd_link_hide_symbol): Likewise.
1222 * mmo.c (mmo_bfd_link_hide_symbol): Likewise.
1223 * pef.c (bfd_pef_bfd_link_hide_symbol): Likewise.
1224 * plugin.c (bfd_plugin_bfd_link_hide_symbol): Likewise.
1225 * ppcboot.c (ppcboot_bfd_link_hide_symbol): Likewise.
1226 * som.c (som_bfd_link_hide_symbol): Likewise.
1227 * srec.c (srec_bfd_link_hide_symbol): Likewise.
1228 * tekhex.c (tekhex_bfd_link_hide_symbol): Likewise.
1229 * vms-alpha.c (vms_bfd_link_hide_symbol): Likewise.
1230 (alpha_vms_bfd_link_hide_symbol): Likewise.
1231 * xsym.c (bfd_sym_bfd_link_hide_symbol): Likewise.
1232 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
1233 _bfd_generic_link_hide_symbol.
1234 (rs6000_xcoff64_aix_vec): Likewise.
1235 * elflink.c (bfd_elf_record_link_assignment): Don't make forced
1236 local symbol dynamic.
1237 (_bfd_elf_link_hide_symbol): New function.
1238 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
1239 check root.ldscript_def.
1240 * targets.c (bfd_target): Add _bfd_link_hide_symbol.
1241 (BFD_JUMP_TABLE_LINK): Add NAME##_bfd_link_hide_symbol.
1242 * bfd-in2.h: Regenerated.
1243 * libbfd.h: Likewise.
1245 2018-05-21 H.J. Lu <hongjiu.lu@intel.com>
1248 * elf.c (setup_group): Mark section in a section group with
1251 2018-05-18 H.J. Lu <hongjiu.lu@intel.com>
1254 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
1255 set eh->local_ref to 1 if a symbol is versioned and there is a
1258 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
1260 * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Handle
1263 2018-05-18 Jim Wilson <jimw@sifive.com>
1265 * elfnn-riscv.c (allocate_dynrelocs): Discard dynamic relocations if
1266 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1267 (riscv_elf_relocate_section): Don't generate dynamic relocation if
1268 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1269 (riscv_elf_finish_dynamic_symbol): Likewise.
1271 2018-05-18 John Darrington <john@darrington.wattle.id.au>
1273 * Makefile.am: Add s12z files.
1274 * Makefile.in: Regenerate.
1275 * archures.c: Add bfd_s12z_arch.
1276 * bfd-in.h: Add exports of bfd_putb24 and bfd_putl24.
1277 * bfd-in2.h: Regenerate.
1278 * config.bfd: Add s12z target.
1279 * configure.ac: Add s12z target.
1280 * configure: Regenerate.
1281 * cpu-s12z.c: New file.
1282 * elf32-s12z.c: New file.
1283 * libbfd.c (bfd_putb24): New function.
1284 (bfd_putl24): New function.
1285 * libbfd.h: Regenerate.
1286 * reloc.c: Add s12z relocations.
1287 (bfd_get_reloc_size): Handle size 5 relocs.
1288 * targets.c: Add s12z_elf32_vec.
1290 2018-05-18 H.J. Lu <hongjiu.lu@intel.com>
1293 * elf32-i386.c (elf_i386_relocate_section): Handle R_386_GOT32X
1295 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
1296 set eh->local_ref to 1 for linker defined symbols.
1298 2018-05-18 Alan Modra <amodra@gmail.com>
1301 * elf.c (setup_group): Formatting. Check that SHT_GROUP entries
1302 don't point at other SHT_GROUP sections. Set shdr corresponding
1303 to invalid entry, to NULL rather than section 0. Identify
1304 SHT_GROUP section index when reporting an error. Cope with NULL
1307 2018-05-18 Alan Modra <amodra@gmail.com>
1309 * libbfd-in.h (ATTRIBUTE_HIDDEN): Define and use throughout.
1310 * configure.ac (HAVE_HIDDEN): Check compiler support for hidden
1312 * libbfd.h: Regenerate.
1313 * configure: Regenerate.
1314 * config.in: Regenerate.
1316 2018-05-18 Alan Modra <amodra@gmail.com>
1318 * libbfd-in.h: Add include guard.
1319 * libcoff-in.h: Likewise.
1320 * doc/Makefile.am (libbfd.h, libcoff.h): Append another #endif.
1321 * doc/Makefile.in: Regenerate.
1322 * libbfd.h: Regenerate.
1323 * libcoff.h: Regenerate.
1325 2018-05-16 Maciej W. Rozycki <macro@mips.com>
1327 * elf32-nds32.c (nds32_convert_32_to_16): Preset `insn_type'.
1329 2018-05-16 Alan Modra <amodra@gmail.com>
1332 * format.c (struct bfd_preserve): Add section_id.
1333 (bfd_preserve_save, bfd_preserve_restore): Save and restore
1335 (bfd_reinit): Set _bfd_section_id.
1336 (bfd_check_format_matches): Put all matches of any priority into
1337 matching_vector. Save initial section id and start each attempted
1338 match at that section id.
1339 * libbfd-in.h (_bfd_section_id): Declare.
1340 * section.c (_bfd_section_id): Rename from section_id and make
1341 global. Adjust uses.
1342 (bfd_get_next_section_id): Delete.
1343 * elf64-ppc.c (ppc64_elf_setup_section_lists): Replace use of
1344 bfd_get_section_id with _bfd_section_id.
1345 * libbfd.h: Regenerate.
1346 * bfd-in2.h: Regenerate.
1348 2018-05-15 Christophe Guillon <christophe.guillon@st.com>
1350 * coffcode.h (coff_bigobj_swap_aux_in): Make sure that all fields
1351 of the aux structure are initialised.
1353 2018-05-15 Francois H. Theron <francois.theron@netronome.com>
1355 * targets.c: Wrap nfp_elf64_vec in BFD64 ifdef.
1357 2018-05-15 Nick Clifton <nickc@redhat.com>
1359 * po/pt.po: New Portuguese translation.
1360 * configure.ac (ALL_LINGUAS): Add pt.
1361 * configure: Regenerate.
1363 2018-05-14 H.J. Lu <hongjiu.lu@intel.com>
1366 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Don't issue
1367 an error on IFUNC pointer defined in PDE.
1368 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Call
1369 _bfd_x86_elf_link_fixup_ifunc_symbol.
1370 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
1371 * elfxx-x86.c (_bfd_x86_elf_link_fixup_ifunc_symbol): New
1373 * elfxx-x86.h (_bfd_x86_elf_link_fixup_ifunc_symbol): New.
1375 2018-05-14 H.J. Lu <hongjiu.lu@intel.com>
1378 * elfxx-x86.c (elf_x86_linker_defined): New function.
1379 (_bfd_x86_elf_link_check_relocs): Use it to mark __bss_start,
1380 _end and _edata locally defined within executables.
1382 2018-05-12 Alan Modra <amodra@gmail.com>
1385 * elf.c (rewrite_elf_program_header): Use segment_mark only for
1386 PT_LOAD headers. Delete first_matching_lma and first_suggested_lma.
1387 Instead make matching_lma and suggested_lma pointers to the
1388 sections. Align section vma and lma calculated from segment.
1389 Don't clear includes_phdrs or includes_filehdr based on p_paddr
1390 test. Try to handle alignment padding before first section by
1391 adjusting new segment lma down. Adjust PT_PHDR map p_paddr.
1393 2018-05-09 Dimitar Dimitrov <dimitar@dinux.eu>
1395 * elf32-pru.c (pru_elf32_do_ldi32_relocate): Make LDI32 relocation
1396 conformant to TI ABI.
1397 (pru_elf32_relax_section): Likewise.
1398 (pru_elf_relax_delete_bytes): Fix offsets for new LDI32 code.
1399 * elf32-pru.c (pru_elf32_do_ldi32_relocate): Ignore addend.
1400 (pru_elf32_pmem_relocate): Trap - should not get here.
1401 (pru_elf32_relocate_section): Add support for REL relocations.
1402 (elf_info_to_howto_rel): Enable REL.
1403 (elf_backend_may_use_rel_p): Likewise.
1404 (elf_backend_may_use_rela_p): Likewise.
1405 (elf_backend_default_use_rela_p): Likewise.
1407 2018-05-09 Alan Modra <amodra@gmail.com>
1410 * peXXigen.c (pe_print_edata): Correct minimum size.
1412 2018-05-09 Alan Modra <amodra@gmail.com>
1415 * peXXigen.c (pe_print_idata): Bound check hint_addr.
1417 2018-05-08 Nick Clifton <nickc@redhat.com>
1420 * elf.c (bfd_elf_get_str_section): Check for an excessively large
1422 * elf-attrs.c (_bfd_elf_parse_attributes): Issue an error if the
1423 attribute section is larger than the size of the file.
1425 2018-05-07 Alan Modra <amodra@gmail.com>
1427 * cofflink.c (_bfd_coff_link_input_bfd): Use memcmp rather than
1428 strncmp when checking for ".bf" special symbol.
1429 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Make pe_required_section_flags
1430 section name a char array, remove sentinal known_sections entry,
1431 and adjust loop over known_sections to suit. Use memcmp rather
1434 2018-05-04 Alan Modra <amodra@gmail.com>
1436 * elf-linux-core.h (struct elf_external_linux_prpsinfo32_ugid32),
1437 (struct elf_external_linux_prpsinfo32_ugid16),
1438 (struct elf_external_linux_prpsinfo64_ugid32),
1439 (struct elf_external_linux_prpsinfo64_ugid16): Add ATTRIBUTE_NONSTRING
1440 to pr_fname and pr_psargs fields. Remove GCC diagnostic pragmas.
1442 * elf.c (elfcore_write_prpsinfo): ..here. Indent nested preprocessor
1444 * elf32-arm.c (elf32_arm_nabi_write_core_note): Add ATTRIBUTE_NONSTRING
1446 * elf32-ppc.c (ppc_elf_write_core_note): Likewise.
1447 * elf32-s390.c (elf_s390_write_core_note): Likewise.
1448 * elf64-s390.c (elf_s390_write_core_note): Likewise.
1449 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise.
1450 * elf64-x86-64.c (elf_x86_64_write_core_note): Add GCC diagnostic
1452 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Use strnlen to avoid
1453 false positive gcc-8 warning.
1454 * cofflink.c (_bfd_coff_link_input_bfd): Likewise.
1456 2018-05-04 Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
1458 * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Fix the order
1459 of arguments when warning about different long double types.
1461 2018-05-03 Simon Atanasyan <simon@atanasyan.com>
1463 * elf32-mips.c: (elf32_mips_fixup_symbol): New function.
1464 (elf_backend_fixup_symbol): New macro.
1465 * elfxx-mips.c: (mips_elf_output_extsym): Discard _gp_disp
1467 (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
1469 2018-04-30 Francois H. Theron <francois.theron@netronome.com>
1471 * Makefile.am: Added NFP files to build.
1472 * archures.c: Added bfd_arch_nfp
1473 * config.bfd: Added NFP support.
1474 * configure.ac: Added NFP support.
1475 * cpu-nfp.c: New, for NFP support.
1476 * elf-bfd.h: Added elf_section_info()
1477 * elf64-nfp.c: New, for NFP support.
1478 * po/SRC-POTFILES.in: Added NFP source files.
1479 * targets.c: Added nfp_elf64_vec
1480 * bfd-in2.h: Regenerate.
1481 * Makefile.in: Regenerate.
1482 * configure: Regenerate.
1484 2018-04-27 Alan Modra <amodra@gmail.com>
1486 * bfd-in2.h: Regenerate.
1487 * libbfd.h: Regenerate.
1489 2018-04-27 Alan Modra <amodra@gmail.com>
1493 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't drop plt
1495 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Comment fixes.
1497 2018-04-26 Pedro Alves <palves@redhat.com>
1499 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't consider
1500 ifunc and non-ifunc symbols duplicates.
1502 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1503 Mickaël Guêné <mickael.guene@st.com>
1505 * elf32-arm.c (elf32_arm_fdpic_thumb_plt_entry): New.
1506 (elf32_arm_plt_needs_thumb_stub_p): Handle thumb-only case.
1507 (elf32_arm_populate_plt_entry): Likewise.
1508 (elf32_arm_output_plt_map_1): Likewise.
1509 (elf32_arm_output_arch_local_syms): Likewise.
1511 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1512 Mickaël Guêné <mickael.guene@st.com>
1514 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Handle
1515 _GLOBAL_OFFSET_TABLE_ in FDPIC mode.
1517 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1518 Mickaël Guêné <mickael.guene@st.com>
1520 * elf32-arm.c (bfd_elf32_arm_set_target_params): Handle FDPIC case
1523 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1524 Mickaël Guêné <mickael.guene@st.com>
1526 * elf32-arm.c (DEFAULT_STACK_SIZE): New.
1527 (elf32_arm_always_size_sections): Create stack segment.
1529 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1530 Mickaël Guêné <mickael.guene@st.com>
1532 * bfd-in2.h (BFD_RELOC_ARM_TLS_GD32_FDPIC)
1533 (BFD_RELOC_ARM_TLS_LDM32_FDPIC, BFD_RELOC_ARM_TLS_IE32_FDPIC): New
1535 * elf32-arm.c (elf32_arm_howto_table_2): Add R_ARM_TLS_GD32_FDPIC,
1536 R_ARM_TLS_LDM32_FDPIC, R_ARM_TLS_IE32_FDPIC relocations.
1537 (elf32_arm_reloc_map): Add R_ARM_TLS_GD32_FDPIC,
1538 R_ARM_TLS_LDM32_FDPIC, R_ARM_TLS_IE32_FDPIC.
1539 (struct elf32_arm_link_hash_table): Update comment.
1540 (elf32_arm_final_link_relocate): Handle TLS FDPIC relocations.
1541 (IS_ARM_TLS_RELOC): Likewise.
1542 (elf32_arm_check_relocs): Likewise.
1543 (allocate_dynrelocs_for_symbol): Likewise.
1544 (elf32_arm_size_dynamic_sections): Update comment.
1545 * reloc.c: Add BFD_RELOC_ARM_TLS_GD32_FDPIC,
1546 BFD_RELOC_ARM_TLS_LDM32_FDPIC, BFD_RELOC_ARM_TLS_IE32_FDPIC.
1548 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1549 Mickaël Guêné <mickael.guene@st.com>
1551 * elf32-arm.c (elf32_arm_fdpic_plt_entry): New.
1552 (elf32_arm_create_dynamic_sections): Handle FDPIC.
1553 (elf32_arm_allocate_plt_entry): Likewise.
1554 (elf32_arm_populate_plt_entry): Likewise.
1555 (elf32_arm_output_plt_map_1): Likewise.
1557 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1558 Mickaël Guêné <mickael.guene@st.com>
1560 * elf32-arm.c (struct fdpic_local): New.
1561 (elf_arm_obj_tdata): Add local_fdpic_cnts field.
1562 (elf32_arm_local_fdpic_cnts): New.
1563 (struct fdpic_global): New.
1564 (elf32_arm_link_hash_entry): Add fdpic_cnts field.
1565 (elf32_arm_link_hash_table): Add srofixup field.
1566 (arm_elf_add_rofixup): New.
1567 (arm_elf_fill_funcdesc): New.
1568 (elf32_arm_link_hash_newfunc): Handle fdpic_cnts.
1569 (elf32_arm_allocate_local_sym_info): Likewise.
1570 (create_got_section): Create .rofixup section.
1571 (elf32_arm_copy_indirect_symbol): Handle fdpic_cnts.
1572 (bfd_elf32_arm_set_target_params): Handle FDPIC.
1573 (elf32_arm_final_link_relocate): Likewise.
1574 (elf32_arm_check_relocs): Likewise.
1575 (allocate_dynrelocs_for_symbol): Likewise.
1576 (elf32_arm_size_dynamic_sections): Likewise.
1577 (elf32_arm_finish_dynamic_sections): Likewise.
1578 (elf32_arm_output_arch_local_syms): Likewise.
1579 (elf32_arm_fdpic_omit_section_dynsym): New.
1581 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1582 Mickaël Guêné <mickael.guene@st.com>
1584 * bfd-in2.c (BFD_RELOC_ARM_GOTFUNCDESC)
1585 (BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC)
1586 (BFD_RELOC_ARM_FUNCDESC_VALUE): New.
1587 * elf32-arm.c (elf32_arm_howto_table_2): Add R_ARM_GOTFUNCDESC,
1588 R_ARM_GOTOFFFUNCDESC, R_ARM_FUNCDESC, R_ARM_FUNCDESC_VALUE.
1589 (elf32_arm_howto_from_type): Take new members of
1590 elf32_arm_howto_table_2 into account.
1591 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_GOTFUNCDESC,
1592 BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC,
1593 BFD_RELOC_ARM_FUNCDESC_VALUE.
1594 * reloc.c: Add BFD_RELOC_ARM_GOTFUNCDESC,
1595 BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC,
1596 BFD_RELOC_ARM_FUNCDESC_VALUE.
1598 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1599 Mickaël Guêné <mickael.guene@st.com>
1601 * elf32-arm.c (elf32_arm_print_private_bfd_data): Support
1602 EF_ARM_PIC and ELFOSABI_ARM_FDPIC.
1603 (elf32_arm_post_process_headers): Support ELFOSABI_ARM_FDPIC.
1604 (ELF_OSABI): Define to ELFOSABI_ARM_FDPIC.
1606 2018-04-25 Christophe Lyon <christophe.lyon@st.com>
1607 Mickaël Guêné <mickael.guene@st.com>
1609 * config.bfd (arm*-*-linux-*): Add arm_elf32_fdpic_be_vec and
1610 arm_elf32_fdpic_le_vec to targ_selvecs. Accept
1611 arm*-*-uclinuxfdpiceabi.
1612 * configure.ac: Add support for arm_elf32_fdpic_be_vec and
1613 arm_elf32_fdpic_le_vec.
1614 * configure: Regenerate.
1615 * elf32-arm.c (struct elf32_arm_link_hash_table): Add fdpic_p.
1616 (elf32_arm_link_hash_table_create): Initialize fdpic_p.
1617 (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME, TARGET_BIG_SYM)
1618 (TARGET_BIG_NAME, elf_match_priority): Define for FDPIC targets.
1619 (elf32_arm_fdpic_link_hash_table_create): New.
1620 * targets.c (_bfd_target_vector): Add arm_elf32_fdpic_be_vec and
1621 arm_elf32_fdpic_le_vec.
1623 2018-04-25 Alan Modra <amodra@gmail.com>
1625 * elf-linux-core.h: Disable gcc-8 string truncation warning.
1626 * elf.c (elfcore_write_prpsinfo): Likewise.
1628 2018-04-25 Alan Modra <amodra@gmail.com>
1630 * Makefile.am: Remove arm-aout and arm-coff support.
1631 * config.bfd: Likewise.
1632 * configure.ac: Likewise.
1633 * targets.c: Likewise.
1634 * aout-arm.c: Delete.
1635 * armnetbsd.c: Delete.
1637 * Makefile.in: Regenerate.
1638 * configure: Regenerate.
1639 * po/SRC-POTFILES.in: Regenerate.
1641 2018-04-24 Nick Clifton <nickc@redhat.com>
1644 * elf.c (ignore_section_sym): Check for the output_section pointer
1645 being NULL before dereferencing it.
1648 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Check for
1649 a negative PE_DEBUG_DATA size before iterating over the debug data.
1651 2018-04-23 Alan Modra <amodra@gmail.com>
1653 * elf-linux-core.h: Revert last change.
1656 2018-04-23 Nick Clifton <nickc@redhat.com>
1659 * aoutx.h (aout_get_external_symbols): Allocate an extra byte at
1660 the end of the string table, and zero it.
1662 2018-04-23 Alan Modra <amodra@gmail.com>
1664 * elf-linux-core.h (swap_linux_prpsinfo32_ugid32_out): Disable
1665 gcc-8 string truncation warning.
1666 (swap_linux_prpsinfo32_ugid16_out): Likewise.
1667 (swap_linux_prpsinfo64_ugid32_out): Likewise.
1668 (swap_linux_prpsinfo64_ugid16_out): Likewise.
1669 * elf.c (elfcore_write_prpsinfo): Likewise.
1671 2018-04-23 Nick Clifton <nickc@redhat.com>
1674 * aoutx.h (aout_get_external_symbols): Allocate an extra byte at
1675 the end of the string table, and zero it.
1677 2018-04-20 Alan Modra <amodra@gmail.com>
1680 * elf32-hppa.c (got_relocs_needed): Add extra param to special
1681 case both dtprel and tprel relocs.
1682 (allocate_dynrelocs): Adjust conditions for got relocs.
1683 (elf32_hppa_relocate_section): Likewise for local sym got relocs.
1684 Emit dynamic relocs on TLS GOT entries for shared libraries,
1685 not when pic. Omit dynamic reloc on dtprel entry when local,
1686 and on tprel entry when local and executable.
1688 2018-04-19 Alan Modra <amodra@gmail.com>
1691 * elf32-hppa.c (elf32_hppa_size_stubs): Init "destination" to -1.
1692 (hppa_type_of_stub): Don't return a long branch stub for
1693 symbols other than those defined statically.
1695 2018-04-19 Alan Modra <amodra@gmail.com>
1697 * Makefile.am: Revert 2018-04-18 coff-mips changes.
1698 * config.bfd: Add back mips_ecoff_le_vec and mips_ecoff_be_vec
1699 to selvecs for mips targets change 2018-04-18.
1700 * configure.ac: Reinstate mips_ecoff_le_vec, mips_ecoff_be_vec
1701 and mips_ecoff_bele_vec.
1702 * targets.c: Likewise.
1703 * coff-mips.c: Resurrect.
1704 * Makefile.in: Regenerate.
1705 * configure: Regenerate.
1706 * po/SRC-POTFILES.in: Regenerate.
1708 2018-04-18 Alan Modra <amodra@gmail.com>
1710 * Makefile.am: Remove mips aout and coff support.
1711 * config.bfd: Likewise.
1712 * configure.ac: Likewise.
1713 * targets.c: Likewise.
1714 * coff-mips.c: Delete
1717 * pei-mips.c: Delete
1718 * Makefile.in: Regenerate.
1719 * configure: Regenerate.
1720 * po/SRC-POTFILES.in: Regenerate.
1722 2018-04-17 H.J. Lu <hongjiu.lu@intel.com>
1724 * elf32-i386.c (elf32_bed): Define before including
1726 * elf64-x86-64.c (elf64_bed): Define before including
1728 (elf32_bed): Define before including "elf32-target.h".
1730 2018-04-17 H.J. Lu <hongjiu.lu@intel.com>
1733 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Use a
1734 normal input file with compatible relocation.
1736 2018-04-18 Alan Modra <amodra@gmail.com>
1738 * Makefile.am: Remove support for assorted i386 aout and coff targets.
1739 * config.bfd: Likewise.
1740 * configure.ac: Likewise.
1741 * doc/bfdint.texi: Likewise.
1742 * targets.c: Likewise.
1743 * freebsd.h: Delete.
1744 * i386dynix.c: Delete.
1745 * i386freebsd.c: Delete.
1746 * i386linux.c: Delete.
1747 * i386mach3.c: Delete.
1748 * i386netbsd.c: Delete.
1749 * i386os9k.c: Delete.
1750 * Makefile.in: Regenerate.
1751 * configure: Regenerate.
1752 * po/SRC-POTFILES.in: Regenerate.
1754 2018-04-17 Andrew Sadek <andrew.sadek.se@gmail.com>
1756 Microblaze Target: PIC data text relative
1758 * bfd/reloc.c (2 new BFD relocations):
1759 BFD_RELOC_MICROBLAZE_64_TEXTPCREL &
1760 BFD_RELOC_MICROBLAZE_64_TEXTPCREL
1761 * bfd/bfd-in2.h: Regenerate
1762 * bfd/libbfd.h: Regenerate
1763 * bfd/elf32-microblaze.c (Handle new relocs): define 'HOWTO' of 3
1764 new relocs and handle them in both relocate and relax functions.
1765 (microblaze_elf_reloc_type_lookup): add mapping between for new
1767 (microblaze_elf_relocate_section): Handle new relocs in case of
1769 (microblaze_elf_relax_section): Handle new relocs for elf relaxation.
1771 2018-04-17 Nick Clifton <nickc@redhat.com>
1774 * aoutx.h (find_nearest_line): Check that the symbol name exists
1775 and is long enough, before attempting to see if it is for a .o
1777 * hash.c (bfd_hash_hash): Add an assertion that the string is not
1779 * linker.c (bfd_link_hash_lookup): Fail if the table or string are
1781 (_bfd_generic_link_add_archive_symbols): Fail if an archive entry
1785 * dwarf2.c (concat_filename): Check for a NULL table pointer.
1787 2018-04-16 Nick Clifton <nickc@redhat.com>
1790 * coffgen.c (coff_pointerize_aux): Check for an out of range
1793 2018-04-16 Alan Modra <amodra@gmail.com>
1795 * Makefile.am: Remove arm-epoc-pe support.
1796 * coff-arm.c: Likewise.
1797 * config.bfd: Likewise.
1798 * configure.ac: Likewise.
1799 * targets.c: Likewise.
1800 * epoc-pe-arm.c: Delete.
1801 * epoc-pei-arm.c: Delete.
1802 * Makefile.in: Regenerate.
1803 * configure: Regenerate.
1804 * po/SRC-POTFILES.in: Regenerate.
1806 2018-04-16 Alan Modra <amodra@gmail.com>
1808 * Makefile.am: Remove sparc-aout and sparc-coff support.
1809 * config.bfd: Likewise.
1810 * configure.ac: Likewise.
1811 * targets.c: Likewise.
1812 * aout-sparcle.c: Delete.
1814 * cf-sparclynx.c: Delete.
1815 * coff-sparc.c: Delete.
1817 * sparclinux.c: Delete.
1818 * sparclynx.c: Delete.
1819 * sparcnetbsd.c: Delete.
1821 * Makefile.in: Regenerate.
1822 * configure: Regenerate.
1823 * po/SRC-POTFILES.in: Regenerate.
1825 2018-04-16 Alan Modra <amodra@gmail.com>
1827 * Makefile.am: Remove m68k-aout and m68k-coff support.
1828 * aoutf1.h: Likewise.
1829 * aoutx.h: Likewise.
1830 * archive.c: Likewise.
1831 * bfd-in.h: Likewise.
1833 * coffcode.h: Likewise.
1834 * coffswap.h: Likewise.
1835 * config.bfd: Likewise.
1836 * configure.ac: Likewise.
1837 * configure.host: Likewise.
1838 * doc/bfd.texinfo: Likewise.
1839 * doc/bfdint.texi: Likewise.
1840 * freebsd.h: Likewise.
1841 * gen-aout.c: Likewise.
1842 * hpux-core.c: Likewise.
1843 * libaout.h: Likewise.
1844 * libbfd-in.h: Likewise.
1845 * pdp11.c: Likewise.
1846 * peicode.h: Likewise.
1847 * riscix.c: Likewise.
1848 * targets.c: Likewise.
1850 * coff-apollo.c: Delete.
1851 * coff-aux.c: Delete.
1852 * coff-m68k.c: Delete.
1853 * coff-svm68k.c: Delete.
1854 * coff-u68k.c: Delete.
1855 * hosts/delta68.h: Delete.
1856 * hosts/hp300bsd.h: Delete.
1857 * hosts/m68kaux.h: Delete.
1858 * hosts/news.h: Delete.
1859 * hp300bsd.c: Delete.
1860 * hp300hpux.c: Delete.
1861 * liboasys.h: Delete.
1862 * m68k4knetbsd.c: Delete.
1863 * m68klinux.c: Delete.
1864 * m68knetbsd.c: Delete.
1866 * versados.c: Delete.
1867 * Makefile.in: Regenerate.
1868 * bfd-in2.h: Regenerate.
1869 * configure: Regenerate.
1870 * libbfd.h: Regenerate.
1871 * po/SRC-POTFILES.in: Regenerate.
1873 2018-04-16 Alan Modra <amodra@gmail.com>
1875 * Makefile.am: Remove sh5 and sh64 support.
1876 * archures.c: Likewise.
1877 * config.bfd: Likewise.
1878 * configure.ac: Likewise.
1879 * cpu-sh.c: Likewise.
1880 * elf32-sh-relocs.h: Likewise.
1881 * elf32-sh.c: Likewise.
1882 * targets.c: Likewise.
1883 * elf32-sh64-com.c: Delete.
1884 * elf32-sh64.c: Delete.
1885 * elf32-sh64.h: Delete.
1886 * elf64-sh64.c: Delete.
1887 * Makefile.in: Regenerate.
1888 * bfd-in2.h: Regenerate.
1889 * configure: Regenerate.
1890 * po/SRC-POTFILES.in: Regenerate.
1892 2018-04-16 Alan Modra <amodra@gmail.com>
1894 * Makefile.am: Remove sh-symbianelf support.
1895 * config.bfd: Likewise.
1896 * configure.ac: Likewise.
1897 * targets.c: Likewise.
1898 * elf32-sh-symbian.c: Delete.
1899 * Makefile.in: Regenerate.
1900 * configure: Regenerate.
1901 * po/SRC-POTFILES.in: Regenerate.
1903 2018-04-16 Alan Modra <amodra@gmail.com>
1905 * Makefile.am: Remove vax-bsd and vax-ultrix support.
1906 * config.bfd: Likewise.
1907 * configure.ac: Likewise.
1908 * targets.c: Likewise.
1910 * Makefile.in: Regenerate.
1911 * configure: Regenerate.
1912 * po/SRC-POTFILES.in: Regenerate.
1914 2018-04-16 Alan Modra <amodra@gmail.com>
1916 * Makefile.am: Remove w65 support.
1917 * archures.c: Likewise.
1918 * coffcode.h: Likewise.
1919 * config.bfd: Likewise.
1920 * configure.ac: Likewise.
1921 * targets.c: Likewise.
1922 * coff-w65.c: Delete.
1923 * cpu-w65.c: Delete.
1924 * Makefile.in: Regenerate.
1925 * bfd-in2.h: Regenerate.
1926 * configure: Regenerate.
1927 * po/SRC-POTFILES.in: Regenerate.
1929 2018-04-16 Alan Modra <amodra@gmail.com>
1931 * Makefile.am: Remove we32k support.
1932 * archures.c: Likewise.
1933 * coffcode.h: Likewise.
1934 * config.bfd: Likewise.
1935 * configure.ac: Likewise.
1936 * targets.c: Likewise.
1937 * coff-we32k.c: Delete.
1938 * cpu-we32k.c: Delete.
1939 * Makefile.in: Regenerate.
1940 * bfd-in2.h: Regenerate.
1941 * configure: Regenerate.
1942 * po/SRC-POTFILES.in: Regenerate.
1944 2018-04-16 Alan Modra <amodra@gmail.com>
1946 * Makefile.am: Remove m88k support.
1947 * aoutx.h: Likewise.
1948 * archures.c: Likewise.
1949 * coffcode.h: Likewise.
1950 * coffswap.h: Likewise.
1951 * config.bfd: Likewise.
1952 * configure.ac: Likewise.
1953 * cpu-ns32k.c: Likewise.
1954 * elf32-nds32.c: Likewise.
1955 * mach-o.c: Likewise.
1956 * netbsd-core.c: Likewise.
1957 * reloc.c: Likewise.
1958 * targets.c: Likewise.
1959 * coff-m88k.c: Delete.
1960 * cpu-m88k.c: Delete.
1961 * elf32-m88k.c: Delete.
1962 * hosts/m88kmach3.h: Delete.
1963 * m88kmach3.c: Delete.
1964 * m88kopenbsd.c: Delete.
1965 * Makefile.in: Regenerate.
1966 * bfd-in2.h: Regenerate.
1967 * configure: Regenerate.
1968 * po/SRC-POTFILES.in: Regenerate.
1970 2018-04-16 Alan Modra <amodra@gmail.com>
1972 * Makefile.am: Remove i370 support.
1973 * archures.c: Likewise.
1974 * config.bfd: Likewise.
1975 * configure.ac: Likewise.
1976 * targets.c: Likewise.
1977 * cpu-i370.c: Delete.
1978 * elf32-i370.c: Delete.
1979 * Makefile.in: Regenerate.
1980 * bfd-in2.h: Regenerate.
1981 * configure: Regenerate.
1982 * po/SRC-POTFILES.in: Regenerate.
1984 2018-04-16 Alan Modra <amodra@gmail.com>
1986 * Makefile.am: Remove h8500 support.
1987 * archures.c: Likewise.
1988 * coffcode.h: Likewise.
1989 * config.bfd: Likewise.
1990 * configure.ac: Likewise.
1991 * targets.c: Likewise.
1992 * coff-h8500.c: Delete.
1993 * cpu-h8500.c: Delete.
1994 * Makefile.in: Regenerate.
1995 * bfd-in2.h: Regenerate.
1996 * configure: Regenerate.
1997 * po/SRC-POTFILES.in: Regenerate.
1999 2018-04-16 Alan Modra <amodra@gmail.com>
2001 * Makefile.am: Remove h8300-coff support.
2002 * coffcode.h: Likewise.
2003 * config.bfd: Likewise.
2004 * configure.ac: Likewise.
2005 * reloc16.c: Likewise.
2006 * targets.c: Likewise.
2007 * coff-h8300.c: Delete.
2008 * Makefile.in: Regenerate.
2009 * configure: Regenerate.
2010 * po/SRC-POTFILES.in: Regenerate.
2012 2018-04-16 Alan Modra <amodra@gmail.com>
2014 * Makefile.am: Remove IEEE 695 support.
2015 * archures.c: Likewise.
2017 * config.bfd: Likewise.
2018 * configure.ac: Likewise.
2019 * doc/bfd.texinfo: Likewise.
2020 * doc/bfdint.texi: Likewise.
2021 * doc/bfdsumm.texi: Likewise.
2022 * section.c: Likewise.
2023 * targets.c: Likewise.
2025 * libieee.h: Delete.
2026 * Makefile.in: Regenerate.
2027 * bfd-in2.h: Regenerate.
2028 * configure: Regenerate.
2029 * po/SRC-POTFILES.in: Regenerate.
2031 2018-04-16 Alan Modra <amodra@gmail.com>
2033 * config.bfd: Remove tandem support.
2035 2018-04-16 Alan Modra <amodra@gmail.com>
2037 * Makefile.am: Remove newsos3 support.
2038 * aoutx.h: Likewise.
2039 * config.bfd: Likewise.
2040 * configure.ac: Likewise.
2041 * targets.c: Likewise.
2042 * newsos3.c: Delete.
2043 * Makefile.in: Regenerate.
2044 * configure: Regenerate.
2045 * po/SRC-POTFILES.in: Regenerate.
2047 2018-04-16 Alan Modra <amodra@gmail.com>
2049 * Makefile.am: Remove netware support.
2050 * bfd-in.h: Likewise.
2052 * config.bfd: Likewise.
2053 * configure.ac: Likewise.
2054 * doc/bfdint.texi: Likewise.
2055 * ecoff.c: Likewise.
2056 * targets.c: Likewise.
2058 * nlm-target.h: Delete.
2060 * nlm32-alpha.c: Delete.
2061 * nlm32-i386.c: Delete.
2062 * nlm32-ppc.c: Delete.
2063 * nlm32-sparc.c: Delete.
2066 * nlmcode.h: Delete.
2067 * nlmswap.h: Delete.
2068 * Makefile.in: Regenerate.
2069 * bfd-in2.h: Regenerate.
2070 * configure: Regenerate.
2071 * po/SRC-POTFILES.in: Regenerate.
2073 2018-04-16 Alan Modra <amodra@gmail.com>
2075 * archures.c: Remove tahoe support.
2076 * config.bfd: Likewise.
2077 * configure.ac: Likewise.
2078 * hosts/tahoe.h: Delete.
2079 * bfd-in2.h: Regenerate.
2080 * configure: Regenerate.
2082 2018-04-14 Alan Modra <amodra@gmail.com>
2084 * elf-bfd.h (struct elf_backend_data): Add relropagesize.
2085 * elfxx-target.h (ELF_RELROPAGESIZE): Provide default and
2087 (elfNN_bed): Init relropagesize.
2088 * bfd.c (bfd_emul_get_commonpagesize): Add boolean param to
2089 select relropagesize.
2090 * elf32-ppc.c (ELF_COMMONPAGESIZE): Define as 0x1000.
2091 (ELF_RELROPAGESIZE): Define as ELF_MAXPAGESIZE.
2092 (ELF_MINPAGESIZE): Don't define.
2093 * elf64-ppc.c (ELF_COMMONPAGESIZE): Define as 0x1000.
2094 (ELF_RELROPAGESIZE): Define as ELF_MAXPAGESIZE.
2095 * bfd-in2.h: Regenerate.
2097 2018-04-14 Alan Modra <amodra@gmail.com>
2099 * elf32-ppc.c (ELF_MAXPAGESIZE, ELF_COMMONPAGESIZE): Don't depend
2100 on __QNXTARGET__ define.
2102 2018-04-14 Alan Modra <amodra@gmail.com>
2104 * config.bfd: Add powerpc-*-lynxos* and powerpc-*-windiss*
2107 2018-04-11 Alan Modra <amodra@gmail.com>
2109 * aout-adobe.c: Delete.
2111 * coff-i860.c: Delete.
2112 * coff-i960.c: Delete.
2113 * cpu-i860.c: Delete.
2114 * cpu-i960.c: Delete.
2115 * elf32-i860.c: Delete.
2116 * elf32-i960.c: Delete.
2117 * hosts/i860mach3.h: Delete.
2118 * Makefile.am: Remove i860, i960, bout, and adobe support.
2119 * archures.c: Remove i860 and i960 support.
2120 * coffcode.h: Likewise.
2121 * reloc.c: Likewise.
2122 * aoutx.h: Comment updates.
2123 * archive.c: Remove BOUT and i960 support.
2124 * bfd.c: Remove BOUT support.
2125 * coffswap.h: Remove i960 support.
2126 * config.bfd: Remove i860, i960 and adobe targets.
2127 * configure.ac: Remove adode, bout, i860, i960, icoff targets.
2128 * targets.c: Likewise.
2129 * ieee.c: Remove i960 support.
2130 * mach-o.c: Remove i860 support.
2131 * Makefile.in: Regenerate.
2132 * bfd-in2.h: Regenerate.
2133 * configure: Regenerate.
2134 * libbfd.h: Regenerate.
2135 * po/SRC-POTFILES.in: Regenerate.
2137 2018-04-09 Maciej W. Rozycki <macro@mips.com>
2139 * elf64-mips.c (mips_elf64_write_rel): Handle a NULL BFD pointer
2140 in the BFD symbol referred by the relocation.
2141 (mips_elf64_write_rela): Likewise.
2143 2018-04-09 Maciej W. Rozycki <macro@mips.com>
2145 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Issue an
2146 error for out-of-range `r_sym' values.
2148 2018-04-09 Alan Modra <amodra@gmail.com>
2150 * elf64-ppc.c (struct _ppc64_elf_section_data): Add has_pltcall field.
2151 (struct ppc_link_hash_table): Add can_convert_all_inline_plt.
2152 (ppc64_elf_check_relocs): Set has_pltcall.
2153 (ppc64_elf_adjust_dynamic_symbol): Discard some PLT entries.
2154 (ppc64_elf_inline_plt): New function.
2155 (ppc64_elf_size_dynamic_sections): Discard some PLT entries for locals.
2156 * elf64-ppc.h (ppc64_elf_inline_plt): Declare.
2157 * elf32-ppc.c (has_pltcall): Define.
2158 (struct ppc_elf_link_hash_table): Add can_convert_all_inline_plt.
2159 (ppc_elf_check_relocs): Set has_pltcall.
2160 (ppc_elf_inline_plt): New function.
2161 (ppc_elf_adjust_dynamic_symbol): Discard some PLT entries.
2162 (ppc_elf_size_dynamic_sections): Likewise.
2163 * elf32-ppc.h (ppc_elf_inline_plt): Declare.
2165 2018-04-09 Alan Modra <amodra@gmail.com>
2167 * elf32-ppc.c (ppc_elf_howto_raw): Add PLTSEQ and PLTCALL howtos.
2168 (is_plt_seq_reloc): New function.
2169 (ppc_elf_check_relocs): Handle PLTSEQ and PLTCALL relocs.
2170 (ppc_elf_tls_optimize): Handle inline plt call sequence.
2171 (ppc_elf_relax_section): Handle PLTCALL reloc.
2172 (ppc_elf_relocate_section): Nop out inline plt call sequence when
2174 * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_PLTSEQ and
2175 R_PPC64_PLTCALL entries. Comment R_PPC64_TOCSAVE.
2176 (has_tls_get_addr_call): Correct comment.
2177 (is_branch_reloc): Add PLTCALL.
2178 (is_plt_seq_reloc): New function.
2179 (ppc64_elf_check_relocs): Handle PLT16_LO_DS reloc. Set
2180 has_tls_reloc for R_PPC64_TLSGD and R_PPC64_TLSLD. Create plt
2181 entry for R_PPC64_PLTCALL.
2182 (ppc64_elf_tls_optimize): Handle inline plt call sequence.
2183 (ppc_type_of_stub): Handle PLTCALL reloc.
2184 (toc_adjusting_stub_needed): Likewise.
2185 (ppc64_elf_relocate_section): Set "can_plt_call" for PLTCALL
2186 reloc insn. Nop out inline plt call sequence when resolving
2187 locally. Handle __tls_get_addr inline plt call optimization.
2189 2018-04-09 Alan Modra <amodra@gmail.com>
2191 * elf64-ppc.c (LOCAL_PLT_ENTRY_SIZE): Define.
2192 (struct ppc_stub_hash_entry): Add symtype field.
2194 (struct ppc_link_hash_table): Add pltlocal and relpltlocal.
2195 (create_linkage_sections): Create pltlocal and relpltlocal.
2196 (ppc64_elf_check_relocs): Allow PLT relocs on local symbols.
2198 (ppc64_elf_adjust_dynamic_symbol): Keep PLT entries for inline calls.
2199 (allocate_dynrelocs): Allocate pltlocal and relpltlocal.
2200 (ppc64_elf_size_dynamic_sections): Size pltlocal and relpltlocal.
2201 Keep PLT entries for inline calls against locals.
2202 (ppc_build_one_stub): Use pltlocal as appropriate.
2203 (ppc_size_one_stub): Likewise.
2204 (ppc64_elf_size_stubs): Set symtype.
2205 (build_global_entry_stubs_and_plt): Init pltlocal and write
2206 relpltlocal for globals.
2207 (write_plt_relocs_for_local_syms): Likewise for local syms.
2208 (ppc64_elf_relocate_section): Support PLT for local syms.
2209 * elf32-ppc.c (PLT_KEEP): Define.
2210 (struct ppc_elf_link_hash_table): Add pltlocal and relpltlocal.
2211 (ppc_elf_create_glink): Create pltlocal and relpltlocal.
2212 (ppc_elf_check_relocs): Allow PLT relocs on local symbols.
2213 Set PLT_KEEP. Adjust update_local_sym_info call.
2214 (ppc_elf_adjust_dynamic_symbol): Keep PLT entries for inline calls.
2215 (allocate_dynrelocs): Allocate pltlocal and relpltlocal.
2216 (ppc_elf_size_dynamic_sections): Size pltlocal and relpltlocal.
2217 (ppc_elf_relocate_section): Support PLT16 relocs for local syms.
2218 (write_global_sym_plt): Init pltlocal and write relpltlocal.
2219 (ppc_finish_symbols): Likewise for locals.
2221 2018-04-09 Alan Modra <amodra@gmail.com>
2223 * elf64-ppc.c (ppc_build_one_stub): Move output of PLT relocs
2224 for local symbols to..
2225 (write_plt_relocs_for_local_syms): ..here. New function.
2226 (ppc64_elf_finish_dynamic_symbol): Move output of PLT relocs for
2228 (build_global_entry_stubs_and_plt): ..here. Rename from
2229 build_global_entry_stubs.
2230 (ppc64_elf_build_stubs): Always call build_global_entry_stubs_and_plt.
2231 Call write_plt_relocs_for_local_syms.
2232 * elf32-ppc.c (get_sym_h): New function.
2233 (ppc_elf_relax_section): Use get_sym_h.
2234 (ppc_elf_relocate_section): Move output of PLT relocs and glink
2235 stubs for local symbols to..
2236 (ppc_finish_symbols): ..here. New function.
2237 (ppc_elf_finish_dynamic_symbol): Move output of PLT relocs for
2239 (write_global_sym_plt): ..here. New function.
2240 * elf32-ppc.h (ppc_elf_modify_segment_map): Delete attribute.
2241 (ppc_finish_symbols): Declare.
2243 2018-04-09 Alan Modra <amodra@gmail.com>
2245 * elf32-ppc.c (ppc_elf_check_relocs): Handle PLT16 relocs.
2246 (ppc_elf_relocate_section): Likewise.
2247 * elf64-ppc.c (ppc64_elf_check_relocs): Handle PLT16_LO_DS.
2248 (ppc64_elf_relocate_section): Likewise. Correct PLT16
2249 resolution to plt entry relative to toc pointer.
2251 2018-04-09 Alan Modra <amodra@gmail.com>
2253 * elf64-ppc.c (TLS_TLS, TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL,
2254 TLS_TPRELGD, TLS_EXPLICIT): Renumber. Test TLS_TLS throughout
2255 file when other TLS flags are tested in a mask.
2256 (TLS_MARK, NON_GOT): Define.
2257 (PLT_IFUNC): Redefine, and test TLS_TLS throughout file as well.
2258 (update_local_sym_info): Don't create got entry when NON_GOT.
2259 (ppc64_elf_check_relocs): Pass NON_GOT with PLT_IFUNC.
2261 (get_tls_mask): Do toc lookup if tls_mask is just TLS_MARK.
2262 (ppc64_elf_relocate_section): Likewise.
2263 (ppc64_elf_tls_optimize): Don't attempt to optimize indirect
2264 __tls_get_addr calls lacking a marker reloc.
2265 * elf32-ppc.c (TLS_TLS, TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL,
2266 TLS_TPRELGD): Renumber. Update comment.
2267 (TLS_MARK, NON_GOT): Define.
2268 (PLT_IFUNC): Redefine, and test TLS_TLS throughout file as well.
2269 (update_local_sym_info): Don't create got entry when NON_GOT.
2270 (ppc_elf_check_relocs): Pass NON_GOT with PLT_IFUNC.
2272 (ppc_elf_tls_optimize): Don't attempt to optimize indirect
2273 __tls_get_addr calls lacking a marker reloc.
2275 2018-04-06 H.J. Lu <hongjiu.lu@intel.com>
2277 * elf64-x86-64.c (elf_x86_64_info_to_howto): Don't mask out
2278 R_X86_64_converted_reloc_bit.
2280 2018-04-05 H.J. Lu <hongjiu.lu@intel.com>
2283 * configure: Regenerated.
2285 2018-04-05 Alan Modra <amodra@gmail.com>
2287 * elf-hppa.h (elf_hppa_info_to_howto): Init howto to NULL.
2288 (elf_hppa_info_to_howto_rel): Likewise.
2290 2018-04-04 Maciej W. Rozycki <macro@mips.com>
2292 * elf-hppa.h (elf_hppa_info_to_howto): Also return
2293 unsuccessfully for unimplemented relocations.
2294 (elf_hppa_info_to_howto_rel): Likewise.
2296 2018-04-04 Maciej W. Rozycki <macro@mips.com>
2298 * elf32-i860.c (lookup_howto): Add `abfd' parameter. Set the
2299 `bfd_error_bad_value' error and call `_bfd_error_handler' on a
2300 howto lookup failure.
2301 (elf32_i860_reloc_type_lookup): Adjust `lookup_howto' call
2303 (elf32_i860_info_to_howto_rela): Likewise.
2304 (elf32_i860_relocate_splitn): Likewise.
2305 (elf32_i860_relocate_pc16): Likewise.
2306 (elf32_i860_relocate_pc26): Likewise.
2307 (elf32_i860_relocate_section): Likewise.
2309 2018-04-04 Maciej W. Rozycki <macro@mips.com>
2311 * elf32-visium.c (visium_info_to_howto_rela): Correct the range
2312 check for `visium_elf_howto_table' table access.
2314 2018-04-04 Maciej W. Rozycki <macro@mips.com>
2316 * elf32-iq2000.c (iq2000_info_to_howto_rela): Correct the range
2317 check for `iq2000_elf_howto_table' table access.
2319 2018-04-04 Maciej W. Rozycki <macro@mips.com>
2321 * elf32-frv.c (frv_info_to_howto_rela): Correct the range check
2322 for `elf32_frv_howto_table' table access.
2324 2018-04-04 Maciej W. Rozycki <macro@mips.com>
2326 * elf32-mips.c (mips_elf32_rtype_to_howto): Also return
2327 unsuccessfully for placeholder howtos.
2328 * elf64-mips.c (mips_elf64_rtype_to_howto): Likewise.
2329 * elfn32-mips.c (mips_elf_n32_rtype_to_howto): Likewise.
2331 2018-03-29 Maciej W. Rozycki <macro@mips.com>
2333 * elf32-mips.c (mips_info_to_howto_rel): Remove the calls to
2334 `_bfd_error_handler' and to set the `bfd_error_bad_value' error.
2336 2018-03-28 Maciej W. Rozycki <macro@mips.com>
2338 * elf-hppa.h (elf_hppa_info_to_howto_rel): Remove
2339 ATTRIBUTE_UNUSED from `abfd'.
2341 2018-03-28 Maciej W. Rozycki <macro@mips.com>
2343 * elf-hppa.h (elf_hppa_info_to_howto_rel): Correct
2344 `_bfd_error_handler' call formatting.
2346 2018-03-28 Maciej W. Rozycki <macro@mips.com>
2348 * elf32-mips.c (mips_info_to_howto_rel): Call
2349 `mips_elf32_rtype_to_howto' directly rather than via
2350 `->elf_backend_mips_rtype_to_howto'.
2352 2018-03-28 Renlin Li <renlin.li@arm.com>
2355 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Add cases for
2356 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12,
2357 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
2358 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12,
2359 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
2360 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12,
2361 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
2362 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12,
2363 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
2364 (elfNN_aarch64_final_link_relocate): Support new relocations.
2365 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Support new
2367 (_bfd_aarch64_elf_resolve_relocation): Support new relocations.
2369 2018-03-28 Renlin Li <renlin.li@arm.com>
2372 * reloc.c: Add BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12
2373 BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12_NC,
2374 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12,
2375 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
2376 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12,
2377 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
2378 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12,
2379 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
2380 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12,
2381 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
2382 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add table entry for
2383 TLSLE_LDST16_TPREL_LO12,
2384 TLSLE_LDST16_TPREL_LO12_NC,
2385 TLSLE_LDST32_TPREL_LO12,
2386 TLSLE_LDST32_TPREL_LO12_NC,
2387 TLSLE_LDST64_TPREL_LO12,
2388 TLSLE_LDST64_TPREL_LO12_NC,
2389 TLSLE_LDST8_TPREL_LO12,
2390 TLSLE_LDST8_TPREL_LO12_NC.
2391 * bfd-in2.h: Regenerated.
2392 * libbfd.h: Regenerated.
2394 2018-03-28 Eric Botcazou <ebotcazou@adacore.com>
2397 * elfxx-sparc.c (struct _bfd_sparc_elf_link_hash_entry): Add new flag
2398 has_old_style_got_reloc.
2399 (_bfd_sparc_elf_check_relocs) <GOT relocations>: Set it for old-style
2400 relocations. Fix a couple of long lines.
2401 (_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: Do not generate
2402 a R_SPARC_NONE for the GOT slot if the symbol is also subject to old-style
2405 2018-03-25 H.J. Lu <hongjiu.lu@intel.com>
2408 * elf64-x86-64.c (elf_x86_64_finish_dynamic_sections): Add
2409 ENDBR64 to the TLSDESC PLT entry.
2411 2018-03-21 Alan Modra <amodra@gmail.com>
2413 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Trim uninteresting
2414 symbols. Use size_t counts. Delete redundant opd test.
2416 2018-03-21 Alan Modra <amodra@gmail.com>
2418 * elf32-ppc.c (ppc_elf_tls_optimize): Delete locsyms.
2420 2018-03-21 Alan Modra <amodra@gmail.com>
2422 * elf32-ppc.c (struct ppc_elf_link_hash_entry): Make tls_mask
2424 (update_local_sym_info): Likewise for local_got_tls_masks.
2425 (ppc_elf_tls_optimize): Likewise for lgot_masks.
2427 2018-03-21 Alan Modra <amodra@gmail.com>
2429 * elf64-ppc.c (ppc_size_one_stub): Fix comment typo.
2430 (ppc64_elf_layout_multitoc): Allocate relocs for tprel as we
2431 do in size_dynamic_sections.
2433 2018-03-21 Alan Modra <amodra@gmail.com>
2435 * elf64-ppc.c (ppc64_elf_relocate_section): Don't access rel[1]
2436 without first checking array bounds.
2437 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2439 2018-03-20 H.J. Lu <hongjiu.lu@intel.com>
2442 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Set
2443 non_ir_ref_dynamic if a symbol is made dynamic by --dynamic-list.
2445 2018-03-19 Nick Clifton <nickc@redhat.com>
2447 * po/es.po: Updated Spanish translation.
2449 2018-03-15 Max Filippov <jcmvbkbc@gmail.com>
2451 * elf32-xtensa.c (xlate_map_entry): Change types of address
2452 fields from 'unsigned' to 'bfd_vma'.
2453 (xlate_offset_with_removed_text): Use struct xlate_map_entry as
2454 the key argument to bsearch. Allow offsets past the end of a
2455 section, use the last map entry for translation of such offsets.
2457 2018-03-15 Kuan-Lin Chen <kuanlinchentw@gmail.com>
2459 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Removed.
2460 Not support the target feature.
2461 (nds32_elf_ex9_itb_base): Likewise.
2462 (nds32_elf_ex9_import_table): Likewise.
2463 (nds32_elf_ex9_finish): Likewise.
2464 (nds32_elf_ex9_reloc_jmp): Likewise.
2465 (nds32_elf_get_insn_with_reg): Likewise.
2466 (nds32_get_local_syms): Likewise.
2467 (nds32_elf_ex9_replace_instruction): Likewise.
2468 (nds32_elf_ifc_calc): Likewise.
2469 (nds32_elf_ifc_finish): Likewise.
2470 (nds32_elf_ifc_replace): Likewise.
2471 (nds32_elf_ifc_reloc): Likewise.
2473 2018-03-14 Alan Modra <amodra@gmail.com>
2475 * elf64-ppc.c (sfpr_define): Adjust for stub_sec size having
2476 sfpr size added before defining alias symbols.
2477 (ppc64_elf_build_stubs): Add stub section padding before
2478 copying sfpr contents and defining save/restore alias symbols.
2480 2018-03-14 H.J. Lu <hongjiu.lu@intel.com>
2483 * elflink.c (elf_gc_mark_debug_section): Also check the local
2484 debug definition section.
2486 2018-03-13 Nick Clifton <nickc@redhat.com>
2489 * pei-x86_64.c (pex64_get_unwind_info): Change to a boolean
2490 function. Add an end address parameter. Check access of the data
2491 pointer to make sure that they do not extend beyond the end
2492 address. Return FALSE if any check fails. Add the end address
2493 pointer to the ui structure.
2494 (pex64_xdata_print_uwd_codes): Check accesses of the raw unwind
2495 codes to make sure that they do not extend beyond the end address
2496 pointer. Print an error message and return immediately if any
2499 2018-03-09 Nick Clifton <nickc@redhat.com>
2501 * elf64-s390.c (elf_s390_relocate_section): Move check for
2502 relocations against non-allocated sections to before the code that
2503 handles ifunc relocations.
2504 * elf32-s390.c (elf_s390_relocate_section): Likewise.
2505 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Treat
2506 relocs against IFUNC symbols in non-allocated sections as relocs
2507 against FUNC symbols.
2508 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
2510 2018-03-08 H.J. Lu <hongjiu.lu@intel.com>
2513 * elf32-i386.c (elf_i386_relocate_section): Treat relocation
2514 against IFUNC symbol in SHT_NOTE section without SHF_ALLOC as
2515 relocation against FUNC symbol.
2516 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
2518 2018-03-07 Renlin Li <renlin.li@arm.com>
2521 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Check absolute
2522 symbol, and don't emit relocation in specific case.
2524 2018-03-07 Alan Modra <amodra@gmail.com>
2526 * elf64-mips.c (mips_elf64_rtype_to_howto): Return NULL on error.
2527 (mips_elf64_slurp_one_reloc_table): Pass on error.
2529 2018-03-03 James Cowgill <james.cowgill@mips.com>
2530 Maciej W. Rozycki <macro@mips.com>
2533 * elfxx-mips.c (mips_elf_calculate_relocation): Only return
2534 after calling `undefined_symbol' hook if this is an error
2535 condition. Assume the value of 0 for the symbol requested
2538 2018-03-02 Jim Wilson <jimw@sifive.com>
2541 * elfnn-aarch64.c (_bfd_aarch64_resize_stubs): Add 8 bytes for branch
2542 and nop instead of 4.
2543 (elfNN_arch64_build_stubs): Add nop after branch. Increase size by
2546 2018-03-01 Jim Wilson <jimw@sifive.com>
2549 * elfnn-riscv.c (riscv_relax_delete_bytes): When adjust st_size, use
2550 else if instead of if.
2552 2018-03-01 Alan Modra <amodra@gmail.com>
2554 * elf32-ft32.c (ft32_info_to_howto_rela): Correct range test.
2556 2018-02-28 Alan Modra <amodra@gmail.com>
2559 * aoutx.h (swap_std_reloc_in): Correct r_index bound check.
2561 2018-02-28 Nick Clifton <nickc@redhat.com>
2565 * dwarf2.c (read_n_bytes): Replace size parameter with dwarf_block
2566 pointer. Drop unused abfd parameter. Check the size of the block
2567 before initialising the data field. Return the end pointer if the
2569 (read_attribute_value): Adjust invocations of read_n_bytes.
2572 * dwarf1.c (parse_die): Check the length of form blocks before
2573 advancing the data pointer.
2575 2018-02-28 Alan Modra <amodra@gmail.com>
2578 * aoutx.h (translate_symbol_table): Print an error message and set
2579 bfd_error on finding an invalid name string offset.
2581 2018-02-27 H.J. Lu <hongjiu.lu@intel.com>
2583 * config.in: Regenerated.
2584 * configure: Likewise.
2585 * configure.ac: Add --enable-separate-code.
2586 (DEFAULT_LD_Z_SEPARATE_CODE): New AC_DEFINE_UNQUOTED. Default
2587 to 1 for Linux/x86 targets,
2588 * elf64-x86-64.c (ELF_MAXPAGESIZE): Set to 0x1000 if
2589 DEFAULT_LD_Z_SEPARATE_CODE is 1.
2591 2018-02-27 Nick Clifton <nickc@redhat.com>
2593 * aout-cris.c (swap_ext_reloc_out): Standadize error/warning
2595 * elf-hppa.h (elf_hppa_info_to_howto_rel): Likewise.
2596 * elf32-i386.c (elf_i386_reloc_type_lookup): Likewise.
2597 * elf32-xtensa.c (elf_xtensa_reloc_type_lookup): Likewise.
2598 * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Likewise.
2599 * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise.
2600 * elf64-sh64.c (sh_elf64_info_to_howto): Likewise.
2601 * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise.
2602 * elfxx-sparc.c (_bfd_sparc_elf_reloc_type_lookup): Likewise.
2603 * elfxx-tilegx.c (tilegx_reloc_type_lookup): Likewise.
2606 * elf-bfd.h (struct elf_backend_data): Change the return type of
2607 the elf_info_to_howto and elf_info_to_howto_rel function pointers
2609 * elfcode.h (elf_slurp_reloc_table_from_section): Check the return
2610 value from the info_to_howto function and fail if that function
2612 * elf32-h8300.c (elf32_h8_relocate_section): Check return value
2613 from the info_to_howto function.
2614 (elf32_h8_relax_section): Likewise.
2615 * elf32-lm32.c (lm32_elf_relocate_section): Likewise.
2616 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
2617 * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise.
2618 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
2619 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
2620 * elf64-ia64-vms.c (elf64_ia64_relocate_section): Likewise.
2621 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Likewise.
2622 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
2623 * elfnn-ia64.c (elfNN_ia64_relocate_section): Likewise.
2624 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
2625 (riscv_elf_relocate_section): Likewise.
2626 * elf-hppa.h (elf_hppa_info_to_howto): Change return type to
2627 bfd_boolean. Issue an error message, set an error value and
2628 return FALSE if the reloc is not recognized.
2629 (elf_hppa_info_to_howto_rel): Likewise.
2630 * elf-m10200.c (mn10200_info_to_howto): Likewise.
2631 * elf-m10300.c (mn10300_info_to_howto): Likewise.
2632 * elf.c (_bfd_elf_no_info_to_howto): Likewise.
2633 * elf32-arc.c (arc_info_to_howto_rel): Likewise.
2634 * elf32-arm.c (elf32_arm_info_to_howto): Likewise.
2635 * elf32-avr.c (avr_info_to_howto_rela): Likewise.
2636 * elf32-bfin.c (bfin_info_to_howto): Likewise.
2637 * elf32-cr16.c (elf_cr16_info_to_howto): Likewise.
2638 * elf32-cr16c.c (elf_cr16c_info_to_howto): Likewise.
2639 * elf32-cris.c (elf_cr16c_info_to_howto_rel)
2640 (cris_info_to_howto_rela): Likewise.
2641 * elf32-crx.c (elf_crx_info_to_howto): Likewise.
2642 * elf32-d10v.c (d10v_info_to_howto_rel): Likewise.
2643 * elf32-d30v.c (d30v_info_to_howto_rel, d30v_info_to_howto_rela):
2645 * elf32-dlx.c (dlx_rtype_to_howto, elf32_dlx_info_to_howto)
2646 (elf32_dlx_info_to_howto_rel): Likewise.
2647 * elf32-epiphany.c (epiphany_info_to_howto_rela): Likewise.
2648 * elf32-fr30.c (fr30_info_to_howto_rela): Likewise.
2649 * elf32-frv.c (frv_info_to_howto_rela)
2650 (frvfdpic_info_to_howto_rel): Likewise.
2651 * elf32-ft32.c (ft32_info_to_howto_rela): Likewise.
2652 * elf32-gen.c (elf_generic_info_to_howto)
2653 (elf_generic_info_to_howto_rel): Likewise.
2654 * elf32-h8300.c (elf32_h8_info_to_howto)
2655 (elf32_h8_info_to_howto_rel): Likewise.
2656 * elf32-i370.c (i370_elf_info_to_howto): Likewise.
2657 * elf32-i386.c (elf_i386_reloc_type_lookup)
2658 (elf_i386_rtype_to_howto, elf_i386_info_to_howto_rel): Likewise.
2659 * elf32-i860.c (lookup_howto, elf32_i860_info_to_howto_rela):
2661 * elf32-i960.c (elf32_i960_info_to_howto_rel): Likewise.
2662 * elf32-ip2k.c (ip2k_info_to_howto_rela): Likewise.
2663 * elf32-iq2000.c (iq2000_info_to_howto_rela): Likewise.
2664 * elf32-lm32.c (lm32_info_to_howto_rela): Likewise.
2665 * elf32-m32c.c (m32c_info_to_howto_rela): Likewise.
2666 * elf32-m32r.c (m32r_info_to_howto_rel, m32r_info_to_howto):
2668 * elf32-m68hc11.c (m68hc11_info_to_howto_rel): Likewise.
2669 * elf32-m68hc12.c (m68hc11_info_to_howto_rel): Likewise.
2670 * elf32-m68k.c (rtype_to_howto): Likewise.
2671 * elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
2672 * elf32-mep.c (mep_info_to_howto_rela): Likewise.
2673 * elf32-metag.c (metag_info_to_howto_rela): Likewise.
2674 * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
2675 * elf32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela):
2677 * elf32-moxie.c (moxie_info_to_howto_rela): Likewise.
2678 * elf32-msp430.c (msp430_info_to_howto_rela): Likewise.
2679 * elf32-mt.c (mt_info_to_howto_rela): Likewise.
2680 * elf32-nds32.c (nds32_info_to_howto_rel, nds32_info_to_howto):
2682 * elf32-nios2.c (nios2_elf32_info_to_howto): Likewise.
2683 * elf32-or1k.c (or1k_info_to_howto_rela): Likewise.
2684 * elf32-pj.c (pj_elf_info_to_howto): Likewise.
2685 * elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
2686 * elf32-pru.c (pru_elf32_info_to_howto): Likewise.
2687 * elf32-rl78.c (rl78_info_to_howto_rela): Likewise.
2688 * elf32-rx.c (rx_info_to_howto_rela): Likewise.
2689 * elf32-s390.c (elf_s390_info_to_howto): Likewise.
2690 * elf32-score.c (s3_bfd_score_info_to_howto)
2691 (_bfd_score_info_to_howto): Likewise.
2692 * elf32-score7.c (s7_bfd_score_info_to_howto): Likewise.
2693 * elf32-sh.c (sh_elf_info_to_howto): Likewise.
2694 * elf32-spu.c (spu_elf_info_to_howto): Likewise.
2695 * elf32-tic6x.c (elf32_tic6x_info_to_howto)
2696 (elf32_tic6x_info_to_howto_rel): Likewise.
2697 * elf32-tilepro.c (tilepro_info_to_howto_rela): Likewise.
2698 * elf32-v850.c (v850_elf_info_to_howto_rel)
2699 (v850_elf_info_to_howto_rela, v800_elf_info_to_howto): Likewise.
2700 * elf32-vax.c (rtype_to_howto): Likewise.
2701 * elf32-visium.c (visium_info_to_howto_rela): Likewise.
2702 * elf32-wasm32.c (elf32_wasm32_rtype_to_howto)
2703 (elf32_wasm32_info_to_howto_rela): Likewise.
2704 * elf32-xc16x.c (elf32_xc16x_info_to_howto): Likewise.
2705 * elf32-xgate.c (xgate_info_to_howto_rel): Likewise.
2706 * elf32-xstormy16.c (xstormy16_info_to_howto_rela): Likewise.
2707 * elf32-xtensa.c (elf_xtensa_info_to_howto_rela): Likewise.
2708 * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
2709 * elf64-gen.c (elf_generic_info_to_howto)
2710 (elf_generic_info_to_howto_rel): Likewise.
2711 * elf64-ia64-vms.c (elf64_ia64_info_to_howto): Likewise.
2712 * elf64-mips.c (mips_elf64_info_to_howto_rela): Likewise.
2713 * elf64-mmix.c (mmix_info_to_howto_rela): Likewise.
2714 * elf64-ppc.c (ppc64_elf_info_to_howto): Likewise.
2715 * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise.
2716 * elf64-sh64.c (elf_s390_info_to_howto, sh_elf64_info_to_howto):
2718 * elf64-x86-64.c (elf_x86_64_info_to_howto): Likewise.
2719 * elfn32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela):
2721 * elfnn-aarch64.c (elfNN_aarch64_info_to_howto): Likewise.
2722 * elfnn-ia64.c (elfNN_ia64_info_to_howto): Likewise.
2723 * elfnn-riscv.c (riscv_info_to_howto_rela): Likewise.
2724 * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise.
2725 * elfxx-sparc.c (_bfd_sparc_elf_info_to_howto): Likewise.
2726 * elfxx-tilegx.c (tilegx_info_to_howto_rela): Likewise.
2727 * elf32-score.h (s7_bfd_score_info_to_howto): Update prototype.
2728 * elfxx-sparc.h (_bfd_sparc_elf_info_to_howto): Update prototype.
2729 * elfxx-tilegx.h (tilegx_info_to_howto_rela): Update prototype.
2730 * elfxx-target.h (elf_info_to_howto, elf_info_to_howto_rel):
2733 2018-02-26 Jim Wilson <jimw@sifive.com>
2734 Stephan Schreiber <info@fs-driver.org>
2737 * elfnn-ia64.c (elfNN_ia64_relax_section): After ia64_elf_relax_brl
2738 call, set changed_contents and changed_relocs. Likewise after
2739 successful ia64_elf_relax_br call.
2741 2018-02-26 Alan Modra <amodra@gmail.com>
2743 * elf.c (assign_file_positions_except_relocs): Don't segfault
2744 when actual number of phdrs is less than allocated. Delete
2745 outdated comment. Formatting.
2747 2018-02-26 Alan Modra <amodra@gmail.com>
2749 * elf-m10300.c, * elf-s390-common.c, * elf32-arc.c, * elf32-cris.c,
2750 * elf32-dlx.c, * elf32-frv.c, * elf32-i370.c, * elf32-lm32.c,
2751 * elf32-m32r.c, * elf32-m68hc1x.c, * elf32-m68k.c,
2752 * elf32-microblaze.c, * elf32-msp430.c, * elf32-nds32.c,
2753 * elf32-nios2.c, * elf32-or1k.c, * elf32-rl78.c, * elf32-rx.c,
2754 * elf32-score.c, * elf32-score7.c, * elf32-sh-symbian.c,
2755 * elf32-sh.c, * elf32-spu.c, * elf32-v850.c, * elf32-xtensa.c,
2756 * elf64-alpha.c, * elf64-ia64-vms.c, * elf64-mmix.c,
2757 * elf64-sh64.c, * elf64-sparc.c, * elfnn-ia64.c, * elfxx-tilegx.c,
2758 * mmo.c, * osf-core.c, * srec.c, * vms-alpha.c: Standardize
2759 error/warning messages.
2761 2018-02-26 Alan Modra <amodra@gmail.com>
2763 * archive.c, * bfd.c, * linker.c, * reloc.c, * stabs.c,
2764 * syms.c: Standardize error/warning messages.
2766 2018-02-26 Alan Modra <amodra@gmail.com>
2768 * aout-adobe.c, * aout-cris.c, * i386linux.c, * m68klinux.c,
2769 * sparclinux.c, * coff-alpha.c, * coff-arm.c, * coff-mcore.c,
2770 * coffcode.h, * coffgen.c, * cofflink.c, * ecoff.c, * pe-mips.c,
2771 * peXXigen.c, * peicode.h: Standardize error/warning messages.
2773 2018-02-26 Alan Modra <amodra@gmail.com>
2775 * elf32-arm.c, * elfnn-aarch64.c: Standardize error/warning messages.
2777 2018-02-26 Alan Modra <amodra@gmail.com>
2779 * elfxx-mips.c: Standardize error/warning messages.
2781 2018-02-26 Alan Modra <amodra@gmail.com>
2783 * dwarf2.c, * elf-attrs.c, * elf-eh-frame.c, * elf.c, * elf32-gen.c,
2784 * elflink.c: Standardize error/warning messages. Replace use of
2785 linker callback einfo with _bfd_error_handler when possible.
2787 2018-02-26 Alan Modra <amodra@gmail.com>
2789 * aoutx.h, * coff-alpha.c, * coff-i860.c, * coff-m68k.c,
2790 * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c,
2791 * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-w65.c,
2792 * elf-bfd.h, * elf-m10300.c, * elf.c, * elf32-avr.c, * elf32-bfin.c,
2793 * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c,
2794 * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c,
2795 * elf32-fr30.c, * elf32-frv.c, * elf32-i370.c, * elf32-i386.c,
2796 * elf32-i960.c, * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c,
2797 * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c,
2798 * elf32-m68k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c,
2799 * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c,
2800 * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-or1k.c,
2801 * elf32-pj.c, * elf32-ppc.c, * elf32-rl78.c, * elf32-rx.c,
2802 * elf32-s390.c, * elf32-sh.c, * elf32-spu.c, * elf32-tic6x.c,
2803 * elf32-v850.c, * elf32-vax.c, * elf32-visium.c, * elf32-wasm32.c,
2804 * elf32-xgate.c, * elf32-xtensa.c, * elf64-alpha.c,
2805 * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c,
2806 * elf64-ppc.c, * elf64-s390.c, * elf64-sparc.c, * elf64-x86-64.c,
2807 * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c,
2808 * elfnn-riscv.c, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-riscv.h,
2809 * elfxx-sparc.c, * elfxx-sparc.h, * reloc.c: Standardize
2810 unrecognized/unsupported reloc message.
2812 2018-02-26 Alan Modra <amodra@gmail.com>
2814 * elf32-ppc.c: Standardize error/warning messages. Use
2815 _bfd_error_handler rather than einfo when einfo features not used.
2816 * elf64-ppc.c: Likewise.
2818 2018-02-23 Alan Modra <amodra@gmail.com>
2821 * elf.c (assign_file_positions_for_non_load_sections): Remove RELRO
2822 segment if no matching LOAD segment.
2824 2018-02-23 Kuan-Lin Chen <kuanlinchentw@gmail.com>
2826 * elf32-nds32.h: Define mask for ict_model.
2828 2018-02-20 Jason Duerstock <jason.duerstock@gmail.com>
2830 * elfnn-ia64.c (elf_backend_can_gc_sections): Enable.
2832 2018-02-19 Maciej W. Rozycki <macro@mips.com>
2835 2018-01-12 Vlad Ivanov <vlad@ivanov.email>
2837 * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
2838 .reginfo section has wrong size.
2840 2018-02-19 Maciej W. Rozycki <macro@mips.com>
2842 * elfxx-mips.c (_bfd_mips_elf_always_size_sections): Set
2843 SEC_FIXED_SIZE and SEC_HAS_CONTENTS flags for `.reginfo' and
2844 `.MIPS.abiflags' sections.
2845 (_bfd_mips_elf_final_link): Avoid reading beyond `.reginfo'
2848 2018-02-19 Maciej W. Rozycki <macro@mips.com>
2850 * section.c (SEC_FIXED_SIZE): New macro.
2851 * bfd-in2.h: Regenerate.
2853 2018-02-19 Maciej W. Rozycki <macro@mips.com>
2855 * section.c (SEC_HAS_GOT_REF): Remove macro.
2856 * bfd-in2.h: Regenerate.
2858 2018-02-19 Alan Modra <amodra@gmail.com>
2860 * elf-attrs.c (_bfd_elf_parse_attributes): Correct _bfd_error_handler
2862 * elfxx-mips.c (_bfd_mips_elf_final_link): Likewise.
2863 * elfnn-riscv.c (_bfd_riscv_relax_align): Likewise.
2864 (_bfd_riscv_relax_pc): Likewise and fix typos.
2865 * libbfd-in.h (_bfd_error_handler): Add attribute printf.
2866 * libbfd.h: Regenerate.
2868 2018-02-19 Alan Modra <amodra@gmail.com>
2870 * dwarf2.c (read_section): Don't use 'll' format modifier.
2871 (find_abstract_instance): Likewise.
2872 * elfcore.h (elf_core_file_p): Likewise.
2874 2018-02-19 Alan Modra <amodra@gmail.com>
2876 * bfd-in.h: Include inttypes.h or if not available define
2877 PRId64, PRIu64 and PRIx64.
2878 * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Remove support for L
2879 modifier to print bfd_vma.
2880 * coff-arm.c, * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c,
2881 * coff-sh.c, * coff-tic80.c, * coffcode.h, * coffgen.c, * cofflink.c,
2882 * compress.c, * dwarf2.c, * elf-m10300.c, * elf.c, * elf32-arc.c,
2883 * elf32-arm.c, * elf32-bfin.c, * elf32-cris.c, * elf32-hppa.c,
2884 * elf32-i386.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32r.c,
2885 * elf32-m68k.c, * elf32-metag.c, * elf32-nds32.c, * elf32-nios2.c,
2886 * elf32-ppc.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c,
2887 * elf32-score7.c, * elf32-sh.c, * elf32-sh64.c, * elf32-spu.c,
2888 * elf32-tic6x.c, * elf32-tilepro.c, * elf32-v850.c, * elf32-vax.c,
2889 * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c,
2890 * elf64-mmix.c, * elf64-s390.c, * elf64-sh64.c, * elf64-x86-64.c,
2891 * elfcode.h, * elfcore.h, * elflink.c, * elfnn-aarch64.c,
2892 * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-mips.c, * elfxx-sparc.c,
2893 * elfxx-tilegx.c, * ieee.c, * ihex.c, * mach-o.c, * merge.c, * mmo.c,
2894 * peXXigen.c, * xcofflink.c: Replace use of Lx modifier with PRIx64,
2895 and cast input to uint64_t, and similarly for Ld and Lu.
2896 * bfd-in2.h: Regenerate.
2898 2018-02-19 Alan Modra <amodra@gmail.com>
2900 * elf32-arm.c, * elf32-hppa.c, * elf32-lm32.c, * elf32-m32r.c,
2901 * elf32-metag.c, * elf32-nds32.c, * elf32-or1k.c, * elf32-ppc.c,
2902 * elf32-s390.c, * elf32-sh.c, * elf32-tic6x.c, * elf32-tilepro.c,
2903 * elf64-ppc.c, * elf64-s390.c, * elflink.c, * elfnn-aarch64.c,
2904 * elfnn-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c,
2905 * reloc.c: Replace use of %R and %T in format strings passed to
2906 einfo and friends by %pR and %pT.
2908 2018-02-19 Alan Modra <amodra@gmail.com>
2910 * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Handle %pA and %pB in place
2912 * aout-adobe.c: Update all messages using %A and %B.
2913 * aout-cris.c: Likewise.
2914 * aoutx.h: Likewise.
2915 * archive.c: Likewise.
2916 * binary.c: Likewise.
2917 * cache.c: Likewise.
2918 * coff-alpha.c: Likewise.
2919 * coff-arm.c: Likewise.
2920 * coff-i860.c: Likewise.
2921 * coff-mcore.c: Likewise.
2922 * coff-ppc.c: Likewise.
2923 * coff-rs6000.c: Likewise.
2924 * coff-sh.c: Likewise.
2925 * coff-tic4x.c: Likewise.
2926 * coff-tic54x.c: Likewise.
2927 * coff-tic80.c: Likewise.
2928 * coff64-rs6000.c: Likewise.
2929 * coffcode.h: Likewise.
2930 * coffgen.c: Likewise.
2931 * cofflink.c: Likewise.
2932 * coffswap.h: Likewise.
2933 * compress.c: Likewise.
2934 * cpu-arm.c: Likewise.
2935 * ecoff.c: Likewise.
2936 * elf-attrs.c: Likewise.
2937 * elf-eh-frame.c: Likewise.
2938 * elf-ifunc.c: Likewise.
2939 * elf-m10300.c: Likewise.
2940 * elf-properties.c: Likewise.
2941 * elf-s390-common.c: Likewise.
2943 * elf32-arc.c: Likewise.
2944 * elf32-arm.c: Likewise.
2945 * elf32-avr.c: Likewise.
2946 * elf32-bfin.c: Likewise.
2947 * elf32-cr16.c: Likewise.
2948 * elf32-cr16c.c: Likewise.
2949 * elf32-cris.c: Likewise.
2950 * elf32-crx.c: Likewise.
2951 * elf32-d10v.c: Likewise.
2952 * elf32-d30v.c: Likewise.
2953 * elf32-epiphany.c: Likewise.
2954 * elf32-fr30.c: Likewise.
2955 * elf32-frv.c: Likewise.
2956 * elf32-gen.c: Likewise.
2957 * elf32-hppa.c: Likewise.
2958 * elf32-i370.c: Likewise.
2959 * elf32-i386.c: Likewise.
2960 * elf32-i960.c: Likewise.
2961 * elf32-ip2k.c: Likewise.
2962 * elf32-iq2000.c: Likewise.
2963 * elf32-lm32.c: Likewise.
2964 * elf32-m32c.c: Likewise.
2965 * elf32-m32r.c: Likewise.
2966 * elf32-m68hc11.c: Likewise.
2967 * elf32-m68hc12.c: Likewise.
2968 * elf32-m68hc1x.c: Likewise.
2969 * elf32-m68k.c: Likewise.
2970 * elf32-mcore.c: Likewise.
2971 * elf32-mep.c: Likewise.
2972 * elf32-metag.c: Likewise.
2973 * elf32-microblaze.c: Likewise.
2974 * elf32-moxie.c: Likewise.
2975 * elf32-msp430.c: Likewise.
2976 * elf32-mt.c: Likewise.
2977 * elf32-nds32.c: Likewise.
2978 * elf32-nios2.c: Likewise.
2979 * elf32-or1k.c: Likewise.
2980 * elf32-pj.c: Likewise.
2981 * elf32-ppc.c: Likewise.
2982 * elf32-rl78.c: Likewise.
2983 * elf32-rx.c: Likewise.
2984 * elf32-s390.c: Likewise.
2985 * elf32-score.c: Likewise.
2986 * elf32-score7.c: Likewise.
2987 * elf32-sh-symbian.c: Likewise.
2988 * elf32-sh.c: Likewise.
2989 * elf32-sh64.c: Likewise.
2990 * elf32-sparc.c: Likewise.
2991 * elf32-spu.c: Likewise.
2992 * elf32-tic6x.c: Likewise.
2993 * elf32-tilepro.c: Likewise.
2994 * elf32-v850.c: Likewise.
2995 * elf32-vax.c: Likewise.
2996 * elf32-visium.c: Likewise.
2997 * elf32-wasm32.c: Likewise.
2998 * elf32-xgate.c: Likewise.
2999 * elf32-xtensa.c: Likewise.
3000 * elf64-alpha.c: Likewise.
3001 * elf64-gen.c: Likewise.
3002 * elf64-hppa.c: Likewise.
3003 * elf64-ia64-vms.c: Likewise.
3004 * elf64-mmix.c: Likewise.
3005 * elf64-ppc.c: Likewise.
3006 * elf64-s390.c: Likewise.
3007 * elf64-sh64.c: Likewise.
3008 * elf64-sparc.c: Likewise.
3009 * elf64-x86-64.c: Likewise.
3010 * elfcode.h: Likewise.
3011 * elfcore.h: Likewise.
3012 * elflink.c: Likewise.
3013 * elfnn-aarch64.c: Likewise.
3014 * elfnn-ia64.c: Likewise.
3015 * elfnn-riscv.c: Likewise.
3016 * elfxx-mips.c: Likewise.
3017 * elfxx-sparc.c: Likewise.
3018 * elfxx-tilegx.c: Likewise.
3019 * elfxx-x86.c: Likewise.
3020 * hpux-core.c: Likewise.
3023 * libbfd.c: Likewise.
3024 * linker.c: Likewise.
3025 * mach-o.c: Likewise.
3026 * merge.c: Likewise.
3028 * oasys.c: Likewise.
3029 * pdp11.c: Likewise.
3030 * pe-mips.c: Likewise.
3031 * peXXigen.c: Likewise.
3032 * peicode.h: Likewise.
3033 * reloc.c: Likewise.
3034 * rs6000-core.c: Likewise.
3036 * stabs.c: Likewise.
3037 * vms-alpha.c: Likewise.
3038 * xcofflink.c: Likewise.
3040 2018-02-19 Alan Modra <amodra@gmail.com>
3043 * elf.c (IS_TBSS): Define.
3044 (_bfd_elf_map_sections_to_segments): Use IS_TBSS.
3045 (assign_file_positions_for_non_load_sections): Revert last change.
3046 Properly calculate load segment limits to compare against relro limits.
3048 2018-02-17 Alan Modra <amodra@gmail.com>
3051 * elf.c (assign_file_positions_for_non_load_sections): Ignore
3052 degenerate zero size PT_LOAD segments when finding one overlapping
3053 the PT_GNU_RELRO segment.
3055 2018-02-16 Alan Modra <amodra@gmail.com>
3057 * libbfd.c (_bfd_bool_bfd_false_error): Rename from bfd_false.
3058 (_bfd_bool_bfd_true): Rename from bfd_true.
3059 (_bfd_ptr_bfd_null_error): Rename from bfd_nullvoidptr.
3060 (_bfd_int_bfd_0): Rename from bfd_0.
3061 (_bfd_uint_bfd_0): Rename from bfd_0u.
3062 (_bfd_long_bfd_0): Rename from bfd_0l.
3063 (_bfd_long_bfd_n1_error): Rename from _bfd_n1.
3064 (_bfd_void_bfd): Rename from bfd_void.
3065 (_bfd_bool_bfd_false, _bfd_bool_bfd_asymbol_false),
3066 (_bfd_bool_bfd_link_false_error),
3067 (_bfd_bool_bfd_link_true, _bfd_bool_bfd_bfd_true),
3068 (_bfd_bool_bfd_uint_true, _bfd_bool_bfd_ptr_true),
3069 (_bfd_bool_bfd_asection_bfd_asection_true),
3070 (_bfd_bool_bfd_asymbol_bfd_asymbol_true),
3071 (_bfd_void_bfd_link, _bfd_void_bfd_asection): New functions.
3072 * archive.c (_bfd_noarchive_get_elt_at_index),
3073 (_bfd_noarchive_openr_next_archived_file),
3074 (_bfd_noarchive_construct_extended_name_table),
3075 (_bfd_noarchive_write_ar_hdr, _bfd_noarchive_truncate_arname),
3076 (_bfd_noarchive_write_armap): New functions.
3077 * archures.c (_bfd_nowrite_set_arch_mach): New function.
3078 * coff-alpha.c (alpha_ecoff_swap_coff_aux_in),
3079 (alpha_ecoff_swap_coff_sym_in, alpha_ecoff_swap_coff_lineno_in),
3080 (alpha_ecoff_swap_coff_aux_out, alpha_ecoff_swap_coff_sym_out),
3081 (alpha_ecoff_swap_coff_lineno_out),
3082 (alpha_ecoff_swap_coff_reloc_out): New functions.
3083 * coff-mips.c (mips_ecoff_swap_coff_aux_in),
3084 (mips_ecoff_swap_coff_sym_in, mips_ecoff_swap_coff_lineno_in),
3085 (mips_ecoff_swap_coff_aux_out, mips_ecoff_swap_coff_sym_out),
3086 (mips_ecoff_swap_coff_lineno_out),
3087 (mips_ecoff_swap_coff_reloc_out): New functions.
3088 * coffcode.h (coff_set_alignment_hook): Replace define with
3090 (symname_in_debug_hook): Likewise.
3091 * ecoff.c (_bfd_ecoff_set_alignment_hook): New function.
3092 * elfxx-target.h (elf_backend_allow_non_load_phdr): Default to 0.
3093 * elf.c (assign_file_positions_except_relocs): Test
3094 elf_backend_allow_non_load_phdr for NULL.
3095 * elflink.c (_bfd_elf_omit_section_dynsym_default): Rename from
3096 _bfd_elf_link_omit_section_dynsym. Update uses.
3097 (_bfd_elf_omit_section_dynsym_all): New function.
3098 * elf-bfd.h (_bfd_elf_link_omit_section_dynsym): Delete.
3099 (_bfd_elf_omit_section_dynsym_default): Declare.
3100 (_bfd_elf_omit_section_dynsym_all): Declare.
3101 * linker.c (_bfd_nolink_sizeof_headers, _bfd_nolink_bfd_relax_section),
3102 (_bfd_nolink_bfd_get_relocated_section_contents),
3103 (_bfd_nolink_bfd_lookup_section_flags),
3104 (_bfd_nolink_bfd_is_group_section, _bfd_nolink_bfd_discard_group),
3105 (_bfd_nolink_bfd_link_hash_table_create),
3106 (_bfd_nolink_bfd_link_just_syms),
3107 (_bfd_nolink_bfd_copy_link_hash_symbol_type),
3108 (_bfd_nolink_bfd_link_split_section),
3109 (_bfd_nolink_section_already_linked),
3110 (_bfd_nolink_bfd_define_common_symbol),
3111 (_bfd_nolink_bfd_define_start_stop): New functions.
3112 * reloc.c (_bfd_norelocs_bfd_reloc_type_lookup),
3113 (_bfd_norelocs_bfd_reloc_name_lookup),
3114 (_bfd_nodynamic_canonicalize_dynamic_reloc): New functions.
3115 * section.c (_bfd_nowrite_set_section_contents): New function.
3116 * syms.c (_bfd_nosymbols_canonicalize_symtab),
3117 (_bfd_nosymbols_print_symbol, _bfd_nosymbols_get_symbol_info),
3118 (_bfd_nosymbols_get_symbol_version_string),
3119 (_bfd_nosymbols_bfd_is_local_label_name),
3120 (_bfd_nosymbols_get_lineno, _bfd_nosymbols_find_nearest_line),
3121 (_bfd_nosymbols_find_line, _bfd_nosymbols_find_inliner_info),
3122 (_bfd_nosymbols_bfd_make_debug_symbol),
3123 ( _bfd_nosymbols_read_minisymbols),
3124 ( _bfd_nosymbols_minisymbol_to_symbol),
3125 (_bfd_nodynamic_get_synthetic_symtab): New functions.
3126 * libbfd-in.h: Declare new functions. Update existing defines,
3128 * aix386-core.c: Update to use new hooks. Formatting.
3129 * aout-adobe.c: Likewise.
3130 * aout-arm.c: Likewise.
3131 * aout-target.h: Likewise.
3132 * aout-tic30.c: Likewise.
3133 * aoutf1.h: Likewise.
3134 * binary.c: Likewise.
3136 * cisco-core.c: Likewise.
3137 * coff-alpha.c: Likewise.
3138 * coff-i386.c: Likewise.
3139 * coff-i860.c: Likewise.
3140 * coff-i960.c: Likewise.
3141 * coff-ia64.c: Likewise.
3142 * coff-mips.c: Likewise.
3143 * coff-ppc.c: Likewise.
3144 * coff-rs6000.c: Likewise.
3145 * coff-sh.c: Likewise.
3146 * coff-tic30.c: Likewise.
3147 * coff-tic54x.c: Likewise.
3148 * coff-x86_64.c: Likewise.
3149 * coff64-rs6000.c: Likewise.
3150 * coffcode.h: Likewise.
3151 * elf-m10300.c: Likewise.
3152 * elf32-cr16.c: Likewise.
3153 * elf32-lm32.c: Likewise.
3154 * elf32-m32r.c: Likewise.
3155 * elf32-metag.c: Likewise.
3156 * elf32-score.c: Likewise.
3157 * elf32-score7.c: Likewise.
3158 * elf32-tilepro.c: Likewise.
3159 * elf32-xstormy16.c: Likewise.
3160 * elf32-xtensa.c: Likewise.
3161 * elf64-alpha.c: Likewise.
3162 * elf64-hppa.c: Likewise.
3163 * elf64-ia64-vms.c: Likewise.
3164 * elf64-mmix.c: Likewise.
3165 * elf64-sh64.c: Likewise.
3166 * elfnn-ia64.c: Likewise.
3167 * elfxx-sparc.c: Likewise.
3168 * elfxx-target.h: Likewise.
3169 * elfxx-tilegx.c: Likewise.
3170 * elfxx-x86.h: Likewise.
3171 * hp300hpux.c: Likewise.
3172 * hppabsd-core.c: Likewise.
3173 * hpux-core.c: Likewise.
3174 * i386msdos.c: Likewise.
3175 * i386os9k.c: Likewise.
3178 * irix-core.c: Likewise.
3179 * libaout.h: Likewise.
3180 * libecoff.h: Likewise.
3181 * mach-o-target.c: Likewise.
3182 * mach-o.c: Likewise.
3183 * mipsbsd.c: Likewise.
3185 * netbsd-core.c: Likewise.
3186 * nlm-target.h: Likewise.
3187 * oasys.c: Likewise.
3188 * osf-core.c: Likewise.
3189 * pdp11.c: Likewise.
3190 * pe-mips.c: Likewise.
3191 * pe-x86_64.c: Likewise.
3193 * plugin.c: Likewise.
3194 * ppcboot.c: Likewise.
3195 * ptrace-core.c: Likewise.
3196 * sco5-core.c: Likewise.
3198 * sparclynx.c: Likewise.
3200 * tekhex.c: Likewise.
3201 * trad-core.c: Likewise.
3202 * verilog.c: Likewise.
3203 * versados.c: Likewise.
3204 * vms-alpha.c: Likewise.
3205 * vms-lib.c: Likewise.
3206 * wasm-module.c: Likewise.
3208 * libbfd.h: Regenerate.
3210 2018-02-15 Jim Wilson <jimw@sifive.com>
3212 * elfnn-riscv.c (_bfd_riscv_relax_section): Ifdef out check to ignore
3213 symbols whose section address is zero.
3215 * elfnn-riscv.c (riscv_elf_relocate_section): Use bfd_reloc_dangerous
3216 when pcrel_lo reloc has an addend. Use reloc_dangerous callback for
3217 bfd_reloc_dangerous. Use einfo instead of warning callback for errors.
3218 Add %X%P to error messages.
3220 2018-02-15 Eric Botcazou <ebotcazou@adacore.com>
3223 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
3224 Pass FALSE instead of TRUE as 'create' argument to bfd_link_hash_lookup
3225 and assert that the result of the call is not NULL.
3227 2018-02-14 Nick Clifton <nickc@redhat.com>
3230 Revert previous delta. Add extra casts to avoid compile time
3232 * libbfd-in.h (_bfd_generic_bfd_copy_private_bfd_data): Add extra
3233 cast to avoid warning from gcc v8 compiler.
3234 (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
3235 (_bfd_generic_bfd_set_private_flags): Likewise.
3236 (_bfd_generic_bfd_copy_private_section_data): Likewise.
3237 (_bfd_generic_bfd_copy_private_symbol_data): Likewise.
3238 (_bfd_generic_bfd_copy_private_header_data): Likewise.
3239 (_bfd_generic_bfd_print_private_bfd_data): Likewise.
3240 (_bfd_noarchive_construct_extended_name_table): Likewise.
3241 (_bfd_noarchive_truncate_arname): Likewise.
3242 (_bfd_noarchive_write_ar_hdr): Likewise.
3243 (_bfd_noarchive_get_elt_at_index): Likewise.
3244 (_bfd_nosymbols_canonicalize_symtab): Likewise.
3245 (_bfd_nosymbols_print_symbol): Likewise.
3246 (_bfd_nosymbols_get_symbol_info): Likewise.
3247 (_bfd_nosymbols_get_symbol_version_string): Likewise.
3248 (_bfd_nosymbols_bfd_is_local_label_name): Likewise.
3249 (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise.
3250 (_bfd_nosymbols_get_lineno): Likewise.
3251 (_bfd_nosymbols_find_nearest_line): Likewise.
3252 (_bfd_nosymbols_find_line): Likewise.
3253 (_bfd_nosymbols_find_inliner_info): Likewise.
3254 (_bfd_nosymbols_bfd_make_debug_symbol): Likewise.
3255 (_bfd_nosymbols_read_minisymbols): Likewise.
3256 (_bfd_nosymbols_minisymbol_to_symbol): Likewise.
3257 (_bfd_norelocs_bfd_reloc_type_lookup): Likewise.
3258 (_bfd_norelocs_bfd_reloc_name_lookup): Likewise.
3259 (_bfd_nowrite_set_arch_mach): Likewise.
3260 (_bfd_nowrite_set_section_contents): Likewise.
3261 (_bfd_nolink_sizeof_headers): Likewise.
3262 (_bfd_nolink_bfd_get_relocated_section_contents): Likewise.
3263 (_bfd_nolink_bfd_relax_section): Likewise.
3264 (_bfd_nolink_bfd_gc_sections): Likewise.
3265 (_bfd_nolink_bfd_lookup_section_flags): Likewise.
3266 (_bfd_nolink_bfd_merge_sections): Likewise.
3267 (_bfd_nolink_bfd_is_group_section): Likewise.
3268 (_bfd_nolink_bfd_discard_group): Likewise.
3269 (_bfd_nolink_bfd_link_hash_table_create): Likewise.
3270 (_bfd_nolink_bfd_link_add_symbols): Likewise.
3271 (_bfd_nolink_bfd_link_just_syms): Likewise.
3272 (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise.
3273 (_bfd_nolink_bfd_final_link): Likewise.
3274 (_bfd_nolink_bfd_link_split_section): Likewise.
3275 (_bfd_nolink_section_already_linked): Likewise.
3276 (_bfd_nolink_bfd_define_common_symbol): Likewise.
3277 (_bfd_nolink_bfd_define_start_stop): Likewise.
3278 (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise.
3279 (_bfd_nodynamic_get_synthetic_symtab): Likewise.
3280 (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise.
3281 (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise.
3282 * libbfd.c (bfd_false_any): Delete.
3283 (bfd_true_any, bfd_nullvoidptr_any, bfd_0_any): Delete.
3284 (bfd_0u_any, bfd_0l_any, _bfd_n1_any, bfd_void_any): Delete.
3285 * libbfd.h (extern): Regenerate
3286 * aout-target.h (MY_bfd_is_target_special_symbol): Add extra
3287 cast to avoid warning from gcc v8 compiler.
3288 * aout-tic30.c (tic30_aout_set_arch_mach): Likewise.
3289 * binary.c (binary_get_symbol_info): Likewise.
3290 * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
3291 * coff-mips.c (mips_ecoff_backend_data): Likewise.
3292 * coffcode.h (coff_set_alignment_hook): Likewise.
3293 (symname_in_debug_hook): Likewise.
3294 (bfd_coff_backend_data bigobj_swap_table): Likewise.
3295 * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise.
3296 * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise.
3297 * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise.
3298 * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise.
3299 * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise.
3300 * elf32-score.c (elf_backend_omit_section_dynsym): Likewise.
3301 * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise.
3302 * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise.
3303 * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise.
3304 * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise.
3305 * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise.
3306 * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise.
3307 * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise.
3308 * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise.
3309 * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise.
3310 * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise.
3311 (bfd_elfNN_bfd_make_debug_symbol): Likewise.
3312 (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
3313 (bfd_elfNN_bfd_set_private_flags): Likewise.
3314 (bfd_elfNN_bfd_is_target_special_symbol): Likewise.
3315 (elf_backend_init_index_section): Likewise.
3316 (elf_backend_allow_non_load_phdr): Likewise.
3317 * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise.
3318 * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise.
3319 * ieee.c (ieee_construct_extended_name_table): Likewise.
3320 (ieee_write_armap): Likewise.
3321 (ieee_write_ar_hdr): Likewise.
3322 (ieee_bfd_is_target_special_symbol): Likewise.
3323 * ihex.c (ihex_canonicalize_symtab): Likewise.
3324 (ihex_bfd_is_target_special_symbol): Likewise.
3325 * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise.
3326 * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise.
3327 (_bfd_ecoff_set_alignment_hook): Likewise.
3328 * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise.
3329 * mmo.c (mmo_bfd_is_target_special_symbol): Likewise.
3330 * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise.
3331 * oasys.c (oasys_construct_extended_name_table): Likewise.
3332 (oasys_write_armap): Likewise.
3333 (oasys_write_ar_hdr): Likewise.
3334 (oasys_bfd_is_target_special_symbol): Likewise.
3335 * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise.
3336 * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise.
3337 * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise.
3338 * som.c (som_bfd_is_target_special_symbol): Likewise.
3339 * srec.c (srec_bfd_is_target_special_symbol): Likewise.
3340 * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise.
3341 * verilog.c (verilog_bfd_is_target_special_symbol): Likewise.
3342 * versados.c (versados_bfd_is_target_special_symbol): Likewise.
3343 (versados_bfd_reloc_name_lookup): Likewise.
3344 * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise.
3345 (vms_bfd_define_start_stop): Likewise.
3346 (alpha_vms_bfd_is_target_special_symbol): Likewise.
3347 * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise.
3348 * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise.
3350 2018-02-14 H.J. Lu <hongjiu.lu@intel.com>
3353 * elf32-i386.c (elf_i386_check_relocs): Pass FALSE for non
3354 PC-relative PLT to NEED_DYNAMIC_RELOCATION_P.
3355 * elf64-x86-64.c (elf_x86_64_check_relocs): Create PLT for
3356 R_X86_64_PC32 reloc against dynamic function in data section.
3357 Pass TRUE for PC-relative PLT to NEED_DYNAMIC_RELOCATION_P.
3358 (elf_x86_64_relocate_section): Use PLT for R_X86_64_PC32 reloc
3359 against dynamic function in data section.
3360 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Use PLT in PIE as
3361 function address only if pcrel_plt is true.
3362 (_bfd_x86_elf_link_hash_table_create): Set pcrel_plt.
3363 * elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): Add PCREL_PLT for
3364 PC-relative PLT. If PLT is PC-relative, don't generate dynamic
3365 PC-relative relocation against a function definition in data
3366 secton in PIE. Remove the obsolete comments.
3367 (elf_x86_link_hash_table): Add pcrel_plt.
3369 2018-02-13 H.J. Lu <hongjiu.lu@intel.com>
3371 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Check bfd_link_dll,
3372 instead of bfd_link_pic, for building shared library.
3374 2018-02-13 H.J. Lu <hongjiu.lu@intel.com>
3377 * elf64-x86-64.c (is_32bit_relative_branch): Removed.
3378 (elf_x86_64_relocate_section): Check PIC relocations in PIE.
3379 Remove is_32bit_relative_branch usage. Disallow PC32 reloc
3380 against protected function in shared object.
3382 2018-02-13 Sergei Trofimovich <slyfox@inbox.ru>
3385 * po/ru.po: Fix typo in Russian translation.
3387 2018-02-13 Maciej W. Rozycki <macro@mips.com>
3389 * wasm-module.c (wasm_scan_name_function_section): Rename
3390 `index' local variable to `idx'.
3392 2018-02-13 Nick Clifton <nickc@redhat.com>
3395 Fix compile time warnings generated by gcc version 8.
3396 * libbfd-in.h: Remove extraneous text from prototypes.
3397 Add prototypes for bfd_false_any, bfd_true_any,
3398 bfd_nullvoidptr_any, bfd_0_any, bfd_0u_any, bfd_0l_any,
3399 bfd_n1_any, bfd_void_any.
3400 (_bfd_generic_bfd_copy_private_bfd_data): Use vararg based dummy
3402 (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
3403 (_bfd_generic_bfd_set_private_flags): Likewise.
3404 (_bfd_generic_bfd_copy_private_section_data): Likewise.
3405 (_bfd_generic_bfd_copy_private_symbol_data): Likewise.
3406 (_bfd_generic_bfd_copy_private_header_data): Likewise.
3407 (_bfd_generic_bfd_print_private_bfd_data): Likewise.
3408 (_bfd_noarchive_construct_extended_name_table): Likewise.
3409 (_bfd_noarchive_truncate_arname): Likewise.
3410 (_bfd_noarchive_write_ar_hdr): Likewise.
3411 (_bfd_noarchive_get_elt_at_index): Likewise.
3412 (_bfd_nosymbols_canonicalize_symtab): Likewise.
3413 (_bfd_nosymbols_print_symbol): Likewise.
3414 (_bfd_nosymbols_get_symbol_info): Likewise.
3415 (_bfd_nosymbols_get_symbol_version_string): Likewise.
3416 (_bfd_nosymbols_bfd_is_local_label_name): Likewise.
3417 (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise.
3418 (_bfd_nosymbols_get_lineno): Likewise.
3419 (_bfd_nosymbols_find_nearest_line): Likewise.
3420 (_bfd_nosymbols_find_line): Likewise.
3421 (_bfd_nosymbols_find_inliner_info): Likewise.
3422 (_bfd_nosymbols_bfd_make_debug_symbol): Likewise.
3423 (_bfd_nosymbols_read_minisymbols): Likewise.
3424 (_bfd_nosymbols_minisymbol_to_symbol): Likewise.
3425 (_bfd_norelocs_bfd_reloc_type_lookup): Likewise.
3426 (_bfd_norelocs_bfd_reloc_name_lookup): Likewise.
3427 (_bfd_nowrite_set_arch_mach): Likewise.
3428 (_bfd_nowrite_set_section_contents): Likewise.
3429 (_bfd_nolink_sizeof_headers): Likewise.
3430 (_bfd_nolink_bfd_get_relocated_section_contents): Likewise.
3431 (_bfd_nolink_bfd_relax_section): Likewise.
3432 (_bfd_nolink_bfd_gc_sections): Likewise.
3433 (_bfd_nolink_bfd_lookup_section_flags): Likewise.
3434 (_bfd_nolink_bfd_merge_sections): Likewise.
3435 (_bfd_nolink_bfd_is_group_section): Likewise.
3436 (_bfd_nolink_bfd_discard_group): Likewise.
3437 (_bfd_nolink_bfd_link_hash_table_create): Likewise.
3438 (_bfd_nolink_bfd_link_add_symbols): Likewise.
3439 (_bfd_nolink_bfd_link_just_syms): Likewise.
3440 (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise.
3441 (_bfd_nolink_bfd_final_link): Likewise.
3442 (_bfd_nolink_bfd_link_split_section): Likewise.
3443 (_bfd_nolink_section_already_linked): Likewise.
3444 (_bfd_nolink_bfd_define_common_symbol): Likewise.
3445 (_bfd_nolink_bfd_define_start_stop): Likewise.
3446 (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise.
3447 (_bfd_nodynamic_get_synthetic_symtab): Likewise.
3448 (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise.
3449 (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise.
3450 * libbfd.c (bfd_false_any): New function. Like bfd_false but
3451 accepts one or more arguments.
3452 (bfd_true_any): Likewise.
3453 (bfd_nullvoidptr_any): Likewise.
3454 (bfd_0_any): Likewise.
3455 (bfd_0u_any): Likewise.
3456 (bfd_0l_any): Likewise.
3457 (_bfd_n1_any): Likewise.
3458 (bfd_void_any): Likewise.
3459 * libbfd.h (extern): Regenerate
3460 * aout-target.h (MY_bfd_is_target_special_symbol): Use vararg
3461 based dummy function.
3462 * aout-tic30.c (tic30_aout_set_arch_mach): Likewise.
3463 * binary.c (binary_get_symbol_info): Likewise.
3464 * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
3465 * coff-mips.c (mips_ecoff_backend_data): Likewise.
3466 * coffcode.h (coff_set_alignment_hook): Likewise.
3467 (symname_in_debug_hook): Likewise.
3468 (bfd_coff_backend_data bigobj_swap_table): Likewise.
3469 * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise.
3470 * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise.
3471 * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise.
3472 * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise.
3473 * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise.
3474 * elf32-score.c (elf_backend_omit_section_dynsym): Likewise.
3475 * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise.
3476 * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise.
3477 * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise.
3478 * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise.
3479 * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise.
3480 * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise.
3481 * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise.
3482 * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise.
3483 * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise.
3484 * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise.
3485 (bfd_elfNN_bfd_make_debug_symbol): Likewise.
3486 (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
3487 (bfd_elfNN_bfd_set_private_flags): Likewise.
3488 (bfd_elfNN_bfd_is_target_special_symbol): Likewise.
3489 (elf_backend_init_index_section): Likewise.
3490 (elf_backend_allow_non_load_phdr): Likewise.
3491 * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise.
3492 * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise.
3493 * ieee.c (ieee_construct_extended_name_table): Likewise.
3494 (ieee_write_armap): Likewise.
3495 (ieee_write_ar_hdr): Likewise.
3496 (ieee_bfd_is_target_special_symbol): Likewise.
3497 * ihex.c (ihex_canonicalize_symtab): Likewise.
3498 (ihex_bfd_is_target_special_symbol): Likewise.
3499 * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise.
3500 * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise.
3501 (_bfd_ecoff_set_alignment_hook): Likewise.
3502 * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise.
3503 * mmo.c (mmo_bfd_is_target_special_symbol): Likewise.
3504 * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise.
3505 * oasys.c (oasys_construct_extended_name_table): Likewise.
3506 (oasys_write_armap): Likewise.
3507 (oasys_write_ar_hdr): Likewise.
3508 (oasys_bfd_is_target_special_symbol): Likewise.
3509 * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise.
3510 * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise.
3511 * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise.
3512 * som.c (som_bfd_is_target_special_symbol): Likewise.
3513 * srec.c (srec_bfd_is_target_special_symbol): Likewise.
3514 * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise.
3515 * verilog.c (verilog_bfd_is_target_special_symbol): Likewise.
3516 * versados.c (versados_bfd_is_target_special_symbol): Likewise.
3517 (versados_bfd_reloc_name_lookup): Likewise.
3518 * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise.
3519 (vms_bfd_define_start_stop): Likewise.
3520 (alpha_vms_bfd_is_target_special_symbol): Likewise.
3521 * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise.
3522 * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise.
3523 * elf32-arc.c (get_replace_function): Assign replacement function
3525 * elf32-i370.c (i370_noop): Update prototype.
3527 2018-02-13 Alan Modra <amodra@gmail.com>
3530 * elf.c (_bfd_elf_fixup_group_sections): Account for removed
3531 relocation sections. If size reduces to just the flag word,
3532 remove that too and mark with SEC_EXCLUDE.
3533 * elflink.c (bfd_elf_final_link): Strip empty group sections.
3535 2018-02-13 Alan Modra <amodra@gmail.com>
3538 * elf.c (assign_file_positions_for_non_load_sections): Rewrite
3541 2018-02-12 Zebediah Figura <z.figura12@gmail.com>
3543 * i386msdos.c (msdos_mkobject); New function.
3544 (msdos_object_p): New function.
3545 (i386_msdos_vec): Use msdos_object_p as the check_format
3547 * peicode.h: Rename external_PEI_DOS_hdr, DOSMAGIC, and
3548 NT_SIGNATURE to external_DOS_hdr, IMAGE_DOS_SIGNATURE, and
3550 * peXXigen.c: Likewise.
3551 * coff-ia64.c: Likewise.
3553 2018-02-12 Nick Clifton <nickc@redhat.com>
3555 * elf32-nds32.c (nds32_elf_relax_longjump3): Remove redundant
3557 * elf32-arc.c (elf_arc_relocate_section): Likewise.
3559 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
3561 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Reorder conditions.
3562 (sparc_elf_append_rela): Assert that there is enough room in section.
3563 (_bfd_sparc_elf_copy_indirect_symbol): Fix formatting.
3564 (_bfd_sparc_elf_adjust_dynamic_symbol): Minor tweak.
3565 (allocate_dynrelocs): Remove outdated comments and reorder conditions.
3566 For a symbol subject to a GOT relocation, reserve a slot in the
3567 relocation section if the symbol isn't dynamic and we are in PIC mode.
3568 (_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: If relocation
3569 is relaxed and a slot was reserved, generate a R_SPARC_NONE relocation.
3570 <R_SPARC_GOTDATA_OP_HIX22>: Adjust comments.
3571 <R_SPARC_PC10>: Reorder conditions. Remove always-false assertion.
3572 (_bfd_sparc_elf_finish_dynamic_symbol): Rename local_undefweak into
3573 resolved_to_zero. Do not generate a dynamic GOT relocation for an
3574 undefined weak symbol with non-default visibility. Remove superfluous
3575 'else' and fix formatting.
3577 2018-02-09 H.J. Lu <hongjiu.lu@intel.com>
3579 * elf32-i386.c (elf_i386_get_synthetic_symtab): Also handle
3581 (i386_elf32_sol2_vec): Don't declare.
3582 (elf_i386_link_setup_gnu_properties): Also handle is_solaris.
3583 Don't set need_global_offset_table.
3584 (elf_i386_solaris_arch_bed): New.
3585 (elf_backend_arch_data): Set to elf_i386_solaris_arch_bed for
3587 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Check
3588 target_os != is_nacl instead of target_os == is_normal.
3589 (x86_64_elf64_sol2_vec): Don't declare.
3590 (elf_x86_64_link_setup_gnu_properties): Check target_os !=
3591 is_nacl instead of target_os == is_normal. Don't set
3592 need_global_offset_table.
3593 (elf_x86_64_solaris_arch_bed): New.
3594 (elf_backend_arch_data): Set to elf_x86_64_solaris_arch_bed for
3596 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep
3597 _GLOBAL_OFFSET_TABLE_ for Solaris.
3598 (_bfd_x86_elf_link_setup_gnu_properties): Don't copy
3599 need_global_offset_table.
3600 * elfxx-x86.h (elf_x86_target_os): Add is_solaris.
3601 (elf_x86_link_hash_table): Remove need_global_offset_table.
3602 (elf_x86_init_table): Likewise.
3604 2018-02-08 H.J. Lu <hongjiu.lu@intel.com>
3606 * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
3608 (i386_elf32_sol2_vec): Declared.
3609 (elf_i386_link_setup_gnu_properties): Set
3610 need_global_offset_table with info->output_bfd->xvec.
3611 * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
3613 (x86_64_elf64_sol2_vec): Declared.
3614 (elf_x86_64_link_setup_gnu_properties): Set
3615 need_global_offset_table with info->output_bfd->xvec.
3617 2018-02-08 H.J. Lu <hongjiu.lu@intel.com>
3619 * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
3621 (elf_i386_link_setup_gnu_properties): Set need_global_offset_table
3623 * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
3625 (elf_x86_64_link_setup_gnu_properties): Set
3626 need_global_offset_table for Solaris.
3627 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep the
3628 unused _GLOBAL_OFFSET_TABLE_ for Solaris.
3629 (_bfd_x86_elf_link_setup_gnu_properties): Copy
3630 need_global_offset_table.
3631 * elfxx-x86.h (elf_x86_link_hash_table): Add
3632 need_global_offset_table.
3633 (elf_x86_init_table): Likewise.
3635 2018-02-08 Jim Wilson <jimw@sifive.com>
3637 * elfnn-riscv.c (riscv_elf_relocate_section): Add comment for previous
3640 2018-02-08 Nick Clifton <nickc@redhat.com>
3643 * elf.c (elf_parse_notes): Reject notes with excessuively large
3646 2018-02-07 Alan Modra <amodra@gmail.com>
3648 Revert 2018-01-17 Alan Modra <amodra@gmail.com>
3649 * elf32-ppc.c: Remove speculation barrier support.
3650 * elf32-ppc.h: Likewise.
3651 * elf64-ppc.c: Likewise.
3652 * elf64-ppc.h: Likewise.
3654 2018-02-06 Jim Wilson <jimw@sifive.com>
3656 * elfnn-riscv.c (riscv_elf_relocate_section): Return TRUE if used
3657 callback to report an error.
3659 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
3662 * elfxx-sparc.c (sparc_elf_tls_transition): Turn call to bfd_link_pic
3663 into call to !bfd_link_executable and tidy up.
3664 (_bfd_sparc_elf_check_relocs): Fix formatting and tidy up.
3665 <R_SPARC_TLS_LE_HIX22>: Turn call to bfd_link_pic into call to
3666 !bfd_link_executable.
3667 <R_SPARC_TLS_IE_HI22>: Likewise.
3668 <GOT relocations>: Remove useless code, tidy and merge related blocks.
3669 <R_SPARC_TLS_GD_CALL>: Turn call to bfd_link_pic into call to
3670 !bfd_link_executable.
3671 <R_SPARC_WPLT30>: Tidy up.
3672 (_bfd_sparc_elf_gc_mark_hook): Turn call to bfd_link_pic into call to
3673 !bfd_link_executable.
3674 (allocate_dynrelocs): Likewise.
3675 (_bfd_sparc_elf_relocate_section): Fix formatting and tidy up.
3676 <R_SPARC_TLS_GD_HI22>: Merge into...
3677 <R_SPARC_TLS_GD_LO10>: ...this. Adjust 4th argument in call to
3678 sparc_elf_tls_transition and remove redundant code.
3679 <R_SPARC_TLS_LDM_HI22>: Turn call to bfd_link_pic into call to
3680 !bfd_link_executable.
3681 <R_SPARC_TLS_LDO_HIX22>: Likewise.
3682 <R_SPARC_TLS_LE_HIX22>: Likewise. Tidy up.
3683 <R_SPARC_TLS_LDM_CALL>: Likewise.
3684 <R_SPARC_TLS_GD_CALL>: Likewise. Tidy up.
3685 <R_SPARC_TLS_GD_ADD>: Likewise.
3686 <R_SPARC_TLS_LDM_ADD>: Likewise.
3687 <R_SPARC_TLS_LDO_ADD>: Likewise.
3688 <R_SPARC_TLS_IE_LD>: Likewise.
3690 2018-02-06 Miloš Stojanović <milos.stojanovic@rt-rk.com>
3693 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): If the dwarf
3694 functions failed to find the function name, try the generic elf
3695 find function instead.
3697 2018-02-06 Sergio Durigan Junior <sergiodj@redhat.com>
3699 * coff-rs6000.c (xcoff_write_archive_contents_old): Use
3700 'memcpy' instead of 'strncpy' when writing the magic number.
3702 2018-02-06 Nick Clifton <nickc@redhat.com>
3705 * opncls.c (bfd_get_debug_link_info_1): Check the size of the
3706 section before attempting to read it in.
3707 (bfd_get_alt_debug_link_info): Likewise.
3709 2018-02-06 Paul Carroll <pcarroll@codesourcery.com>
3711 * bfd/dwarf2.c (find_abstract_name): Modified to return file and
3712 line information in addition to name, if they can be found.
3714 2018-02-05 Renlin Li <renlin.li@arm.com>
3717 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Relax the
3718 R_AARCH64_ABS32 and R_AARCH64_ABS16 for absolute symbol. Apply the
3719 check for writeable section as well.
3721 2018-02-05 H.J. Lu <hongjiu.lu@intel.com>
3724 * elf32-i386.c (elf_i386_check_relocs): Set got_referenced if
3725 _GLOBAL_OFFSET_TABLE_ is referenced or GOT is needed to resolve
3726 undefined weak symbol to 0.
3727 * elf64-x86-64.c (elf_x86_64_check_relocs): Set got_referenced
3728 if _GLOBAL_OFFSET_TABLE_ is referenced.
3729 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Check
3730 got_referenced instead of ref_regular_nonweak. Remove the
3731 unused _GLOBAL_OFFSET_TABLE_ from symbol table.
3732 * elfxx-x86.h (elf_x86_link_hash_table): Add got_referenced.
3734 2018-02-05 Maciej W. Rozycki <macro@mips.com>
3736 * elfnn-riscv.c (_bfd_riscv_relax_pc): Use `memset' to
3737 initialize `hi_reloc'.
3739 2018-02-05 Maciej W. Rozycki <macro@mips.com>
3741 * elfxx-mips.c (_bfd_mips_elf_section_processing): For
3742 SHT_MIPS_REGINFO sections don't assert the correct size and
3743 report an error instead.
3745 2018-02-05 Maciej W. Rozycki <macro@mips.com>
3747 * elf.c (_bfd_elf_write_object_contents): Propagate a failure
3748 status from `->elf_backend_section_processing'.
3750 2018-02-02 Jim Wilson <jimw@sifive.com>
3753 * elfnn-riscv.c (riscv_relax_delete_bytes): New parameter link_info.
3754 If link_info->wrap_hash, check for a duplicate symbol and ignore.
3755 (_bfd_riscv_relax_call, bfd_riscv_relax_lui, _bfd_riscv_relax_tls_le):
3756 Pass new argument to riscv_relax_delete_bytes.
3757 (_bfd_riscv_relax_align, _bfd_riscv_relax_delete): Likewise. Remove
3758 ATTRIBUTE_UNUSED from link_info parameter.
3760 2018-02-02 Alan Modra <amodra@gmail.com>
3762 * elf64-ppc.c (ppc64_elf_relocate_section): Don't relocate nops
3763 emitted for toc sequence optimization. Set and use "howto" later.
3765 2018-02-01 Simon Marchi <simon.marchi@ericsson.com>
3767 * elf64-ppc.c (ppc64_elf_archive_symbol_lookup): Avoid pointer
3768 arithmetic on NULL pointer.
3769 * elflink.c (_bfd_elf_archive_symbol_lookup,
3770 elf_link_add_archive_symbols): Likewise.
3772 2018-01-31 Michael Matz <matz@suse.de>
3774 * elflink.c (bfd_elf_define_start_stop): Fix check of
3777 2018-01-31 H.J. Lu <hongjiu.lu@intel.com>
3780 * elflink.c (bfd_elf_define_start_stop): Check if __start and
3781 __stop symbols are referenced by shared objects.
3783 2018-01-30 Alan Modra <amodra@gmail.com>
3786 * elf.c (_bfd_elf_map_sections_to_segments): Don't start a new
3787 segment when demand paged with lma on the same page. Test this
3788 before load/non-load, executable/non-executable,
3789 writable/non-writable tests and simplify. Delete bogus relro
3790 condition in writable/non-writable test. Delete outdated
3791 comment. Formatting.
3793 2018-01-30 Alan Modra <amodra@gmail.com>
3795 * elflink.c (bfd_elf_define_start_stop): Make __start and __stop
3798 2018-01-29 Alan Modra <amodra@gmail.com>
3801 * coffgen.c (coff_pointerize_aux): Ensure auxent tagndx is in
3802 range before converting to a symbol table pointer.
3804 2018-01-27 Nick Clifton <nickc@redhat.com>
3806 * po/ru.po: Updated Russian translation.
3808 2018-01-26 Alan Modra <amodra@gmail.com>
3810 * elflink.c (bfd_elf_define_start_stop): Override symbols when
3811 they are defined dynamically.
3813 2018-01-26 Alan Modra <amodra@gmail.com>
3815 * elf64-ppc.c (ppc64_elf_size_stubs): Iterate sizing when
3816 .branch_lt changes size.
3818 2018-01-25 Alan Modra <amodra@gmail.com>
3821 * elfcode.h (elf_object_p): Avoid integer overflow.
3823 2018-01-25 Eric Botcazou <ebotcazou@adacore.com>
3826 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
3827 Do a mere lookup of the __tls_get_addr symbol instead of adding it.
3830 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
3833 * elfxx-sparc.c (sparc_elf_tls_transition): Replace
3834 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
3835 bfd_link_executable for TLS check.
3836 (_bfd_sparc_elf_check_relocs): Likewise.
3837 (allocate_dynrelocs): Likewise.
3838 (_bfd_sparc_elf_relocate_section): Likewise.
3840 2018-01-24 Renlin Li <renlin.li@arm.com>
3842 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Add support for
3843 BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
3844 BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
3845 BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
3846 BFD_RELOC_AARCH64_MOVW_PREL_G3.
3847 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
3848 (_bfd_aarch64_elf_resolve_relocation): Likewise.
3850 2018-01-24 Renlin Li <renlin.li@arm.com>
3852 * reloc.c: Add BFD_RELOC_AARCH64_MOVW_PREL_G0,
3853 BFD_RELOC_AARCH64_MOVW_PREL_G0_NC, BFD_RELOC_AARCH64_MOVW_PREL_G1,
3854 BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, BFD_RELOC_AARCH64_MOVW_PREL_G2,
3855 BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, BFD_RELOC_AARCH64_MOVW_PREL_G3.
3856 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add entries for
3857 BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
3858 BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
3859 BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
3860 BFD_RELOC_AARCH64_MOVW_PREL_G3.
3861 * bfd-in2.h: Regenerate.
3862 * libbfd.h: Regenerate.
3864 2018-01-23 Maciej W. Rozycki <macro@mips.com>
3866 * elfxx-mips.c (_bfd_mips_elf_final_link): Update a stale
3867 `mips_elf32_section_processing' comment reference.
3869 2018-01-20 H.J. Lu <hongjiu.lu@intel.com>
3872 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Check the
3873 versioned __tls_get_addr symbol.
3875 2018-01-19 Nick Clifton <nickc@redhat.com>
3877 * po/fr.po: Updated French translation.
3879 2018-01-18 Alan Modra <amodra@gmail.com>
3881 * elf32-ppc.c (ppc_elf_create_glink): Correct alignment of .glink.
3882 * elf64-ppc.c (ppc64_elf_size_stubs): Handle negative plt_stub_align.
3883 (ppc64_elf_build_stubs): Likewise.
3885 2018-01-17 Nick Clifton <nickc@redhat.com>
3887 * po/ru.po: Updated Russian translation.
3888 * po/uk/po: Updated Ukranian translation.
3890 2018-01-17 Alan Modra <amodra@gmail.com>
3892 * elf64-ppc.c (ppc64_elf_build_stubs): Silence gcc warning.
3894 2018-01-17 Alan Modra <amodra@gmail.com>
3896 * elf32-ppc.c (GLINK_ENTRY_SIZE): Handle speculation barrier.
3897 (CRSETEQ, BEQCTRM): Define.
3898 (is_nonpic_glink_stub): Don't check bctr.
3899 (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
3900 (ppc_elf_relax_section): Size speculation barrier.
3901 (output_bctr): New function.
3902 (write_glink_stub): Use output_bctr.
3903 (ppc_elf_relocate_section): Use output_bctr for long branch stub.
3904 (ppc_elf_finish_dynamic_symbol): Likewise.
3905 (ppc_elf_finish_dynamic_sections): Use output_bctr.
3906 * elf32-ppc.h (struct ppc_elf_params): Add speculate_indirect_jumps.
3907 * elf64-ppc.c (CRSETEQ, BEQCTRM, BEQCTRLM): Define.
3908 (GLINK_PLTRESOLVE_SIZE): Size speculation barrier.
3909 (size_global_entry_stubs): Handle speculation barrier sizing.
3910 (plt_stub_size): Likewise.
3911 (output_bctr): New function.
3912 (build_plt_stub, build_tls_get_addr_stub): Output speculation
3914 (ppc_build_one_stub): Likewise for ppc_stub_plt_branch.
3915 (ppc_size_one_stub): Size speculation barrier in ppc_stub_plt_branch.
3916 (build_global_entry_stubs): Output speculation barrier.
3917 (ppc64_elf_build_stubs): Likewise in __glink_PLTresolve stub.
3918 * elf64-ppc.h (struct ppc64_elf_params): Add speculate_indirect_jumps.
3920 2018-01-17 Alan Modra <amodra@gmail.com>
3922 * elf32-ppc.c (GLINK_ENTRY_SIZE): Add parameters, handle
3923 __tls_get_addr_opt, and alignment sizing.
3924 (TLS_GET_ADDR_GLINK_SIZE): Delete.
3925 (is_nonpic_glink_stub): Don't use GLINK_ENTRY_SIZE.
3926 (ppc_elf_get_synthetic_symtab): Recognize stubs spaced at 4, 6,
3928 (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
3929 (allocate_dynrelocs): Use new GLINK_ENTRY_SIZE.
3930 (ppc_elf_size_dynamic_sections): Likewise. Size branch table
3932 (write_glink_stub): Handle __tls_get_addr_opt stub.
3933 Pad out to size given by GLINK_ENTRY_SIZE.
3934 (ppc_elf_relocate_section): Adjust write_glink_stub call.
3935 (ppc_elf_finish_dynamic_symbol): Likewise.
3936 (ppc_elf_finish_dynamic_sections): Write PLTresolve without using
3937 insn array since so many need rewriting.
3938 * elf32-ppc.h (struct ppc_elf_params): Add plt_stub_align.
3939 * elf64-ppc.c (GLINK_PLTRESOLVE_SIZE): Rename from
3940 GLINK_CALL_STUB_SIZE. Add htab param and evaluate to size without
3941 nops. Adjust all uses.
3942 (ppc64_elf_get_synthetic_symtab): Don't use GLINK_CALL_STUB_SIZE
3943 in glink_vma calculation.
3944 (struct ppc_link_hash_table): Add global_entry section pointer.
3945 (create_linkage_sections): Create separate section for global
3947 (PPC_LO, PPC_HI, PPC_HA): Move earlier.
3948 (size_global_entry_stubs): Handle sizing for aligned stubs.
3949 (ppc64_elf_size_dynamic_sections): Handle global_entry alloc,
3950 and don't stash end of glink branch table in rawsize.
3951 (ppc_build_one_stub): Rewrite stub size calculations.
3952 (build_global_entry_stubs): Use new section.
3953 (ppc64_elf_build_stubs): Don't pad __glink_PLTresolve with nops.
3954 Build lazy link stubs out to end of section. Build global entry
3955 stubs in new section.
3957 2018-01-15 Nick Clifton <nickc@redhat.com>
3959 * po/uk.po: Updated Ukranian translation.
3961 2018-01-13 Nick Clifton <nickc@redhat.com>
3963 * po/bfd.pot: Regenerated.
3965 2018-01-13 Nick Clifton <nickc@redhat.com>
3967 * version.m4: Bump version to 2.30.51
3968 * configure: Regenerate.
3970 2018-01-13 Nick Clifton <nickc@redhat.com>
3972 2.30 branch created.
3974 2018-01-12 Jens Widell <jl@opera.com>
3976 * elf.c (setup_group): Optimize search for group by remembering
3977 last found group and restarting search at that index.
3978 * elf-bfd.h (struct elf_obj_tdata): Add group_search_offset field.
3980 2018-01-12 Gunther Nikl <gnikl@users.sourceforge.net>
3982 * aoutx.h (aout_link_check_ar_symbols): Remove default and handle
3983 bfd_link_common_skip_none in switch.
3985 2018-01-12 Alan Modra <amodra@gmail.com>
3988 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Ignore dynamic
3989 references on forced local symbols.
3991 2018-01-12 Vlad Ivanov <vlad@ivanov.email>
3993 * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
3994 .reginfo section has wrong size.
3996 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
3999 * elf.c (_bfd_elf_map_sections_to_segments): When generating
4000 separate code and read-only data LOAD segments, create a new
4001 LOAD segment if the previous section contains text and the
4002 current section doesn't or vice versa. Don't put a writable
4003 section in a read-only segment if there is a RELRO segment.
4005 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
4008 * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Ignore dynamic
4009 references on forced local symbols.
4011 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
4014 * elflink.c (bfd_elf_gc_sections): Keep all PREINIT_ARRAY,
4015 INIT_ARRAY as well as FINI_ARRAY sections for ld -r --gc-section.
4017 2018-01-09 Kuan-Lin Chen <kuanlinchentw@gmail.com>
4020 * elf32-nds32.c (nds32_elf_relax_loadstore): Fix a typographical error.
4022 2018-01-03 John Baldwin <jhb@FreeBSD.org>
4024 * elf.c (elfcore_grok_freebsd_note): Handle
4025 NT_FREEBSD_PROCSTAT_PROC, NT_FREEBSD_PROCSTAT_FILES, and
4026 NT_FREEBSD_PROCSTAT_VMMAP.
4028 2018-01-03 Alan Modra <amodra@gmail.com>
4030 Update year range in copyright notice of all files.
4032 For older changes see ChangeLog-2017
4034 Copyright (C) 2018 Free Software Foundation, Inc.
4036 Copying and distribution of this file, with or without modification,
4037 are permitted in any medium without royalty provided the copyright
4038 notice and this notice are preserved.
4044 version-control: never