1 2017-06-08 Richard Earnshaw <rearnsha@arm.com>
3 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
4 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
5 is non-zero. Add clarifying comments.
7 2017-06-08 H.J. Lu <hongjiu.lu@intel.com>
9 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
10 name. Use local IFUNC symbol name string to report unsupported
11 non-PIC call to IFUNC function.
12 (elf_i386_relocate_section): Dump local IFUNC name with minfo
13 when generating R_386_IRELATIVE relocation.
14 (elf_i386_finish_dynamic_symbol): Likewise.
15 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
17 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
18 when generating R_X86_64_IRELATIVE relocation.
19 (elf_x86_64_finish_dynamic_symbol): Likewise.
21 2017-06-08 Jiong Wang <jiong.wang@arm.com>
24 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
25 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
26 runtime for copy relocation elimination cases.
27 (alias_readonly_dynrelocs): New function.
28 (elfNN_aarch64_adjust_dynamic_symbol): Keep the dynamic relocs instead
29 of generating copy relocation if it is not against read-only sections.
30 (elfNN_aarch64_check_relocs): Likewise.
32 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
34 * elf.c (setup_group): Make sure BFD sections are created for all
35 group sections in the input file when processing SHF_GROUP
37 (bfd_section_from_shdr): Avoid duplicating logic already
38 implemented in `setup_group'.
40 2017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
43 * peXXigen.c (pe_print_idata): Use the address of the first thunk
44 if the hint address is zero.
46 2017-06-06 James Clarke <jrtc27@jrtc27.com>
49 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
50 ELF_COMMON_DEF_P for common symbols.
52 2017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
54 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
55 SEC_GROUP sections as SEC_EXCLUDE.
56 (bfd_elf_set_group_contents): Replace use of abort with an assert.
57 (assign_section_numbers): Use resolve_section_groups flag instead
58 of relocatable link type.
59 (_bfd_elf_init_private_section_data): Use resolve_section_groups
60 flag instead of checking the final_link flag for part of the
61 checks in here. Fix white space as a result.
62 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
63 instead of relocatable link type.
64 (bfd_elf_final_link): Likewise.
66 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
68 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
70 * elf32-score.c (score_elf_final_link_relocate): Likewise.
71 (s3_bfd_score_elf_check_relocs): Likewise.
72 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
73 (score_elf_final_link_relocate): Likewise.
74 (s7_bfd_score_elf_check_relocs): Likewise.
76 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
78 * elflink.c (init_reloc_cookie_rels): Remove unused variable
81 2017-06-06 Maciej W. Rozycki <macro@imgtec.com>
83 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
84 from `reloc_count' rather than decrementing it.
85 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
86 `reloc_count' by `int_rels_per_ext_rel'.
87 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
88 `reloc_count' by `int_rels_per_ext_rel' for last relocation
90 (s3_bfd_score_elf_check_relocs): Likewise.
91 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
92 (s7_bfd_score_elf_relocate_section): Likewise.
93 (s7_bfd_score_elf_check_relocs): Likewise.
94 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
95 prototype and function.
96 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
97 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
98 triple rather than once the sum of REL and RELA relocation entry
100 (bfd_elf64_get_reloc_upper_bound): Remove macro.
101 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
102 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
103 storage allocation size determination.
104 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
105 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
106 by `int_rels_per_ext_rel' for last relocation entry
108 (bfd_elf_final_link): Do not multiply `reloc_count' by
109 `int_rels_per_ext_rel' for internal relocation storage
110 allocation size determination.
111 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
112 `int_rels_per_ext_rel' for last relocation entry determination.
113 (elf_gc_smash_unused_vtentry_relocs): Likewise.
114 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
115 (_bfd_mips_elf_relocate_section): Likewise.
117 2017-06-05 Alan Modra <amodra@gmail.com>
120 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
122 2017-06-01 John Baldwin <jhb@FreeBSD.org>
124 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
125 determine structure sizes.
126 (elfcore_grok_freebsd_prstatus): Likewise.
128 2017-06-01 Alan Modra <amodra@gmail.com>
130 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
131 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
133 (is_elfv2_localentry0): New function.
134 (ppc64_elf_tls_setup): Default params->plt_localentry0.
135 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
136 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
137 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
138 optimized localentry:0 stubs.
139 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
140 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
142 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
144 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
146 2017-05-30 Casey Smith <clegg89@gmail.com>
149 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
150 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
152 2017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
154 * cpu-arc.c (arc_compatible): New function.
156 2017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
158 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
160 2017-05-30 H.J. Lu <hongjiu.lu@intel.com>
163 * bfdio.c (bfd_get_file_size): New function.
164 * bfd-in2.h: Regenerated.
166 2017-05-23 Dilian Palauzov <git-dpa@aegee.org>
168 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
171 2017-05-22 H.J. Lu <hongjiu.lu@intel.com>
173 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
174 dynobj instead of htab->elf.dynobj.
176 2017-05-19 Maciej W. Rozycki <macro@imgtec.com>
178 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
180 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
181 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
182 actual number of internal relocations retrieved. Adjust
183 function description.
184 (bfd_elf64_canonicalize_reloc): Remove macro.
185 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
187 2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
189 * archures.c (bfd_mach_sparc_v9m8): Define.
190 (bfd_mach_sparc_v8plusm8): Likewise.
191 (bfd_mach_sparc_v9_p): Adjust to M8.
192 (bfd_mach_sparc_64bit_p): Likewise.
193 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
194 bfd_mach_sparc_v8plusm8.
195 * bfd-in2.h: Regenerated.
196 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
198 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
199 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
200 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
202 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
203 bfd_mach_sparc_v8plusm8.
205 2017-05-19 Alan Modra <amodra@gmail.com>
207 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
208 debug and special sections when no non-note alloc sections in an
211 2017-05-18 Alan Modra <amodra@gmail.com>
213 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
214 * elf-m10300.c: Likewise.
216 * elf32-arc.c: Likewise.
217 * elf32-bfin.c: Likewise.
218 * elf32-m68k.c: Likewise.
219 * elf32-nds32.c: Likewise.
220 * elf32-tilepro.c: Likewise.
221 * elflink.c: Likewise.
222 * elfnn-aarch64.c: Likewise.
223 * elfnn-riscv.c: Likewise.
224 * elfxx-tilegx.c: Likewise.
225 * mach-o.c: Likewise.
226 * peXXigen.c: Likewise.
227 * vms-alpha.c: Likewise.
228 * vms-lib.c: Likewise.
230 2017-05-17 H.J. Lu <hongjiu.lu@intel.com>
233 * elflink.c (elf_gc_mark_debug_section): New function.
234 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
235 referenced by kept debug sections.
237 2017-05-16 Alan Modra <amodra@gmail.com>
239 * elf-m10300.c: Rename occurrences of non_ir_ref.
240 * elf32-arm.c: Likewise.
241 * elf32-bfin.c: Likewise.
242 * elf32-cr16.c: Likewise.
243 * elf32-cris.c: Likewise.
244 * elf32-d10v.c: Likewise.
245 * elf32-dlx.c: Likewise.
246 * elf32-fr30.c: Likewise.
247 * elf32-frv.c: Likewise.
248 * elf32-hppa.c: Likewise.
249 * elf32-i370.c: Likewise.
250 * elf32-i386.c: Likewise.
251 * elf32-iq2000.c: Likewise.
252 * elf32-lm32.c: Likewise.
253 * elf32-m32c.c: Likewise.
254 * elf32-m32r.c: Likewise.
255 * elf32-m68hc1x.c: Likewise.
256 * elf32-m68k.c: Likewise.
257 * elf32-mcore.c: Likewise.
258 * elf32-metag.c: Likewise.
259 * elf32-microblaze.c: Likewise.
260 * elf32-moxie.c: Likewise.
261 * elf32-msp430.c: Likewise.
262 * elf32-mt.c: Likewise.
263 * elf32-nios2.c: Likewise.
264 * elf32-or1k.c: Likewise.
265 * elf32-ppc.c: Likewise.
266 * elf32-rl78.c: Likewise.
267 * elf32-s390.c: Likewise.
268 * elf32-score.c: Likewise.
269 * elf32-score7.c: Likewise.
270 * elf32-sh.c: Likewise.
271 * elf32-tic6x.c: Likewise.
272 * elf32-tilepro.c: Likewise.
273 * elf32-v850.c: Likewise.
274 * elf32-vax.c: Likewise.
275 * elf32-xstormy16.c: Likewise.
276 * elf32-xtensa.c: Likewise.
277 * elf64-alpha.c: Likewise.
278 * elf64-hppa.c: Likewise.
279 * elf64-ia64-vms.c: Likewise.
280 * elf64-mmix.c: Likewise.
281 * elf64-ppc.c: Likewise.
282 * elf64-s390.c: Likewise.
283 * elf64-sh64.c: Likewise.
284 * elf64-x86-64.c: Likewise.
285 * elflink.c: Likewise.
286 * elfnn-aarch64.c: Likewise.
287 * elfnn-ia64.c: Likewise.
288 * elfnn-riscv.c: Likewise.
289 * elfxx-mips.c: Likewise.
290 * elfxx-sparc.c: Likewise.
291 * elfxx-tilegx.c: Likewise.
292 * linker.c: Likewise.
294 2017-05-16 Alan Modra <amodra@gmail.com>
296 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
297 * elflink.c (elf_link_add_object_symbols): Update to use
299 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
301 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
303 2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
305 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
307 2017-05-12 H.J. Lu <hongjiu.lu@intel.com>
309 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
310 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
312 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
314 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
316 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
318 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
319 to plt_second/plt_second_eh_frame.
320 (elf_x86_64_link_hash_newfunc): Updated.
321 (elf_x86_64_allocate_dynrelocs): Likewise.
322 (elf_x86_64_size_dynamic_sections): Likewise.
323 (elf_x86_64_relocate_section): Likewise.
324 (elf_x86_64_finish_dynamic_symbol): Likewise.
325 (elf_x86_64_finish_dynamic_sections): Likewise.
326 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
327 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
329 (elf_backend_setup_gnu_properties): Updated. Create the
330 .plt.sec section instead of the .plt.sec section.
332 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
334 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
335 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
336 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
338 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
340 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
341 (bfd_elf64_set_reloc): Define.
342 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
344 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
346 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
347 (struct bfd_target): New field _bfd_set_reloc.
348 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
349 * reloc.c (_bfd_generic_set_reloc): New function.
350 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
351 * nlm-target.h (nlm_set_reloc): Likewise.
352 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
353 * aout-tic30.c (MY_set_reloc): Likewise.
354 * aout-target.h (MY_set_reloc): Likewise.
355 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
356 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
357 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
358 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
359 * aout-adobe.c (aout_32_set_reloc): Likewise.
360 * bout.c (b_out_set_reloc): Likewise.
361 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
362 * i386os9k.c (aout_32_set_reloc): Likewise.
363 * ieee.c (ieee_set_reloc): Likewise.
364 * oasys.c (oasys_set_reloc): Likewise.
365 * som.c (som_set_reloc): Likewise.
366 * versados.c (versados_set_reloc): Likewise.
367 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
368 _bfd_generic_set_reloc.
369 (rs6000_xcoff64_aix_vec): LIkewise.
370 * libbfd.c (_bfd_norelocs_set_reloc): New function.
371 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
372 * i386msdos.c (msdos_set_reloc): Define to
373 _bfd_norelocs_set_reloc.
374 * elfcode.h (elf_set_reloc): Define.
375 * bfd-in2.h: Regenerated.
377 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
380 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
381 for IFUNC function address.
383 2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
385 * elf32-arc.c (FEATURE_LIST_NAME): Define.
386 (CONFLICT_LIST): Likewise.
387 (opcode/arc-attrs.h): Include.
388 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
389 (arc_extract_features): New file.
390 (arc_stralloc): Likewise.
391 (arc_elf_merge_attributes): Likewise.
392 (arc_elf_merge_private_bfd_data): Use object attributes.
393 (bfd_arc_get_mach_from_attributes): New function.
394 (arc_elf_object_p): Use object attributes.
395 (arc_elf_final_write_processing): Likewise.
396 (elf32_arc_obj_attrs_arg_type): New function.
397 (elf32_arc_obj_attrs_handle_unknown): Likewise.
398 (elf32_arc_section_from_shdr): Likewise.
399 (elf_backend_obj_attrs_vendor): Define.
400 (elf_backend_obj_attrs_section): Likewise.
401 (elf_backend_obj_attrs_arg_type): Likewise.
402 (elf_backend_obj_attrs_section_type): Likewise.
403 (elf_backend_obj_attrs_handle_unknown): Likewise.
404 (elf_backend_section_from_shdr): Likewise.
406 2017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
409 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
410 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
411 and the destination is a Thumb symbol.
413 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
415 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
416 initializer to silence GCC 4.2.
417 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
419 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
421 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
422 (LAZY_PLT_ENTRY_SIZE): This.
423 (NON_LAZY_PLT_ENTRY_SIZE): New.
424 (elf_x86_64_plt0_entry): Renamed to ...
425 (elf_x86_64_lazy_plt0_entry): This.
426 (elf_x86_64_plt_entry): Renamed to ...
427 (elf_x86_64_lazy_plt_entry): This.
428 (elf_x86_64_bnd_plt0_entry): Renamed to ...
429 (elf_x86_64_lazy_bnd_plt0_entry): This.
430 (elf_x86_64_legacy_plt_entry): Removed.
431 (elf_x86_64_bnd_plt_entry): Renamed to ...
432 (elf_x86_64_lazy_bnd_plt_entry): This.
433 (elf_x86_64_legacy_plt2_entry): Renamed to ...
434 (elf_x86_64_non_lazy_plt_entry): This.
435 (elf_x86_64_bnd_plt2_entry): Renamed to ...
436 (elf_x86_64_non_lazy_bnd_plt_entry): This.
437 (elf_x86_64_eh_frame_plt): Renamed to ...
438 (elf_x86_64_eh_frame_lazy_plt): This.
439 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
440 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
441 (elf_x86_64_eh_frame_plt_got): Renamed to ...
442 (elf_x86_64_eh_frame_non_lazy_plt): This.
443 (elf_x86_64_lazy_plt_layout): New.
444 (elf_x86_64_non_lazy_plt_layout): Likewise.
445 (elf_x86_64_plt_layout): Likewise.
446 (elf_x86_64_backend_data): Remove PLT layout information. Add
447 os for target system.
448 (GET_PLT_ENTRY_SIZE): Removed.
449 (elf_x86_64_lazy_plt): New.
450 (elf_x86_64_non_lazy_plt): Likewise.
451 (elf_x86_64_lazy_bnd_plt): Likewise.
452 (elf_x86_64_non_lazy_bnd_plt): Likewise.
453 (elf_x86-64_arch_bed): Updated.
454 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
455 (elf_x86_64_create_dynamic_sections): Removed.
456 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
457 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
458 (elf_x86-64_adjust_dynamic_symbol): Updated.
459 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
460 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
461 size for PLT0 if there is no PLT0. Get plt_entry_size from
462 non_lazy_plt for non-lazy PLT entries.
463 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
464 from non_lazy_plt for non-lazy PLT entries.
465 (elf_x86-64_relocate_section): Updated. Properly get PLT index
467 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
468 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
469 entries with non-lazy PLT layout. Don't fill the second and third
470 slots in the PLT entry if there is no PLT0.
471 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
472 if there is no PLT0. Set sh_entsize on the .plt.got section.
473 (compare_relocs): New.
474 (elf_x86_64_plt_type): Likewise.
475 (elf_x86_64_plt): Likewise.
476 (elf_x86_64_nacl_plt): New. Forward declaration.
477 (elf_x86_64_get_plt_sym_val): Removed.
478 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
479 against all dynamic relocations.
480 (elf_x86_64_link_setup_gnu_properties): New function.
481 (elf_backend_create_dynamic_sections): Updated.
482 (elf_backend_setup_gnu_properties): New.
483 (elf_x86_64_nacl_plt): New.
484 (elf_x86_64_nacl_arch_bed): Updated.
486 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
488 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
489 (LAZY_PLT_ENTRY_SIZE): This.
490 (NON_LAZY_PLT_ENTRY_SIZE): New.
491 (elf_i386_plt0_entry): Renamed to ...
492 (elf_i386_lazy_plt0_entry): This.
493 (elf_i386_plt_entry): Renamed to ...
494 (elf_i386_lazy_plt_entry): This.
495 (elf_i386_pic_plt0_entry): Renamed to ...
496 (elf_i386_pic_lazy_plt0_entry): This.
497 (elf_i386_pic_plt_entry): Renamed to ...
498 (elf_i386_pic_lazy_plt_entry): This.
499 (elf_i386_got_plt_entry): Renamed to ...
500 (elf_i386_non_lazy_plt_entry): This.
501 (elf_i386_pic_got_plt_entry): Renamed to ...
502 (elf_i386_pic_non_lazy_plt_entry): This.
503 (elf_i386_eh_frame_plt): Renamed to ...
504 (elf_i386_eh_frame_lazy_plt): This.
505 (elf_i386_eh_frame_plt_got): Renamed to ...
506 (elf_i386_eh_frame_non_lazy_plt): This.
507 (elf_i386_plt_layout): Renamed to ...
508 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
509 eh_frame_plt_got_size.
510 (elf_i386_non_lazy_plt_layout): New.
511 (elf_i386_plt_layout): Likewise.
512 (elf_i386_non_lazy_plt): Likewise.
513 (GET_PLT_ENTRY_SIZE): Removed.
514 (elf_i386_plt): Renamed to ...
515 (elf_i386_lazy_plt): This.
516 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
517 (elf_i386_arch_bed): Updated.
518 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
519 (elf_i386_create_dynamic_sections): Removed.
520 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
521 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
522 (elf_i386_adjust_dynamic_symbol): Updated.
523 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
524 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
525 size for PLT0 if there is no PLT0.
526 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
527 output section is discarded only if GOT isn't empty.
528 (elf_i386_relocate_section): Updated. Properly get PLT index
530 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
531 second and third slots in the PLT entry if there is no PLT0.
532 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
533 if there is no PLT0. Set sh_entsize on the .plt.got section.
534 (elf_i386_nacl_plt): Forward declaration.
535 (elf_i386_get_plt_sym_val): Removed.
536 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
537 against all dynamic relocations.
538 (elf_i386_link_setup_gnu_properties): New function.
539 (elf_backend_create_dynamic_sections): Updated.
540 (elf_backend_setup_gnu_properties): New.
541 (elf_i386_nacl_plt): Updated.
542 (elf_i386_nacl_arch_bed): Likewise.
543 (elf_i386_vxworks_arch_bed): Likewise.
545 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
547 * elflink.c (elf_output_implib): Remove executable flag from import
549 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
550 library is a relocatable object file.
552 2017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
555 * elf32-avr.c (avr_should_move_sym): New function.
556 (avr_should_reduce_sym_size): Likewise.
557 (avr_should_increase_sym_size): Likewise.
558 (elf32_avr_relax_delete_bytes): Adjust symbol values
559 and sizes by calling new functions.
561 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
563 * config.bfd (riscv32-*): Enable rv64.
565 2017-05-02 Alan Modra <amodra@gmail.com>
568 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
569 rather than h->root.type == bfd_link_hash_new.
570 (bfd_elf_record_link_assignment): Similarly, call
571 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
573 2017-04-29 Alan Modra <amodra@gmail.com>
576 * reloc.c (reloc_offset_in_range): New function.
577 (bfd_perform_relocation, bfd_install_relocation): Use it.
578 (_bfd_final_link_relocate): Likewise.
580 2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
582 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
583 before using .plt.got.
584 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
586 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
588 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
589 instead of "+=" to update 0.
591 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
593 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
594 .plt.got section here.
595 (elf_i386_check_relocs): Don't create the .plt.got section.
596 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
597 the .plt.got and .plt.bnd sections here.
598 (elf_x86_64_check_relocs): Don't create the .plt.got nor
601 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
603 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
605 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
606 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
607 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
608 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
611 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
613 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
615 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
616 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
617 the first relocatable ELF input with GNU properties.
619 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
621 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
624 2017-04-27 Alan Modra <amodra@gmail.com>
626 * elf-bfd.h (struct elf_backend_data): Make asection param of
627 elf_backend_eh_frame_address_size const.
628 (_bfd_elf_eh_frame_address_size): Likewise.
629 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
630 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
631 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
632 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
633 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
634 (next_cie_fde_offset): Constify params.
635 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
637 2017-04-27 Alan Modra <amodra@gmail.com>
639 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
640 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
641 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
643 (offset_adjust): New function.
644 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
645 (adjust_eh_frame_local_symbols): Likewise.
646 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
647 after changing anything. Return true if anything changed.
648 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
649 _bfd_elf_adjust_eh_frame_global_symbol for globals.
651 2017-04-27 Alan Modra <amodra@gmail.com>
653 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
656 2017-04-27 Alan Modra <amodra@gmail.com>
658 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
659 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
660 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
661 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
662 for undef and undefweak dyn_relocs.
663 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
664 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
665 (allocate_got, allocate_dynrelocs): Likewise.
666 (ppc64_elf_relocate_section): Likewise.
668 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
670 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
671 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
672 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
673 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
675 2017-04-26 Nick Clifton <nickc@redhat.com>
678 * reloc.c (bfd_perform_relocation): Check for a negative address
681 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
684 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
686 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
687 (elf_backend_always_renumber_dynsyms): Define.
688 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
689 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
690 * elflink.c (bfd_elf_size_dynamic_sections): Also call
691 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
693 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
695 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
697 * elflink.c (bfd_elf_size_dynamic_sections): Only call
698 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
699 sections have been created.
701 2017-04-26 Nick Clifton <nickc@redhat.com>
704 * compress.c (bfd_init_section_compress_status): Check the return
705 value from bfd_malloc.
707 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
709 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
710 no_finish_dynamic_symbol.
711 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
713 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
714 weak symbol, don't make it dynamic.
715 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
716 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
717 relocation for GOT reference.
718 (elf_x86_64_finish_dynamic_symbol): Abort if
719 no_finish_dynamic_symbol isn't 0.
721 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
724 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
725 undefined weak symbol, don't make it dynamic.
726 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
727 set no_finish_dynamic_symbol and generate R_386_RELATIVE
728 relocation for R_386_GOT32.
730 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
733 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
735 2017-04-23 Alan Modra <amodra@gmail.com>
738 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
739 * elf.c (lcomm_sym): New.
740 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
741 * bfd-in2.h: Regenerate.
743 2017-04-23 Alan Modra <amodra@gmail.com>
746 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
747 parameters and comment.
748 (_bfd_elf_get_reloc_section): Delete.
749 (_bfd_elf_plt_get_reloc_section): Declare.
750 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
751 New functions. Don't blindly skip over assumed .rel/.rela prefix.
753 (_bfd_elf_get_reloc_section): ..here. Delete.
754 (assign_section_numbers): Call elf_get_reloc_section.
755 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
756 * elfxx-target.h (elf_backend_get_reloc_section): Update.
758 2017-04-23 Alan Modra <amodra@gmail.com>
761 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
764 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
767 * elf32-i386.c (elf_i386_link_hash_entry): Add
768 no_finish_dynamic_symbol.
769 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
770 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
771 symbol, don't make it dynamic in PIE.
772 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
773 set no_finish_dynamic_symbol and generate R_386_RELATIVE
774 relocation for R_386_GOT32
775 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
778 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
782 * elflink.c (elf_link_add_object_symbols): Require
783 --no-dynamic-linker with -E/--dynamic-list when creating
786 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
788 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
791 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
793 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
794 dynamic symbol sorting.
796 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
799 * elflink.c (elf_link_add_object_symbols): Preserve
800 dynamic_ref_after_ir_def when restoring the symbol table for
801 unneeded dynamic object.
803 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
806 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
807 on on undefined IFUNC symbol in the second PLT.
809 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
811 * peXXigen.c (pe_print_reloc): Correct chunk_end.
813 2017-04-19 Alan Modra <amodra@gmail.com>
815 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
816 or make dynamic for info->dynamic_undefined_weak 0 and 1.
817 * elf32-ppc.c:Formatting.
818 (ensure_undefweak_dynamic): Don't make dynamic when
819 info->dynamic_undefined_weak is zero.
820 (allocate_dynrelocs): Discard undefweak dyn_relocs for
821 info->dynamic_undefined_weak. Discard undef dyn_relocs when
822 not default visibility. Discard undef and undefweak
824 (ppc_elf_relocate_section): Adjust to suit.
825 * elf64-ppc.c: Formatting.
826 (ensure_undefweak_dynamic): Don't make dynamic when
827 info->dynamic_undefined_weak is zero.
828 (allocate_dynrelocs): Discard undefweak dyn_relocs for
829 info->dynamic_undefined_weak. Discard them earlier.
831 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
834 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
835 before generating the version definition section.
837 2017-04-17 Alan Modra <amodra@gmail.com>
839 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
840 state when a regular object file defines a symbol with
841 incompatible type to that defined by an earlier shared lib.
843 2017-04-13 Alan Modra <amodra@gmail.com>
845 * coffcode.h: Wrap some overly long _bfd_error_handler args.
847 * elf32-arm.c: Likewise.
848 * elf32-i386.c: Likewise.
849 * elf32-mep.c: Likewise.
850 * elf64-ia64-vms.c: Likewise.
851 * elf64-x86-64.c: Likewise.
852 * elflink.c: Likewise.
853 * elfnn-ia64.c: Likewise.
854 * elfxx-mips.c: Likewise.
856 2017-04-13 Alan Modra <amodra@gmail.com>
858 * aoutx.h: Use %B and %A in error messages throughout file.
859 * aout-cris.c: Likewise.
860 * archive.c: Likewise.
861 * binary.c: Likewise.
862 * coff-rs6000.c: Likewise.
863 * coff-tic4x.c: Likewise.
864 * coffcode.h: Likewise.
865 * coffgen.c: Likewise.
866 * cofflink.c: Likewise.
867 * coffswap.h: Likewise.
868 * cpu-arm.c: Likewise.
869 * elf-eh-frame.c: Likewise.
870 * elf-m10300.c: Likewise.
872 * elf32-arc.c: Likewise.
873 * elf32-arm.c: Likewise.
874 * elf32-bfin.c: Likewise.
875 * elf32-frv.c: Likewise.
876 * elf32-iq2000.c: Likewise.
877 * elf32-m32c.c: Likewise.
878 * elf32-microblaze.c: Likewise.
879 * elf32-nds32.c: Likewise.
880 * elf32-rl78.c: Likewise.
881 * elf32-rx.c: Likewise.
882 * elf32-score.c: Likewise.
883 * elf32-score7.c: Likewise.
884 * elf32-sh64.c: Likewise.
885 * elf32-v850.c: Likewise.
886 * elf32-vax.c: Likewise.
887 * elf32-visium.c: Likewise.
888 * elf64-ia64-vms.c: Likewise.
889 * elf64-mmix.c: Likewise.
890 * elf64-sh64.c: Likewise.
891 * elfcode.h: Likewise.
892 * elfnn-aarch64.c: Likewise.
893 * elfnn-ia64.c: Likewise.
894 * elfxx-mips.c: Likewise.
895 * hpux-core.c: Likewise.
898 * linker.c: Likewise.
903 * peXXigen.c: Likewise.
904 * rs6000-core.c: Likewise.
905 * vms-alpha.c: Likewise.
906 * xcofflink.c: Likewise.
908 2017-04-13 Alan Modra <amodra@gmail.com>
910 * bfd.c (PRINT_TYPE): Define.
911 (_doprnt): New function.
912 (error_handler_internal): Use _doprnt.
913 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
914 calls in their natural order, throughout file.
915 * coff-mcore.c: Likewise.
916 * coff-ppc.c: Likewise.
917 * coff-tic80.c: Likewise.
918 * cofflink.c: Likewise.
919 * elf-s390-common.c: Likewise.
921 * elf32-arm.c: Likewise.
922 * elf32-i386.c: Likewise.
923 * elf32-m32r.c: Likewise.
924 * elf32-msp430.c: Likewise.
925 * elf32-spu.c: Likewise.
926 * elf64-ia64-vms.c: Likewise.
927 * elf64-sparc.c: Likewise.
928 * elf64-x86-64.c: Likewise.
929 * elflink.c: Likewise.
930 * elfnn-aarch64.c: Likewise.
931 * elfnn-ia64.c: Likewise.
932 * elfxx-mips.c: Likewise.
934 2017-04-13 Alan Modra <amodra@gmail.com>
936 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
937 branch veneers" error. Fix double space and format message.
938 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
939 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
941 2017-04-13 Alan Modra <amodra@gmail.com>
943 * bfd-in2.h: Regenerate.
945 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
947 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
948 extra `\n' in warning/error messages.
949 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
950 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
952 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
954 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
955 processor-specific properties with generic ELF target vector.
957 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
959 * elf32-sparc.c (elf_backend_fixup_symbol): New.
960 * elf64-sparc.c (elf_backend_fixup_symbol): New.
961 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
962 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
964 (link_hash_newfunc): Initialize has_got_reloc and
966 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
968 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
970 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
972 (_bfd_sparc_elf_fixup_symbol): New function.
973 (allocate_dynrelocs): Don't allocate space for dynamic
974 relocations and discard relocations against resolved undefined
975 weak symbols in executable. Don't make resolved undefined weak
976 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
977 relocation against undefined weak symbols in PIE.
978 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
979 relocations against resolved undefined weak symbols in PIE
980 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
981 without ynamic PLT/GOT relocations for resolved undefined weak
983 Don't generate dynamic relocation against resolved undefined
984 weak symbol in executable.
985 (pie_finish_undefweak_symbol): New function.
986 (_bfd_sparc_elf_finish_dynamic_sections): Call
987 pie_finish_undefweak_symbol on all symbols in PIE.
988 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
989 (_bfd_sparc_elf_fixup_symbol): New function.
991 2017-04-10 Nick Clifton <nickc@redhat.com>
993 * config.bfd: Remove ns32k from obsolete list.
995 2017-04-10 Alan Modra <amodra@gmail.com>
998 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
999 (special_sections_i): Likewise for .init_array.
1000 (special_sections_p): Likewise for .preinit_array.
1002 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
1006 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
1007 ELF_COMMON_DEF_P for common symbols.
1008 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
1009 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1010 * elflink.c (_bfd_elf_merge_symbol): Revert commits
1011 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
1012 07492f668d2173da7a2bda3707ff0985e0f460b6.
1014 2017-04-07 Pedro Alves <palves@redhat.com>
1016 * opncls.c (bfd_get_debug_link_info): Rename to...
1017 (bfd_get_debug_link_info_1): ... this. Change type of second
1018 parameter to void pointer. Adjust.
1019 (bfd_get_debug_link_info): Reimplement on top of
1020 bfd_get_debug_link_info_1.
1021 (separate_debug_file_exists, separate_alt_debug_file_exists):
1022 Change type of second parameter to void pointer. Adjust.
1023 (get_func_type, check_func_type): Change type of second parameter
1025 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
1026 the callback functions instead of passing the address of a local.
1027 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
1028 find_separate_debug_file.
1029 (get_alt_debug_link_info_shim): Change type of second parameter to
1030 void pointer. Adjust.
1031 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
1032 find_separate_debug_file.
1033 (get_build_id_name, bfd_boolean check_build_id_file): Change type
1034 of second parameter to void pointer. Adjust.
1035 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
1036 pointer local to find_separate_debug_file.
1038 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
1040 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
1041 external symbols with a definition.
1042 (_bfd_coff_gc_mark_extra_sections): Fix typo.
1044 2017-04-07 Alan Modra <amodra@gmail.com>
1046 * po/SRC-POTFILES.in: Regenerate.
1048 2017-04-05 Alan Modra <amodra@gmail.com>
1050 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
1053 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
1055 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
1056 numbers for DataDirectory entry indicies passed to
1059 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
1061 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
1062 each GNU_MBIND section and align GNU_MBIND section to page size.
1063 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
1064 segment for each GNU_MBIND section.
1065 (_bfd_elf_init_private_section_data): Copy sh_info from input
1066 for GNU_MBIND section.
1068 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
1070 * elfnn-riscv.c (GP_NAME): Delete.
1071 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
1072 (_bfd_riscv_relax_lui): Likewise.
1074 2017-04-04 Nick Clifton <nickc@redhat.com>
1077 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
1079 (bfd_elf_final_link): Only initialize the extended symbol index
1080 section if there are extended symbol tables to list.
1082 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
1084 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
1085 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
1086 * configure.ac (elf): Add elf-properties.lo.
1087 * Makefile.in: Regenerated.
1088 * configure: Likewise.
1089 * elf-bfd.h (elf_property_kind): New.
1090 (elf_property): Likewise.
1091 (elf_property_list): Likewise.
1092 (elf_properties): Likewise.
1093 (_bfd_elf_parse_gnu_properties): Likewise.
1094 (_bfd_elf_get_property): Likewise.
1095 (_bfd_elf_link_setup_gnu_properties): Likewise.
1096 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
1097 and setup_gnu_properties.
1098 (elf_obj_tdata): Add properties.
1099 * elf-properties.c: New file.
1100 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
1101 (elf_i386_merge_gnu_properties): Likewise.
1102 (elf_backend_parse_gnu_properties): Likewise.
1103 (elf_backend_merge_gnu_properties): Likewise.
1104 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
1105 (elf_x86_64_merge_gnu_properties): Likewise.
1106 (elf_backend_parse_gnu_properties): Likewise.
1107 (elf_backend_merge_gnu_properties): Likewise.
1108 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
1109 (elf_backend_parse_gnu_properties): Likewise.
1110 (elf_backend_setup_gnu_properties): Likewise.
1111 (elfNN_bed): Add elf_backend_parse_gnu_properties,
1112 elf_backend_merge_gnu_properties and
1113 elf_backend_setup_gnu_properties.
1115 2017-03-30 Pip Cet <pipcet@gmail.com>
1117 * elf32-wasm32.c: Add relocation code, two relocs.
1118 * reloc.c: Add wasm32 relocations.
1119 * libbfd.h: Regenerate.
1120 * bfd-in2.h: Regenerate.
1121 * bfd/po/bfd.pot: Regenerate.
1123 2017-03-29 Nick Clifton <nickc@redhat.com>
1126 * coff-bfd.h (struct coff_section_data): Add new fields:
1127 saved_bias and bias.
1128 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
1129 computed for PE binaries.
1130 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
1133 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
1136 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
1137 to handle a local symbol with a hash-symbol-entry; without PLT.
1138 Add BFD_ASSERT for an incidental case with GOT entry present.
1139 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
1140 isn't forced-or-set local.
1142 2017-03-27 Pip Cet <pipcet@gmail.com>
1144 * wasm-module.c: New file to support WebAssembly modules.
1145 * wasm-module.h: New file to support WebAssembly modules.
1146 * doc/webassembly.texi: Start documenting wasm-module.c.
1147 * config.bfd: Add wasm_vec.
1148 * targets.c: Likewise.
1149 * configure.ac: Likewise.
1150 * Makefile.am: Add entries for wasm-module.c.
1151 * Makefile.in: Regenerate.
1152 * configure: Regenerate.
1153 * po/SRC-POTFILES.in: Regenerate.
1155 2017-03-27 Pip Cet <pipcet@gmail.com>
1157 * cpu-wasm32.c: New file to support wasm32 architecture.
1158 * elf32-wasm32.c: New file to support wasm32 architecture.
1159 * Makefile.am: Add wasm32 architecture.
1160 * archures.c: Likewise.
1161 * config.bfd: Likewise.
1162 * configure.ac: Likewise.
1163 * targets.c: Likewise.
1164 * Makefile.in: Regenerate.
1165 * bfd-in2.h: Regenerate.
1166 * configure: Regenerate.
1167 * po/SRC-POTFILES.in: Regenerate.
1169 2017-03-20 Alan Modra <amodra@gmail.com>
1172 * elf64-ppc.c (compare_symbols): Stabilize sort.
1174 2017-03-18 Alan Modra <amodra@gmail.com>
1176 * elf64-ppc.c (struct ppc_link_hash_table): Add
1177 local_ifunc_resolver and maybe_local_ifunc_resolver.
1178 (ppc_build_one_stub): Set flags on emitting dynamic
1179 relocation to ifunc.
1180 (ppc64_elf_relocate_section): Likewise.
1181 (ppc64_elf_finish_dynamic_symbol): Likewise.
1182 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
1183 local dynamic relocs to ifuncs.
1184 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
1185 local_ifunc_resolver and maybe_local_ifunc_resolver.
1186 (ppc_elf_relocate_section): Set flag on emitting dynamic
1187 relocation to ifuncs.
1188 (ppc_elf_finish_dynamic_symbol): Likewise.
1189 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
1190 dynamic relocs to ifuncs.
1192 2017-03-13 Nick Clifton <nickc@redhat.com>
1195 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
1196 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
1197 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
1198 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
1199 * bfd-in2.h: Regenerate.
1200 * libbfd.h: Regenerate.
1201 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
1203 (IS_AARCH64_TLSDESC_RELOC): Likewise.
1204 (elfNN_aarch64_howto_table): Likewise.
1205 (aarch64_tls_transition_without_check): Likewise.
1206 (aarch64_reloc_got_type): Likewise.
1207 (elfNN_aarch64_final_link_relocate): Likewise.
1208 (elfNN_aarch64_tls_relax): Likewise.
1209 (elfNN_aarch64_relocate_section): Likewise.
1210 (elfNN_aarch64_gc_sweep_hook): Likewise.
1211 (elfNN_aarch64_check_relocs): Likewise.
1212 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
1213 (_bfd_aarch64_elf_resolve_relocation): Likewise.
1215 2017-03-11 Alan Modra <amodra@gmail.com>
1217 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
1218 parameter is in fact used. Whitespace fixes.
1219 * elf64-ppc.c: Likewise.
1221 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
1223 * rs6000-core.c (CORE_NEW): Simplify macro when
1224 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
1226 2017-03-07 Alan Modra <amodra@gmail.com>
1230 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
1233 2017-03-05 Alan Modra <amodra@gmail.com>
1235 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
1236 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
1237 (next_cie_fde_offset): New function.
1238 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
1239 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
1240 four bytes. Align CIEs to four or eight bytes depending on
1241 per_encoding_aligned8. Align FDEs according to their encoding.
1242 Pad last FDE to output section alignment.
1243 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
1245 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
1246 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
1247 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
1249 2017-03-02 Martin Bickel <binutils@ineranves.de>
1252 * elf.c (rewrite_elf_program_header): Do not issue a warning for
1253 empty segments which have a zero filesz, but a non-zero memsz.
1255 2017-03-02 Alan Modra <amodra@gmail.com>
1257 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
1259 2017-02-28 Alan Modra <amodra@gmail.com>
1261 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
1262 (ppc64_elf_relocate_section): Likewise.
1264 2017-02-28 Alan Modra <amodra@gmail.com>
1267 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
1268 rather than elf32_nios2_hash_table or elf_hash_table.
1269 (create_got_section): Likewise.
1270 (nios2_elf32_finish_dynamic_symbol): Likewise.
1271 (nios2_elf32_adjust_dynamic_symbol): Likewise.
1272 (nios2_elf32_size_dynamic_sections): Likewise.
1273 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
1274 vars. Use htab equivalents directly instead. Don't create
1275 all dynamic sections on needing just the GOT. Use a goto
1276 rather than a fall-through with reloc test. Ensure
1277 htab->dynobj is set when making dynamic sreloc section.
1278 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
1279 equivalent directly instead. Don't segfault on looking for
1280 .dynamic when dynamic sections have not been created. Don't
1281 segfault on .got.plt being discarded.
1282 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
1283 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
1284 fixme and another not so relevant comment.
1285 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
1286 already set, set hash table dynobj on creating .sbss.
1288 2017-02-28 Alan Modra <amodra@gmail.com>
1290 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
1291 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
1292 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
1293 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
1294 (ppc64_elf_relocate_section): Likewise.
1295 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
1296 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
1297 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
1298 * libbfd.h: Regenerate.
1299 * bfd-in2.h: Regenerate.
1301 2017-02-28 Alan Modra <amodra@gmail.com>
1303 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
1304 dynamic .data.rel.ro read-only.
1305 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
1306 rather than section flags when deciding where copy reloc goes.
1307 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
1308 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
1309 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
1310 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
1311 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
1312 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
1313 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
1314 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
1315 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
1316 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
1317 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
1318 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
1319 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
1320 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
1321 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
1322 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
1323 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
1324 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
1325 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
1327 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
1329 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
1330 `jalr $0, $25' instruction encoding.
1332 2017-02-27 Nick Clifton <nickc@redhat.com>
1335 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
1336 generating a seg-fault when encountering a symbol that has been
1337 deleted by garbage collection.
1339 2017-02-25 Alan Modra <amodra@gmail.com>
1341 * elf32-arc.c (struct dynamic_sections): Delete.
1342 (enum dyn_section_types): Delete.
1343 (dyn_section_names): Delete.
1344 (arc_create_dynamic_sections): Delete.
1345 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
1346 segfault on discarded .rela.plt section.
1347 (elf_arc_size_dynamic_sections): Formatting. Don't call
1348 arc_create_dynamic_sections. Don't allocate memory for sections
1349 handled by the generic linker. Correct code finding relocs in
1350 read-only sections. Set SEC_EXCLUDE on zero size .got,
1351 .got.plt, and .dynbss sections. Do set .interp for pies.
1353 2017-02-24 Andrew Waterman <andrew@sifive.com>
1355 * elfnn-riscv.c (GP_NAME): New macro.
1356 (riscv_global_pointer_value): Use it.
1357 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
1358 output section, consider only that section's alignment.
1360 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
1362 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
1363 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
1364 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
1365 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
1367 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
1369 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
1370 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
1373 2017-02-23 Alan Modra <amodra@gmail.com>
1376 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
1378 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
1379 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
1382 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
1385 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
1386 processing ahead of the call to `elf_gc_sweep_symbol'.
1388 2017-02-22 Nick Clifton <nickc@redhat.com>
1391 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
1392 created section 4-byte alignment.
1394 2017-02-22 Alan Modra <amodra@gmail.com>
1396 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
1397 on .got or .plt output section being discarded by script.
1398 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
1401 2017-02-21 Alan Modra <amodra@gmail.com>
1403 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
1404 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
1406 2017-02-20 Alan Modra <amodra@gmail.com>
1409 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
1410 if DT_RELSZ/DT_RELASZ is zero.
1412 2017-02-17 Nick Clifton <nickc@redhat.com>
1414 * compress.c (bfd_get_full_section_contents): Remember to reduce
1415 compressed size by the sizeof the compression header when
1416 decompressing the contents.
1418 2017-02-17 Pedro Alves <palves@redhat.com>
1420 * srec.c (Chunk): Rename to ...
1421 (_bfd_srec_len): ... this.
1422 (S3Forced): Rename to ...
1423 (_bfd_srec_forceS3): ... this.
1424 * objcopy.c: Adjust all references.
1426 2017-02-17 Pedro Alves <palves@redhat.com>
1428 * archive.c (bsd_write_armap): Rename to ...
1429 (_bfd_bsd_write_armap): ... this.
1430 (coff_write_armap): Rename to ...
1431 (_bfd_coff_write_armap): ... this.
1432 * libbfd-in.h (bsd_write_armap): Rename to ...
1433 (_bfd_bsd_write_armap): ... this.
1434 (coff_write_armap): Rename to ...
1435 (_bfd_coff_write_armap): ... this.
1436 * aout-target.h, aout-tic30.c: Adjust all users.
1437 * libbfd.h: Regenerate.
1439 2017-02-17 Pedro Alves <palves@redhat.com>
1441 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
1442 (warn_deprecated): Rename to ...
1443 (_bfd_warn_deprecated): ... this.
1444 * libbfd.c (warn_deprecated): Rename to ...
1445 (_bfd_warn_deprecated): ... this.
1446 * bfd-in2.h: Regenerate.
1448 2017-02-17 Pedro Alves <palves@redhat.com>
1450 * bfdio.c (real_ftell): Rename to ...
1451 (_bfd_real_ftell): ... this.
1452 (real_fseek): Rename to ...
1453 (_bfd_real_fseek): ... this.
1454 (real_fopen): Rename to ...
1455 (_bfd_real_fopen): ... this.
1456 * libbfd-in.h (real_ftell): Rename to ...
1457 (_bfd_real_ftell): ... this.
1458 (real_fseek): Rename to ...
1459 (_bfd_real_fseek): ... this.
1460 (real_fopen): Rename to ...
1461 (_bfd_real_fopen): ... this.
1462 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
1463 * libbfd.h: Regenerate.
1465 2017-02-17 Pedro Alves <palves@redhat.com>
1467 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
1468 * libbfd.c (read_unsigned_leb128): Rename to ...
1469 (_bfd_read_unsigned_leb128): ... this.
1470 (read_signed_leb128): Rename to ...
1471 (_bfd_read_signed_leb128): ... this.
1472 (safe_read_leb128): Rename to ...
1473 (_bfd_safe_read_leb128): ... this.
1474 * libbfd-in.h (read_unsigned_leb128): Rename to ...
1475 (_bfd_read_unsigned_leb128): ... this.
1476 (read_signed_leb128): Rename to ...
1477 (_bfd_read_signed_leb128): ... this.
1478 (safe_read_leb128): Rename to ...
1479 (_bfd_safe_read_leb128): ... this.
1480 * libbfd.h: Renegerate.
1482 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
1484 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
1485 before trying to fine matching file and line information.
1487 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
1489 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
1490 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
1491 not match current bfd, then reload debug information. Record bfd
1492 we're loading debug info for in the stash. If we have debug
1493 informatin in the cache then perform section placement before
1496 2017-02-16 Alan Modra <amodra@gmail.com>
1499 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
1500 * elfxx-target.h (elf_backend_no_page_alias): Define.
1501 (elfNN_bed): Init new field.
1502 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
1503 ensure PT_LOAD segment starts on a new page.
1504 * elf32-hppa.c (elf_backend_no_page_alias): Define.
1506 2017-02-16 Alan Modra <amodra@gmail.com>
1509 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
1512 2017-02-16 Jiong Wang <jiong.wang@arm.com>
1514 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
1515 * bfd-in2.h: Regenerated.
1517 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
1520 * elf32-i386.c (elf_i386_relocate_section): Allow
1521 "lea foo@GOT, %reg" in PIC.
1523 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
1526 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
1527 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
1528 error against local IFUNC symbol without a base register for
1531 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
1533 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
1534 `%P: %H:' with `info->callbacks->einfo'.
1535 (ppc_elf_relocate_section): Likewise.
1536 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
1537 (ppc64_elf_edit_toc): Likewise.
1538 (ppc64_elf_relocate_section): Likewise.
1540 2017-02-14 Alan Modra <amodra@gmail.com>
1542 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
1543 --gc-keep-exported, and test versioned field of sym rather than
1544 looking for @ in name.
1546 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
1548 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
1551 2017-02-13 Nick Clifton <nickc@redhat.com>
1554 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
1557 2017-02-07 Andrew Waterman <andrew@sifive.com>
1559 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
1560 entry size if PLT header is written.
1562 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
1564 Fix sparc64 dynamic relocation processing to use the dynamic
1566 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
1567 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
1570 2017-02-03 Nick Clifton <nickc@redhat.com>
1573 * coffcode.h (coff_write_object_contents): Enlarge size of
1574 s_name_buf in order to avoid compile time warning about possible
1576 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
1577 32-bits of insn value before printing into buffer.
1579 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1581 * elfxx-mips.c (mips_elf_hash_sort_data): Add
1582 `max_local_dynindx'.
1583 (mips_elf_sort_hash_table): Handle it.
1584 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
1585 symbols bump up `max_local_dynindx' rather than
1586 `max_non_got_dynindx'.
1588 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1590 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
1591 `min_got_dynindx', `max_unref_got_dynindx' and
1592 `max_non_got_dynindx' members to the `bfd_size_type' data type.
1593 (mips_elf_sort_hash_table): Adjust accordingly.
1595 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1597 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
1598 to access the hash table.
1600 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1602 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
1603 non-NULL `htab' to the beginning.
1605 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1607 * elflink.c (elf_gc_sweep): Wrap overlong line.
1609 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
1611 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
1612 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
1613 * elfxx-mips.c (mips_elf_link_hash_table): Add
1614 `ignore_branch_isa' member.
1615 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
1616 in branch relocation calculation as an error if
1617 `ignore_branch_isa' has been set.
1618 (_bfd_mips_elf_insn32): Rename to...
1619 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
1620 parameter to `insn32' and add an `ignore_branch_isa' parameter.
1621 Handle the new parameter.
1623 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
1625 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
1626 local variable dynobj.
1629 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
1630 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
1631 executable from read-only sections into sdynrelro.
1632 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
1633 dynamic relocs in sdynrelro.
1634 (elf_backend_want_dynrelro): Define.
1636 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
1638 * config.bfd (*-*-rtemsaout*): Mark as removed.
1640 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
1642 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
1643 (arm-*-rtems*): Move to (arm*-*-eabi*).
1644 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
1645 (m68-*-rtems*): Move to (m68*-*-elf*).
1647 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
1649 * config.bfd (*-*-rtemscoff*): Mark as removed.
1651 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
1654 * elflink.c (bfd_elf_record_link_assignment): Revert last
1655 change and don't ever clear `forced_local'. Set `mark'
1657 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
1659 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
1660 (bfd_elf_size_dynamic_sections): ... here.
1661 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
1662 and set `mark' instead in `__tls_get_addr_opt' processing.
1663 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
1665 2017-01-24 Alan Modra <amodra@gmail.com>
1667 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
1668 where dynamic relocs are preferable. Allow ifunc too.
1669 (ensure_undefweak_dynamic): New function.
1670 (allocate_dynrelocs): Use it here. Move plt handling last and
1671 don't make symbols dynamic, simplifying loop. Only make undef
1672 weak symbols with GOT entries dynamic. Correct condition
1673 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
1674 comments. Remove goto.
1675 (ppc_elf_relocate_section): Correct test for using dynamic
1676 symbol on GOT relocs. Rearrange test for emitting GOT relocs
1677 to suit. Set up explicit tls_index entries and implicit GOT
1678 tls_index entries resolvable at link time for
1679 __tls_get_addr_opt. Simplify test to clear mem for prelink.
1680 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
1681 (ensure_undefweak_dynamic): New function.
1682 (allocate_dynrelocs): Use it here. Only make undef weak symbols
1683 with GOT entries dynamic. Remove unnecessary test of
1684 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
1685 (ppc64_elf_relocate_section): Correct test for using dynamic
1686 symbol on GOT relocs. Rearrange test for emitting GOT relocs
1687 to suit. Set up explicit tls_index entries and implicit GOT
1688 tls_index entries resolvable at link time for __tls_get_addr_opt.
1689 Simplify expression to clear mem for prelink.
1691 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
1693 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
1695 2017-01-20 Jiong Wang <jiong.wang@arm.com>
1697 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
1698 (elf_backend_hash_symbol): Define.
1700 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
1703 * elflink.c (bfd_elf_record_link_assignment): Clear any
1704 `forced_local' marking for DSO symbols that are not being
1707 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
1709 * elfnn-riscv.c (riscv_elf_object_p): New function.
1711 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
1714 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
1716 (elf_x86_64_check_relocs): Create .eh_frame section for the
1718 (elf_x86_64_size_dynamic_sections): Allocate and initialize
1719 .eh_frame section for the .plt.bnd section.
1720 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
1721 for the .plt.bnd section.
1723 2017-01-12 Nick Clifton <nickc@redhat.com>
1726 * opncls.c (find_separate_debug_file): Add include_dirs
1727 parameter. Only include the directory part of the bfd's filename
1728 in search paths if include_dirs is true. Add a couple of extra
1729 locations for looking for debug files.
1730 ( bfd_follow_gnu_debuglink): Update invocation of
1731 find_separate_debug_file.
1732 (bfd_follow_gnu_debugaltlink): Likewise.
1733 (get_build_id): New function: Finds the build-id of the given bfd.
1734 (get_build_id_name): New function: Computes the name of the
1735 separate debug info file for a bfd, based upon its build-id.
1736 (check_build_id_file): New function: Checks to see if a separate
1737 debug info file exists at the given location, and that its
1738 build-id matches that of the original bfd.
1739 (bfd_follow_build_id_debuglink): New function: Finds a separate
1740 debug info file for a given bfd by using the build-id method.
1741 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
1742 method of locating a separate debug info file before using the
1744 * bfd-in2.h: Regenerate.
1746 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
1749 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
1750 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
1751 elf_x86_64_eh_frame_plt_got.
1752 (elf_x86_64_size_dynamic_sections): Get unwind info from
1753 elf_x86_64_bnd_arch_bed for the BND PLT.
1755 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
1757 * config.bfd: Add entries for i686-redox and x86_64-redox.
1759 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
1761 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
1763 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
1764 .eh_frame section to 4 bytes for x32.
1765 (elf_x86_64_check_relocs): Likewise.
1767 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
1770 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
1771 (PLT_GOT_FDE_LENGTH): Likewise.
1772 (elf_i386_plt_layout): Add eh_frame_plt_got and
1773 eh_frame_plt_got_size.
1774 (elf_i386_plt): Updated.
1775 (elf_i386_link_hash_table): Add plt_got_eh_frame.
1776 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
1777 (elf_i386_size_dynamic_sections): Allocate and initialize
1778 .eh_frame section for .plt.got.
1779 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
1781 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
1782 eh_frame_plt_got_size.
1783 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
1784 (PLT_GOT_FDE_LENGTH): Likewise.
1785 (elf_x86_64_backend_data): Add eh_frame_plt_got and
1786 eh_frame_plt_got_size.
1787 (elf_x86_64_arch_bed): Updated.
1788 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
1789 eh_frame_plt_got_size.
1790 (elf_x86_64_nacl_arch_bed): Likewise.
1791 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
1792 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
1793 (elf_x86_64_size_dynamic_sections): Allocate and initialize
1794 .eh_frame section for .plt.got.
1795 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
1798 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
1800 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
1801 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
1803 2017-01-09 Nick Clifton <nickc@redhat.com>
1805 * dwarf2.c (lookup_address_in_function_table): Return early if
1806 there are no functions in the given comp unit, or if the high
1807 address of the last function in the comp unit is less than the
1810 2017-01-09 Nick Clifton <nickc@redhat.com>
1813 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
1814 message if there are too many symbols to load.
1816 2017-01-04 James Clarke <jrtc27@jrtc27.com>
1818 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
1819 if relocs are cached.
1821 2017-01-03 Rich Felker <bugdal@aerifal.cx>
1824 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
1825 for R_MICROBLAZE_GOTOFF_64.
1827 2017-01-03 Nick Clifton <nickc@redhat.com>
1829 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
1830 warning about using a possibly uninitialised variable.
1832 2017-01-02 Alan Modra <amodra@gmail.com>
1834 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
1835 (allocate_plt_static, allocate_dynrelocs): Use it.
1837 2017-01-02 Alan Modra <amodra@gmail.com>
1839 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
1840 .PARISC.unwind section.
1842 2017-01-02 Alan Modra <amodra@gmail.com>
1845 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
1846 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
1847 indirect to GOT pointer relative code edit.
1849 2017-01-02 Alan Modra <amodra@gmail.com>
1851 Update year range in copyright notice of all files.
1853 For older changes see ChangeLog-2016
1855 Copyright (C) 2017 Free Software Foundation, Inc.
1857 Copying and distribution of this file, with or without modification,
1858 are permitted in any medium without royalty provided the copyright
1859 notice and this notice are preserved.
1865 version-control: never