1 2017-06-06 Maciej W. Rozycki <macro@imgtec.com>
3 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
4 from `reloc_count' rather than decrementing it.
5 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
6 `reloc_count' by `int_rels_per_ext_rel'.
7 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
8 `reloc_count' by `int_rels_per_ext_rel' for last relocation
10 (s3_bfd_score_elf_check_relocs): Likewise.
11 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
12 (s7_bfd_score_elf_relocate_section): Likewise.
13 (s7_bfd_score_elf_check_relocs): Likewise.
14 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
15 prototype and function.
16 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
17 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
18 triple rather than once the sum of REL and RELA relocation entry
20 (bfd_elf64_get_reloc_upper_bound): Remove macro.
21 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
22 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
23 storage allocation size determination.
24 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
25 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
26 by `int_rels_per_ext_rel' for last relocation entry
28 (bfd_elf_final_link): Do not multiply `reloc_count' by
29 `int_rels_per_ext_rel' for internal relocation storage
30 allocation size determination.
31 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
32 `int_rels_per_ext_rel' for last relocation entry determination.
33 (elf_gc_smash_unused_vtentry_relocs): Likewise.
34 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
35 (_bfd_mips_elf_relocate_section): Likewise.
37 2017-06-05 Alan Modra <amodra@gmail.com>
40 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
42 2017-06-01 John Baldwin <jhb@FreeBSD.org>
44 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
45 determine structure sizes.
46 (elfcore_grok_freebsd_prstatus): Likewise.
48 2017-06-01 Alan Modra <amodra@gmail.com>
50 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
51 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
53 (is_elfv2_localentry0): New function.
54 (ppc64_elf_tls_setup): Default params->plt_localentry0.
55 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
56 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
57 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
58 optimized localentry:0 stubs.
59 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
60 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
62 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
64 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
66 2017-05-30 Casey Smith <clegg89@gmail.com>
69 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
70 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
72 2017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
74 * cpu-arc.c (arc_compatible): New function.
76 2017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
78 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
80 2017-05-30 H.J. Lu <hongjiu.lu@intel.com>
83 * bfdio.c (bfd_get_file_size): New function.
84 * bfd-in2.h: Regenerated.
86 2017-05-23 Dilian Palauzov <git-dpa@aegee.org>
88 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
91 2017-05-22 H.J. Lu <hongjiu.lu@intel.com>
93 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
94 dynobj instead of htab->elf.dynobj.
96 2017-05-19 Maciej W. Rozycki <macro@imgtec.com>
98 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
100 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
101 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
102 actual number of internal relocations retrieved. Adjust
103 function description.
104 (bfd_elf64_canonicalize_reloc): Remove macro.
105 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
107 2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
109 * archures.c (bfd_mach_sparc_v9m8): Define.
110 (bfd_mach_sparc_v8plusm8): Likewise.
111 (bfd_mach_sparc_v9_p): Adjust to M8.
112 (bfd_mach_sparc_64bit_p): Likewise.
113 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
114 bfd_mach_sparc_v8plusm8.
115 * bfd-in2.h: Regenerated.
116 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
118 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
119 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
120 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
122 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
123 bfd_mach_sparc_v8plusm8.
125 2017-05-19 Alan Modra <amodra@gmail.com>
127 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
128 debug and special sections when no non-note alloc sections in an
131 2017-05-18 Alan Modra <amodra@gmail.com>
133 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
134 * elf-m10300.c: Likewise.
136 * elf32-arc.c: Likewise.
137 * elf32-bfin.c: Likewise.
138 * elf32-m68k.c: Likewise.
139 * elf32-nds32.c: Likewise.
140 * elf32-tilepro.c: Likewise.
141 * elflink.c: Likewise.
142 * elfnn-aarch64.c: Likewise.
143 * elfnn-riscv.c: Likewise.
144 * elfxx-tilegx.c: Likewise.
145 * mach-o.c: Likewise.
146 * peXXigen.c: Likewise.
147 * vms-alpha.c: Likewise.
148 * vms-lib.c: Likewise.
150 2017-05-17 H.J. Lu <hongjiu.lu@intel.com>
153 * elflink.c (elf_gc_mark_debug_section): New function.
154 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
155 referenced by kept debug sections.
157 2017-05-16 Alan Modra <amodra@gmail.com>
159 * elf-m10300.c: Rename occurrences of non_ir_ref.
160 * elf32-arm.c: Likewise.
161 * elf32-bfin.c: Likewise.
162 * elf32-cr16.c: Likewise.
163 * elf32-cris.c: Likewise.
164 * elf32-d10v.c: Likewise.
165 * elf32-dlx.c: Likewise.
166 * elf32-fr30.c: Likewise.
167 * elf32-frv.c: Likewise.
168 * elf32-hppa.c: Likewise.
169 * elf32-i370.c: Likewise.
170 * elf32-i386.c: Likewise.
171 * elf32-iq2000.c: Likewise.
172 * elf32-lm32.c: Likewise.
173 * elf32-m32c.c: Likewise.
174 * elf32-m32r.c: Likewise.
175 * elf32-m68hc1x.c: Likewise.
176 * elf32-m68k.c: Likewise.
177 * elf32-mcore.c: Likewise.
178 * elf32-metag.c: Likewise.
179 * elf32-microblaze.c: Likewise.
180 * elf32-moxie.c: Likewise.
181 * elf32-msp430.c: Likewise.
182 * elf32-mt.c: Likewise.
183 * elf32-nios2.c: Likewise.
184 * elf32-or1k.c: Likewise.
185 * elf32-ppc.c: Likewise.
186 * elf32-rl78.c: Likewise.
187 * elf32-s390.c: Likewise.
188 * elf32-score.c: Likewise.
189 * elf32-score7.c: Likewise.
190 * elf32-sh.c: Likewise.
191 * elf32-tic6x.c: Likewise.
192 * elf32-tilepro.c: Likewise.
193 * elf32-v850.c: Likewise.
194 * elf32-vax.c: Likewise.
195 * elf32-xstormy16.c: Likewise.
196 * elf32-xtensa.c: Likewise.
197 * elf64-alpha.c: Likewise.
198 * elf64-hppa.c: Likewise.
199 * elf64-ia64-vms.c: Likewise.
200 * elf64-mmix.c: Likewise.
201 * elf64-ppc.c: Likewise.
202 * elf64-s390.c: Likewise.
203 * elf64-sh64.c: Likewise.
204 * elf64-x86-64.c: Likewise.
205 * elflink.c: Likewise.
206 * elfnn-aarch64.c: Likewise.
207 * elfnn-ia64.c: Likewise.
208 * elfnn-riscv.c: Likewise.
209 * elfxx-mips.c: Likewise.
210 * elfxx-sparc.c: Likewise.
211 * elfxx-tilegx.c: Likewise.
212 * linker.c: Likewise.
214 2017-05-16 Alan Modra <amodra@gmail.com>
216 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
217 * elflink.c (elf_link_add_object_symbols): Update to use
219 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
221 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
223 2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
225 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
227 2017-05-12 H.J. Lu <hongjiu.lu@intel.com>
229 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
230 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
232 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
234 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
236 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
238 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
239 to plt_second/plt_second_eh_frame.
240 (elf_x86_64_link_hash_newfunc): Updated.
241 (elf_x86_64_allocate_dynrelocs): Likewise.
242 (elf_x86_64_size_dynamic_sections): Likewise.
243 (elf_x86_64_relocate_section): Likewise.
244 (elf_x86_64_finish_dynamic_symbol): Likewise.
245 (elf_x86_64_finish_dynamic_sections): Likewise.
246 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
247 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
249 (elf_backend_setup_gnu_properties): Updated. Create the
250 .plt.sec section instead of the .plt.sec section.
252 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
254 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
255 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
256 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
258 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
260 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
261 (bfd_elf64_set_reloc): Define.
262 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
264 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
266 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
267 (struct bfd_target): New field _bfd_set_reloc.
268 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
269 * reloc.c (_bfd_generic_set_reloc): New function.
270 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
271 * nlm-target.h (nlm_set_reloc): Likewise.
272 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
273 * aout-tic30.c (MY_set_reloc): Likewise.
274 * aout-target.h (MY_set_reloc): Likewise.
275 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
276 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
277 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
278 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
279 * aout-adobe.c (aout_32_set_reloc): Likewise.
280 * bout.c (b_out_set_reloc): Likewise.
281 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
282 * i386os9k.c (aout_32_set_reloc): Likewise.
283 * ieee.c (ieee_set_reloc): Likewise.
284 * oasys.c (oasys_set_reloc): Likewise.
285 * som.c (som_set_reloc): Likewise.
286 * versados.c (versados_set_reloc): Likewise.
287 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
288 _bfd_generic_set_reloc.
289 (rs6000_xcoff64_aix_vec): LIkewise.
290 * libbfd.c (_bfd_norelocs_set_reloc): New function.
291 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
292 * i386msdos.c (msdos_set_reloc): Define to
293 _bfd_norelocs_set_reloc.
294 * elfcode.h (elf_set_reloc): Define.
295 * bfd-in2.h: Regenerated.
297 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
300 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
301 for IFUNC function address.
303 2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
305 * elf32-arc.c (FEATURE_LIST_NAME): Define.
306 (CONFLICT_LIST): Likewise.
307 (opcode/arc-attrs.h): Include.
308 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
309 (arc_extract_features): New file.
310 (arc_stralloc): Likewise.
311 (arc_elf_merge_attributes): Likewise.
312 (arc_elf_merge_private_bfd_data): Use object attributes.
313 (bfd_arc_get_mach_from_attributes): New function.
314 (arc_elf_object_p): Use object attributes.
315 (arc_elf_final_write_processing): Likewise.
316 (elf32_arc_obj_attrs_arg_type): New function.
317 (elf32_arc_obj_attrs_handle_unknown): Likewise.
318 (elf32_arc_section_from_shdr): Likewise.
319 (elf_backend_obj_attrs_vendor): Define.
320 (elf_backend_obj_attrs_section): Likewise.
321 (elf_backend_obj_attrs_arg_type): Likewise.
322 (elf_backend_obj_attrs_section_type): Likewise.
323 (elf_backend_obj_attrs_handle_unknown): Likewise.
324 (elf_backend_section_from_shdr): Likewise.
326 2017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
329 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
330 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
331 and the destination is a Thumb symbol.
333 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
335 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
336 initializer to silence GCC 4.2.
337 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
339 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
341 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
342 (LAZY_PLT_ENTRY_SIZE): This.
343 (NON_LAZY_PLT_ENTRY_SIZE): New.
344 (elf_x86_64_plt0_entry): Renamed to ...
345 (elf_x86_64_lazy_plt0_entry): This.
346 (elf_x86_64_plt_entry): Renamed to ...
347 (elf_x86_64_lazy_plt_entry): This.
348 (elf_x86_64_bnd_plt0_entry): Renamed to ...
349 (elf_x86_64_lazy_bnd_plt0_entry): This.
350 (elf_x86_64_legacy_plt_entry): Removed.
351 (elf_x86_64_bnd_plt_entry): Renamed to ...
352 (elf_x86_64_lazy_bnd_plt_entry): This.
353 (elf_x86_64_legacy_plt2_entry): Renamed to ...
354 (elf_x86_64_non_lazy_plt_entry): This.
355 (elf_x86_64_bnd_plt2_entry): Renamed to ...
356 (elf_x86_64_non_lazy_bnd_plt_entry): This.
357 (elf_x86_64_eh_frame_plt): Renamed to ...
358 (elf_x86_64_eh_frame_lazy_plt): This.
359 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
360 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
361 (elf_x86_64_eh_frame_plt_got): Renamed to ...
362 (elf_x86_64_eh_frame_non_lazy_plt): This.
363 (elf_x86_64_lazy_plt_layout): New.
364 (elf_x86_64_non_lazy_plt_layout): Likewise.
365 (elf_x86_64_plt_layout): Likewise.
366 (elf_x86_64_backend_data): Remove PLT layout information. Add
367 os for target system.
368 (GET_PLT_ENTRY_SIZE): Removed.
369 (elf_x86_64_lazy_plt): New.
370 (elf_x86_64_non_lazy_plt): Likewise.
371 (elf_x86_64_lazy_bnd_plt): Likewise.
372 (elf_x86_64_non_lazy_bnd_plt): Likewise.
373 (elf_x86-64_arch_bed): Updated.
374 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
375 (elf_x86_64_create_dynamic_sections): Removed.
376 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
377 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
378 (elf_x86-64_adjust_dynamic_symbol): Updated.
379 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
380 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
381 size for PLT0 if there is no PLT0. Get plt_entry_size from
382 non_lazy_plt for non-lazy PLT entries.
383 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
384 from non_lazy_plt for non-lazy PLT entries.
385 (elf_x86-64_relocate_section): Updated. Properly get PLT index
387 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
388 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
389 entries with non-lazy PLT layout. Don't fill the second and third
390 slots in the PLT entry if there is no PLT0.
391 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
392 if there is no PLT0. Set sh_entsize on the .plt.got section.
393 (compare_relocs): New.
394 (elf_x86_64_plt_type): Likewise.
395 (elf_x86_64_plt): Likewise.
396 (elf_x86_64_nacl_plt): New. Forward declaration.
397 (elf_x86_64_get_plt_sym_val): Removed.
398 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
399 against all dynamic relocations.
400 (elf_x86_64_link_setup_gnu_properties): New function.
401 (elf_backend_create_dynamic_sections): Updated.
402 (elf_backend_setup_gnu_properties): New.
403 (elf_x86_64_nacl_plt): New.
404 (elf_x86_64_nacl_arch_bed): Updated.
406 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
408 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
409 (LAZY_PLT_ENTRY_SIZE): This.
410 (NON_LAZY_PLT_ENTRY_SIZE): New.
411 (elf_i386_plt0_entry): Renamed to ...
412 (elf_i386_lazy_plt0_entry): This.
413 (elf_i386_plt_entry): Renamed to ...
414 (elf_i386_lazy_plt_entry): This.
415 (elf_i386_pic_plt0_entry): Renamed to ...
416 (elf_i386_pic_lazy_plt0_entry): This.
417 (elf_i386_pic_plt_entry): Renamed to ...
418 (elf_i386_pic_lazy_plt_entry): This.
419 (elf_i386_got_plt_entry): Renamed to ...
420 (elf_i386_non_lazy_plt_entry): This.
421 (elf_i386_pic_got_plt_entry): Renamed to ...
422 (elf_i386_pic_non_lazy_plt_entry): This.
423 (elf_i386_eh_frame_plt): Renamed to ...
424 (elf_i386_eh_frame_lazy_plt): This.
425 (elf_i386_eh_frame_plt_got): Renamed to ...
426 (elf_i386_eh_frame_non_lazy_plt): This.
427 (elf_i386_plt_layout): Renamed to ...
428 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
429 eh_frame_plt_got_size.
430 (elf_i386_non_lazy_plt_layout): New.
431 (elf_i386_plt_layout): Likewise.
432 (elf_i386_non_lazy_plt): Likewise.
433 (GET_PLT_ENTRY_SIZE): Removed.
434 (elf_i386_plt): Renamed to ...
435 (elf_i386_lazy_plt): This.
436 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
437 (elf_i386_arch_bed): Updated.
438 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
439 (elf_i386_create_dynamic_sections): Removed.
440 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
441 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
442 (elf_i386_adjust_dynamic_symbol): Updated.
443 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
444 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
445 size for PLT0 if there is no PLT0.
446 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
447 output section is discarded only if GOT isn't empty.
448 (elf_i386_relocate_section): Updated. Properly get PLT index
450 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
451 second and third slots in the PLT entry if there is no PLT0.
452 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
453 if there is no PLT0. Set sh_entsize on the .plt.got section.
454 (elf_i386_nacl_plt): Forward declaration.
455 (elf_i386_get_plt_sym_val): Removed.
456 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
457 against all dynamic relocations.
458 (elf_i386_link_setup_gnu_properties): New function.
459 (elf_backend_create_dynamic_sections): Updated.
460 (elf_backend_setup_gnu_properties): New.
461 (elf_i386_nacl_plt): Updated.
462 (elf_i386_nacl_arch_bed): Likewise.
463 (elf_i386_vxworks_arch_bed): Likewise.
465 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
467 * elflink.c (elf_output_implib): Remove executable flag from import
469 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
470 library is a relocatable object file.
472 2017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
475 * elf32-avr.c (avr_should_move_sym): New function.
476 (avr_should_reduce_sym_size): Likewise.
477 (avr_should_increase_sym_size): Likewise.
478 (elf32_avr_relax_delete_bytes): Adjust symbol values
479 and sizes by calling new functions.
481 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
483 * config.bfd (riscv32-*): Enable rv64.
485 2017-05-02 Alan Modra <amodra@gmail.com>
488 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
489 rather than h->root.type == bfd_link_hash_new.
490 (bfd_elf_record_link_assignment): Similarly, call
491 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
493 2017-04-29 Alan Modra <amodra@gmail.com>
496 * reloc.c (reloc_offset_in_range): New function.
497 (bfd_perform_relocation, bfd_install_relocation): Use it.
498 (_bfd_final_link_relocate): Likewise.
500 2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
502 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
503 before using .plt.got.
504 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
506 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
508 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
509 instead of "+=" to update 0.
511 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
513 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
514 .plt.got section here.
515 (elf_i386_check_relocs): Don't create the .plt.got section.
516 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
517 the .plt.got and .plt.bnd sections here.
518 (elf_x86_64_check_relocs): Don't create the .plt.got nor
521 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
523 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
525 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
526 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
527 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
528 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
531 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
533 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
535 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
536 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
537 the first relocatable ELF input with GNU properties.
539 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
541 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
544 2017-04-27 Alan Modra <amodra@gmail.com>
546 * elf-bfd.h (struct elf_backend_data): Make asection param of
547 elf_backend_eh_frame_address_size const.
548 (_bfd_elf_eh_frame_address_size): Likewise.
549 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
550 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
551 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
552 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
553 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
554 (next_cie_fde_offset): Constify params.
555 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
557 2017-04-27 Alan Modra <amodra@gmail.com>
559 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
560 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
561 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
563 (offset_adjust): New function.
564 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
565 (adjust_eh_frame_local_symbols): Likewise.
566 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
567 after changing anything. Return true if anything changed.
568 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
569 _bfd_elf_adjust_eh_frame_global_symbol for globals.
571 2017-04-27 Alan Modra <amodra@gmail.com>
573 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
576 2017-04-27 Alan Modra <amodra@gmail.com>
578 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
579 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
580 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
581 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
582 for undef and undefweak dyn_relocs.
583 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
584 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
585 (allocate_got, allocate_dynrelocs): Likewise.
586 (ppc64_elf_relocate_section): Likewise.
588 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
590 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
591 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
592 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
593 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
595 2017-04-26 Nick Clifton <nickc@redhat.com>
598 * reloc.c (bfd_perform_relocation): Check for a negative address
601 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
604 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
606 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
607 (elf_backend_always_renumber_dynsyms): Define.
608 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
609 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
610 * elflink.c (bfd_elf_size_dynamic_sections): Also call
611 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
613 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
615 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
617 * elflink.c (bfd_elf_size_dynamic_sections): Only call
618 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
619 sections have been created.
621 2017-04-26 Nick Clifton <nickc@redhat.com>
624 * compress.c (bfd_init_section_compress_status): Check the return
625 value from bfd_malloc.
627 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
629 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
630 no_finish_dynamic_symbol.
631 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
633 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
634 weak symbol, don't make it dynamic.
635 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
636 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
637 relocation for GOT reference.
638 (elf_x86_64_finish_dynamic_symbol): Abort if
639 no_finish_dynamic_symbol isn't 0.
641 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
644 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
645 undefined weak symbol, don't make it dynamic.
646 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
647 set no_finish_dynamic_symbol and generate R_386_RELATIVE
648 relocation for R_386_GOT32.
650 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
653 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
655 2017-04-23 Alan Modra <amodra@gmail.com>
658 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
659 * elf.c (lcomm_sym): New.
660 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
661 * bfd-in2.h: Regenerate.
663 2017-04-23 Alan Modra <amodra@gmail.com>
666 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
667 parameters and comment.
668 (_bfd_elf_get_reloc_section): Delete.
669 (_bfd_elf_plt_get_reloc_section): Declare.
670 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
671 New functions. Don't blindly skip over assumed .rel/.rela prefix.
673 (_bfd_elf_get_reloc_section): ..here. Delete.
674 (assign_section_numbers): Call elf_get_reloc_section.
675 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
676 * elfxx-target.h (elf_backend_get_reloc_section): Update.
678 2017-04-23 Alan Modra <amodra@gmail.com>
681 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
684 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
687 * elf32-i386.c (elf_i386_link_hash_entry): Add
688 no_finish_dynamic_symbol.
689 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
690 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
691 symbol, don't make it dynamic in PIE.
692 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
693 set no_finish_dynamic_symbol and generate R_386_RELATIVE
694 relocation for R_386_GOT32
695 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
698 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
702 * elflink.c (elf_link_add_object_symbols): Require
703 --no-dynamic-linker with -E/--dynamic-list when creating
706 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
708 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
711 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
713 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
714 dynamic symbol sorting.
716 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
719 * elflink.c (elf_link_add_object_symbols): Preserve
720 dynamic_ref_after_ir_def when restoring the symbol table for
721 unneeded dynamic object.
723 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
726 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
727 on on undefined IFUNC symbol in the second PLT.
729 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
731 * peXXigen.c (pe_print_reloc): Correct chunk_end.
733 2017-04-19 Alan Modra <amodra@gmail.com>
735 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
736 or make dynamic for info->dynamic_undefined_weak 0 and 1.
737 * elf32-ppc.c:Formatting.
738 (ensure_undefweak_dynamic): Don't make dynamic when
739 info->dynamic_undefined_weak is zero.
740 (allocate_dynrelocs): Discard undefweak dyn_relocs for
741 info->dynamic_undefined_weak. Discard undef dyn_relocs when
742 not default visibility. Discard undef and undefweak
744 (ppc_elf_relocate_section): Adjust to suit.
745 * elf64-ppc.c: Formatting.
746 (ensure_undefweak_dynamic): Don't make dynamic when
747 info->dynamic_undefined_weak is zero.
748 (allocate_dynrelocs): Discard undefweak dyn_relocs for
749 info->dynamic_undefined_weak. Discard them earlier.
751 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
754 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
755 before generating the version definition section.
757 2017-04-17 Alan Modra <amodra@gmail.com>
759 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
760 state when a regular object file defines a symbol with
761 incompatible type to that defined by an earlier shared lib.
763 2017-04-13 Alan Modra <amodra@gmail.com>
765 * coffcode.h: Wrap some overly long _bfd_error_handler args.
767 * elf32-arm.c: Likewise.
768 * elf32-i386.c: Likewise.
769 * elf32-mep.c: Likewise.
770 * elf64-ia64-vms.c: Likewise.
771 * elf64-x86-64.c: Likewise.
772 * elflink.c: Likewise.
773 * elfnn-ia64.c: Likewise.
774 * elfxx-mips.c: Likewise.
776 2017-04-13 Alan Modra <amodra@gmail.com>
778 * aoutx.h: Use %B and %A in error messages throughout file.
779 * aout-cris.c: Likewise.
780 * archive.c: Likewise.
781 * binary.c: Likewise.
782 * coff-rs6000.c: Likewise.
783 * coff-tic4x.c: Likewise.
784 * coffcode.h: Likewise.
785 * coffgen.c: Likewise.
786 * cofflink.c: Likewise.
787 * coffswap.h: Likewise.
788 * cpu-arm.c: Likewise.
789 * elf-eh-frame.c: Likewise.
790 * elf-m10300.c: Likewise.
792 * elf32-arc.c: Likewise.
793 * elf32-arm.c: Likewise.
794 * elf32-bfin.c: Likewise.
795 * elf32-frv.c: Likewise.
796 * elf32-iq2000.c: Likewise.
797 * elf32-m32c.c: Likewise.
798 * elf32-microblaze.c: Likewise.
799 * elf32-nds32.c: Likewise.
800 * elf32-rl78.c: Likewise.
801 * elf32-rx.c: Likewise.
802 * elf32-score.c: Likewise.
803 * elf32-score7.c: Likewise.
804 * elf32-sh64.c: Likewise.
805 * elf32-v850.c: Likewise.
806 * elf32-vax.c: Likewise.
807 * elf32-visium.c: Likewise.
808 * elf64-ia64-vms.c: Likewise.
809 * elf64-mmix.c: Likewise.
810 * elf64-sh64.c: Likewise.
811 * elfcode.h: Likewise.
812 * elfnn-aarch64.c: Likewise.
813 * elfnn-ia64.c: Likewise.
814 * elfxx-mips.c: Likewise.
815 * hpux-core.c: Likewise.
818 * linker.c: Likewise.
823 * peXXigen.c: Likewise.
824 * rs6000-core.c: Likewise.
825 * vms-alpha.c: Likewise.
826 * xcofflink.c: Likewise.
828 2017-04-13 Alan Modra <amodra@gmail.com>
830 * bfd.c (PRINT_TYPE): Define.
831 (_doprnt): New function.
832 (error_handler_internal): Use _doprnt.
833 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
834 calls in their natural order, throughout file.
835 * coff-mcore.c: Likewise.
836 * coff-ppc.c: Likewise.
837 * coff-tic80.c: Likewise.
838 * cofflink.c: Likewise.
839 * elf-s390-common.c: Likewise.
841 * elf32-arm.c: Likewise.
842 * elf32-i386.c: Likewise.
843 * elf32-m32r.c: Likewise.
844 * elf32-msp430.c: Likewise.
845 * elf32-spu.c: Likewise.
846 * elf64-ia64-vms.c: Likewise.
847 * elf64-sparc.c: Likewise.
848 * elf64-x86-64.c: Likewise.
849 * elflink.c: Likewise.
850 * elfnn-aarch64.c: Likewise.
851 * elfnn-ia64.c: Likewise.
852 * elfxx-mips.c: Likewise.
854 2017-04-13 Alan Modra <amodra@gmail.com>
856 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
857 branch veneers" error. Fix double space and format message.
858 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
859 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
861 2017-04-13 Alan Modra <amodra@gmail.com>
863 * bfd-in2.h: Regenerate.
865 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
867 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
868 extra `\n' in warning/error messages.
869 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
870 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
872 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
874 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
875 processor-specific properties with generic ELF target vector.
877 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
879 * elf32-sparc.c (elf_backend_fixup_symbol): New.
880 * elf64-sparc.c (elf_backend_fixup_symbol): New.
881 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
882 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
884 (link_hash_newfunc): Initialize has_got_reloc and
886 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
888 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
890 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
892 (_bfd_sparc_elf_fixup_symbol): New function.
893 (allocate_dynrelocs): Don't allocate space for dynamic
894 relocations and discard relocations against resolved undefined
895 weak symbols in executable. Don't make resolved undefined weak
896 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
897 relocation against undefined weak symbols in PIE.
898 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
899 relocations against resolved undefined weak symbols in PIE
900 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
901 without ynamic PLT/GOT relocations for resolved undefined weak
903 Don't generate dynamic relocation against resolved undefined
904 weak symbol in executable.
905 (pie_finish_undefweak_symbol): New function.
906 (_bfd_sparc_elf_finish_dynamic_sections): Call
907 pie_finish_undefweak_symbol on all symbols in PIE.
908 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
909 (_bfd_sparc_elf_fixup_symbol): New function.
911 2017-04-10 Nick Clifton <nickc@redhat.com>
913 * config.bfd: Remove ns32k from obsolete list.
915 2017-04-10 Alan Modra <amodra@gmail.com>
918 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
919 (special_sections_i): Likewise for .init_array.
920 (special_sections_p): Likewise for .preinit_array.
922 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
926 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
927 ELF_COMMON_DEF_P for common symbols.
928 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
929 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
930 * elflink.c (_bfd_elf_merge_symbol): Revert commits
931 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
932 07492f668d2173da7a2bda3707ff0985e0f460b6.
934 2017-04-07 Pedro Alves <palves@redhat.com>
936 * opncls.c (bfd_get_debug_link_info): Rename to...
937 (bfd_get_debug_link_info_1): ... this. Change type of second
938 parameter to void pointer. Adjust.
939 (bfd_get_debug_link_info): Reimplement on top of
940 bfd_get_debug_link_info_1.
941 (separate_debug_file_exists, separate_alt_debug_file_exists):
942 Change type of second parameter to void pointer. Adjust.
943 (get_func_type, check_func_type): Change type of second parameter
945 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
946 the callback functions instead of passing the address of a local.
947 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
948 find_separate_debug_file.
949 (get_alt_debug_link_info_shim): Change type of second parameter to
950 void pointer. Adjust.
951 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
952 find_separate_debug_file.
953 (get_build_id_name, bfd_boolean check_build_id_file): Change type
954 of second parameter to void pointer. Adjust.
955 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
956 pointer local to find_separate_debug_file.
958 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
960 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
961 external symbols with a definition.
962 (_bfd_coff_gc_mark_extra_sections): Fix typo.
964 2017-04-07 Alan Modra <amodra@gmail.com>
966 * po/SRC-POTFILES.in: Regenerate.
968 2017-04-05 Alan Modra <amodra@gmail.com>
970 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
973 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
975 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
976 numbers for DataDirectory entry indicies passed to
979 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
981 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
982 each GNU_MBIND section and align GNU_MBIND section to page size.
983 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
984 segment for each GNU_MBIND section.
985 (_bfd_elf_init_private_section_data): Copy sh_info from input
986 for GNU_MBIND section.
988 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
990 * elfnn-riscv.c (GP_NAME): Delete.
991 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
992 (_bfd_riscv_relax_lui): Likewise.
994 2017-04-04 Nick Clifton <nickc@redhat.com>
997 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
999 (bfd_elf_final_link): Only initialize the extended symbol index
1000 section if there are extended symbol tables to list.
1002 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
1004 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
1005 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
1006 * configure.ac (elf): Add elf-properties.lo.
1007 * Makefile.in: Regenerated.
1008 * configure: Likewise.
1009 * elf-bfd.h (elf_property_kind): New.
1010 (elf_property): Likewise.
1011 (elf_property_list): Likewise.
1012 (elf_properties): Likewise.
1013 (_bfd_elf_parse_gnu_properties): Likewise.
1014 (_bfd_elf_get_property): Likewise.
1015 (_bfd_elf_link_setup_gnu_properties): Likewise.
1016 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
1017 and setup_gnu_properties.
1018 (elf_obj_tdata): Add properties.
1019 * elf-properties.c: New file.
1020 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
1021 (elf_i386_merge_gnu_properties): Likewise.
1022 (elf_backend_parse_gnu_properties): Likewise.
1023 (elf_backend_merge_gnu_properties): Likewise.
1024 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
1025 (elf_x86_64_merge_gnu_properties): Likewise.
1026 (elf_backend_parse_gnu_properties): Likewise.
1027 (elf_backend_merge_gnu_properties): Likewise.
1028 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
1029 (elf_backend_parse_gnu_properties): Likewise.
1030 (elf_backend_setup_gnu_properties): Likewise.
1031 (elfNN_bed): Add elf_backend_parse_gnu_properties,
1032 elf_backend_merge_gnu_properties and
1033 elf_backend_setup_gnu_properties.
1035 2017-03-30 Pip Cet <pipcet@gmail.com>
1037 * elf32-wasm32.c: Add relocation code, two relocs.
1038 * reloc.c: Add wasm32 relocations.
1039 * libbfd.h: Regenerate.
1040 * bfd-in2.h: Regenerate.
1041 * bfd/po/bfd.pot: Regenerate.
1043 2017-03-29 Nick Clifton <nickc@redhat.com>
1046 * coff-bfd.h (struct coff_section_data): Add new fields:
1047 saved_bias and bias.
1048 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
1049 computed for PE binaries.
1050 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
1053 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
1056 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
1057 to handle a local symbol with a hash-symbol-entry; without PLT.
1058 Add BFD_ASSERT for an incidental case with GOT entry present.
1059 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
1060 isn't forced-or-set local.
1062 2017-03-27 Pip Cet <pipcet@gmail.com>
1064 * wasm-module.c: New file to support WebAssembly modules.
1065 * wasm-module.h: New file to support WebAssembly modules.
1066 * doc/webassembly.texi: Start documenting wasm-module.c.
1067 * config.bfd: Add wasm_vec.
1068 * targets.c: Likewise.
1069 * configure.ac: Likewise.
1070 * Makefile.am: Add entries for wasm-module.c.
1071 * Makefile.in: Regenerate.
1072 * configure: Regenerate.
1073 * po/SRC-POTFILES.in: Regenerate.
1075 2017-03-27 Pip Cet <pipcet@gmail.com>
1077 * cpu-wasm32.c: New file to support wasm32 architecture.
1078 * elf32-wasm32.c: New file to support wasm32 architecture.
1079 * Makefile.am: Add wasm32 architecture.
1080 * archures.c: Likewise.
1081 * config.bfd: Likewise.
1082 * configure.ac: Likewise.
1083 * targets.c: Likewise.
1084 * Makefile.in: Regenerate.
1085 * bfd-in2.h: Regenerate.
1086 * configure: Regenerate.
1087 * po/SRC-POTFILES.in: Regenerate.
1089 2017-03-20 Alan Modra <amodra@gmail.com>
1092 * elf64-ppc.c (compare_symbols): Stabilize sort.
1094 2017-03-18 Alan Modra <amodra@gmail.com>
1096 * elf64-ppc.c (struct ppc_link_hash_table): Add
1097 local_ifunc_resolver and maybe_local_ifunc_resolver.
1098 (ppc_build_one_stub): Set flags on emitting dynamic
1099 relocation to ifunc.
1100 (ppc64_elf_relocate_section): Likewise.
1101 (ppc64_elf_finish_dynamic_symbol): Likewise.
1102 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
1103 local dynamic relocs to ifuncs.
1104 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
1105 local_ifunc_resolver and maybe_local_ifunc_resolver.
1106 (ppc_elf_relocate_section): Set flag on emitting dynamic
1107 relocation to ifuncs.
1108 (ppc_elf_finish_dynamic_symbol): Likewise.
1109 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
1110 dynamic relocs to ifuncs.
1112 2017-03-13 Nick Clifton <nickc@redhat.com>
1115 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
1116 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
1117 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
1118 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
1119 * bfd-in2.h: Regenerate.
1120 * libbfd.h: Regenerate.
1121 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
1123 (IS_AARCH64_TLSDESC_RELOC): Likewise.
1124 (elfNN_aarch64_howto_table): Likewise.
1125 (aarch64_tls_transition_without_check): Likewise.
1126 (aarch64_reloc_got_type): Likewise.
1127 (elfNN_aarch64_final_link_relocate): Likewise.
1128 (elfNN_aarch64_tls_relax): Likewise.
1129 (elfNN_aarch64_relocate_section): Likewise.
1130 (elfNN_aarch64_gc_sweep_hook): Likewise.
1131 (elfNN_aarch64_check_relocs): Likewise.
1132 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
1133 (_bfd_aarch64_elf_resolve_relocation): Likewise.
1135 2017-03-11 Alan Modra <amodra@gmail.com>
1137 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
1138 parameter is in fact used. Whitespace fixes.
1139 * elf64-ppc.c: Likewise.
1141 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
1143 * rs6000-core.c (CORE_NEW): Simplify macro when
1144 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
1146 2017-03-07 Alan Modra <amodra@gmail.com>
1150 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
1153 2017-03-05 Alan Modra <amodra@gmail.com>
1155 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
1156 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
1157 (next_cie_fde_offset): New function.
1158 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
1159 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
1160 four bytes. Align CIEs to four or eight bytes depending on
1161 per_encoding_aligned8. Align FDEs according to their encoding.
1162 Pad last FDE to output section alignment.
1163 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
1165 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
1166 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
1167 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
1169 2017-03-02 Martin Bickel <binutils@ineranves.de>
1172 * elf.c (rewrite_elf_program_header): Do not issue a warning for
1173 empty segments which have a zero filesz, but a non-zero memsz.
1175 2017-03-02 Alan Modra <amodra@gmail.com>
1177 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
1179 2017-02-28 Alan Modra <amodra@gmail.com>
1181 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
1182 (ppc64_elf_relocate_section): Likewise.
1184 2017-02-28 Alan Modra <amodra@gmail.com>
1187 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
1188 rather than elf32_nios2_hash_table or elf_hash_table.
1189 (create_got_section): Likewise.
1190 (nios2_elf32_finish_dynamic_symbol): Likewise.
1191 (nios2_elf32_adjust_dynamic_symbol): Likewise.
1192 (nios2_elf32_size_dynamic_sections): Likewise.
1193 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
1194 vars. Use htab equivalents directly instead. Don't create
1195 all dynamic sections on needing just the GOT. Use a goto
1196 rather than a fall-through with reloc test. Ensure
1197 htab->dynobj is set when making dynamic sreloc section.
1198 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
1199 equivalent directly instead. Don't segfault on looking for
1200 .dynamic when dynamic sections have not been created. Don't
1201 segfault on .got.plt being discarded.
1202 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
1203 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
1204 fixme and another not so relevant comment.
1205 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
1206 already set, set hash table dynobj on creating .sbss.
1208 2017-02-28 Alan Modra <amodra@gmail.com>
1210 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
1211 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
1212 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
1213 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
1214 (ppc64_elf_relocate_section): Likewise.
1215 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
1216 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
1217 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
1218 * libbfd.h: Regenerate.
1219 * bfd-in2.h: Regenerate.
1221 2017-02-28 Alan Modra <amodra@gmail.com>
1223 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
1224 dynamic .data.rel.ro read-only.
1225 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
1226 rather than section flags when deciding where copy reloc goes.
1227 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
1228 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
1229 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
1230 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
1231 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
1232 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
1233 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
1234 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
1235 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
1236 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
1237 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
1238 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
1239 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
1240 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
1241 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
1242 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
1243 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
1244 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
1245 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
1247 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
1249 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
1250 `jalr $0, $25' instruction encoding.
1252 2017-02-27 Nick Clifton <nickc@redhat.com>
1255 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
1256 generating a seg-fault when encountering a symbol that has been
1257 deleted by garbage collection.
1259 2017-02-25 Alan Modra <amodra@gmail.com>
1261 * elf32-arc.c (struct dynamic_sections): Delete.
1262 (enum dyn_section_types): Delete.
1263 (dyn_section_names): Delete.
1264 (arc_create_dynamic_sections): Delete.
1265 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
1266 segfault on discarded .rela.plt section.
1267 (elf_arc_size_dynamic_sections): Formatting. Don't call
1268 arc_create_dynamic_sections. Don't allocate memory for sections
1269 handled by the generic linker. Correct code finding relocs in
1270 read-only sections. Set SEC_EXCLUDE on zero size .got,
1271 .got.plt, and .dynbss sections. Do set .interp for pies.
1273 2017-02-24 Andrew Waterman <andrew@sifive.com>
1275 * elfnn-riscv.c (GP_NAME): New macro.
1276 (riscv_global_pointer_value): Use it.
1277 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
1278 output section, consider only that section's alignment.
1280 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
1282 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
1283 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
1284 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
1285 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
1287 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
1289 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
1290 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
1293 2017-02-23 Alan Modra <amodra@gmail.com>
1296 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
1298 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
1299 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
1302 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
1305 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
1306 processing ahead of the call to `elf_gc_sweep_symbol'.
1308 2017-02-22 Nick Clifton <nickc@redhat.com>
1311 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
1312 created section 4-byte alignment.
1314 2017-02-22 Alan Modra <amodra@gmail.com>
1316 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
1317 on .got or .plt output section being discarded by script.
1318 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
1321 2017-02-21 Alan Modra <amodra@gmail.com>
1323 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
1324 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
1326 2017-02-20 Alan Modra <amodra@gmail.com>
1329 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
1330 if DT_RELSZ/DT_RELASZ is zero.
1332 2017-02-17 Nick Clifton <nickc@redhat.com>
1334 * compress.c (bfd_get_full_section_contents): Remember to reduce
1335 compressed size by the sizeof the compression header when
1336 decompressing the contents.
1338 2017-02-17 Pedro Alves <palves@redhat.com>
1340 * srec.c (Chunk): Rename to ...
1341 (_bfd_srec_len): ... this.
1342 (S3Forced): Rename to ...
1343 (_bfd_srec_forceS3): ... this.
1344 * objcopy.c: Adjust all references.
1346 2017-02-17 Pedro Alves <palves@redhat.com>
1348 * archive.c (bsd_write_armap): Rename to ...
1349 (_bfd_bsd_write_armap): ... this.
1350 (coff_write_armap): Rename to ...
1351 (_bfd_coff_write_armap): ... this.
1352 * libbfd-in.h (bsd_write_armap): Rename to ...
1353 (_bfd_bsd_write_armap): ... this.
1354 (coff_write_armap): Rename to ...
1355 (_bfd_coff_write_armap): ... this.
1356 * aout-target.h, aout-tic30.c: Adjust all users.
1357 * libbfd.h: Regenerate.
1359 2017-02-17 Pedro Alves <palves@redhat.com>
1361 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
1362 (warn_deprecated): Rename to ...
1363 (_bfd_warn_deprecated): ... this.
1364 * libbfd.c (warn_deprecated): Rename to ...
1365 (_bfd_warn_deprecated): ... this.
1366 * bfd-in2.h: Regenerate.
1368 2017-02-17 Pedro Alves <palves@redhat.com>
1370 * bfdio.c (real_ftell): Rename to ...
1371 (_bfd_real_ftell): ... this.
1372 (real_fseek): Rename to ...
1373 (_bfd_real_fseek): ... this.
1374 (real_fopen): Rename to ...
1375 (_bfd_real_fopen): ... this.
1376 * libbfd-in.h (real_ftell): Rename to ...
1377 (_bfd_real_ftell): ... this.
1378 (real_fseek): Rename to ...
1379 (_bfd_real_fseek): ... this.
1380 (real_fopen): Rename to ...
1381 (_bfd_real_fopen): ... this.
1382 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
1383 * libbfd.h: Regenerate.
1385 2017-02-17 Pedro Alves <palves@redhat.com>
1387 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
1388 * libbfd.c (read_unsigned_leb128): Rename to ...
1389 (_bfd_read_unsigned_leb128): ... this.
1390 (read_signed_leb128): Rename to ...
1391 (_bfd_read_signed_leb128): ... this.
1392 (safe_read_leb128): Rename to ...
1393 (_bfd_safe_read_leb128): ... this.
1394 * libbfd-in.h (read_unsigned_leb128): Rename to ...
1395 (_bfd_read_unsigned_leb128): ... this.
1396 (read_signed_leb128): Rename to ...
1397 (_bfd_read_signed_leb128): ... this.
1398 (safe_read_leb128): Rename to ...
1399 (_bfd_safe_read_leb128): ... this.
1400 * libbfd.h: Renegerate.
1402 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
1404 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
1405 before trying to fine matching file and line information.
1407 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
1409 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
1410 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
1411 not match current bfd, then reload debug information. Record bfd
1412 we're loading debug info for in the stash. If we have debug
1413 informatin in the cache then perform section placement before
1416 2017-02-16 Alan Modra <amodra@gmail.com>
1419 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
1420 * elfxx-target.h (elf_backend_no_page_alias): Define.
1421 (elfNN_bed): Init new field.
1422 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
1423 ensure PT_LOAD segment starts on a new page.
1424 * elf32-hppa.c (elf_backend_no_page_alias): Define.
1426 2017-02-16 Alan Modra <amodra@gmail.com>
1429 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
1432 2017-02-16 Jiong Wang <jiong.wang@arm.com>
1434 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
1435 * bfd-in2.h: Regenerated.
1437 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
1440 * elf32-i386.c (elf_i386_relocate_section): Allow
1441 "lea foo@GOT, %reg" in PIC.
1443 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
1446 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
1447 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
1448 error against local IFUNC symbol without a base register for
1451 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
1453 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
1454 `%P: %H:' with `info->callbacks->einfo'.
1455 (ppc_elf_relocate_section): Likewise.
1456 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
1457 (ppc64_elf_edit_toc): Likewise.
1458 (ppc64_elf_relocate_section): Likewise.
1460 2017-02-14 Alan Modra <amodra@gmail.com>
1462 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
1463 --gc-keep-exported, and test versioned field of sym rather than
1464 looking for @ in name.
1466 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
1468 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
1471 2017-02-13 Nick Clifton <nickc@redhat.com>
1474 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
1477 2017-02-07 Andrew Waterman <andrew@sifive.com>
1479 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
1480 entry size if PLT header is written.
1482 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
1484 Fix sparc64 dynamic relocation processing to use the dynamic
1486 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
1487 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
1490 2017-02-03 Nick Clifton <nickc@redhat.com>
1493 * coffcode.h (coff_write_object_contents): Enlarge size of
1494 s_name_buf in order to avoid compile time warning about possible
1496 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
1497 32-bits of insn value before printing into buffer.
1499 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1501 * elfxx-mips.c (mips_elf_hash_sort_data): Add
1502 `max_local_dynindx'.
1503 (mips_elf_sort_hash_table): Handle it.
1504 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
1505 symbols bump up `max_local_dynindx' rather than
1506 `max_non_got_dynindx'.
1508 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1510 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
1511 `min_got_dynindx', `max_unref_got_dynindx' and
1512 `max_non_got_dynindx' members to the `bfd_size_type' data type.
1513 (mips_elf_sort_hash_table): Adjust accordingly.
1515 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1517 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
1518 to access the hash table.
1520 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1522 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
1523 non-NULL `htab' to the beginning.
1525 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1527 * elflink.c (elf_gc_sweep): Wrap overlong line.
1529 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
1531 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
1532 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
1533 * elfxx-mips.c (mips_elf_link_hash_table): Add
1534 `ignore_branch_isa' member.
1535 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
1536 in branch relocation calculation as an error if
1537 `ignore_branch_isa' has been set.
1538 (_bfd_mips_elf_insn32): Rename to...
1539 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
1540 parameter to `insn32' and add an `ignore_branch_isa' parameter.
1541 Handle the new parameter.
1543 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
1545 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
1546 local variable dynobj.
1549 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
1550 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
1551 executable from read-only sections into sdynrelro.
1552 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
1553 dynamic relocs in sdynrelro.
1554 (elf_backend_want_dynrelro): Define.
1556 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
1558 * config.bfd (*-*-rtemsaout*): Mark as removed.
1560 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
1562 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
1563 (arm-*-rtems*): Move to (arm*-*-eabi*).
1564 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
1565 (m68-*-rtems*): Move to (m68*-*-elf*).
1567 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
1569 * config.bfd (*-*-rtemscoff*): Mark as removed.
1571 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
1574 * elflink.c (bfd_elf_record_link_assignment): Revert last
1575 change and don't ever clear `forced_local'. Set `mark'
1577 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
1579 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
1580 (bfd_elf_size_dynamic_sections): ... here.
1581 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
1582 and set `mark' instead in `__tls_get_addr_opt' processing.
1583 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
1585 2017-01-24 Alan Modra <amodra@gmail.com>
1587 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
1588 where dynamic relocs are preferable. Allow ifunc too.
1589 (ensure_undefweak_dynamic): New function.
1590 (allocate_dynrelocs): Use it here. Move plt handling last and
1591 don't make symbols dynamic, simplifying loop. Only make undef
1592 weak symbols with GOT entries dynamic. Correct condition
1593 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
1594 comments. Remove goto.
1595 (ppc_elf_relocate_section): Correct test for using dynamic
1596 symbol on GOT relocs. Rearrange test for emitting GOT relocs
1597 to suit. Set up explicit tls_index entries and implicit GOT
1598 tls_index entries resolvable at link time for
1599 __tls_get_addr_opt. Simplify test to clear mem for prelink.
1600 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
1601 (ensure_undefweak_dynamic): New function.
1602 (allocate_dynrelocs): Use it here. Only make undef weak symbols
1603 with GOT entries dynamic. Remove unnecessary test of
1604 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
1605 (ppc64_elf_relocate_section): Correct test for using dynamic
1606 symbol on GOT relocs. Rearrange test for emitting GOT relocs
1607 to suit. Set up explicit tls_index entries and implicit GOT
1608 tls_index entries resolvable at link time for __tls_get_addr_opt.
1609 Simplify expression to clear mem for prelink.
1611 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
1613 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
1615 2017-01-20 Jiong Wang <jiong.wang@arm.com>
1617 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
1618 (elf_backend_hash_symbol): Define.
1620 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
1623 * elflink.c (bfd_elf_record_link_assignment): Clear any
1624 `forced_local' marking for DSO symbols that are not being
1627 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
1629 * elfnn-riscv.c (riscv_elf_object_p): New function.
1631 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
1634 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
1636 (elf_x86_64_check_relocs): Create .eh_frame section for the
1638 (elf_x86_64_size_dynamic_sections): Allocate and initialize
1639 .eh_frame section for the .plt.bnd section.
1640 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
1641 for the .plt.bnd section.
1643 2017-01-12 Nick Clifton <nickc@redhat.com>
1646 * opncls.c (find_separate_debug_file): Add include_dirs
1647 parameter. Only include the directory part of the bfd's filename
1648 in search paths if include_dirs is true. Add a couple of extra
1649 locations for looking for debug files.
1650 ( bfd_follow_gnu_debuglink): Update invocation of
1651 find_separate_debug_file.
1652 (bfd_follow_gnu_debugaltlink): Likewise.
1653 (get_build_id): New function: Finds the build-id of the given bfd.
1654 (get_build_id_name): New function: Computes the name of the
1655 separate debug info file for a bfd, based upon its build-id.
1656 (check_build_id_file): New function: Checks to see if a separate
1657 debug info file exists at the given location, and that its
1658 build-id matches that of the original bfd.
1659 (bfd_follow_build_id_debuglink): New function: Finds a separate
1660 debug info file for a given bfd by using the build-id method.
1661 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
1662 method of locating a separate debug info file before using the
1664 * bfd-in2.h: Regenerate.
1666 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
1669 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
1670 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
1671 elf_x86_64_eh_frame_plt_got.
1672 (elf_x86_64_size_dynamic_sections): Get unwind info from
1673 elf_x86_64_bnd_arch_bed for the BND PLT.
1675 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
1677 * config.bfd: Add entries for i686-redox and x86_64-redox.
1679 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
1681 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
1683 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
1684 .eh_frame section to 4 bytes for x32.
1685 (elf_x86_64_check_relocs): Likewise.
1687 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
1690 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
1691 (PLT_GOT_FDE_LENGTH): Likewise.
1692 (elf_i386_plt_layout): Add eh_frame_plt_got and
1693 eh_frame_plt_got_size.
1694 (elf_i386_plt): Updated.
1695 (elf_i386_link_hash_table): Add plt_got_eh_frame.
1696 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
1697 (elf_i386_size_dynamic_sections): Allocate and initialize
1698 .eh_frame section for .plt.got.
1699 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
1701 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
1702 eh_frame_plt_got_size.
1703 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
1704 (PLT_GOT_FDE_LENGTH): Likewise.
1705 (elf_x86_64_backend_data): Add eh_frame_plt_got and
1706 eh_frame_plt_got_size.
1707 (elf_x86_64_arch_bed): Updated.
1708 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
1709 eh_frame_plt_got_size.
1710 (elf_x86_64_nacl_arch_bed): Likewise.
1711 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
1712 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
1713 (elf_x86_64_size_dynamic_sections): Allocate and initialize
1714 .eh_frame section for .plt.got.
1715 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
1718 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
1720 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
1721 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
1723 2017-01-09 Nick Clifton <nickc@redhat.com>
1725 * dwarf2.c (lookup_address_in_function_table): Return early if
1726 there are no functions in the given comp unit, or if the high
1727 address of the last function in the comp unit is less than the
1730 2017-01-09 Nick Clifton <nickc@redhat.com>
1733 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
1734 message if there are too many symbols to load.
1736 2017-01-04 James Clarke <jrtc27@jrtc27.com>
1738 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
1739 if relocs are cached.
1741 2017-01-03 Rich Felker <bugdal@aerifal.cx>
1744 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
1745 for R_MICROBLAZE_GOTOFF_64.
1747 2017-01-03 Nick Clifton <nickc@redhat.com>
1749 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
1750 warning about using a possibly uninitialised variable.
1752 2017-01-02 Alan Modra <amodra@gmail.com>
1754 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
1755 (allocate_plt_static, allocate_dynrelocs): Use it.
1757 2017-01-02 Alan Modra <amodra@gmail.com>
1759 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
1760 .PARISC.unwind section.
1762 2017-01-02 Alan Modra <amodra@gmail.com>
1765 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
1766 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
1767 indirect to GOT pointer relative code edit.
1769 2017-01-02 Alan Modra <amodra@gmail.com>
1771 Update year range in copyright notice of all files.
1773 For older changes see ChangeLog-2016
1775 Copyright (C) 2017 Free Software Foundation, Inc.
1777 Copying and distribution of this file, with or without modification,
1778 are permitted in any medium without royalty provided the copyright
1779 notice and this notice are preserved.
1785 version-control: never