1 2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
3 * archures.c (bfd_mach_sparc_v9m8): Define.
4 (bfd_mach_sparc_v8plusm8): Likewise.
5 (bfd_mach_sparc_v9_p): Adjust to M8.
6 (bfd_mach_sparc_64bit_p): Likewise.
7 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
8 bfd_mach_sparc_v8plusm8.
9 * bfd-in2.h: Regenerated.
10 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
12 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
13 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
14 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
16 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
17 bfd_mach_sparc_v8plusm8.
19 2017-05-19 Alan Modra <amodra@gmail.com>
21 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
22 debug and special sections when no non-note alloc sections in an
25 2017-05-18 Alan Modra <amodra@gmail.com>
27 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
28 * elf-m10300.c: Likewise.
30 * elf32-arc.c: Likewise.
31 * elf32-bfin.c: Likewise.
32 * elf32-m68k.c: Likewise.
33 * elf32-nds32.c: Likewise.
34 * elf32-tilepro.c: Likewise.
35 * elflink.c: Likewise.
36 * elfnn-aarch64.c: Likewise.
37 * elfnn-riscv.c: Likewise.
38 * elfxx-tilegx.c: Likewise.
40 * peXXigen.c: Likewise.
41 * vms-alpha.c: Likewise.
42 * vms-lib.c: Likewise.
44 2017-05-17 H.J. Lu <hongjiu.lu@intel.com>
47 * elflink.c (elf_gc_mark_debug_section): New function.
48 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
49 referenced by kept debug sections.
51 2017-05-16 Alan Modra <amodra@gmail.com>
53 * elf-m10300.c: Rename occurrences of non_ir_ref.
54 * elf32-arm.c: Likewise.
55 * elf32-bfin.c: Likewise.
56 * elf32-cr16.c: Likewise.
57 * elf32-cris.c: Likewise.
58 * elf32-d10v.c: Likewise.
59 * elf32-dlx.c: Likewise.
60 * elf32-fr30.c: Likewise.
61 * elf32-frv.c: Likewise.
62 * elf32-hppa.c: Likewise.
63 * elf32-i370.c: Likewise.
64 * elf32-i386.c: Likewise.
65 * elf32-iq2000.c: Likewise.
66 * elf32-lm32.c: Likewise.
67 * elf32-m32c.c: Likewise.
68 * elf32-m32r.c: Likewise.
69 * elf32-m68hc1x.c: Likewise.
70 * elf32-m68k.c: Likewise.
71 * elf32-mcore.c: Likewise.
72 * elf32-metag.c: Likewise.
73 * elf32-microblaze.c: Likewise.
74 * elf32-moxie.c: Likewise.
75 * elf32-msp430.c: Likewise.
76 * elf32-mt.c: Likewise.
77 * elf32-nios2.c: Likewise.
78 * elf32-or1k.c: Likewise.
79 * elf32-ppc.c: Likewise.
80 * elf32-rl78.c: Likewise.
81 * elf32-s390.c: Likewise.
82 * elf32-score.c: Likewise.
83 * elf32-score7.c: Likewise.
84 * elf32-sh.c: Likewise.
85 * elf32-tic6x.c: Likewise.
86 * elf32-tilepro.c: Likewise.
87 * elf32-v850.c: Likewise.
88 * elf32-vax.c: Likewise.
89 * elf32-xstormy16.c: Likewise.
90 * elf32-xtensa.c: Likewise.
91 * elf64-alpha.c: Likewise.
92 * elf64-hppa.c: Likewise.
93 * elf64-ia64-vms.c: Likewise.
94 * elf64-mmix.c: Likewise.
95 * elf64-ppc.c: Likewise.
96 * elf64-s390.c: Likewise.
97 * elf64-sh64.c: Likewise.
98 * elf64-x86-64.c: Likewise.
99 * elflink.c: Likewise.
100 * elfnn-aarch64.c: Likewise.
101 * elfnn-ia64.c: Likewise.
102 * elfnn-riscv.c: Likewise.
103 * elfxx-mips.c: Likewise.
104 * elfxx-sparc.c: Likewise.
105 * elfxx-tilegx.c: Likewise.
106 * linker.c: Likewise.
108 2017-05-16 Alan Modra <amodra@gmail.com>
110 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
111 * elflink.c (elf_link_add_object_symbols): Update to use
113 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
115 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
117 2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
119 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
121 2017-05-12 H.J. Lu <hongjiu.lu@intel.com>
123 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
124 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
126 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
128 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
130 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
132 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
133 to plt_second/plt_second_eh_frame.
134 (elf_x86_64_link_hash_newfunc): Updated.
135 (elf_x86_64_allocate_dynrelocs): Likewise.
136 (elf_x86_64_size_dynamic_sections): Likewise.
137 (elf_x86_64_relocate_section): Likewise.
138 (elf_x86_64_finish_dynamic_symbol): Likewise.
139 (elf_x86_64_finish_dynamic_sections): Likewise.
140 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
141 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
143 (elf_backend_setup_gnu_properties): Updated. Create the
144 .plt.sec section instead of the .plt.sec section.
146 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
148 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
149 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
150 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
152 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
154 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
155 (bfd_elf64_set_reloc): Define.
156 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
158 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
160 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
161 (struct bfd_target): New field _bfd_set_reloc.
162 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
163 * reloc.c (_bfd_generic_set_reloc): New function.
164 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
165 * nlm-target.h (nlm_set_reloc): Likewise.
166 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
167 * aout-tic30.c (MY_set_reloc): Likewise.
168 * aout-target.h (MY_set_reloc): Likewise.
169 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
170 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
171 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
172 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
173 * aout-adobe.c (aout_32_set_reloc): Likewise.
174 * bout.c (b_out_set_reloc): Likewise.
175 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
176 * i386os9k.c (aout_32_set_reloc): Likewise.
177 * ieee.c (ieee_set_reloc): Likewise.
178 * oasys.c (oasys_set_reloc): Likewise.
179 * som.c (som_set_reloc): Likewise.
180 * versados.c (versados_set_reloc): Likewise.
181 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
182 _bfd_generic_set_reloc.
183 (rs6000_xcoff64_aix_vec): LIkewise.
184 * libbfd.c (_bfd_norelocs_set_reloc): New function.
185 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
186 * i386msdos.c (msdos_set_reloc): Define to
187 _bfd_norelocs_set_reloc.
188 * elfcode.h (elf_set_reloc): Define.
189 * bfd-in2.h: Regenerated.
191 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
194 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
195 for IFUNC function address.
197 2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
199 * elf32-arc.c (FEATURE_LIST_NAME): Define.
200 (CONFLICT_LIST): Likewise.
201 (opcode/arc-attrs.h): Include.
202 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
203 (arc_extract_features): New file.
204 (arc_stralloc): Likewise.
205 (arc_elf_merge_attributes): Likewise.
206 (arc_elf_merge_private_bfd_data): Use object attributes.
207 (bfd_arc_get_mach_from_attributes): New function.
208 (arc_elf_object_p): Use object attributes.
209 (arc_elf_final_write_processing): Likewise.
210 (elf32_arc_obj_attrs_arg_type): New function.
211 (elf32_arc_obj_attrs_handle_unknown): Likewise.
212 (elf32_arc_section_from_shdr): Likewise.
213 (elf_backend_obj_attrs_vendor): Define.
214 (elf_backend_obj_attrs_section): Likewise.
215 (elf_backend_obj_attrs_arg_type): Likewise.
216 (elf_backend_obj_attrs_section_type): Likewise.
217 (elf_backend_obj_attrs_handle_unknown): Likewise.
218 (elf_backend_section_from_shdr): Likewise.
220 2017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
223 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
224 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
225 and the destination is a Thumb symbol.
227 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
229 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
230 initializer to silence GCC 4.2.
231 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
233 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
235 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
236 (LAZY_PLT_ENTRY_SIZE): This.
237 (NON_LAZY_PLT_ENTRY_SIZE): New.
238 (elf_x86_64_plt0_entry): Renamed to ...
239 (elf_x86_64_lazy_plt0_entry): This.
240 (elf_x86_64_plt_entry): Renamed to ...
241 (elf_x86_64_lazy_plt_entry): This.
242 (elf_x86_64_bnd_plt0_entry): Renamed to ...
243 (elf_x86_64_lazy_bnd_plt0_entry): This.
244 (elf_x86_64_legacy_plt_entry): Removed.
245 (elf_x86_64_bnd_plt_entry): Renamed to ...
246 (elf_x86_64_lazy_bnd_plt_entry): This.
247 (elf_x86_64_legacy_plt2_entry): Renamed to ...
248 (elf_x86_64_non_lazy_plt_entry): This.
249 (elf_x86_64_bnd_plt2_entry): Renamed to ...
250 (elf_x86_64_non_lazy_bnd_plt_entry): This.
251 (elf_x86_64_eh_frame_plt): Renamed to ...
252 (elf_x86_64_eh_frame_lazy_plt): This.
253 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
254 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
255 (elf_x86_64_eh_frame_plt_got): Renamed to ...
256 (elf_x86_64_eh_frame_non_lazy_plt): This.
257 (elf_x86_64_lazy_plt_layout): New.
258 (elf_x86_64_non_lazy_plt_layout): Likewise.
259 (elf_x86_64_plt_layout): Likewise.
260 (elf_x86_64_backend_data): Remove PLT layout information. Add
261 os for target system.
262 (GET_PLT_ENTRY_SIZE): Removed.
263 (elf_x86_64_lazy_plt): New.
264 (elf_x86_64_non_lazy_plt): Likewise.
265 (elf_x86_64_lazy_bnd_plt): Likewise.
266 (elf_x86_64_non_lazy_bnd_plt): Likewise.
267 (elf_x86-64_arch_bed): Updated.
268 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
269 (elf_x86_64_create_dynamic_sections): Removed.
270 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
271 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
272 (elf_x86-64_adjust_dynamic_symbol): Updated.
273 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
274 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
275 size for PLT0 if there is no PLT0. Get plt_entry_size from
276 non_lazy_plt for non-lazy PLT entries.
277 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
278 from non_lazy_plt for non-lazy PLT entries.
279 (elf_x86-64_relocate_section): Updated. Properly get PLT index
281 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
282 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
283 entries with non-lazy PLT layout. Don't fill the second and third
284 slots in the PLT entry if there is no PLT0.
285 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
286 if there is no PLT0. Set sh_entsize on the .plt.got section.
287 (compare_relocs): New.
288 (elf_x86_64_plt_type): Likewise.
289 (elf_x86_64_plt): Likewise.
290 (elf_x86_64_nacl_plt): New. Forward declaration.
291 (elf_x86_64_get_plt_sym_val): Removed.
292 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
293 against all dynamic relocations.
294 (elf_x86_64_link_setup_gnu_properties): New function.
295 (elf_backend_create_dynamic_sections): Updated.
296 (elf_backend_setup_gnu_properties): New.
297 (elf_x86_64_nacl_plt): New.
298 (elf_x86_64_nacl_arch_bed): Updated.
300 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
302 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
303 (LAZY_PLT_ENTRY_SIZE): This.
304 (NON_LAZY_PLT_ENTRY_SIZE): New.
305 (elf_i386_plt0_entry): Renamed to ...
306 (elf_i386_lazy_plt0_entry): This.
307 (elf_i386_plt_entry): Renamed to ...
308 (elf_i386_lazy_plt_entry): This.
309 (elf_i386_pic_plt0_entry): Renamed to ...
310 (elf_i386_pic_lazy_plt0_entry): This.
311 (elf_i386_pic_plt_entry): Renamed to ...
312 (elf_i386_pic_lazy_plt_entry): This.
313 (elf_i386_got_plt_entry): Renamed to ...
314 (elf_i386_non_lazy_plt_entry): This.
315 (elf_i386_pic_got_plt_entry): Renamed to ...
316 (elf_i386_pic_non_lazy_plt_entry): This.
317 (elf_i386_eh_frame_plt): Renamed to ...
318 (elf_i386_eh_frame_lazy_plt): This.
319 (elf_i386_eh_frame_plt_got): Renamed to ...
320 (elf_i386_eh_frame_non_lazy_plt): This.
321 (elf_i386_plt_layout): Renamed to ...
322 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
323 eh_frame_plt_got_size.
324 (elf_i386_non_lazy_plt_layout): New.
325 (elf_i386_plt_layout): Likewise.
326 (elf_i386_non_lazy_plt): Likewise.
327 (GET_PLT_ENTRY_SIZE): Removed.
328 (elf_i386_plt): Renamed to ...
329 (elf_i386_lazy_plt): This.
330 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
331 (elf_i386_arch_bed): Updated.
332 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
333 (elf_i386_create_dynamic_sections): Removed.
334 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
335 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
336 (elf_i386_adjust_dynamic_symbol): Updated.
337 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
338 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
339 size for PLT0 if there is no PLT0.
340 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
341 output section is discarded only if GOT isn't empty.
342 (elf_i386_relocate_section): Updated. Properly get PLT index
344 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
345 second and third slots in the PLT entry if there is no PLT0.
346 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
347 if there is no PLT0. Set sh_entsize on the .plt.got section.
348 (elf_i386_nacl_plt): Forward declaration.
349 (elf_i386_get_plt_sym_val): Removed.
350 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
351 against all dynamic relocations.
352 (elf_i386_link_setup_gnu_properties): New function.
353 (elf_backend_create_dynamic_sections): Updated.
354 (elf_backend_setup_gnu_properties): New.
355 (elf_i386_nacl_plt): Updated.
356 (elf_i386_nacl_arch_bed): Likewise.
357 (elf_i386_vxworks_arch_bed): Likewise.
359 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
361 * elflink.c (elf_output_implib): Remove executable flag from import
363 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
364 library is a relocatable object file.
366 2017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
369 * elf32-avr.c (avr_should_move_sym): New function.
370 (avr_should_reduce_sym_size): Likewise.
371 (avr_should_increase_sym_size): Likewise.
372 (elf32_avr_relax_delete_bytes): Adjust symbol values
373 and sizes by calling new functions.
375 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
377 * config.bfd (riscv32-*): Enable rv64.
379 2017-05-02 Alan Modra <amodra@gmail.com>
382 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
383 rather than h->root.type == bfd_link_hash_new.
384 (bfd_elf_record_link_assignment): Similarly, call
385 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
387 2017-04-29 Alan Modra <amodra@gmail.com>
390 * reloc.c (reloc_offset_in_range): New function.
391 (bfd_perform_relocation, bfd_install_relocation): Use it.
392 (_bfd_final_link_relocate): Likewise.
394 2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
396 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
397 before using .plt.got.
398 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
400 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
402 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
403 instead of "+=" to update 0.
405 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
407 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
408 .plt.got section here.
409 (elf_i386_check_relocs): Don't create the .plt.got section.
410 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
411 the .plt.got and .plt.bnd sections here.
412 (elf_x86_64_check_relocs): Don't create the .plt.got nor
415 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
417 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
419 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
420 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
421 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
422 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
425 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
427 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
429 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
430 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
431 the first relocatable ELF input with GNU properties.
433 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
435 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
438 2017-04-27 Alan Modra <amodra@gmail.com>
440 * elf-bfd.h (struct elf_backend_data): Make asection param of
441 elf_backend_eh_frame_address_size const.
442 (_bfd_elf_eh_frame_address_size): Likewise.
443 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
444 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
445 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
446 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
447 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
448 (next_cie_fde_offset): Constify params.
449 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
451 2017-04-27 Alan Modra <amodra@gmail.com>
453 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
454 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
455 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
457 (offset_adjust): New function.
458 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
459 (adjust_eh_frame_local_symbols): Likewise.
460 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
461 after changing anything. Return true if anything changed.
462 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
463 _bfd_elf_adjust_eh_frame_global_symbol for globals.
465 2017-04-27 Alan Modra <amodra@gmail.com>
467 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
470 2017-04-27 Alan Modra <amodra@gmail.com>
472 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
473 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
474 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
475 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
476 for undef and undefweak dyn_relocs.
477 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
478 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
479 (allocate_got, allocate_dynrelocs): Likewise.
480 (ppc64_elf_relocate_section): Likewise.
482 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
484 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
485 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
486 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
487 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
489 2017-04-26 Nick Clifton <nickc@redhat.com>
492 * reloc.c (bfd_perform_relocation): Check for a negative address
495 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
498 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
500 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
501 (elf_backend_always_renumber_dynsyms): Define.
502 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
503 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
504 * elflink.c (bfd_elf_size_dynamic_sections): Also call
505 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
507 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
509 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
511 * elflink.c (bfd_elf_size_dynamic_sections): Only call
512 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
513 sections have been created.
515 2017-04-26 Nick Clifton <nickc@redhat.com>
518 * compress.c (bfd_init_section_compress_status): Check the return
519 value from bfd_malloc.
521 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
523 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
524 no_finish_dynamic_symbol.
525 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
527 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
528 weak symbol, don't make it dynamic.
529 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
530 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
531 relocation for GOT reference.
532 (elf_x86_64_finish_dynamic_symbol): Abort if
533 no_finish_dynamic_symbol isn't 0.
535 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
538 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
539 undefined weak symbol, don't make it dynamic.
540 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
541 set no_finish_dynamic_symbol and generate R_386_RELATIVE
542 relocation for R_386_GOT32.
544 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
547 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
549 2017-04-23 Alan Modra <amodra@gmail.com>
552 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
553 * elf.c (lcomm_sym): New.
554 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
555 * bfd-in2.h: Regenerate.
557 2017-04-23 Alan Modra <amodra@gmail.com>
560 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
561 parameters and comment.
562 (_bfd_elf_get_reloc_section): Delete.
563 (_bfd_elf_plt_get_reloc_section): Declare.
564 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
565 New functions. Don't blindly skip over assumed .rel/.rela prefix.
567 (_bfd_elf_get_reloc_section): ..here. Delete.
568 (assign_section_numbers): Call elf_get_reloc_section.
569 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
570 * elfxx-target.h (elf_backend_get_reloc_section): Update.
572 2017-04-23 Alan Modra <amodra@gmail.com>
575 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
578 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
581 * elf32-i386.c (elf_i386_link_hash_entry): Add
582 no_finish_dynamic_symbol.
583 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
584 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
585 symbol, don't make it dynamic in PIE.
586 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
587 set no_finish_dynamic_symbol and generate R_386_RELATIVE
588 relocation for R_386_GOT32
589 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
592 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
596 * elflink.c (elf_link_add_object_symbols): Require
597 --no-dynamic-linker with -E/--dynamic-list when creating
600 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
602 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
605 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
607 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
608 dynamic symbol sorting.
610 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
613 * elflink.c (elf_link_add_object_symbols): Preserve
614 dynamic_ref_after_ir_def when restoring the symbol table for
615 unneeded dynamic object.
617 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
620 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
621 on on undefined IFUNC symbol in the second PLT.
623 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
625 * peXXigen.c (pe_print_reloc): Correct chunk_end.
627 2017-04-19 Alan Modra <amodra@gmail.com>
629 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
630 or make dynamic for info->dynamic_undefined_weak 0 and 1.
631 * elf32-ppc.c:Formatting.
632 (ensure_undefweak_dynamic): Don't make dynamic when
633 info->dynamic_undefined_weak is zero.
634 (allocate_dynrelocs): Discard undefweak dyn_relocs for
635 info->dynamic_undefined_weak. Discard undef dyn_relocs when
636 not default visibility. Discard undef and undefweak
638 (ppc_elf_relocate_section): Adjust to suit.
639 * elf64-ppc.c: Formatting.
640 (ensure_undefweak_dynamic): Don't make dynamic when
641 info->dynamic_undefined_weak is zero.
642 (allocate_dynrelocs): Discard undefweak dyn_relocs for
643 info->dynamic_undefined_weak. Discard them earlier.
645 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
648 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
649 before generating the version definition section.
651 2017-04-17 Alan Modra <amodra@gmail.com>
653 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
654 state when a regular object file defines a symbol with
655 incompatible type to that defined by an earlier shared lib.
657 2017-04-13 Alan Modra <amodra@gmail.com>
659 * coffcode.h: Wrap some overly long _bfd_error_handler args.
661 * elf32-arm.c: Likewise.
662 * elf32-i386.c: Likewise.
663 * elf32-mep.c: Likewise.
664 * elf64-ia64-vms.c: Likewise.
665 * elf64-x86-64.c: Likewise.
666 * elflink.c: Likewise.
667 * elfnn-ia64.c: Likewise.
668 * elfxx-mips.c: Likewise.
670 2017-04-13 Alan Modra <amodra@gmail.com>
672 * aoutx.h: Use %B and %A in error messages throughout file.
673 * aout-cris.c: Likewise.
674 * archive.c: Likewise.
675 * binary.c: Likewise.
676 * coff-rs6000.c: Likewise.
677 * coff-tic4x.c: Likewise.
678 * coffcode.h: Likewise.
679 * coffgen.c: Likewise.
680 * cofflink.c: Likewise.
681 * coffswap.h: Likewise.
682 * cpu-arm.c: Likewise.
683 * elf-eh-frame.c: Likewise.
684 * elf-m10300.c: Likewise.
686 * elf32-arc.c: Likewise.
687 * elf32-arm.c: Likewise.
688 * elf32-bfin.c: Likewise.
689 * elf32-frv.c: Likewise.
690 * elf32-iq2000.c: Likewise.
691 * elf32-m32c.c: Likewise.
692 * elf32-microblaze.c: Likewise.
693 * elf32-nds32.c: Likewise.
694 * elf32-rl78.c: Likewise.
695 * elf32-rx.c: Likewise.
696 * elf32-score.c: Likewise.
697 * elf32-score7.c: Likewise.
698 * elf32-sh64.c: Likewise.
699 * elf32-v850.c: Likewise.
700 * elf32-vax.c: Likewise.
701 * elf32-visium.c: Likewise.
702 * elf64-ia64-vms.c: Likewise.
703 * elf64-mmix.c: Likewise.
704 * elf64-sh64.c: Likewise.
705 * elfcode.h: Likewise.
706 * elfnn-aarch64.c: Likewise.
707 * elfnn-ia64.c: Likewise.
708 * elfxx-mips.c: Likewise.
709 * hpux-core.c: Likewise.
712 * linker.c: Likewise.
717 * peXXigen.c: Likewise.
718 * rs6000-core.c: Likewise.
719 * vms-alpha.c: Likewise.
720 * xcofflink.c: Likewise.
722 2017-04-13 Alan Modra <amodra@gmail.com>
724 * bfd.c (PRINT_TYPE): Define.
725 (_doprnt): New function.
726 (error_handler_internal): Use _doprnt.
727 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
728 calls in their natural order, throughout file.
729 * coff-mcore.c: Likewise.
730 * coff-ppc.c: Likewise.
731 * coff-tic80.c: Likewise.
732 * cofflink.c: Likewise.
733 * elf-s390-common.c: Likewise.
735 * elf32-arm.c: Likewise.
736 * elf32-i386.c: Likewise.
737 * elf32-m32r.c: Likewise.
738 * elf32-msp430.c: Likewise.
739 * elf32-spu.c: Likewise.
740 * elf64-ia64-vms.c: Likewise.
741 * elf64-sparc.c: Likewise.
742 * elf64-x86-64.c: Likewise.
743 * elflink.c: Likewise.
744 * elfnn-aarch64.c: Likewise.
745 * elfnn-ia64.c: Likewise.
746 * elfxx-mips.c: Likewise.
748 2017-04-13 Alan Modra <amodra@gmail.com>
750 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
751 branch veneers" error. Fix double space and format message.
752 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
753 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
755 2017-04-13 Alan Modra <amodra@gmail.com>
757 * bfd-in2.h: Regenerate.
759 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
761 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
762 extra `\n' in warning/error messages.
763 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
764 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
766 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
768 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
769 processor-specific properties with generic ELF target vector.
771 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
773 * elf32-sparc.c (elf_backend_fixup_symbol): New.
774 * elf64-sparc.c (elf_backend_fixup_symbol): New.
775 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
776 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
778 (link_hash_newfunc): Initialize has_got_reloc and
780 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
782 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
784 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
786 (_bfd_sparc_elf_fixup_symbol): New function.
787 (allocate_dynrelocs): Don't allocate space for dynamic
788 relocations and discard relocations against resolved undefined
789 weak symbols in executable. Don't make resolved undefined weak
790 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
791 relocation against undefined weak symbols in PIE.
792 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
793 relocations against resolved undefined weak symbols in PIE
794 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
795 without ynamic PLT/GOT relocations for resolved undefined weak
797 Don't generate dynamic relocation against resolved undefined
798 weak symbol in executable.
799 (pie_finish_undefweak_symbol): New function.
800 (_bfd_sparc_elf_finish_dynamic_sections): Call
801 pie_finish_undefweak_symbol on all symbols in PIE.
802 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
803 (_bfd_sparc_elf_fixup_symbol): New function.
805 2017-04-10 Nick Clifton <nickc@redhat.com>
807 * config.bfd: Remove ns32k from obsolete list.
809 2017-04-10 Alan Modra <amodra@gmail.com>
812 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
813 (special_sections_i): Likewise for .init_array.
814 (special_sections_p): Likewise for .preinit_array.
816 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
820 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
821 ELF_COMMON_DEF_P for common symbols.
822 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
823 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
824 * elflink.c (_bfd_elf_merge_symbol): Revert commits
825 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
826 07492f668d2173da7a2bda3707ff0985e0f460b6.
828 2017-04-07 Pedro Alves <palves@redhat.com>
830 * opncls.c (bfd_get_debug_link_info): Rename to...
831 (bfd_get_debug_link_info_1): ... this. Change type of second
832 parameter to void pointer. Adjust.
833 (bfd_get_debug_link_info): Reimplement on top of
834 bfd_get_debug_link_info_1.
835 (separate_debug_file_exists, separate_alt_debug_file_exists):
836 Change type of second parameter to void pointer. Adjust.
837 (get_func_type, check_func_type): Change type of second parameter
839 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
840 the callback functions instead of passing the address of a local.
841 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
842 find_separate_debug_file.
843 (get_alt_debug_link_info_shim): Change type of second parameter to
844 void pointer. Adjust.
845 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
846 find_separate_debug_file.
847 (get_build_id_name, bfd_boolean check_build_id_file): Change type
848 of second parameter to void pointer. Adjust.
849 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
850 pointer local to find_separate_debug_file.
852 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
854 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
855 external symbols with a definition.
856 (_bfd_coff_gc_mark_extra_sections): Fix typo.
858 2017-04-07 Alan Modra <amodra@gmail.com>
860 * po/SRC-POTFILES.in: Regenerate.
862 2017-04-05 Alan Modra <amodra@gmail.com>
864 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
867 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
869 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
870 numbers for DataDirectory entry indicies passed to
873 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
875 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
876 each GNU_MBIND section and align GNU_MBIND section to page size.
877 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
878 segment for each GNU_MBIND section.
879 (_bfd_elf_init_private_section_data): Copy sh_info from input
880 for GNU_MBIND section.
882 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
884 * elfnn-riscv.c (GP_NAME): Delete.
885 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
886 (_bfd_riscv_relax_lui): Likewise.
888 2017-04-04 Nick Clifton <nickc@redhat.com>
891 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
893 (bfd_elf_final_link): Only initialize the extended symbol index
894 section if there are extended symbol tables to list.
896 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
898 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
899 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
900 * configure.ac (elf): Add elf-properties.lo.
901 * Makefile.in: Regenerated.
902 * configure: Likewise.
903 * elf-bfd.h (elf_property_kind): New.
904 (elf_property): Likewise.
905 (elf_property_list): Likewise.
906 (elf_properties): Likewise.
907 (_bfd_elf_parse_gnu_properties): Likewise.
908 (_bfd_elf_get_property): Likewise.
909 (_bfd_elf_link_setup_gnu_properties): Likewise.
910 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
911 and setup_gnu_properties.
912 (elf_obj_tdata): Add properties.
913 * elf-properties.c: New file.
914 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
915 (elf_i386_merge_gnu_properties): Likewise.
916 (elf_backend_parse_gnu_properties): Likewise.
917 (elf_backend_merge_gnu_properties): Likewise.
918 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
919 (elf_x86_64_merge_gnu_properties): Likewise.
920 (elf_backend_parse_gnu_properties): Likewise.
921 (elf_backend_merge_gnu_properties): Likewise.
922 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
923 (elf_backend_parse_gnu_properties): Likewise.
924 (elf_backend_setup_gnu_properties): Likewise.
925 (elfNN_bed): Add elf_backend_parse_gnu_properties,
926 elf_backend_merge_gnu_properties and
927 elf_backend_setup_gnu_properties.
929 2017-03-30 Pip Cet <pipcet@gmail.com>
931 * elf32-wasm32.c: Add relocation code, two relocs.
932 * reloc.c: Add wasm32 relocations.
933 * libbfd.h: Regenerate.
934 * bfd-in2.h: Regenerate.
935 * bfd/po/bfd.pot: Regenerate.
937 2017-03-29 Nick Clifton <nickc@redhat.com>
940 * coff-bfd.h (struct coff_section_data): Add new fields:
942 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
943 computed for PE binaries.
944 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
947 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
950 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
951 to handle a local symbol with a hash-symbol-entry; without PLT.
952 Add BFD_ASSERT for an incidental case with GOT entry present.
953 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
954 isn't forced-or-set local.
956 2017-03-27 Pip Cet <pipcet@gmail.com>
958 * wasm-module.c: New file to support WebAssembly modules.
959 * wasm-module.h: New file to support WebAssembly modules.
960 * doc/webassembly.texi: Start documenting wasm-module.c.
961 * config.bfd: Add wasm_vec.
962 * targets.c: Likewise.
963 * configure.ac: Likewise.
964 * Makefile.am: Add entries for wasm-module.c.
965 * Makefile.in: Regenerate.
966 * configure: Regenerate.
967 * po/SRC-POTFILES.in: Regenerate.
969 2017-03-27 Pip Cet <pipcet@gmail.com>
971 * cpu-wasm32.c: New file to support wasm32 architecture.
972 * elf32-wasm32.c: New file to support wasm32 architecture.
973 * Makefile.am: Add wasm32 architecture.
974 * archures.c: Likewise.
975 * config.bfd: Likewise.
976 * configure.ac: Likewise.
977 * targets.c: Likewise.
978 * Makefile.in: Regenerate.
979 * bfd-in2.h: Regenerate.
980 * configure: Regenerate.
981 * po/SRC-POTFILES.in: Regenerate.
983 2017-03-20 Alan Modra <amodra@gmail.com>
986 * elf64-ppc.c (compare_symbols): Stabilize sort.
988 2017-03-18 Alan Modra <amodra@gmail.com>
990 * elf64-ppc.c (struct ppc_link_hash_table): Add
991 local_ifunc_resolver and maybe_local_ifunc_resolver.
992 (ppc_build_one_stub): Set flags on emitting dynamic
994 (ppc64_elf_relocate_section): Likewise.
995 (ppc64_elf_finish_dynamic_symbol): Likewise.
996 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
997 local dynamic relocs to ifuncs.
998 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
999 local_ifunc_resolver and maybe_local_ifunc_resolver.
1000 (ppc_elf_relocate_section): Set flag on emitting dynamic
1001 relocation to ifuncs.
1002 (ppc_elf_finish_dynamic_symbol): Likewise.
1003 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
1004 dynamic relocs to ifuncs.
1006 2017-03-13 Nick Clifton <nickc@redhat.com>
1009 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
1010 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
1011 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
1012 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
1013 * bfd-in2.h: Regenerate.
1014 * libbfd.h: Regenerate.
1015 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
1017 (IS_AARCH64_TLSDESC_RELOC): Likewise.
1018 (elfNN_aarch64_howto_table): Likewise.
1019 (aarch64_tls_transition_without_check): Likewise.
1020 (aarch64_reloc_got_type): Likewise.
1021 (elfNN_aarch64_final_link_relocate): Likewise.
1022 (elfNN_aarch64_tls_relax): Likewise.
1023 (elfNN_aarch64_relocate_section): Likewise.
1024 (elfNN_aarch64_gc_sweep_hook): Likewise.
1025 (elfNN_aarch64_check_relocs): Likewise.
1026 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
1027 (_bfd_aarch64_elf_resolve_relocation): Likewise.
1029 2017-03-11 Alan Modra <amodra@gmail.com>
1031 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
1032 parameter is in fact used. Whitespace fixes.
1033 * elf64-ppc.c: Likewise.
1035 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
1037 * rs6000-core.c (CORE_NEW): Simplify macro when
1038 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
1040 2017-03-07 Alan Modra <amodra@gmail.com>
1044 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
1047 2017-03-05 Alan Modra <amodra@gmail.com>
1049 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
1050 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
1051 (next_cie_fde_offset): New function.
1052 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
1053 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
1054 four bytes. Align CIEs to four or eight bytes depending on
1055 per_encoding_aligned8. Align FDEs according to their encoding.
1056 Pad last FDE to output section alignment.
1057 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
1059 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
1060 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
1061 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
1063 2017-03-02 Martin Bickel <binutils@ineranves.de>
1066 * elf.c (rewrite_elf_program_header): Do not issue a warning for
1067 empty segments which have a zero filesz, but a non-zero memsz.
1069 2017-03-02 Alan Modra <amodra@gmail.com>
1071 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
1073 2017-02-28 Alan Modra <amodra@gmail.com>
1075 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
1076 (ppc64_elf_relocate_section): Likewise.
1078 2017-02-28 Alan Modra <amodra@gmail.com>
1081 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
1082 rather than elf32_nios2_hash_table or elf_hash_table.
1083 (create_got_section): Likewise.
1084 (nios2_elf32_finish_dynamic_symbol): Likewise.
1085 (nios2_elf32_adjust_dynamic_symbol): Likewise.
1086 (nios2_elf32_size_dynamic_sections): Likewise.
1087 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
1088 vars. Use htab equivalents directly instead. Don't create
1089 all dynamic sections on needing just the GOT. Use a goto
1090 rather than a fall-through with reloc test. Ensure
1091 htab->dynobj is set when making dynamic sreloc section.
1092 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
1093 equivalent directly instead. Don't segfault on looking for
1094 .dynamic when dynamic sections have not been created. Don't
1095 segfault on .got.plt being discarded.
1096 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
1097 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
1098 fixme and another not so relevant comment.
1099 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
1100 already set, set hash table dynobj on creating .sbss.
1102 2017-02-28 Alan Modra <amodra@gmail.com>
1104 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
1105 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
1106 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
1107 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
1108 (ppc64_elf_relocate_section): Likewise.
1109 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
1110 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
1111 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
1112 * libbfd.h: Regenerate.
1113 * bfd-in2.h: Regenerate.
1115 2017-02-28 Alan Modra <amodra@gmail.com>
1117 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
1118 dynamic .data.rel.ro read-only.
1119 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
1120 rather than section flags when deciding where copy reloc goes.
1121 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
1122 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
1123 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
1124 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
1125 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
1126 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
1127 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
1128 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
1129 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
1130 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
1131 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
1132 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
1133 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
1134 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
1135 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
1136 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
1137 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
1138 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
1139 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
1141 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
1143 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
1144 `jalr $0, $25' instruction encoding.
1146 2017-02-27 Nick Clifton <nickc@redhat.com>
1149 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
1150 generating a seg-fault when encountering a symbol that has been
1151 deleted by garbage collection.
1153 2017-02-25 Alan Modra <amodra@gmail.com>
1155 * elf32-arc.c (struct dynamic_sections): Delete.
1156 (enum dyn_section_types): Delete.
1157 (dyn_section_names): Delete.
1158 (arc_create_dynamic_sections): Delete.
1159 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
1160 segfault on discarded .rela.plt section.
1161 (elf_arc_size_dynamic_sections): Formatting. Don't call
1162 arc_create_dynamic_sections. Don't allocate memory for sections
1163 handled by the generic linker. Correct code finding relocs in
1164 read-only sections. Set SEC_EXCLUDE on zero size .got,
1165 .got.plt, and .dynbss sections. Do set .interp for pies.
1167 2017-02-24 Andrew Waterman <andrew@sifive.com>
1169 * elfnn-riscv.c (GP_NAME): New macro.
1170 (riscv_global_pointer_value): Use it.
1171 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
1172 output section, consider only that section's alignment.
1174 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
1176 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
1177 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
1178 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
1179 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
1181 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
1183 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
1184 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
1187 2017-02-23 Alan Modra <amodra@gmail.com>
1190 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
1192 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
1193 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
1196 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
1199 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
1200 processing ahead of the call to `elf_gc_sweep_symbol'.
1202 2017-02-22 Nick Clifton <nickc@redhat.com>
1205 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
1206 created section 4-byte alignment.
1208 2017-02-22 Alan Modra <amodra@gmail.com>
1210 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
1211 on .got or .plt output section being discarded by script.
1212 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
1215 2017-02-21 Alan Modra <amodra@gmail.com>
1217 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
1218 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
1220 2017-02-20 Alan Modra <amodra@gmail.com>
1223 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
1224 if DT_RELSZ/DT_RELASZ is zero.
1226 2017-02-17 Nick Clifton <nickc@redhat.com>
1228 * compress.c (bfd_get_full_section_contents): Remember to reduce
1229 compressed size by the sizeof the compression header when
1230 decompressing the contents.
1232 2017-02-17 Pedro Alves <palves@redhat.com>
1234 * srec.c (Chunk): Rename to ...
1235 (_bfd_srec_len): ... this.
1236 (S3Forced): Rename to ...
1237 (_bfd_srec_forceS3): ... this.
1238 * objcopy.c: Adjust all references.
1240 2017-02-17 Pedro Alves <palves@redhat.com>
1242 * archive.c (bsd_write_armap): Rename to ...
1243 (_bfd_bsd_write_armap): ... this.
1244 (coff_write_armap): Rename to ...
1245 (_bfd_coff_write_armap): ... this.
1246 * libbfd-in.h (bsd_write_armap): Rename to ...
1247 (_bfd_bsd_write_armap): ... this.
1248 (coff_write_armap): Rename to ...
1249 (_bfd_coff_write_armap): ... this.
1250 * aout-target.h, aout-tic30.c: Adjust all users.
1251 * libbfd.h: Regenerate.
1253 2017-02-17 Pedro Alves <palves@redhat.com>
1255 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
1256 (warn_deprecated): Rename to ...
1257 (_bfd_warn_deprecated): ... this.
1258 * libbfd.c (warn_deprecated): Rename to ...
1259 (_bfd_warn_deprecated): ... this.
1260 * bfd-in2.h: Regenerate.
1262 2017-02-17 Pedro Alves <palves@redhat.com>
1264 * bfdio.c (real_ftell): Rename to ...
1265 (_bfd_real_ftell): ... this.
1266 (real_fseek): Rename to ...
1267 (_bfd_real_fseek): ... this.
1268 (real_fopen): Rename to ...
1269 (_bfd_real_fopen): ... this.
1270 * libbfd-in.h (real_ftell): Rename to ...
1271 (_bfd_real_ftell): ... this.
1272 (real_fseek): Rename to ...
1273 (_bfd_real_fseek): ... this.
1274 (real_fopen): Rename to ...
1275 (_bfd_real_fopen): ... this.
1276 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
1277 * libbfd.h: Regenerate.
1279 2017-02-17 Pedro Alves <palves@redhat.com>
1281 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
1282 * libbfd.c (read_unsigned_leb128): Rename to ...
1283 (_bfd_read_unsigned_leb128): ... this.
1284 (read_signed_leb128): Rename to ...
1285 (_bfd_read_signed_leb128): ... this.
1286 (safe_read_leb128): Rename to ...
1287 (_bfd_safe_read_leb128): ... this.
1288 * libbfd-in.h (read_unsigned_leb128): Rename to ...
1289 (_bfd_read_unsigned_leb128): ... this.
1290 (read_signed_leb128): Rename to ...
1291 (_bfd_read_signed_leb128): ... this.
1292 (safe_read_leb128): Rename to ...
1293 (_bfd_safe_read_leb128): ... this.
1294 * libbfd.h: Renegerate.
1296 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
1298 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
1299 before trying to fine matching file and line information.
1301 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
1303 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
1304 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
1305 not match current bfd, then reload debug information. Record bfd
1306 we're loading debug info for in the stash. If we have debug
1307 informatin in the cache then perform section placement before
1310 2017-02-16 Alan Modra <amodra@gmail.com>
1313 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
1314 * elfxx-target.h (elf_backend_no_page_alias): Define.
1315 (elfNN_bed): Init new field.
1316 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
1317 ensure PT_LOAD segment starts on a new page.
1318 * elf32-hppa.c (elf_backend_no_page_alias): Define.
1320 2017-02-16 Alan Modra <amodra@gmail.com>
1323 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
1326 2017-02-16 Jiong Wang <jiong.wang@arm.com>
1328 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
1329 * bfd-in2.h: Regenerated.
1331 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
1334 * elf32-i386.c (elf_i386_relocate_section): Allow
1335 "lea foo@GOT, %reg" in PIC.
1337 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
1340 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
1341 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
1342 error against local IFUNC symbol without a base register for
1345 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
1347 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
1348 `%P: %H:' with `info->callbacks->einfo'.
1349 (ppc_elf_relocate_section): Likewise.
1350 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
1351 (ppc64_elf_edit_toc): Likewise.
1352 (ppc64_elf_relocate_section): Likewise.
1354 2017-02-14 Alan Modra <amodra@gmail.com>
1356 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
1357 --gc-keep-exported, and test versioned field of sym rather than
1358 looking for @ in name.
1360 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
1362 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
1365 2017-02-13 Nick Clifton <nickc@redhat.com>
1368 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
1371 2017-02-07 Andrew Waterman <andrew@sifive.com>
1373 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
1374 entry size if PLT header is written.
1376 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
1378 Fix sparc64 dynamic relocation processing to use the dynamic
1380 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
1381 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
1384 2017-02-03 Nick Clifton <nickc@redhat.com>
1387 * coffcode.h (coff_write_object_contents): Enlarge size of
1388 s_name_buf in order to avoid compile time warning about possible
1390 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
1391 32-bits of insn value before printing into buffer.
1393 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1395 * elfxx-mips.c (mips_elf_hash_sort_data): Add
1396 `max_local_dynindx'.
1397 (mips_elf_sort_hash_table): Handle it.
1398 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
1399 symbols bump up `max_local_dynindx' rather than
1400 `max_non_got_dynindx'.
1402 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1404 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
1405 `min_got_dynindx', `max_unref_got_dynindx' and
1406 `max_non_got_dynindx' members to the `bfd_size_type' data type.
1407 (mips_elf_sort_hash_table): Adjust accordingly.
1409 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1411 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
1412 to access the hash table.
1414 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1416 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
1417 non-NULL `htab' to the beginning.
1419 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1421 * elflink.c (elf_gc_sweep): Wrap overlong line.
1423 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
1425 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
1426 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
1427 * elfxx-mips.c (mips_elf_link_hash_table): Add
1428 `ignore_branch_isa' member.
1429 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
1430 in branch relocation calculation as an error if
1431 `ignore_branch_isa' has been set.
1432 (_bfd_mips_elf_insn32): Rename to...
1433 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
1434 parameter to `insn32' and add an `ignore_branch_isa' parameter.
1435 Handle the new parameter.
1437 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
1439 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
1440 local variable dynobj.
1443 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
1444 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
1445 executable from read-only sections into sdynrelro.
1446 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
1447 dynamic relocs in sdynrelro.
1448 (elf_backend_want_dynrelro): Define.
1450 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
1452 * config.bfd (*-*-rtemsaout*): Mark as removed.
1454 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
1456 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
1457 (arm-*-rtems*): Move to (arm*-*-eabi*).
1458 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
1459 (m68-*-rtems*): Move to (m68*-*-elf*).
1461 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
1463 * config.bfd (*-*-rtemscoff*): Mark as removed.
1465 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
1468 * elflink.c (bfd_elf_record_link_assignment): Revert last
1469 change and don't ever clear `forced_local'. Set `mark'
1471 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
1473 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
1474 (bfd_elf_size_dynamic_sections): ... here.
1475 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
1476 and set `mark' instead in `__tls_get_addr_opt' processing.
1477 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
1479 2017-01-24 Alan Modra <amodra@gmail.com>
1481 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
1482 where dynamic relocs are preferable. Allow ifunc too.
1483 (ensure_undefweak_dynamic): New function.
1484 (allocate_dynrelocs): Use it here. Move plt handling last and
1485 don't make symbols dynamic, simplifying loop. Only make undef
1486 weak symbols with GOT entries dynamic. Correct condition
1487 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
1488 comments. Remove goto.
1489 (ppc_elf_relocate_section): Correct test for using dynamic
1490 symbol on GOT relocs. Rearrange test for emitting GOT relocs
1491 to suit. Set up explicit tls_index entries and implicit GOT
1492 tls_index entries resolvable at link time for
1493 __tls_get_addr_opt. Simplify test to clear mem for prelink.
1494 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
1495 (ensure_undefweak_dynamic): New function.
1496 (allocate_dynrelocs): Use it here. Only make undef weak symbols
1497 with GOT entries dynamic. Remove unnecessary test of
1498 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
1499 (ppc64_elf_relocate_section): Correct test for using dynamic
1500 symbol on GOT relocs. Rearrange test for emitting GOT relocs
1501 to suit. Set up explicit tls_index entries and implicit GOT
1502 tls_index entries resolvable at link time for __tls_get_addr_opt.
1503 Simplify expression to clear mem for prelink.
1505 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
1507 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
1509 2017-01-20 Jiong Wang <jiong.wang@arm.com>
1511 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
1512 (elf_backend_hash_symbol): Define.
1514 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
1517 * elflink.c (bfd_elf_record_link_assignment): Clear any
1518 `forced_local' marking for DSO symbols that are not being
1521 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
1523 * elfnn-riscv.c (riscv_elf_object_p): New function.
1525 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
1528 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
1530 (elf_x86_64_check_relocs): Create .eh_frame section for the
1532 (elf_x86_64_size_dynamic_sections): Allocate and initialize
1533 .eh_frame section for the .plt.bnd section.
1534 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
1535 for the .plt.bnd section.
1537 2017-01-12 Nick Clifton <nickc@redhat.com>
1540 * opncls.c (find_separate_debug_file): Add include_dirs
1541 parameter. Only include the directory part of the bfd's filename
1542 in search paths if include_dirs is true. Add a couple of extra
1543 locations for looking for debug files.
1544 ( bfd_follow_gnu_debuglink): Update invocation of
1545 find_separate_debug_file.
1546 (bfd_follow_gnu_debugaltlink): Likewise.
1547 (get_build_id): New function: Finds the build-id of the given bfd.
1548 (get_build_id_name): New function: Computes the name of the
1549 separate debug info file for a bfd, based upon its build-id.
1550 (check_build_id_file): New function: Checks to see if a separate
1551 debug info file exists at the given location, and that its
1552 build-id matches that of the original bfd.
1553 (bfd_follow_build_id_debuglink): New function: Finds a separate
1554 debug info file for a given bfd by using the build-id method.
1555 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
1556 method of locating a separate debug info file before using the
1558 * bfd-in2.h: Regenerate.
1560 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
1563 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
1564 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
1565 elf_x86_64_eh_frame_plt_got.
1566 (elf_x86_64_size_dynamic_sections): Get unwind info from
1567 elf_x86_64_bnd_arch_bed for the BND PLT.
1569 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
1571 * config.bfd: Add entries for i686-redox and x86_64-redox.
1573 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
1575 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
1577 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
1578 .eh_frame section to 4 bytes for x32.
1579 (elf_x86_64_check_relocs): Likewise.
1581 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
1584 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
1585 (PLT_GOT_FDE_LENGTH): Likewise.
1586 (elf_i386_plt_layout): Add eh_frame_plt_got and
1587 eh_frame_plt_got_size.
1588 (elf_i386_plt): Updated.
1589 (elf_i386_link_hash_table): Add plt_got_eh_frame.
1590 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
1591 (elf_i386_size_dynamic_sections): Allocate and initialize
1592 .eh_frame section for .plt.got.
1593 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
1595 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
1596 eh_frame_plt_got_size.
1597 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
1598 (PLT_GOT_FDE_LENGTH): Likewise.
1599 (elf_x86_64_backend_data): Add eh_frame_plt_got and
1600 eh_frame_plt_got_size.
1601 (elf_x86_64_arch_bed): Updated.
1602 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
1603 eh_frame_plt_got_size.
1604 (elf_x86_64_nacl_arch_bed): Likewise.
1605 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
1606 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
1607 (elf_x86_64_size_dynamic_sections): Allocate and initialize
1608 .eh_frame section for .plt.got.
1609 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
1612 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
1614 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
1615 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
1617 2017-01-09 Nick Clifton <nickc@redhat.com>
1619 * dwarf2.c (lookup_address_in_function_table): Return early if
1620 there are no functions in the given comp unit, or if the high
1621 address of the last function in the comp unit is less than the
1624 2017-01-09 Nick Clifton <nickc@redhat.com>
1627 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
1628 message if there are too many symbols to load.
1630 2017-01-04 James Clarke <jrtc27@jrtc27.com>
1632 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
1633 if relocs are cached.
1635 2017-01-03 Rich Felker <bugdal@aerifal.cx>
1638 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
1639 for R_MICROBLAZE_GOTOFF_64.
1641 2017-01-03 Nick Clifton <nickc@redhat.com>
1643 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
1644 warning about using a possibly uninitialised variable.
1646 2017-01-02 Alan Modra <amodra@gmail.com>
1648 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
1649 (allocate_plt_static, allocate_dynrelocs): Use it.
1651 2017-01-02 Alan Modra <amodra@gmail.com>
1653 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
1654 .PARISC.unwind section.
1656 2017-01-02 Alan Modra <amodra@gmail.com>
1659 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
1660 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
1661 indirect to GOT pointer relative code edit.
1663 2017-01-02 Alan Modra <amodra@gmail.com>
1665 Update year range in copyright notice of all files.
1667 For older changes see ChangeLog-2016
1669 Copyright (C) 2017 Free Software Foundation, Inc.
1671 Copying and distribution of this file, with or without modification,
1672 are permitted in any medium without royalty provided the copyright
1673 notice and this notice are preserved.
1679 version-control: never