1 2018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
6 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
8 * config/tc-arc.c (md_undefined_symbol): Changed.
9 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
11 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
13 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
16 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
18 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
19 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
21 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
23 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
26 2017-06-08 Richard Earnshaw <rearnsha@arm.com>
28 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
29 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
30 is non-zero. Add clarifying comments.
32 2017-06-08 H.J. Lu <hongjiu.lu@intel.com>
34 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
35 name. Use local IFUNC symbol name string to report unsupported
36 non-PIC call to IFUNC function.
37 (elf_i386_relocate_section): Dump local IFUNC name with minfo
38 when generating R_386_IRELATIVE relocation.
39 (elf_i386_finish_dynamic_symbol): Likewise.
40 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
42 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
43 when generating R_X86_64_IRELATIVE relocation.
44 (elf_x86_64_finish_dynamic_symbol): Likewise.
46 2017-06-08 Jiong Wang <jiong.wang@arm.com>
49 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
50 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
51 runtime for copy relocation elimination cases.
52 (alias_readonly_dynrelocs): New function.
53 (elfNN_aarch64_adjust_dynamic_symbol): Keep the dynamic relocs instead
54 of generating copy relocation if it is not against read-only sections.
55 (elfNN_aarch64_check_relocs): Likewise.
57 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
59 * elf.c (setup_group): Make sure BFD sections are created for all
60 group sections in the input file when processing SHF_GROUP
62 (bfd_section_from_shdr): Avoid duplicating logic already
63 implemented in `setup_group'.
65 2017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
68 * peXXigen.c (pe_print_idata): Use the address of the first thunk
69 if the hint address is zero.
71 2017-06-06 James Clarke <jrtc27@jrtc27.com>
74 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
75 ELF_COMMON_DEF_P for common symbols.
77 2017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
79 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
80 SEC_GROUP sections as SEC_EXCLUDE.
81 (bfd_elf_set_group_contents): Replace use of abort with an assert.
82 (assign_section_numbers): Use resolve_section_groups flag instead
83 of relocatable link type.
84 (_bfd_elf_init_private_section_data): Use resolve_section_groups
85 flag instead of checking the final_link flag for part of the
86 checks in here. Fix white space as a result.
87 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
88 instead of relocatable link type.
89 (bfd_elf_final_link): Likewise.
91 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
93 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
95 * elf32-score.c (score_elf_final_link_relocate): Likewise.
96 (s3_bfd_score_elf_check_relocs): Likewise.
97 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
98 (score_elf_final_link_relocate): Likewise.
99 (s7_bfd_score_elf_check_relocs): Likewise.
101 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
103 * elflink.c (init_reloc_cookie_rels): Remove unused variable
106 2017-06-06 Maciej W. Rozycki <macro@imgtec.com>
108 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
109 from `reloc_count' rather than decrementing it.
110 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
111 `reloc_count' by `int_rels_per_ext_rel'.
112 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
113 `reloc_count' by `int_rels_per_ext_rel' for last relocation
115 (s3_bfd_score_elf_check_relocs): Likewise.
116 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
117 (s7_bfd_score_elf_relocate_section): Likewise.
118 (s7_bfd_score_elf_check_relocs): Likewise.
119 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
120 prototype and function.
121 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
122 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
123 triple rather than once the sum of REL and RELA relocation entry
125 (bfd_elf64_get_reloc_upper_bound): Remove macro.
126 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
127 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
128 storage allocation size determination.
129 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
130 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
131 by `int_rels_per_ext_rel' for last relocation entry
133 (bfd_elf_final_link): Do not multiply `reloc_count' by
134 `int_rels_per_ext_rel' for internal relocation storage
135 allocation size determination.
136 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
137 `int_rels_per_ext_rel' for last relocation entry determination.
138 (elf_gc_smash_unused_vtentry_relocs): Likewise.
139 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
140 (_bfd_mips_elf_relocate_section): Likewise.
142 2017-06-05 Alan Modra <amodra@gmail.com>
145 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
147 2017-06-01 John Baldwin <jhb@FreeBSD.org>
149 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
150 determine structure sizes.
151 (elfcore_grok_freebsd_prstatus): Likewise.
153 2017-06-01 Alan Modra <amodra@gmail.com>
155 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
156 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
158 (is_elfv2_localentry0): New function.
159 (ppc64_elf_tls_setup): Default params->plt_localentry0.
160 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
161 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
162 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
163 optimized localentry:0 stubs.
164 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
165 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
167 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
169 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
171 2017-05-30 Casey Smith <clegg89@gmail.com>
174 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
175 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
177 2017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
179 * cpu-arc.c (arc_compatible): New function.
181 2017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
183 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
185 2017-05-30 H.J. Lu <hongjiu.lu@intel.com>
188 * bfdio.c (bfd_get_file_size): New function.
189 * bfd-in2.h: Regenerated.
191 2017-05-23 Dilian Palauzov <git-dpa@aegee.org>
193 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
196 2017-05-22 H.J. Lu <hongjiu.lu@intel.com>
198 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
199 dynobj instead of htab->elf.dynobj.
201 2017-05-19 Maciej W. Rozycki <macro@imgtec.com>
203 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
205 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
206 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
207 actual number of internal relocations retrieved. Adjust
208 function description.
209 (bfd_elf64_canonicalize_reloc): Remove macro.
210 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
212 2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
214 * archures.c (bfd_mach_sparc_v9m8): Define.
215 (bfd_mach_sparc_v8plusm8): Likewise.
216 (bfd_mach_sparc_v9_p): Adjust to M8.
217 (bfd_mach_sparc_64bit_p): Likewise.
218 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
219 bfd_mach_sparc_v8plusm8.
220 * bfd-in2.h: Regenerated.
221 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
223 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
224 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
225 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
227 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
228 bfd_mach_sparc_v8plusm8.
230 2017-05-19 Alan Modra <amodra@gmail.com>
232 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
233 debug and special sections when no non-note alloc sections in an
236 2017-05-18 Alan Modra <amodra@gmail.com>
238 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
239 * elf-m10300.c: Likewise.
241 * elf32-arc.c: Likewise.
242 * elf32-bfin.c: Likewise.
243 * elf32-m68k.c: Likewise.
244 * elf32-nds32.c: Likewise.
245 * elf32-tilepro.c: Likewise.
246 * elflink.c: Likewise.
247 * elfnn-aarch64.c: Likewise.
248 * elfnn-riscv.c: Likewise.
249 * elfxx-tilegx.c: Likewise.
250 * mach-o.c: Likewise.
251 * peXXigen.c: Likewise.
252 * vms-alpha.c: Likewise.
253 * vms-lib.c: Likewise.
255 2017-05-17 H.J. Lu <hongjiu.lu@intel.com>
258 * elflink.c (elf_gc_mark_debug_section): New function.
259 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
260 referenced by kept debug sections.
262 2017-05-16 Alan Modra <amodra@gmail.com>
264 * elf-m10300.c: Rename occurrences of non_ir_ref.
265 * elf32-arm.c: Likewise.
266 * elf32-bfin.c: Likewise.
267 * elf32-cr16.c: Likewise.
268 * elf32-cris.c: Likewise.
269 * elf32-d10v.c: Likewise.
270 * elf32-dlx.c: Likewise.
271 * elf32-fr30.c: Likewise.
272 * elf32-frv.c: Likewise.
273 * elf32-hppa.c: Likewise.
274 * elf32-i370.c: Likewise.
275 * elf32-i386.c: Likewise.
276 * elf32-iq2000.c: Likewise.
277 * elf32-lm32.c: Likewise.
278 * elf32-m32c.c: Likewise.
279 * elf32-m32r.c: Likewise.
280 * elf32-m68hc1x.c: Likewise.
281 * elf32-m68k.c: Likewise.
282 * elf32-mcore.c: Likewise.
283 * elf32-metag.c: Likewise.
284 * elf32-microblaze.c: Likewise.
285 * elf32-moxie.c: Likewise.
286 * elf32-msp430.c: Likewise.
287 * elf32-mt.c: Likewise.
288 * elf32-nios2.c: Likewise.
289 * elf32-or1k.c: Likewise.
290 * elf32-ppc.c: Likewise.
291 * elf32-rl78.c: Likewise.
292 * elf32-s390.c: Likewise.
293 * elf32-score.c: Likewise.
294 * elf32-score7.c: Likewise.
295 * elf32-sh.c: Likewise.
296 * elf32-tic6x.c: Likewise.
297 * elf32-tilepro.c: Likewise.
298 * elf32-v850.c: Likewise.
299 * elf32-vax.c: Likewise.
300 * elf32-xstormy16.c: Likewise.
301 * elf32-xtensa.c: Likewise.
302 * elf64-alpha.c: Likewise.
303 * elf64-hppa.c: Likewise.
304 * elf64-ia64-vms.c: Likewise.
305 * elf64-mmix.c: Likewise.
306 * elf64-ppc.c: Likewise.
307 * elf64-s390.c: Likewise.
308 * elf64-sh64.c: Likewise.
309 * elf64-x86-64.c: Likewise.
310 * elflink.c: Likewise.
311 * elfnn-aarch64.c: Likewise.
312 * elfnn-ia64.c: Likewise.
313 * elfnn-riscv.c: Likewise.
314 * elfxx-mips.c: Likewise.
315 * elfxx-sparc.c: Likewise.
316 * elfxx-tilegx.c: Likewise.
317 * linker.c: Likewise.
319 2017-05-16 Alan Modra <amodra@gmail.com>
321 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
322 * elflink.c (elf_link_add_object_symbols): Update to use
324 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
326 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
328 2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
330 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
332 2017-05-12 H.J. Lu <hongjiu.lu@intel.com>
334 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
335 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
337 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
339 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
341 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
343 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
344 to plt_second/plt_second_eh_frame.
345 (elf_x86_64_link_hash_newfunc): Updated.
346 (elf_x86_64_allocate_dynrelocs): Likewise.
347 (elf_x86_64_size_dynamic_sections): Likewise.
348 (elf_x86_64_relocate_section): Likewise.
349 (elf_x86_64_finish_dynamic_symbol): Likewise.
350 (elf_x86_64_finish_dynamic_sections): Likewise.
351 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
352 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
354 (elf_backend_setup_gnu_properties): Updated. Create the
355 .plt.sec section instead of the .plt.sec section.
357 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
359 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
360 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
361 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
363 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
365 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
366 (bfd_elf64_set_reloc): Define.
367 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
369 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
371 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
372 (struct bfd_target): New field _bfd_set_reloc.
373 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
374 * reloc.c (_bfd_generic_set_reloc): New function.
375 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
376 * nlm-target.h (nlm_set_reloc): Likewise.
377 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
378 * aout-tic30.c (MY_set_reloc): Likewise.
379 * aout-target.h (MY_set_reloc): Likewise.
380 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
381 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
382 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
383 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
384 * aout-adobe.c (aout_32_set_reloc): Likewise.
385 * bout.c (b_out_set_reloc): Likewise.
386 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
387 * i386os9k.c (aout_32_set_reloc): Likewise.
388 * ieee.c (ieee_set_reloc): Likewise.
389 * oasys.c (oasys_set_reloc): Likewise.
390 * som.c (som_set_reloc): Likewise.
391 * versados.c (versados_set_reloc): Likewise.
392 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
393 _bfd_generic_set_reloc.
394 (rs6000_xcoff64_aix_vec): LIkewise.
395 * libbfd.c (_bfd_norelocs_set_reloc): New function.
396 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
397 * i386msdos.c (msdos_set_reloc): Define to
398 _bfd_norelocs_set_reloc.
399 * elfcode.h (elf_set_reloc): Define.
400 * bfd-in2.h: Regenerated.
402 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
405 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
406 for IFUNC function address.
408 2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
410 * elf32-arc.c (FEATURE_LIST_NAME): Define.
411 (CONFLICT_LIST): Likewise.
412 (opcode/arc-attrs.h): Include.
413 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
414 (arc_extract_features): New file.
415 (arc_stralloc): Likewise.
416 (arc_elf_merge_attributes): Likewise.
417 (arc_elf_merge_private_bfd_data): Use object attributes.
418 (bfd_arc_get_mach_from_attributes): New function.
419 (arc_elf_object_p): Use object attributes.
420 (arc_elf_final_write_processing): Likewise.
421 (elf32_arc_obj_attrs_arg_type): New function.
422 (elf32_arc_obj_attrs_handle_unknown): Likewise.
423 (elf32_arc_section_from_shdr): Likewise.
424 (elf_backend_obj_attrs_vendor): Define.
425 (elf_backend_obj_attrs_section): Likewise.
426 (elf_backend_obj_attrs_arg_type): Likewise.
427 (elf_backend_obj_attrs_section_type): Likewise.
428 (elf_backend_obj_attrs_handle_unknown): Likewise.
429 (elf_backend_section_from_shdr): Likewise.
431 2017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
434 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
435 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
436 and the destination is a Thumb symbol.
438 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
440 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
441 initializer to silence GCC 4.2.
442 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
444 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
446 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
447 (LAZY_PLT_ENTRY_SIZE): This.
448 (NON_LAZY_PLT_ENTRY_SIZE): New.
449 (elf_x86_64_plt0_entry): Renamed to ...
450 (elf_x86_64_lazy_plt0_entry): This.
451 (elf_x86_64_plt_entry): Renamed to ...
452 (elf_x86_64_lazy_plt_entry): This.
453 (elf_x86_64_bnd_plt0_entry): Renamed to ...
454 (elf_x86_64_lazy_bnd_plt0_entry): This.
455 (elf_x86_64_legacy_plt_entry): Removed.
456 (elf_x86_64_bnd_plt_entry): Renamed to ...
457 (elf_x86_64_lazy_bnd_plt_entry): This.
458 (elf_x86_64_legacy_plt2_entry): Renamed to ...
459 (elf_x86_64_non_lazy_plt_entry): This.
460 (elf_x86_64_bnd_plt2_entry): Renamed to ...
461 (elf_x86_64_non_lazy_bnd_plt_entry): This.
462 (elf_x86_64_eh_frame_plt): Renamed to ...
463 (elf_x86_64_eh_frame_lazy_plt): This.
464 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
465 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
466 (elf_x86_64_eh_frame_plt_got): Renamed to ...
467 (elf_x86_64_eh_frame_non_lazy_plt): This.
468 (elf_x86_64_lazy_plt_layout): New.
469 (elf_x86_64_non_lazy_plt_layout): Likewise.
470 (elf_x86_64_plt_layout): Likewise.
471 (elf_x86_64_backend_data): Remove PLT layout information. Add
472 os for target system.
473 (GET_PLT_ENTRY_SIZE): Removed.
474 (elf_x86_64_lazy_plt): New.
475 (elf_x86_64_non_lazy_plt): Likewise.
476 (elf_x86_64_lazy_bnd_plt): Likewise.
477 (elf_x86_64_non_lazy_bnd_plt): Likewise.
478 (elf_x86-64_arch_bed): Updated.
479 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
480 (elf_x86_64_create_dynamic_sections): Removed.
481 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
482 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
483 (elf_x86-64_adjust_dynamic_symbol): Updated.
484 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
485 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
486 size for PLT0 if there is no PLT0. Get plt_entry_size from
487 non_lazy_plt for non-lazy PLT entries.
488 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
489 from non_lazy_plt for non-lazy PLT entries.
490 (elf_x86-64_relocate_section): Updated. Properly get PLT index
492 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
493 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
494 entries with non-lazy PLT layout. Don't fill the second and third
495 slots in the PLT entry if there is no PLT0.
496 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
497 if there is no PLT0. Set sh_entsize on the .plt.got section.
498 (compare_relocs): New.
499 (elf_x86_64_plt_type): Likewise.
500 (elf_x86_64_plt): Likewise.
501 (elf_x86_64_nacl_plt): New. Forward declaration.
502 (elf_x86_64_get_plt_sym_val): Removed.
503 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
504 against all dynamic relocations.
505 (elf_x86_64_link_setup_gnu_properties): New function.
506 (elf_backend_create_dynamic_sections): Updated.
507 (elf_backend_setup_gnu_properties): New.
508 (elf_x86_64_nacl_plt): New.
509 (elf_x86_64_nacl_arch_bed): Updated.
511 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
513 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
514 (LAZY_PLT_ENTRY_SIZE): This.
515 (NON_LAZY_PLT_ENTRY_SIZE): New.
516 (elf_i386_plt0_entry): Renamed to ...
517 (elf_i386_lazy_plt0_entry): This.
518 (elf_i386_plt_entry): Renamed to ...
519 (elf_i386_lazy_plt_entry): This.
520 (elf_i386_pic_plt0_entry): Renamed to ...
521 (elf_i386_pic_lazy_plt0_entry): This.
522 (elf_i386_pic_plt_entry): Renamed to ...
523 (elf_i386_pic_lazy_plt_entry): This.
524 (elf_i386_got_plt_entry): Renamed to ...
525 (elf_i386_non_lazy_plt_entry): This.
526 (elf_i386_pic_got_plt_entry): Renamed to ...
527 (elf_i386_pic_non_lazy_plt_entry): This.
528 (elf_i386_eh_frame_plt): Renamed to ...
529 (elf_i386_eh_frame_lazy_plt): This.
530 (elf_i386_eh_frame_plt_got): Renamed to ...
531 (elf_i386_eh_frame_non_lazy_plt): This.
532 (elf_i386_plt_layout): Renamed to ...
533 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
534 eh_frame_plt_got_size.
535 (elf_i386_non_lazy_plt_layout): New.
536 (elf_i386_plt_layout): Likewise.
537 (elf_i386_non_lazy_plt): Likewise.
538 (GET_PLT_ENTRY_SIZE): Removed.
539 (elf_i386_plt): Renamed to ...
540 (elf_i386_lazy_plt): This.
541 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
542 (elf_i386_arch_bed): Updated.
543 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
544 (elf_i386_create_dynamic_sections): Removed.
545 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
546 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
547 (elf_i386_adjust_dynamic_symbol): Updated.
548 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
549 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
550 size for PLT0 if there is no PLT0.
551 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
552 output section is discarded only if GOT isn't empty.
553 (elf_i386_relocate_section): Updated. Properly get PLT index
555 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
556 second and third slots in the PLT entry if there is no PLT0.
557 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
558 if there is no PLT0. Set sh_entsize on the .plt.got section.
559 (elf_i386_nacl_plt): Forward declaration.
560 (elf_i386_get_plt_sym_val): Removed.
561 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
562 against all dynamic relocations.
563 (elf_i386_link_setup_gnu_properties): New function.
564 (elf_backend_create_dynamic_sections): Updated.
565 (elf_backend_setup_gnu_properties): New.
566 (elf_i386_nacl_plt): Updated.
567 (elf_i386_nacl_arch_bed): Likewise.
568 (elf_i386_vxworks_arch_bed): Likewise.
570 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
572 * elflink.c (elf_output_implib): Remove executable flag from import
574 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
575 library is a relocatable object file.
577 2017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
580 * elf32-avr.c (avr_should_move_sym): New function.
581 (avr_should_reduce_sym_size): Likewise.
582 (avr_should_increase_sym_size): Likewise.
583 (elf32_avr_relax_delete_bytes): Adjust symbol values
584 and sizes by calling new functions.
586 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
588 * config.bfd (riscv32-*): Enable rv64.
590 2017-05-02 Alan Modra <amodra@gmail.com>
593 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
594 rather than h->root.type == bfd_link_hash_new.
595 (bfd_elf_record_link_assignment): Similarly, call
596 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
598 2017-04-29 Alan Modra <amodra@gmail.com>
601 * reloc.c (reloc_offset_in_range): New function.
602 (bfd_perform_relocation, bfd_install_relocation): Use it.
603 (_bfd_final_link_relocate): Likewise.
605 2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
607 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
608 before using .plt.got.
609 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
611 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
613 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
614 instead of "+=" to update 0.
616 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
618 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
619 .plt.got section here.
620 (elf_i386_check_relocs): Don't create the .plt.got section.
621 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
622 the .plt.got and .plt.bnd sections here.
623 (elf_x86_64_check_relocs): Don't create the .plt.got nor
626 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
628 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
630 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
631 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
632 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
633 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
636 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
638 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
640 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
641 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
642 the first relocatable ELF input with GNU properties.
644 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
646 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
649 2017-04-27 Alan Modra <amodra@gmail.com>
651 * elf-bfd.h (struct elf_backend_data): Make asection param of
652 elf_backend_eh_frame_address_size const.
653 (_bfd_elf_eh_frame_address_size): Likewise.
654 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
655 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
656 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
657 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
658 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
659 (next_cie_fde_offset): Constify params.
660 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
662 2017-04-27 Alan Modra <amodra@gmail.com>
664 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
665 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
666 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
668 (offset_adjust): New function.
669 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
670 (adjust_eh_frame_local_symbols): Likewise.
671 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
672 after changing anything. Return true if anything changed.
673 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
674 _bfd_elf_adjust_eh_frame_global_symbol for globals.
676 2017-04-27 Alan Modra <amodra@gmail.com>
678 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
681 2017-04-27 Alan Modra <amodra@gmail.com>
683 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
684 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
685 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
686 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
687 for undef and undefweak dyn_relocs.
688 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
689 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
690 (allocate_got, allocate_dynrelocs): Likewise.
691 (ppc64_elf_relocate_section): Likewise.
693 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
695 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
696 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
697 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
698 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
700 2017-04-26 Nick Clifton <nickc@redhat.com>
703 * reloc.c (bfd_perform_relocation): Check for a negative address
706 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
709 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
711 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
712 (elf_backend_always_renumber_dynsyms): Define.
713 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
714 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
715 * elflink.c (bfd_elf_size_dynamic_sections): Also call
716 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
718 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
720 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
722 * elflink.c (bfd_elf_size_dynamic_sections): Only call
723 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
724 sections have been created.
726 2017-04-26 Nick Clifton <nickc@redhat.com>
729 * compress.c (bfd_init_section_compress_status): Check the return
730 value from bfd_malloc.
732 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
734 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
735 no_finish_dynamic_symbol.
736 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
738 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
739 weak symbol, don't make it dynamic.
740 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
741 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
742 relocation for GOT reference.
743 (elf_x86_64_finish_dynamic_symbol): Abort if
744 no_finish_dynamic_symbol isn't 0.
746 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
749 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
750 undefined weak symbol, don't make it dynamic.
751 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
752 set no_finish_dynamic_symbol and generate R_386_RELATIVE
753 relocation for R_386_GOT32.
755 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
758 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
760 2017-04-23 Alan Modra <amodra@gmail.com>
763 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
764 * elf.c (lcomm_sym): New.
765 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
766 * bfd-in2.h: Regenerate.
768 2017-04-23 Alan Modra <amodra@gmail.com>
771 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
772 parameters and comment.
773 (_bfd_elf_get_reloc_section): Delete.
774 (_bfd_elf_plt_get_reloc_section): Declare.
775 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
776 New functions. Don't blindly skip over assumed .rel/.rela prefix.
778 (_bfd_elf_get_reloc_section): ..here. Delete.
779 (assign_section_numbers): Call elf_get_reloc_section.
780 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
781 * elfxx-target.h (elf_backend_get_reloc_section): Update.
783 2017-04-23 Alan Modra <amodra@gmail.com>
786 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
789 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
792 * elf32-i386.c (elf_i386_link_hash_entry): Add
793 no_finish_dynamic_symbol.
794 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
795 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
796 symbol, don't make it dynamic in PIE.
797 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
798 set no_finish_dynamic_symbol and generate R_386_RELATIVE
799 relocation for R_386_GOT32
800 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
803 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
807 * elflink.c (elf_link_add_object_symbols): Require
808 --no-dynamic-linker with -E/--dynamic-list when creating
811 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
813 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
816 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
818 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
819 dynamic symbol sorting.
821 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
824 * elflink.c (elf_link_add_object_symbols): Preserve
825 dynamic_ref_after_ir_def when restoring the symbol table for
826 unneeded dynamic object.
828 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
831 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
832 on on undefined IFUNC symbol in the second PLT.
834 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
836 * peXXigen.c (pe_print_reloc): Correct chunk_end.
838 2017-04-19 Alan Modra <amodra@gmail.com>
840 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
841 or make dynamic for info->dynamic_undefined_weak 0 and 1.
842 * elf32-ppc.c:Formatting.
843 (ensure_undefweak_dynamic): Don't make dynamic when
844 info->dynamic_undefined_weak is zero.
845 (allocate_dynrelocs): Discard undefweak dyn_relocs for
846 info->dynamic_undefined_weak. Discard undef dyn_relocs when
847 not default visibility. Discard undef and undefweak
849 (ppc_elf_relocate_section): Adjust to suit.
850 * elf64-ppc.c: Formatting.
851 (ensure_undefweak_dynamic): Don't make dynamic when
852 info->dynamic_undefined_weak is zero.
853 (allocate_dynrelocs): Discard undefweak dyn_relocs for
854 info->dynamic_undefined_weak. Discard them earlier.
856 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
859 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
860 before generating the version definition section.
862 2017-04-17 Alan Modra <amodra@gmail.com>
864 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
865 state when a regular object file defines a symbol with
866 incompatible type to that defined by an earlier shared lib.
868 2017-04-13 Alan Modra <amodra@gmail.com>
870 * coffcode.h: Wrap some overly long _bfd_error_handler args.
872 * elf32-arm.c: Likewise.
873 * elf32-i386.c: Likewise.
874 * elf32-mep.c: Likewise.
875 * elf64-ia64-vms.c: Likewise.
876 * elf64-x86-64.c: Likewise.
877 * elflink.c: Likewise.
878 * elfnn-ia64.c: Likewise.
879 * elfxx-mips.c: Likewise.
881 2017-04-13 Alan Modra <amodra@gmail.com>
883 * aoutx.h: Use %B and %A in error messages throughout file.
884 * aout-cris.c: Likewise.
885 * archive.c: Likewise.
886 * binary.c: Likewise.
887 * coff-rs6000.c: Likewise.
888 * coff-tic4x.c: Likewise.
889 * coffcode.h: Likewise.
890 * coffgen.c: Likewise.
891 * cofflink.c: Likewise.
892 * coffswap.h: Likewise.
893 * cpu-arm.c: Likewise.
894 * elf-eh-frame.c: Likewise.
895 * elf-m10300.c: Likewise.
897 * elf32-arc.c: Likewise.
898 * elf32-arm.c: Likewise.
899 * elf32-bfin.c: Likewise.
900 * elf32-frv.c: Likewise.
901 * elf32-iq2000.c: Likewise.
902 * elf32-m32c.c: Likewise.
903 * elf32-microblaze.c: Likewise.
904 * elf32-nds32.c: Likewise.
905 * elf32-rl78.c: Likewise.
906 * elf32-rx.c: Likewise.
907 * elf32-score.c: Likewise.
908 * elf32-score7.c: Likewise.
909 * elf32-sh64.c: Likewise.
910 * elf32-v850.c: Likewise.
911 * elf32-vax.c: Likewise.
912 * elf32-visium.c: Likewise.
913 * elf64-ia64-vms.c: Likewise.
914 * elf64-mmix.c: Likewise.
915 * elf64-sh64.c: Likewise.
916 * elfcode.h: Likewise.
917 * elfnn-aarch64.c: Likewise.
918 * elfnn-ia64.c: Likewise.
919 * elfxx-mips.c: Likewise.
920 * hpux-core.c: Likewise.
923 * linker.c: Likewise.
928 * peXXigen.c: Likewise.
929 * rs6000-core.c: Likewise.
930 * vms-alpha.c: Likewise.
931 * xcofflink.c: Likewise.
933 2017-04-13 Alan Modra <amodra@gmail.com>
935 * bfd.c (PRINT_TYPE): Define.
936 (_doprnt): New function.
937 (error_handler_internal): Use _doprnt.
938 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
939 calls in their natural order, throughout file.
940 * coff-mcore.c: Likewise.
941 * coff-ppc.c: Likewise.
942 * coff-tic80.c: Likewise.
943 * cofflink.c: Likewise.
944 * elf-s390-common.c: Likewise.
946 * elf32-arm.c: Likewise.
947 * elf32-i386.c: Likewise.
948 * elf32-m32r.c: Likewise.
949 * elf32-msp430.c: Likewise.
950 * elf32-spu.c: Likewise.
951 * elf64-ia64-vms.c: Likewise.
952 * elf64-sparc.c: Likewise.
953 * elf64-x86-64.c: Likewise.
954 * elflink.c: Likewise.
955 * elfnn-aarch64.c: Likewise.
956 * elfnn-ia64.c: Likewise.
957 * elfxx-mips.c: Likewise.
959 2017-04-13 Alan Modra <amodra@gmail.com>
961 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
962 branch veneers" error. Fix double space and format message.
963 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
964 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
966 2017-04-13 Alan Modra <amodra@gmail.com>
968 * bfd-in2.h: Regenerate.
970 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
972 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
973 extra `\n' in warning/error messages.
974 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
975 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
977 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
979 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
980 processor-specific properties with generic ELF target vector.
982 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
984 * elf32-sparc.c (elf_backend_fixup_symbol): New.
985 * elf64-sparc.c (elf_backend_fixup_symbol): New.
986 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
987 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
989 (link_hash_newfunc): Initialize has_got_reloc and
991 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
993 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
995 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
997 (_bfd_sparc_elf_fixup_symbol): New function.
998 (allocate_dynrelocs): Don't allocate space for dynamic
999 relocations and discard relocations against resolved undefined
1000 weak symbols in executable. Don't make resolved undefined weak
1001 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
1002 relocation against undefined weak symbols in PIE.
1003 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
1004 relocations against resolved undefined weak symbols in PIE
1005 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
1006 without ynamic PLT/GOT relocations for resolved undefined weak
1008 Don't generate dynamic relocation against resolved undefined
1009 weak symbol in executable.
1010 (pie_finish_undefweak_symbol): New function.
1011 (_bfd_sparc_elf_finish_dynamic_sections): Call
1012 pie_finish_undefweak_symbol on all symbols in PIE.
1013 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
1014 (_bfd_sparc_elf_fixup_symbol): New function.
1016 2017-04-10 Nick Clifton <nickc@redhat.com>
1018 * config.bfd: Remove ns32k from obsolete list.
1020 2017-04-10 Alan Modra <amodra@gmail.com>
1023 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
1024 (special_sections_i): Likewise for .init_array.
1025 (special_sections_p): Likewise for .preinit_array.
1027 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
1031 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
1032 ELF_COMMON_DEF_P for common symbols.
1033 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
1034 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1035 * elflink.c (_bfd_elf_merge_symbol): Revert commits
1036 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
1037 07492f668d2173da7a2bda3707ff0985e0f460b6.
1039 2017-04-07 Pedro Alves <palves@redhat.com>
1041 * opncls.c (bfd_get_debug_link_info): Rename to...
1042 (bfd_get_debug_link_info_1): ... this. Change type of second
1043 parameter to void pointer. Adjust.
1044 (bfd_get_debug_link_info): Reimplement on top of
1045 bfd_get_debug_link_info_1.
1046 (separate_debug_file_exists, separate_alt_debug_file_exists):
1047 Change type of second parameter to void pointer. Adjust.
1048 (get_func_type, check_func_type): Change type of second parameter
1050 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
1051 the callback functions instead of passing the address of a local.
1052 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
1053 find_separate_debug_file.
1054 (get_alt_debug_link_info_shim): Change type of second parameter to
1055 void pointer. Adjust.
1056 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
1057 find_separate_debug_file.
1058 (get_build_id_name, bfd_boolean check_build_id_file): Change type
1059 of second parameter to void pointer. Adjust.
1060 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
1061 pointer local to find_separate_debug_file.
1063 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
1065 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
1066 external symbols with a definition.
1067 (_bfd_coff_gc_mark_extra_sections): Fix typo.
1069 2017-04-07 Alan Modra <amodra@gmail.com>
1071 * po/SRC-POTFILES.in: Regenerate.
1073 2017-04-05 Alan Modra <amodra@gmail.com>
1075 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
1078 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
1080 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
1081 numbers for DataDirectory entry indicies passed to
1084 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
1086 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
1087 each GNU_MBIND section and align GNU_MBIND section to page size.
1088 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
1089 segment for each GNU_MBIND section.
1090 (_bfd_elf_init_private_section_data): Copy sh_info from input
1091 for GNU_MBIND section.
1093 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
1095 * elfnn-riscv.c (GP_NAME): Delete.
1096 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
1097 (_bfd_riscv_relax_lui): Likewise.
1099 2017-04-04 Nick Clifton <nickc@redhat.com>
1102 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
1104 (bfd_elf_final_link): Only initialize the extended symbol index
1105 section if there are extended symbol tables to list.
1107 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
1109 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
1110 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
1111 * configure.ac (elf): Add elf-properties.lo.
1112 * Makefile.in: Regenerated.
1113 * configure: Likewise.
1114 * elf-bfd.h (elf_property_kind): New.
1115 (elf_property): Likewise.
1116 (elf_property_list): Likewise.
1117 (elf_properties): Likewise.
1118 (_bfd_elf_parse_gnu_properties): Likewise.
1119 (_bfd_elf_get_property): Likewise.
1120 (_bfd_elf_link_setup_gnu_properties): Likewise.
1121 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
1122 and setup_gnu_properties.
1123 (elf_obj_tdata): Add properties.
1124 * elf-properties.c: New file.
1125 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
1126 (elf_i386_merge_gnu_properties): Likewise.
1127 (elf_backend_parse_gnu_properties): Likewise.
1128 (elf_backend_merge_gnu_properties): Likewise.
1129 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
1130 (elf_x86_64_merge_gnu_properties): Likewise.
1131 (elf_backend_parse_gnu_properties): Likewise.
1132 (elf_backend_merge_gnu_properties): Likewise.
1133 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
1134 (elf_backend_parse_gnu_properties): Likewise.
1135 (elf_backend_setup_gnu_properties): Likewise.
1136 (elfNN_bed): Add elf_backend_parse_gnu_properties,
1137 elf_backend_merge_gnu_properties and
1138 elf_backend_setup_gnu_properties.
1140 2017-03-30 Pip Cet <pipcet@gmail.com>
1142 * elf32-wasm32.c: Add relocation code, two relocs.
1143 * reloc.c: Add wasm32 relocations.
1144 * libbfd.h: Regenerate.
1145 * bfd-in2.h: Regenerate.
1146 * bfd/po/bfd.pot: Regenerate.
1148 2017-03-29 Nick Clifton <nickc@redhat.com>
1151 * coff-bfd.h (struct coff_section_data): Add new fields:
1152 saved_bias and bias.
1153 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
1154 computed for PE binaries.
1155 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
1158 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
1161 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
1162 to handle a local symbol with a hash-symbol-entry; without PLT.
1163 Add BFD_ASSERT for an incidental case with GOT entry present.
1164 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
1165 isn't forced-or-set local.
1167 2017-03-27 Pip Cet <pipcet@gmail.com>
1169 * wasm-module.c: New file to support WebAssembly modules.
1170 * wasm-module.h: New file to support WebAssembly modules.
1171 * doc/webassembly.texi: Start documenting wasm-module.c.
1172 * config.bfd: Add wasm_vec.
1173 * targets.c: Likewise.
1174 * configure.ac: Likewise.
1175 * Makefile.am: Add entries for wasm-module.c.
1176 * Makefile.in: Regenerate.
1177 * configure: Regenerate.
1178 * po/SRC-POTFILES.in: Regenerate.
1180 2017-03-27 Pip Cet <pipcet@gmail.com>
1182 * cpu-wasm32.c: New file to support wasm32 architecture.
1183 * elf32-wasm32.c: New file to support wasm32 architecture.
1184 * Makefile.am: Add wasm32 architecture.
1185 * archures.c: Likewise.
1186 * config.bfd: Likewise.
1187 * configure.ac: Likewise.
1188 * targets.c: Likewise.
1189 * Makefile.in: Regenerate.
1190 * bfd-in2.h: Regenerate.
1191 * configure: Regenerate.
1192 * po/SRC-POTFILES.in: Regenerate.
1194 2017-03-20 Alan Modra <amodra@gmail.com>
1197 * elf64-ppc.c (compare_symbols): Stabilize sort.
1199 2017-03-18 Alan Modra <amodra@gmail.com>
1201 * elf64-ppc.c (struct ppc_link_hash_table): Add
1202 local_ifunc_resolver and maybe_local_ifunc_resolver.
1203 (ppc_build_one_stub): Set flags on emitting dynamic
1204 relocation to ifunc.
1205 (ppc64_elf_relocate_section): Likewise.
1206 (ppc64_elf_finish_dynamic_symbol): Likewise.
1207 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
1208 local dynamic relocs to ifuncs.
1209 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
1210 local_ifunc_resolver and maybe_local_ifunc_resolver.
1211 (ppc_elf_relocate_section): Set flag on emitting dynamic
1212 relocation to ifuncs.
1213 (ppc_elf_finish_dynamic_symbol): Likewise.
1214 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
1215 dynamic relocs to ifuncs.
1217 2017-03-13 Nick Clifton <nickc@redhat.com>
1220 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
1221 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
1222 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
1223 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
1224 * bfd-in2.h: Regenerate.
1225 * libbfd.h: Regenerate.
1226 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
1228 (IS_AARCH64_TLSDESC_RELOC): Likewise.
1229 (elfNN_aarch64_howto_table): Likewise.
1230 (aarch64_tls_transition_without_check): Likewise.
1231 (aarch64_reloc_got_type): Likewise.
1232 (elfNN_aarch64_final_link_relocate): Likewise.
1233 (elfNN_aarch64_tls_relax): Likewise.
1234 (elfNN_aarch64_relocate_section): Likewise.
1235 (elfNN_aarch64_gc_sweep_hook): Likewise.
1236 (elfNN_aarch64_check_relocs): Likewise.
1237 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
1238 (_bfd_aarch64_elf_resolve_relocation): Likewise.
1240 2017-03-11 Alan Modra <amodra@gmail.com>
1242 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
1243 parameter is in fact used. Whitespace fixes.
1244 * elf64-ppc.c: Likewise.
1246 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
1248 * rs6000-core.c (CORE_NEW): Simplify macro when
1249 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
1251 2017-03-07 Alan Modra <amodra@gmail.com>
1255 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
1258 2017-03-05 Alan Modra <amodra@gmail.com>
1260 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
1261 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
1262 (next_cie_fde_offset): New function.
1263 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
1264 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
1265 four bytes. Align CIEs to four or eight bytes depending on
1266 per_encoding_aligned8. Align FDEs according to their encoding.
1267 Pad last FDE to output section alignment.
1268 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
1270 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
1271 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
1272 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
1274 2017-03-02 Martin Bickel <binutils@ineranves.de>
1277 * elf.c (rewrite_elf_program_header): Do not issue a warning for
1278 empty segments which have a zero filesz, but a non-zero memsz.
1280 2017-03-02 Alan Modra <amodra@gmail.com>
1282 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
1284 2017-02-28 Alan Modra <amodra@gmail.com>
1286 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
1287 (ppc64_elf_relocate_section): Likewise.
1289 2017-02-28 Alan Modra <amodra@gmail.com>
1292 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
1293 rather than elf32_nios2_hash_table or elf_hash_table.
1294 (create_got_section): Likewise.
1295 (nios2_elf32_finish_dynamic_symbol): Likewise.
1296 (nios2_elf32_adjust_dynamic_symbol): Likewise.
1297 (nios2_elf32_size_dynamic_sections): Likewise.
1298 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
1299 vars. Use htab equivalents directly instead. Don't create
1300 all dynamic sections on needing just the GOT. Use a goto
1301 rather than a fall-through with reloc test. Ensure
1302 htab->dynobj is set when making dynamic sreloc section.
1303 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
1304 equivalent directly instead. Don't segfault on looking for
1305 .dynamic when dynamic sections have not been created. Don't
1306 segfault on .got.plt being discarded.
1307 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
1308 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
1309 fixme and another not so relevant comment.
1310 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
1311 already set, set hash table dynobj on creating .sbss.
1313 2017-02-28 Alan Modra <amodra@gmail.com>
1315 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
1316 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
1317 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
1318 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
1319 (ppc64_elf_relocate_section): Likewise.
1320 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
1321 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
1322 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
1323 * libbfd.h: Regenerate.
1324 * bfd-in2.h: Regenerate.
1326 2017-02-28 Alan Modra <amodra@gmail.com>
1328 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
1329 dynamic .data.rel.ro read-only.
1330 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
1331 rather than section flags when deciding where copy reloc goes.
1332 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
1333 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
1334 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
1335 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
1336 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
1337 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
1338 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
1339 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
1340 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
1341 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
1342 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
1343 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
1344 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
1345 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
1346 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
1347 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
1348 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
1349 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
1350 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
1352 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
1354 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
1355 `jalr $0, $25' instruction encoding.
1357 2017-02-27 Nick Clifton <nickc@redhat.com>
1360 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
1361 generating a seg-fault when encountering a symbol that has been
1362 deleted by garbage collection.
1364 2017-02-25 Alan Modra <amodra@gmail.com>
1366 * elf32-arc.c (struct dynamic_sections): Delete.
1367 (enum dyn_section_types): Delete.
1368 (dyn_section_names): Delete.
1369 (arc_create_dynamic_sections): Delete.
1370 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
1371 segfault on discarded .rela.plt section.
1372 (elf_arc_size_dynamic_sections): Formatting. Don't call
1373 arc_create_dynamic_sections. Don't allocate memory for sections
1374 handled by the generic linker. Correct code finding relocs in
1375 read-only sections. Set SEC_EXCLUDE on zero size .got,
1376 .got.plt, and .dynbss sections. Do set .interp for pies.
1378 2017-02-24 Andrew Waterman <andrew@sifive.com>
1380 * elfnn-riscv.c (GP_NAME): New macro.
1381 (riscv_global_pointer_value): Use it.
1382 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
1383 output section, consider only that section's alignment.
1385 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
1387 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
1388 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
1389 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
1390 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
1392 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
1394 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
1395 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
1398 2017-02-23 Alan Modra <amodra@gmail.com>
1401 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
1403 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
1404 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
1407 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
1410 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
1411 processing ahead of the call to `elf_gc_sweep_symbol'.
1413 2017-02-22 Nick Clifton <nickc@redhat.com>
1416 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
1417 created section 4-byte alignment.
1419 2017-02-22 Alan Modra <amodra@gmail.com>
1421 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
1422 on .got or .plt output section being discarded by script.
1423 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
1426 2017-02-21 Alan Modra <amodra@gmail.com>
1428 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
1429 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
1431 2017-02-20 Alan Modra <amodra@gmail.com>
1434 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
1435 if DT_RELSZ/DT_RELASZ is zero.
1437 2017-02-17 Nick Clifton <nickc@redhat.com>
1439 * compress.c (bfd_get_full_section_contents): Remember to reduce
1440 compressed size by the sizeof the compression header when
1441 decompressing the contents.
1443 2017-02-17 Pedro Alves <palves@redhat.com>
1445 * srec.c (Chunk): Rename to ...
1446 (_bfd_srec_len): ... this.
1447 (S3Forced): Rename to ...
1448 (_bfd_srec_forceS3): ... this.
1449 * objcopy.c: Adjust all references.
1451 2017-02-17 Pedro Alves <palves@redhat.com>
1453 * archive.c (bsd_write_armap): Rename to ...
1454 (_bfd_bsd_write_armap): ... this.
1455 (coff_write_armap): Rename to ...
1456 (_bfd_coff_write_armap): ... this.
1457 * libbfd-in.h (bsd_write_armap): Rename to ...
1458 (_bfd_bsd_write_armap): ... this.
1459 (coff_write_armap): Rename to ...
1460 (_bfd_coff_write_armap): ... this.
1461 * aout-target.h, aout-tic30.c: Adjust all users.
1462 * libbfd.h: Regenerate.
1464 2017-02-17 Pedro Alves <palves@redhat.com>
1466 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
1467 (warn_deprecated): Rename to ...
1468 (_bfd_warn_deprecated): ... this.
1469 * libbfd.c (warn_deprecated): Rename to ...
1470 (_bfd_warn_deprecated): ... this.
1471 * bfd-in2.h: Regenerate.
1473 2017-02-17 Pedro Alves <palves@redhat.com>
1475 * bfdio.c (real_ftell): Rename to ...
1476 (_bfd_real_ftell): ... this.
1477 (real_fseek): Rename to ...
1478 (_bfd_real_fseek): ... this.
1479 (real_fopen): Rename to ...
1480 (_bfd_real_fopen): ... this.
1481 * libbfd-in.h (real_ftell): Rename to ...
1482 (_bfd_real_ftell): ... this.
1483 (real_fseek): Rename to ...
1484 (_bfd_real_fseek): ... this.
1485 (real_fopen): Rename to ...
1486 (_bfd_real_fopen): ... this.
1487 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
1488 * libbfd.h: Regenerate.
1490 2017-02-17 Pedro Alves <palves@redhat.com>
1492 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
1493 * libbfd.c (read_unsigned_leb128): Rename to ...
1494 (_bfd_read_unsigned_leb128): ... this.
1495 (read_signed_leb128): Rename to ...
1496 (_bfd_read_signed_leb128): ... this.
1497 (safe_read_leb128): Rename to ...
1498 (_bfd_safe_read_leb128): ... this.
1499 * libbfd-in.h (read_unsigned_leb128): Rename to ...
1500 (_bfd_read_unsigned_leb128): ... this.
1501 (read_signed_leb128): Rename to ...
1502 (_bfd_read_signed_leb128): ... this.
1503 (safe_read_leb128): Rename to ...
1504 (_bfd_safe_read_leb128): ... this.
1505 * libbfd.h: Renegerate.
1507 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
1509 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
1510 before trying to fine matching file and line information.
1512 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
1514 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
1515 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
1516 not match current bfd, then reload debug information. Record bfd
1517 we're loading debug info for in the stash. If we have debug
1518 informatin in the cache then perform section placement before
1521 2017-02-16 Alan Modra <amodra@gmail.com>
1524 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
1525 * elfxx-target.h (elf_backend_no_page_alias): Define.
1526 (elfNN_bed): Init new field.
1527 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
1528 ensure PT_LOAD segment starts on a new page.
1529 * elf32-hppa.c (elf_backend_no_page_alias): Define.
1531 2017-02-16 Alan Modra <amodra@gmail.com>
1534 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
1537 2017-02-16 Jiong Wang <jiong.wang@arm.com>
1539 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
1540 * bfd-in2.h: Regenerated.
1542 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
1545 * elf32-i386.c (elf_i386_relocate_section): Allow
1546 "lea foo@GOT, %reg" in PIC.
1548 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
1551 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
1552 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
1553 error against local IFUNC symbol without a base register for
1556 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
1558 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
1559 `%P: %H:' with `info->callbacks->einfo'.
1560 (ppc_elf_relocate_section): Likewise.
1561 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
1562 (ppc64_elf_edit_toc): Likewise.
1563 (ppc64_elf_relocate_section): Likewise.
1565 2017-02-14 Alan Modra <amodra@gmail.com>
1567 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
1568 --gc-keep-exported, and test versioned field of sym rather than
1569 looking for @ in name.
1571 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
1573 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
1576 2017-02-13 Nick Clifton <nickc@redhat.com>
1579 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
1582 2017-02-07 Andrew Waterman <andrew@sifive.com>
1584 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
1585 entry size if PLT header is written.
1587 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
1589 Fix sparc64 dynamic relocation processing to use the dynamic
1591 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
1592 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
1595 2017-02-03 Nick Clifton <nickc@redhat.com>
1598 * coffcode.h (coff_write_object_contents): Enlarge size of
1599 s_name_buf in order to avoid compile time warning about possible
1601 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
1602 32-bits of insn value before printing into buffer.
1604 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1606 * elfxx-mips.c (mips_elf_hash_sort_data): Add
1607 `max_local_dynindx'.
1608 (mips_elf_sort_hash_table): Handle it.
1609 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
1610 symbols bump up `max_local_dynindx' rather than
1611 `max_non_got_dynindx'.
1613 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1615 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
1616 `min_got_dynindx', `max_unref_got_dynindx' and
1617 `max_non_got_dynindx' members to the `bfd_size_type' data type.
1618 (mips_elf_sort_hash_table): Adjust accordingly.
1620 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1622 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
1623 to access the hash table.
1625 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1627 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
1628 non-NULL `htab' to the beginning.
1630 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1632 * elflink.c (elf_gc_sweep): Wrap overlong line.
1634 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
1636 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
1637 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
1638 * elfxx-mips.c (mips_elf_link_hash_table): Add
1639 `ignore_branch_isa' member.
1640 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
1641 in branch relocation calculation as an error if
1642 `ignore_branch_isa' has been set.
1643 (_bfd_mips_elf_insn32): Rename to...
1644 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
1645 parameter to `insn32' and add an `ignore_branch_isa' parameter.
1646 Handle the new parameter.
1648 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
1650 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
1651 local variable dynobj.
1654 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
1655 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
1656 executable from read-only sections into sdynrelro.
1657 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
1658 dynamic relocs in sdynrelro.
1659 (elf_backend_want_dynrelro): Define.
1661 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
1663 * config.bfd (*-*-rtemsaout*): Mark as removed.
1665 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
1667 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
1668 (arm-*-rtems*): Move to (arm*-*-eabi*).
1669 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
1670 (m68-*-rtems*): Move to (m68*-*-elf*).
1672 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
1674 * config.bfd (*-*-rtemscoff*): Mark as removed.
1676 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
1679 * elflink.c (bfd_elf_record_link_assignment): Revert last
1680 change and don't ever clear `forced_local'. Set `mark'
1682 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
1684 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
1685 (bfd_elf_size_dynamic_sections): ... here.
1686 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
1687 and set `mark' instead in `__tls_get_addr_opt' processing.
1688 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
1690 2017-01-24 Alan Modra <amodra@gmail.com>
1692 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
1693 where dynamic relocs are preferable. Allow ifunc too.
1694 (ensure_undefweak_dynamic): New function.
1695 (allocate_dynrelocs): Use it here. Move plt handling last and
1696 don't make symbols dynamic, simplifying loop. Only make undef
1697 weak symbols with GOT entries dynamic. Correct condition
1698 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
1699 comments. Remove goto.
1700 (ppc_elf_relocate_section): Correct test for using dynamic
1701 symbol on GOT relocs. Rearrange test for emitting GOT relocs
1702 to suit. Set up explicit tls_index entries and implicit GOT
1703 tls_index entries resolvable at link time for
1704 __tls_get_addr_opt. Simplify test to clear mem for prelink.
1705 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
1706 (ensure_undefweak_dynamic): New function.
1707 (allocate_dynrelocs): Use it here. Only make undef weak symbols
1708 with GOT entries dynamic. Remove unnecessary test of
1709 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
1710 (ppc64_elf_relocate_section): Correct test for using dynamic
1711 symbol on GOT relocs. Rearrange test for emitting GOT relocs
1712 to suit. Set up explicit tls_index entries and implicit GOT
1713 tls_index entries resolvable at link time for __tls_get_addr_opt.
1714 Simplify expression to clear mem for prelink.
1716 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
1718 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
1720 2017-01-20 Jiong Wang <jiong.wang@arm.com>
1722 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
1723 (elf_backend_hash_symbol): Define.
1725 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
1728 * elflink.c (bfd_elf_record_link_assignment): Clear any
1729 `forced_local' marking for DSO symbols that are not being
1732 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
1734 * elfnn-riscv.c (riscv_elf_object_p): New function.
1736 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
1739 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
1741 (elf_x86_64_check_relocs): Create .eh_frame section for the
1743 (elf_x86_64_size_dynamic_sections): Allocate and initialize
1744 .eh_frame section for the .plt.bnd section.
1745 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
1746 for the .plt.bnd section.
1748 2017-01-12 Nick Clifton <nickc@redhat.com>
1751 * opncls.c (find_separate_debug_file): Add include_dirs
1752 parameter. Only include the directory part of the bfd's filename
1753 in search paths if include_dirs is true. Add a couple of extra
1754 locations for looking for debug files.
1755 ( bfd_follow_gnu_debuglink): Update invocation of
1756 find_separate_debug_file.
1757 (bfd_follow_gnu_debugaltlink): Likewise.
1758 (get_build_id): New function: Finds the build-id of the given bfd.
1759 (get_build_id_name): New function: Computes the name of the
1760 separate debug info file for a bfd, based upon its build-id.
1761 (check_build_id_file): New function: Checks to see if a separate
1762 debug info file exists at the given location, and that its
1763 build-id matches that of the original bfd.
1764 (bfd_follow_build_id_debuglink): New function: Finds a separate
1765 debug info file for a given bfd by using the build-id method.
1766 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
1767 method of locating a separate debug info file before using the
1769 * bfd-in2.h: Regenerate.
1771 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
1774 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
1775 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
1776 elf_x86_64_eh_frame_plt_got.
1777 (elf_x86_64_size_dynamic_sections): Get unwind info from
1778 elf_x86_64_bnd_arch_bed for the BND PLT.
1780 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
1782 * config.bfd: Add entries for i686-redox and x86_64-redox.
1784 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
1786 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
1788 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
1789 .eh_frame section to 4 bytes for x32.
1790 (elf_x86_64_check_relocs): Likewise.
1792 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
1795 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
1796 (PLT_GOT_FDE_LENGTH): Likewise.
1797 (elf_i386_plt_layout): Add eh_frame_plt_got and
1798 eh_frame_plt_got_size.
1799 (elf_i386_plt): Updated.
1800 (elf_i386_link_hash_table): Add plt_got_eh_frame.
1801 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
1802 (elf_i386_size_dynamic_sections): Allocate and initialize
1803 .eh_frame section for .plt.got.
1804 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
1806 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
1807 eh_frame_plt_got_size.
1808 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
1809 (PLT_GOT_FDE_LENGTH): Likewise.
1810 (elf_x86_64_backend_data): Add eh_frame_plt_got and
1811 eh_frame_plt_got_size.
1812 (elf_x86_64_arch_bed): Updated.
1813 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
1814 eh_frame_plt_got_size.
1815 (elf_x86_64_nacl_arch_bed): Likewise.
1816 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
1817 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
1818 (elf_x86_64_size_dynamic_sections): Allocate and initialize
1819 .eh_frame section for .plt.got.
1820 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
1823 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
1825 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
1826 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
1828 2017-01-09 Nick Clifton <nickc@redhat.com>
1830 * dwarf2.c (lookup_address_in_function_table): Return early if
1831 there are no functions in the given comp unit, or if the high
1832 address of the last function in the comp unit is less than the
1835 2017-01-09 Nick Clifton <nickc@redhat.com>
1838 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
1839 message if there are too many symbols to load.
1841 2017-01-04 James Clarke <jrtc27@jrtc27.com>
1843 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
1844 if relocs are cached.
1846 2017-01-03 Rich Felker <bugdal@aerifal.cx>
1849 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
1850 for R_MICROBLAZE_GOTOFF_64.
1852 2017-01-03 Nick Clifton <nickc@redhat.com>
1854 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
1855 warning about using a possibly uninitialised variable.
1857 2017-01-02 Alan Modra <amodra@gmail.com>
1859 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
1860 (allocate_plt_static, allocate_dynrelocs): Use it.
1862 2017-01-02 Alan Modra <amodra@gmail.com>
1864 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
1865 .PARISC.unwind section.
1867 2017-01-02 Alan Modra <amodra@gmail.com>
1870 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
1871 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
1872 indirect to GOT pointer relative code edit.
1874 2017-01-02 Alan Modra <amodra@gmail.com>
1876 Update year range in copyright notice of all files.
1878 For older changes see ChangeLog-2016
1880 Copyright (C) 2017 Free Software Foundation, Inc.
1882 Copying and distribution of this file, with or without modification,
1883 are permitted in any medium without royalty provided the copyright
1884 notice and this notice are preserved.
1890 version-control: never