1 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
3 * elfxx-x86.h: Update comments.
5 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
7 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Replace
8 elf_x86_plt_layout_table with elf_x86_init_table.
9 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
11 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties):
13 * elfxx-x86.h (elf_x86_plt_layout_table): Renamed to ...
14 (elf_x86_init_table): This.
15 (_bfd_x86_elf_link_setup_gnu_properties): Replace
16 elf_x86_plt_layout_table with elf_x86_init_table.
18 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
20 * configure.ac (bfd_backends): Don't add elf64-x86-64.lo nor
21 elf64.lo together with elfxx-x86.lo for 64-bit BFD.
22 * configure: Regenerated.
23 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set r_info
24 and r_sym fields of plt_layout.
25 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
27 * elfxx-x86.c (elf_x86_64_is_reloc_section): Remove BFD64 check.
28 (_bfd_x86_elf_link_hash_table_create): Likewise. Don't set
29 r_info nor r_sym fields.
30 (_bfd_x86_elf_link_setup_gnu_properties): Set r_info and r_sym
32 * elfxx-x86.h (elf_x86_plt_layout_table): Add r_info and r_sym.
34 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
36 * (_bfd_riscv_relax_align): Call bfd_set_error and
37 print an error message when unable to relax a .align directive.
39 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
41 * elfnn-riscv.c (riscv_zero_pcrel_hi_reloc): New function.
42 (riscv_record_pcrel_hi_reloc): Add absolute argument.
43 (riscv_elf_relocate_section): Call riscv_zero_pcrel_hi_reloc for
44 R_RISCV_PCREL_HI20 relocs, and pass the result to
45 riscv_record_pcrel_hi_reloc.
47 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
49 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument,
50 r_type_p. Remove the converted argument. Replace
51 SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P. Return
52 the new relocation type via r_type_p.
53 (elf_i386_relocate_section): Likewise.
54 (elf_i386_finish_dynamic_symbol): Likewise.
55 (need_convert_load): Removed.
56 (check_relocs_failed): Updated.
57 (elf_i386_check_relocs): Call elf_i386_convert_load_reloc,
58 instead of setting need_convert_load.
59 (_bfd_i386_elf_convert_load): Removed.
60 * elf64-x86-64.c (need_convert_load): Removed.
61 (check_relocs_failed): Updated.
62 (elf_x86_64_convert_load_reloc): Add an argument, r_type_p.
63 Replace SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P.
64 Return the new relocation type via r_type_p.
65 (elf_x86_64_check_relocs): Call elf_x86_64_convert_load_reloc,
66 instead of setting need_convert_load.
67 (elf_x86_64_check_relocs): Don't check PIC if relocation has
69 (_bfd_x86_64_elf_convert_load): Removed.
70 (elf_x86_64_relocate_section): Replace SYMBOL_REFERENCES_LOCAL
71 with SYMBOL_REFERENCES_LOCAL_P.
72 (elf_x86_64_finish_dynamic_symbol): Likewise.
73 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Don't
75 (_bfd_x86_elf_size_dynamic_sections): Don't call convert_load.
76 (_bfd_x86_elf_link_symbol_references_local): New function.
77 * elfxx-x86.h (SYMBOL_REFERENCES_LOCAL_P): New.
78 (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace elf.forced_local with
79 SYMBOL_REFERENCES_LOCAL_P.
80 (elf_x86_link_hash_entry): Add local_ref.
81 (elf_x86_link_hash_table): Remove convert_load.
82 (_bfd_i386_elf_convert_load): Removed.
83 (_bfd_x86_64_elf_convert_load): Likewise.
84 (_bfd_x86_elf_link_symbol_references_local): New.
86 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
88 * elf64-x86-64.c (R_X86_64_converted_reloc_bit): New.
89 (elf_x86_64_info_to_howto): Get the real relocation type by
90 masking out R_X86_64_converted_reloc_bit.
91 (elf_x86_64_check_tls_transition): Get the real relocation type
92 by masking out R_X86_64_converted_reloc_bit.
93 (elf_x86_64_convert_load_reloc): Set R_X86_64_converted_reloc_bit
94 instead of setting converted_reloc.
95 (elf_x86_64_relocate_section): Check R_X86_64_converted_reloc_bit
96 instead of converted_reloc. Get the real relocation type by
97 masking out R_X86_64_converted_reloc_bit.
98 (elf_x86_64_link_setup_gnu_properties): Verify that the value of
99 R_X86_64_converted_reloc_bit is valid.
100 * elfxx-x86.h (converted_reloc): Removed.
102 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
104 * elf32-i386.c (elf_i386_relocate_section): Don't change r_type
105 when calling elf_i386_tls_transition. Don't use ELF32_R_TYPE
106 to get the relocation type again.
107 * elf64-x86-64.c (elf_x86_64_relocate_section): Don't change
108 r_type when calling elf_x86_64_tls_transition. Don't use
109 ELF32_R_TYPE to get the relocation type again.
111 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
113 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Properly set
116 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
118 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Remove the sec
119 argument. Don't check relocation overflow. Avoid relocation
120 overflow if --no-relax is used. Set converted_reloc on symbol
121 if a GOTPCREL relocation is converted.
122 (elf_x86_64_relocate_section): Issue a fatal error and suggest
123 --no-relax if GOTPCREL relocation conversion leads to relocation
125 * elfxx-x86.h (elf_x86_link_hash_entry): Add converted_reloc.
127 2017-09-05 Alexander Fedotov <alexander.fedotov@nxp.com>
128 Edmar Wienskoski <edmar.wienskoski@nxp.com
130 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_VLE_ADDR20.
131 (ppc_elf_check_relocs): Handle it.
132 (ppc_elf_vle_split20): New function.
133 (ppc_elf_relocate_section): Handle R_PPC_VLE_ADDR20.
135 2017-09-03 H.J. Lu <hongjiu.lu@intel.com>
138 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Set tlsdesc_plt
139 for x86-64 if GOT_TLS_GDESC_P is true.
141 2017-09-03 Alan Modra <amodra@gmail.com>
144 * elfxx-x86.h (elf_x86_hash_table): Check is_elf_hash_table first.
146 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
148 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
149 tls_get_addr for x86-64 in one place.
151 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
153 * configure.ac (bfd_backends): Add elf64-x86-64.lo together
154 with elfxx-x86.lo for 64-bit BFD.
155 * configure: Regenerated.
157 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
159 * elf32-i386.c (elf_i386_convert_load): Renamed to ...
160 (_bfd_i386_elf_convert_load): This. Remove static.
161 (elf_i386_size_dynamic_sections): Removed.
162 (elf_backend_size_dynamic_sections): Likewise.
163 * elf64-x86-64.c (elf_x86_64_convert_load): Renamed to ...
164 (_bfd_x86_64_elf_convert_load): This. Remove static.
165 (elf_x86_64_size_dynamic_sections): Removed.
166 (elf_backend_size_dynamic_sections): Likewise.
167 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): Renamed to ...
168 (elf_x86_allocate_dynrelocs): This. Make it static.
169 (_bfd_x86_elf_allocate_local_dynrelocs): Renamed to ...
170 (elf_x86_allocate_local_dynreloc): This. Make it static.
171 (elf_i386_is_reloc_section): New function.
172 (elf_x86_64_is_reloc_section): Likewise.
173 (_bfd_x86_elf_link_hash_table_create): Initialize convert_load,
174 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
175 Rearrange got_entry_size initialization.
176 (_bfd_x86_elf_size_dynamic_sections): New function.
177 * elfxx-x86.h (elf_x86_link_hash_table): Add convert_load,
178 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
179 (_bfd_i386_elf_convert_load): New.
180 (_bfd_x86_64_elf_convert_load): Likewise.
181 (_bfd_x86_elf_size_dynamic_sections): Likewise.
182 (elf_backend_size_dynamic_sections): Likewise.
183 (_bfd_x86_elf_allocate_dynrelocs): Removed.
184 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
186 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
188 * elfxx-x86.h (elf_x86_link_hash_table): Rearrange fields and
191 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
193 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
194 sgotplt_jump_table_size with elf_x86_compute_jump_table_size.
196 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
198 * elf32-i386.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
199 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Moved to ...
200 * elfxx-x86.h (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
201 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Here.
202 * elf64-x86-64.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
203 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Removed.
205 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
207 * elf32-i386.c (elf_i386_allocate_dynrelocs): Removed.
208 (elf_i386_allocate_local_dynrelocs): Likewise.
209 (elf_i386_size_dynamic_sections): Replace
210 elf_i386_allocate_dynrelocs/elf_i386_allocate_local_dynrelocs
211 with _bfd_x86_elf_allocate_dynrelocs and
212 _bfd_x86_elf_allocate_local_dynrelocs.
213 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Removed.
214 (elf_x86_64_allocate_local_dynrelocs): Likewise.
215 (elf_x86_64_size_dynamic_sections): Replace
216 elf_x86_64_allocate_dynrelocs/elf_x86_64_allocate_local_dynrelocs
217 with _bfd_x86_elf_allocate_dynrelocs and
218 _bfd_x86_elf_allocate_local_dynrelocs.
219 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): New function.
220 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
221 * elfxx-x86.h (_bfd_x86_elf_allocate_dynrelocs): New prototype.
222 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
224 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
226 * elf32-i386.c (is_i386_elf): Removed.
227 (elf_i386_check_relocs): Replace is_i386_elf with is_x86_elf.
228 (elf_i386_size_dynamic_sections): Likewise.
229 (elf_i386_relocate_section): Likewise.
230 * elf64-x86-64.c (is_x86_64_elf): Removed.
231 (elf_x86_64_check_relocs): Replace is_x86_64_elf with
233 (elf_x86_64_size_dynamic_sections): Likewise.
234 (elf_x86_64_relocate_section): Likewise.
235 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
237 * elfxx-x86.h (elf_x86_link_hash_table): Add target_id.
240 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
242 * elf32-i386.c (elf_i386_compute_jump_table_size): Removed.
243 (elf_i386_allocate_dynrelocs): Replace
244 elf_i386_compute_jump_table_size with
245 elf_x86_compute_jump_table_size.
246 (elf_i386_size_dynamic_sections): Likewise.
247 * elf64-x86-64.c (elf_x86_64_compute_jump_table_size): Removed.
248 (elf_x86_64_allocate_dynrelocs): Replace
249 elf_x86_64_compute_jump_table_size with
250 elf_x86_compute_jump_table_size.
251 (elf_x86_64_size_dynamic_sections): Likewise.
252 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
254 * elfxx-x86.h (elf_x86_link_hash_table): Add got_entry_size.
255 (elf_x86_compute_jump_table_size): New.
257 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
259 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
261 (_bfd_x86_elf_adjust_dynamic_symbol): Use sizeof_reloc.
262 * elfxx-x86.h (elf_x86_link_hash_table): Add sizeof_reloc.
264 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
266 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check VxWorks
267 with htab->is_vxworks.
268 (elf_i386_size_dynamic_sections): Likewise.
269 (elf_i386_relocate_section): Likewise.
270 (elf_i386_finish_dynamic_symbol): Likewise.
271 (elf_i386_finish_dynamic_sections): Likewise.
273 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
275 * elf32-i386.c (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
276 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
277 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Moved to ...
278 * elfxx-x86.h (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
279 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
280 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Here.
281 * elf64-x86-64.c (GOT_TLS_IE, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
282 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Removed.
284 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
287 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Check
288 ELF_COMMON_DEF_P for common symbols.
290 2017-09-02 Alan Modra <amodra@gmail.com>
292 * elf-eh-frame.c (offset_adjust): Avoid false positive gcc warning.
293 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Likewise.
294 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
296 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
298 * elf32-i386.c (elf_i386_gc_mark_hook): Removed.
299 (elf_backend_gc_mark_hook): Likewise.
300 * elf64-x86-64.c (elf_x86_64_gc_mark_hook): Likewise.
301 (elf_backend_gc_mark_hook): Likewise.
302 * elfxx-x86.c (_bfd_x86_elf_gc_mark_hook): New function.
303 * elfxx-x86.h (_bfd_x86_elf_gc_mark_hook): New.
304 (elf_backend_gc_mark_hook): Likewise.
306 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
308 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Removed.
309 (elf_backend_adjust_dynamic_symbol): Likewise.
310 * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.
311 (elf_backend_adjust_dynamic_symbol): Likewise.
312 * elfxx-x86.c (_bfd_x86_elf_adjust_dynamic_symbol): New function.
313 (_bfd_x86_elf_link_setup_gnu_properties): Copy is_vxworks.
314 * elfxx-x86.h (elf_x86_link_hash_table): Add is_vxworks.
315 (_bfd_x86_elf_adjust_dynamic_symbol): New.
316 (elf_backend_adjust_dynamic_symbol): Likewise.
318 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
320 * elfxx-x86.h (elf_x86_plt_layout_table): Fix a typo in
323 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
325 * elf32-i386.c (elf_i386_mkobject): Removed.
326 (bfd_elf32_mkobject): Likewise.
327 * elf64-x86-64.c (elf_x86_64_mkobject): Likewise.
328 (bfd_elf64_mkobject): Likewise.
329 (bfd_elf32_mkobject): Likewise.
330 * elfxx-x86.c (_bfd_x86_elf_mkobject): New function.
331 * elfxx-x86.h (_bfd_x86_elf_mkobject): New.
332 (bfd_elf64_mkobject): Likewise.
333 (bfd_elf32_mkobject): Likewise.
335 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
337 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Updated.
338 Call _bfd_x86_elf_link_setup_gnu_properties.
339 * elf64-x86-64.c (elf_x86_lazy_plt_layout): Initialize
340 pic_plt0_entry and pic_plt_entry fields with the non-PIC PLT
342 (elf_x86_64_non_lazy_plt): Likewise.
343 (elf_x86_64_lazy_bnd_plt): Likewise.
344 (elf_x86_64_non_lazy_bnd_plt): Likewise.
345 (elf_x86_64_lazy_ibt_plt): Likewise.
346 (elf_x32_lazy_ibt_plt): Likewise.
347 (elf_x86_64_non_lazy_ibt_plt): Likewise.
348 (elf_x32_non_lazy_ibt_plt): Likewise.
349 (elf_x86_64_nacl_plt): Likewise.
350 (elf_x86_64_link_setup_gnu_properties): Updated. Call
351 _bfd_x86_elf_link_setup_gnu_properties.
352 * elfxx-x86.c: Include elf-vxworks.h".
353 (_bfd_x86_elf_link_setup_gnu_properties): New function.
354 * elfxx-x86.h (elf_x86_lazy_plt_layout): Remove "for i386 only"
355 comments for pic_plt0_entry and pic_plt_entry.
356 (elf_x86_non_lazy_plt_layout): Likewise.
357 (elf_x86_plt_layout_table): New.
358 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
360 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
363 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Create
364 .eh_frame section for the second PLT.
365 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Correct
366 alignment of .eh_frame section for the second PLT.
368 2017-09-01 Nick Clifton <nickc@redhat.com>
371 * dwarf2.c (decode_line_info): Fix test for an overlong line info
374 2017-09-01 Nick Clifton <nickc@redhat.com>
377 * elf-attrs.c (_bfd_elf_parse_attributes): Ensure that the
378 attribute buffer is NUL terminated.
380 2017-08-31 Nick Clifton <nickc@redhat.com>
383 * dwarf2.c (read_section): If necessary add a terminating NUL byte
384 to dwarf string sections.
386 2017-08-31 Alan Modra <amodra@gmail.com>
388 * po/SRC-POTFILES.in: Regenerate.
390 2017-08-31 Alan Modra <amodra@gmail.com>
392 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Don't exit early
393 for a section containing just a terminator. Allow multiple
394 terminators at end of section.
395 * elflink.c (bfd_elf_discard_info): Iterate over .eh_frame
396 sections when not adding alignment. Assert on terminator in
399 2017-08-31 Alan Modra <amodra@gmail.com>
403 * elflink.c (bfd_elf_discard_info): Don't pad embedded zero
406 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
408 * configure.ac (bfd_backends): Add elf64.lo together with
409 elfxx-x86.lo for 64-bit BFD.
410 * configure: Regenerated.
412 2017-08-31 James Bowman <james.bowman@ftdichip.com>
414 * elf32-ft32.c (ft32_elf_howto_table): Use complain_overflow_dont
417 2017-08-31 Alan Modra <amodra@gmail.com>
420 * opncls.c (bfd_close_all_done): Don't call bfd_cache_close
421 before _close_and_cleanup. Call iovec->bclose after.
422 (bfd_close): Remove code common to, and call, bfd_close_all_done.
424 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
426 * elf32-i386.c (elf_i386_plt_type): Removed.
427 (elf_i386_plt): Likewise.
428 (elf_i386_get_synthetic_symtab): Updated. Call
429 _bfd_x86_elf_get_synthetic_symtab.
430 * elf64-x86-64.c (elf_x86_64_plt_type): Removed.
431 (elf_x86_64_plt): Likewise.
432 (elf_x86_64_get_synthetic_symtab): Updated. Call
433 _bfd_x86_elf_get_synthetic_symtab.
434 * elfxx-x86.c (elf_i386_get_plt_got_vma): New function.
435 (elf_x86_64_get_plt_got_vma): Likewise.
436 (elf_i386_valid_plt_reloc_p): Likewise.
437 (elf_x86_64_valid_plt_reloc_p): Likewise.
438 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
439 * elfxx-x86.h (elf_x86_plt_type): New.
440 (elf_x86_plt): Likewise.
441 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
443 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
445 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Check
446 target_id instead of elf_machine_code.
448 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
450 * elf32-i386.c (ELF_DYNAMIC_INTERPRETER): Removed.
451 (elf_i386_lazy_plt_layout): Likewise.
452 (elf_i386_non_lazy_plt_layout): Likewise.
453 (elf_i386_plt_layout): Likewise.
454 (elf_i386_link_hash_table): Likewise.
455 (elf_i386_next_tls_desc_index): Likewise.
456 (elf_i386_srelplt2): Likewise.
457 (elf_i386_plt): Likewise.
458 (elf_i386_lazy_plt): Likewise.
459 (elf_i386_non_lazy_plt): Likewise.
460 (elf_i386_link_hash_table_create): Likewise.
461 (bfd_elf32_bfd_link_hash_table_create): Likewise.
462 (elf_i386_lazy_plt): Updated.
463 (elf_i386_non_lazy_plt): Likewise.
464 (elf_i386_lazy_ibt_plt): Likewise.
465 (elf_i386_non_lazy_ibt_plt): Likewise.
466 (elf_i386_allocate_dynrelocs): Likewise.
467 (elf_i386_size_dynamic_sections): Likewise.
468 (elf_i386_relocate_section): Likewise.
469 (elf_i386_finish_dynamic_symbol): Likewise.
470 (elf_i386_finish_dynamic_sections): Likewise.
471 (elf_i386_get_synthetic_symtab): Likewise.
472 (elf_i386_link_setup_gnu_properties): Likewise.
473 (elf_i386_nacl_plt): Likewise.
474 * elf64-x86-64.c (ABI_64_P): Removed.
475 (ELF64_DYNAMIC_INTERPRETER): Likewise.
476 (ELF32_DYNAMIC_INTERPRETER): Likewise.
477 (elf_x86_64_lazy_plt_layout): Likewise.
478 (elf_x86_64_non_lazy_plt_layout): Likewise.
479 (elf_x86_64_plt_layout): Likewise.
480 (elf_x86_64_link_hash_table): Likewise.
481 (elf_x86_64_plt): Likewise.
482 (elf_x86_64_lazy_plt): Likewise.
483 (elf_x86_64_non_lazy_plt): Likewise.
484 (elf_x86_64_link_hash_table_create): Likewise.
485 (bfd_elf64_bfd_link_hash_table_create): Likewise.
486 (bfd_elf32_bfd_link_hash_table_create): Likewise.
487 (elf_x86_64_lazy_plt): Updated.
488 (elf_x86_64_non_lazy_plt): Likewise.
489 (elf_x86_64_lazy_bnd_plt): Likewise.
490 (elf_x86_64_non_lazy_bnd_plt): Likewise.
491 (elf_x86_64_lazy_ibt_plt): Likewise.
492 (elf_x32_lazy_ibt_plt): Likewise.
493 (elf_x86_64_non_lazy_ibt_plt): Likewise.
494 (elf_x32_non_lazy_ibt_plt): Likewise.
495 (elf_x86_64_allocate_dynrelocs): Likewise.
496 (elf_x86_64_size_dynamic_sections): Likewise.
497 (elf_x86_64_relocate_section): Likewise.
498 (elf_x86_64_finish_dynamic_symbol): Likewise.
499 (elf_x86_64_finish_dynamic_sections): Likewise.
500 (elf_x86_64_get_synthetic_symtab): Likewise.
501 (elf_x86_64_link_setup_gnu_properties): Likewise.
502 (elf_x86_64_nacl_plt): Likewise.
503 * elfxx-x86.c: Include "objalloc.h", "elf/i386.h" and
505 (ELF32_DYNAMIC_INTERPRETER): New.
506 (ELF64_DYNAMIC_INTERPRETER): Likewise.
507 (ELFX32_DYNAMIC_INTERPRETER): Likewise.
508 (_bfd_x86_elf_link_hash_table_create): Likewise.
509 (_bfd_x86_elf_link_hash_table_free): Renamed to ...
510 (elf_x86_link_hash_table_free): This. Make it static.
511 * elfxx-x86.h: Don't include "objalloc.h".
513 (elf_x86_lazy_plt_layout): Likewise.
514 (elf_x86_non_lazy_plt_layout): Likewise.
515 (elf_x86_plt_layout): Likewise.
516 (_bfd_x86_elf_link_hash_table_create): Likewise.
517 (bfd_elf64_bfd_link_hash_table_create): Likewise.
518 (bfd_elf32_bfd_link_hash_table_create): Likewise.
519 (elf_x86_link_hash_table): Add plt, lazy_plt, non_lazy_plt,
520 srelplt2 and next_tls_desc_index.
521 (_bfd_x86_elf_link_hash_table_free): Removed.
523 2017-08-30 Maciej W. Rozycki <macro@imgtec.com>
525 * elfxx-mips.c (mips_elf_perform_relocation): Correct microMIPS
526 branch offset interpretation.
528 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
531 * opncls.c (bfd_close_all_done): Call _close_and_cleanup.
533 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
535 * elf64-x86-64.c (elf_x86_64_next_tls_desc_index): Removed.
536 (elf_x86_64_srelplt2): Likewise.
538 2017-08-30 Alan Modra <amodra@gmail.com>
540 * elf64-ppc.c (struct ppc_link_hash_table): Add do_tls_opt.
541 (ppc64_elf_tls_optimize): Set it.
542 (ppc64_elf_relocate_section): Nop addis on TPREL16_HA, and convert
543 insn on TPREL16_LO and TPREL16_LO_DS relocs to use r13 when
544 addis would add zero.
545 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add do_tls_opt.
546 (ppc_elf_tls_optimize): Set it.
547 (ppc_elf_relocate_section): Nop addis on TPREL16_HA, and convert
548 insn on TPREL16_LO relocs to use r2 when addis would add zero.
550 2017-08-30 Alan Modra <amodra@gmail.com>
552 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing
553 __tls_get_addr call sequences to LE, don't move the addi down
554 to the nop. Replace the bl with addi and leave the nop alone.
556 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
558 * elf32-i386.c (elf_i386_pie_finish_undefweak_symbol):
560 * elf64-x86-64.c (elf_x86_64_finish_local_dynamic_symbol):
562 (elf_x86_64_pie_finish_undefweak_symbol): Likewise.
564 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
566 * Makefile.am (BFD32_BACKENDS): Add elfxx-x86.lo.
567 (BFD64_BACKENDS): Likewise.
568 (BFD32_BACKENDS_CFILES): Add elfxx-x86.c.
569 (BFD64_BACKENDS_CFILES): Likewise.
570 * Makefile.in: Regenerated.
571 * configure.ac (bfd_backends): Add elfxx-x86.lo together with
572 elf32-i386.lo and elf64-x86-64.lo.
573 * configure: Regenerated.
574 * elf32-i386.c: Include "elfxx-x86.h" instead of "sysdep.h",
575 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
576 "objalloc.h" and "hashtab.h".
577 (ELIMINATE_COPY_RELOCS): Removed.
578 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
579 (SYMBOL_NO_COPYRELOC): Likewise.
580 (elf_i386_link_hash_entry): Likewise.
581 (GOT_UNKNOWN): Likewise.
582 (GOT_NORMAL): Likewise.
583 (GOT_TLS_GD): Likewise.
584 (elf_i386_hash_entry): Likewise.
585 (elf_i386_obj_tdata): Likewise.
586 (elf_i386_tdata): Likewise.
587 (elf_i386_local_got_tls_type): Likewise.
588 (elf_i386_local_tlsdesc_gotent): Likewise.
589 (elf_i386_hash_table): Likewise.
590 (elf_i386_link_hash_newfunc): Likewise.
591 (elf_i386_local_htab_hash): Likewise.
592 (elf_i386_local_htab_eq): Likewise.
593 (elf_i386_get_local_sym_hash): Likewise.
594 (elf_i386_link_hash_table_free): Likewise.
595 (elf_i386_copy_indirect_symbol): Likewise.
596 (elf_i386_fixup_symbol): Likewise.
597 (elf_i386_readonly_dynrelocs): Likewise.
598 (elf_i386_always_size_sections): Likewise.
599 (elf_i386_set_tls_module_base): Likewise.
600 (elf_i386_dtpoff_base): Likewise.
601 (compare_relocs): Likewise.
602 (elf_i386_hash_symbol): Likewise.
603 (elf_i386_parse_gnu_properties): Likewise.
604 (elf_i386_merge_gnu_properties): Likewise.
605 (elf_i386_link_check_relocs): Likewise.
606 (elf_i386_merge_symbol_attribute): Likewise.
607 (bfd_elf32_bfd_link_check_relocs): Likewise.
608 (elf_backend_copy_indirect_symbol): Likewise.
609 (elf_backend_always_size_sections): Likewise.
610 (elf_backend_omit_section_dynsym): Likewise.
611 (elf_backend_hash_symbol): Likewise.
612 (elf_backend_fixup_symbol): Likewise.
613 (elf_backend_parse_gnu_properties): Likewise.
614 (elf_backend_merge_gnu_properties): Likewise.
615 (elf_backend_merge_symbol_attribute): Likewise.
616 (elf_i386_mkobject): Updated.
617 (elf_i386_link_hash_table_create): Likewise.
618 (elf_i386_check_tls_transition): Likewise.
619 (elf_i386_tls_transition): Likewise.
620 (elf_i386_convert_load_reloc): Likewise.
621 (elf_i386_check_relocs): Likewise.
622 (elf_i386_adjust_dynamic_symbol): Likewise.
623 (elf_i386_allocate_dynrelocs): Likewise.
624 (elf_i386_convert_load): Likewise.
625 (elf_i386_size_dynamic_sections): Likewise.
626 (elf_i386_relocate_section): Likewise.
627 (elf_i386_finish_dynamic_symbol ): Likewise.
628 (elf_i386_finish_dynamic_sections): Likewise.
629 (elf_i386_output_arch_local_syms): Likewise.
630 (elf_i386_get_synthetic_symtab): Likewise.
631 (elf_i386_link_setup_gnu_properties): Likewise.
632 (elf_i386_link_hash_table): Use elf_x86_link_hash_table, instead
633 of elf_link_hash_table, as base.
634 (elf_i386_next_tls_desc_index): New.
635 (elf_i386_srelplt2): Likewise.
636 (elf_i386_plt): Likewise.
637 (elf_i386_lazy_plt): Likewise.
638 (elf_i386_non_lazy_plt): Likewise.
639 * elf32-x86-64.c: Include "elfxx-x86.h" instead of "sysdep.h",
640 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
641 "objalloc.h" and "hashtab.h".
642 (ELIMINATE_COPY_RELOCS): Removed.
643 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
644 (SYMBOL_NO_COPYRELOC): Likewise.
645 (elf_x86_64_link_hash_entry): Likewise.
646 (GOT_UNKNOWN): Likewise.
647 (GOT_NORMAL): Likewise.
648 (GOT_TLS_GD): Likewise.
649 (elf_x86_64_hash_entry): Likewise.
650 (elf_x86_64_obj_tdata): Likewise.
651 (elf_x86_64_tdata): Likewise.
652 (elf_x86_64_local_got_tls_type): Likewise.
653 (elf_x86_64_local_tlsdesc_gotent): Likewise.
654 (elf_x86_64_hash_table): Likewise.
655 (elf_x86_64_link_hash_newfunc): Likewise.
656 (elf_x86_64_local_htab_hash): Likewise.
657 (elf_x86_64_local_htab_eq): Likewise.
658 (elf_x86_64_get_local_sym_hash): Likewise.
659 (elf_x86_64_link_hash_table_free): Likewise.
660 (elf_x86_64_copy_indirect_symbol): Likewise.
661 (elf_x86_64_fixup_symbol): Likewise.
662 (elf_x86_64_readonly_dynrelocs): Likewise.
663 (elf_x86_64_always_size_sections): Likewise.
664 (elf_x86_64_set_tls_module_base): Likewise.
665 (elf_x86_64_dtpoff_base): Likewise.
666 (compare_relocs): Likewise.
667 (elf_x86_64_merge_symbol_attribute): Likewise.
668 (elf_x86_64_hash_symbol): Likewise.
669 (elf_x86_64_parse_gnu_properties): Likewise.
670 (elf_x86_64_merge_gnu_properties): Likewise.
671 (elf_x86_64_link_check_relocs): Likewise.
672 (elf_backend_copy_indirect_symbol): Likewise.
673 (elf_backend_always_size_sections): Likewise.
674 (bfd_elf64_bfd_link_check_relocs): Likewise.
675 (elf_backend_merge_symbol_attribute): Likewise.
676 (elf_backend_hash_symbol): Likewise.
677 (elf_backend_omit_section_dynsym): Likewise.
678 (elf_backend_fixup_symbol): Likewise.
679 (elf_backend_parse_gnu_properties): Likewise.
680 (elf_backend_merge_gnu_properties): Likewise.
681 (bfd_elf32_bfd_link_check_relocs): Likewise.
682 (elf_x86_64_mkobject): Updated.
683 (elf_x86_64_link_hash_table_create): Likewise.
684 (elf_x86_64_check_tls_transition): Likewise.
685 (elf_x86_64_tls_transition): Likewise.
686 (elf_x86_64_convert_load_reloc): Likewise.
687 (elf_x86_64_check_relocs): Likewise.
688 (elf_x86_64_adjust_dynamic_symbol): Likewise.
689 (elf_x86_64_allocate_dynrelocs): Likewise.
690 (elf_x86_64_convert_load): Likewise.
691 (elf_x86_64_size_dynamic_sections): Likewise.
692 (elf_x86_64_relocate_section): Likewise.
693 (elf_x86_64_finish_dynamic_symbol ): Likewise.
694 (elf_x86_64_finish_dynamic_sections): Likewise.
695 (elf_x86_64_output_arch_local_syms): Likewise.
696 (elf_x86_64_get_synthetic_symtab): Likewise.
697 (elf_x86_64_link_setup_gnu_properties): Likewise.
698 (elf_x86_64_link_hash_table): Use elf_x86_link_hash_table,
699 instead of elf_link_hash_table, as base.
700 (elf_x86_64_next_tls_desc_index): New.
701 (elf_x86_64_srelplt2): Likewise.
702 (elf_x86_64_plt): Likewise.
703 (elf_x86_64_lazy_plt): Likewise.
704 (elf_x86_64_non_lazy_plt): Likewise.
705 * elfxx-x86.c: New file.
706 * elfxx-x86.h: Likewise.
708 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
710 * elf32-i386.c (elf_i386_get_synthetic_symtab): Simplify bad
712 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
714 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
716 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check valid PLT
717 sections before checking dynamic relocations and free invalid
718 PLT section contents.
719 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
721 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
723 * elf-bfd.h (_bfd_elf_ifunc_get_synthetic_symtab): Removed.
724 * elf-ifunc.c (_bfd_elf_ifunc_get_synthetic_symtab): Likewise.
726 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
729 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check for valid
731 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
733 2017-08-27 H.J. Lu <hongjiu.lu@intel.com>
735 * elf32-i386.c (elf_i386_link_hash_newfunc): Initialize
737 * elf64-x86-64.c (elf_x86_64_link_hash_newfunc): Likewise.
739 2017-08-26 H.J. Lu <hongjiu.lu@intel.com>
742 * elf-bfd.h (elf_obj_tdata): Use ENUM_BITFIELD on object_id,
743 dyn_lib_class and has_gnu_symbols. Change bad_symtab to bitfield.
744 Add a has_no_copy_on_protected bitfield.
745 (elf_has_no_copy_on_protected): New.
746 * elf-properties.c (_bfd_elf_parse_gnu_properties): Set
747 elf_has_no_copy_on_protected for GNU_PROPERTY_NO_COPY_ON_PROTECTED.
748 (elf_merge_gnu_property_list): Likewise.
749 (_bfd_elf_link_setup_gnu_properties): Set extern_protected_data
750 to FALSE for elf_has_no_copy_on_protected.
751 * elf32-i386.c (SYMBOL_NO_COPYRELOC): New.
752 (elf_i386_link_hash_entry): Add def_protected.
753 (elf_i386_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
754 when checking info->nocopyreloc.
755 (elf_i386_link_setup_gnu_properties): Don't set
756 extern_protected_data here.
757 (elf_i386_merge_symbol_attribute): New function.
758 (elf_backend_merge_symbol_attribute): New.
759 * elf64-x86-64.c (SYMBOL_NO_COPYRELOC): New.
760 (elf_x86_64_link_hash_entry): Add def_protected.
761 (elf_x86_64_need_pic): Report protected symbol for def_protected.
762 (elf_x86_64_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
763 when checking info->nocopyreloc.
764 (elf_x86_64_relocate_section): Also check for R_X86_64_PC32
765 relocation run-time overflow and unresolvable R_X86_64_32S
766 relocation against protected data symbol defined in shared object
767 with GNU_PROPERTY_NO_COPY_ON_PROTECTED.
768 (elf_x86_64_link_setup_gnu_properties): Don't set
769 extern_protected_data here.
770 (elf_x86_64_merge_symbol_attribute): New function.
771 (elf_backend_merge_symbol_attribute): New.
773 2017-08-26 Alan Modra <amodra@gmail.com>
775 * elf32-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
776 (ppc_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
777 (ppc_elf_relocate_section): Comment fix.
778 * elf64-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
779 (ppc64_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
780 Support dynamic relocs for TPREL16 when non-pic too.
781 (dec_dynrel_count): Adjust TPREL16 handling as per check_relocs.
782 (ppc64_elf_relocate_section): Support dynamic relocs for TPREL16
785 2017-08-25 H.J. Lu <hongjiu.lu@intel.com>
787 * elf32-i386.c (elf_i386_link_hash_entry): Remove redundant
788 "symbol" in comments.
789 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Likewise.
791 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
794 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for
795 R_X86_64_PC32 relocation run-time overflow and unresolvable
796 R_X86_64_32S relocation with -z nocopyreloc.
798 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
800 * elf32-i386.c (elf_i386_check_relocs): Revert the last change.
801 Undefined symbols may not have a type.
802 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
804 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
806 * elf64-x86-64.c (elf_x86_64_need_pic): Add an argument for
807 bfd_link_info. Report shared, PIE or PDE object based on
809 (elf_x86_64_check_relocs): Update elf_x86_64_need_pic call.
810 (elf_x86_64_relocate_section): Likewise.
812 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
814 * elf32-i386.c (elf_i386_check_relocs): Increment PLT count only
815 for function symbols.
816 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
818 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
820 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set
821 extern_protected_data to FALSE if GNU_PROPERTY_NO_COPY_ON_PROTECTED
822 is set on any input relocatable file.
823 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
825 2017-08-23 Alan Modra <amodra@gmail.com>
828 * elf64-ppc.c (ensure_undef_dynamic): Rename from
829 ensure_undefweak_dynamic. Handle undefined too.
830 * elf32-ppc.c (ensure_undef_dynamic): Likewise.
831 * elf32-hppa.c (ensure_undef_dynamic): Likewise.
832 (allocate_dynrelocs): Discard undefined non-default visibility
833 relocs first. Make undefined syms dynamic. Tidy goto.
835 2017-08-21 Alan Modra <amodra@gmail.com>
836 H.J. Lu <hongjiu.lu@intel.com>
839 * elf-bfd.h (SYMBOLIC_BIND): Return TRUE for __start/__stop symbols.
840 * elflink.c (bfd_elf_define_start_stop): Rewrite.
842 2017-08-21 Hans-Peter Nilsson <hp@bitrange.com>
845 * elf64-mmix.c (mmix_elf_relax_section): Correct handling of
846 undefined weak symbols.
848 2017-08-18 Nick Clifton <nickc@redhat.com>
851 * tekhex.c (getsym): Fix check for source pointer walking off the
852 end of the input buffer.
854 2017-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
857 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Skip IFUNC
858 relocations in debug sections, change abort to _bfd_error_handler.
860 2017-08-14 Nick Clifton <nickc@redhat.com>
863 * elf.c (setup_group): Check for an empty or very small group
865 * po/bfd.pot: Regenerate.
867 2017-08-14 Alan Modra <amodra@gmail.com>
870 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't add
871 alignment padding here.
872 * elflink.c (bfd_elf_discard_info): Add .eh_frame padding here
873 in a reverse pass over sections.
875 2017-08-11 H.J. Lu <hongjiu.lu@intel.com>
878 * elf32-i386.c (elf_i386_get_synthetic_symtab): Allocate space
879 for @plt suffixes first.
880 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
882 2017-08-08 Nick Clifton <nickc@redhat.com>
885 * elf-attrs.c (_bfd_elf_parse_attributes): Complain about very
886 small section lengths.
887 * elf.c (_bfd_elf_setup_sections): Skip empty entries in the group
889 (elfcore_grok_freebsd_prstatus): Add checks to make sure that
890 there is enough data present in the note.
892 2017-08-08 Alan Modra <amodra@gmail.com>
895 * elf32-microblaze.c (microblaze_elf_check_relocs): Don't bump
896 got.refcount for GOTOFF relocs, just create .got section.
898 2017-08-07 H.J. Lu <hongjiu.lu@intel.com>
900 * elflink.c (elf_link_add_object_symbols): Move common symbol
901 check after bed->common_definition.
903 2017-08-07 Alan Modra <amodra@gmail.com>
906 * elflink.c (bfd_elf_final_link): Don't segfault when sections
907 needed to define various dynamic tags have been discarded.
909 2017-08-07 Nick Clifton <nickc@redhat.com>
912 * elf32-i386.c (elf_i386_link_setup_gnu_properties): If the dynobj
913 has not been set then use the bfd returned by
914 _bfd_elf_link_setup_gnu_properties. If that is null then search
915 through all the input bfds selecting the first normal, ELF format
917 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
919 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
921 * elf32-i386.c (elf_i386_link_hash_entry): Change tls_get_addr
923 (elf_i386_link_hash_newfunc): Initialize tls_get_addr to 0.
924 (elf_i386_check_tls_transition): Check tls_get_addr directly.
925 (elf_i386_convert_load_reloc): Update tls_get_addr check.
926 (elf_i386_link_check_relocs): New function.
927 (bfd_elf32_bfd_link_check_relocs): New.
928 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Change tls_get_addr
930 (elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 0.
931 (elf_x86_64_check_tls_transition): Check tls_get_addr directly.
932 (elf_x86_64_convert_load_reloc): Update tls_get_addr check.
933 (elf_x86_64_link_check_relocs): New function.
934 (bfd_elf64_bfd_link_check_relocs): New.
935 (bfd_elf32_bfd_link_check_relocs): Likewise.
937 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
940 * elflink.c (elf_link_add_object_symbols): Treat common symbol
941 as undefined for --no-define-common.
943 2017-08-05 Alan Modra <amodra@gmail.com>
945 * elf32-hppa.c (elf32_hppa_set_gp): Don't require an
946 hppa_link_hash_table.
948 2017-08-02 Max Filippov <jcmvbkbc@gmail.com>
950 * xtensa-isa.c (xtensa_isa_init): Don't update lookup table
951 entries for sysregs with negative indices.
953 2017-08-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
955 * elf32-s390.c (elf_s390_finish_dynamic_sections): Skip if it
956 isn't the S/390 specific elf data.
957 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
959 2017-07-31 Kuan-Lin Chen <rufus@andestech.com>
961 * elfxx-riscv.c (riscv_elf_add_sub_reloc): New function.
962 * (howto_table) [R_RISCV_ADD8]: Use riscv_elf_add_sub_reloc.
963 [R_RISCV_ADD16]: Likewise.
964 [R_RISCV_ADD32]: Likewise.
965 [R_RISCV_ADD64]: Likewise.
966 [R_RISCV_SUB6]: Likewise.
967 [R_RISCV_SUB8]: Likewise.
968 [R_RISCV_SUB16]: Likewise.
969 [R_RISCV_SUB32]: Likewise.
970 [R_RISCV_SUB64]: Likewise.
972 2017-07-31 Alan Modra <amodra@gmail.com>
974 * elf64-ppc.c (ppc64_elf_tls_setup): Warn on --plt-localentry
975 without ld.so checks.
977 2017-07-29 Alan Modra <amodra@gmail.com>
980 * elf64-ppc.c (struct ppc_link_hash_entry): Add non_zero_localentry.
981 (ppc64_elf_merge_symbol): Set non_zero_localentry.
982 (is_elfv2_localentry0): Test non_zero_localentry.
983 (ppc64_elf_tls_setup): Default to --no-plt-localentry.
985 2017-07-28 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
987 * elf32-s390.c (elf_s390_finish_dynamic_sections): Add NULL
988 pointer check for htab->elf.irelplt.
989 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
991 2017-07-27 Nick Clifton <nickc@redhat.com>
994 * mach-o.c (bfd_mach_o_read_symtab_strtab): Fail if the symtab
996 * nlmcode.h (nlm_swap_auxiliary_headers_in): Replace assertion
998 * section.c (bfd_make_section_with_flags): Fail if the name or bfd
1000 * vms-alpha.c (bfd_make_section_with_flags): Correct computation
1002 (evax_bfd_print_emh): Check for invalid string lengths.
1004 2017-07-25 Nick Clifton <nickc@redhat.com>
1006 * po/fr.po: Updated French translation.
1008 2017-07-25 Benjamin Green <bengreen5mx@gmail.com>
1011 * elf32-msp430.c (msp430_elf_relax_section): Allow conversion of
1012 16-bit absolute branches into 10-bit pc-relative branches on the
1013 MSP430 as well as the MSP430X.
1015 2017-07-25 Alan Modra <amodra@gmail.com>
1017 * elf64-ppc.c (struct map_stub): Add tls_get_addr_opt_bctrl.
1018 (stub_eh_frame_size): New function.
1019 (ppc_size_one_stub): Set group tls_get_addr_opt_bctrl.
1020 (group_sections): Init group tls_get_addr_opt_bctrl.
1021 (ppc64_elf_size_stubs): Update sizing and initialization of
1022 .eh_frame. Iteration over stubs via group list.
1023 (ppc64_elf_build_stubs): Iterate over stubs via group list.
1024 (ppc64_elf_finish_dynamic_sections): Update finalization of
1027 2017-07-24 Nick Clifton <nickc@redhat.com>
1030 * mach-o.c (bfd_mach_o_canonicalize_relocs): Pass the base address
1031 of the relocs to the canonicalize_one_reloc routine.
1032 * mach-o.h (struct bfd_mach_o_backend_data): Update the prototype
1033 for the _bfd_mach_o_canonicalize_one_reloc field.
1034 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add
1035 res_base parameter. Use to check for corrupt pair relocs.
1036 * mach-o-aarch64.c (bfd_mach_o_arm64_canonicalize_one_reloc):
1038 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc):
1040 * mach-o-x86-64.c (bfd_mach_o_x86_64_canonicalize_one_reloc):
1043 * vms-alpha.c (_bfd_vms_slurp_eihd): Make sure that there is
1044 enough data in the record before attempting to parse it.
1045 (_bfd_vms_slurp_eeom): Likewise.
1047 (_bfd_vms_slurp_egsd): Check for an invalid section index.
1048 (image_set_ptr): Likewise.
1049 (alpha_vms_slurp_relocs): Likewise.
1051 (alpha_vms_object_p): Check for a truncated record.
1053 2017-07-24 Nick Clifton <nickc@redhat.com>
1056 * reloc.c (_bfd_unrecognized_reloc): New function. Reports
1057 an unrecognized reloc and sets the bfd_error value.
1058 * libbfd.h: Regenerate.
1059 * elf32-arm.c (elf32_arm_final_link_relocate): Use the new
1061 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1062 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
1063 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1064 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.
1065 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
1067 2017-07-23 Alan Modra <amodra@gmail.com>
1069 * elf64-ppc.c (ppc64_elf_size_stubs): Correct advance to
1072 2017-07-19 Szabolcs Nagy <szabolcs.nagy@arm.com>
1075 * elfnn-aarch64.c (elfNN_aarch64_reloc_type_class): Return
1076 reloc_class_ifunc for ifunc symbols.
1078 2017-07-19 Nick Clifton <nickc@redhat.com>
1081 * archive.c (bfd_generic_archive_p): If the bfd does not have the
1082 correct magic bytes at the start, set the error to wrong format
1083 and clear the format selector before returning NULL.
1085 2017-07-19 Nick Clifton <nickc@redhat.com>
1088 * coff-rs6000.c (_bfd_strntol): New function.
1089 (_bfd_strntoll): New function.
1090 (GET_VALUE_IN_FIELD): New macro.
1091 (EQ_VALUE_IN_FIELD): new macro.
1092 (_bfd_xcoff_slurp_armap): Use new macros.
1093 (_bfd_xcoff_archive_p): Likewise.
1094 (_bfd_xcoff_read_ar_hdr): Likewise.
1095 (_bfd_xcoff_openr_next_archived_file): Likewise.
1096 (_bfd_xcoff_stat_arch_elt): Likewise.
1097 * coff64-rs6000.c (_bfd_strntol): New function.
1098 (_bfd_strntoll): New function.
1099 (GET_VALUE_IN_FIELD): New macro.
1100 (xcoff64_slurp_armap): Use new macros.
1102 2017-07-19 Claudiu Zissulescu <claziss@synopsys.com>
1103 John Eric Martin <John.Martin@emmicro-us.com>
1105 * bfd-in2.h: Regenerate.
1106 * libbfd.h: Regenerate.
1107 * elf32-arc.c (JLI): Define.
1108 * reloc.c: Add JLI relocations.
1110 2017-07-18 Nick Clifton <nickc@redhat.com>
1113 * coff-sh.c: Fix spelling typos.
1114 * compress.c: Likewise.
1115 * cpu-pdp11.c: Likewise.
1116 * ecofflink.c: Likewise.
1117 * elf-m10300.c: Likewise.
1119 * elf32-arm.c: Likewise.
1120 * elf32-m68k.c: Likewise.
1121 * elf32-nds32.c: Likewise.
1122 * elf32-ppc.c: Likewise.
1123 * elf32-sh.c: Likewise.
1124 * elf32-v850.c: Likewise.
1125 * elf64-ppc.c: Likewise.
1126 * elf64-x86-64.c: Likewise.
1127 * elflink.c: Likewise.
1128 * elfnn-aarch64.c: Likewise.
1129 * elfxx-mips.c: Likewise.
1131 * sunos.c: Likewise.
1132 * vms-alpha.c: Likewise.
1133 * xcofflink.c: Likewise.
1135 2017-07-18 Nick Clifton <nickc@redhat.com>
1138 * coffcode.h (handle_COMDAT): Replace abort with an error message
1141 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
1144 * elf64-x86-64.c (elf_x86_64_relocate_section): Limit PIC check
1147 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
1149 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
1151 2017-07-16 Alan Modra <amodra@gmail.com>
1153 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimize
1154 __tls_index GOT entries when using __tls_get_addr_opt stub.
1155 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1157 2017-07-12 Alan Modra <amodra@gmail.com>
1159 * po/es.po: Update from translationproject.org/latest/bfd/.
1160 * po/fi.po: Likewise.
1161 * po/fr.po: Likewise.
1162 * po/id.po: Likewise.
1163 * po/ja.po: Likewise.
1164 * po/ro.po: Likewise.
1165 * po/ru.po: Likewise.
1166 * po/sr.po: Likewise.
1167 * po/sv.po: Likewise.
1168 * po/tr.po: Likewise.
1169 * po/uk.po: Likewise.
1170 * po/vi.po: Likewise.
1171 * po/zh_CN.po: Likewise.
1172 * po/hr.po: New file from translationproject.org.
1173 * configure.ac (ALL_LINGUAS): Add hr. Sort.
1174 * configure: Regenerate.
1176 2017-07-12 Nick Clifton <nickc@redhat.com>
1178 Fix compile time warnings using gcc 7.1.1.
1179 * elf32-xtensa.c (elf_xtensa_get_plt_section): Increase length of
1181 (elf_xtensa_get_gotplt_section): Increase length of got_name
1183 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add a
1184 default return of FALSE.
1185 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc): Add a
1186 default return of FALSE.
1188 2017-07-12 Alan Modra <amodra@gmail.com>
1190 * binary.c (binary_set_section_contents): Don't print filepos in
1192 (coff_write_object_contents): Cast size_t for error message.
1193 (coff_slurp_line_table): Don't use bfd_vma symndx.
1194 (coff_slurp_reloc_table): Remove unneeded cast.
1195 * dwarf2.c (read_section): Cast bfd_int64_t to long long for
1197 (find_abstract_instance_name): Likewise.
1198 * elf32-arm.c (arm_type_of_stub): Correct error arg order.
1199 (bfd_elf32_arm_stm32l4xx_erratum_scan): Don't cast error arg.
1200 (elf32_arm_check_relocs): Make r_symndx an int.
1201 * elf32-cris.c (cris_elf_check_relocs): Delete extraneous %s in
1203 * elf32-metag.c (elf_metag_relocate_section): Delete extra error
1205 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Rewrite bogus
1207 * elf32-i386.c (elf_i386_check_relocs): Make r_symndx an int.
1208 * elf32-s390.c (elf_s390_check_relocs): Likewise.
1209 * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
1210 * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
1211 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
1212 * elf64-s390.c (elf_s390_check_relocs): Likewise.
1213 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1214 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
1215 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
1216 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
1217 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
1218 * elf64-mmix.c (_bfd_mmix_after_linker_allocation): Cast size_t args
1219 and use %lu for error message.
1220 * elflink.c (elf_link_adjust_relocs): Delete extra error message arg.
1221 * mmo.c (mmo_scan): Make stab_loc a file_ptr. Cast expression for
1224 * elf32-arm.c (elf32_arm_tls_relax): Correct format string and args
1226 (elf32_arm_final_link_relocate): Likewise.
1227 * coff-arm.c (bfd_arm_process_before_allocation): Likewise.
1228 * coffcode.h (styp_to_sec_flags): Likewise.
1229 * cofflink.c (_bfd_coff_write_global_sym): Likewise.
1230 * ecoff.c (_bfd_ecoff_slurp_symbol_table): Likewise.
1231 * elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise.
1232 * elf32-bfin.c (bfinfdpic_check_relocs): Likewise.
1233 (elf32_bfin_merge_private_bfd_data): Likewise.
1234 * elf32-cris.c (cris_elf_relocate_section): Likewise.
1235 * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
1236 * elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise.
1237 (i370_elf_relocate_section): Likewise.
1238 * elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise.
1239 * elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise.
1240 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
1241 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
1242 * elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise.
1243 * elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise.
1244 * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
1245 * elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise.
1246 (_bfd_mips_elf_merge_private_bfd_data): Likewise.
1247 * ieee.c (ieee_write_id, read_id): Likewise.
1248 * mach-o.c (bfd_mach_o_write_contents): Likewise.
1249 (bfd_mach_o_layout_commands, bfd_mach_o_read_section_32): Likewise.
1250 (bfd_mach_o_read_section_64, bfd_mach_o_read_symtab_symbol): Likewise.
1251 (bfd_mach_o_read_command, bfd_mach_o_header_p): Likewise.
1252 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Likewise.
1253 * stabs.c (_bfd_link_section_stabs): Likewise.
1255 * coff-arm.c (coff_arm_relocate_section): Use L modifier in error
1257 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
1258 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
1259 * coff-rs6000.c (xcoff_reloc_type_toc): Likewise.
1260 * coff-sh.c (sh_relax_section): Likewise.
1261 (sh_relax_delete_bytes, sh_swap_insns): Likewise.
1262 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
1263 * coffcode.h (coff_slurp_reloc_table): Likewise.
1264 * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
1265 (_bfd_coff_read_string_table): Likewise.
1266 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
1267 * compress.c (bfd_get_full_section_contents): Likewise.
1268 * dwarf2.c (read_formatted_entries, decode_line_info): Likewise.
1269 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
1270 * elf.c (bfd_elf_string_from_elf_section): Likewise.
1271 * elf32-arc.c (arc_special_overflow_checks): Likewise.
1272 * elf32-arm.c (elf32_arm_tls_relax): Likewise.
1273 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Likewise.
1274 (elf32_arm_write_section): Likewise.
1275 * elf32-bfin.c (bfin_relocate_section): Likewise.
1276 (bfinfdpic_relocate_section): Likewise.
1277 * elf32-hppa.c (hppa_build_one_stub): Likewise.
1278 (final_link_relocate, elf32_hppa_relocate_section): Likewise.
1279 * elf32-i386.c (elf_i386_tls_transition): Likewise.
1280 (elf_i386_relocate_section): Likewise.
1281 * elf32-ip2k.c (ip2k_final_link_relocate): Likewise.
1282 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
1283 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
1284 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1285 * elf32-metag.c (elf_metag_relocate_section): Likewise.
1286 * elf32-nds32.c (unrecognized_reloc_msg): Likewise.
1287 (nds32_elf_relax_longcall1, nds32_elf_relax_longcall2): Likewise.
1288 (nds32_elf_relax_longcall3, nds32_elf_relax_longjump1): Likewise.
1289 (nds32_elf_relax_longjump2, nds32_elf_relax_longjump3): Likewise.
1290 (nds32_elf_relax_longcall4, nds32_elf_relax_longcall5): Likewise.
1291 (nds32_elf_relax_longcall6, nds32_elf_relax_longjump4): Likewise.
1292 (nds32_elf_relax_longjump5, nds32_elf_relax_longjump6): Likewise.
1293 (nds32_elf_relax_longjump7, nds32_elf_relax_loadstore): Likewise.
1294 (nds32_elf_relax_ptr, nds32_elf_ex9_build_hash_table): Likewise.
1295 * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
1296 * elf32-rx.c (UNSAFE_FOR_PID): Likewise.
1297 * elf32-s390.c (invalid_tls_insn, elf_s390_relocate_section): Likewise.
1298 * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
1299 * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
1300 * elf32-sh.c (sh_elf_relax_section): Likewise.
1301 (sh_elf_relax_delete_bytes, sh_elf_swap_insns): Likewise.
1302 (sh_elf_relocate_section): Likewise.
1303 * elf32-sh64.c (shmedia_prepare_reloc): Likewise.
1304 * elf32-spu.c (spu_elf_relocate_section): Likewise.
1305 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
1306 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
1307 * elf32-v850.c (v850_elf_relax_section): Likewise.
1308 * elf32-vax.c (elf_vax_check_relocs): Likewise.
1309 (elf_vax_relocate_section): Likewise.
1310 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
1311 (extend_ebb_bounds_forward, extend_ebb_bounds_backward): Likewise.
1312 (compute_text_actions, compute_ebb_proposed_actions): Likewise.
1313 (do_fix_for_relocatable_link): Likewise.
1314 * elf64-alpha.c (elf64_alpha_relax_got_load): Likewise.
1315 (elf64_alpha_relax_with_lituse): Likewise.
1316 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Likewise.
1317 (elf_hppa_final_link_relocate): Likewise.
1318 * elf64-ia64-vms.c (elf64_ia64_relax_section): Likewise.
1319 (elf64_ia64_choose_gp, elf64_ia64_relocate_section): Likewise.
1320 (elf64_vms_link_add_object_symbols): Likewise.
1321 * elf64-mmix.c (mmix_elf_perform_relocation): Likewise.
1322 (mmix_final_link_relocate): Likewise.
1323 * elf64-s390.c (invalid_tls_insn): Likewise.
1324 (elf_s390_relocate_section): Likewise.
1325 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
1326 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
1327 (elf_x86_64_relocate_section): Likewise.
1328 * elfcode.h (elf_slurp_symbol_table): Likewise.
1329 * elfcore.h (elf_core_file_p): Likewise.
1330 * elflink.c (elf_link_read_relocs_from_section): Likewise.
1331 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
1332 (elfNN_aarch64_relocate_section): Likewise.
1333 * elfnn-ia64.c (elfNN_ia64_relax_section): Likewise.
1334 (elfNN_ia64_choose_gp, elfNN_ia64_relocate_section): Likewise.
1335 * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
1336 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
1337 (_bfd_mips_elf_relocate_section): Likewise.
1338 (_bfd_mips_elf_finish_dynamic_symbol, mips_finish_exec_plt): Likewise.
1339 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
1340 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
1341 * ieee.c (ieee_slurp_external_symbols): Likewise.
1342 * ihex.c (ihex_write_object_content): Likewise.
1343 * mach-o.c (bfd_mach_o_build_exec_seg_command): Likewise.
1344 * merge.c (_bfd_merged_section_offset): Likewise.
1345 * mmo.c (mmo_write_loc_chunk): Likewise.
1346 (mmo_write_object_contents): Likewise.
1347 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Likewise.
1348 * stabs.c (_bfd_link_section_stabs): Likewise.
1349 * xcofflink.c (xcoff_link_add_symbols, xcoff_find_tc0): Likewise.
1351 2017-07-11 Alan Modra <amodra@gmail.com>
1353 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo.
1355 2017-07-11 Alan Modra <amodra@gmail.com>
1357 * elf32-ppc.c (ppc_elf_relocate_section): Emit "unexpected
1358 instruction" error using _bfd_error_handler, not einfo.
1360 2017-07-10 Nick Clifton <nickc@redhat.com>
1362 * coffcode.h (coff_slurp_symbol_table): Do not include an entry
1363 for C_AIX_WEAKEXT if it has the same value as C_WEAKEXT.
1365 2017-07-07 John Baldwin <jhb@FreeBSD.org>
1367 * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PTLWPINFO.
1369 2017-07-07 Alan Modra <amodra@gmail.com>
1371 * coffcode.h (coff_slurp_symbol_table): Handle C_AIX_WEAKEXT.
1373 2017-07-07 Alan Modra <amodra@gmail.com>
1375 * bfd.c (_doprnt): Replace "L" with "ll" when printing bfd_vma
1376 as long long. Move code replacing "ll" with "I64", and simplify.
1378 2017-07-06 H.J. Lu <hongjiu.lu@intel.com>
1380 * bfd.c (_doprnt): Convert 'L' to 'l' when setting wide_width
1383 2017-07-05 H.J. Lu <hongjiu.lu@intel.com>
1385 * dwarf2.c (line_info_add_include_dir_stub): Replace time with
1387 (line_info_add_file_name): Likewise.
1388 (decode_line_info): Likewise.
1390 2017-07-04 Tristan Gingold <gingold@adacore.com>
1392 * version.m4: Bump version to 2.29.51
1393 * configure: Regenerate.
1395 2017-07-04 Jiong Wang <jiong.wang@arm.com>
1397 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Remove the
1398 sanity check at the head of this function.
1400 2017-07-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1402 * dwarf2.c (struct dwarf2_debug): Add fields dwarf_line_str_buffer and
1403 dwarf_line_str_size.
1404 (struct attr_abbrev): Add field implicit_const.
1405 (dwarf_debug_sections): Add .debug_line_str.
1406 (enum dwarf_debug_section_enum): Add debug_line_str and debug_max.
1407 (dwarf_debug_section_assert): Add static assertion.
1408 (read_indirect_line_string): New.
1409 (read_abbrevs): Support DW_FORM_implicit_const.
1410 (is_str_attr): Support DW_FORM_line_strp.
1411 (read_attribute_value): Support DW_FORM_line_strp and
1412 DW_FORM_implicit_const.
1413 (read_attribute): Support DW_FORM_implicit_const.
1414 (line_info_add_include_dir, line_info_add_include_dir_stub):
1415 (line_info_add_file_name, read_formatted_entries): New.
1416 (decode_line_info, parse_comp_unit): Support DWARF 5.
1417 (_bfd_dwarf2_cleanup_debug_info): Free dwarf_line_str_buffer.
1419 2017-07-03 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
1421 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove the
1422 abort statement that was put for symbols that are not dynamic.
1424 2017-07-03 Tristan Gingold <gingold@adacore.com>
1426 * po/bfd.pot: Regenerate
1428 2017-07-03 Alan Modra <amodra@gmail.com>
1430 * bfd.c (_doprnt): Rewrite "ll" and "L" modifiers to "I64" for
1431 __MSVCRT__. Support "L" modifier for bfd_vma. Formatting.
1432 * elf.c (setup_group): Use "Lx" to print sh_size.
1433 (_bfd_elf_setup_sections): Remove unnecessary cast and print
1434 unknown section type in hex.
1435 (copy_special_section_fields): Style fix.
1436 (bfd_section_from_shdr): Correct format for sh_link. Use a
1437 common error message for all the variants of unrecognized
1439 (assign_file_positions_for_load_sections): Use "Lx" for lma
1440 adjust error message.
1441 (assign_file_positions_for_non_load_sections): Formatting.
1442 (rewrite_elf_program_header): Formatting. Use "Lx" for
1443 bfd_vma values in error messages.
1444 * elfcode.h (elf_slurp_reloc_table_from_section): Cast
1445 ELF_R_SYM value to type expected by format.
1446 * elflink.c (elf_link_read_relocs_from_section): Use "Lx"
1448 (elf_link_add_object_symbols): Use "Lu" for symbol sizes.
1449 (elf_link_input_bfd): Use "Lx" for r_info.
1450 (bfd_elf_gc_record_vtinherit): Use "Lx" for offset.
1452 2017-07-03 Alan Modra <amodra@gmail.com>
1454 * bfd.c (bfd_scan_vma): Don't use long long unless HAVE_LONG_LONG.
1455 * coff-rs6000.c (FMT20): Handle hosts with 64-bit long and
1456 Microsoft C library variant of long long format specifier.
1457 (PRINT20): Cast value to bfd_uint64_t not long long.
1458 * coffcode.h (coff_print_aux): Use BFD_VMA_FMT.
1459 * coff-x86_64.c (coff_amd64_reloc): Use bfd_uint64_t rather than
1460 long long. Don't cast to bfd_vma.
1461 * elf32-score.c (score3_bfd_getl48): Likewise.
1462 * vms-alpha.c (_bfd_vms_slurp_eisd): Likewise.
1464 2017-07-03 Alan Modra <amodra@gmail.com>
1466 * elf.c (_bfd_elf_print_private_bfd_data): Use BFD_VMA_FMT to
1468 (bfd_elf_print_symbol): Don't cast symbol->flags.
1469 (_bfd_elf_symbol_from_bfd_symbol): Likewise.
1470 * elf32-ppc.c (ppc_elf_begin_write_processing): Correct
1471 _bfd_error_handler argument order.
1472 (ppc_elf_merge_private_bfd_data): Don't cast flags.
1474 2017-07-03 Alan Modra <amodra@gmail.com>
1476 * configure.ac: Invoke AC_CHECK_TYPES for long long. Invoke
1477 AC_TYPE_LONG_DOUBLE.
1478 * configure: Regenerate.
1479 * config.in: Regenerate.
1481 2017-06-29 Andrew Waterman <andrew@sifive.com>
1483 * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Fix TLS copy
1486 2017-06-29 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
1488 * elfxx-sparc.c (allocate_dynrelocs): Don't make a symbol dynamic
1489 unless it is undefined weak.
1490 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Set the flag
1491 relative_reloc to direct non-dynamic symbols to R_SPARC_RELATIVE
1493 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): If symbol
1494 is not dynamic in PIC, abort.
1496 2017-06-29 Jiong Wang <jiong.wang@arm.com>
1499 * elfnn-aarch64.c (elfNN_aarch64_allocate_dynrelocs): Only make
1500 undefined weak symbols into dynamic.
1501 (elfNN_aarch64_final_link_relocate): Generate runtime RELATIVE
1502 relocation for non-dynamic symbols.
1503 (elfNN_aarch64_finish_dynamic_symbol): Add sanity check.
1505 2017-06-29 Jiong Wang <jiong.wang@arm.com>
1507 * elfnn-aarch64.c (aarch64_relocation_aginst_gp_p): New function.
1508 (elfNN_aarch64_final_link_relocate): Delete duplicated code for
1509 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15, BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
1510 BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
1511 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Optimize the
1514 2017-06-29 Andreas Arnez <arnez@linux.vnet.ibm.com>
1516 * elf-bfd.h (elfcore_write_s390_gs_cb): Add prototype.
1517 (elfcore_write_s390_gs_bc): Likewise.
1518 * elf.c (elfcore_grok_s390_gs_cb): New function.
1519 (elfcore_grok_s390_gs_bc): New function.
1520 (elfcore_grok_note): Call them.
1521 (elfcore_write_s390_gs_cb): New function.
1522 (elfcore_write_s390_gs_bc): New function.
1523 (elfcore_write_register_note): Call them.
1525 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
1527 * libbfd.c (_bfd_generic_get_section_contents): Don't call
1528 bfd_get_file_size. Check archive element size.
1529 (_bfd_generic_get_section_contents_in_window): Likewise.
1531 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
1533 * bfd-in2.h: Regenerated.
1534 * bfdio.c (bfd_get_size): Change return type to ufile_ptr.
1535 (bfd_get_file_size): Likewise.
1537 2017-06-28 Maciej W. Rozycki <macro@imgtec.com>
1538 Matthew Fortune <matthew.fortune@imgtec.com>
1540 * archures.c (bfd_mach_mips_interaptiv_mr2): New macro.
1541 * cpu-mips.c (I_interaptiv_mr2): New enum value.
1542 (arch_info_struct): Add "mips:interaptiv-mr2" entry.
1543 * elfxx-mips.c (_bfd_elf_mips_mach) <E_MIPS_MACH_IAMR2>: New
1545 (mips_set_isa_flags) <bfd_mach_mips_interaptiv_mr2>: Likewise.
1546 (bfd_mips_isa_ext) <bfd_mach_mips_interaptiv_mr2>: Likewise.
1547 (print_mips_isa_ext) <AFL_EXT_INTERAPTIV_MR2>: Likewise.
1548 (mips_mach_extensions): Add `bfd_mach_mipsisa32r3' and
1549 `bfd_mach_mips_interaptiv_mr2' entries.
1550 * bfd-in2.h: Regenerate.
1552 2017-06-27 Nick Clifton <nickc@redhat.com>
1554 * tekhex.c (pass_over): Revert accidental conversion of a local
1555 array to a static array.
1557 2017-06-27 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
1560 * elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Adjust
1561 reloc addend if necessary. Adjust diff only if
1562 shrinked_insn_address < end_address.
1564 2017-06-27 Alan Modra <amodra@gmail.com>
1567 * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
1568 (_bfd_generic_get_section_contents_in_window): Likewise.
1570 2017-06-26 Kuan-Lin Chen <rufus@andestech.com>
1572 * elfnn-riscv.c (perform_relocation): Support the new
1573 R_RISCV_32_PCREL relocation.
1574 (riscv_elf_relocate_section): Likewise.
1575 * elfxx-riscv.c (howto_table): Likewise.
1576 (riscv_reloc_map): Likewise.
1577 * bfd-in2.h (BFD_RELOC_RISCV_32_PCREL): New relocation.
1578 * libbfd.h: Regenerate.
1580 2017-06-27 Alan Modra <amodra@gmail.com>
1583 * libbfd.c (_bfd_generic_get_section_contents): Delete abort.
1584 Use unsigned file pointer type, and remove cast.
1585 * libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise.
1586 Add "count", not "sz".
1588 2017-06-26 Pedro Alves <palves@redhat.com>
1591 * libbfd.c (_bfd_generic_get_section_contents): Add "count", not
1594 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
1597 * libbfd.c (_bfd_generic_get_section_contents_in_window): Add
1600 2017-06-26 Maciej W. Rozycki <macro@imgtec.com>
1602 * cpu-mips.c (arch_info_struct): Mark the 4010 32-bit.
1603 * elfxx-mips.c (mips_set_isa_flags) <bfd_mach_mips4010>: Set
1604 E_MIPS_ARCH_2 rather than E_MIPS_ARCH_3 in `e_flags'.
1605 (mips_mach_extensions): Mark `bfd_mach_mips4010' as extending
1606 `bfd_mach_mips6000' rather than `bfd_mach_mips4000'.
1608 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
1611 * compress.c (bfd_get_full_section_contents): Don't check the
1613 * libbfd.c (_bfd_generic_get_section_contents): Check for and
1614 reject a section whose size + offset is greater than the size
1616 (_bfd_generic_get_section_contents_in_window): Likewise.
1618 2017-06-26 Nick Clifton <nickc@redhat.com>
1621 * tekhex.c (getvalue): Check for the source pointer exceeding the
1622 end pointer before the first byte is read.
1624 2017-06-26 Nick Clifton <nickc@redhat.com>
1627 * opncls.c (get_build_id): Check that the section is big enough
1628 to contain the whole note.
1629 * compress.c (bfd_get_full_section_contents): Check for and reject
1630 a section whose size is greater than the size of the entire file.
1631 * elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not
1632 contain a notes section.
1634 2017-06-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1636 * elf64-s390.c (elf_s390_additional_program_headers): Add NULL
1638 (elf_s390_modify_segment_map): Likewise.
1639 (bfd_elf_s390_set_options): Lisewise.
1641 2017-06-26 Alan Modra <amodra@gmail.com>
1643 * elflink.c (_bfd_elf_link_create_dynstrtab): Don't make dynobj
1645 (_bfd_elf_size_group_sections): Skip --just-syms bfds.
1646 (bfd_elf_size_dynamic_sections): Ignore .note.GNU-stack and
1647 .preinit_array on --just-syms bfds.
1648 (_bfd_elf_gc_mark_extra_sections): Skip --just-syms bfds.
1649 (elf_gc_sweep, bfd_elf_parse_eh_frame_entries): Likewise.
1650 (bfd_elf_gc_sections, bfd_elf_discard_info): Likewise.
1652 2017-06-25 Sergei Trofimovich <slyfox@gentoo.org>
1654 * elf.c (find_link): Bounds check "hint".
1656 2017-06-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
1658 * elf32-arm.c (using_thumb_only): Update list of architectures in
1659 BFD_ASSERT for which the logic is valid.
1660 (using_thumb2_bl): Likewise.
1661 (using_thumb2): Likewise and return true for ARMv8-R.
1662 (arch_has_arm_nop): Likewise.
1663 (tag_cpu_arch_combine): New v8r table for ARMv8-R Tag_CPU_arch
1664 merging logic. Update commentis for value 15 of v8m_baseline,
1665 v8m_mainline and v4t_plus_v6_m arrays. Use v8r array to decide
1666 merging of value 15 of Tag_CPU_arch.
1668 2017-06-23 Jiong Wang <jiong.wang@arm.com>
1670 * reloc.c (BFD_RELOC_AARCH64_ADR_GOTPAGE): Rename to
1671 BFD_RELOC_AARCH64_ADR_GOT_PAGE
1672 * bfd-in2.h: Regenerate.
1674 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1676 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Move
1677 the error_alignment label forward. Properly align program
1678 property note section.
1680 2017-06-22 Eric Christopher <echristo@gmail.com>
1682 * elf32-arm.c (elf32_arm_final_link_relocate): Use labs rather than
1683 abs to fix a truncation warning.
1685 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1687 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Resolve
1688 local undefined weak symbol to 0.
1689 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Likewise.
1691 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1693 * elf32-i386.c (elf_i386_merge_gnu_properties): If info->shstk
1694 is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
1695 (elf_i386_link_setup_gnu_properties): If info->shstk is set,
1696 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
1697 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): If
1698 info->shstk is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
1699 (elf_x86_64_link_setup_gnu_properties): If info->shstk is set,
1700 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
1702 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1704 * elf32-i386.c (elf_i386_lazy_ibt_plt0_entry): New.
1705 (elf_i386_lazy_ibt_plt_entry): Likewise.
1706 (elf_i386_pic_lazy_ibt_plt0_entry): Likewise.
1707 (elf_i386_non_lazy_ibt_plt_entry): Likewise.
1708 (elf_i386_pic_non_lazy_ibt_plt_entry): Likewise.
1709 (elf_i386_eh_frame_lazy_ibt_plt): Likewise.
1710 (elf_i386_lazy_plt_layout): Likewise.
1711 (elf_i386_non_lazy_plt_layout): Likewise.
1712 (elf_i386_link_hash_entry): Add plt_second.
1713 (elf_i386_link_hash_table): Add plt_second and
1714 plt_second_eh_frame.
1715 (elf_i386_allocate_dynrelocs): Use the second PLT if needed.
1716 (elf_i386_size_dynamic_sections): Use .plt.got unwind info for
1717 the second PLT. Check the second PLT.
1718 (elf_i386_relocate_section): Use the second PLT to resolve
1719 PLT reference if needed.
1720 (elf_i386_finish_dynamic_symbol): Fill and use the second PLT if
1722 (elf_i386_finish_dynamic_sections): Set sh_entsize on the
1723 second PLT. Generate unwind info for the second PLT.
1724 (elf_i386_plt_type): Add plt_second.
1725 (elf_i386_get_synthetic_symtab): Support the second PLT.
1726 (elf_i386_parse_gnu_properties): Support
1727 GNU_PROPERTY_X86_FEATURE_1_AND.
1728 (elf_i386_merge_gnu_properties): Support
1729 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
1730 on GNU_PROPERTY_X86_FEATURE_1_IBT
1731 (elf_i386_link_setup_gnu_properties): If info->ibt is set,
1732 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
1733 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
1734 is set on all relocatable inputs.
1735 * elf64-x86-64.c (elf_x86_64_lazy_ibt_plt_entry): New.
1736 (elf_x32_lazy_ibt_plt_entry): Likewise.
1737 (elf_x86_64_non_lazy_ibt_plt_entry): Likewise.
1738 (elf_x32_non_lazy_ibt_plt_entry): Likewise.
1739 (elf_x86_64_eh_frame_lazy_ibt_plt): Likewise.
1740 (elf_x32_eh_frame_lazy_ibt_plt): Likewise.
1741 (elf_x86_64_lazy_ibt_plt): Likewise.
1742 (elf_x32_lazy_ibt_plt): Likewise.
1743 (elf_x86_64_non_lazy_ibt_plt): Likewise.
1744 (elf_x32_non_lazy_ibt_plt): Likewise.
1745 (elf_x86_64_get_synthetic_symtab): Support the second PLT.
1746 (elf_x86_64_parse_gnu_properties): Support
1747 GNU_PROPERTY_X86_FEATURE_1_AND.
1748 (elf_x86_64_merge_gnu_properties): Support
1749 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
1750 on GNU_PROPERTY_X86_FEATURE_1_IBT
1751 (elf_x86_64_link_setup_gnu_properties): If info->ibt is set,
1752 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
1753 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
1754 is set on all relocatable inputs.
1756 2017-06-22 Nick Clifton <nickc@redhat.com>
1759 * som.c (setup_sections): NUL terminate the space_strings buffer.
1760 Check that the space.name field does not index beyond the end of
1761 the space_strings buffer.
1763 2017-06-21 Nick Clifton <nickc@redhat.com>
1766 * coff-sh.c (sh_reloc): Check for an out of range reloc.
1768 2017-06-21 Nick Clifton <nickc@redhat.com>
1771 * vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as
1772 type of the size parameter.
1773 (_bfd_vms_save_counted_string): Add second parameter - the maximum
1774 length of the counted string.
1775 * vms.h (_bfd_vms_save_sized_string): Update prototype.
1776 (_bfd_vms_save_counted_string): Likewise.
1777 * vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to
1778 _bfd_vms_save_counted_string.
1779 (_bfd_vms_slurp_ehdr): Likewise.
1780 (_bfd_vms_slurp_egsd): Likewise.
1781 (Parse_module): Likewise.
1783 2017-06-21 Alan Modra <amodra@gmail.com>
1785 * elf64-ppc.c (ppc64_elf_size_stubs): Test for localentry:0 plt
1786 calls before tocsave calls.
1787 (ppc64_elf_relocate_section): Allow localentry:0 plt calls without
1790 2017-06-21 Nick Clifton <nickc@redhat.com>
1793 * reloc.c (bfd_generic_get_relocated_section_contents): Fail if
1794 bfd_get_full_section_contents returns no contents.
1796 2017-06-21 Nick Clifton <nickc@redhat.com>
1799 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized
1802 2017-06-21 Nick Clifton <nickc@redhat.com>
1805 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section
1807 (image_set_ptr): Likewise.
1808 (alpha_vms_fix_sec_rel): Likewise.
1809 (alpha_vms_slurp_relocs): Likewise.
1811 2017-06-21 Nick Clifton <nickc@redhat.com>
1814 * ieee.c (ieee_slurp_sections): Check for a NULL return from
1816 (ieee_archive_p): Likewise.
1817 (ieee_object_p): Likewise.
1819 2017-06-21 Nick Clifton <nickc@redhat.com>
1822 * elf.c (setup_group): Zero the group section pointer list after
1823 allocation so that loops can be caught. Check for NULL pointers
1824 when processing a group list.
1826 2017-06-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1828 * elf-s390.h: New file.
1829 * elf64-s390.c (struct elf_s390_link_hash_table): Add params
1831 (elf_s390_additional_program_headers): New function.
1832 (elf_s390_modify_segment_map): New function.
1833 (bfd_elf_s390_set_options): New function.
1834 (elf_backend_additional_program_headers)
1835 (elf_backend_modify_segment_map): Add macro definitions.
1837 2017-06-19 H.J. Lu <hongjiu.lu@intel.com>
1840 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
1841 the DYNAMIC bit instead of bfd_count_sections.
1843 2017-06-19 Nick Clifton <nickc@redhat.com>
1846 * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record
1848 (evax_bfd_print_eeom): Likewise.
1849 (evax_bfd_print_egsd): Check for an overlarge record length.
1850 (evax_bfd_print_etir): Likewise.
1852 2017-06-19 Nick Clifton <nickc@redhat.com>
1855 * libieee.h (struct common_header_type): Add end_p field.
1856 * ieee.c (this_byte_and_next): Do not advance input_p beyond
1858 (read_id): Check for a length that exceeds the remaining bytes in
1860 (ieee_seek): Initialise end_p.
1861 (ieee_archive_p): Likewise.
1862 (ieee_object_p): Likewise.
1864 2017-06-19 Nick Clifton <nickc@redhat.com>
1867 * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset
1868 before reading the EIHS structure entries.
1870 2017-06-19 Nick Clifton <nickc@redhat.com>
1873 * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for
1874 gsd_size. Check that there are enough bytes remaining to read the
1875 type and size of the next egsd. Check that the size of the egsd
1876 does not exceed the size of the record.
1878 2017-06-19 Alan Modra <amodra@gmail.com>
1880 * config.bfd: Correct targ_underscore for cris.
1882 2017-06-18 Alan Modra <amodra@gmail.com>
1884 * config.bfd: Correct targ_underscore for epiphany, ip2k,
1885 m32c, mn10200, pru, rl78, rx, crisv32 and v850.
1887 2017-06-16 Nick Clifton <nickc@redhat.com>
1889 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
1890 bucketlist is empty because there are no symbols to add to the
1893 2017-06-16 Alan Modra <amodra@gmail.com>
1899 * targets.c (struct bfd_target): Add _bfd_define_start_stop.
1900 (BFD_JUMP_TABLE_LINK): Likewise.
1901 * elf-bfd.h (bfd_elf_define_start_stop): Declare.
1902 * elflink.c (_bfd_elf_gc_mark_rsec): Update comment.
1903 (bfd_elf_define_start_stop): New function.
1904 * linker.c (bfd_generic_define_start_stop): New function.
1905 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init
1907 * aout-adobe.c (aout_32_bfd_define_start_stop): Define.
1908 * aout-target.h (MY_bfd_define_start_stop): Define.
1909 * aout-tic30.c (MY_bfd_define_start_stop): Define.
1910 * binary.c (binary_bfd_define_start_stop): Define.
1911 * bout.c (b_out_bfd_define_start_stop): Define.
1912 * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define.
1913 * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define.
1914 * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define.
1915 * coffcode.h (coff_bfd_define_start_stop): Define.
1916 * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define.
1917 * i386msdos.c (msdos_bfd_define_start_stop): Define.
1918 * i386os9k.c (os9k_bfd_define_start_stop): Define.
1919 * ieee.c (ieee_bfd_define_start_stop): Define.
1920 * ihex.c (ihex_bfd_define_start_stop): Define.
1921 * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define.
1922 * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define.
1923 * mmo.c (mmo_bfd_define_start_stop): Define.
1924 * nlm-target.h (nlm_bfd_define_start_stop): Define.
1925 * oasys.c (oasys_bfd_define_start_stop): Define.
1926 * pef.c (bfd_pef_bfd_define_start_stop): Define.
1927 * plugin.c (bfd_plugin_bfd_define_start_stop): Define.
1928 * ppcboot.c (ppcboot_bfd_define_start_stop): Define.
1929 * som.c (som_bfd_define_start_stop): Define.
1930 * srec.c (srec_bfd_define_start_stop): Define.
1931 * tekhex.c (tekhex_bfd_define_start_stop): Define.
1932 * versados.c (versados_bfd_define_start_stop): Define.
1933 * vms-alpha.c (vms_bfd_define_start_stop): Define.
1934 (alpha_vms_bfd_define_start_stop): Define.
1935 * xsym.c (bfd_sym_bfd_define_start_stop): Define.
1936 * bfd-in2.h: Regenerate.
1937 * libbfd.h: Regenerate.
1939 2017-06-16 Jiong Wang <jiong.wang@arm.com>
1941 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
1942 SYMBOL_REFERENCES_LOCAL.
1944 2017-06-15 Jiong Wang <jiong.wang@arm.com>
1947 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
1948 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
1949 runtime for if there needs copy relocation elimination.
1950 (need_copy_relocation_p): New function. Return true for symbol with
1951 pc-relative references and if it's against read-only sections.
1952 (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
1953 (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
1954 that are related with accessing external objects.
1955 (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change
1956 in elfNN_aarch64_check_relocs.
1958 2017-06-15 Nick Clifton <nickc@redhat.com>
1961 * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
1964 (ieee_archive_p): Likewise.
1966 2017-06-15 Nick Clifton <nickc@redhat.com>
1969 * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
1971 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
1973 * elf32-xtensa.c (elf_xtensa_be_plt_entry,
1974 elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays,
1975 keep both windowed and call0 ABI PLT definitions.
1976 (elf_xtensa_create_plt_entry): Use selected ABI to choose upper
1977 elf_xtensa_*_plt_entry endex.
1978 (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size.
1980 2017-06-14 Nick Clifton <nickc@redhat.com>
1983 * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
1986 2017-06-14 Nick Clifton <nickc@redhat.com>
1989 * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
1990 maximum value for the ascic pointer. Check that name processing
1991 does not read beyond this value.
1992 (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
1995 2017-06-14 Nick Clifton <nickc@redhat.com>
1998 * versados.c (versados_mkobject): Zero the allocated tdata structure.
1999 (process_otr): Check for an invalid offset in the otr structure.
2001 2017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
2003 * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
2005 2017-06-13 H.J. Lu <hongjiu.lu@intel.com>
2011 * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
2012 vtable field to a union.
2013 (_bfd_elf_is_start_stop): Removed.
2014 * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
2015 __start_SECNAME and __stop_SECNAME symbols.
2016 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
2017 * elflink.c (_bfd_elf_is_start_stop): Removed.
2018 (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
2019 _bfd_elf_is_start_stop.
2020 (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
2021 __stop_SECNAME symbols. Updated.
2022 (elf_gc_smash_unused_vtentry_relocs): Likewise.
2023 (bfd_elf_gc_record_vtinherit): Likewise.
2024 (bfd_elf_gc_record_vtentry): Likewise.
2026 2017-06-13 Nick Clifton <nickc@redhat.com>
2029 * elflink.c (elf_link_adjust_relocs): Generate an error when
2030 encountering a reloc against a symbol removed by garbage
2033 2017-06-12 H.J. Lu <hongjiu.lu@intel.com>
2035 * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
2036 to merge_gnu_properties.
2037 * elf-properties.c (elf_merge_gnu_properties): Add struct
2038 bfd_link_info * and pass it to merge_gnu_properties.
2039 (elf_merge_gnu_property_list): Add struct bfd_link_info *
2040 and pass it to elf_merge_gnu_properties.
2041 (_bfd_elf_link_setup_gnu_properties): Pass info to
2042 elf_merge_gnu_property_list.
2043 * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
2045 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
2047 2017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
2050 * binary.c (binary_set_section_contents): Scale lma by octets
2051 per byte to set filepos.
2053 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2055 * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
2058 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2060 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
2063 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2065 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
2066 patched section contents for TLS IE reloc.
2067 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
2069 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2071 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
2072 RELOC_FOR_GLOBAL_SYMBOL macro.
2074 2018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2076 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
2079 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2081 * config/tc-arc.c (md_undefined_symbol): Changed.
2082 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
2084 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2086 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
2089 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2091 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
2092 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
2094 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2096 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
2099 2017-06-08 Richard Earnshaw <rearnsha@arm.com>
2101 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
2102 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
2103 is non-zero. Add clarifying comments.
2105 2017-06-08 H.J. Lu <hongjiu.lu@intel.com>
2107 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
2108 name. Use local IFUNC symbol name string to report unsupported
2109 non-PIC call to IFUNC function.
2110 (elf_i386_relocate_section): Dump local IFUNC name with minfo
2111 when generating R_386_IRELATIVE relocation.
2112 (elf_i386_finish_dynamic_symbol): Likewise.
2113 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
2115 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
2116 when generating R_X86_64_IRELATIVE relocation.
2117 (elf_x86_64_finish_dynamic_symbol): Likewise.
2119 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2121 * elf.c (setup_group): Make sure BFD sections are created for all
2122 group sections in the input file when processing SHF_GROUP
2124 (bfd_section_from_shdr): Avoid duplicating logic already
2125 implemented in `setup_group'.
2127 2017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
2130 * peXXigen.c (pe_print_idata): Use the address of the first thunk
2131 if the hint address is zero.
2133 2017-06-06 James Clarke <jrtc27@jrtc27.com>
2136 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
2137 ELF_COMMON_DEF_P for common symbols.
2139 2017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
2141 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
2142 SEC_GROUP sections as SEC_EXCLUDE.
2143 (bfd_elf_set_group_contents): Replace use of abort with an assert.
2144 (assign_section_numbers): Use resolve_section_groups flag instead
2145 of relocatable link type.
2146 (_bfd_elf_init_private_section_data): Use resolve_section_groups
2147 flag instead of checking the final_link flag for part of the
2148 checks in here. Fix white space as a result.
2149 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
2150 instead of relocatable link type.
2151 (bfd_elf_final_link): Likewise.
2153 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2155 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
2157 * elf32-score.c (score_elf_final_link_relocate): Likewise.
2158 (s3_bfd_score_elf_check_relocs): Likewise.
2159 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
2160 (score_elf_final_link_relocate): Likewise.
2161 (s7_bfd_score_elf_check_relocs): Likewise.
2163 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2165 * elflink.c (init_reloc_cookie_rels): Remove unused variable
2168 2017-06-06 Maciej W. Rozycki <macro@imgtec.com>
2170 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
2171 from `reloc_count' rather than decrementing it.
2172 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
2173 `reloc_count' by `int_rels_per_ext_rel'.
2174 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
2175 `reloc_count' by `int_rels_per_ext_rel' for last relocation
2176 entry determination.
2177 (s3_bfd_score_elf_check_relocs): Likewise.
2178 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
2179 (s7_bfd_score_elf_relocate_section): Likewise.
2180 (s7_bfd_score_elf_check_relocs): Likewise.
2181 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
2182 prototype and function.
2183 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
2184 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
2185 triple rather than once the sum of REL and RELA relocation entry
2187 (bfd_elf64_get_reloc_upper_bound): Remove macro.
2188 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
2189 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
2190 storage allocation size determination.
2191 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
2192 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
2193 by `int_rels_per_ext_rel' for last relocation entry
2195 (bfd_elf_final_link): Do not multiply `reloc_count' by
2196 `int_rels_per_ext_rel' for internal relocation storage
2197 allocation size determination.
2198 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
2199 `int_rels_per_ext_rel' for last relocation entry determination.
2200 (elf_gc_smash_unused_vtentry_relocs): Likewise.
2201 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
2202 (_bfd_mips_elf_relocate_section): Likewise.
2204 2017-06-05 Alan Modra <amodra@gmail.com>
2207 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
2209 2017-06-01 John Baldwin <jhb@FreeBSD.org>
2211 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
2212 determine structure sizes.
2213 (elfcore_grok_freebsd_prstatus): Likewise.
2215 2017-06-01 Alan Modra <amodra@gmail.com>
2217 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
2218 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
2220 (is_elfv2_localentry0): New function.
2221 (ppc64_elf_tls_setup): Default params->plt_localentry0.
2222 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
2223 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
2224 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
2225 optimized localentry:0 stubs.
2226 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
2227 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
2229 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
2231 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
2233 2017-05-30 Casey Smith <clegg89@gmail.com>
2236 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
2237 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
2239 2017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
2241 * cpu-arc.c (arc_compatible): New function.
2243 2017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
2245 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
2247 2017-05-30 H.J. Lu <hongjiu.lu@intel.com>
2250 * bfdio.c (bfd_get_file_size): New function.
2251 * bfd-in2.h: Regenerated.
2253 2017-05-23 Dilian Palauzov <git-dpa@aegee.org>
2255 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
2258 2017-05-22 H.J. Lu <hongjiu.lu@intel.com>
2260 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
2261 dynobj instead of htab->elf.dynobj.
2263 2017-05-19 Maciej W. Rozycki <macro@imgtec.com>
2265 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
2267 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
2268 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
2269 actual number of internal relocations retrieved. Adjust
2270 function description.
2271 (bfd_elf64_canonicalize_reloc): Remove macro.
2272 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
2274 2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
2276 * archures.c (bfd_mach_sparc_v9m8): Define.
2277 (bfd_mach_sparc_v8plusm8): Likewise.
2278 (bfd_mach_sparc_v9_p): Adjust to M8.
2279 (bfd_mach_sparc_64bit_p): Likewise.
2280 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
2281 bfd_mach_sparc_v8plusm8.
2282 * bfd-in2.h: Regenerated.
2283 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
2285 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
2286 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
2287 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
2289 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
2290 bfd_mach_sparc_v8plusm8.
2292 2017-05-19 Alan Modra <amodra@gmail.com>
2294 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
2295 debug and special sections when no non-note alloc sections in an
2298 2017-05-18 Alan Modra <amodra@gmail.com>
2300 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
2301 * elf-m10300.c: Likewise.
2303 * elf32-arc.c: Likewise.
2304 * elf32-bfin.c: Likewise.
2305 * elf32-m68k.c: Likewise.
2306 * elf32-nds32.c: Likewise.
2307 * elf32-tilepro.c: Likewise.
2308 * elflink.c: Likewise.
2309 * elfnn-aarch64.c: Likewise.
2310 * elfnn-riscv.c: Likewise.
2311 * elfxx-tilegx.c: Likewise.
2312 * mach-o.c: Likewise.
2313 * peXXigen.c: Likewise.
2314 * vms-alpha.c: Likewise.
2315 * vms-lib.c: Likewise.
2317 2017-05-17 H.J. Lu <hongjiu.lu@intel.com>
2320 * elflink.c (elf_gc_mark_debug_section): New function.
2321 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
2322 referenced by kept debug sections.
2324 2017-05-16 Alan Modra <amodra@gmail.com>
2326 * elf-m10300.c: Rename occurrences of non_ir_ref.
2327 * elf32-arm.c: Likewise.
2328 * elf32-bfin.c: Likewise.
2329 * elf32-cr16.c: Likewise.
2330 * elf32-cris.c: Likewise.
2331 * elf32-d10v.c: Likewise.
2332 * elf32-dlx.c: Likewise.
2333 * elf32-fr30.c: Likewise.
2334 * elf32-frv.c: Likewise.
2335 * elf32-hppa.c: Likewise.
2336 * elf32-i370.c: Likewise.
2337 * elf32-i386.c: Likewise.
2338 * elf32-iq2000.c: Likewise.
2339 * elf32-lm32.c: Likewise.
2340 * elf32-m32c.c: Likewise.
2341 * elf32-m32r.c: Likewise.
2342 * elf32-m68hc1x.c: Likewise.
2343 * elf32-m68k.c: Likewise.
2344 * elf32-mcore.c: Likewise.
2345 * elf32-metag.c: Likewise.
2346 * elf32-microblaze.c: Likewise.
2347 * elf32-moxie.c: Likewise.
2348 * elf32-msp430.c: Likewise.
2349 * elf32-mt.c: Likewise.
2350 * elf32-nios2.c: Likewise.
2351 * elf32-or1k.c: Likewise.
2352 * elf32-ppc.c: Likewise.
2353 * elf32-rl78.c: Likewise.
2354 * elf32-s390.c: Likewise.
2355 * elf32-score.c: Likewise.
2356 * elf32-score7.c: Likewise.
2357 * elf32-sh.c: Likewise.
2358 * elf32-tic6x.c: Likewise.
2359 * elf32-tilepro.c: Likewise.
2360 * elf32-v850.c: Likewise.
2361 * elf32-vax.c: Likewise.
2362 * elf32-xstormy16.c: Likewise.
2363 * elf32-xtensa.c: Likewise.
2364 * elf64-alpha.c: Likewise.
2365 * elf64-hppa.c: Likewise.
2366 * elf64-ia64-vms.c: Likewise.
2367 * elf64-mmix.c: Likewise.
2368 * elf64-ppc.c: Likewise.
2369 * elf64-s390.c: Likewise.
2370 * elf64-sh64.c: Likewise.
2371 * elf64-x86-64.c: Likewise.
2372 * elflink.c: Likewise.
2373 * elfnn-aarch64.c: Likewise.
2374 * elfnn-ia64.c: Likewise.
2375 * elfnn-riscv.c: Likewise.
2376 * elfxx-mips.c: Likewise.
2377 * elfxx-sparc.c: Likewise.
2378 * elfxx-tilegx.c: Likewise.
2379 * linker.c: Likewise.
2381 2017-05-16 Alan Modra <amodra@gmail.com>
2383 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
2384 * elflink.c (elf_link_add_object_symbols): Update to use
2386 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
2388 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
2390 2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
2392 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
2394 2017-05-12 H.J. Lu <hongjiu.lu@intel.com>
2396 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
2397 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
2399 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
2401 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
2403 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
2405 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
2406 to plt_second/plt_second_eh_frame.
2407 (elf_x86_64_link_hash_newfunc): Updated.
2408 (elf_x86_64_allocate_dynrelocs): Likewise.
2409 (elf_x86_64_size_dynamic_sections): Likewise.
2410 (elf_x86_64_relocate_section): Likewise.
2411 (elf_x86_64_finish_dynamic_symbol): Likewise.
2412 (elf_x86_64_finish_dynamic_sections): Likewise.
2413 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
2414 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
2416 (elf_backend_setup_gnu_properties): Updated. Create the
2417 .plt.sec section instead of the .plt.sec section.
2419 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
2421 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
2422 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
2423 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
2425 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
2427 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
2428 (bfd_elf64_set_reloc): Define.
2429 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
2431 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
2433 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
2434 (struct bfd_target): New field _bfd_set_reloc.
2435 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
2436 * reloc.c (_bfd_generic_set_reloc): New function.
2437 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
2438 * nlm-target.h (nlm_set_reloc): Likewise.
2439 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
2440 * aout-tic30.c (MY_set_reloc): Likewise.
2441 * aout-target.h (MY_set_reloc): Likewise.
2442 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
2443 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
2444 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
2445 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
2446 * aout-adobe.c (aout_32_set_reloc): Likewise.
2447 * bout.c (b_out_set_reloc): Likewise.
2448 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
2449 * i386os9k.c (aout_32_set_reloc): Likewise.
2450 * ieee.c (ieee_set_reloc): Likewise.
2451 * oasys.c (oasys_set_reloc): Likewise.
2452 * som.c (som_set_reloc): Likewise.
2453 * versados.c (versados_set_reloc): Likewise.
2454 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
2455 _bfd_generic_set_reloc.
2456 (rs6000_xcoff64_aix_vec): LIkewise.
2457 * libbfd.c (_bfd_norelocs_set_reloc): New function.
2458 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
2459 * i386msdos.c (msdos_set_reloc): Define to
2460 _bfd_norelocs_set_reloc.
2461 * elfcode.h (elf_set_reloc): Define.
2462 * bfd-in2.h: Regenerated.
2464 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
2467 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
2468 for IFUNC function address.
2470 2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
2472 * elf32-arc.c (FEATURE_LIST_NAME): Define.
2473 (CONFLICT_LIST): Likewise.
2474 (opcode/arc-attrs.h): Include.
2475 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
2476 (arc_extract_features): New file.
2477 (arc_stralloc): Likewise.
2478 (arc_elf_merge_attributes): Likewise.
2479 (arc_elf_merge_private_bfd_data): Use object attributes.
2480 (bfd_arc_get_mach_from_attributes): New function.
2481 (arc_elf_object_p): Use object attributes.
2482 (arc_elf_final_write_processing): Likewise.
2483 (elf32_arc_obj_attrs_arg_type): New function.
2484 (elf32_arc_obj_attrs_handle_unknown): Likewise.
2485 (elf32_arc_section_from_shdr): Likewise.
2486 (elf_backend_obj_attrs_vendor): Define.
2487 (elf_backend_obj_attrs_section): Likewise.
2488 (elf_backend_obj_attrs_arg_type): Likewise.
2489 (elf_backend_obj_attrs_section_type): Likewise.
2490 (elf_backend_obj_attrs_handle_unknown): Likewise.
2491 (elf_backend_section_from_shdr): Likewise.
2493 2017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
2496 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
2497 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
2498 and the destination is a Thumb symbol.
2500 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2502 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
2503 initializer to silence GCC 4.2.
2504 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
2506 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2508 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
2509 (LAZY_PLT_ENTRY_SIZE): This.
2510 (NON_LAZY_PLT_ENTRY_SIZE): New.
2511 (elf_x86_64_plt0_entry): Renamed to ...
2512 (elf_x86_64_lazy_plt0_entry): This.
2513 (elf_x86_64_plt_entry): Renamed to ...
2514 (elf_x86_64_lazy_plt_entry): This.
2515 (elf_x86_64_bnd_plt0_entry): Renamed to ...
2516 (elf_x86_64_lazy_bnd_plt0_entry): This.
2517 (elf_x86_64_legacy_plt_entry): Removed.
2518 (elf_x86_64_bnd_plt_entry): Renamed to ...
2519 (elf_x86_64_lazy_bnd_plt_entry): This.
2520 (elf_x86_64_legacy_plt2_entry): Renamed to ...
2521 (elf_x86_64_non_lazy_plt_entry): This.
2522 (elf_x86_64_bnd_plt2_entry): Renamed to ...
2523 (elf_x86_64_non_lazy_bnd_plt_entry): This.
2524 (elf_x86_64_eh_frame_plt): Renamed to ...
2525 (elf_x86_64_eh_frame_lazy_plt): This.
2526 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
2527 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
2528 (elf_x86_64_eh_frame_plt_got): Renamed to ...
2529 (elf_x86_64_eh_frame_non_lazy_plt): This.
2530 (elf_x86_64_lazy_plt_layout): New.
2531 (elf_x86_64_non_lazy_plt_layout): Likewise.
2532 (elf_x86_64_plt_layout): Likewise.
2533 (elf_x86_64_backend_data): Remove PLT layout information. Add
2534 os for target system.
2535 (GET_PLT_ENTRY_SIZE): Removed.
2536 (elf_x86_64_lazy_plt): New.
2537 (elf_x86_64_non_lazy_plt): Likewise.
2538 (elf_x86_64_lazy_bnd_plt): Likewise.
2539 (elf_x86_64_non_lazy_bnd_plt): Likewise.
2540 (elf_x86-64_arch_bed): Updated.
2541 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
2542 (elf_x86_64_create_dynamic_sections): Removed.
2543 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
2544 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
2545 (elf_x86-64_adjust_dynamic_symbol): Updated.
2546 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
2547 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
2548 size for PLT0 if there is no PLT0. Get plt_entry_size from
2549 non_lazy_plt for non-lazy PLT entries.
2550 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
2551 from non_lazy_plt for non-lazy PLT entries.
2552 (elf_x86-64_relocate_section): Updated. Properly get PLT index
2553 if there is no PLT0.
2554 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
2555 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
2556 entries with non-lazy PLT layout. Don't fill the second and third
2557 slots in the PLT entry if there is no PLT0.
2558 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
2559 if there is no PLT0. Set sh_entsize on the .plt.got section.
2560 (compare_relocs): New.
2561 (elf_x86_64_plt_type): Likewise.
2562 (elf_x86_64_plt): Likewise.
2563 (elf_x86_64_nacl_plt): New. Forward declaration.
2564 (elf_x86_64_get_plt_sym_val): Removed.
2565 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
2566 against all dynamic relocations.
2567 (elf_x86_64_link_setup_gnu_properties): New function.
2568 (elf_backend_create_dynamic_sections): Updated.
2569 (elf_backend_setup_gnu_properties): New.
2570 (elf_x86_64_nacl_plt): New.
2571 (elf_x86_64_nacl_arch_bed): Updated.
2573 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2575 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
2576 (LAZY_PLT_ENTRY_SIZE): This.
2577 (NON_LAZY_PLT_ENTRY_SIZE): New.
2578 (elf_i386_plt0_entry): Renamed to ...
2579 (elf_i386_lazy_plt0_entry): This.
2580 (elf_i386_plt_entry): Renamed to ...
2581 (elf_i386_lazy_plt_entry): This.
2582 (elf_i386_pic_plt0_entry): Renamed to ...
2583 (elf_i386_pic_lazy_plt0_entry): This.
2584 (elf_i386_pic_plt_entry): Renamed to ...
2585 (elf_i386_pic_lazy_plt_entry): This.
2586 (elf_i386_got_plt_entry): Renamed to ...
2587 (elf_i386_non_lazy_plt_entry): This.
2588 (elf_i386_pic_got_plt_entry): Renamed to ...
2589 (elf_i386_pic_non_lazy_plt_entry): This.
2590 (elf_i386_eh_frame_plt): Renamed to ...
2591 (elf_i386_eh_frame_lazy_plt): This.
2592 (elf_i386_eh_frame_plt_got): Renamed to ...
2593 (elf_i386_eh_frame_non_lazy_plt): This.
2594 (elf_i386_plt_layout): Renamed to ...
2595 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
2596 eh_frame_plt_got_size.
2597 (elf_i386_non_lazy_plt_layout): New.
2598 (elf_i386_plt_layout): Likewise.
2599 (elf_i386_non_lazy_plt): Likewise.
2600 (GET_PLT_ENTRY_SIZE): Removed.
2601 (elf_i386_plt): Renamed to ...
2602 (elf_i386_lazy_plt): This.
2603 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
2604 (elf_i386_arch_bed): Updated.
2605 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
2606 (elf_i386_create_dynamic_sections): Removed.
2607 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
2608 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
2609 (elf_i386_adjust_dynamic_symbol): Updated.
2610 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
2611 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
2612 size for PLT0 if there is no PLT0.
2613 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
2614 output section is discarded only if GOT isn't empty.
2615 (elf_i386_relocate_section): Updated. Properly get PLT index
2616 if there is no PLT0.
2617 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
2618 second and third slots in the PLT entry if there is no PLT0.
2619 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
2620 if there is no PLT0. Set sh_entsize on the .plt.got section.
2621 (elf_i386_nacl_plt): Forward declaration.
2622 (elf_i386_get_plt_sym_val): Removed.
2623 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
2624 against all dynamic relocations.
2625 (elf_i386_link_setup_gnu_properties): New function.
2626 (elf_backend_create_dynamic_sections): Updated.
2627 (elf_backend_setup_gnu_properties): New.
2628 (elf_i386_nacl_plt): Updated.
2629 (elf_i386_nacl_arch_bed): Likewise.
2630 (elf_i386_vxworks_arch_bed): Likewise.
2632 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
2634 * elflink.c (elf_output_implib): Remove executable flag from import
2636 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
2637 library is a relocatable object file.
2639 2017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
2642 * elf32-avr.c (avr_should_move_sym): New function.
2643 (avr_should_reduce_sym_size): Likewise.
2644 (avr_should_increase_sym_size): Likewise.
2645 (elf32_avr_relax_delete_bytes): Adjust symbol values
2646 and sizes by calling new functions.
2648 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
2650 * config.bfd (riscv32-*): Enable rv64.
2652 2017-05-02 Alan Modra <amodra@gmail.com>
2655 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
2656 rather than h->root.type == bfd_link_hash_new.
2657 (bfd_elf_record_link_assignment): Similarly, call
2658 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
2660 2017-04-29 Alan Modra <amodra@gmail.com>
2663 * reloc.c (reloc_offset_in_range): New function.
2664 (bfd_perform_relocation, bfd_install_relocation): Use it.
2665 (_bfd_final_link_relocate): Likewise.
2667 2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
2669 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
2670 before using .plt.got.
2671 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
2673 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2675 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
2676 instead of "+=" to update 0.
2678 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2680 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
2681 .plt.got section here.
2682 (elf_i386_check_relocs): Don't create the .plt.got section.
2683 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
2684 the .plt.got and .plt.bnd sections here.
2685 (elf_x86_64_check_relocs): Don't create the .plt.got nor
2688 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2690 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
2692 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
2693 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
2694 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
2695 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
2698 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2700 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
2702 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
2703 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
2704 the first relocatable ELF input with GNU properties.
2706 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2708 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
2709 VxWorks for non-PIC.
2711 2017-04-27 Alan Modra <amodra@gmail.com>
2713 * elf-bfd.h (struct elf_backend_data): Make asection param of
2714 elf_backend_eh_frame_address_size const.
2715 (_bfd_elf_eh_frame_address_size): Likewise.
2716 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
2717 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
2718 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
2719 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
2720 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
2721 (next_cie_fde_offset): Constify params.
2722 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
2724 2017-04-27 Alan Modra <amodra@gmail.com>
2726 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
2727 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
2728 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
2730 (offset_adjust): New function.
2731 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
2732 (adjust_eh_frame_local_symbols): Likewise.
2733 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
2734 after changing anything. Return true if anything changed.
2735 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
2736 _bfd_elf_adjust_eh_frame_global_symbol for globals.
2738 2017-04-27 Alan Modra <amodra@gmail.com>
2740 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
2743 2017-04-27 Alan Modra <amodra@gmail.com>
2745 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
2746 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
2747 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
2748 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
2749 for undef and undefweak dyn_relocs.
2750 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
2751 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
2752 (allocate_got, allocate_dynrelocs): Likewise.
2753 (ppc64_elf_relocate_section): Likewise.
2755 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
2757 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
2758 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
2759 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
2760 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
2762 2017-04-26 Nick Clifton <nickc@redhat.com>
2765 * reloc.c (bfd_perform_relocation): Check for a negative address
2768 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
2771 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
2773 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
2774 (elf_backend_always_renumber_dynsyms): Define.
2775 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
2776 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
2777 * elflink.c (bfd_elf_size_dynamic_sections): Also call
2778 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
2780 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
2782 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
2784 * elflink.c (bfd_elf_size_dynamic_sections): Only call
2785 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
2786 sections have been created.
2788 2017-04-26 Nick Clifton <nickc@redhat.com>
2791 * compress.c (bfd_init_section_compress_status): Check the return
2792 value from bfd_malloc.
2794 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
2796 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
2797 no_finish_dynamic_symbol.
2798 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
2800 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
2801 weak symbol, don't make it dynamic.
2802 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
2803 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
2804 relocation for GOT reference.
2805 (elf_x86_64_finish_dynamic_symbol): Abort if
2806 no_finish_dynamic_symbol isn't 0.
2808 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
2811 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
2812 undefined weak symbol, don't make it dynamic.
2813 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
2814 set no_finish_dynamic_symbol and generate R_386_RELATIVE
2815 relocation for R_386_GOT32.
2817 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
2820 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
2822 2017-04-23 Alan Modra <amodra@gmail.com>
2825 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
2826 * elf.c (lcomm_sym): New.
2827 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
2828 * bfd-in2.h: Regenerate.
2830 2017-04-23 Alan Modra <amodra@gmail.com>
2833 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
2834 parameters and comment.
2835 (_bfd_elf_get_reloc_section): Delete.
2836 (_bfd_elf_plt_get_reloc_section): Declare.
2837 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
2838 New functions. Don't blindly skip over assumed .rel/.rela prefix.
2840 (_bfd_elf_get_reloc_section): ..here. Delete.
2841 (assign_section_numbers): Call elf_get_reloc_section.
2842 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
2843 * elfxx-target.h (elf_backend_get_reloc_section): Update.
2845 2017-04-23 Alan Modra <amodra@gmail.com>
2848 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
2851 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
2854 * elf32-i386.c (elf_i386_link_hash_entry): Add
2855 no_finish_dynamic_symbol.
2856 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
2857 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
2858 symbol, don't make it dynamic in PIE.
2859 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
2860 set no_finish_dynamic_symbol and generate R_386_RELATIVE
2861 relocation for R_386_GOT32
2862 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
2865 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
2869 * elflink.c (elf_link_add_object_symbols): Require
2870 --no-dynamic-linker with -E/--dynamic-list when creating
2873 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
2875 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
2878 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
2880 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
2881 dynamic symbol sorting.
2883 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
2886 * elflink.c (elf_link_add_object_symbols): Preserve
2887 dynamic_ref_after_ir_def when restoring the symbol table for
2888 unneeded dynamic object.
2890 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
2893 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
2894 on on undefined IFUNC symbol in the second PLT.
2896 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
2898 * peXXigen.c (pe_print_reloc): Correct chunk_end.
2900 2017-04-19 Alan Modra <amodra@gmail.com>
2902 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
2903 or make dynamic for info->dynamic_undefined_weak 0 and 1.
2904 * elf32-ppc.c:Formatting.
2905 (ensure_undefweak_dynamic): Don't make dynamic when
2906 info->dynamic_undefined_weak is zero.
2907 (allocate_dynrelocs): Discard undefweak dyn_relocs for
2908 info->dynamic_undefined_weak. Discard undef dyn_relocs when
2909 not default visibility. Discard undef and undefweak
2911 (ppc_elf_relocate_section): Adjust to suit.
2912 * elf64-ppc.c: Formatting.
2913 (ensure_undefweak_dynamic): Don't make dynamic when
2914 info->dynamic_undefined_weak is zero.
2915 (allocate_dynrelocs): Discard undefweak dyn_relocs for
2916 info->dynamic_undefined_weak. Discard them earlier.
2918 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
2921 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
2922 before generating the version definition section.
2924 2017-04-17 Alan Modra <amodra@gmail.com>
2926 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
2927 state when a regular object file defines a symbol with
2928 incompatible type to that defined by an earlier shared lib.
2930 2017-04-13 Alan Modra <amodra@gmail.com>
2932 * coffcode.h: Wrap some overly long _bfd_error_handler args.
2934 * elf32-arm.c: Likewise.
2935 * elf32-i386.c: Likewise.
2936 * elf32-mep.c: Likewise.
2937 * elf64-ia64-vms.c: Likewise.
2938 * elf64-x86-64.c: Likewise.
2939 * elflink.c: Likewise.
2940 * elfnn-ia64.c: Likewise.
2941 * elfxx-mips.c: Likewise.
2943 2017-04-13 Alan Modra <amodra@gmail.com>
2945 * aoutx.h: Use %B and %A in error messages throughout file.
2946 * aout-cris.c: Likewise.
2947 * archive.c: Likewise.
2948 * binary.c: Likewise.
2949 * coff-rs6000.c: Likewise.
2950 * coff-tic4x.c: Likewise.
2951 * coffcode.h: Likewise.
2952 * coffgen.c: Likewise.
2953 * cofflink.c: Likewise.
2954 * coffswap.h: Likewise.
2955 * cpu-arm.c: Likewise.
2956 * elf-eh-frame.c: Likewise.
2957 * elf-m10300.c: Likewise.
2959 * elf32-arc.c: Likewise.
2960 * elf32-arm.c: Likewise.
2961 * elf32-bfin.c: Likewise.
2962 * elf32-frv.c: Likewise.
2963 * elf32-iq2000.c: Likewise.
2964 * elf32-m32c.c: Likewise.
2965 * elf32-microblaze.c: Likewise.
2966 * elf32-nds32.c: Likewise.
2967 * elf32-rl78.c: Likewise.
2968 * elf32-rx.c: Likewise.
2969 * elf32-score.c: Likewise.
2970 * elf32-score7.c: Likewise.
2971 * elf32-sh64.c: Likewise.
2972 * elf32-v850.c: Likewise.
2973 * elf32-vax.c: Likewise.
2974 * elf32-visium.c: Likewise.
2975 * elf64-ia64-vms.c: Likewise.
2976 * elf64-mmix.c: Likewise.
2977 * elf64-sh64.c: Likewise.
2978 * elfcode.h: Likewise.
2979 * elfnn-aarch64.c: Likewise.
2980 * elfnn-ia64.c: Likewise.
2981 * elfxx-mips.c: Likewise.
2982 * hpux-core.c: Likewise.
2985 * linker.c: Likewise.
2986 * merge.c: Likewise.
2988 * oasys.c: Likewise.
2989 * pdp11.c: Likewise.
2990 * peXXigen.c: Likewise.
2991 * rs6000-core.c: Likewise.
2992 * vms-alpha.c: Likewise.
2993 * xcofflink.c: Likewise.
2995 2017-04-13 Alan Modra <amodra@gmail.com>
2997 * bfd.c (PRINT_TYPE): Define.
2998 (_doprnt): New function.
2999 (error_handler_internal): Use _doprnt.
3000 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
3001 calls in their natural order, throughout file.
3002 * coff-mcore.c: Likewise.
3003 * coff-ppc.c: Likewise.
3004 * coff-tic80.c: Likewise.
3005 * cofflink.c: Likewise.
3006 * elf-s390-common.c: Likewise.
3008 * elf32-arm.c: Likewise.
3009 * elf32-i386.c: Likewise.
3010 * elf32-m32r.c: Likewise.
3011 * elf32-msp430.c: Likewise.
3012 * elf32-spu.c: Likewise.
3013 * elf64-ia64-vms.c: Likewise.
3014 * elf64-sparc.c: Likewise.
3015 * elf64-x86-64.c: Likewise.
3016 * elflink.c: Likewise.
3017 * elfnn-aarch64.c: Likewise.
3018 * elfnn-ia64.c: Likewise.
3019 * elfxx-mips.c: Likewise.
3021 2017-04-13 Alan Modra <amodra@gmail.com>
3023 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
3024 branch veneers" error. Fix double space and format message.
3025 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
3026 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
3028 2017-04-13 Alan Modra <amodra@gmail.com>
3030 * bfd-in2.h: Regenerate.
3032 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
3034 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
3035 extra `\n' in warning/error messages.
3036 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
3037 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3039 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
3041 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
3042 processor-specific properties with generic ELF target vector.
3044 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
3046 * elf32-sparc.c (elf_backend_fixup_symbol): New.
3047 * elf64-sparc.c (elf_backend_fixup_symbol): New.
3048 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
3049 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
3051 (link_hash_newfunc): Initialize has_got_reloc and
3053 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
3055 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
3057 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
3059 (_bfd_sparc_elf_fixup_symbol): New function.
3060 (allocate_dynrelocs): Don't allocate space for dynamic
3061 relocations and discard relocations against resolved undefined
3062 weak symbols in executable. Don't make resolved undefined weak
3063 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
3064 relocation against undefined weak symbols in PIE.
3065 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
3066 relocations against resolved undefined weak symbols in PIE
3067 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
3068 without ynamic PLT/GOT relocations for resolved undefined weak
3070 Don't generate dynamic relocation against resolved undefined
3071 weak symbol in executable.
3072 (pie_finish_undefweak_symbol): New function.
3073 (_bfd_sparc_elf_finish_dynamic_sections): Call
3074 pie_finish_undefweak_symbol on all symbols in PIE.
3075 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
3076 (_bfd_sparc_elf_fixup_symbol): New function.
3078 2017-04-10 Nick Clifton <nickc@redhat.com>
3080 * config.bfd: Remove ns32k from obsolete list.
3082 2017-04-10 Alan Modra <amodra@gmail.com>
3085 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
3086 (special_sections_i): Likewise for .init_array.
3087 (special_sections_p): Likewise for .preinit_array.
3089 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
3093 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
3094 ELF_COMMON_DEF_P for common symbols.
3095 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3096 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
3097 * elflink.c (_bfd_elf_merge_symbol): Revert commits
3098 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
3099 07492f668d2173da7a2bda3707ff0985e0f460b6.
3101 2017-04-07 Pedro Alves <palves@redhat.com>
3103 * opncls.c (bfd_get_debug_link_info): Rename to...
3104 (bfd_get_debug_link_info_1): ... this. Change type of second
3105 parameter to void pointer. Adjust.
3106 (bfd_get_debug_link_info): Reimplement on top of
3107 bfd_get_debug_link_info_1.
3108 (separate_debug_file_exists, separate_alt_debug_file_exists):
3109 Change type of second parameter to void pointer. Adjust.
3110 (get_func_type, check_func_type): Change type of second parameter
3112 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
3113 the callback functions instead of passing the address of a local.
3114 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
3115 find_separate_debug_file.
3116 (get_alt_debug_link_info_shim): Change type of second parameter to
3117 void pointer. Adjust.
3118 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
3119 find_separate_debug_file.
3120 (get_build_id_name, bfd_boolean check_build_id_file): Change type
3121 of second parameter to void pointer. Adjust.
3122 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
3123 pointer local to find_separate_debug_file.
3125 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
3127 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
3128 external symbols with a definition.
3129 (_bfd_coff_gc_mark_extra_sections): Fix typo.
3131 2017-04-07 Alan Modra <amodra@gmail.com>
3133 * po/SRC-POTFILES.in: Regenerate.
3135 2017-04-05 Alan Modra <amodra@gmail.com>
3137 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
3140 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
3142 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
3143 numbers for DataDirectory entry indicies passed to
3146 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
3148 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
3149 each GNU_MBIND section and align GNU_MBIND section to page size.
3150 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
3151 segment for each GNU_MBIND section.
3152 (_bfd_elf_init_private_section_data): Copy sh_info from input
3153 for GNU_MBIND section.
3155 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
3157 * elfnn-riscv.c (GP_NAME): Delete.
3158 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
3159 (_bfd_riscv_relax_lui): Likewise.
3161 2017-04-04 Nick Clifton <nickc@redhat.com>
3164 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
3166 (bfd_elf_final_link): Only initialize the extended symbol index
3167 section if there are extended symbol tables to list.
3169 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
3171 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
3172 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
3173 * configure.ac (elf): Add elf-properties.lo.
3174 * Makefile.in: Regenerated.
3175 * configure: Likewise.
3176 * elf-bfd.h (elf_property_kind): New.
3177 (elf_property): Likewise.
3178 (elf_property_list): Likewise.
3179 (elf_properties): Likewise.
3180 (_bfd_elf_parse_gnu_properties): Likewise.
3181 (_bfd_elf_get_property): Likewise.
3182 (_bfd_elf_link_setup_gnu_properties): Likewise.
3183 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
3184 and setup_gnu_properties.
3185 (elf_obj_tdata): Add properties.
3186 * elf-properties.c: New file.
3187 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
3188 (elf_i386_merge_gnu_properties): Likewise.
3189 (elf_backend_parse_gnu_properties): Likewise.
3190 (elf_backend_merge_gnu_properties): Likewise.
3191 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3192 (elf_x86_64_merge_gnu_properties): Likewise.
3193 (elf_backend_parse_gnu_properties): Likewise.
3194 (elf_backend_merge_gnu_properties): Likewise.
3195 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
3196 (elf_backend_parse_gnu_properties): Likewise.
3197 (elf_backend_setup_gnu_properties): Likewise.
3198 (elfNN_bed): Add elf_backend_parse_gnu_properties,
3199 elf_backend_merge_gnu_properties and
3200 elf_backend_setup_gnu_properties.
3202 2017-03-30 Pip Cet <pipcet@gmail.com>
3204 * elf32-wasm32.c: Add relocation code, two relocs.
3205 * reloc.c: Add wasm32 relocations.
3206 * libbfd.h: Regenerate.
3207 * bfd-in2.h: Regenerate.
3208 * bfd/po/bfd.pot: Regenerate.
3210 2017-03-29 Nick Clifton <nickc@redhat.com>
3213 * coff-bfd.h (struct coff_section_data): Add new fields:
3214 saved_bias and bias.
3215 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
3216 computed for PE binaries.
3217 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
3220 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
3223 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
3224 to handle a local symbol with a hash-symbol-entry; without PLT.
3225 Add BFD_ASSERT for an incidental case with GOT entry present.
3226 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
3227 isn't forced-or-set local.
3229 2017-03-27 Pip Cet <pipcet@gmail.com>
3231 * wasm-module.c: New file to support WebAssembly modules.
3232 * wasm-module.h: New file to support WebAssembly modules.
3233 * doc/webassembly.texi: Start documenting wasm-module.c.
3234 * config.bfd: Add wasm_vec.
3235 * targets.c: Likewise.
3236 * configure.ac: Likewise.
3237 * Makefile.am: Add entries for wasm-module.c.
3238 * Makefile.in: Regenerate.
3239 * configure: Regenerate.
3240 * po/SRC-POTFILES.in: Regenerate.
3242 2017-03-27 Pip Cet <pipcet@gmail.com>
3244 * cpu-wasm32.c: New file to support wasm32 architecture.
3245 * elf32-wasm32.c: New file to support wasm32 architecture.
3246 * Makefile.am: Add wasm32 architecture.
3247 * archures.c: Likewise.
3248 * config.bfd: Likewise.
3249 * configure.ac: Likewise.
3250 * targets.c: Likewise.
3251 * Makefile.in: Regenerate.
3252 * bfd-in2.h: Regenerate.
3253 * configure: Regenerate.
3254 * po/SRC-POTFILES.in: Regenerate.
3256 2017-03-20 Alan Modra <amodra@gmail.com>
3259 * elf64-ppc.c (compare_symbols): Stabilize sort.
3261 2017-03-18 Alan Modra <amodra@gmail.com>
3263 * elf64-ppc.c (struct ppc_link_hash_table): Add
3264 local_ifunc_resolver and maybe_local_ifunc_resolver.
3265 (ppc_build_one_stub): Set flags on emitting dynamic
3266 relocation to ifunc.
3267 (ppc64_elf_relocate_section): Likewise.
3268 (ppc64_elf_finish_dynamic_symbol): Likewise.
3269 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
3270 local dynamic relocs to ifuncs.
3271 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
3272 local_ifunc_resolver and maybe_local_ifunc_resolver.
3273 (ppc_elf_relocate_section): Set flag on emitting dynamic
3274 relocation to ifuncs.
3275 (ppc_elf_finish_dynamic_symbol): Likewise.
3276 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
3277 dynamic relocs to ifuncs.
3279 2017-03-13 Nick Clifton <nickc@redhat.com>
3282 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
3283 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
3284 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
3285 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
3286 * bfd-in2.h: Regenerate.
3287 * libbfd.h: Regenerate.
3288 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
3290 (IS_AARCH64_TLSDESC_RELOC): Likewise.
3291 (elfNN_aarch64_howto_table): Likewise.
3292 (aarch64_tls_transition_without_check): Likewise.
3293 (aarch64_reloc_got_type): Likewise.
3294 (elfNN_aarch64_final_link_relocate): Likewise.
3295 (elfNN_aarch64_tls_relax): Likewise.
3296 (elfNN_aarch64_relocate_section): Likewise.
3297 (elfNN_aarch64_gc_sweep_hook): Likewise.
3298 (elfNN_aarch64_check_relocs): Likewise.
3299 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
3300 (_bfd_aarch64_elf_resolve_relocation): Likewise.
3302 2017-03-11 Alan Modra <amodra@gmail.com>
3304 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
3305 parameter is in fact used. Whitespace fixes.
3306 * elf64-ppc.c: Likewise.
3308 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
3310 * rs6000-core.c (CORE_NEW): Simplify macro when
3311 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
3313 2017-03-07 Alan Modra <amodra@gmail.com>
3317 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
3320 2017-03-05 Alan Modra <amodra@gmail.com>
3322 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
3323 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
3324 (next_cie_fde_offset): New function.
3325 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
3326 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
3327 four bytes. Align CIEs to four or eight bytes depending on
3328 per_encoding_aligned8. Align FDEs according to their encoding.
3329 Pad last FDE to output section alignment.
3330 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
3332 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
3333 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
3334 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
3336 2017-03-02 Martin Bickel <binutils@ineranves.de>
3339 * elf.c (rewrite_elf_program_header): Do not issue a warning for
3340 empty segments which have a zero filesz, but a non-zero memsz.
3342 2017-03-02 Alan Modra <amodra@gmail.com>
3344 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
3346 2017-02-28 Alan Modra <amodra@gmail.com>
3348 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
3349 (ppc64_elf_relocate_section): Likewise.
3351 2017-02-28 Alan Modra <amodra@gmail.com>
3354 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
3355 rather than elf32_nios2_hash_table or elf_hash_table.
3356 (create_got_section): Likewise.
3357 (nios2_elf32_finish_dynamic_symbol): Likewise.
3358 (nios2_elf32_adjust_dynamic_symbol): Likewise.
3359 (nios2_elf32_size_dynamic_sections): Likewise.
3360 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
3361 vars. Use htab equivalents directly instead. Don't create
3362 all dynamic sections on needing just the GOT. Use a goto
3363 rather than a fall-through with reloc test. Ensure
3364 htab->dynobj is set when making dynamic sreloc section.
3365 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
3366 equivalent directly instead. Don't segfault on looking for
3367 .dynamic when dynamic sections have not been created. Don't
3368 segfault on .got.plt being discarded.
3369 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
3370 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
3371 fixme and another not so relevant comment.
3372 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
3373 already set, set hash table dynobj on creating .sbss.
3375 2017-02-28 Alan Modra <amodra@gmail.com>
3377 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
3378 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
3379 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
3380 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
3381 (ppc64_elf_relocate_section): Likewise.
3382 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
3383 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
3384 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
3385 * libbfd.h: Regenerate.
3386 * bfd-in2.h: Regenerate.
3388 2017-02-28 Alan Modra <amodra@gmail.com>
3390 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
3391 dynamic .data.rel.ro read-only.
3392 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
3393 rather than section flags when deciding where copy reloc goes.
3394 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
3395 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
3396 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
3397 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
3398 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
3399 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
3400 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
3401 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
3402 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3403 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
3404 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
3405 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
3406 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3407 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
3408 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
3409 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
3410 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
3411 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
3412 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
3414 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
3416 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
3417 `jalr $0, $25' instruction encoding.
3419 2017-02-27 Nick Clifton <nickc@redhat.com>
3422 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
3423 generating a seg-fault when encountering a symbol that has been
3424 deleted by garbage collection.
3426 2017-02-25 Alan Modra <amodra@gmail.com>
3428 * elf32-arc.c (struct dynamic_sections): Delete.
3429 (enum dyn_section_types): Delete.
3430 (dyn_section_names): Delete.
3431 (arc_create_dynamic_sections): Delete.
3432 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
3433 segfault on discarded .rela.plt section.
3434 (elf_arc_size_dynamic_sections): Formatting. Don't call
3435 arc_create_dynamic_sections. Don't allocate memory for sections
3436 handled by the generic linker. Correct code finding relocs in
3437 read-only sections. Set SEC_EXCLUDE on zero size .got,
3438 .got.plt, and .dynbss sections. Do set .interp for pies.
3440 2017-02-24 Andrew Waterman <andrew@sifive.com>
3442 * elfnn-riscv.c (GP_NAME): New macro.
3443 (riscv_global_pointer_value): Use it.
3444 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
3445 output section, consider only that section's alignment.
3447 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
3449 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
3450 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
3451 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
3452 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
3454 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
3456 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
3457 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
3460 2017-02-23 Alan Modra <amodra@gmail.com>
3463 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
3465 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
3466 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
3469 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
3472 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
3473 processing ahead of the call to `elf_gc_sweep_symbol'.
3475 2017-02-22 Nick Clifton <nickc@redhat.com>
3478 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
3479 created section 4-byte alignment.
3481 2017-02-22 Alan Modra <amodra@gmail.com>
3483 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
3484 on .got or .plt output section being discarded by script.
3485 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
3488 2017-02-21 Alan Modra <amodra@gmail.com>
3490 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
3491 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
3493 2017-02-20 Alan Modra <amodra@gmail.com>
3496 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
3497 if DT_RELSZ/DT_RELASZ is zero.
3499 2017-02-17 Nick Clifton <nickc@redhat.com>
3501 * compress.c (bfd_get_full_section_contents): Remember to reduce
3502 compressed size by the sizeof the compression header when
3503 decompressing the contents.
3505 2017-02-17 Pedro Alves <palves@redhat.com>
3507 * srec.c (Chunk): Rename to ...
3508 (_bfd_srec_len): ... this.
3509 (S3Forced): Rename to ...
3510 (_bfd_srec_forceS3): ... this.
3511 * objcopy.c: Adjust all references.
3513 2017-02-17 Pedro Alves <palves@redhat.com>
3515 * archive.c (bsd_write_armap): Rename to ...
3516 (_bfd_bsd_write_armap): ... this.
3517 (coff_write_armap): Rename to ...
3518 (_bfd_coff_write_armap): ... this.
3519 * libbfd-in.h (bsd_write_armap): Rename to ...
3520 (_bfd_bsd_write_armap): ... this.
3521 (coff_write_armap): Rename to ...
3522 (_bfd_coff_write_armap): ... this.
3523 * aout-target.h, aout-tic30.c: Adjust all users.
3524 * libbfd.h: Regenerate.
3526 2017-02-17 Pedro Alves <palves@redhat.com>
3528 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
3529 (warn_deprecated): Rename to ...
3530 (_bfd_warn_deprecated): ... this.
3531 * libbfd.c (warn_deprecated): Rename to ...
3532 (_bfd_warn_deprecated): ... this.
3533 * bfd-in2.h: Regenerate.
3535 2017-02-17 Pedro Alves <palves@redhat.com>
3537 * bfdio.c (real_ftell): Rename to ...
3538 (_bfd_real_ftell): ... this.
3539 (real_fseek): Rename to ...
3540 (_bfd_real_fseek): ... this.
3541 (real_fopen): Rename to ...
3542 (_bfd_real_fopen): ... this.
3543 * libbfd-in.h (real_ftell): Rename to ...
3544 (_bfd_real_ftell): ... this.
3545 (real_fseek): Rename to ...
3546 (_bfd_real_fseek): ... this.
3547 (real_fopen): Rename to ...
3548 (_bfd_real_fopen): ... this.
3549 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
3550 * libbfd.h: Regenerate.
3552 2017-02-17 Pedro Alves <palves@redhat.com>
3554 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
3555 * libbfd.c (read_unsigned_leb128): Rename to ...
3556 (_bfd_read_unsigned_leb128): ... this.
3557 (read_signed_leb128): Rename to ...
3558 (_bfd_read_signed_leb128): ... this.
3559 (safe_read_leb128): Rename to ...
3560 (_bfd_safe_read_leb128): ... this.
3561 * libbfd-in.h (read_unsigned_leb128): Rename to ...
3562 (_bfd_read_unsigned_leb128): ... this.
3563 (read_signed_leb128): Rename to ...
3564 (_bfd_read_signed_leb128): ... this.
3565 (safe_read_leb128): Rename to ...
3566 (_bfd_safe_read_leb128): ... this.
3567 * libbfd.h: Renegerate.
3569 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
3571 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
3572 before trying to fine matching file and line information.
3574 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
3576 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
3577 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
3578 not match current bfd, then reload debug information. Record bfd
3579 we're loading debug info for in the stash. If we have debug
3580 informatin in the cache then perform section placement before
3583 2017-02-16 Alan Modra <amodra@gmail.com>
3586 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
3587 * elfxx-target.h (elf_backend_no_page_alias): Define.
3588 (elfNN_bed): Init new field.
3589 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
3590 ensure PT_LOAD segment starts on a new page.
3591 * elf32-hppa.c (elf_backend_no_page_alias): Define.
3593 2017-02-16 Alan Modra <amodra@gmail.com>
3596 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
3599 2017-02-16 Jiong Wang <jiong.wang@arm.com>
3601 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
3602 * bfd-in2.h: Regenerated.
3604 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
3607 * elf32-i386.c (elf_i386_relocate_section): Allow
3608 "lea foo@GOT, %reg" in PIC.
3610 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
3613 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
3614 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
3615 error against local IFUNC symbol without a base register for
3618 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
3620 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
3621 `%P: %H:' with `info->callbacks->einfo'.
3622 (ppc_elf_relocate_section): Likewise.
3623 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
3624 (ppc64_elf_edit_toc): Likewise.
3625 (ppc64_elf_relocate_section): Likewise.
3627 2017-02-14 Alan Modra <amodra@gmail.com>
3629 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
3630 --gc-keep-exported, and test versioned field of sym rather than
3631 looking for @ in name.
3633 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
3635 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
3638 2017-02-13 Nick Clifton <nickc@redhat.com>
3641 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
3644 2017-02-07 Andrew Waterman <andrew@sifive.com>
3646 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
3647 entry size if PLT header is written.
3649 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
3651 Fix sparc64 dynamic relocation processing to use the dynamic
3653 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
3654 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
3657 2017-02-03 Nick Clifton <nickc@redhat.com>
3660 * coffcode.h (coff_write_object_contents): Enlarge size of
3661 s_name_buf in order to avoid compile time warning about possible
3663 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
3664 32-bits of insn value before printing into buffer.
3666 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3668 * elfxx-mips.c (mips_elf_hash_sort_data): Add
3669 `max_local_dynindx'.
3670 (mips_elf_sort_hash_table): Handle it.
3671 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
3672 symbols bump up `max_local_dynindx' rather than
3673 `max_non_got_dynindx'.
3675 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3677 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
3678 `min_got_dynindx', `max_unref_got_dynindx' and
3679 `max_non_got_dynindx' members to the `bfd_size_type' data type.
3680 (mips_elf_sort_hash_table): Adjust accordingly.
3682 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3684 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
3685 to access the hash table.
3687 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3689 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
3690 non-NULL `htab' to the beginning.
3692 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3694 * elflink.c (elf_gc_sweep): Wrap overlong line.
3696 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
3698 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
3699 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
3700 * elfxx-mips.c (mips_elf_link_hash_table): Add
3701 `ignore_branch_isa' member.
3702 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
3703 in branch relocation calculation as an error if
3704 `ignore_branch_isa' has been set.
3705 (_bfd_mips_elf_insn32): Rename to...
3706 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
3707 parameter to `insn32' and add an `ignore_branch_isa' parameter.
3708 Handle the new parameter.
3710 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
3712 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
3713 local variable dynobj.
3716 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
3717 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
3718 executable from read-only sections into sdynrelro.
3719 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
3720 dynamic relocs in sdynrelro.
3721 (elf_backend_want_dynrelro): Define.
3723 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
3725 * config.bfd (*-*-rtemsaout*): Mark as removed.
3727 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
3729 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
3730 (arm-*-rtems*): Move to (arm*-*-eabi*).
3731 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
3732 (m68-*-rtems*): Move to (m68*-*-elf*).
3734 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
3736 * config.bfd (*-*-rtemscoff*): Mark as removed.
3738 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
3741 * elflink.c (bfd_elf_record_link_assignment): Revert last
3742 change and don't ever clear `forced_local'. Set `mark'
3744 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
3746 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
3747 (bfd_elf_size_dynamic_sections): ... here.
3748 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
3749 and set `mark' instead in `__tls_get_addr_opt' processing.
3750 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
3752 2017-01-24 Alan Modra <amodra@gmail.com>
3754 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
3755 where dynamic relocs are preferable. Allow ifunc too.
3756 (ensure_undefweak_dynamic): New function.
3757 (allocate_dynrelocs): Use it here. Move plt handling last and
3758 don't make symbols dynamic, simplifying loop. Only make undef
3759 weak symbols with GOT entries dynamic. Correct condition
3760 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
3761 comments. Remove goto.
3762 (ppc_elf_relocate_section): Correct test for using dynamic
3763 symbol on GOT relocs. Rearrange test for emitting GOT relocs
3764 to suit. Set up explicit tls_index entries and implicit GOT
3765 tls_index entries resolvable at link time for
3766 __tls_get_addr_opt. Simplify test to clear mem for prelink.
3767 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
3768 (ensure_undefweak_dynamic): New function.
3769 (allocate_dynrelocs): Use it here. Only make undef weak symbols
3770 with GOT entries dynamic. Remove unnecessary test of
3771 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
3772 (ppc64_elf_relocate_section): Correct test for using dynamic
3773 symbol on GOT relocs. Rearrange test for emitting GOT relocs
3774 to suit. Set up explicit tls_index entries and implicit GOT
3775 tls_index entries resolvable at link time for __tls_get_addr_opt.
3776 Simplify expression to clear mem for prelink.
3778 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
3780 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
3782 2017-01-20 Jiong Wang <jiong.wang@arm.com>
3784 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
3785 (elf_backend_hash_symbol): Define.
3787 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
3790 * elflink.c (bfd_elf_record_link_assignment): Clear any
3791 `forced_local' marking for DSO symbols that are not being
3794 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
3796 * elfnn-riscv.c (riscv_elf_object_p): New function.
3798 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
3801 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
3803 (elf_x86_64_check_relocs): Create .eh_frame section for the
3805 (elf_x86_64_size_dynamic_sections): Allocate and initialize
3806 .eh_frame section for the .plt.bnd section.
3807 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
3808 for the .plt.bnd section.
3810 2017-01-12 Nick Clifton <nickc@redhat.com>
3813 * opncls.c (find_separate_debug_file): Add include_dirs
3814 parameter. Only include the directory part of the bfd's filename
3815 in search paths if include_dirs is true. Add a couple of extra
3816 locations for looking for debug files.
3817 ( bfd_follow_gnu_debuglink): Update invocation of
3818 find_separate_debug_file.
3819 (bfd_follow_gnu_debugaltlink): Likewise.
3820 (get_build_id): New function: Finds the build-id of the given bfd.
3821 (get_build_id_name): New function: Computes the name of the
3822 separate debug info file for a bfd, based upon its build-id.
3823 (check_build_id_file): New function: Checks to see if a separate
3824 debug info file exists at the given location, and that its
3825 build-id matches that of the original bfd.
3826 (bfd_follow_build_id_debuglink): New function: Finds a separate
3827 debug info file for a given bfd by using the build-id method.
3828 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
3829 method of locating a separate debug info file before using the
3831 * bfd-in2.h: Regenerate.
3833 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
3836 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
3837 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
3838 elf_x86_64_eh_frame_plt_got.
3839 (elf_x86_64_size_dynamic_sections): Get unwind info from
3840 elf_x86_64_bnd_arch_bed for the BND PLT.
3842 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
3844 * config.bfd: Add entries for i686-redox and x86_64-redox.
3846 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
3848 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
3850 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
3851 .eh_frame section to 4 bytes for x32.
3852 (elf_x86_64_check_relocs): Likewise.
3854 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
3857 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
3858 (PLT_GOT_FDE_LENGTH): Likewise.
3859 (elf_i386_plt_layout): Add eh_frame_plt_got and
3860 eh_frame_plt_got_size.
3861 (elf_i386_plt): Updated.
3862 (elf_i386_link_hash_table): Add plt_got_eh_frame.
3863 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
3864 (elf_i386_size_dynamic_sections): Allocate and initialize
3865 .eh_frame section for .plt.got.
3866 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
3868 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
3869 eh_frame_plt_got_size.
3870 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
3871 (PLT_GOT_FDE_LENGTH): Likewise.
3872 (elf_x86_64_backend_data): Add eh_frame_plt_got and
3873 eh_frame_plt_got_size.
3874 (elf_x86_64_arch_bed): Updated.
3875 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
3876 eh_frame_plt_got_size.
3877 (elf_x86_64_nacl_arch_bed): Likewise.
3878 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
3879 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
3880 (elf_x86_64_size_dynamic_sections): Allocate and initialize
3881 .eh_frame section for .plt.got.
3882 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
3885 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
3887 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
3888 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
3890 2017-01-09 Nick Clifton <nickc@redhat.com>
3892 * dwarf2.c (lookup_address_in_function_table): Return early if
3893 there are no functions in the given comp unit, or if the high
3894 address of the last function in the comp unit is less than the
3897 2017-01-09 Nick Clifton <nickc@redhat.com>
3900 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
3901 message if there are too many symbols to load.
3903 2017-01-04 James Clarke <jrtc27@jrtc27.com>
3905 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
3906 if relocs are cached.
3908 2017-01-03 Rich Felker <bugdal@aerifal.cx>
3911 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
3912 for R_MICROBLAZE_GOTOFF_64.
3914 2017-01-03 Nick Clifton <nickc@redhat.com>
3916 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
3917 warning about using a possibly uninitialised variable.
3919 2017-01-02 Alan Modra <amodra@gmail.com>
3921 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
3922 (allocate_plt_static, allocate_dynrelocs): Use it.
3924 2017-01-02 Alan Modra <amodra@gmail.com>
3926 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
3927 .PARISC.unwind section.
3929 2017-01-02 Alan Modra <amodra@gmail.com>
3932 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
3933 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
3934 indirect to GOT pointer relative code edit.
3936 2017-01-02 Alan Modra <amodra@gmail.com>
3938 Update year range in copyright notice of all files.
3940 For older changes see ChangeLog-2016
3942 Copyright (C) 2017 Free Software Foundation, Inc.
3944 Copying and distribution of this file, with or without modification,
3945 are permitted in any medium without royalty provided the copyright
3946 notice and this notice are preserved.
3952 version-control: never