1 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
3 * elf32-i386.c (elf_i386_relocate_section): Don't change r_type
4 when calling elf_i386_tls_transition. Don't use ELF32_R_TYPE
5 to get the relocation type again.
6 * elf64-x86-64.c (elf_x86_64_relocate_section): Don't change
7 r_type when calling elf_x86_64_tls_transition. Don't use
8 ELF32_R_TYPE to get the relocation type again.
10 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
12 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Properly set
15 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
17 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Remove the sec
18 argument. Don't check relocation overflow. Avoid relocation
19 overflow if --no-relax is used. Set converted_reloc on symbol
20 if a GOTPCREL relocation is converted.
21 (elf_x86_64_relocate_section): Issue a fatal error and suggest
22 --no-relax if GOTPCREL relocation conversion leads to relocation
24 * elfxx-x86.h (elf_x86_link_hash_entry): Add converted_reloc.
26 2017-09-05 Alexander Fedotov <alexander.fedotov@nxp.com>
27 Edmar Wienskoski <edmar.wienskoski@nxp.com
29 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_VLE_ADDR20.
30 (ppc_elf_check_relocs): Handle it.
31 (ppc_elf_vle_split20): New function.
32 (ppc_elf_relocate_section): Handle R_PPC_VLE_ADDR20.
34 2017-09-03 H.J. Lu <hongjiu.lu@intel.com>
37 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Set tlsdesc_plt
38 for x86-64 if GOT_TLS_GDESC_P is true.
40 2017-09-03 Alan Modra <amodra@gmail.com>
43 * elfxx-x86.h (elf_x86_hash_table): Check is_elf_hash_table first.
45 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
47 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
48 tls_get_addr for x86-64 in one place.
50 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
52 * configure.ac (bfd_backends): Add elf64-x86-64.lo together
53 with elfxx-x86.lo for 64-bit BFD.
54 * configure: Regenerated.
56 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
58 * elf32-i386.c (elf_i386_convert_load): Renamed to ...
59 (_bfd_i386_elf_convert_load): This. Remove static.
60 (elf_i386_size_dynamic_sections): Removed.
61 (elf_backend_size_dynamic_sections): Likewise.
62 * elf64-x86-64.c (elf_x86_64_convert_load): Renamed to ...
63 (_bfd_x86_64_elf_convert_load): This. Remove static.
64 (elf_x86_64_size_dynamic_sections): Removed.
65 (elf_backend_size_dynamic_sections): Likewise.
66 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): Renamed to ...
67 (elf_x86_allocate_dynrelocs): This. Make it static.
68 (_bfd_x86_elf_allocate_local_dynrelocs): Renamed to ...
69 (elf_x86_allocate_local_dynreloc): This. Make it static.
70 (elf_i386_is_reloc_section): New function.
71 (elf_x86_64_is_reloc_section): Likewise.
72 (_bfd_x86_elf_link_hash_table_create): Initialize convert_load,
73 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
74 Rearrange got_entry_size initialization.
75 (_bfd_x86_elf_size_dynamic_sections): New function.
76 * elfxx-x86.h (elf_x86_link_hash_table): Add convert_load,
77 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
78 (_bfd_i386_elf_convert_load): New.
79 (_bfd_x86_64_elf_convert_load): Likewise.
80 (_bfd_x86_elf_size_dynamic_sections): Likewise.
81 (elf_backend_size_dynamic_sections): Likewise.
82 (_bfd_x86_elf_allocate_dynrelocs): Removed.
83 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
85 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
87 * elfxx-x86.h (elf_x86_link_hash_table): Rearrange fields and
90 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
92 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
93 sgotplt_jump_table_size with elf_x86_compute_jump_table_size.
95 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
97 * elf32-i386.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
98 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Moved to ...
99 * elfxx-x86.h (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
100 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Here.
101 * elf64-x86-64.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
102 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Removed.
104 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
106 * elf32-i386.c (elf_i386_allocate_dynrelocs): Removed.
107 (elf_i386_allocate_local_dynrelocs): Likewise.
108 (elf_i386_size_dynamic_sections): Replace
109 elf_i386_allocate_dynrelocs/elf_i386_allocate_local_dynrelocs
110 with _bfd_x86_elf_allocate_dynrelocs and
111 _bfd_x86_elf_allocate_local_dynrelocs.
112 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Removed.
113 (elf_x86_64_allocate_local_dynrelocs): Likewise.
114 (elf_x86_64_size_dynamic_sections): Replace
115 elf_x86_64_allocate_dynrelocs/elf_x86_64_allocate_local_dynrelocs
116 with _bfd_x86_elf_allocate_dynrelocs and
117 _bfd_x86_elf_allocate_local_dynrelocs.
118 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): New function.
119 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
120 * elfxx-x86.h (_bfd_x86_elf_allocate_dynrelocs): New prototype.
121 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
123 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
125 * elf32-i386.c (is_i386_elf): Removed.
126 (elf_i386_check_relocs): Replace is_i386_elf with is_x86_elf.
127 (elf_i386_size_dynamic_sections): Likewise.
128 (elf_i386_relocate_section): Likewise.
129 * elf64-x86-64.c (is_x86_64_elf): Removed.
130 (elf_x86_64_check_relocs): Replace is_x86_64_elf with
132 (elf_x86_64_size_dynamic_sections): Likewise.
133 (elf_x86_64_relocate_section): Likewise.
134 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
136 * elfxx-x86.h (elf_x86_link_hash_table): Add target_id.
139 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
141 * elf32-i386.c (elf_i386_compute_jump_table_size): Removed.
142 (elf_i386_allocate_dynrelocs): Replace
143 elf_i386_compute_jump_table_size with
144 elf_x86_compute_jump_table_size.
145 (elf_i386_size_dynamic_sections): Likewise.
146 * elf64-x86-64.c (elf_x86_64_compute_jump_table_size): Removed.
147 (elf_x86_64_allocate_dynrelocs): Replace
148 elf_x86_64_compute_jump_table_size with
149 elf_x86_compute_jump_table_size.
150 (elf_x86_64_size_dynamic_sections): Likewise.
151 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
153 * elfxx-x86.h (elf_x86_link_hash_table): Add got_entry_size.
154 (elf_x86_compute_jump_table_size): New.
156 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
158 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
160 (_bfd_x86_elf_adjust_dynamic_symbol): Use sizeof_reloc.
161 * elfxx-x86.h (elf_x86_link_hash_table): Add sizeof_reloc.
163 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
165 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check VxWorks
166 with htab->is_vxworks.
167 (elf_i386_size_dynamic_sections): Likewise.
168 (elf_i386_relocate_section): Likewise.
169 (elf_i386_finish_dynamic_symbol): Likewise.
170 (elf_i386_finish_dynamic_sections): Likewise.
172 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
174 * elf32-i386.c (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
175 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
176 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Moved to ...
177 * elfxx-x86.h (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
178 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
179 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Here.
180 * elf64-x86-64.c (GOT_TLS_IE, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
181 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Removed.
183 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
186 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Check
187 ELF_COMMON_DEF_P for common symbols.
189 2017-09-02 Alan Modra <amodra@gmail.com>
191 * elf-eh-frame.c (offset_adjust): Avoid false positive gcc warning.
192 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Likewise.
193 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
195 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
197 * elf32-i386.c (elf_i386_gc_mark_hook): Removed.
198 (elf_backend_gc_mark_hook): Likewise.
199 * elf64-x86-64.c (elf_x86_64_gc_mark_hook): Likewise.
200 (elf_backend_gc_mark_hook): Likewise.
201 * elfxx-x86.c (_bfd_x86_elf_gc_mark_hook): New function.
202 * elfxx-x86.h (_bfd_x86_elf_gc_mark_hook): New.
203 (elf_backend_gc_mark_hook): Likewise.
205 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
207 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Removed.
208 (elf_backend_adjust_dynamic_symbol): Likewise.
209 * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.
210 (elf_backend_adjust_dynamic_symbol): Likewise.
211 * elfxx-x86.c (_bfd_x86_elf_adjust_dynamic_symbol): New function.
212 (_bfd_x86_elf_link_setup_gnu_properties): Copy is_vxworks.
213 * elfxx-x86.h (elf_x86_link_hash_table): Add is_vxworks.
214 (_bfd_x86_elf_adjust_dynamic_symbol): New.
215 (elf_backend_adjust_dynamic_symbol): Likewise.
217 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
219 * elfxx-x86.h (elf_x86_plt_layout_table): Fix a typo in
222 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
224 * elf32-i386.c (elf_i386_mkobject): Removed.
225 (bfd_elf32_mkobject): Likewise.
226 * elf64-x86-64.c (elf_x86_64_mkobject): Likewise.
227 (bfd_elf64_mkobject): Likewise.
228 (bfd_elf32_mkobject): Likewise.
229 * elfxx-x86.c (_bfd_x86_elf_mkobject): New function.
230 * elfxx-x86.h (_bfd_x86_elf_mkobject): New.
231 (bfd_elf64_mkobject): Likewise.
232 (bfd_elf32_mkobject): Likewise.
234 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
236 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Updated.
237 Call _bfd_x86_elf_link_setup_gnu_properties.
238 * elf64-x86-64.c (elf_x86_lazy_plt_layout): Initialize
239 pic_plt0_entry and pic_plt_entry fields with the non-PIC PLT
241 (elf_x86_64_non_lazy_plt): Likewise.
242 (elf_x86_64_lazy_bnd_plt): Likewise.
243 (elf_x86_64_non_lazy_bnd_plt): Likewise.
244 (elf_x86_64_lazy_ibt_plt): Likewise.
245 (elf_x32_lazy_ibt_plt): Likewise.
246 (elf_x86_64_non_lazy_ibt_plt): Likewise.
247 (elf_x32_non_lazy_ibt_plt): Likewise.
248 (elf_x86_64_nacl_plt): Likewise.
249 (elf_x86_64_link_setup_gnu_properties): Updated. Call
250 _bfd_x86_elf_link_setup_gnu_properties.
251 * elfxx-x86.c: Include elf-vxworks.h".
252 (_bfd_x86_elf_link_setup_gnu_properties): New function.
253 * elfxx-x86.h (elf_x86_lazy_plt_layout): Remove "for i386 only"
254 comments for pic_plt0_entry and pic_plt_entry.
255 (elf_x86_non_lazy_plt_layout): Likewise.
256 (elf_x86_plt_layout_table): New.
257 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
259 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
262 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Create
263 .eh_frame section for the second PLT.
264 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Correct
265 alignment of .eh_frame section for the second PLT.
267 2017-09-01 Nick Clifton <nickc@redhat.com>
270 * dwarf2.c (decode_line_info): Fix test for an overlong line info
273 2017-09-01 Nick Clifton <nickc@redhat.com>
276 * elf-attrs.c (_bfd_elf_parse_attributes): Ensure that the
277 attribute buffer is NUL terminated.
279 2017-08-31 Nick Clifton <nickc@redhat.com>
282 * dwarf2.c (read_section): If necessary add a terminating NUL byte
283 to dwarf string sections.
285 2017-08-31 Alan Modra <amodra@gmail.com>
287 * po/SRC-POTFILES.in: Regenerate.
289 2017-08-31 Alan Modra <amodra@gmail.com>
291 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Don't exit early
292 for a section containing just a terminator. Allow multiple
293 terminators at end of section.
294 * elflink.c (bfd_elf_discard_info): Iterate over .eh_frame
295 sections when not adding alignment. Assert on terminator in
298 2017-08-31 Alan Modra <amodra@gmail.com>
302 * elflink.c (bfd_elf_discard_info): Don't pad embedded zero
305 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
307 * configure.ac (bfd_backends): Add elf64.lo together with
308 elfxx-x86.lo for 64-bit BFD.
309 * configure: Regenerated.
311 2017-08-31 James Bowman <james.bowman@ftdichip.com>
313 * elf32-ft32.c (ft32_elf_howto_table): Use complain_overflow_dont
316 2017-08-31 Alan Modra <amodra@gmail.com>
319 * opncls.c (bfd_close_all_done): Don't call bfd_cache_close
320 before _close_and_cleanup. Call iovec->bclose after.
321 (bfd_close): Remove code common to, and call, bfd_close_all_done.
323 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
325 * elf32-i386.c (elf_i386_plt_type): Removed.
326 (elf_i386_plt): Likewise.
327 (elf_i386_get_synthetic_symtab): Updated. Call
328 _bfd_x86_elf_get_synthetic_symtab.
329 * elf64-x86-64.c (elf_x86_64_plt_type): Removed.
330 (elf_x86_64_plt): Likewise.
331 (elf_x86_64_get_synthetic_symtab): Updated. Call
332 _bfd_x86_elf_get_synthetic_symtab.
333 * elfxx-x86.c (elf_i386_get_plt_got_vma): New function.
334 (elf_x86_64_get_plt_got_vma): Likewise.
335 (elf_i386_valid_plt_reloc_p): Likewise.
336 (elf_x86_64_valid_plt_reloc_p): Likewise.
337 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
338 * elfxx-x86.h (elf_x86_plt_type): New.
339 (elf_x86_plt): Likewise.
340 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
342 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
344 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Check
345 target_id instead of elf_machine_code.
347 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
349 * elf32-i386.c (ELF_DYNAMIC_INTERPRETER): Removed.
350 (elf_i386_lazy_plt_layout): Likewise.
351 (elf_i386_non_lazy_plt_layout): Likewise.
352 (elf_i386_plt_layout): Likewise.
353 (elf_i386_link_hash_table): Likewise.
354 (elf_i386_next_tls_desc_index): Likewise.
355 (elf_i386_srelplt2): Likewise.
356 (elf_i386_plt): Likewise.
357 (elf_i386_lazy_plt): Likewise.
358 (elf_i386_non_lazy_plt): Likewise.
359 (elf_i386_link_hash_table_create): Likewise.
360 (bfd_elf32_bfd_link_hash_table_create): Likewise.
361 (elf_i386_lazy_plt): Updated.
362 (elf_i386_non_lazy_plt): Likewise.
363 (elf_i386_lazy_ibt_plt): Likewise.
364 (elf_i386_non_lazy_ibt_plt): Likewise.
365 (elf_i386_allocate_dynrelocs): Likewise.
366 (elf_i386_size_dynamic_sections): Likewise.
367 (elf_i386_relocate_section): Likewise.
368 (elf_i386_finish_dynamic_symbol): Likewise.
369 (elf_i386_finish_dynamic_sections): Likewise.
370 (elf_i386_get_synthetic_symtab): Likewise.
371 (elf_i386_link_setup_gnu_properties): Likewise.
372 (elf_i386_nacl_plt): Likewise.
373 * elf64-x86-64.c (ABI_64_P): Removed.
374 (ELF64_DYNAMIC_INTERPRETER): Likewise.
375 (ELF32_DYNAMIC_INTERPRETER): Likewise.
376 (elf_x86_64_lazy_plt_layout): Likewise.
377 (elf_x86_64_non_lazy_plt_layout): Likewise.
378 (elf_x86_64_plt_layout): Likewise.
379 (elf_x86_64_link_hash_table): Likewise.
380 (elf_x86_64_plt): Likewise.
381 (elf_x86_64_lazy_plt): Likewise.
382 (elf_x86_64_non_lazy_plt): Likewise.
383 (elf_x86_64_link_hash_table_create): Likewise.
384 (bfd_elf64_bfd_link_hash_table_create): Likewise.
385 (bfd_elf32_bfd_link_hash_table_create): Likewise.
386 (elf_x86_64_lazy_plt): Updated.
387 (elf_x86_64_non_lazy_plt): Likewise.
388 (elf_x86_64_lazy_bnd_plt): Likewise.
389 (elf_x86_64_non_lazy_bnd_plt): Likewise.
390 (elf_x86_64_lazy_ibt_plt): Likewise.
391 (elf_x32_lazy_ibt_plt): Likewise.
392 (elf_x86_64_non_lazy_ibt_plt): Likewise.
393 (elf_x32_non_lazy_ibt_plt): Likewise.
394 (elf_x86_64_allocate_dynrelocs): Likewise.
395 (elf_x86_64_size_dynamic_sections): Likewise.
396 (elf_x86_64_relocate_section): Likewise.
397 (elf_x86_64_finish_dynamic_symbol): Likewise.
398 (elf_x86_64_finish_dynamic_sections): Likewise.
399 (elf_x86_64_get_synthetic_symtab): Likewise.
400 (elf_x86_64_link_setup_gnu_properties): Likewise.
401 (elf_x86_64_nacl_plt): Likewise.
402 * elfxx-x86.c: Include "objalloc.h", "elf/i386.h" and
404 (ELF32_DYNAMIC_INTERPRETER): New.
405 (ELF64_DYNAMIC_INTERPRETER): Likewise.
406 (ELFX32_DYNAMIC_INTERPRETER): Likewise.
407 (_bfd_x86_elf_link_hash_table_create): Likewise.
408 (_bfd_x86_elf_link_hash_table_free): Renamed to ...
409 (elf_x86_link_hash_table_free): This. Make it static.
410 * elfxx-x86.h: Don't include "objalloc.h".
412 (elf_x86_lazy_plt_layout): Likewise.
413 (elf_x86_non_lazy_plt_layout): Likewise.
414 (elf_x86_plt_layout): Likewise.
415 (_bfd_x86_elf_link_hash_table_create): Likewise.
416 (bfd_elf64_bfd_link_hash_table_create): Likewise.
417 (bfd_elf32_bfd_link_hash_table_create): Likewise.
418 (elf_x86_link_hash_table): Add plt, lazy_plt, non_lazy_plt,
419 srelplt2 and next_tls_desc_index.
420 (_bfd_x86_elf_link_hash_table_free): Removed.
422 2017-08-30 Maciej W. Rozycki <macro@imgtec.com>
424 * elfxx-mips.c (mips_elf_perform_relocation): Correct microMIPS
425 branch offset interpretation.
427 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
430 * opncls.c (bfd_close_all_done): Call _close_and_cleanup.
432 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
434 * elf64-x86-64.c (elf_x86_64_next_tls_desc_index): Removed.
435 (elf_x86_64_srelplt2): Likewise.
437 2017-08-30 Alan Modra <amodra@gmail.com>
439 * elf64-ppc.c (struct ppc_link_hash_table): Add do_tls_opt.
440 (ppc64_elf_tls_optimize): Set it.
441 (ppc64_elf_relocate_section): Nop addis on TPREL16_HA, and convert
442 insn on TPREL16_LO and TPREL16_LO_DS relocs to use r13 when
443 addis would add zero.
444 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add do_tls_opt.
445 (ppc_elf_tls_optimize): Set it.
446 (ppc_elf_relocate_section): Nop addis on TPREL16_HA, and convert
447 insn on TPREL16_LO relocs to use r2 when addis would add zero.
449 2017-08-30 Alan Modra <amodra@gmail.com>
451 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing
452 __tls_get_addr call sequences to LE, don't move the addi down
453 to the nop. Replace the bl with addi and leave the nop alone.
455 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
457 * elf32-i386.c (elf_i386_pie_finish_undefweak_symbol):
459 * elf64-x86-64.c (elf_x86_64_finish_local_dynamic_symbol):
461 (elf_x86_64_pie_finish_undefweak_symbol): Likewise.
463 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
465 * Makefile.am (BFD32_BACKENDS): Add elfxx-x86.lo.
466 (BFD64_BACKENDS): Likewise.
467 (BFD32_BACKENDS_CFILES): Add elfxx-x86.c.
468 (BFD64_BACKENDS_CFILES): Likewise.
469 * Makefile.in: Regenerated.
470 * configure.ac (bfd_backends): Add elfxx-x86.lo together with
471 elf32-i386.lo and elf64-x86-64.lo.
472 * configure: Regenerated.
473 * elf32-i386.c: Include "elfxx-x86.h" instead of "sysdep.h",
474 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
475 "objalloc.h" and "hashtab.h".
476 (ELIMINATE_COPY_RELOCS): Removed.
477 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
478 (SYMBOL_NO_COPYRELOC): Likewise.
479 (elf_i386_link_hash_entry): Likewise.
480 (GOT_UNKNOWN): Likewise.
481 (GOT_NORMAL): Likewise.
482 (GOT_TLS_GD): Likewise.
483 (elf_i386_hash_entry): Likewise.
484 (elf_i386_obj_tdata): Likewise.
485 (elf_i386_tdata): Likewise.
486 (elf_i386_local_got_tls_type): Likewise.
487 (elf_i386_local_tlsdesc_gotent): Likewise.
488 (elf_i386_hash_table): Likewise.
489 (elf_i386_link_hash_newfunc): Likewise.
490 (elf_i386_local_htab_hash): Likewise.
491 (elf_i386_local_htab_eq): Likewise.
492 (elf_i386_get_local_sym_hash): Likewise.
493 (elf_i386_link_hash_table_free): Likewise.
494 (elf_i386_copy_indirect_symbol): Likewise.
495 (elf_i386_fixup_symbol): Likewise.
496 (elf_i386_readonly_dynrelocs): Likewise.
497 (elf_i386_always_size_sections): Likewise.
498 (elf_i386_set_tls_module_base): Likewise.
499 (elf_i386_dtpoff_base): Likewise.
500 (compare_relocs): Likewise.
501 (elf_i386_hash_symbol): Likewise.
502 (elf_i386_parse_gnu_properties): Likewise.
503 (elf_i386_merge_gnu_properties): Likewise.
504 (elf_i386_link_check_relocs): Likewise.
505 (elf_i386_merge_symbol_attribute): Likewise.
506 (bfd_elf32_bfd_link_check_relocs): Likewise.
507 (elf_backend_copy_indirect_symbol): Likewise.
508 (elf_backend_always_size_sections): Likewise.
509 (elf_backend_omit_section_dynsym): Likewise.
510 (elf_backend_hash_symbol): Likewise.
511 (elf_backend_fixup_symbol): Likewise.
512 (elf_backend_parse_gnu_properties): Likewise.
513 (elf_backend_merge_gnu_properties): Likewise.
514 (elf_backend_merge_symbol_attribute): Likewise.
515 (elf_i386_mkobject): Updated.
516 (elf_i386_link_hash_table_create): Likewise.
517 (elf_i386_check_tls_transition): Likewise.
518 (elf_i386_tls_transition): Likewise.
519 (elf_i386_convert_load_reloc): Likewise.
520 (elf_i386_check_relocs): Likewise.
521 (elf_i386_adjust_dynamic_symbol): Likewise.
522 (elf_i386_allocate_dynrelocs): Likewise.
523 (elf_i386_convert_load): Likewise.
524 (elf_i386_size_dynamic_sections): Likewise.
525 (elf_i386_relocate_section): Likewise.
526 (elf_i386_finish_dynamic_symbol ): Likewise.
527 (elf_i386_finish_dynamic_sections): Likewise.
528 (elf_i386_output_arch_local_syms): Likewise.
529 (elf_i386_get_synthetic_symtab): Likewise.
530 (elf_i386_link_setup_gnu_properties): Likewise.
531 (elf_i386_link_hash_table): Use elf_x86_link_hash_table, instead
532 of elf_link_hash_table, as base.
533 (elf_i386_next_tls_desc_index): New.
534 (elf_i386_srelplt2): Likewise.
535 (elf_i386_plt): Likewise.
536 (elf_i386_lazy_plt): Likewise.
537 (elf_i386_non_lazy_plt): Likewise.
538 * elf32-x86-64.c: Include "elfxx-x86.h" instead of "sysdep.h",
539 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
540 "objalloc.h" and "hashtab.h".
541 (ELIMINATE_COPY_RELOCS): Removed.
542 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
543 (SYMBOL_NO_COPYRELOC): Likewise.
544 (elf_x86_64_link_hash_entry): Likewise.
545 (GOT_UNKNOWN): Likewise.
546 (GOT_NORMAL): Likewise.
547 (GOT_TLS_GD): Likewise.
548 (elf_x86_64_hash_entry): Likewise.
549 (elf_x86_64_obj_tdata): Likewise.
550 (elf_x86_64_tdata): Likewise.
551 (elf_x86_64_local_got_tls_type): Likewise.
552 (elf_x86_64_local_tlsdesc_gotent): Likewise.
553 (elf_x86_64_hash_table): Likewise.
554 (elf_x86_64_link_hash_newfunc): Likewise.
555 (elf_x86_64_local_htab_hash): Likewise.
556 (elf_x86_64_local_htab_eq): Likewise.
557 (elf_x86_64_get_local_sym_hash): Likewise.
558 (elf_x86_64_link_hash_table_free): Likewise.
559 (elf_x86_64_copy_indirect_symbol): Likewise.
560 (elf_x86_64_fixup_symbol): Likewise.
561 (elf_x86_64_readonly_dynrelocs): Likewise.
562 (elf_x86_64_always_size_sections): Likewise.
563 (elf_x86_64_set_tls_module_base): Likewise.
564 (elf_x86_64_dtpoff_base): Likewise.
565 (compare_relocs): Likewise.
566 (elf_x86_64_merge_symbol_attribute): Likewise.
567 (elf_x86_64_hash_symbol): Likewise.
568 (elf_x86_64_parse_gnu_properties): Likewise.
569 (elf_x86_64_merge_gnu_properties): Likewise.
570 (elf_x86_64_link_check_relocs): Likewise.
571 (elf_backend_copy_indirect_symbol): Likewise.
572 (elf_backend_always_size_sections): Likewise.
573 (bfd_elf64_bfd_link_check_relocs): Likewise.
574 (elf_backend_merge_symbol_attribute): Likewise.
575 (elf_backend_hash_symbol): Likewise.
576 (elf_backend_omit_section_dynsym): Likewise.
577 (elf_backend_fixup_symbol): Likewise.
578 (elf_backend_parse_gnu_properties): Likewise.
579 (elf_backend_merge_gnu_properties): Likewise.
580 (bfd_elf32_bfd_link_check_relocs): Likewise.
581 (elf_x86_64_mkobject): Updated.
582 (elf_x86_64_link_hash_table_create): Likewise.
583 (elf_x86_64_check_tls_transition): Likewise.
584 (elf_x86_64_tls_transition): Likewise.
585 (elf_x86_64_convert_load_reloc): Likewise.
586 (elf_x86_64_check_relocs): Likewise.
587 (elf_x86_64_adjust_dynamic_symbol): Likewise.
588 (elf_x86_64_allocate_dynrelocs): Likewise.
589 (elf_x86_64_convert_load): Likewise.
590 (elf_x86_64_size_dynamic_sections): Likewise.
591 (elf_x86_64_relocate_section): Likewise.
592 (elf_x86_64_finish_dynamic_symbol ): Likewise.
593 (elf_x86_64_finish_dynamic_sections): Likewise.
594 (elf_x86_64_output_arch_local_syms): Likewise.
595 (elf_x86_64_get_synthetic_symtab): Likewise.
596 (elf_x86_64_link_setup_gnu_properties): Likewise.
597 (elf_x86_64_link_hash_table): Use elf_x86_link_hash_table,
598 instead of elf_link_hash_table, as base.
599 (elf_x86_64_next_tls_desc_index): New.
600 (elf_x86_64_srelplt2): Likewise.
601 (elf_x86_64_plt): Likewise.
602 (elf_x86_64_lazy_plt): Likewise.
603 (elf_x86_64_non_lazy_plt): Likewise.
604 * elfxx-x86.c: New file.
605 * elfxx-x86.h: Likewise.
607 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
609 * elf32-i386.c (elf_i386_get_synthetic_symtab): Simplify bad
611 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
613 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
615 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check valid PLT
616 sections before checking dynamic relocations and free invalid
617 PLT section contents.
618 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
620 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
622 * elf-bfd.h (_bfd_elf_ifunc_get_synthetic_symtab): Removed.
623 * elf-ifunc.c (_bfd_elf_ifunc_get_synthetic_symtab): Likewise.
625 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
628 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check for valid
630 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
632 2017-08-27 H.J. Lu <hongjiu.lu@intel.com>
634 * elf32-i386.c (elf_i386_link_hash_newfunc): Initialize
636 * elf64-x86-64.c (elf_x86_64_link_hash_newfunc): Likewise.
638 2017-08-26 H.J. Lu <hongjiu.lu@intel.com>
641 * elf-bfd.h (elf_obj_tdata): Use ENUM_BITFIELD on object_id,
642 dyn_lib_class and has_gnu_symbols. Change bad_symtab to bitfield.
643 Add a has_no_copy_on_protected bitfield.
644 (elf_has_no_copy_on_protected): New.
645 * elf-properties.c (_bfd_elf_parse_gnu_properties): Set
646 elf_has_no_copy_on_protected for GNU_PROPERTY_NO_COPY_ON_PROTECTED.
647 (elf_merge_gnu_property_list): Likewise.
648 (_bfd_elf_link_setup_gnu_properties): Set extern_protected_data
649 to FALSE for elf_has_no_copy_on_protected.
650 * elf32-i386.c (SYMBOL_NO_COPYRELOC): New.
651 (elf_i386_link_hash_entry): Add def_protected.
652 (elf_i386_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
653 when checking info->nocopyreloc.
654 (elf_i386_link_setup_gnu_properties): Don't set
655 extern_protected_data here.
656 (elf_i386_merge_symbol_attribute): New function.
657 (elf_backend_merge_symbol_attribute): New.
658 * elf64-x86-64.c (SYMBOL_NO_COPYRELOC): New.
659 (elf_x86_64_link_hash_entry): Add def_protected.
660 (elf_x86_64_need_pic): Report protected symbol for def_protected.
661 (elf_x86_64_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
662 when checking info->nocopyreloc.
663 (elf_x86_64_relocate_section): Also check for R_X86_64_PC32
664 relocation run-time overflow and unresolvable R_X86_64_32S
665 relocation against protected data symbol defined in shared object
666 with GNU_PROPERTY_NO_COPY_ON_PROTECTED.
667 (elf_x86_64_link_setup_gnu_properties): Don't set
668 extern_protected_data here.
669 (elf_x86_64_merge_symbol_attribute): New function.
670 (elf_backend_merge_symbol_attribute): New.
672 2017-08-26 Alan Modra <amodra@gmail.com>
674 * elf32-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
675 (ppc_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
676 (ppc_elf_relocate_section): Comment fix.
677 * elf64-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
678 (ppc64_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
679 Support dynamic relocs for TPREL16 when non-pic too.
680 (dec_dynrel_count): Adjust TPREL16 handling as per check_relocs.
681 (ppc64_elf_relocate_section): Support dynamic relocs for TPREL16
684 2017-08-25 H.J. Lu <hongjiu.lu@intel.com>
686 * elf32-i386.c (elf_i386_link_hash_entry): Remove redundant
687 "symbol" in comments.
688 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Likewise.
690 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
693 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for
694 R_X86_64_PC32 relocation run-time overflow and unresolvable
695 R_X86_64_32S relocation with -z nocopyreloc.
697 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
699 * elf32-i386.c (elf_i386_check_relocs): Revert the last change.
700 Undefined symbols may not have a type.
701 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
703 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
705 * elf64-x86-64.c (elf_x86_64_need_pic): Add an argument for
706 bfd_link_info. Report shared, PIE or PDE object based on
708 (elf_x86_64_check_relocs): Update elf_x86_64_need_pic call.
709 (elf_x86_64_relocate_section): Likewise.
711 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
713 * elf32-i386.c (elf_i386_check_relocs): Increment PLT count only
714 for function symbols.
715 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
717 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
719 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set
720 extern_protected_data to FALSE if GNU_PROPERTY_NO_COPY_ON_PROTECTED
721 is set on any input relocatable file.
722 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
724 2017-08-23 Alan Modra <amodra@gmail.com>
727 * elf64-ppc.c (ensure_undef_dynamic): Rename from
728 ensure_undefweak_dynamic. Handle undefined too.
729 * elf32-ppc.c (ensure_undef_dynamic): Likewise.
730 * elf32-hppa.c (ensure_undef_dynamic): Likewise.
731 (allocate_dynrelocs): Discard undefined non-default visibility
732 relocs first. Make undefined syms dynamic. Tidy goto.
734 2017-08-21 Alan Modra <amodra@gmail.com>
735 H.J. Lu <hongjiu.lu@intel.com>
738 * elf-bfd.h (SYMBOLIC_BIND): Return TRUE for __start/__stop symbols.
739 * elflink.c (bfd_elf_define_start_stop): Rewrite.
741 2017-08-21 Hans-Peter Nilsson <hp@bitrange.com>
744 * elf64-mmix.c (mmix_elf_relax_section): Correct handling of
745 undefined weak symbols.
747 2017-08-18 Nick Clifton <nickc@redhat.com>
750 * tekhex.c (getsym): Fix check for source pointer walking off the
751 end of the input buffer.
753 2017-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
756 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Skip IFUNC
757 relocations in debug sections, change abort to _bfd_error_handler.
759 2017-08-14 Nick Clifton <nickc@redhat.com>
762 * elf.c (setup_group): Check for an empty or very small group
764 * po/bfd.pot: Regenerate.
766 2017-08-14 Alan Modra <amodra@gmail.com>
769 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't add
770 alignment padding here.
771 * elflink.c (bfd_elf_discard_info): Add .eh_frame padding here
772 in a reverse pass over sections.
774 2017-08-11 H.J. Lu <hongjiu.lu@intel.com>
777 * elf32-i386.c (elf_i386_get_synthetic_symtab): Allocate space
778 for @plt suffixes first.
779 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
781 2017-08-08 Nick Clifton <nickc@redhat.com>
784 * elf-attrs.c (_bfd_elf_parse_attributes): Complain about very
785 small section lengths.
786 * elf.c (_bfd_elf_setup_sections): Skip empty entries in the group
788 (elfcore_grok_freebsd_prstatus): Add checks to make sure that
789 there is enough data present in the note.
791 2017-08-08 Alan Modra <amodra@gmail.com>
794 * elf32-microblaze.c (microblaze_elf_check_relocs): Don't bump
795 got.refcount for GOTOFF relocs, just create .got section.
797 2017-08-07 H.J. Lu <hongjiu.lu@intel.com>
799 * elflink.c (elf_link_add_object_symbols): Move common symbol
800 check after bed->common_definition.
802 2017-08-07 Alan Modra <amodra@gmail.com>
805 * elflink.c (bfd_elf_final_link): Don't segfault when sections
806 needed to define various dynamic tags have been discarded.
808 2017-08-07 Nick Clifton <nickc@redhat.com>
811 * elf32-i386.c (elf_i386_link_setup_gnu_properties): If the dynobj
812 has not been set then use the bfd returned by
813 _bfd_elf_link_setup_gnu_properties. If that is null then search
814 through all the input bfds selecting the first normal, ELF format
816 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
818 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
820 * elf32-i386.c (elf_i386_link_hash_entry): Change tls_get_addr
822 (elf_i386_link_hash_newfunc): Initialize tls_get_addr to 0.
823 (elf_i386_check_tls_transition): Check tls_get_addr directly.
824 (elf_i386_convert_load_reloc): Update tls_get_addr check.
825 (elf_i386_link_check_relocs): New function.
826 (bfd_elf32_bfd_link_check_relocs): New.
827 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Change tls_get_addr
829 (elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 0.
830 (elf_x86_64_check_tls_transition): Check tls_get_addr directly.
831 (elf_x86_64_convert_load_reloc): Update tls_get_addr check.
832 (elf_x86_64_link_check_relocs): New function.
833 (bfd_elf64_bfd_link_check_relocs): New.
834 (bfd_elf32_bfd_link_check_relocs): Likewise.
836 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
839 * elflink.c (elf_link_add_object_symbols): Treat common symbol
840 as undefined for --no-define-common.
842 2017-08-05 Alan Modra <amodra@gmail.com>
844 * elf32-hppa.c (elf32_hppa_set_gp): Don't require an
845 hppa_link_hash_table.
847 2017-08-02 Max Filippov <jcmvbkbc@gmail.com>
849 * xtensa-isa.c (xtensa_isa_init): Don't update lookup table
850 entries for sysregs with negative indices.
852 2017-08-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
854 * elf32-s390.c (elf_s390_finish_dynamic_sections): Skip if it
855 isn't the S/390 specific elf data.
856 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
858 2017-07-31 Kuan-Lin Chen <rufus@andestech.com>
860 * elfxx-riscv.c (riscv_elf_add_sub_reloc): New function.
861 * (howto_table) [R_RISCV_ADD8]: Use riscv_elf_add_sub_reloc.
862 [R_RISCV_ADD16]: Likewise.
863 [R_RISCV_ADD32]: Likewise.
864 [R_RISCV_ADD64]: Likewise.
865 [R_RISCV_SUB6]: Likewise.
866 [R_RISCV_SUB8]: Likewise.
867 [R_RISCV_SUB16]: Likewise.
868 [R_RISCV_SUB32]: Likewise.
869 [R_RISCV_SUB64]: Likewise.
871 2017-07-31 Alan Modra <amodra@gmail.com>
873 * elf64-ppc.c (ppc64_elf_tls_setup): Warn on --plt-localentry
874 without ld.so checks.
876 2017-07-29 Alan Modra <amodra@gmail.com>
879 * elf64-ppc.c (struct ppc_link_hash_entry): Add non_zero_localentry.
880 (ppc64_elf_merge_symbol): Set non_zero_localentry.
881 (is_elfv2_localentry0): Test non_zero_localentry.
882 (ppc64_elf_tls_setup): Default to --no-plt-localentry.
884 2017-07-28 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
886 * elf32-s390.c (elf_s390_finish_dynamic_sections): Add NULL
887 pointer check for htab->elf.irelplt.
888 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
890 2017-07-27 Nick Clifton <nickc@redhat.com>
893 * mach-o.c (bfd_mach_o_read_symtab_strtab): Fail if the symtab
895 * nlmcode.h (nlm_swap_auxiliary_headers_in): Replace assertion
897 * section.c (bfd_make_section_with_flags): Fail if the name or bfd
899 * vms-alpha.c (bfd_make_section_with_flags): Correct computation
901 (evax_bfd_print_emh): Check for invalid string lengths.
903 2017-07-25 Nick Clifton <nickc@redhat.com>
905 * po/fr.po: Updated French translation.
907 2017-07-25 Benjamin Green <bengreen5mx@gmail.com>
910 * elf32-msp430.c (msp430_elf_relax_section): Allow conversion of
911 16-bit absolute branches into 10-bit pc-relative branches on the
912 MSP430 as well as the MSP430X.
914 2017-07-25 Alan Modra <amodra@gmail.com>
916 * elf64-ppc.c (struct map_stub): Add tls_get_addr_opt_bctrl.
917 (stub_eh_frame_size): New function.
918 (ppc_size_one_stub): Set group tls_get_addr_opt_bctrl.
919 (group_sections): Init group tls_get_addr_opt_bctrl.
920 (ppc64_elf_size_stubs): Update sizing and initialization of
921 .eh_frame. Iteration over stubs via group list.
922 (ppc64_elf_build_stubs): Iterate over stubs via group list.
923 (ppc64_elf_finish_dynamic_sections): Update finalization of
926 2017-07-24 Nick Clifton <nickc@redhat.com>
929 * mach-o.c (bfd_mach_o_canonicalize_relocs): Pass the base address
930 of the relocs to the canonicalize_one_reloc routine.
931 * mach-o.h (struct bfd_mach_o_backend_data): Update the prototype
932 for the _bfd_mach_o_canonicalize_one_reloc field.
933 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add
934 res_base parameter. Use to check for corrupt pair relocs.
935 * mach-o-aarch64.c (bfd_mach_o_arm64_canonicalize_one_reloc):
937 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc):
939 * mach-o-x86-64.c (bfd_mach_o_x86_64_canonicalize_one_reloc):
942 * vms-alpha.c (_bfd_vms_slurp_eihd): Make sure that there is
943 enough data in the record before attempting to parse it.
944 (_bfd_vms_slurp_eeom): Likewise.
946 (_bfd_vms_slurp_egsd): Check for an invalid section index.
947 (image_set_ptr): Likewise.
948 (alpha_vms_slurp_relocs): Likewise.
950 (alpha_vms_object_p): Check for a truncated record.
952 2017-07-24 Nick Clifton <nickc@redhat.com>
955 * reloc.c (_bfd_unrecognized_reloc): New function. Reports
956 an unrecognized reloc and sets the bfd_error value.
957 * libbfd.h: Regenerate.
958 * elf32-arm.c (elf32_arm_final_link_relocate): Use the new
960 * elf32-i386.c (elf_i386_relocate_section): Likewise.
961 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
962 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
963 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.
964 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
966 2017-07-23 Alan Modra <amodra@gmail.com>
968 * elf64-ppc.c (ppc64_elf_size_stubs): Correct advance to
971 2017-07-19 Szabolcs Nagy <szabolcs.nagy@arm.com>
974 * elfnn-aarch64.c (elfNN_aarch64_reloc_type_class): Return
975 reloc_class_ifunc for ifunc symbols.
977 2017-07-19 Nick Clifton <nickc@redhat.com>
980 * archive.c (bfd_generic_archive_p): If the bfd does not have the
981 correct magic bytes at the start, set the error to wrong format
982 and clear the format selector before returning NULL.
984 2017-07-19 Nick Clifton <nickc@redhat.com>
987 * coff-rs6000.c (_bfd_strntol): New function.
988 (_bfd_strntoll): New function.
989 (GET_VALUE_IN_FIELD): New macro.
990 (EQ_VALUE_IN_FIELD): new macro.
991 (_bfd_xcoff_slurp_armap): Use new macros.
992 (_bfd_xcoff_archive_p): Likewise.
993 (_bfd_xcoff_read_ar_hdr): Likewise.
994 (_bfd_xcoff_openr_next_archived_file): Likewise.
995 (_bfd_xcoff_stat_arch_elt): Likewise.
996 * coff64-rs6000.c (_bfd_strntol): New function.
997 (_bfd_strntoll): New function.
998 (GET_VALUE_IN_FIELD): New macro.
999 (xcoff64_slurp_armap): Use new macros.
1001 2017-07-19 Claudiu Zissulescu <claziss@synopsys.com>
1002 John Eric Martin <John.Martin@emmicro-us.com>
1004 * bfd-in2.h: Regenerate.
1005 * libbfd.h: Regenerate.
1006 * elf32-arc.c (JLI): Define.
1007 * reloc.c: Add JLI relocations.
1009 2017-07-18 Nick Clifton <nickc@redhat.com>
1012 * coff-sh.c: Fix spelling typos.
1013 * compress.c: Likewise.
1014 * cpu-pdp11.c: Likewise.
1015 * ecofflink.c: Likewise.
1016 * elf-m10300.c: Likewise.
1018 * elf32-arm.c: Likewise.
1019 * elf32-m68k.c: Likewise.
1020 * elf32-nds32.c: Likewise.
1021 * elf32-ppc.c: Likewise.
1022 * elf32-sh.c: Likewise.
1023 * elf32-v850.c: Likewise.
1024 * elf64-ppc.c: Likewise.
1025 * elf64-x86-64.c: Likewise.
1026 * elflink.c: Likewise.
1027 * elfnn-aarch64.c: Likewise.
1028 * elfxx-mips.c: Likewise.
1030 * sunos.c: Likewise.
1031 * vms-alpha.c: Likewise.
1032 * xcofflink.c: Likewise.
1034 2017-07-18 Nick Clifton <nickc@redhat.com>
1037 * coffcode.h (handle_COMDAT): Replace abort with an error message
1040 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
1043 * elf64-x86-64.c (elf_x86_64_relocate_section): Limit PIC check
1046 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
1048 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
1050 2017-07-16 Alan Modra <amodra@gmail.com>
1052 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimize
1053 __tls_index GOT entries when using __tls_get_addr_opt stub.
1054 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1056 2017-07-12 Alan Modra <amodra@gmail.com>
1058 * po/es.po: Update from translationproject.org/latest/bfd/.
1059 * po/fi.po: Likewise.
1060 * po/fr.po: Likewise.
1061 * po/id.po: Likewise.
1062 * po/ja.po: Likewise.
1063 * po/ro.po: Likewise.
1064 * po/ru.po: Likewise.
1065 * po/sr.po: Likewise.
1066 * po/sv.po: Likewise.
1067 * po/tr.po: Likewise.
1068 * po/uk.po: Likewise.
1069 * po/vi.po: Likewise.
1070 * po/zh_CN.po: Likewise.
1071 * po/hr.po: New file from translationproject.org.
1072 * configure.ac (ALL_LINGUAS): Add hr. Sort.
1073 * configure: Regenerate.
1075 2017-07-12 Nick Clifton <nickc@redhat.com>
1077 Fix compile time warnings using gcc 7.1.1.
1078 * elf32-xtensa.c (elf_xtensa_get_plt_section): Increase length of
1080 (elf_xtensa_get_gotplt_section): Increase length of got_name
1082 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add a
1083 default return of FALSE.
1084 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc): Add a
1085 default return of FALSE.
1087 2017-07-12 Alan Modra <amodra@gmail.com>
1089 * binary.c (binary_set_section_contents): Don't print filepos in
1091 (coff_write_object_contents): Cast size_t for error message.
1092 (coff_slurp_line_table): Don't use bfd_vma symndx.
1093 (coff_slurp_reloc_table): Remove unneeded cast.
1094 * dwarf2.c (read_section): Cast bfd_int64_t to long long for
1096 (find_abstract_instance_name): Likewise.
1097 * elf32-arm.c (arm_type_of_stub): Correct error arg order.
1098 (bfd_elf32_arm_stm32l4xx_erratum_scan): Don't cast error arg.
1099 (elf32_arm_check_relocs): Make r_symndx an int.
1100 * elf32-cris.c (cris_elf_check_relocs): Delete extraneous %s in
1102 * elf32-metag.c (elf_metag_relocate_section): Delete extra error
1104 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Rewrite bogus
1106 * elf32-i386.c (elf_i386_check_relocs): Make r_symndx an int.
1107 * elf32-s390.c (elf_s390_check_relocs): Likewise.
1108 * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
1109 * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
1110 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
1111 * elf64-s390.c (elf_s390_check_relocs): Likewise.
1112 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1113 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
1114 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
1115 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
1116 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
1117 * elf64-mmix.c (_bfd_mmix_after_linker_allocation): Cast size_t args
1118 and use %lu for error message.
1119 * elflink.c (elf_link_adjust_relocs): Delete extra error message arg.
1120 * mmo.c (mmo_scan): Make stab_loc a file_ptr. Cast expression for
1123 * elf32-arm.c (elf32_arm_tls_relax): Correct format string and args
1125 (elf32_arm_final_link_relocate): Likewise.
1126 * coff-arm.c (bfd_arm_process_before_allocation): Likewise.
1127 * coffcode.h (styp_to_sec_flags): Likewise.
1128 * cofflink.c (_bfd_coff_write_global_sym): Likewise.
1129 * ecoff.c (_bfd_ecoff_slurp_symbol_table): Likewise.
1130 * elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise.
1131 * elf32-bfin.c (bfinfdpic_check_relocs): Likewise.
1132 (elf32_bfin_merge_private_bfd_data): Likewise.
1133 * elf32-cris.c (cris_elf_relocate_section): Likewise.
1134 * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
1135 * elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise.
1136 (i370_elf_relocate_section): Likewise.
1137 * elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise.
1138 * elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise.
1139 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
1140 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
1141 * elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise.
1142 * elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise.
1143 * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
1144 * elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise.
1145 (_bfd_mips_elf_merge_private_bfd_data): Likewise.
1146 * ieee.c (ieee_write_id, read_id): Likewise.
1147 * mach-o.c (bfd_mach_o_write_contents): Likewise.
1148 (bfd_mach_o_layout_commands, bfd_mach_o_read_section_32): Likewise.
1149 (bfd_mach_o_read_section_64, bfd_mach_o_read_symtab_symbol): Likewise.
1150 (bfd_mach_o_read_command, bfd_mach_o_header_p): Likewise.
1151 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Likewise.
1152 * stabs.c (_bfd_link_section_stabs): Likewise.
1154 * coff-arm.c (coff_arm_relocate_section): Use L modifier in error
1156 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
1157 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
1158 * coff-rs6000.c (xcoff_reloc_type_toc): Likewise.
1159 * coff-sh.c (sh_relax_section): Likewise.
1160 (sh_relax_delete_bytes, sh_swap_insns): Likewise.
1161 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
1162 * coffcode.h (coff_slurp_reloc_table): Likewise.
1163 * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
1164 (_bfd_coff_read_string_table): Likewise.
1165 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
1166 * compress.c (bfd_get_full_section_contents): Likewise.
1167 * dwarf2.c (read_formatted_entries, decode_line_info): Likewise.
1168 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
1169 * elf.c (bfd_elf_string_from_elf_section): Likewise.
1170 * elf32-arc.c (arc_special_overflow_checks): Likewise.
1171 * elf32-arm.c (elf32_arm_tls_relax): Likewise.
1172 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Likewise.
1173 (elf32_arm_write_section): Likewise.
1174 * elf32-bfin.c (bfin_relocate_section): Likewise.
1175 (bfinfdpic_relocate_section): Likewise.
1176 * elf32-hppa.c (hppa_build_one_stub): Likewise.
1177 (final_link_relocate, elf32_hppa_relocate_section): Likewise.
1178 * elf32-i386.c (elf_i386_tls_transition): Likewise.
1179 (elf_i386_relocate_section): Likewise.
1180 * elf32-ip2k.c (ip2k_final_link_relocate): Likewise.
1181 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
1182 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
1183 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1184 * elf32-metag.c (elf_metag_relocate_section): Likewise.
1185 * elf32-nds32.c (unrecognized_reloc_msg): Likewise.
1186 (nds32_elf_relax_longcall1, nds32_elf_relax_longcall2): Likewise.
1187 (nds32_elf_relax_longcall3, nds32_elf_relax_longjump1): Likewise.
1188 (nds32_elf_relax_longjump2, nds32_elf_relax_longjump3): Likewise.
1189 (nds32_elf_relax_longcall4, nds32_elf_relax_longcall5): Likewise.
1190 (nds32_elf_relax_longcall6, nds32_elf_relax_longjump4): Likewise.
1191 (nds32_elf_relax_longjump5, nds32_elf_relax_longjump6): Likewise.
1192 (nds32_elf_relax_longjump7, nds32_elf_relax_loadstore): Likewise.
1193 (nds32_elf_relax_ptr, nds32_elf_ex9_build_hash_table): Likewise.
1194 * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
1195 * elf32-rx.c (UNSAFE_FOR_PID): Likewise.
1196 * elf32-s390.c (invalid_tls_insn, elf_s390_relocate_section): Likewise.
1197 * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
1198 * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
1199 * elf32-sh.c (sh_elf_relax_section): Likewise.
1200 (sh_elf_relax_delete_bytes, sh_elf_swap_insns): Likewise.
1201 (sh_elf_relocate_section): Likewise.
1202 * elf32-sh64.c (shmedia_prepare_reloc): Likewise.
1203 * elf32-spu.c (spu_elf_relocate_section): Likewise.
1204 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
1205 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
1206 * elf32-v850.c (v850_elf_relax_section): Likewise.
1207 * elf32-vax.c (elf_vax_check_relocs): Likewise.
1208 (elf_vax_relocate_section): Likewise.
1209 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
1210 (extend_ebb_bounds_forward, extend_ebb_bounds_backward): Likewise.
1211 (compute_text_actions, compute_ebb_proposed_actions): Likewise.
1212 (do_fix_for_relocatable_link): Likewise.
1213 * elf64-alpha.c (elf64_alpha_relax_got_load): Likewise.
1214 (elf64_alpha_relax_with_lituse): Likewise.
1215 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Likewise.
1216 (elf_hppa_final_link_relocate): Likewise.
1217 * elf64-ia64-vms.c (elf64_ia64_relax_section): Likewise.
1218 (elf64_ia64_choose_gp, elf64_ia64_relocate_section): Likewise.
1219 (elf64_vms_link_add_object_symbols): Likewise.
1220 * elf64-mmix.c (mmix_elf_perform_relocation): Likewise.
1221 (mmix_final_link_relocate): Likewise.
1222 * elf64-s390.c (invalid_tls_insn): Likewise.
1223 (elf_s390_relocate_section): Likewise.
1224 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
1225 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
1226 (elf_x86_64_relocate_section): Likewise.
1227 * elfcode.h (elf_slurp_symbol_table): Likewise.
1228 * elfcore.h (elf_core_file_p): Likewise.
1229 * elflink.c (elf_link_read_relocs_from_section): Likewise.
1230 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
1231 (elfNN_aarch64_relocate_section): Likewise.
1232 * elfnn-ia64.c (elfNN_ia64_relax_section): Likewise.
1233 (elfNN_ia64_choose_gp, elfNN_ia64_relocate_section): Likewise.
1234 * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
1235 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
1236 (_bfd_mips_elf_relocate_section): Likewise.
1237 (_bfd_mips_elf_finish_dynamic_symbol, mips_finish_exec_plt): Likewise.
1238 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
1239 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
1240 * ieee.c (ieee_slurp_external_symbols): Likewise.
1241 * ihex.c (ihex_write_object_content): Likewise.
1242 * mach-o.c (bfd_mach_o_build_exec_seg_command): Likewise.
1243 * merge.c (_bfd_merged_section_offset): Likewise.
1244 * mmo.c (mmo_write_loc_chunk): Likewise.
1245 (mmo_write_object_contents): Likewise.
1246 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Likewise.
1247 * stabs.c (_bfd_link_section_stabs): Likewise.
1248 * xcofflink.c (xcoff_link_add_symbols, xcoff_find_tc0): Likewise.
1250 2017-07-11 Alan Modra <amodra@gmail.com>
1252 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo.
1254 2017-07-11 Alan Modra <amodra@gmail.com>
1256 * elf32-ppc.c (ppc_elf_relocate_section): Emit "unexpected
1257 instruction" error using _bfd_error_handler, not einfo.
1259 2017-07-10 Nick Clifton <nickc@redhat.com>
1261 * coffcode.h (coff_slurp_symbol_table): Do not include an entry
1262 for C_AIX_WEAKEXT if it has the same value as C_WEAKEXT.
1264 2017-07-07 John Baldwin <jhb@FreeBSD.org>
1266 * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PTLWPINFO.
1268 2017-07-07 Alan Modra <amodra@gmail.com>
1270 * coffcode.h (coff_slurp_symbol_table): Handle C_AIX_WEAKEXT.
1272 2017-07-07 Alan Modra <amodra@gmail.com>
1274 * bfd.c (_doprnt): Replace "L" with "ll" when printing bfd_vma
1275 as long long. Move code replacing "ll" with "I64", and simplify.
1277 2017-07-06 H.J. Lu <hongjiu.lu@intel.com>
1279 * bfd.c (_doprnt): Convert 'L' to 'l' when setting wide_width
1282 2017-07-05 H.J. Lu <hongjiu.lu@intel.com>
1284 * dwarf2.c (line_info_add_include_dir_stub): Replace time with
1286 (line_info_add_file_name): Likewise.
1287 (decode_line_info): Likewise.
1289 2017-07-04 Tristan Gingold <gingold@adacore.com>
1291 * version.m4: Bump version to 2.29.51
1292 * configure: Regenerate.
1294 2017-07-04 Jiong Wang <jiong.wang@arm.com>
1296 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Remove the
1297 sanity check at the head of this function.
1299 2017-07-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1301 * dwarf2.c (struct dwarf2_debug): Add fields dwarf_line_str_buffer and
1302 dwarf_line_str_size.
1303 (struct attr_abbrev): Add field implicit_const.
1304 (dwarf_debug_sections): Add .debug_line_str.
1305 (enum dwarf_debug_section_enum): Add debug_line_str and debug_max.
1306 (dwarf_debug_section_assert): Add static assertion.
1307 (read_indirect_line_string): New.
1308 (read_abbrevs): Support DW_FORM_implicit_const.
1309 (is_str_attr): Support DW_FORM_line_strp.
1310 (read_attribute_value): Support DW_FORM_line_strp and
1311 DW_FORM_implicit_const.
1312 (read_attribute): Support DW_FORM_implicit_const.
1313 (line_info_add_include_dir, line_info_add_include_dir_stub):
1314 (line_info_add_file_name, read_formatted_entries): New.
1315 (decode_line_info, parse_comp_unit): Support DWARF 5.
1316 (_bfd_dwarf2_cleanup_debug_info): Free dwarf_line_str_buffer.
1318 2017-07-03 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
1320 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove the
1321 abort statement that was put for symbols that are not dynamic.
1323 2017-07-03 Tristan Gingold <gingold@adacore.com>
1325 * po/bfd.pot: Regenerate
1327 2017-07-03 Alan Modra <amodra@gmail.com>
1329 * bfd.c (_doprnt): Rewrite "ll" and "L" modifiers to "I64" for
1330 __MSVCRT__. Support "L" modifier for bfd_vma. Formatting.
1331 * elf.c (setup_group): Use "Lx" to print sh_size.
1332 (_bfd_elf_setup_sections): Remove unnecessary cast and print
1333 unknown section type in hex.
1334 (copy_special_section_fields): Style fix.
1335 (bfd_section_from_shdr): Correct format for sh_link. Use a
1336 common error message for all the variants of unrecognized
1338 (assign_file_positions_for_load_sections): Use "Lx" for lma
1339 adjust error message.
1340 (assign_file_positions_for_non_load_sections): Formatting.
1341 (rewrite_elf_program_header): Formatting. Use "Lx" for
1342 bfd_vma values in error messages.
1343 * elfcode.h (elf_slurp_reloc_table_from_section): Cast
1344 ELF_R_SYM value to type expected by format.
1345 * elflink.c (elf_link_read_relocs_from_section): Use "Lx"
1347 (elf_link_add_object_symbols): Use "Lu" for symbol sizes.
1348 (elf_link_input_bfd): Use "Lx" for r_info.
1349 (bfd_elf_gc_record_vtinherit): Use "Lx" for offset.
1351 2017-07-03 Alan Modra <amodra@gmail.com>
1353 * bfd.c (bfd_scan_vma): Don't use long long unless HAVE_LONG_LONG.
1354 * coff-rs6000.c (FMT20): Handle hosts with 64-bit long and
1355 Microsoft C library variant of long long format specifier.
1356 (PRINT20): Cast value to bfd_uint64_t not long long.
1357 * coffcode.h (coff_print_aux): Use BFD_VMA_FMT.
1358 * coff-x86_64.c (coff_amd64_reloc): Use bfd_uint64_t rather than
1359 long long. Don't cast to bfd_vma.
1360 * elf32-score.c (score3_bfd_getl48): Likewise.
1361 * vms-alpha.c (_bfd_vms_slurp_eisd): Likewise.
1363 2017-07-03 Alan Modra <amodra@gmail.com>
1365 * elf.c (_bfd_elf_print_private_bfd_data): Use BFD_VMA_FMT to
1367 (bfd_elf_print_symbol): Don't cast symbol->flags.
1368 (_bfd_elf_symbol_from_bfd_symbol): Likewise.
1369 * elf32-ppc.c (ppc_elf_begin_write_processing): Correct
1370 _bfd_error_handler argument order.
1371 (ppc_elf_merge_private_bfd_data): Don't cast flags.
1373 2017-07-03 Alan Modra <amodra@gmail.com>
1375 * configure.ac: Invoke AC_CHECK_TYPES for long long. Invoke
1376 AC_TYPE_LONG_DOUBLE.
1377 * configure: Regenerate.
1378 * config.in: Regenerate.
1380 2017-06-29 Andrew Waterman <andrew@sifive.com>
1382 * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Fix TLS copy
1385 2017-06-29 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
1387 * elfxx-sparc.c (allocate_dynrelocs): Don't make a symbol dynamic
1388 unless it is undefined weak.
1389 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Set the flag
1390 relative_reloc to direct non-dynamic symbols to R_SPARC_RELATIVE
1392 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): If symbol
1393 is not dynamic in PIC, abort.
1395 2017-06-29 Jiong Wang <jiong.wang@arm.com>
1398 * elfnn-aarch64.c (elfNN_aarch64_allocate_dynrelocs): Only make
1399 undefined weak symbols into dynamic.
1400 (elfNN_aarch64_final_link_relocate): Generate runtime RELATIVE
1401 relocation for non-dynamic symbols.
1402 (elfNN_aarch64_finish_dynamic_symbol): Add sanity check.
1404 2017-06-29 Jiong Wang <jiong.wang@arm.com>
1406 * elfnn-aarch64.c (aarch64_relocation_aginst_gp_p): New function.
1407 (elfNN_aarch64_final_link_relocate): Delete duplicated code for
1408 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15, BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
1409 BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
1410 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Optimize the
1413 2017-06-29 Andreas Arnez <arnez@linux.vnet.ibm.com>
1415 * elf-bfd.h (elfcore_write_s390_gs_cb): Add prototype.
1416 (elfcore_write_s390_gs_bc): Likewise.
1417 * elf.c (elfcore_grok_s390_gs_cb): New function.
1418 (elfcore_grok_s390_gs_bc): New function.
1419 (elfcore_grok_note): Call them.
1420 (elfcore_write_s390_gs_cb): New function.
1421 (elfcore_write_s390_gs_bc): New function.
1422 (elfcore_write_register_note): Call them.
1424 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
1426 * libbfd.c (_bfd_generic_get_section_contents): Don't call
1427 bfd_get_file_size. Check archive element size.
1428 (_bfd_generic_get_section_contents_in_window): Likewise.
1430 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
1432 * bfd-in2.h: Regenerated.
1433 * bfdio.c (bfd_get_size): Change return type to ufile_ptr.
1434 (bfd_get_file_size): Likewise.
1436 2017-06-28 Maciej W. Rozycki <macro@imgtec.com>
1437 Matthew Fortune <matthew.fortune@imgtec.com>
1439 * archures.c (bfd_mach_mips_interaptiv_mr2): New macro.
1440 * cpu-mips.c (I_interaptiv_mr2): New enum value.
1441 (arch_info_struct): Add "mips:interaptiv-mr2" entry.
1442 * elfxx-mips.c (_bfd_elf_mips_mach) <E_MIPS_MACH_IAMR2>: New
1444 (mips_set_isa_flags) <bfd_mach_mips_interaptiv_mr2>: Likewise.
1445 (bfd_mips_isa_ext) <bfd_mach_mips_interaptiv_mr2>: Likewise.
1446 (print_mips_isa_ext) <AFL_EXT_INTERAPTIV_MR2>: Likewise.
1447 (mips_mach_extensions): Add `bfd_mach_mipsisa32r3' and
1448 `bfd_mach_mips_interaptiv_mr2' entries.
1449 * bfd-in2.h: Regenerate.
1451 2017-06-27 Nick Clifton <nickc@redhat.com>
1453 * tekhex.c (pass_over): Revert accidental conversion of a local
1454 array to a static array.
1456 2017-06-27 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
1459 * elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Adjust
1460 reloc addend if necessary. Adjust diff only if
1461 shrinked_insn_address < end_address.
1463 2017-06-27 Alan Modra <amodra@gmail.com>
1466 * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
1467 (_bfd_generic_get_section_contents_in_window): Likewise.
1469 2017-06-26 Kuan-Lin Chen <rufus@andestech.com>
1471 * elfnn-riscv.c (perform_relocation): Support the new
1472 R_RISCV_32_PCREL relocation.
1473 (riscv_elf_relocate_section): Likewise.
1474 * elfxx-riscv.c (howto_table): Likewise.
1475 (riscv_reloc_map): Likewise.
1476 * bfd-in2.h (BFD_RELOC_RISCV_32_PCREL): New relocation.
1477 * libbfd.h: Regenerate.
1479 2017-06-27 Alan Modra <amodra@gmail.com>
1482 * libbfd.c (_bfd_generic_get_section_contents): Delete abort.
1483 Use unsigned file pointer type, and remove cast.
1484 * libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise.
1485 Add "count", not "sz".
1487 2017-06-26 Pedro Alves <palves@redhat.com>
1490 * libbfd.c (_bfd_generic_get_section_contents): Add "count", not
1493 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
1496 * libbfd.c (_bfd_generic_get_section_contents_in_window): Add
1499 2017-06-26 Maciej W. Rozycki <macro@imgtec.com>
1501 * cpu-mips.c (arch_info_struct): Mark the 4010 32-bit.
1502 * elfxx-mips.c (mips_set_isa_flags) <bfd_mach_mips4010>: Set
1503 E_MIPS_ARCH_2 rather than E_MIPS_ARCH_3 in `e_flags'.
1504 (mips_mach_extensions): Mark `bfd_mach_mips4010' as extending
1505 `bfd_mach_mips6000' rather than `bfd_mach_mips4000'.
1507 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
1510 * compress.c (bfd_get_full_section_contents): Don't check the
1512 * libbfd.c (_bfd_generic_get_section_contents): Check for and
1513 reject a section whose size + offset is greater than the size
1515 (_bfd_generic_get_section_contents_in_window): Likewise.
1517 2017-06-26 Nick Clifton <nickc@redhat.com>
1520 * tekhex.c (getvalue): Check for the source pointer exceeding the
1521 end pointer before the first byte is read.
1523 2017-06-26 Nick Clifton <nickc@redhat.com>
1526 * opncls.c (get_build_id): Check that the section is big enough
1527 to contain the whole note.
1528 * compress.c (bfd_get_full_section_contents): Check for and reject
1529 a section whose size is greater than the size of the entire file.
1530 * elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not
1531 contain a notes section.
1533 2017-06-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1535 * elf64-s390.c (elf_s390_additional_program_headers): Add NULL
1537 (elf_s390_modify_segment_map): Likewise.
1538 (bfd_elf_s390_set_options): Lisewise.
1540 2017-06-26 Alan Modra <amodra@gmail.com>
1542 * elflink.c (_bfd_elf_link_create_dynstrtab): Don't make dynobj
1544 (_bfd_elf_size_group_sections): Skip --just-syms bfds.
1545 (bfd_elf_size_dynamic_sections): Ignore .note.GNU-stack and
1546 .preinit_array on --just-syms bfds.
1547 (_bfd_elf_gc_mark_extra_sections): Skip --just-syms bfds.
1548 (elf_gc_sweep, bfd_elf_parse_eh_frame_entries): Likewise.
1549 (bfd_elf_gc_sections, bfd_elf_discard_info): Likewise.
1551 2017-06-25 Sergei Trofimovich <slyfox@gentoo.org>
1553 * elf.c (find_link): Bounds check "hint".
1555 2017-06-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
1557 * elf32-arm.c (using_thumb_only): Update list of architectures in
1558 BFD_ASSERT for which the logic is valid.
1559 (using_thumb2_bl): Likewise.
1560 (using_thumb2): Likewise and return true for ARMv8-R.
1561 (arch_has_arm_nop): Likewise.
1562 (tag_cpu_arch_combine): New v8r table for ARMv8-R Tag_CPU_arch
1563 merging logic. Update commentis for value 15 of v8m_baseline,
1564 v8m_mainline and v4t_plus_v6_m arrays. Use v8r array to decide
1565 merging of value 15 of Tag_CPU_arch.
1567 2017-06-23 Jiong Wang <jiong.wang@arm.com>
1569 * reloc.c (BFD_RELOC_AARCH64_ADR_GOTPAGE): Rename to
1570 BFD_RELOC_AARCH64_ADR_GOT_PAGE
1571 * bfd-in2.h: Regenerate.
1573 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1575 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Move
1576 the error_alignment label forward. Properly align program
1577 property note section.
1579 2017-06-22 Eric Christopher <echristo@gmail.com>
1581 * elf32-arm.c (elf32_arm_final_link_relocate): Use labs rather than
1582 abs to fix a truncation warning.
1584 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1586 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Resolve
1587 local undefined weak symbol to 0.
1588 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Likewise.
1590 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1592 * elf32-i386.c (elf_i386_merge_gnu_properties): If info->shstk
1593 is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
1594 (elf_i386_link_setup_gnu_properties): If info->shstk is set,
1595 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
1596 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): If
1597 info->shstk is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
1598 (elf_x86_64_link_setup_gnu_properties): If info->shstk is set,
1599 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
1601 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1603 * elf32-i386.c (elf_i386_lazy_ibt_plt0_entry): New.
1604 (elf_i386_lazy_ibt_plt_entry): Likewise.
1605 (elf_i386_pic_lazy_ibt_plt0_entry): Likewise.
1606 (elf_i386_non_lazy_ibt_plt_entry): Likewise.
1607 (elf_i386_pic_non_lazy_ibt_plt_entry): Likewise.
1608 (elf_i386_eh_frame_lazy_ibt_plt): Likewise.
1609 (elf_i386_lazy_plt_layout): Likewise.
1610 (elf_i386_non_lazy_plt_layout): Likewise.
1611 (elf_i386_link_hash_entry): Add plt_second.
1612 (elf_i386_link_hash_table): Add plt_second and
1613 plt_second_eh_frame.
1614 (elf_i386_allocate_dynrelocs): Use the second PLT if needed.
1615 (elf_i386_size_dynamic_sections): Use .plt.got unwind info for
1616 the second PLT. Check the second PLT.
1617 (elf_i386_relocate_section): Use the second PLT to resolve
1618 PLT reference if needed.
1619 (elf_i386_finish_dynamic_symbol): Fill and use the second PLT if
1621 (elf_i386_finish_dynamic_sections): Set sh_entsize on the
1622 second PLT. Generate unwind info for the second PLT.
1623 (elf_i386_plt_type): Add plt_second.
1624 (elf_i386_get_synthetic_symtab): Support the second PLT.
1625 (elf_i386_parse_gnu_properties): Support
1626 GNU_PROPERTY_X86_FEATURE_1_AND.
1627 (elf_i386_merge_gnu_properties): Support
1628 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
1629 on GNU_PROPERTY_X86_FEATURE_1_IBT
1630 (elf_i386_link_setup_gnu_properties): If info->ibt is set,
1631 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
1632 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
1633 is set on all relocatable inputs.
1634 * elf64-x86-64.c (elf_x86_64_lazy_ibt_plt_entry): New.
1635 (elf_x32_lazy_ibt_plt_entry): Likewise.
1636 (elf_x86_64_non_lazy_ibt_plt_entry): Likewise.
1637 (elf_x32_non_lazy_ibt_plt_entry): Likewise.
1638 (elf_x86_64_eh_frame_lazy_ibt_plt): Likewise.
1639 (elf_x32_eh_frame_lazy_ibt_plt): Likewise.
1640 (elf_x86_64_lazy_ibt_plt): Likewise.
1641 (elf_x32_lazy_ibt_plt): Likewise.
1642 (elf_x86_64_non_lazy_ibt_plt): Likewise.
1643 (elf_x32_non_lazy_ibt_plt): Likewise.
1644 (elf_x86_64_get_synthetic_symtab): Support the second PLT.
1645 (elf_x86_64_parse_gnu_properties): Support
1646 GNU_PROPERTY_X86_FEATURE_1_AND.
1647 (elf_x86_64_merge_gnu_properties): Support
1648 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
1649 on GNU_PROPERTY_X86_FEATURE_1_IBT
1650 (elf_x86_64_link_setup_gnu_properties): If info->ibt is set,
1651 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
1652 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
1653 is set on all relocatable inputs.
1655 2017-06-22 Nick Clifton <nickc@redhat.com>
1658 * som.c (setup_sections): NUL terminate the space_strings buffer.
1659 Check that the space.name field does not index beyond the end of
1660 the space_strings buffer.
1662 2017-06-21 Nick Clifton <nickc@redhat.com>
1665 * coff-sh.c (sh_reloc): Check for an out of range reloc.
1667 2017-06-21 Nick Clifton <nickc@redhat.com>
1670 * vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as
1671 type of the size parameter.
1672 (_bfd_vms_save_counted_string): Add second parameter - the maximum
1673 length of the counted string.
1674 * vms.h (_bfd_vms_save_sized_string): Update prototype.
1675 (_bfd_vms_save_counted_string): Likewise.
1676 * vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to
1677 _bfd_vms_save_counted_string.
1678 (_bfd_vms_slurp_ehdr): Likewise.
1679 (_bfd_vms_slurp_egsd): Likewise.
1680 (Parse_module): Likewise.
1682 2017-06-21 Alan Modra <amodra@gmail.com>
1684 * elf64-ppc.c (ppc64_elf_size_stubs): Test for localentry:0 plt
1685 calls before tocsave calls.
1686 (ppc64_elf_relocate_section): Allow localentry:0 plt calls without
1689 2017-06-21 Nick Clifton <nickc@redhat.com>
1692 * reloc.c (bfd_generic_get_relocated_section_contents): Fail if
1693 bfd_get_full_section_contents returns no contents.
1695 2017-06-21 Nick Clifton <nickc@redhat.com>
1698 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized
1701 2017-06-21 Nick Clifton <nickc@redhat.com>
1704 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section
1706 (image_set_ptr): Likewise.
1707 (alpha_vms_fix_sec_rel): Likewise.
1708 (alpha_vms_slurp_relocs): Likewise.
1710 2017-06-21 Nick Clifton <nickc@redhat.com>
1713 * ieee.c (ieee_slurp_sections): Check for a NULL return from
1715 (ieee_archive_p): Likewise.
1716 (ieee_object_p): Likewise.
1718 2017-06-21 Nick Clifton <nickc@redhat.com>
1721 * elf.c (setup_group): Zero the group section pointer list after
1722 allocation so that loops can be caught. Check for NULL pointers
1723 when processing a group list.
1725 2017-06-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1727 * elf-s390.h: New file.
1728 * elf64-s390.c (struct elf_s390_link_hash_table): Add params
1730 (elf_s390_additional_program_headers): New function.
1731 (elf_s390_modify_segment_map): New function.
1732 (bfd_elf_s390_set_options): New function.
1733 (elf_backend_additional_program_headers)
1734 (elf_backend_modify_segment_map): Add macro definitions.
1736 2017-06-19 H.J. Lu <hongjiu.lu@intel.com>
1739 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
1740 the DYNAMIC bit instead of bfd_count_sections.
1742 2017-06-19 Nick Clifton <nickc@redhat.com>
1745 * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record
1747 (evax_bfd_print_eeom): Likewise.
1748 (evax_bfd_print_egsd): Check for an overlarge record length.
1749 (evax_bfd_print_etir): Likewise.
1751 2017-06-19 Nick Clifton <nickc@redhat.com>
1754 * libieee.h (struct common_header_type): Add end_p field.
1755 * ieee.c (this_byte_and_next): Do not advance input_p beyond
1757 (read_id): Check for a length that exceeds the remaining bytes in
1759 (ieee_seek): Initialise end_p.
1760 (ieee_archive_p): Likewise.
1761 (ieee_object_p): Likewise.
1763 2017-06-19 Nick Clifton <nickc@redhat.com>
1766 * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset
1767 before reading the EIHS structure entries.
1769 2017-06-19 Nick Clifton <nickc@redhat.com>
1772 * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for
1773 gsd_size. Check that there are enough bytes remaining to read the
1774 type and size of the next egsd. Check that the size of the egsd
1775 does not exceed the size of the record.
1777 2017-06-19 Alan Modra <amodra@gmail.com>
1779 * config.bfd: Correct targ_underscore for cris.
1781 2017-06-18 Alan Modra <amodra@gmail.com>
1783 * config.bfd: Correct targ_underscore for epiphany, ip2k,
1784 m32c, mn10200, pru, rl78, rx, crisv32 and v850.
1786 2017-06-16 Nick Clifton <nickc@redhat.com>
1788 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
1789 bucketlist is empty because there are no symbols to add to the
1792 2017-06-16 Alan Modra <amodra@gmail.com>
1798 * targets.c (struct bfd_target): Add _bfd_define_start_stop.
1799 (BFD_JUMP_TABLE_LINK): Likewise.
1800 * elf-bfd.h (bfd_elf_define_start_stop): Declare.
1801 * elflink.c (_bfd_elf_gc_mark_rsec): Update comment.
1802 (bfd_elf_define_start_stop): New function.
1803 * linker.c (bfd_generic_define_start_stop): New function.
1804 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init
1806 * aout-adobe.c (aout_32_bfd_define_start_stop): Define.
1807 * aout-target.h (MY_bfd_define_start_stop): Define.
1808 * aout-tic30.c (MY_bfd_define_start_stop): Define.
1809 * binary.c (binary_bfd_define_start_stop): Define.
1810 * bout.c (b_out_bfd_define_start_stop): Define.
1811 * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define.
1812 * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define.
1813 * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define.
1814 * coffcode.h (coff_bfd_define_start_stop): Define.
1815 * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define.
1816 * i386msdos.c (msdos_bfd_define_start_stop): Define.
1817 * i386os9k.c (os9k_bfd_define_start_stop): Define.
1818 * ieee.c (ieee_bfd_define_start_stop): Define.
1819 * ihex.c (ihex_bfd_define_start_stop): Define.
1820 * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define.
1821 * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define.
1822 * mmo.c (mmo_bfd_define_start_stop): Define.
1823 * nlm-target.h (nlm_bfd_define_start_stop): Define.
1824 * oasys.c (oasys_bfd_define_start_stop): Define.
1825 * pef.c (bfd_pef_bfd_define_start_stop): Define.
1826 * plugin.c (bfd_plugin_bfd_define_start_stop): Define.
1827 * ppcboot.c (ppcboot_bfd_define_start_stop): Define.
1828 * som.c (som_bfd_define_start_stop): Define.
1829 * srec.c (srec_bfd_define_start_stop): Define.
1830 * tekhex.c (tekhex_bfd_define_start_stop): Define.
1831 * versados.c (versados_bfd_define_start_stop): Define.
1832 * vms-alpha.c (vms_bfd_define_start_stop): Define.
1833 (alpha_vms_bfd_define_start_stop): Define.
1834 * xsym.c (bfd_sym_bfd_define_start_stop): Define.
1835 * bfd-in2.h: Regenerate.
1836 * libbfd.h: Regenerate.
1838 2017-06-16 Jiong Wang <jiong.wang@arm.com>
1840 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
1841 SYMBOL_REFERENCES_LOCAL.
1843 2017-06-15 Jiong Wang <jiong.wang@arm.com>
1846 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
1847 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
1848 runtime for if there needs copy relocation elimination.
1849 (need_copy_relocation_p): New function. Return true for symbol with
1850 pc-relative references and if it's against read-only sections.
1851 (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
1852 (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
1853 that are related with accessing external objects.
1854 (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change
1855 in elfNN_aarch64_check_relocs.
1857 2017-06-15 Nick Clifton <nickc@redhat.com>
1860 * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
1863 (ieee_archive_p): Likewise.
1865 2017-06-15 Nick Clifton <nickc@redhat.com>
1868 * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
1870 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
1872 * elf32-xtensa.c (elf_xtensa_be_plt_entry,
1873 elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays,
1874 keep both windowed and call0 ABI PLT definitions.
1875 (elf_xtensa_create_plt_entry): Use selected ABI to choose upper
1876 elf_xtensa_*_plt_entry endex.
1877 (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size.
1879 2017-06-14 Nick Clifton <nickc@redhat.com>
1882 * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
1885 2017-06-14 Nick Clifton <nickc@redhat.com>
1888 * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
1889 maximum value for the ascic pointer. Check that name processing
1890 does not read beyond this value.
1891 (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
1894 2017-06-14 Nick Clifton <nickc@redhat.com>
1897 * versados.c (versados_mkobject): Zero the allocated tdata structure.
1898 (process_otr): Check for an invalid offset in the otr structure.
1900 2017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
1902 * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
1904 2017-06-13 H.J. Lu <hongjiu.lu@intel.com>
1910 * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
1911 vtable field to a union.
1912 (_bfd_elf_is_start_stop): Removed.
1913 * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
1914 __start_SECNAME and __stop_SECNAME symbols.
1915 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
1916 * elflink.c (_bfd_elf_is_start_stop): Removed.
1917 (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
1918 _bfd_elf_is_start_stop.
1919 (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
1920 __stop_SECNAME symbols. Updated.
1921 (elf_gc_smash_unused_vtentry_relocs): Likewise.
1922 (bfd_elf_gc_record_vtinherit): Likewise.
1923 (bfd_elf_gc_record_vtentry): Likewise.
1925 2017-06-13 Nick Clifton <nickc@redhat.com>
1928 * elflink.c (elf_link_adjust_relocs): Generate an error when
1929 encountering a reloc against a symbol removed by garbage
1932 2017-06-12 H.J. Lu <hongjiu.lu@intel.com>
1934 * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
1935 to merge_gnu_properties.
1936 * elf-properties.c (elf_merge_gnu_properties): Add struct
1937 bfd_link_info * and pass it to merge_gnu_properties.
1938 (elf_merge_gnu_property_list): Add struct bfd_link_info *
1939 and pass it to elf_merge_gnu_properties.
1940 (_bfd_elf_link_setup_gnu_properties): Pass info to
1941 elf_merge_gnu_property_list.
1942 * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
1944 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
1946 2017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
1949 * binary.c (binary_set_section_contents): Scale lma by octets
1950 per byte to set filepos.
1952 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1954 * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
1957 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1959 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
1962 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1964 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
1965 patched section contents for TLS IE reloc.
1966 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
1968 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1970 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
1971 RELOC_FOR_GLOBAL_SYMBOL macro.
1973 2018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1975 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
1978 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1980 * config/tc-arc.c (md_undefined_symbol): Changed.
1981 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
1983 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1985 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
1988 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1990 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
1991 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
1993 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1995 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
1998 2017-06-08 Richard Earnshaw <rearnsha@arm.com>
2000 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
2001 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
2002 is non-zero. Add clarifying comments.
2004 2017-06-08 H.J. Lu <hongjiu.lu@intel.com>
2006 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
2007 name. Use local IFUNC symbol name string to report unsupported
2008 non-PIC call to IFUNC function.
2009 (elf_i386_relocate_section): Dump local IFUNC name with minfo
2010 when generating R_386_IRELATIVE relocation.
2011 (elf_i386_finish_dynamic_symbol): Likewise.
2012 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
2014 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
2015 when generating R_X86_64_IRELATIVE relocation.
2016 (elf_x86_64_finish_dynamic_symbol): Likewise.
2018 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2020 * elf.c (setup_group): Make sure BFD sections are created for all
2021 group sections in the input file when processing SHF_GROUP
2023 (bfd_section_from_shdr): Avoid duplicating logic already
2024 implemented in `setup_group'.
2026 2017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
2029 * peXXigen.c (pe_print_idata): Use the address of the first thunk
2030 if the hint address is zero.
2032 2017-06-06 James Clarke <jrtc27@jrtc27.com>
2035 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
2036 ELF_COMMON_DEF_P for common symbols.
2038 2017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
2040 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
2041 SEC_GROUP sections as SEC_EXCLUDE.
2042 (bfd_elf_set_group_contents): Replace use of abort with an assert.
2043 (assign_section_numbers): Use resolve_section_groups flag instead
2044 of relocatable link type.
2045 (_bfd_elf_init_private_section_data): Use resolve_section_groups
2046 flag instead of checking the final_link flag for part of the
2047 checks in here. Fix white space as a result.
2048 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
2049 instead of relocatable link type.
2050 (bfd_elf_final_link): Likewise.
2052 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2054 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
2056 * elf32-score.c (score_elf_final_link_relocate): Likewise.
2057 (s3_bfd_score_elf_check_relocs): Likewise.
2058 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
2059 (score_elf_final_link_relocate): Likewise.
2060 (s7_bfd_score_elf_check_relocs): Likewise.
2062 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2064 * elflink.c (init_reloc_cookie_rels): Remove unused variable
2067 2017-06-06 Maciej W. Rozycki <macro@imgtec.com>
2069 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
2070 from `reloc_count' rather than decrementing it.
2071 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
2072 `reloc_count' by `int_rels_per_ext_rel'.
2073 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
2074 `reloc_count' by `int_rels_per_ext_rel' for last relocation
2075 entry determination.
2076 (s3_bfd_score_elf_check_relocs): Likewise.
2077 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
2078 (s7_bfd_score_elf_relocate_section): Likewise.
2079 (s7_bfd_score_elf_check_relocs): Likewise.
2080 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
2081 prototype and function.
2082 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
2083 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
2084 triple rather than once the sum of REL and RELA relocation entry
2086 (bfd_elf64_get_reloc_upper_bound): Remove macro.
2087 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
2088 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
2089 storage allocation size determination.
2090 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
2091 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
2092 by `int_rels_per_ext_rel' for last relocation entry
2094 (bfd_elf_final_link): Do not multiply `reloc_count' by
2095 `int_rels_per_ext_rel' for internal relocation storage
2096 allocation size determination.
2097 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
2098 `int_rels_per_ext_rel' for last relocation entry determination.
2099 (elf_gc_smash_unused_vtentry_relocs): Likewise.
2100 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
2101 (_bfd_mips_elf_relocate_section): Likewise.
2103 2017-06-05 Alan Modra <amodra@gmail.com>
2106 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
2108 2017-06-01 John Baldwin <jhb@FreeBSD.org>
2110 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
2111 determine structure sizes.
2112 (elfcore_grok_freebsd_prstatus): Likewise.
2114 2017-06-01 Alan Modra <amodra@gmail.com>
2116 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
2117 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
2119 (is_elfv2_localentry0): New function.
2120 (ppc64_elf_tls_setup): Default params->plt_localentry0.
2121 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
2122 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
2123 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
2124 optimized localentry:0 stubs.
2125 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
2126 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
2128 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
2130 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
2132 2017-05-30 Casey Smith <clegg89@gmail.com>
2135 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
2136 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
2138 2017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
2140 * cpu-arc.c (arc_compatible): New function.
2142 2017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
2144 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
2146 2017-05-30 H.J. Lu <hongjiu.lu@intel.com>
2149 * bfdio.c (bfd_get_file_size): New function.
2150 * bfd-in2.h: Regenerated.
2152 2017-05-23 Dilian Palauzov <git-dpa@aegee.org>
2154 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
2157 2017-05-22 H.J. Lu <hongjiu.lu@intel.com>
2159 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
2160 dynobj instead of htab->elf.dynobj.
2162 2017-05-19 Maciej W. Rozycki <macro@imgtec.com>
2164 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
2166 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
2167 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
2168 actual number of internal relocations retrieved. Adjust
2169 function description.
2170 (bfd_elf64_canonicalize_reloc): Remove macro.
2171 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
2173 2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
2175 * archures.c (bfd_mach_sparc_v9m8): Define.
2176 (bfd_mach_sparc_v8plusm8): Likewise.
2177 (bfd_mach_sparc_v9_p): Adjust to M8.
2178 (bfd_mach_sparc_64bit_p): Likewise.
2179 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
2180 bfd_mach_sparc_v8plusm8.
2181 * bfd-in2.h: Regenerated.
2182 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
2184 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
2185 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
2186 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
2188 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
2189 bfd_mach_sparc_v8plusm8.
2191 2017-05-19 Alan Modra <amodra@gmail.com>
2193 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
2194 debug and special sections when no non-note alloc sections in an
2197 2017-05-18 Alan Modra <amodra@gmail.com>
2199 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
2200 * elf-m10300.c: Likewise.
2202 * elf32-arc.c: Likewise.
2203 * elf32-bfin.c: Likewise.
2204 * elf32-m68k.c: Likewise.
2205 * elf32-nds32.c: Likewise.
2206 * elf32-tilepro.c: Likewise.
2207 * elflink.c: Likewise.
2208 * elfnn-aarch64.c: Likewise.
2209 * elfnn-riscv.c: Likewise.
2210 * elfxx-tilegx.c: Likewise.
2211 * mach-o.c: Likewise.
2212 * peXXigen.c: Likewise.
2213 * vms-alpha.c: Likewise.
2214 * vms-lib.c: Likewise.
2216 2017-05-17 H.J. Lu <hongjiu.lu@intel.com>
2219 * elflink.c (elf_gc_mark_debug_section): New function.
2220 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
2221 referenced by kept debug sections.
2223 2017-05-16 Alan Modra <amodra@gmail.com>
2225 * elf-m10300.c: Rename occurrences of non_ir_ref.
2226 * elf32-arm.c: Likewise.
2227 * elf32-bfin.c: Likewise.
2228 * elf32-cr16.c: Likewise.
2229 * elf32-cris.c: Likewise.
2230 * elf32-d10v.c: Likewise.
2231 * elf32-dlx.c: Likewise.
2232 * elf32-fr30.c: Likewise.
2233 * elf32-frv.c: Likewise.
2234 * elf32-hppa.c: Likewise.
2235 * elf32-i370.c: Likewise.
2236 * elf32-i386.c: Likewise.
2237 * elf32-iq2000.c: Likewise.
2238 * elf32-lm32.c: Likewise.
2239 * elf32-m32c.c: Likewise.
2240 * elf32-m32r.c: Likewise.
2241 * elf32-m68hc1x.c: Likewise.
2242 * elf32-m68k.c: Likewise.
2243 * elf32-mcore.c: Likewise.
2244 * elf32-metag.c: Likewise.
2245 * elf32-microblaze.c: Likewise.
2246 * elf32-moxie.c: Likewise.
2247 * elf32-msp430.c: Likewise.
2248 * elf32-mt.c: Likewise.
2249 * elf32-nios2.c: Likewise.
2250 * elf32-or1k.c: Likewise.
2251 * elf32-ppc.c: Likewise.
2252 * elf32-rl78.c: Likewise.
2253 * elf32-s390.c: Likewise.
2254 * elf32-score.c: Likewise.
2255 * elf32-score7.c: Likewise.
2256 * elf32-sh.c: Likewise.
2257 * elf32-tic6x.c: Likewise.
2258 * elf32-tilepro.c: Likewise.
2259 * elf32-v850.c: Likewise.
2260 * elf32-vax.c: Likewise.
2261 * elf32-xstormy16.c: Likewise.
2262 * elf32-xtensa.c: Likewise.
2263 * elf64-alpha.c: Likewise.
2264 * elf64-hppa.c: Likewise.
2265 * elf64-ia64-vms.c: Likewise.
2266 * elf64-mmix.c: Likewise.
2267 * elf64-ppc.c: Likewise.
2268 * elf64-s390.c: Likewise.
2269 * elf64-sh64.c: Likewise.
2270 * elf64-x86-64.c: Likewise.
2271 * elflink.c: Likewise.
2272 * elfnn-aarch64.c: Likewise.
2273 * elfnn-ia64.c: Likewise.
2274 * elfnn-riscv.c: Likewise.
2275 * elfxx-mips.c: Likewise.
2276 * elfxx-sparc.c: Likewise.
2277 * elfxx-tilegx.c: Likewise.
2278 * linker.c: Likewise.
2280 2017-05-16 Alan Modra <amodra@gmail.com>
2282 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
2283 * elflink.c (elf_link_add_object_symbols): Update to use
2285 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
2287 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
2289 2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
2291 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
2293 2017-05-12 H.J. Lu <hongjiu.lu@intel.com>
2295 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
2296 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
2298 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
2300 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
2302 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
2304 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
2305 to plt_second/plt_second_eh_frame.
2306 (elf_x86_64_link_hash_newfunc): Updated.
2307 (elf_x86_64_allocate_dynrelocs): Likewise.
2308 (elf_x86_64_size_dynamic_sections): Likewise.
2309 (elf_x86_64_relocate_section): Likewise.
2310 (elf_x86_64_finish_dynamic_symbol): Likewise.
2311 (elf_x86_64_finish_dynamic_sections): Likewise.
2312 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
2313 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
2315 (elf_backend_setup_gnu_properties): Updated. Create the
2316 .plt.sec section instead of the .plt.sec section.
2318 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
2320 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
2321 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
2322 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
2324 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
2326 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
2327 (bfd_elf64_set_reloc): Define.
2328 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
2330 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
2332 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
2333 (struct bfd_target): New field _bfd_set_reloc.
2334 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
2335 * reloc.c (_bfd_generic_set_reloc): New function.
2336 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
2337 * nlm-target.h (nlm_set_reloc): Likewise.
2338 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
2339 * aout-tic30.c (MY_set_reloc): Likewise.
2340 * aout-target.h (MY_set_reloc): Likewise.
2341 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
2342 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
2343 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
2344 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
2345 * aout-adobe.c (aout_32_set_reloc): Likewise.
2346 * bout.c (b_out_set_reloc): Likewise.
2347 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
2348 * i386os9k.c (aout_32_set_reloc): Likewise.
2349 * ieee.c (ieee_set_reloc): Likewise.
2350 * oasys.c (oasys_set_reloc): Likewise.
2351 * som.c (som_set_reloc): Likewise.
2352 * versados.c (versados_set_reloc): Likewise.
2353 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
2354 _bfd_generic_set_reloc.
2355 (rs6000_xcoff64_aix_vec): LIkewise.
2356 * libbfd.c (_bfd_norelocs_set_reloc): New function.
2357 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
2358 * i386msdos.c (msdos_set_reloc): Define to
2359 _bfd_norelocs_set_reloc.
2360 * elfcode.h (elf_set_reloc): Define.
2361 * bfd-in2.h: Regenerated.
2363 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
2366 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
2367 for IFUNC function address.
2369 2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
2371 * elf32-arc.c (FEATURE_LIST_NAME): Define.
2372 (CONFLICT_LIST): Likewise.
2373 (opcode/arc-attrs.h): Include.
2374 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
2375 (arc_extract_features): New file.
2376 (arc_stralloc): Likewise.
2377 (arc_elf_merge_attributes): Likewise.
2378 (arc_elf_merge_private_bfd_data): Use object attributes.
2379 (bfd_arc_get_mach_from_attributes): New function.
2380 (arc_elf_object_p): Use object attributes.
2381 (arc_elf_final_write_processing): Likewise.
2382 (elf32_arc_obj_attrs_arg_type): New function.
2383 (elf32_arc_obj_attrs_handle_unknown): Likewise.
2384 (elf32_arc_section_from_shdr): Likewise.
2385 (elf_backend_obj_attrs_vendor): Define.
2386 (elf_backend_obj_attrs_section): Likewise.
2387 (elf_backend_obj_attrs_arg_type): Likewise.
2388 (elf_backend_obj_attrs_section_type): Likewise.
2389 (elf_backend_obj_attrs_handle_unknown): Likewise.
2390 (elf_backend_section_from_shdr): Likewise.
2392 2017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
2395 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
2396 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
2397 and the destination is a Thumb symbol.
2399 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2401 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
2402 initializer to silence GCC 4.2.
2403 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
2405 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2407 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
2408 (LAZY_PLT_ENTRY_SIZE): This.
2409 (NON_LAZY_PLT_ENTRY_SIZE): New.
2410 (elf_x86_64_plt0_entry): Renamed to ...
2411 (elf_x86_64_lazy_plt0_entry): This.
2412 (elf_x86_64_plt_entry): Renamed to ...
2413 (elf_x86_64_lazy_plt_entry): This.
2414 (elf_x86_64_bnd_plt0_entry): Renamed to ...
2415 (elf_x86_64_lazy_bnd_plt0_entry): This.
2416 (elf_x86_64_legacy_plt_entry): Removed.
2417 (elf_x86_64_bnd_plt_entry): Renamed to ...
2418 (elf_x86_64_lazy_bnd_plt_entry): This.
2419 (elf_x86_64_legacy_plt2_entry): Renamed to ...
2420 (elf_x86_64_non_lazy_plt_entry): This.
2421 (elf_x86_64_bnd_plt2_entry): Renamed to ...
2422 (elf_x86_64_non_lazy_bnd_plt_entry): This.
2423 (elf_x86_64_eh_frame_plt): Renamed to ...
2424 (elf_x86_64_eh_frame_lazy_plt): This.
2425 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
2426 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
2427 (elf_x86_64_eh_frame_plt_got): Renamed to ...
2428 (elf_x86_64_eh_frame_non_lazy_plt): This.
2429 (elf_x86_64_lazy_plt_layout): New.
2430 (elf_x86_64_non_lazy_plt_layout): Likewise.
2431 (elf_x86_64_plt_layout): Likewise.
2432 (elf_x86_64_backend_data): Remove PLT layout information. Add
2433 os for target system.
2434 (GET_PLT_ENTRY_SIZE): Removed.
2435 (elf_x86_64_lazy_plt): New.
2436 (elf_x86_64_non_lazy_plt): Likewise.
2437 (elf_x86_64_lazy_bnd_plt): Likewise.
2438 (elf_x86_64_non_lazy_bnd_plt): Likewise.
2439 (elf_x86-64_arch_bed): Updated.
2440 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
2441 (elf_x86_64_create_dynamic_sections): Removed.
2442 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
2443 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
2444 (elf_x86-64_adjust_dynamic_symbol): Updated.
2445 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
2446 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
2447 size for PLT0 if there is no PLT0. Get plt_entry_size from
2448 non_lazy_plt for non-lazy PLT entries.
2449 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
2450 from non_lazy_plt for non-lazy PLT entries.
2451 (elf_x86-64_relocate_section): Updated. Properly get PLT index
2452 if there is no PLT0.
2453 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
2454 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
2455 entries with non-lazy PLT layout. Don't fill the second and third
2456 slots in the PLT entry if there is no PLT0.
2457 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
2458 if there is no PLT0. Set sh_entsize on the .plt.got section.
2459 (compare_relocs): New.
2460 (elf_x86_64_plt_type): Likewise.
2461 (elf_x86_64_plt): Likewise.
2462 (elf_x86_64_nacl_plt): New. Forward declaration.
2463 (elf_x86_64_get_plt_sym_val): Removed.
2464 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
2465 against all dynamic relocations.
2466 (elf_x86_64_link_setup_gnu_properties): New function.
2467 (elf_backend_create_dynamic_sections): Updated.
2468 (elf_backend_setup_gnu_properties): New.
2469 (elf_x86_64_nacl_plt): New.
2470 (elf_x86_64_nacl_arch_bed): Updated.
2472 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2474 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
2475 (LAZY_PLT_ENTRY_SIZE): This.
2476 (NON_LAZY_PLT_ENTRY_SIZE): New.
2477 (elf_i386_plt0_entry): Renamed to ...
2478 (elf_i386_lazy_plt0_entry): This.
2479 (elf_i386_plt_entry): Renamed to ...
2480 (elf_i386_lazy_plt_entry): This.
2481 (elf_i386_pic_plt0_entry): Renamed to ...
2482 (elf_i386_pic_lazy_plt0_entry): This.
2483 (elf_i386_pic_plt_entry): Renamed to ...
2484 (elf_i386_pic_lazy_plt_entry): This.
2485 (elf_i386_got_plt_entry): Renamed to ...
2486 (elf_i386_non_lazy_plt_entry): This.
2487 (elf_i386_pic_got_plt_entry): Renamed to ...
2488 (elf_i386_pic_non_lazy_plt_entry): This.
2489 (elf_i386_eh_frame_plt): Renamed to ...
2490 (elf_i386_eh_frame_lazy_plt): This.
2491 (elf_i386_eh_frame_plt_got): Renamed to ...
2492 (elf_i386_eh_frame_non_lazy_plt): This.
2493 (elf_i386_plt_layout): Renamed to ...
2494 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
2495 eh_frame_plt_got_size.
2496 (elf_i386_non_lazy_plt_layout): New.
2497 (elf_i386_plt_layout): Likewise.
2498 (elf_i386_non_lazy_plt): Likewise.
2499 (GET_PLT_ENTRY_SIZE): Removed.
2500 (elf_i386_plt): Renamed to ...
2501 (elf_i386_lazy_plt): This.
2502 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
2503 (elf_i386_arch_bed): Updated.
2504 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
2505 (elf_i386_create_dynamic_sections): Removed.
2506 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
2507 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
2508 (elf_i386_adjust_dynamic_symbol): Updated.
2509 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
2510 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
2511 size for PLT0 if there is no PLT0.
2512 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
2513 output section is discarded only if GOT isn't empty.
2514 (elf_i386_relocate_section): Updated. Properly get PLT index
2515 if there is no PLT0.
2516 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
2517 second and third slots in the PLT entry if there is no PLT0.
2518 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
2519 if there is no PLT0. Set sh_entsize on the .plt.got section.
2520 (elf_i386_nacl_plt): Forward declaration.
2521 (elf_i386_get_plt_sym_val): Removed.
2522 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
2523 against all dynamic relocations.
2524 (elf_i386_link_setup_gnu_properties): New function.
2525 (elf_backend_create_dynamic_sections): Updated.
2526 (elf_backend_setup_gnu_properties): New.
2527 (elf_i386_nacl_plt): Updated.
2528 (elf_i386_nacl_arch_bed): Likewise.
2529 (elf_i386_vxworks_arch_bed): Likewise.
2531 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
2533 * elflink.c (elf_output_implib): Remove executable flag from import
2535 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
2536 library is a relocatable object file.
2538 2017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
2541 * elf32-avr.c (avr_should_move_sym): New function.
2542 (avr_should_reduce_sym_size): Likewise.
2543 (avr_should_increase_sym_size): Likewise.
2544 (elf32_avr_relax_delete_bytes): Adjust symbol values
2545 and sizes by calling new functions.
2547 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
2549 * config.bfd (riscv32-*): Enable rv64.
2551 2017-05-02 Alan Modra <amodra@gmail.com>
2554 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
2555 rather than h->root.type == bfd_link_hash_new.
2556 (bfd_elf_record_link_assignment): Similarly, call
2557 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
2559 2017-04-29 Alan Modra <amodra@gmail.com>
2562 * reloc.c (reloc_offset_in_range): New function.
2563 (bfd_perform_relocation, bfd_install_relocation): Use it.
2564 (_bfd_final_link_relocate): Likewise.
2566 2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
2568 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
2569 before using .plt.got.
2570 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
2572 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2574 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
2575 instead of "+=" to update 0.
2577 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2579 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
2580 .plt.got section here.
2581 (elf_i386_check_relocs): Don't create the .plt.got section.
2582 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
2583 the .plt.got and .plt.bnd sections here.
2584 (elf_x86_64_check_relocs): Don't create the .plt.got nor
2587 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2589 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
2591 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
2592 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
2593 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
2594 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
2597 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2599 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
2601 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
2602 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
2603 the first relocatable ELF input with GNU properties.
2605 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2607 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
2608 VxWorks for non-PIC.
2610 2017-04-27 Alan Modra <amodra@gmail.com>
2612 * elf-bfd.h (struct elf_backend_data): Make asection param of
2613 elf_backend_eh_frame_address_size const.
2614 (_bfd_elf_eh_frame_address_size): Likewise.
2615 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
2616 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
2617 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
2618 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
2619 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
2620 (next_cie_fde_offset): Constify params.
2621 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
2623 2017-04-27 Alan Modra <amodra@gmail.com>
2625 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
2626 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
2627 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
2629 (offset_adjust): New function.
2630 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
2631 (adjust_eh_frame_local_symbols): Likewise.
2632 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
2633 after changing anything. Return true if anything changed.
2634 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
2635 _bfd_elf_adjust_eh_frame_global_symbol for globals.
2637 2017-04-27 Alan Modra <amodra@gmail.com>
2639 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
2642 2017-04-27 Alan Modra <amodra@gmail.com>
2644 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
2645 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
2646 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
2647 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
2648 for undef and undefweak dyn_relocs.
2649 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
2650 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
2651 (allocate_got, allocate_dynrelocs): Likewise.
2652 (ppc64_elf_relocate_section): Likewise.
2654 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
2656 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
2657 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
2658 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
2659 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
2661 2017-04-26 Nick Clifton <nickc@redhat.com>
2664 * reloc.c (bfd_perform_relocation): Check for a negative address
2667 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
2670 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
2672 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
2673 (elf_backend_always_renumber_dynsyms): Define.
2674 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
2675 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
2676 * elflink.c (bfd_elf_size_dynamic_sections): Also call
2677 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
2679 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
2681 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
2683 * elflink.c (bfd_elf_size_dynamic_sections): Only call
2684 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
2685 sections have been created.
2687 2017-04-26 Nick Clifton <nickc@redhat.com>
2690 * compress.c (bfd_init_section_compress_status): Check the return
2691 value from bfd_malloc.
2693 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
2695 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
2696 no_finish_dynamic_symbol.
2697 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
2699 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
2700 weak symbol, don't make it dynamic.
2701 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
2702 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
2703 relocation for GOT reference.
2704 (elf_x86_64_finish_dynamic_symbol): Abort if
2705 no_finish_dynamic_symbol isn't 0.
2707 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
2710 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
2711 undefined weak symbol, don't make it dynamic.
2712 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
2713 set no_finish_dynamic_symbol and generate R_386_RELATIVE
2714 relocation for R_386_GOT32.
2716 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
2719 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
2721 2017-04-23 Alan Modra <amodra@gmail.com>
2724 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
2725 * elf.c (lcomm_sym): New.
2726 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
2727 * bfd-in2.h: Regenerate.
2729 2017-04-23 Alan Modra <amodra@gmail.com>
2732 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
2733 parameters and comment.
2734 (_bfd_elf_get_reloc_section): Delete.
2735 (_bfd_elf_plt_get_reloc_section): Declare.
2736 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
2737 New functions. Don't blindly skip over assumed .rel/.rela prefix.
2739 (_bfd_elf_get_reloc_section): ..here. Delete.
2740 (assign_section_numbers): Call elf_get_reloc_section.
2741 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
2742 * elfxx-target.h (elf_backend_get_reloc_section): Update.
2744 2017-04-23 Alan Modra <amodra@gmail.com>
2747 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
2750 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
2753 * elf32-i386.c (elf_i386_link_hash_entry): Add
2754 no_finish_dynamic_symbol.
2755 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
2756 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
2757 symbol, don't make it dynamic in PIE.
2758 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
2759 set no_finish_dynamic_symbol and generate R_386_RELATIVE
2760 relocation for R_386_GOT32
2761 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
2764 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
2768 * elflink.c (elf_link_add_object_symbols): Require
2769 --no-dynamic-linker with -E/--dynamic-list when creating
2772 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
2774 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
2777 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
2779 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
2780 dynamic symbol sorting.
2782 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
2785 * elflink.c (elf_link_add_object_symbols): Preserve
2786 dynamic_ref_after_ir_def when restoring the symbol table for
2787 unneeded dynamic object.
2789 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
2792 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
2793 on on undefined IFUNC symbol in the second PLT.
2795 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
2797 * peXXigen.c (pe_print_reloc): Correct chunk_end.
2799 2017-04-19 Alan Modra <amodra@gmail.com>
2801 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
2802 or make dynamic for info->dynamic_undefined_weak 0 and 1.
2803 * elf32-ppc.c:Formatting.
2804 (ensure_undefweak_dynamic): Don't make dynamic when
2805 info->dynamic_undefined_weak is zero.
2806 (allocate_dynrelocs): Discard undefweak dyn_relocs for
2807 info->dynamic_undefined_weak. Discard undef dyn_relocs when
2808 not default visibility. Discard undef and undefweak
2810 (ppc_elf_relocate_section): Adjust to suit.
2811 * elf64-ppc.c: Formatting.
2812 (ensure_undefweak_dynamic): Don't make dynamic when
2813 info->dynamic_undefined_weak is zero.
2814 (allocate_dynrelocs): Discard undefweak dyn_relocs for
2815 info->dynamic_undefined_weak. Discard them earlier.
2817 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
2820 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
2821 before generating the version definition section.
2823 2017-04-17 Alan Modra <amodra@gmail.com>
2825 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
2826 state when a regular object file defines a symbol with
2827 incompatible type to that defined by an earlier shared lib.
2829 2017-04-13 Alan Modra <amodra@gmail.com>
2831 * coffcode.h: Wrap some overly long _bfd_error_handler args.
2833 * elf32-arm.c: Likewise.
2834 * elf32-i386.c: Likewise.
2835 * elf32-mep.c: Likewise.
2836 * elf64-ia64-vms.c: Likewise.
2837 * elf64-x86-64.c: Likewise.
2838 * elflink.c: Likewise.
2839 * elfnn-ia64.c: Likewise.
2840 * elfxx-mips.c: Likewise.
2842 2017-04-13 Alan Modra <amodra@gmail.com>
2844 * aoutx.h: Use %B and %A in error messages throughout file.
2845 * aout-cris.c: Likewise.
2846 * archive.c: Likewise.
2847 * binary.c: Likewise.
2848 * coff-rs6000.c: Likewise.
2849 * coff-tic4x.c: Likewise.
2850 * coffcode.h: Likewise.
2851 * coffgen.c: Likewise.
2852 * cofflink.c: Likewise.
2853 * coffswap.h: Likewise.
2854 * cpu-arm.c: Likewise.
2855 * elf-eh-frame.c: Likewise.
2856 * elf-m10300.c: Likewise.
2858 * elf32-arc.c: Likewise.
2859 * elf32-arm.c: Likewise.
2860 * elf32-bfin.c: Likewise.
2861 * elf32-frv.c: Likewise.
2862 * elf32-iq2000.c: Likewise.
2863 * elf32-m32c.c: Likewise.
2864 * elf32-microblaze.c: Likewise.
2865 * elf32-nds32.c: Likewise.
2866 * elf32-rl78.c: Likewise.
2867 * elf32-rx.c: Likewise.
2868 * elf32-score.c: Likewise.
2869 * elf32-score7.c: Likewise.
2870 * elf32-sh64.c: Likewise.
2871 * elf32-v850.c: Likewise.
2872 * elf32-vax.c: Likewise.
2873 * elf32-visium.c: Likewise.
2874 * elf64-ia64-vms.c: Likewise.
2875 * elf64-mmix.c: Likewise.
2876 * elf64-sh64.c: Likewise.
2877 * elfcode.h: Likewise.
2878 * elfnn-aarch64.c: Likewise.
2879 * elfnn-ia64.c: Likewise.
2880 * elfxx-mips.c: Likewise.
2881 * hpux-core.c: Likewise.
2884 * linker.c: Likewise.
2885 * merge.c: Likewise.
2887 * oasys.c: Likewise.
2888 * pdp11.c: Likewise.
2889 * peXXigen.c: Likewise.
2890 * rs6000-core.c: Likewise.
2891 * vms-alpha.c: Likewise.
2892 * xcofflink.c: Likewise.
2894 2017-04-13 Alan Modra <amodra@gmail.com>
2896 * bfd.c (PRINT_TYPE): Define.
2897 (_doprnt): New function.
2898 (error_handler_internal): Use _doprnt.
2899 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
2900 calls in their natural order, throughout file.
2901 * coff-mcore.c: Likewise.
2902 * coff-ppc.c: Likewise.
2903 * coff-tic80.c: Likewise.
2904 * cofflink.c: Likewise.
2905 * elf-s390-common.c: Likewise.
2907 * elf32-arm.c: Likewise.
2908 * elf32-i386.c: Likewise.
2909 * elf32-m32r.c: Likewise.
2910 * elf32-msp430.c: Likewise.
2911 * elf32-spu.c: Likewise.
2912 * elf64-ia64-vms.c: Likewise.
2913 * elf64-sparc.c: Likewise.
2914 * elf64-x86-64.c: Likewise.
2915 * elflink.c: Likewise.
2916 * elfnn-aarch64.c: Likewise.
2917 * elfnn-ia64.c: Likewise.
2918 * elfxx-mips.c: Likewise.
2920 2017-04-13 Alan Modra <amodra@gmail.com>
2922 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
2923 branch veneers" error. Fix double space and format message.
2924 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
2925 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
2927 2017-04-13 Alan Modra <amodra@gmail.com>
2929 * bfd-in2.h: Regenerate.
2931 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
2933 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
2934 extra `\n' in warning/error messages.
2935 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
2936 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
2938 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
2940 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
2941 processor-specific properties with generic ELF target vector.
2943 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
2945 * elf32-sparc.c (elf_backend_fixup_symbol): New.
2946 * elf64-sparc.c (elf_backend_fixup_symbol): New.
2947 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
2948 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
2950 (link_hash_newfunc): Initialize has_got_reloc and
2952 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
2954 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
2956 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
2958 (_bfd_sparc_elf_fixup_symbol): New function.
2959 (allocate_dynrelocs): Don't allocate space for dynamic
2960 relocations and discard relocations against resolved undefined
2961 weak symbols in executable. Don't make resolved undefined weak
2962 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
2963 relocation against undefined weak symbols in PIE.
2964 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
2965 relocations against resolved undefined weak symbols in PIE
2966 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
2967 without ynamic PLT/GOT relocations for resolved undefined weak
2969 Don't generate dynamic relocation against resolved undefined
2970 weak symbol in executable.
2971 (pie_finish_undefweak_symbol): New function.
2972 (_bfd_sparc_elf_finish_dynamic_sections): Call
2973 pie_finish_undefweak_symbol on all symbols in PIE.
2974 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
2975 (_bfd_sparc_elf_fixup_symbol): New function.
2977 2017-04-10 Nick Clifton <nickc@redhat.com>
2979 * config.bfd: Remove ns32k from obsolete list.
2981 2017-04-10 Alan Modra <amodra@gmail.com>
2984 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
2985 (special_sections_i): Likewise for .init_array.
2986 (special_sections_p): Likewise for .preinit_array.
2988 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
2992 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
2993 ELF_COMMON_DEF_P for common symbols.
2994 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
2995 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
2996 * elflink.c (_bfd_elf_merge_symbol): Revert commits
2997 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
2998 07492f668d2173da7a2bda3707ff0985e0f460b6.
3000 2017-04-07 Pedro Alves <palves@redhat.com>
3002 * opncls.c (bfd_get_debug_link_info): Rename to...
3003 (bfd_get_debug_link_info_1): ... this. Change type of second
3004 parameter to void pointer. Adjust.
3005 (bfd_get_debug_link_info): Reimplement on top of
3006 bfd_get_debug_link_info_1.
3007 (separate_debug_file_exists, separate_alt_debug_file_exists):
3008 Change type of second parameter to void pointer. Adjust.
3009 (get_func_type, check_func_type): Change type of second parameter
3011 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
3012 the callback functions instead of passing the address of a local.
3013 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
3014 find_separate_debug_file.
3015 (get_alt_debug_link_info_shim): Change type of second parameter to
3016 void pointer. Adjust.
3017 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
3018 find_separate_debug_file.
3019 (get_build_id_name, bfd_boolean check_build_id_file): Change type
3020 of second parameter to void pointer. Adjust.
3021 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
3022 pointer local to find_separate_debug_file.
3024 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
3026 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
3027 external symbols with a definition.
3028 (_bfd_coff_gc_mark_extra_sections): Fix typo.
3030 2017-04-07 Alan Modra <amodra@gmail.com>
3032 * po/SRC-POTFILES.in: Regenerate.
3034 2017-04-05 Alan Modra <amodra@gmail.com>
3036 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
3039 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
3041 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
3042 numbers for DataDirectory entry indicies passed to
3045 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
3047 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
3048 each GNU_MBIND section and align GNU_MBIND section to page size.
3049 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
3050 segment for each GNU_MBIND section.
3051 (_bfd_elf_init_private_section_data): Copy sh_info from input
3052 for GNU_MBIND section.
3054 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
3056 * elfnn-riscv.c (GP_NAME): Delete.
3057 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
3058 (_bfd_riscv_relax_lui): Likewise.
3060 2017-04-04 Nick Clifton <nickc@redhat.com>
3063 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
3065 (bfd_elf_final_link): Only initialize the extended symbol index
3066 section if there are extended symbol tables to list.
3068 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
3070 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
3071 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
3072 * configure.ac (elf): Add elf-properties.lo.
3073 * Makefile.in: Regenerated.
3074 * configure: Likewise.
3075 * elf-bfd.h (elf_property_kind): New.
3076 (elf_property): Likewise.
3077 (elf_property_list): Likewise.
3078 (elf_properties): Likewise.
3079 (_bfd_elf_parse_gnu_properties): Likewise.
3080 (_bfd_elf_get_property): Likewise.
3081 (_bfd_elf_link_setup_gnu_properties): Likewise.
3082 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
3083 and setup_gnu_properties.
3084 (elf_obj_tdata): Add properties.
3085 * elf-properties.c: New file.
3086 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
3087 (elf_i386_merge_gnu_properties): Likewise.
3088 (elf_backend_parse_gnu_properties): Likewise.
3089 (elf_backend_merge_gnu_properties): Likewise.
3090 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3091 (elf_x86_64_merge_gnu_properties): Likewise.
3092 (elf_backend_parse_gnu_properties): Likewise.
3093 (elf_backend_merge_gnu_properties): Likewise.
3094 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
3095 (elf_backend_parse_gnu_properties): Likewise.
3096 (elf_backend_setup_gnu_properties): Likewise.
3097 (elfNN_bed): Add elf_backend_parse_gnu_properties,
3098 elf_backend_merge_gnu_properties and
3099 elf_backend_setup_gnu_properties.
3101 2017-03-30 Pip Cet <pipcet@gmail.com>
3103 * elf32-wasm32.c: Add relocation code, two relocs.
3104 * reloc.c: Add wasm32 relocations.
3105 * libbfd.h: Regenerate.
3106 * bfd-in2.h: Regenerate.
3107 * bfd/po/bfd.pot: Regenerate.
3109 2017-03-29 Nick Clifton <nickc@redhat.com>
3112 * coff-bfd.h (struct coff_section_data): Add new fields:
3113 saved_bias and bias.
3114 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
3115 computed for PE binaries.
3116 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
3119 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
3122 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
3123 to handle a local symbol with a hash-symbol-entry; without PLT.
3124 Add BFD_ASSERT for an incidental case with GOT entry present.
3125 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
3126 isn't forced-or-set local.
3128 2017-03-27 Pip Cet <pipcet@gmail.com>
3130 * wasm-module.c: New file to support WebAssembly modules.
3131 * wasm-module.h: New file to support WebAssembly modules.
3132 * doc/webassembly.texi: Start documenting wasm-module.c.
3133 * config.bfd: Add wasm_vec.
3134 * targets.c: Likewise.
3135 * configure.ac: Likewise.
3136 * Makefile.am: Add entries for wasm-module.c.
3137 * Makefile.in: Regenerate.
3138 * configure: Regenerate.
3139 * po/SRC-POTFILES.in: Regenerate.
3141 2017-03-27 Pip Cet <pipcet@gmail.com>
3143 * cpu-wasm32.c: New file to support wasm32 architecture.
3144 * elf32-wasm32.c: New file to support wasm32 architecture.
3145 * Makefile.am: Add wasm32 architecture.
3146 * archures.c: Likewise.
3147 * config.bfd: Likewise.
3148 * configure.ac: Likewise.
3149 * targets.c: Likewise.
3150 * Makefile.in: Regenerate.
3151 * bfd-in2.h: Regenerate.
3152 * configure: Regenerate.
3153 * po/SRC-POTFILES.in: Regenerate.
3155 2017-03-20 Alan Modra <amodra@gmail.com>
3158 * elf64-ppc.c (compare_symbols): Stabilize sort.
3160 2017-03-18 Alan Modra <amodra@gmail.com>
3162 * elf64-ppc.c (struct ppc_link_hash_table): Add
3163 local_ifunc_resolver and maybe_local_ifunc_resolver.
3164 (ppc_build_one_stub): Set flags on emitting dynamic
3165 relocation to ifunc.
3166 (ppc64_elf_relocate_section): Likewise.
3167 (ppc64_elf_finish_dynamic_symbol): Likewise.
3168 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
3169 local dynamic relocs to ifuncs.
3170 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
3171 local_ifunc_resolver and maybe_local_ifunc_resolver.
3172 (ppc_elf_relocate_section): Set flag on emitting dynamic
3173 relocation to ifuncs.
3174 (ppc_elf_finish_dynamic_symbol): Likewise.
3175 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
3176 dynamic relocs to ifuncs.
3178 2017-03-13 Nick Clifton <nickc@redhat.com>
3181 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
3182 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
3183 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
3184 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
3185 * bfd-in2.h: Regenerate.
3186 * libbfd.h: Regenerate.
3187 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
3189 (IS_AARCH64_TLSDESC_RELOC): Likewise.
3190 (elfNN_aarch64_howto_table): Likewise.
3191 (aarch64_tls_transition_without_check): Likewise.
3192 (aarch64_reloc_got_type): Likewise.
3193 (elfNN_aarch64_final_link_relocate): Likewise.
3194 (elfNN_aarch64_tls_relax): Likewise.
3195 (elfNN_aarch64_relocate_section): Likewise.
3196 (elfNN_aarch64_gc_sweep_hook): Likewise.
3197 (elfNN_aarch64_check_relocs): Likewise.
3198 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
3199 (_bfd_aarch64_elf_resolve_relocation): Likewise.
3201 2017-03-11 Alan Modra <amodra@gmail.com>
3203 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
3204 parameter is in fact used. Whitespace fixes.
3205 * elf64-ppc.c: Likewise.
3207 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
3209 * rs6000-core.c (CORE_NEW): Simplify macro when
3210 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
3212 2017-03-07 Alan Modra <amodra@gmail.com>
3216 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
3219 2017-03-05 Alan Modra <amodra@gmail.com>
3221 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
3222 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
3223 (next_cie_fde_offset): New function.
3224 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
3225 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
3226 four bytes. Align CIEs to four or eight bytes depending on
3227 per_encoding_aligned8. Align FDEs according to their encoding.
3228 Pad last FDE to output section alignment.
3229 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
3231 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
3232 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
3233 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
3235 2017-03-02 Martin Bickel <binutils@ineranves.de>
3238 * elf.c (rewrite_elf_program_header): Do not issue a warning for
3239 empty segments which have a zero filesz, but a non-zero memsz.
3241 2017-03-02 Alan Modra <amodra@gmail.com>
3243 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
3245 2017-02-28 Alan Modra <amodra@gmail.com>
3247 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
3248 (ppc64_elf_relocate_section): Likewise.
3250 2017-02-28 Alan Modra <amodra@gmail.com>
3253 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
3254 rather than elf32_nios2_hash_table or elf_hash_table.
3255 (create_got_section): Likewise.
3256 (nios2_elf32_finish_dynamic_symbol): Likewise.
3257 (nios2_elf32_adjust_dynamic_symbol): Likewise.
3258 (nios2_elf32_size_dynamic_sections): Likewise.
3259 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
3260 vars. Use htab equivalents directly instead. Don't create
3261 all dynamic sections on needing just the GOT. Use a goto
3262 rather than a fall-through with reloc test. Ensure
3263 htab->dynobj is set when making dynamic sreloc section.
3264 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
3265 equivalent directly instead. Don't segfault on looking for
3266 .dynamic when dynamic sections have not been created. Don't
3267 segfault on .got.plt being discarded.
3268 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
3269 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
3270 fixme and another not so relevant comment.
3271 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
3272 already set, set hash table dynobj on creating .sbss.
3274 2017-02-28 Alan Modra <amodra@gmail.com>
3276 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
3277 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
3278 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
3279 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
3280 (ppc64_elf_relocate_section): Likewise.
3281 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
3282 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
3283 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
3284 * libbfd.h: Regenerate.
3285 * bfd-in2.h: Regenerate.
3287 2017-02-28 Alan Modra <amodra@gmail.com>
3289 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
3290 dynamic .data.rel.ro read-only.
3291 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
3292 rather than section flags when deciding where copy reloc goes.
3293 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
3294 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
3295 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
3296 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
3297 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
3298 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
3299 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
3300 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
3301 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3302 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
3303 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
3304 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
3305 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3306 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
3307 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
3308 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
3309 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
3310 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
3311 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
3313 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
3315 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
3316 `jalr $0, $25' instruction encoding.
3318 2017-02-27 Nick Clifton <nickc@redhat.com>
3321 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
3322 generating a seg-fault when encountering a symbol that has been
3323 deleted by garbage collection.
3325 2017-02-25 Alan Modra <amodra@gmail.com>
3327 * elf32-arc.c (struct dynamic_sections): Delete.
3328 (enum dyn_section_types): Delete.
3329 (dyn_section_names): Delete.
3330 (arc_create_dynamic_sections): Delete.
3331 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
3332 segfault on discarded .rela.plt section.
3333 (elf_arc_size_dynamic_sections): Formatting. Don't call
3334 arc_create_dynamic_sections. Don't allocate memory for sections
3335 handled by the generic linker. Correct code finding relocs in
3336 read-only sections. Set SEC_EXCLUDE on zero size .got,
3337 .got.plt, and .dynbss sections. Do set .interp for pies.
3339 2017-02-24 Andrew Waterman <andrew@sifive.com>
3341 * elfnn-riscv.c (GP_NAME): New macro.
3342 (riscv_global_pointer_value): Use it.
3343 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
3344 output section, consider only that section's alignment.
3346 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
3348 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
3349 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
3350 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
3351 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
3353 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
3355 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
3356 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
3359 2017-02-23 Alan Modra <amodra@gmail.com>
3362 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
3364 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
3365 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
3368 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
3371 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
3372 processing ahead of the call to `elf_gc_sweep_symbol'.
3374 2017-02-22 Nick Clifton <nickc@redhat.com>
3377 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
3378 created section 4-byte alignment.
3380 2017-02-22 Alan Modra <amodra@gmail.com>
3382 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
3383 on .got or .plt output section being discarded by script.
3384 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
3387 2017-02-21 Alan Modra <amodra@gmail.com>
3389 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
3390 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
3392 2017-02-20 Alan Modra <amodra@gmail.com>
3395 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
3396 if DT_RELSZ/DT_RELASZ is zero.
3398 2017-02-17 Nick Clifton <nickc@redhat.com>
3400 * compress.c (bfd_get_full_section_contents): Remember to reduce
3401 compressed size by the sizeof the compression header when
3402 decompressing the contents.
3404 2017-02-17 Pedro Alves <palves@redhat.com>
3406 * srec.c (Chunk): Rename to ...
3407 (_bfd_srec_len): ... this.
3408 (S3Forced): Rename to ...
3409 (_bfd_srec_forceS3): ... this.
3410 * objcopy.c: Adjust all references.
3412 2017-02-17 Pedro Alves <palves@redhat.com>
3414 * archive.c (bsd_write_armap): Rename to ...
3415 (_bfd_bsd_write_armap): ... this.
3416 (coff_write_armap): Rename to ...
3417 (_bfd_coff_write_armap): ... this.
3418 * libbfd-in.h (bsd_write_armap): Rename to ...
3419 (_bfd_bsd_write_armap): ... this.
3420 (coff_write_armap): Rename to ...
3421 (_bfd_coff_write_armap): ... this.
3422 * aout-target.h, aout-tic30.c: Adjust all users.
3423 * libbfd.h: Regenerate.
3425 2017-02-17 Pedro Alves <palves@redhat.com>
3427 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
3428 (warn_deprecated): Rename to ...
3429 (_bfd_warn_deprecated): ... this.
3430 * libbfd.c (warn_deprecated): Rename to ...
3431 (_bfd_warn_deprecated): ... this.
3432 * bfd-in2.h: Regenerate.
3434 2017-02-17 Pedro Alves <palves@redhat.com>
3436 * bfdio.c (real_ftell): Rename to ...
3437 (_bfd_real_ftell): ... this.
3438 (real_fseek): Rename to ...
3439 (_bfd_real_fseek): ... this.
3440 (real_fopen): Rename to ...
3441 (_bfd_real_fopen): ... this.
3442 * libbfd-in.h (real_ftell): Rename to ...
3443 (_bfd_real_ftell): ... this.
3444 (real_fseek): Rename to ...
3445 (_bfd_real_fseek): ... this.
3446 (real_fopen): Rename to ...
3447 (_bfd_real_fopen): ... this.
3448 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
3449 * libbfd.h: Regenerate.
3451 2017-02-17 Pedro Alves <palves@redhat.com>
3453 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
3454 * libbfd.c (read_unsigned_leb128): Rename to ...
3455 (_bfd_read_unsigned_leb128): ... this.
3456 (read_signed_leb128): Rename to ...
3457 (_bfd_read_signed_leb128): ... this.
3458 (safe_read_leb128): Rename to ...
3459 (_bfd_safe_read_leb128): ... this.
3460 * libbfd-in.h (read_unsigned_leb128): Rename to ...
3461 (_bfd_read_unsigned_leb128): ... this.
3462 (read_signed_leb128): Rename to ...
3463 (_bfd_read_signed_leb128): ... this.
3464 (safe_read_leb128): Rename to ...
3465 (_bfd_safe_read_leb128): ... this.
3466 * libbfd.h: Renegerate.
3468 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
3470 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
3471 before trying to fine matching file and line information.
3473 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
3475 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
3476 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
3477 not match current bfd, then reload debug information. Record bfd
3478 we're loading debug info for in the stash. If we have debug
3479 informatin in the cache then perform section placement before
3482 2017-02-16 Alan Modra <amodra@gmail.com>
3485 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
3486 * elfxx-target.h (elf_backend_no_page_alias): Define.
3487 (elfNN_bed): Init new field.
3488 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
3489 ensure PT_LOAD segment starts on a new page.
3490 * elf32-hppa.c (elf_backend_no_page_alias): Define.
3492 2017-02-16 Alan Modra <amodra@gmail.com>
3495 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
3498 2017-02-16 Jiong Wang <jiong.wang@arm.com>
3500 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
3501 * bfd-in2.h: Regenerated.
3503 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
3506 * elf32-i386.c (elf_i386_relocate_section): Allow
3507 "lea foo@GOT, %reg" in PIC.
3509 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
3512 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
3513 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
3514 error against local IFUNC symbol without a base register for
3517 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
3519 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
3520 `%P: %H:' with `info->callbacks->einfo'.
3521 (ppc_elf_relocate_section): Likewise.
3522 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
3523 (ppc64_elf_edit_toc): Likewise.
3524 (ppc64_elf_relocate_section): Likewise.
3526 2017-02-14 Alan Modra <amodra@gmail.com>
3528 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
3529 --gc-keep-exported, and test versioned field of sym rather than
3530 looking for @ in name.
3532 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
3534 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
3537 2017-02-13 Nick Clifton <nickc@redhat.com>
3540 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
3543 2017-02-07 Andrew Waterman <andrew@sifive.com>
3545 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
3546 entry size if PLT header is written.
3548 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
3550 Fix sparc64 dynamic relocation processing to use the dynamic
3552 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
3553 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
3556 2017-02-03 Nick Clifton <nickc@redhat.com>
3559 * coffcode.h (coff_write_object_contents): Enlarge size of
3560 s_name_buf in order to avoid compile time warning about possible
3562 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
3563 32-bits of insn value before printing into buffer.
3565 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3567 * elfxx-mips.c (mips_elf_hash_sort_data): Add
3568 `max_local_dynindx'.
3569 (mips_elf_sort_hash_table): Handle it.
3570 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
3571 symbols bump up `max_local_dynindx' rather than
3572 `max_non_got_dynindx'.
3574 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3576 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
3577 `min_got_dynindx', `max_unref_got_dynindx' and
3578 `max_non_got_dynindx' members to the `bfd_size_type' data type.
3579 (mips_elf_sort_hash_table): Adjust accordingly.
3581 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3583 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
3584 to access the hash table.
3586 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3588 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
3589 non-NULL `htab' to the beginning.
3591 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3593 * elflink.c (elf_gc_sweep): Wrap overlong line.
3595 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
3597 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
3598 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
3599 * elfxx-mips.c (mips_elf_link_hash_table): Add
3600 `ignore_branch_isa' member.
3601 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
3602 in branch relocation calculation as an error if
3603 `ignore_branch_isa' has been set.
3604 (_bfd_mips_elf_insn32): Rename to...
3605 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
3606 parameter to `insn32' and add an `ignore_branch_isa' parameter.
3607 Handle the new parameter.
3609 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
3611 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
3612 local variable dynobj.
3615 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
3616 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
3617 executable from read-only sections into sdynrelro.
3618 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
3619 dynamic relocs in sdynrelro.
3620 (elf_backend_want_dynrelro): Define.
3622 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
3624 * config.bfd (*-*-rtemsaout*): Mark as removed.
3626 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
3628 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
3629 (arm-*-rtems*): Move to (arm*-*-eabi*).
3630 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
3631 (m68-*-rtems*): Move to (m68*-*-elf*).
3633 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
3635 * config.bfd (*-*-rtemscoff*): Mark as removed.
3637 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
3640 * elflink.c (bfd_elf_record_link_assignment): Revert last
3641 change and don't ever clear `forced_local'. Set `mark'
3643 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
3645 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
3646 (bfd_elf_size_dynamic_sections): ... here.
3647 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
3648 and set `mark' instead in `__tls_get_addr_opt' processing.
3649 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
3651 2017-01-24 Alan Modra <amodra@gmail.com>
3653 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
3654 where dynamic relocs are preferable. Allow ifunc too.
3655 (ensure_undefweak_dynamic): New function.
3656 (allocate_dynrelocs): Use it here. Move plt handling last and
3657 don't make symbols dynamic, simplifying loop. Only make undef
3658 weak symbols with GOT entries dynamic. Correct condition
3659 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
3660 comments. Remove goto.
3661 (ppc_elf_relocate_section): Correct test for using dynamic
3662 symbol on GOT relocs. Rearrange test for emitting GOT relocs
3663 to suit. Set up explicit tls_index entries and implicit GOT
3664 tls_index entries resolvable at link time for
3665 __tls_get_addr_opt. Simplify test to clear mem for prelink.
3666 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
3667 (ensure_undefweak_dynamic): New function.
3668 (allocate_dynrelocs): Use it here. Only make undef weak symbols
3669 with GOT entries dynamic. Remove unnecessary test of
3670 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
3671 (ppc64_elf_relocate_section): Correct test for using dynamic
3672 symbol on GOT relocs. Rearrange test for emitting GOT relocs
3673 to suit. Set up explicit tls_index entries and implicit GOT
3674 tls_index entries resolvable at link time for __tls_get_addr_opt.
3675 Simplify expression to clear mem for prelink.
3677 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
3679 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
3681 2017-01-20 Jiong Wang <jiong.wang@arm.com>
3683 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
3684 (elf_backend_hash_symbol): Define.
3686 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
3689 * elflink.c (bfd_elf_record_link_assignment): Clear any
3690 `forced_local' marking for DSO symbols that are not being
3693 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
3695 * elfnn-riscv.c (riscv_elf_object_p): New function.
3697 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
3700 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
3702 (elf_x86_64_check_relocs): Create .eh_frame section for the
3704 (elf_x86_64_size_dynamic_sections): Allocate and initialize
3705 .eh_frame section for the .plt.bnd section.
3706 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
3707 for the .plt.bnd section.
3709 2017-01-12 Nick Clifton <nickc@redhat.com>
3712 * opncls.c (find_separate_debug_file): Add include_dirs
3713 parameter. Only include the directory part of the bfd's filename
3714 in search paths if include_dirs is true. Add a couple of extra
3715 locations for looking for debug files.
3716 ( bfd_follow_gnu_debuglink): Update invocation of
3717 find_separate_debug_file.
3718 (bfd_follow_gnu_debugaltlink): Likewise.
3719 (get_build_id): New function: Finds the build-id of the given bfd.
3720 (get_build_id_name): New function: Computes the name of the
3721 separate debug info file for a bfd, based upon its build-id.
3722 (check_build_id_file): New function: Checks to see if a separate
3723 debug info file exists at the given location, and that its
3724 build-id matches that of the original bfd.
3725 (bfd_follow_build_id_debuglink): New function: Finds a separate
3726 debug info file for a given bfd by using the build-id method.
3727 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
3728 method of locating a separate debug info file before using the
3730 * bfd-in2.h: Regenerate.
3732 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
3735 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
3736 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
3737 elf_x86_64_eh_frame_plt_got.
3738 (elf_x86_64_size_dynamic_sections): Get unwind info from
3739 elf_x86_64_bnd_arch_bed for the BND PLT.
3741 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
3743 * config.bfd: Add entries for i686-redox and x86_64-redox.
3745 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
3747 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
3749 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
3750 .eh_frame section to 4 bytes for x32.
3751 (elf_x86_64_check_relocs): Likewise.
3753 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
3756 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
3757 (PLT_GOT_FDE_LENGTH): Likewise.
3758 (elf_i386_plt_layout): Add eh_frame_plt_got and
3759 eh_frame_plt_got_size.
3760 (elf_i386_plt): Updated.
3761 (elf_i386_link_hash_table): Add plt_got_eh_frame.
3762 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
3763 (elf_i386_size_dynamic_sections): Allocate and initialize
3764 .eh_frame section for .plt.got.
3765 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
3767 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
3768 eh_frame_plt_got_size.
3769 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
3770 (PLT_GOT_FDE_LENGTH): Likewise.
3771 (elf_x86_64_backend_data): Add eh_frame_plt_got and
3772 eh_frame_plt_got_size.
3773 (elf_x86_64_arch_bed): Updated.
3774 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
3775 eh_frame_plt_got_size.
3776 (elf_x86_64_nacl_arch_bed): Likewise.
3777 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
3778 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
3779 (elf_x86_64_size_dynamic_sections): Allocate and initialize
3780 .eh_frame section for .plt.got.
3781 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
3784 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
3786 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
3787 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
3789 2017-01-09 Nick Clifton <nickc@redhat.com>
3791 * dwarf2.c (lookup_address_in_function_table): Return early if
3792 there are no functions in the given comp unit, or if the high
3793 address of the last function in the comp unit is less than the
3796 2017-01-09 Nick Clifton <nickc@redhat.com>
3799 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
3800 message if there are too many symbols to load.
3802 2017-01-04 James Clarke <jrtc27@jrtc27.com>
3804 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
3805 if relocs are cached.
3807 2017-01-03 Rich Felker <bugdal@aerifal.cx>
3810 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
3811 for R_MICROBLAZE_GOTOFF_64.
3813 2017-01-03 Nick Clifton <nickc@redhat.com>
3815 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
3816 warning about using a possibly uninitialised variable.
3818 2017-01-02 Alan Modra <amodra@gmail.com>
3820 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
3821 (allocate_plt_static, allocate_dynrelocs): Use it.
3823 2017-01-02 Alan Modra <amodra@gmail.com>
3825 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
3826 .PARISC.unwind section.
3828 2017-01-02 Alan Modra <amodra@gmail.com>
3831 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
3832 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
3833 indirect to GOT pointer relative code edit.
3835 2017-01-02 Alan Modra <amodra@gmail.com>
3837 Update year range in copyright notice of all files.
3839 For older changes see ChangeLog-2016
3841 Copyright (C) 2017 Free Software Foundation, Inc.
3843 Copying and distribution of this file, with or without modification,
3844 are permitted in any medium without royalty provided the copyright
3845 notice and this notice are preserved.
3851 version-control: never