1 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
3 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Properly set
6 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
8 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Remove the sec
9 argument. Don't check relocation overflow. Avoid relocation
10 overflow if --no-relax is used. Set converted_reloc on symbol
11 if a GOTPCREL relocation is converted.
12 (elf_x86_64_relocate_section): Issue a fatal error and suggest
13 --no-relax if GOTPCREL relocation conversion leads to relocation
15 * elfxx-x86.h (elf_x86_link_hash_entry): Add converted_reloc.
17 2017-09-05 Alexander Fedotov <alexander.fedotov@nxp.com>
18 Edmar Wienskoski <edmar.wienskoski@nxp.com
20 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_VLE_ADDR20.
21 (ppc_elf_check_relocs): Handle it.
22 (ppc_elf_vle_split20): New function.
23 (ppc_elf_relocate_section): Handle R_PPC_VLE_ADDR20.
25 2017-09-03 H.J. Lu <hongjiu.lu@intel.com>
28 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Set tlsdesc_plt
29 for x86-64 if GOT_TLS_GDESC_P is true.
31 2017-09-03 Alan Modra <amodra@gmail.com>
34 * elfxx-x86.h (elf_x86_hash_table): Check is_elf_hash_table first.
36 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
38 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
39 tls_get_addr for x86-64 in one place.
41 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
43 * configure.ac (bfd_backends): Add elf64-x86-64.lo together
44 with elfxx-x86.lo for 64-bit BFD.
45 * configure: Regenerated.
47 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
49 * elf32-i386.c (elf_i386_convert_load): Renamed to ...
50 (_bfd_i386_elf_convert_load): This. Remove static.
51 (elf_i386_size_dynamic_sections): Removed.
52 (elf_backend_size_dynamic_sections): Likewise.
53 * elf64-x86-64.c (elf_x86_64_convert_load): Renamed to ...
54 (_bfd_x86_64_elf_convert_load): This. Remove static.
55 (elf_x86_64_size_dynamic_sections): Removed.
56 (elf_backend_size_dynamic_sections): Likewise.
57 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): Renamed to ...
58 (elf_x86_allocate_dynrelocs): This. Make it static.
59 (_bfd_x86_elf_allocate_local_dynrelocs): Renamed to ...
60 (elf_x86_allocate_local_dynreloc): This. Make it static.
61 (elf_i386_is_reloc_section): New function.
62 (elf_x86_64_is_reloc_section): Likewise.
63 (_bfd_x86_elf_link_hash_table_create): Initialize convert_load,
64 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
65 Rearrange got_entry_size initialization.
66 (_bfd_x86_elf_size_dynamic_sections): New function.
67 * elfxx-x86.h (elf_x86_link_hash_table): Add convert_load,
68 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
69 (_bfd_i386_elf_convert_load): New.
70 (_bfd_x86_64_elf_convert_load): Likewise.
71 (_bfd_x86_elf_size_dynamic_sections): Likewise.
72 (elf_backend_size_dynamic_sections): Likewise.
73 (_bfd_x86_elf_allocate_dynrelocs): Removed.
74 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
76 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
78 * elfxx-x86.h (elf_x86_link_hash_table): Rearrange fields and
81 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
83 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
84 sgotplt_jump_table_size with elf_x86_compute_jump_table_size.
86 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
88 * elf32-i386.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
89 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Moved to ...
90 * elfxx-x86.h (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
91 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Here.
92 * elf64-x86-64.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
93 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Removed.
95 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
97 * elf32-i386.c (elf_i386_allocate_dynrelocs): Removed.
98 (elf_i386_allocate_local_dynrelocs): Likewise.
99 (elf_i386_size_dynamic_sections): Replace
100 elf_i386_allocate_dynrelocs/elf_i386_allocate_local_dynrelocs
101 with _bfd_x86_elf_allocate_dynrelocs and
102 _bfd_x86_elf_allocate_local_dynrelocs.
103 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Removed.
104 (elf_x86_64_allocate_local_dynrelocs): Likewise.
105 (elf_x86_64_size_dynamic_sections): Replace
106 elf_x86_64_allocate_dynrelocs/elf_x86_64_allocate_local_dynrelocs
107 with _bfd_x86_elf_allocate_dynrelocs and
108 _bfd_x86_elf_allocate_local_dynrelocs.
109 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): New function.
110 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
111 * elfxx-x86.h (_bfd_x86_elf_allocate_dynrelocs): New prototype.
112 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
114 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
116 * elf32-i386.c (is_i386_elf): Removed.
117 (elf_i386_check_relocs): Replace is_i386_elf with is_x86_elf.
118 (elf_i386_size_dynamic_sections): Likewise.
119 (elf_i386_relocate_section): Likewise.
120 * elf64-x86-64.c (is_x86_64_elf): Removed.
121 (elf_x86_64_check_relocs): Replace is_x86_64_elf with
123 (elf_x86_64_size_dynamic_sections): Likewise.
124 (elf_x86_64_relocate_section): Likewise.
125 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
127 * elfxx-x86.h (elf_x86_link_hash_table): Add target_id.
130 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
132 * elf32-i386.c (elf_i386_compute_jump_table_size): Removed.
133 (elf_i386_allocate_dynrelocs): Replace
134 elf_i386_compute_jump_table_size with
135 elf_x86_compute_jump_table_size.
136 (elf_i386_size_dynamic_sections): Likewise.
137 * elf64-x86-64.c (elf_x86_64_compute_jump_table_size): Removed.
138 (elf_x86_64_allocate_dynrelocs): Replace
139 elf_x86_64_compute_jump_table_size with
140 elf_x86_compute_jump_table_size.
141 (elf_x86_64_size_dynamic_sections): Likewise.
142 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
144 * elfxx-x86.h (elf_x86_link_hash_table): Add got_entry_size.
145 (elf_x86_compute_jump_table_size): New.
147 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
149 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
151 (_bfd_x86_elf_adjust_dynamic_symbol): Use sizeof_reloc.
152 * elfxx-x86.h (elf_x86_link_hash_table): Add sizeof_reloc.
154 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
156 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check VxWorks
157 with htab->is_vxworks.
158 (elf_i386_size_dynamic_sections): Likewise.
159 (elf_i386_relocate_section): Likewise.
160 (elf_i386_finish_dynamic_symbol): Likewise.
161 (elf_i386_finish_dynamic_sections): Likewise.
163 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
165 * elf32-i386.c (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
166 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
167 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Moved to ...
168 * elfxx-x86.h (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
169 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
170 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Here.
171 * elf64-x86-64.c (GOT_TLS_IE, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
172 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Removed.
174 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
177 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Check
178 ELF_COMMON_DEF_P for common symbols.
180 2017-09-02 Alan Modra <amodra@gmail.com>
182 * elf-eh-frame.c (offset_adjust): Avoid false positive gcc warning.
183 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Likewise.
184 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
186 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
188 * elf32-i386.c (elf_i386_gc_mark_hook): Removed.
189 (elf_backend_gc_mark_hook): Likewise.
190 * elf64-x86-64.c (elf_x86_64_gc_mark_hook): Likewise.
191 (elf_backend_gc_mark_hook): Likewise.
192 * elfxx-x86.c (_bfd_x86_elf_gc_mark_hook): New function.
193 * elfxx-x86.h (_bfd_x86_elf_gc_mark_hook): New.
194 (elf_backend_gc_mark_hook): Likewise.
196 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
198 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Removed.
199 (elf_backend_adjust_dynamic_symbol): Likewise.
200 * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.
201 (elf_backend_adjust_dynamic_symbol): Likewise.
202 * elfxx-x86.c (_bfd_x86_elf_adjust_dynamic_symbol): New function.
203 (_bfd_x86_elf_link_setup_gnu_properties): Copy is_vxworks.
204 * elfxx-x86.h (elf_x86_link_hash_table): Add is_vxworks.
205 (_bfd_x86_elf_adjust_dynamic_symbol): New.
206 (elf_backend_adjust_dynamic_symbol): Likewise.
208 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
210 * elfxx-x86.h (elf_x86_plt_layout_table): Fix a typo in
213 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
215 * elf32-i386.c (elf_i386_mkobject): Removed.
216 (bfd_elf32_mkobject): Likewise.
217 * elf64-x86-64.c (elf_x86_64_mkobject): Likewise.
218 (bfd_elf64_mkobject): Likewise.
219 (bfd_elf32_mkobject): Likewise.
220 * elfxx-x86.c (_bfd_x86_elf_mkobject): New function.
221 * elfxx-x86.h (_bfd_x86_elf_mkobject): New.
222 (bfd_elf64_mkobject): Likewise.
223 (bfd_elf32_mkobject): Likewise.
225 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
227 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Updated.
228 Call _bfd_x86_elf_link_setup_gnu_properties.
229 * elf64-x86-64.c (elf_x86_lazy_plt_layout): Initialize
230 pic_plt0_entry and pic_plt_entry fields with the non-PIC PLT
232 (elf_x86_64_non_lazy_plt): Likewise.
233 (elf_x86_64_lazy_bnd_plt): Likewise.
234 (elf_x86_64_non_lazy_bnd_plt): Likewise.
235 (elf_x86_64_lazy_ibt_plt): Likewise.
236 (elf_x32_lazy_ibt_plt): Likewise.
237 (elf_x86_64_non_lazy_ibt_plt): Likewise.
238 (elf_x32_non_lazy_ibt_plt): Likewise.
239 (elf_x86_64_nacl_plt): Likewise.
240 (elf_x86_64_link_setup_gnu_properties): Updated. Call
241 _bfd_x86_elf_link_setup_gnu_properties.
242 * elfxx-x86.c: Include elf-vxworks.h".
243 (_bfd_x86_elf_link_setup_gnu_properties): New function.
244 * elfxx-x86.h (elf_x86_lazy_plt_layout): Remove "for i386 only"
245 comments for pic_plt0_entry and pic_plt_entry.
246 (elf_x86_non_lazy_plt_layout): Likewise.
247 (elf_x86_plt_layout_table): New.
248 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
250 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
253 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Create
254 .eh_frame section for the second PLT.
255 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Correct
256 alignment of .eh_frame section for the second PLT.
258 2017-09-01 Nick Clifton <nickc@redhat.com>
261 * dwarf2.c (decode_line_info): Fix test for an overlong line info
264 2017-09-01 Nick Clifton <nickc@redhat.com>
267 * elf-attrs.c (_bfd_elf_parse_attributes): Ensure that the
268 attribute buffer is NUL terminated.
270 2017-08-31 Nick Clifton <nickc@redhat.com>
273 * dwarf2.c (read_section): If necessary add a terminating NUL byte
274 to dwarf string sections.
276 2017-08-31 Alan Modra <amodra@gmail.com>
278 * po/SRC-POTFILES.in: Regenerate.
280 2017-08-31 Alan Modra <amodra@gmail.com>
282 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Don't exit early
283 for a section containing just a terminator. Allow multiple
284 terminators at end of section.
285 * elflink.c (bfd_elf_discard_info): Iterate over .eh_frame
286 sections when not adding alignment. Assert on terminator in
289 2017-08-31 Alan Modra <amodra@gmail.com>
293 * elflink.c (bfd_elf_discard_info): Don't pad embedded zero
296 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
298 * configure.ac (bfd_backends): Add elf64.lo together with
299 elfxx-x86.lo for 64-bit BFD.
300 * configure: Regenerated.
302 2017-08-31 James Bowman <james.bowman@ftdichip.com>
304 * elf32-ft32.c (ft32_elf_howto_table): Use complain_overflow_dont
307 2017-08-31 Alan Modra <amodra@gmail.com>
310 * opncls.c (bfd_close_all_done): Don't call bfd_cache_close
311 before _close_and_cleanup. Call iovec->bclose after.
312 (bfd_close): Remove code common to, and call, bfd_close_all_done.
314 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
316 * elf32-i386.c (elf_i386_plt_type): Removed.
317 (elf_i386_plt): Likewise.
318 (elf_i386_get_synthetic_symtab): Updated. Call
319 _bfd_x86_elf_get_synthetic_symtab.
320 * elf64-x86-64.c (elf_x86_64_plt_type): Removed.
321 (elf_x86_64_plt): Likewise.
322 (elf_x86_64_get_synthetic_symtab): Updated. Call
323 _bfd_x86_elf_get_synthetic_symtab.
324 * elfxx-x86.c (elf_i386_get_plt_got_vma): New function.
325 (elf_x86_64_get_plt_got_vma): Likewise.
326 (elf_i386_valid_plt_reloc_p): Likewise.
327 (elf_x86_64_valid_plt_reloc_p): Likewise.
328 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
329 * elfxx-x86.h (elf_x86_plt_type): New.
330 (elf_x86_plt): Likewise.
331 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
333 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
335 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Check
336 target_id instead of elf_machine_code.
338 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
340 * elf32-i386.c (ELF_DYNAMIC_INTERPRETER): Removed.
341 (elf_i386_lazy_plt_layout): Likewise.
342 (elf_i386_non_lazy_plt_layout): Likewise.
343 (elf_i386_plt_layout): Likewise.
344 (elf_i386_link_hash_table): Likewise.
345 (elf_i386_next_tls_desc_index): Likewise.
346 (elf_i386_srelplt2): Likewise.
347 (elf_i386_plt): Likewise.
348 (elf_i386_lazy_plt): Likewise.
349 (elf_i386_non_lazy_plt): Likewise.
350 (elf_i386_link_hash_table_create): Likewise.
351 (bfd_elf32_bfd_link_hash_table_create): Likewise.
352 (elf_i386_lazy_plt): Updated.
353 (elf_i386_non_lazy_plt): Likewise.
354 (elf_i386_lazy_ibt_plt): Likewise.
355 (elf_i386_non_lazy_ibt_plt): Likewise.
356 (elf_i386_allocate_dynrelocs): Likewise.
357 (elf_i386_size_dynamic_sections): Likewise.
358 (elf_i386_relocate_section): Likewise.
359 (elf_i386_finish_dynamic_symbol): Likewise.
360 (elf_i386_finish_dynamic_sections): Likewise.
361 (elf_i386_get_synthetic_symtab): Likewise.
362 (elf_i386_link_setup_gnu_properties): Likewise.
363 (elf_i386_nacl_plt): Likewise.
364 * elf64-x86-64.c (ABI_64_P): Removed.
365 (ELF64_DYNAMIC_INTERPRETER): Likewise.
366 (ELF32_DYNAMIC_INTERPRETER): Likewise.
367 (elf_x86_64_lazy_plt_layout): Likewise.
368 (elf_x86_64_non_lazy_plt_layout): Likewise.
369 (elf_x86_64_plt_layout): Likewise.
370 (elf_x86_64_link_hash_table): Likewise.
371 (elf_x86_64_plt): Likewise.
372 (elf_x86_64_lazy_plt): Likewise.
373 (elf_x86_64_non_lazy_plt): Likewise.
374 (elf_x86_64_link_hash_table_create): Likewise.
375 (bfd_elf64_bfd_link_hash_table_create): Likewise.
376 (bfd_elf32_bfd_link_hash_table_create): Likewise.
377 (elf_x86_64_lazy_plt): Updated.
378 (elf_x86_64_non_lazy_plt): Likewise.
379 (elf_x86_64_lazy_bnd_plt): Likewise.
380 (elf_x86_64_non_lazy_bnd_plt): Likewise.
381 (elf_x86_64_lazy_ibt_plt): Likewise.
382 (elf_x32_lazy_ibt_plt): Likewise.
383 (elf_x86_64_non_lazy_ibt_plt): Likewise.
384 (elf_x32_non_lazy_ibt_plt): Likewise.
385 (elf_x86_64_allocate_dynrelocs): Likewise.
386 (elf_x86_64_size_dynamic_sections): Likewise.
387 (elf_x86_64_relocate_section): Likewise.
388 (elf_x86_64_finish_dynamic_symbol): Likewise.
389 (elf_x86_64_finish_dynamic_sections): Likewise.
390 (elf_x86_64_get_synthetic_symtab): Likewise.
391 (elf_x86_64_link_setup_gnu_properties): Likewise.
392 (elf_x86_64_nacl_plt): Likewise.
393 * elfxx-x86.c: Include "objalloc.h", "elf/i386.h" and
395 (ELF32_DYNAMIC_INTERPRETER): New.
396 (ELF64_DYNAMIC_INTERPRETER): Likewise.
397 (ELFX32_DYNAMIC_INTERPRETER): Likewise.
398 (_bfd_x86_elf_link_hash_table_create): Likewise.
399 (_bfd_x86_elf_link_hash_table_free): Renamed to ...
400 (elf_x86_link_hash_table_free): This. Make it static.
401 * elfxx-x86.h: Don't include "objalloc.h".
403 (elf_x86_lazy_plt_layout): Likewise.
404 (elf_x86_non_lazy_plt_layout): Likewise.
405 (elf_x86_plt_layout): Likewise.
406 (_bfd_x86_elf_link_hash_table_create): Likewise.
407 (bfd_elf64_bfd_link_hash_table_create): Likewise.
408 (bfd_elf32_bfd_link_hash_table_create): Likewise.
409 (elf_x86_link_hash_table): Add plt, lazy_plt, non_lazy_plt,
410 srelplt2 and next_tls_desc_index.
411 (_bfd_x86_elf_link_hash_table_free): Removed.
413 2017-08-30 Maciej W. Rozycki <macro@imgtec.com>
415 * elfxx-mips.c (mips_elf_perform_relocation): Correct microMIPS
416 branch offset interpretation.
418 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
421 * opncls.c (bfd_close_all_done): Call _close_and_cleanup.
423 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
425 * elf64-x86-64.c (elf_x86_64_next_tls_desc_index): Removed.
426 (elf_x86_64_srelplt2): Likewise.
428 2017-08-30 Alan Modra <amodra@gmail.com>
430 * elf64-ppc.c (struct ppc_link_hash_table): Add do_tls_opt.
431 (ppc64_elf_tls_optimize): Set it.
432 (ppc64_elf_relocate_section): Nop addis on TPREL16_HA, and convert
433 insn on TPREL16_LO and TPREL16_LO_DS relocs to use r13 when
434 addis would add zero.
435 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add do_tls_opt.
436 (ppc_elf_tls_optimize): Set it.
437 (ppc_elf_relocate_section): Nop addis on TPREL16_HA, and convert
438 insn on TPREL16_LO relocs to use r2 when addis would add zero.
440 2017-08-30 Alan Modra <amodra@gmail.com>
442 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing
443 __tls_get_addr call sequences to LE, don't move the addi down
444 to the nop. Replace the bl with addi and leave the nop alone.
446 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
448 * elf32-i386.c (elf_i386_pie_finish_undefweak_symbol):
450 * elf64-x86-64.c (elf_x86_64_finish_local_dynamic_symbol):
452 (elf_x86_64_pie_finish_undefweak_symbol): Likewise.
454 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
456 * Makefile.am (BFD32_BACKENDS): Add elfxx-x86.lo.
457 (BFD64_BACKENDS): Likewise.
458 (BFD32_BACKENDS_CFILES): Add elfxx-x86.c.
459 (BFD64_BACKENDS_CFILES): Likewise.
460 * Makefile.in: Regenerated.
461 * configure.ac (bfd_backends): Add elfxx-x86.lo together with
462 elf32-i386.lo and elf64-x86-64.lo.
463 * configure: Regenerated.
464 * elf32-i386.c: Include "elfxx-x86.h" instead of "sysdep.h",
465 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
466 "objalloc.h" and "hashtab.h".
467 (ELIMINATE_COPY_RELOCS): Removed.
468 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
469 (SYMBOL_NO_COPYRELOC): Likewise.
470 (elf_i386_link_hash_entry): Likewise.
471 (GOT_UNKNOWN): Likewise.
472 (GOT_NORMAL): Likewise.
473 (GOT_TLS_GD): Likewise.
474 (elf_i386_hash_entry): Likewise.
475 (elf_i386_obj_tdata): Likewise.
476 (elf_i386_tdata): Likewise.
477 (elf_i386_local_got_tls_type): Likewise.
478 (elf_i386_local_tlsdesc_gotent): Likewise.
479 (elf_i386_hash_table): Likewise.
480 (elf_i386_link_hash_newfunc): Likewise.
481 (elf_i386_local_htab_hash): Likewise.
482 (elf_i386_local_htab_eq): Likewise.
483 (elf_i386_get_local_sym_hash): Likewise.
484 (elf_i386_link_hash_table_free): Likewise.
485 (elf_i386_copy_indirect_symbol): Likewise.
486 (elf_i386_fixup_symbol): Likewise.
487 (elf_i386_readonly_dynrelocs): Likewise.
488 (elf_i386_always_size_sections): Likewise.
489 (elf_i386_set_tls_module_base): Likewise.
490 (elf_i386_dtpoff_base): Likewise.
491 (compare_relocs): Likewise.
492 (elf_i386_hash_symbol): Likewise.
493 (elf_i386_parse_gnu_properties): Likewise.
494 (elf_i386_merge_gnu_properties): Likewise.
495 (elf_i386_link_check_relocs): Likewise.
496 (elf_i386_merge_symbol_attribute): Likewise.
497 (bfd_elf32_bfd_link_check_relocs): Likewise.
498 (elf_backend_copy_indirect_symbol): Likewise.
499 (elf_backend_always_size_sections): Likewise.
500 (elf_backend_omit_section_dynsym): Likewise.
501 (elf_backend_hash_symbol): Likewise.
502 (elf_backend_fixup_symbol): Likewise.
503 (elf_backend_parse_gnu_properties): Likewise.
504 (elf_backend_merge_gnu_properties): Likewise.
505 (elf_backend_merge_symbol_attribute): Likewise.
506 (elf_i386_mkobject): Updated.
507 (elf_i386_link_hash_table_create): Likewise.
508 (elf_i386_check_tls_transition): Likewise.
509 (elf_i386_tls_transition): Likewise.
510 (elf_i386_convert_load_reloc): Likewise.
511 (elf_i386_check_relocs): Likewise.
512 (elf_i386_adjust_dynamic_symbol): Likewise.
513 (elf_i386_allocate_dynrelocs): Likewise.
514 (elf_i386_convert_load): Likewise.
515 (elf_i386_size_dynamic_sections): Likewise.
516 (elf_i386_relocate_section): Likewise.
517 (elf_i386_finish_dynamic_symbol ): Likewise.
518 (elf_i386_finish_dynamic_sections): Likewise.
519 (elf_i386_output_arch_local_syms): Likewise.
520 (elf_i386_get_synthetic_symtab): Likewise.
521 (elf_i386_link_setup_gnu_properties): Likewise.
522 (elf_i386_link_hash_table): Use elf_x86_link_hash_table, instead
523 of elf_link_hash_table, as base.
524 (elf_i386_next_tls_desc_index): New.
525 (elf_i386_srelplt2): Likewise.
526 (elf_i386_plt): Likewise.
527 (elf_i386_lazy_plt): Likewise.
528 (elf_i386_non_lazy_plt): Likewise.
529 * elf32-x86-64.c: Include "elfxx-x86.h" instead of "sysdep.h",
530 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
531 "objalloc.h" and "hashtab.h".
532 (ELIMINATE_COPY_RELOCS): Removed.
533 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
534 (SYMBOL_NO_COPYRELOC): Likewise.
535 (elf_x86_64_link_hash_entry): Likewise.
536 (GOT_UNKNOWN): Likewise.
537 (GOT_NORMAL): Likewise.
538 (GOT_TLS_GD): Likewise.
539 (elf_x86_64_hash_entry): Likewise.
540 (elf_x86_64_obj_tdata): Likewise.
541 (elf_x86_64_tdata): Likewise.
542 (elf_x86_64_local_got_tls_type): Likewise.
543 (elf_x86_64_local_tlsdesc_gotent): Likewise.
544 (elf_x86_64_hash_table): Likewise.
545 (elf_x86_64_link_hash_newfunc): Likewise.
546 (elf_x86_64_local_htab_hash): Likewise.
547 (elf_x86_64_local_htab_eq): Likewise.
548 (elf_x86_64_get_local_sym_hash): Likewise.
549 (elf_x86_64_link_hash_table_free): Likewise.
550 (elf_x86_64_copy_indirect_symbol): Likewise.
551 (elf_x86_64_fixup_symbol): Likewise.
552 (elf_x86_64_readonly_dynrelocs): Likewise.
553 (elf_x86_64_always_size_sections): Likewise.
554 (elf_x86_64_set_tls_module_base): Likewise.
555 (elf_x86_64_dtpoff_base): Likewise.
556 (compare_relocs): Likewise.
557 (elf_x86_64_merge_symbol_attribute): Likewise.
558 (elf_x86_64_hash_symbol): Likewise.
559 (elf_x86_64_parse_gnu_properties): Likewise.
560 (elf_x86_64_merge_gnu_properties): Likewise.
561 (elf_x86_64_link_check_relocs): Likewise.
562 (elf_backend_copy_indirect_symbol): Likewise.
563 (elf_backend_always_size_sections): Likewise.
564 (bfd_elf64_bfd_link_check_relocs): Likewise.
565 (elf_backend_merge_symbol_attribute): Likewise.
566 (elf_backend_hash_symbol): Likewise.
567 (elf_backend_omit_section_dynsym): Likewise.
568 (elf_backend_fixup_symbol): Likewise.
569 (elf_backend_parse_gnu_properties): Likewise.
570 (elf_backend_merge_gnu_properties): Likewise.
571 (bfd_elf32_bfd_link_check_relocs): Likewise.
572 (elf_x86_64_mkobject): Updated.
573 (elf_x86_64_link_hash_table_create): Likewise.
574 (elf_x86_64_check_tls_transition): Likewise.
575 (elf_x86_64_tls_transition): Likewise.
576 (elf_x86_64_convert_load_reloc): Likewise.
577 (elf_x86_64_check_relocs): Likewise.
578 (elf_x86_64_adjust_dynamic_symbol): Likewise.
579 (elf_x86_64_allocate_dynrelocs): Likewise.
580 (elf_x86_64_convert_load): Likewise.
581 (elf_x86_64_size_dynamic_sections): Likewise.
582 (elf_x86_64_relocate_section): Likewise.
583 (elf_x86_64_finish_dynamic_symbol ): Likewise.
584 (elf_x86_64_finish_dynamic_sections): Likewise.
585 (elf_x86_64_output_arch_local_syms): Likewise.
586 (elf_x86_64_get_synthetic_symtab): Likewise.
587 (elf_x86_64_link_setup_gnu_properties): Likewise.
588 (elf_x86_64_link_hash_table): Use elf_x86_link_hash_table,
589 instead of elf_link_hash_table, as base.
590 (elf_x86_64_next_tls_desc_index): New.
591 (elf_x86_64_srelplt2): Likewise.
592 (elf_x86_64_plt): Likewise.
593 (elf_x86_64_lazy_plt): Likewise.
594 (elf_x86_64_non_lazy_plt): Likewise.
595 * elfxx-x86.c: New file.
596 * elfxx-x86.h: Likewise.
598 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
600 * elf32-i386.c (elf_i386_get_synthetic_symtab): Simplify bad
602 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
604 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
606 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check valid PLT
607 sections before checking dynamic relocations and free invalid
608 PLT section contents.
609 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
611 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
613 * elf-bfd.h (_bfd_elf_ifunc_get_synthetic_symtab): Removed.
614 * elf-ifunc.c (_bfd_elf_ifunc_get_synthetic_symtab): Likewise.
616 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
619 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check for valid
621 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
623 2017-08-27 H.J. Lu <hongjiu.lu@intel.com>
625 * elf32-i386.c (elf_i386_link_hash_newfunc): Initialize
627 * elf64-x86-64.c (elf_x86_64_link_hash_newfunc): Likewise.
629 2017-08-26 H.J. Lu <hongjiu.lu@intel.com>
632 * elf-bfd.h (elf_obj_tdata): Use ENUM_BITFIELD on object_id,
633 dyn_lib_class and has_gnu_symbols. Change bad_symtab to bitfield.
634 Add a has_no_copy_on_protected bitfield.
635 (elf_has_no_copy_on_protected): New.
636 * elf-properties.c (_bfd_elf_parse_gnu_properties): Set
637 elf_has_no_copy_on_protected for GNU_PROPERTY_NO_COPY_ON_PROTECTED.
638 (elf_merge_gnu_property_list): Likewise.
639 (_bfd_elf_link_setup_gnu_properties): Set extern_protected_data
640 to FALSE for elf_has_no_copy_on_protected.
641 * elf32-i386.c (SYMBOL_NO_COPYRELOC): New.
642 (elf_i386_link_hash_entry): Add def_protected.
643 (elf_i386_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
644 when checking info->nocopyreloc.
645 (elf_i386_link_setup_gnu_properties): Don't set
646 extern_protected_data here.
647 (elf_i386_merge_symbol_attribute): New function.
648 (elf_backend_merge_symbol_attribute): New.
649 * elf64-x86-64.c (SYMBOL_NO_COPYRELOC): New.
650 (elf_x86_64_link_hash_entry): Add def_protected.
651 (elf_x86_64_need_pic): Report protected symbol for def_protected.
652 (elf_x86_64_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
653 when checking info->nocopyreloc.
654 (elf_x86_64_relocate_section): Also check for R_X86_64_PC32
655 relocation run-time overflow and unresolvable R_X86_64_32S
656 relocation against protected data symbol defined in shared object
657 with GNU_PROPERTY_NO_COPY_ON_PROTECTED.
658 (elf_x86_64_link_setup_gnu_properties): Don't set
659 extern_protected_data here.
660 (elf_x86_64_merge_symbol_attribute): New function.
661 (elf_backend_merge_symbol_attribute): New.
663 2017-08-26 Alan Modra <amodra@gmail.com>
665 * elf32-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
666 (ppc_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
667 (ppc_elf_relocate_section): Comment fix.
668 * elf64-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
669 (ppc64_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
670 Support dynamic relocs for TPREL16 when non-pic too.
671 (dec_dynrel_count): Adjust TPREL16 handling as per check_relocs.
672 (ppc64_elf_relocate_section): Support dynamic relocs for TPREL16
675 2017-08-25 H.J. Lu <hongjiu.lu@intel.com>
677 * elf32-i386.c (elf_i386_link_hash_entry): Remove redundant
678 "symbol" in comments.
679 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Likewise.
681 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
684 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for
685 R_X86_64_PC32 relocation run-time overflow and unresolvable
686 R_X86_64_32S relocation with -z nocopyreloc.
688 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
690 * elf32-i386.c (elf_i386_check_relocs): Revert the last change.
691 Undefined symbols may not have a type.
692 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
694 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
696 * elf64-x86-64.c (elf_x86_64_need_pic): Add an argument for
697 bfd_link_info. Report shared, PIE or PDE object based on
699 (elf_x86_64_check_relocs): Update elf_x86_64_need_pic call.
700 (elf_x86_64_relocate_section): Likewise.
702 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
704 * elf32-i386.c (elf_i386_check_relocs): Increment PLT count only
705 for function symbols.
706 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
708 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
710 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set
711 extern_protected_data to FALSE if GNU_PROPERTY_NO_COPY_ON_PROTECTED
712 is set on any input relocatable file.
713 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
715 2017-08-23 Alan Modra <amodra@gmail.com>
718 * elf64-ppc.c (ensure_undef_dynamic): Rename from
719 ensure_undefweak_dynamic. Handle undefined too.
720 * elf32-ppc.c (ensure_undef_dynamic): Likewise.
721 * elf32-hppa.c (ensure_undef_dynamic): Likewise.
722 (allocate_dynrelocs): Discard undefined non-default visibility
723 relocs first. Make undefined syms dynamic. Tidy goto.
725 2017-08-21 Alan Modra <amodra@gmail.com>
726 H.J. Lu <hongjiu.lu@intel.com>
729 * elf-bfd.h (SYMBOLIC_BIND): Return TRUE for __start/__stop symbols.
730 * elflink.c (bfd_elf_define_start_stop): Rewrite.
732 2017-08-21 Hans-Peter Nilsson <hp@bitrange.com>
735 * elf64-mmix.c (mmix_elf_relax_section): Correct handling of
736 undefined weak symbols.
738 2017-08-18 Nick Clifton <nickc@redhat.com>
741 * tekhex.c (getsym): Fix check for source pointer walking off the
742 end of the input buffer.
744 2017-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
747 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Skip IFUNC
748 relocations in debug sections, change abort to _bfd_error_handler.
750 2017-08-14 Nick Clifton <nickc@redhat.com>
753 * elf.c (setup_group): Check for an empty or very small group
755 * po/bfd.pot: Regenerate.
757 2017-08-14 Alan Modra <amodra@gmail.com>
760 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't add
761 alignment padding here.
762 * elflink.c (bfd_elf_discard_info): Add .eh_frame padding here
763 in a reverse pass over sections.
765 2017-08-11 H.J. Lu <hongjiu.lu@intel.com>
768 * elf32-i386.c (elf_i386_get_synthetic_symtab): Allocate space
769 for @plt suffixes first.
770 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
772 2017-08-08 Nick Clifton <nickc@redhat.com>
775 * elf-attrs.c (_bfd_elf_parse_attributes): Complain about very
776 small section lengths.
777 * elf.c (_bfd_elf_setup_sections): Skip empty entries in the group
779 (elfcore_grok_freebsd_prstatus): Add checks to make sure that
780 there is enough data present in the note.
782 2017-08-08 Alan Modra <amodra@gmail.com>
785 * elf32-microblaze.c (microblaze_elf_check_relocs): Don't bump
786 got.refcount for GOTOFF relocs, just create .got section.
788 2017-08-07 H.J. Lu <hongjiu.lu@intel.com>
790 * elflink.c (elf_link_add_object_symbols): Move common symbol
791 check after bed->common_definition.
793 2017-08-07 Alan Modra <amodra@gmail.com>
796 * elflink.c (bfd_elf_final_link): Don't segfault when sections
797 needed to define various dynamic tags have been discarded.
799 2017-08-07 Nick Clifton <nickc@redhat.com>
802 * elf32-i386.c (elf_i386_link_setup_gnu_properties): If the dynobj
803 has not been set then use the bfd returned by
804 _bfd_elf_link_setup_gnu_properties. If that is null then search
805 through all the input bfds selecting the first normal, ELF format
807 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
809 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
811 * elf32-i386.c (elf_i386_link_hash_entry): Change tls_get_addr
813 (elf_i386_link_hash_newfunc): Initialize tls_get_addr to 0.
814 (elf_i386_check_tls_transition): Check tls_get_addr directly.
815 (elf_i386_convert_load_reloc): Update tls_get_addr check.
816 (elf_i386_link_check_relocs): New function.
817 (bfd_elf32_bfd_link_check_relocs): New.
818 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Change tls_get_addr
820 (elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 0.
821 (elf_x86_64_check_tls_transition): Check tls_get_addr directly.
822 (elf_x86_64_convert_load_reloc): Update tls_get_addr check.
823 (elf_x86_64_link_check_relocs): New function.
824 (bfd_elf64_bfd_link_check_relocs): New.
825 (bfd_elf32_bfd_link_check_relocs): Likewise.
827 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
830 * elflink.c (elf_link_add_object_symbols): Treat common symbol
831 as undefined for --no-define-common.
833 2017-08-05 Alan Modra <amodra@gmail.com>
835 * elf32-hppa.c (elf32_hppa_set_gp): Don't require an
836 hppa_link_hash_table.
838 2017-08-02 Max Filippov <jcmvbkbc@gmail.com>
840 * xtensa-isa.c (xtensa_isa_init): Don't update lookup table
841 entries for sysregs with negative indices.
843 2017-08-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
845 * elf32-s390.c (elf_s390_finish_dynamic_sections): Skip if it
846 isn't the S/390 specific elf data.
847 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
849 2017-07-31 Kuan-Lin Chen <rufus@andestech.com>
851 * elfxx-riscv.c (riscv_elf_add_sub_reloc): New function.
852 * (howto_table) [R_RISCV_ADD8]: Use riscv_elf_add_sub_reloc.
853 [R_RISCV_ADD16]: Likewise.
854 [R_RISCV_ADD32]: Likewise.
855 [R_RISCV_ADD64]: Likewise.
856 [R_RISCV_SUB6]: Likewise.
857 [R_RISCV_SUB8]: Likewise.
858 [R_RISCV_SUB16]: Likewise.
859 [R_RISCV_SUB32]: Likewise.
860 [R_RISCV_SUB64]: Likewise.
862 2017-07-31 Alan Modra <amodra@gmail.com>
864 * elf64-ppc.c (ppc64_elf_tls_setup): Warn on --plt-localentry
865 without ld.so checks.
867 2017-07-29 Alan Modra <amodra@gmail.com>
870 * elf64-ppc.c (struct ppc_link_hash_entry): Add non_zero_localentry.
871 (ppc64_elf_merge_symbol): Set non_zero_localentry.
872 (is_elfv2_localentry0): Test non_zero_localentry.
873 (ppc64_elf_tls_setup): Default to --no-plt-localentry.
875 2017-07-28 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
877 * elf32-s390.c (elf_s390_finish_dynamic_sections): Add NULL
878 pointer check for htab->elf.irelplt.
879 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
881 2017-07-27 Nick Clifton <nickc@redhat.com>
884 * mach-o.c (bfd_mach_o_read_symtab_strtab): Fail if the symtab
886 * nlmcode.h (nlm_swap_auxiliary_headers_in): Replace assertion
888 * section.c (bfd_make_section_with_flags): Fail if the name or bfd
890 * vms-alpha.c (bfd_make_section_with_flags): Correct computation
892 (evax_bfd_print_emh): Check for invalid string lengths.
894 2017-07-25 Nick Clifton <nickc@redhat.com>
896 * po/fr.po: Updated French translation.
898 2017-07-25 Benjamin Green <bengreen5mx@gmail.com>
901 * elf32-msp430.c (msp430_elf_relax_section): Allow conversion of
902 16-bit absolute branches into 10-bit pc-relative branches on the
903 MSP430 as well as the MSP430X.
905 2017-07-25 Alan Modra <amodra@gmail.com>
907 * elf64-ppc.c (struct map_stub): Add tls_get_addr_opt_bctrl.
908 (stub_eh_frame_size): New function.
909 (ppc_size_one_stub): Set group tls_get_addr_opt_bctrl.
910 (group_sections): Init group tls_get_addr_opt_bctrl.
911 (ppc64_elf_size_stubs): Update sizing and initialization of
912 .eh_frame. Iteration over stubs via group list.
913 (ppc64_elf_build_stubs): Iterate over stubs via group list.
914 (ppc64_elf_finish_dynamic_sections): Update finalization of
917 2017-07-24 Nick Clifton <nickc@redhat.com>
920 * mach-o.c (bfd_mach_o_canonicalize_relocs): Pass the base address
921 of the relocs to the canonicalize_one_reloc routine.
922 * mach-o.h (struct bfd_mach_o_backend_data): Update the prototype
923 for the _bfd_mach_o_canonicalize_one_reloc field.
924 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add
925 res_base parameter. Use to check for corrupt pair relocs.
926 * mach-o-aarch64.c (bfd_mach_o_arm64_canonicalize_one_reloc):
928 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc):
930 * mach-o-x86-64.c (bfd_mach_o_x86_64_canonicalize_one_reloc):
933 * vms-alpha.c (_bfd_vms_slurp_eihd): Make sure that there is
934 enough data in the record before attempting to parse it.
935 (_bfd_vms_slurp_eeom): Likewise.
937 (_bfd_vms_slurp_egsd): Check for an invalid section index.
938 (image_set_ptr): Likewise.
939 (alpha_vms_slurp_relocs): Likewise.
941 (alpha_vms_object_p): Check for a truncated record.
943 2017-07-24 Nick Clifton <nickc@redhat.com>
946 * reloc.c (_bfd_unrecognized_reloc): New function. Reports
947 an unrecognized reloc and sets the bfd_error value.
948 * libbfd.h: Regenerate.
949 * elf32-arm.c (elf32_arm_final_link_relocate): Use the new
951 * elf32-i386.c (elf_i386_relocate_section): Likewise.
952 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
953 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
954 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.
955 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
957 2017-07-23 Alan Modra <amodra@gmail.com>
959 * elf64-ppc.c (ppc64_elf_size_stubs): Correct advance to
962 2017-07-19 Szabolcs Nagy <szabolcs.nagy@arm.com>
965 * elfnn-aarch64.c (elfNN_aarch64_reloc_type_class): Return
966 reloc_class_ifunc for ifunc symbols.
968 2017-07-19 Nick Clifton <nickc@redhat.com>
971 * archive.c (bfd_generic_archive_p): If the bfd does not have the
972 correct magic bytes at the start, set the error to wrong format
973 and clear the format selector before returning NULL.
975 2017-07-19 Nick Clifton <nickc@redhat.com>
978 * coff-rs6000.c (_bfd_strntol): New function.
979 (_bfd_strntoll): New function.
980 (GET_VALUE_IN_FIELD): New macro.
981 (EQ_VALUE_IN_FIELD): new macro.
982 (_bfd_xcoff_slurp_armap): Use new macros.
983 (_bfd_xcoff_archive_p): Likewise.
984 (_bfd_xcoff_read_ar_hdr): Likewise.
985 (_bfd_xcoff_openr_next_archived_file): Likewise.
986 (_bfd_xcoff_stat_arch_elt): Likewise.
987 * coff64-rs6000.c (_bfd_strntol): New function.
988 (_bfd_strntoll): New function.
989 (GET_VALUE_IN_FIELD): New macro.
990 (xcoff64_slurp_armap): Use new macros.
992 2017-07-19 Claudiu Zissulescu <claziss@synopsys.com>
993 John Eric Martin <John.Martin@emmicro-us.com>
995 * bfd-in2.h: Regenerate.
996 * libbfd.h: Regenerate.
997 * elf32-arc.c (JLI): Define.
998 * reloc.c: Add JLI relocations.
1000 2017-07-18 Nick Clifton <nickc@redhat.com>
1003 * coff-sh.c: Fix spelling typos.
1004 * compress.c: Likewise.
1005 * cpu-pdp11.c: Likewise.
1006 * ecofflink.c: Likewise.
1007 * elf-m10300.c: Likewise.
1009 * elf32-arm.c: Likewise.
1010 * elf32-m68k.c: Likewise.
1011 * elf32-nds32.c: Likewise.
1012 * elf32-ppc.c: Likewise.
1013 * elf32-sh.c: Likewise.
1014 * elf32-v850.c: Likewise.
1015 * elf64-ppc.c: Likewise.
1016 * elf64-x86-64.c: Likewise.
1017 * elflink.c: Likewise.
1018 * elfnn-aarch64.c: Likewise.
1019 * elfxx-mips.c: Likewise.
1021 * sunos.c: Likewise.
1022 * vms-alpha.c: Likewise.
1023 * xcofflink.c: Likewise.
1025 2017-07-18 Nick Clifton <nickc@redhat.com>
1028 * coffcode.h (handle_COMDAT): Replace abort with an error message
1031 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
1034 * elf64-x86-64.c (elf_x86_64_relocate_section): Limit PIC check
1037 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
1039 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
1041 2017-07-16 Alan Modra <amodra@gmail.com>
1043 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimize
1044 __tls_index GOT entries when using __tls_get_addr_opt stub.
1045 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1047 2017-07-12 Alan Modra <amodra@gmail.com>
1049 * po/es.po: Update from translationproject.org/latest/bfd/.
1050 * po/fi.po: Likewise.
1051 * po/fr.po: Likewise.
1052 * po/id.po: Likewise.
1053 * po/ja.po: Likewise.
1054 * po/ro.po: Likewise.
1055 * po/ru.po: Likewise.
1056 * po/sr.po: Likewise.
1057 * po/sv.po: Likewise.
1058 * po/tr.po: Likewise.
1059 * po/uk.po: Likewise.
1060 * po/vi.po: Likewise.
1061 * po/zh_CN.po: Likewise.
1062 * po/hr.po: New file from translationproject.org.
1063 * configure.ac (ALL_LINGUAS): Add hr. Sort.
1064 * configure: Regenerate.
1066 2017-07-12 Nick Clifton <nickc@redhat.com>
1068 Fix compile time warnings using gcc 7.1.1.
1069 * elf32-xtensa.c (elf_xtensa_get_plt_section): Increase length of
1071 (elf_xtensa_get_gotplt_section): Increase length of got_name
1073 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add a
1074 default return of FALSE.
1075 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc): Add a
1076 default return of FALSE.
1078 2017-07-12 Alan Modra <amodra@gmail.com>
1080 * binary.c (binary_set_section_contents): Don't print filepos in
1082 (coff_write_object_contents): Cast size_t for error message.
1083 (coff_slurp_line_table): Don't use bfd_vma symndx.
1084 (coff_slurp_reloc_table): Remove unneeded cast.
1085 * dwarf2.c (read_section): Cast bfd_int64_t to long long for
1087 (find_abstract_instance_name): Likewise.
1088 * elf32-arm.c (arm_type_of_stub): Correct error arg order.
1089 (bfd_elf32_arm_stm32l4xx_erratum_scan): Don't cast error arg.
1090 (elf32_arm_check_relocs): Make r_symndx an int.
1091 * elf32-cris.c (cris_elf_check_relocs): Delete extraneous %s in
1093 * elf32-metag.c (elf_metag_relocate_section): Delete extra error
1095 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Rewrite bogus
1097 * elf32-i386.c (elf_i386_check_relocs): Make r_symndx an int.
1098 * elf32-s390.c (elf_s390_check_relocs): Likewise.
1099 * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
1100 * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
1101 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
1102 * elf64-s390.c (elf_s390_check_relocs): Likewise.
1103 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1104 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
1105 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
1106 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
1107 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
1108 * elf64-mmix.c (_bfd_mmix_after_linker_allocation): Cast size_t args
1109 and use %lu for error message.
1110 * elflink.c (elf_link_adjust_relocs): Delete extra error message arg.
1111 * mmo.c (mmo_scan): Make stab_loc a file_ptr. Cast expression for
1114 * elf32-arm.c (elf32_arm_tls_relax): Correct format string and args
1116 (elf32_arm_final_link_relocate): Likewise.
1117 * coff-arm.c (bfd_arm_process_before_allocation): Likewise.
1118 * coffcode.h (styp_to_sec_flags): Likewise.
1119 * cofflink.c (_bfd_coff_write_global_sym): Likewise.
1120 * ecoff.c (_bfd_ecoff_slurp_symbol_table): Likewise.
1121 * elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise.
1122 * elf32-bfin.c (bfinfdpic_check_relocs): Likewise.
1123 (elf32_bfin_merge_private_bfd_data): Likewise.
1124 * elf32-cris.c (cris_elf_relocate_section): Likewise.
1125 * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
1126 * elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise.
1127 (i370_elf_relocate_section): Likewise.
1128 * elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise.
1129 * elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise.
1130 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
1131 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
1132 * elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise.
1133 * elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise.
1134 * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
1135 * elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise.
1136 (_bfd_mips_elf_merge_private_bfd_data): Likewise.
1137 * ieee.c (ieee_write_id, read_id): Likewise.
1138 * mach-o.c (bfd_mach_o_write_contents): Likewise.
1139 (bfd_mach_o_layout_commands, bfd_mach_o_read_section_32): Likewise.
1140 (bfd_mach_o_read_section_64, bfd_mach_o_read_symtab_symbol): Likewise.
1141 (bfd_mach_o_read_command, bfd_mach_o_header_p): Likewise.
1142 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Likewise.
1143 * stabs.c (_bfd_link_section_stabs): Likewise.
1145 * coff-arm.c (coff_arm_relocate_section): Use L modifier in error
1147 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
1148 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
1149 * coff-rs6000.c (xcoff_reloc_type_toc): Likewise.
1150 * coff-sh.c (sh_relax_section): Likewise.
1151 (sh_relax_delete_bytes, sh_swap_insns): Likewise.
1152 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
1153 * coffcode.h (coff_slurp_reloc_table): Likewise.
1154 * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
1155 (_bfd_coff_read_string_table): Likewise.
1156 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
1157 * compress.c (bfd_get_full_section_contents): Likewise.
1158 * dwarf2.c (read_formatted_entries, decode_line_info): Likewise.
1159 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
1160 * elf.c (bfd_elf_string_from_elf_section): Likewise.
1161 * elf32-arc.c (arc_special_overflow_checks): Likewise.
1162 * elf32-arm.c (elf32_arm_tls_relax): Likewise.
1163 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Likewise.
1164 (elf32_arm_write_section): Likewise.
1165 * elf32-bfin.c (bfin_relocate_section): Likewise.
1166 (bfinfdpic_relocate_section): Likewise.
1167 * elf32-hppa.c (hppa_build_one_stub): Likewise.
1168 (final_link_relocate, elf32_hppa_relocate_section): Likewise.
1169 * elf32-i386.c (elf_i386_tls_transition): Likewise.
1170 (elf_i386_relocate_section): Likewise.
1171 * elf32-ip2k.c (ip2k_final_link_relocate): Likewise.
1172 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
1173 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
1174 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1175 * elf32-metag.c (elf_metag_relocate_section): Likewise.
1176 * elf32-nds32.c (unrecognized_reloc_msg): Likewise.
1177 (nds32_elf_relax_longcall1, nds32_elf_relax_longcall2): Likewise.
1178 (nds32_elf_relax_longcall3, nds32_elf_relax_longjump1): Likewise.
1179 (nds32_elf_relax_longjump2, nds32_elf_relax_longjump3): Likewise.
1180 (nds32_elf_relax_longcall4, nds32_elf_relax_longcall5): Likewise.
1181 (nds32_elf_relax_longcall6, nds32_elf_relax_longjump4): Likewise.
1182 (nds32_elf_relax_longjump5, nds32_elf_relax_longjump6): Likewise.
1183 (nds32_elf_relax_longjump7, nds32_elf_relax_loadstore): Likewise.
1184 (nds32_elf_relax_ptr, nds32_elf_ex9_build_hash_table): Likewise.
1185 * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
1186 * elf32-rx.c (UNSAFE_FOR_PID): Likewise.
1187 * elf32-s390.c (invalid_tls_insn, elf_s390_relocate_section): Likewise.
1188 * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
1189 * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
1190 * elf32-sh.c (sh_elf_relax_section): Likewise.
1191 (sh_elf_relax_delete_bytes, sh_elf_swap_insns): Likewise.
1192 (sh_elf_relocate_section): Likewise.
1193 * elf32-sh64.c (shmedia_prepare_reloc): Likewise.
1194 * elf32-spu.c (spu_elf_relocate_section): Likewise.
1195 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
1196 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
1197 * elf32-v850.c (v850_elf_relax_section): Likewise.
1198 * elf32-vax.c (elf_vax_check_relocs): Likewise.
1199 (elf_vax_relocate_section): Likewise.
1200 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
1201 (extend_ebb_bounds_forward, extend_ebb_bounds_backward): Likewise.
1202 (compute_text_actions, compute_ebb_proposed_actions): Likewise.
1203 (do_fix_for_relocatable_link): Likewise.
1204 * elf64-alpha.c (elf64_alpha_relax_got_load): Likewise.
1205 (elf64_alpha_relax_with_lituse): Likewise.
1206 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Likewise.
1207 (elf_hppa_final_link_relocate): Likewise.
1208 * elf64-ia64-vms.c (elf64_ia64_relax_section): Likewise.
1209 (elf64_ia64_choose_gp, elf64_ia64_relocate_section): Likewise.
1210 (elf64_vms_link_add_object_symbols): Likewise.
1211 * elf64-mmix.c (mmix_elf_perform_relocation): Likewise.
1212 (mmix_final_link_relocate): Likewise.
1213 * elf64-s390.c (invalid_tls_insn): Likewise.
1214 (elf_s390_relocate_section): Likewise.
1215 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
1216 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
1217 (elf_x86_64_relocate_section): Likewise.
1218 * elfcode.h (elf_slurp_symbol_table): Likewise.
1219 * elfcore.h (elf_core_file_p): Likewise.
1220 * elflink.c (elf_link_read_relocs_from_section): Likewise.
1221 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
1222 (elfNN_aarch64_relocate_section): Likewise.
1223 * elfnn-ia64.c (elfNN_ia64_relax_section): Likewise.
1224 (elfNN_ia64_choose_gp, elfNN_ia64_relocate_section): Likewise.
1225 * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
1226 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
1227 (_bfd_mips_elf_relocate_section): Likewise.
1228 (_bfd_mips_elf_finish_dynamic_symbol, mips_finish_exec_plt): Likewise.
1229 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
1230 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
1231 * ieee.c (ieee_slurp_external_symbols): Likewise.
1232 * ihex.c (ihex_write_object_content): Likewise.
1233 * mach-o.c (bfd_mach_o_build_exec_seg_command): Likewise.
1234 * merge.c (_bfd_merged_section_offset): Likewise.
1235 * mmo.c (mmo_write_loc_chunk): Likewise.
1236 (mmo_write_object_contents): Likewise.
1237 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Likewise.
1238 * stabs.c (_bfd_link_section_stabs): Likewise.
1239 * xcofflink.c (xcoff_link_add_symbols, xcoff_find_tc0): Likewise.
1241 2017-07-11 Alan Modra <amodra@gmail.com>
1243 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo.
1245 2017-07-11 Alan Modra <amodra@gmail.com>
1247 * elf32-ppc.c (ppc_elf_relocate_section): Emit "unexpected
1248 instruction" error using _bfd_error_handler, not einfo.
1250 2017-07-10 Nick Clifton <nickc@redhat.com>
1252 * coffcode.h (coff_slurp_symbol_table): Do not include an entry
1253 for C_AIX_WEAKEXT if it has the same value as C_WEAKEXT.
1255 2017-07-07 John Baldwin <jhb@FreeBSD.org>
1257 * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PTLWPINFO.
1259 2017-07-07 Alan Modra <amodra@gmail.com>
1261 * coffcode.h (coff_slurp_symbol_table): Handle C_AIX_WEAKEXT.
1263 2017-07-07 Alan Modra <amodra@gmail.com>
1265 * bfd.c (_doprnt): Replace "L" with "ll" when printing bfd_vma
1266 as long long. Move code replacing "ll" with "I64", and simplify.
1268 2017-07-06 H.J. Lu <hongjiu.lu@intel.com>
1270 * bfd.c (_doprnt): Convert 'L' to 'l' when setting wide_width
1273 2017-07-05 H.J. Lu <hongjiu.lu@intel.com>
1275 * dwarf2.c (line_info_add_include_dir_stub): Replace time with
1277 (line_info_add_file_name): Likewise.
1278 (decode_line_info): Likewise.
1280 2017-07-04 Tristan Gingold <gingold@adacore.com>
1282 * version.m4: Bump version to 2.29.51
1283 * configure: Regenerate.
1285 2017-07-04 Jiong Wang <jiong.wang@arm.com>
1287 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Remove the
1288 sanity check at the head of this function.
1290 2017-07-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1292 * dwarf2.c (struct dwarf2_debug): Add fields dwarf_line_str_buffer and
1293 dwarf_line_str_size.
1294 (struct attr_abbrev): Add field implicit_const.
1295 (dwarf_debug_sections): Add .debug_line_str.
1296 (enum dwarf_debug_section_enum): Add debug_line_str and debug_max.
1297 (dwarf_debug_section_assert): Add static assertion.
1298 (read_indirect_line_string): New.
1299 (read_abbrevs): Support DW_FORM_implicit_const.
1300 (is_str_attr): Support DW_FORM_line_strp.
1301 (read_attribute_value): Support DW_FORM_line_strp and
1302 DW_FORM_implicit_const.
1303 (read_attribute): Support DW_FORM_implicit_const.
1304 (line_info_add_include_dir, line_info_add_include_dir_stub):
1305 (line_info_add_file_name, read_formatted_entries): New.
1306 (decode_line_info, parse_comp_unit): Support DWARF 5.
1307 (_bfd_dwarf2_cleanup_debug_info): Free dwarf_line_str_buffer.
1309 2017-07-03 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
1311 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove the
1312 abort statement that was put for symbols that are not dynamic.
1314 2017-07-03 Tristan Gingold <gingold@adacore.com>
1316 * po/bfd.pot: Regenerate
1318 2017-07-03 Alan Modra <amodra@gmail.com>
1320 * bfd.c (_doprnt): Rewrite "ll" and "L" modifiers to "I64" for
1321 __MSVCRT__. Support "L" modifier for bfd_vma. Formatting.
1322 * elf.c (setup_group): Use "Lx" to print sh_size.
1323 (_bfd_elf_setup_sections): Remove unnecessary cast and print
1324 unknown section type in hex.
1325 (copy_special_section_fields): Style fix.
1326 (bfd_section_from_shdr): Correct format for sh_link. Use a
1327 common error message for all the variants of unrecognized
1329 (assign_file_positions_for_load_sections): Use "Lx" for lma
1330 adjust error message.
1331 (assign_file_positions_for_non_load_sections): Formatting.
1332 (rewrite_elf_program_header): Formatting. Use "Lx" for
1333 bfd_vma values in error messages.
1334 * elfcode.h (elf_slurp_reloc_table_from_section): Cast
1335 ELF_R_SYM value to type expected by format.
1336 * elflink.c (elf_link_read_relocs_from_section): Use "Lx"
1338 (elf_link_add_object_symbols): Use "Lu" for symbol sizes.
1339 (elf_link_input_bfd): Use "Lx" for r_info.
1340 (bfd_elf_gc_record_vtinherit): Use "Lx" for offset.
1342 2017-07-03 Alan Modra <amodra@gmail.com>
1344 * bfd.c (bfd_scan_vma): Don't use long long unless HAVE_LONG_LONG.
1345 * coff-rs6000.c (FMT20): Handle hosts with 64-bit long and
1346 Microsoft C library variant of long long format specifier.
1347 (PRINT20): Cast value to bfd_uint64_t not long long.
1348 * coffcode.h (coff_print_aux): Use BFD_VMA_FMT.
1349 * coff-x86_64.c (coff_amd64_reloc): Use bfd_uint64_t rather than
1350 long long. Don't cast to bfd_vma.
1351 * elf32-score.c (score3_bfd_getl48): Likewise.
1352 * vms-alpha.c (_bfd_vms_slurp_eisd): Likewise.
1354 2017-07-03 Alan Modra <amodra@gmail.com>
1356 * elf.c (_bfd_elf_print_private_bfd_data): Use BFD_VMA_FMT to
1358 (bfd_elf_print_symbol): Don't cast symbol->flags.
1359 (_bfd_elf_symbol_from_bfd_symbol): Likewise.
1360 * elf32-ppc.c (ppc_elf_begin_write_processing): Correct
1361 _bfd_error_handler argument order.
1362 (ppc_elf_merge_private_bfd_data): Don't cast flags.
1364 2017-07-03 Alan Modra <amodra@gmail.com>
1366 * configure.ac: Invoke AC_CHECK_TYPES for long long. Invoke
1367 AC_TYPE_LONG_DOUBLE.
1368 * configure: Regenerate.
1369 * config.in: Regenerate.
1371 2017-06-29 Andrew Waterman <andrew@sifive.com>
1373 * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Fix TLS copy
1376 2017-06-29 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
1378 * elfxx-sparc.c (allocate_dynrelocs): Don't make a symbol dynamic
1379 unless it is undefined weak.
1380 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Set the flag
1381 relative_reloc to direct non-dynamic symbols to R_SPARC_RELATIVE
1383 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): If symbol
1384 is not dynamic in PIC, abort.
1386 2017-06-29 Jiong Wang <jiong.wang@arm.com>
1389 * elfnn-aarch64.c (elfNN_aarch64_allocate_dynrelocs): Only make
1390 undefined weak symbols into dynamic.
1391 (elfNN_aarch64_final_link_relocate): Generate runtime RELATIVE
1392 relocation for non-dynamic symbols.
1393 (elfNN_aarch64_finish_dynamic_symbol): Add sanity check.
1395 2017-06-29 Jiong Wang <jiong.wang@arm.com>
1397 * elfnn-aarch64.c (aarch64_relocation_aginst_gp_p): New function.
1398 (elfNN_aarch64_final_link_relocate): Delete duplicated code for
1399 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15, BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
1400 BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
1401 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Optimize the
1404 2017-06-29 Andreas Arnez <arnez@linux.vnet.ibm.com>
1406 * elf-bfd.h (elfcore_write_s390_gs_cb): Add prototype.
1407 (elfcore_write_s390_gs_bc): Likewise.
1408 * elf.c (elfcore_grok_s390_gs_cb): New function.
1409 (elfcore_grok_s390_gs_bc): New function.
1410 (elfcore_grok_note): Call them.
1411 (elfcore_write_s390_gs_cb): New function.
1412 (elfcore_write_s390_gs_bc): New function.
1413 (elfcore_write_register_note): Call them.
1415 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
1417 * libbfd.c (_bfd_generic_get_section_contents): Don't call
1418 bfd_get_file_size. Check archive element size.
1419 (_bfd_generic_get_section_contents_in_window): Likewise.
1421 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
1423 * bfd-in2.h: Regenerated.
1424 * bfdio.c (bfd_get_size): Change return type to ufile_ptr.
1425 (bfd_get_file_size): Likewise.
1427 2017-06-28 Maciej W. Rozycki <macro@imgtec.com>
1428 Matthew Fortune <matthew.fortune@imgtec.com>
1430 * archures.c (bfd_mach_mips_interaptiv_mr2): New macro.
1431 * cpu-mips.c (I_interaptiv_mr2): New enum value.
1432 (arch_info_struct): Add "mips:interaptiv-mr2" entry.
1433 * elfxx-mips.c (_bfd_elf_mips_mach) <E_MIPS_MACH_IAMR2>: New
1435 (mips_set_isa_flags) <bfd_mach_mips_interaptiv_mr2>: Likewise.
1436 (bfd_mips_isa_ext) <bfd_mach_mips_interaptiv_mr2>: Likewise.
1437 (print_mips_isa_ext) <AFL_EXT_INTERAPTIV_MR2>: Likewise.
1438 (mips_mach_extensions): Add `bfd_mach_mipsisa32r3' and
1439 `bfd_mach_mips_interaptiv_mr2' entries.
1440 * bfd-in2.h: Regenerate.
1442 2017-06-27 Nick Clifton <nickc@redhat.com>
1444 * tekhex.c (pass_over): Revert accidental conversion of a local
1445 array to a static array.
1447 2017-06-27 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
1450 * elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Adjust
1451 reloc addend if necessary. Adjust diff only if
1452 shrinked_insn_address < end_address.
1454 2017-06-27 Alan Modra <amodra@gmail.com>
1457 * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
1458 (_bfd_generic_get_section_contents_in_window): Likewise.
1460 2017-06-26 Kuan-Lin Chen <rufus@andestech.com>
1462 * elfnn-riscv.c (perform_relocation): Support the new
1463 R_RISCV_32_PCREL relocation.
1464 (riscv_elf_relocate_section): Likewise.
1465 * elfxx-riscv.c (howto_table): Likewise.
1466 (riscv_reloc_map): Likewise.
1467 * bfd-in2.h (BFD_RELOC_RISCV_32_PCREL): New relocation.
1468 * libbfd.h: Regenerate.
1470 2017-06-27 Alan Modra <amodra@gmail.com>
1473 * libbfd.c (_bfd_generic_get_section_contents): Delete abort.
1474 Use unsigned file pointer type, and remove cast.
1475 * libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise.
1476 Add "count", not "sz".
1478 2017-06-26 Pedro Alves <palves@redhat.com>
1481 * libbfd.c (_bfd_generic_get_section_contents): Add "count", not
1484 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
1487 * libbfd.c (_bfd_generic_get_section_contents_in_window): Add
1490 2017-06-26 Maciej W. Rozycki <macro@imgtec.com>
1492 * cpu-mips.c (arch_info_struct): Mark the 4010 32-bit.
1493 * elfxx-mips.c (mips_set_isa_flags) <bfd_mach_mips4010>: Set
1494 E_MIPS_ARCH_2 rather than E_MIPS_ARCH_3 in `e_flags'.
1495 (mips_mach_extensions): Mark `bfd_mach_mips4010' as extending
1496 `bfd_mach_mips6000' rather than `bfd_mach_mips4000'.
1498 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
1501 * compress.c (bfd_get_full_section_contents): Don't check the
1503 * libbfd.c (_bfd_generic_get_section_contents): Check for and
1504 reject a section whose size + offset is greater than the size
1506 (_bfd_generic_get_section_contents_in_window): Likewise.
1508 2017-06-26 Nick Clifton <nickc@redhat.com>
1511 * tekhex.c (getvalue): Check for the source pointer exceeding the
1512 end pointer before the first byte is read.
1514 2017-06-26 Nick Clifton <nickc@redhat.com>
1517 * opncls.c (get_build_id): Check that the section is big enough
1518 to contain the whole note.
1519 * compress.c (bfd_get_full_section_contents): Check for and reject
1520 a section whose size is greater than the size of the entire file.
1521 * elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not
1522 contain a notes section.
1524 2017-06-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1526 * elf64-s390.c (elf_s390_additional_program_headers): Add NULL
1528 (elf_s390_modify_segment_map): Likewise.
1529 (bfd_elf_s390_set_options): Lisewise.
1531 2017-06-26 Alan Modra <amodra@gmail.com>
1533 * elflink.c (_bfd_elf_link_create_dynstrtab): Don't make dynobj
1535 (_bfd_elf_size_group_sections): Skip --just-syms bfds.
1536 (bfd_elf_size_dynamic_sections): Ignore .note.GNU-stack and
1537 .preinit_array on --just-syms bfds.
1538 (_bfd_elf_gc_mark_extra_sections): Skip --just-syms bfds.
1539 (elf_gc_sweep, bfd_elf_parse_eh_frame_entries): Likewise.
1540 (bfd_elf_gc_sections, bfd_elf_discard_info): Likewise.
1542 2017-06-25 Sergei Trofimovich <slyfox@gentoo.org>
1544 * elf.c (find_link): Bounds check "hint".
1546 2017-06-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
1548 * elf32-arm.c (using_thumb_only): Update list of architectures in
1549 BFD_ASSERT for which the logic is valid.
1550 (using_thumb2_bl): Likewise.
1551 (using_thumb2): Likewise and return true for ARMv8-R.
1552 (arch_has_arm_nop): Likewise.
1553 (tag_cpu_arch_combine): New v8r table for ARMv8-R Tag_CPU_arch
1554 merging logic. Update commentis for value 15 of v8m_baseline,
1555 v8m_mainline and v4t_plus_v6_m arrays. Use v8r array to decide
1556 merging of value 15 of Tag_CPU_arch.
1558 2017-06-23 Jiong Wang <jiong.wang@arm.com>
1560 * reloc.c (BFD_RELOC_AARCH64_ADR_GOTPAGE): Rename to
1561 BFD_RELOC_AARCH64_ADR_GOT_PAGE
1562 * bfd-in2.h: Regenerate.
1564 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1566 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Move
1567 the error_alignment label forward. Properly align program
1568 property note section.
1570 2017-06-22 Eric Christopher <echristo@gmail.com>
1572 * elf32-arm.c (elf32_arm_final_link_relocate): Use labs rather than
1573 abs to fix a truncation warning.
1575 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1577 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Resolve
1578 local undefined weak symbol to 0.
1579 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Likewise.
1581 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1583 * elf32-i386.c (elf_i386_merge_gnu_properties): If info->shstk
1584 is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
1585 (elf_i386_link_setup_gnu_properties): If info->shstk is set,
1586 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
1587 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): If
1588 info->shstk is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
1589 (elf_x86_64_link_setup_gnu_properties): If info->shstk is set,
1590 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
1592 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1594 * elf32-i386.c (elf_i386_lazy_ibt_plt0_entry): New.
1595 (elf_i386_lazy_ibt_plt_entry): Likewise.
1596 (elf_i386_pic_lazy_ibt_plt0_entry): Likewise.
1597 (elf_i386_non_lazy_ibt_plt_entry): Likewise.
1598 (elf_i386_pic_non_lazy_ibt_plt_entry): Likewise.
1599 (elf_i386_eh_frame_lazy_ibt_plt): Likewise.
1600 (elf_i386_lazy_plt_layout): Likewise.
1601 (elf_i386_non_lazy_plt_layout): Likewise.
1602 (elf_i386_link_hash_entry): Add plt_second.
1603 (elf_i386_link_hash_table): Add plt_second and
1604 plt_second_eh_frame.
1605 (elf_i386_allocate_dynrelocs): Use the second PLT if needed.
1606 (elf_i386_size_dynamic_sections): Use .plt.got unwind info for
1607 the second PLT. Check the second PLT.
1608 (elf_i386_relocate_section): Use the second PLT to resolve
1609 PLT reference if needed.
1610 (elf_i386_finish_dynamic_symbol): Fill and use the second PLT if
1612 (elf_i386_finish_dynamic_sections): Set sh_entsize on the
1613 second PLT. Generate unwind info for the second PLT.
1614 (elf_i386_plt_type): Add plt_second.
1615 (elf_i386_get_synthetic_symtab): Support the second PLT.
1616 (elf_i386_parse_gnu_properties): Support
1617 GNU_PROPERTY_X86_FEATURE_1_AND.
1618 (elf_i386_merge_gnu_properties): Support
1619 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
1620 on GNU_PROPERTY_X86_FEATURE_1_IBT
1621 (elf_i386_link_setup_gnu_properties): If info->ibt is set,
1622 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
1623 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
1624 is set on all relocatable inputs.
1625 * elf64-x86-64.c (elf_x86_64_lazy_ibt_plt_entry): New.
1626 (elf_x32_lazy_ibt_plt_entry): Likewise.
1627 (elf_x86_64_non_lazy_ibt_plt_entry): Likewise.
1628 (elf_x32_non_lazy_ibt_plt_entry): Likewise.
1629 (elf_x86_64_eh_frame_lazy_ibt_plt): Likewise.
1630 (elf_x32_eh_frame_lazy_ibt_plt): Likewise.
1631 (elf_x86_64_lazy_ibt_plt): Likewise.
1632 (elf_x32_lazy_ibt_plt): Likewise.
1633 (elf_x86_64_non_lazy_ibt_plt): Likewise.
1634 (elf_x32_non_lazy_ibt_plt): Likewise.
1635 (elf_x86_64_get_synthetic_symtab): Support the second PLT.
1636 (elf_x86_64_parse_gnu_properties): Support
1637 GNU_PROPERTY_X86_FEATURE_1_AND.
1638 (elf_x86_64_merge_gnu_properties): Support
1639 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
1640 on GNU_PROPERTY_X86_FEATURE_1_IBT
1641 (elf_x86_64_link_setup_gnu_properties): If info->ibt is set,
1642 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
1643 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
1644 is set on all relocatable inputs.
1646 2017-06-22 Nick Clifton <nickc@redhat.com>
1649 * som.c (setup_sections): NUL terminate the space_strings buffer.
1650 Check that the space.name field does not index beyond the end of
1651 the space_strings buffer.
1653 2017-06-21 Nick Clifton <nickc@redhat.com>
1656 * coff-sh.c (sh_reloc): Check for an out of range reloc.
1658 2017-06-21 Nick Clifton <nickc@redhat.com>
1661 * vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as
1662 type of the size parameter.
1663 (_bfd_vms_save_counted_string): Add second parameter - the maximum
1664 length of the counted string.
1665 * vms.h (_bfd_vms_save_sized_string): Update prototype.
1666 (_bfd_vms_save_counted_string): Likewise.
1667 * vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to
1668 _bfd_vms_save_counted_string.
1669 (_bfd_vms_slurp_ehdr): Likewise.
1670 (_bfd_vms_slurp_egsd): Likewise.
1671 (Parse_module): Likewise.
1673 2017-06-21 Alan Modra <amodra@gmail.com>
1675 * elf64-ppc.c (ppc64_elf_size_stubs): Test for localentry:0 plt
1676 calls before tocsave calls.
1677 (ppc64_elf_relocate_section): Allow localentry:0 plt calls without
1680 2017-06-21 Nick Clifton <nickc@redhat.com>
1683 * reloc.c (bfd_generic_get_relocated_section_contents): Fail if
1684 bfd_get_full_section_contents returns no contents.
1686 2017-06-21 Nick Clifton <nickc@redhat.com>
1689 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized
1692 2017-06-21 Nick Clifton <nickc@redhat.com>
1695 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section
1697 (image_set_ptr): Likewise.
1698 (alpha_vms_fix_sec_rel): Likewise.
1699 (alpha_vms_slurp_relocs): Likewise.
1701 2017-06-21 Nick Clifton <nickc@redhat.com>
1704 * ieee.c (ieee_slurp_sections): Check for a NULL return from
1706 (ieee_archive_p): Likewise.
1707 (ieee_object_p): Likewise.
1709 2017-06-21 Nick Clifton <nickc@redhat.com>
1712 * elf.c (setup_group): Zero the group section pointer list after
1713 allocation so that loops can be caught. Check for NULL pointers
1714 when processing a group list.
1716 2017-06-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1718 * elf-s390.h: New file.
1719 * elf64-s390.c (struct elf_s390_link_hash_table): Add params
1721 (elf_s390_additional_program_headers): New function.
1722 (elf_s390_modify_segment_map): New function.
1723 (bfd_elf_s390_set_options): New function.
1724 (elf_backend_additional_program_headers)
1725 (elf_backend_modify_segment_map): Add macro definitions.
1727 2017-06-19 H.J. Lu <hongjiu.lu@intel.com>
1730 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
1731 the DYNAMIC bit instead of bfd_count_sections.
1733 2017-06-19 Nick Clifton <nickc@redhat.com>
1736 * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record
1738 (evax_bfd_print_eeom): Likewise.
1739 (evax_bfd_print_egsd): Check for an overlarge record length.
1740 (evax_bfd_print_etir): Likewise.
1742 2017-06-19 Nick Clifton <nickc@redhat.com>
1745 * libieee.h (struct common_header_type): Add end_p field.
1746 * ieee.c (this_byte_and_next): Do not advance input_p beyond
1748 (read_id): Check for a length that exceeds the remaining bytes in
1750 (ieee_seek): Initialise end_p.
1751 (ieee_archive_p): Likewise.
1752 (ieee_object_p): Likewise.
1754 2017-06-19 Nick Clifton <nickc@redhat.com>
1757 * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset
1758 before reading the EIHS structure entries.
1760 2017-06-19 Nick Clifton <nickc@redhat.com>
1763 * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for
1764 gsd_size. Check that there are enough bytes remaining to read the
1765 type and size of the next egsd. Check that the size of the egsd
1766 does not exceed the size of the record.
1768 2017-06-19 Alan Modra <amodra@gmail.com>
1770 * config.bfd: Correct targ_underscore for cris.
1772 2017-06-18 Alan Modra <amodra@gmail.com>
1774 * config.bfd: Correct targ_underscore for epiphany, ip2k,
1775 m32c, mn10200, pru, rl78, rx, crisv32 and v850.
1777 2017-06-16 Nick Clifton <nickc@redhat.com>
1779 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
1780 bucketlist is empty because there are no symbols to add to the
1783 2017-06-16 Alan Modra <amodra@gmail.com>
1789 * targets.c (struct bfd_target): Add _bfd_define_start_stop.
1790 (BFD_JUMP_TABLE_LINK): Likewise.
1791 * elf-bfd.h (bfd_elf_define_start_stop): Declare.
1792 * elflink.c (_bfd_elf_gc_mark_rsec): Update comment.
1793 (bfd_elf_define_start_stop): New function.
1794 * linker.c (bfd_generic_define_start_stop): New function.
1795 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init
1797 * aout-adobe.c (aout_32_bfd_define_start_stop): Define.
1798 * aout-target.h (MY_bfd_define_start_stop): Define.
1799 * aout-tic30.c (MY_bfd_define_start_stop): Define.
1800 * binary.c (binary_bfd_define_start_stop): Define.
1801 * bout.c (b_out_bfd_define_start_stop): Define.
1802 * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define.
1803 * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define.
1804 * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define.
1805 * coffcode.h (coff_bfd_define_start_stop): Define.
1806 * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define.
1807 * i386msdos.c (msdos_bfd_define_start_stop): Define.
1808 * i386os9k.c (os9k_bfd_define_start_stop): Define.
1809 * ieee.c (ieee_bfd_define_start_stop): Define.
1810 * ihex.c (ihex_bfd_define_start_stop): Define.
1811 * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define.
1812 * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define.
1813 * mmo.c (mmo_bfd_define_start_stop): Define.
1814 * nlm-target.h (nlm_bfd_define_start_stop): Define.
1815 * oasys.c (oasys_bfd_define_start_stop): Define.
1816 * pef.c (bfd_pef_bfd_define_start_stop): Define.
1817 * plugin.c (bfd_plugin_bfd_define_start_stop): Define.
1818 * ppcboot.c (ppcboot_bfd_define_start_stop): Define.
1819 * som.c (som_bfd_define_start_stop): Define.
1820 * srec.c (srec_bfd_define_start_stop): Define.
1821 * tekhex.c (tekhex_bfd_define_start_stop): Define.
1822 * versados.c (versados_bfd_define_start_stop): Define.
1823 * vms-alpha.c (vms_bfd_define_start_stop): Define.
1824 (alpha_vms_bfd_define_start_stop): Define.
1825 * xsym.c (bfd_sym_bfd_define_start_stop): Define.
1826 * bfd-in2.h: Regenerate.
1827 * libbfd.h: Regenerate.
1829 2017-06-16 Jiong Wang <jiong.wang@arm.com>
1831 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
1832 SYMBOL_REFERENCES_LOCAL.
1834 2017-06-15 Jiong Wang <jiong.wang@arm.com>
1837 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
1838 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
1839 runtime for if there needs copy relocation elimination.
1840 (need_copy_relocation_p): New function. Return true for symbol with
1841 pc-relative references and if it's against read-only sections.
1842 (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
1843 (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
1844 that are related with accessing external objects.
1845 (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change
1846 in elfNN_aarch64_check_relocs.
1848 2017-06-15 Nick Clifton <nickc@redhat.com>
1851 * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
1854 (ieee_archive_p): Likewise.
1856 2017-06-15 Nick Clifton <nickc@redhat.com>
1859 * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
1861 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
1863 * elf32-xtensa.c (elf_xtensa_be_plt_entry,
1864 elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays,
1865 keep both windowed and call0 ABI PLT definitions.
1866 (elf_xtensa_create_plt_entry): Use selected ABI to choose upper
1867 elf_xtensa_*_plt_entry endex.
1868 (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size.
1870 2017-06-14 Nick Clifton <nickc@redhat.com>
1873 * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
1876 2017-06-14 Nick Clifton <nickc@redhat.com>
1879 * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
1880 maximum value for the ascic pointer. Check that name processing
1881 does not read beyond this value.
1882 (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
1885 2017-06-14 Nick Clifton <nickc@redhat.com>
1888 * versados.c (versados_mkobject): Zero the allocated tdata structure.
1889 (process_otr): Check for an invalid offset in the otr structure.
1891 2017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
1893 * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
1895 2017-06-13 H.J. Lu <hongjiu.lu@intel.com>
1901 * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
1902 vtable field to a union.
1903 (_bfd_elf_is_start_stop): Removed.
1904 * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
1905 __start_SECNAME and __stop_SECNAME symbols.
1906 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
1907 * elflink.c (_bfd_elf_is_start_stop): Removed.
1908 (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
1909 _bfd_elf_is_start_stop.
1910 (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
1911 __stop_SECNAME symbols. Updated.
1912 (elf_gc_smash_unused_vtentry_relocs): Likewise.
1913 (bfd_elf_gc_record_vtinherit): Likewise.
1914 (bfd_elf_gc_record_vtentry): Likewise.
1916 2017-06-13 Nick Clifton <nickc@redhat.com>
1919 * elflink.c (elf_link_adjust_relocs): Generate an error when
1920 encountering a reloc against a symbol removed by garbage
1923 2017-06-12 H.J. Lu <hongjiu.lu@intel.com>
1925 * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
1926 to merge_gnu_properties.
1927 * elf-properties.c (elf_merge_gnu_properties): Add struct
1928 bfd_link_info * and pass it to merge_gnu_properties.
1929 (elf_merge_gnu_property_list): Add struct bfd_link_info *
1930 and pass it to elf_merge_gnu_properties.
1931 (_bfd_elf_link_setup_gnu_properties): Pass info to
1932 elf_merge_gnu_property_list.
1933 * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
1935 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
1937 2017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
1940 * binary.c (binary_set_section_contents): Scale lma by octets
1941 per byte to set filepos.
1943 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1945 * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
1948 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1950 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
1953 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1955 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
1956 patched section contents for TLS IE reloc.
1957 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
1959 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1961 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
1962 RELOC_FOR_GLOBAL_SYMBOL macro.
1964 2018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1966 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
1969 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1971 * config/tc-arc.c (md_undefined_symbol): Changed.
1972 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
1974 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1976 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
1979 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1981 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
1982 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
1984 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1986 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
1989 2017-06-08 Richard Earnshaw <rearnsha@arm.com>
1991 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
1992 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
1993 is non-zero. Add clarifying comments.
1995 2017-06-08 H.J. Lu <hongjiu.lu@intel.com>
1997 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
1998 name. Use local IFUNC symbol name string to report unsupported
1999 non-PIC call to IFUNC function.
2000 (elf_i386_relocate_section): Dump local IFUNC name with minfo
2001 when generating R_386_IRELATIVE relocation.
2002 (elf_i386_finish_dynamic_symbol): Likewise.
2003 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
2005 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
2006 when generating R_X86_64_IRELATIVE relocation.
2007 (elf_x86_64_finish_dynamic_symbol): Likewise.
2009 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2011 * elf.c (setup_group): Make sure BFD sections are created for all
2012 group sections in the input file when processing SHF_GROUP
2014 (bfd_section_from_shdr): Avoid duplicating logic already
2015 implemented in `setup_group'.
2017 2017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
2020 * peXXigen.c (pe_print_idata): Use the address of the first thunk
2021 if the hint address is zero.
2023 2017-06-06 James Clarke <jrtc27@jrtc27.com>
2026 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
2027 ELF_COMMON_DEF_P for common symbols.
2029 2017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
2031 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
2032 SEC_GROUP sections as SEC_EXCLUDE.
2033 (bfd_elf_set_group_contents): Replace use of abort with an assert.
2034 (assign_section_numbers): Use resolve_section_groups flag instead
2035 of relocatable link type.
2036 (_bfd_elf_init_private_section_data): Use resolve_section_groups
2037 flag instead of checking the final_link flag for part of the
2038 checks in here. Fix white space as a result.
2039 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
2040 instead of relocatable link type.
2041 (bfd_elf_final_link): Likewise.
2043 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2045 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
2047 * elf32-score.c (score_elf_final_link_relocate): Likewise.
2048 (s3_bfd_score_elf_check_relocs): Likewise.
2049 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
2050 (score_elf_final_link_relocate): Likewise.
2051 (s7_bfd_score_elf_check_relocs): Likewise.
2053 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2055 * elflink.c (init_reloc_cookie_rels): Remove unused variable
2058 2017-06-06 Maciej W. Rozycki <macro@imgtec.com>
2060 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
2061 from `reloc_count' rather than decrementing it.
2062 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
2063 `reloc_count' by `int_rels_per_ext_rel'.
2064 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
2065 `reloc_count' by `int_rels_per_ext_rel' for last relocation
2066 entry determination.
2067 (s3_bfd_score_elf_check_relocs): Likewise.
2068 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
2069 (s7_bfd_score_elf_relocate_section): Likewise.
2070 (s7_bfd_score_elf_check_relocs): Likewise.
2071 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
2072 prototype and function.
2073 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
2074 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
2075 triple rather than once the sum of REL and RELA relocation entry
2077 (bfd_elf64_get_reloc_upper_bound): Remove macro.
2078 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
2079 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
2080 storage allocation size determination.
2081 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
2082 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
2083 by `int_rels_per_ext_rel' for last relocation entry
2085 (bfd_elf_final_link): Do not multiply `reloc_count' by
2086 `int_rels_per_ext_rel' for internal relocation storage
2087 allocation size determination.
2088 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
2089 `int_rels_per_ext_rel' for last relocation entry determination.
2090 (elf_gc_smash_unused_vtentry_relocs): Likewise.
2091 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
2092 (_bfd_mips_elf_relocate_section): Likewise.
2094 2017-06-05 Alan Modra <amodra@gmail.com>
2097 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
2099 2017-06-01 John Baldwin <jhb@FreeBSD.org>
2101 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
2102 determine structure sizes.
2103 (elfcore_grok_freebsd_prstatus): Likewise.
2105 2017-06-01 Alan Modra <amodra@gmail.com>
2107 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
2108 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
2110 (is_elfv2_localentry0): New function.
2111 (ppc64_elf_tls_setup): Default params->plt_localentry0.
2112 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
2113 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
2114 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
2115 optimized localentry:0 stubs.
2116 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
2117 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
2119 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
2121 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
2123 2017-05-30 Casey Smith <clegg89@gmail.com>
2126 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
2127 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
2129 2017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
2131 * cpu-arc.c (arc_compatible): New function.
2133 2017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
2135 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
2137 2017-05-30 H.J. Lu <hongjiu.lu@intel.com>
2140 * bfdio.c (bfd_get_file_size): New function.
2141 * bfd-in2.h: Regenerated.
2143 2017-05-23 Dilian Palauzov <git-dpa@aegee.org>
2145 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
2148 2017-05-22 H.J. Lu <hongjiu.lu@intel.com>
2150 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
2151 dynobj instead of htab->elf.dynobj.
2153 2017-05-19 Maciej W. Rozycki <macro@imgtec.com>
2155 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
2157 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
2158 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
2159 actual number of internal relocations retrieved. Adjust
2160 function description.
2161 (bfd_elf64_canonicalize_reloc): Remove macro.
2162 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
2164 2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
2166 * archures.c (bfd_mach_sparc_v9m8): Define.
2167 (bfd_mach_sparc_v8plusm8): Likewise.
2168 (bfd_mach_sparc_v9_p): Adjust to M8.
2169 (bfd_mach_sparc_64bit_p): Likewise.
2170 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
2171 bfd_mach_sparc_v8plusm8.
2172 * bfd-in2.h: Regenerated.
2173 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
2175 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
2176 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
2177 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
2179 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
2180 bfd_mach_sparc_v8plusm8.
2182 2017-05-19 Alan Modra <amodra@gmail.com>
2184 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
2185 debug and special sections when no non-note alloc sections in an
2188 2017-05-18 Alan Modra <amodra@gmail.com>
2190 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
2191 * elf-m10300.c: Likewise.
2193 * elf32-arc.c: Likewise.
2194 * elf32-bfin.c: Likewise.
2195 * elf32-m68k.c: Likewise.
2196 * elf32-nds32.c: Likewise.
2197 * elf32-tilepro.c: Likewise.
2198 * elflink.c: Likewise.
2199 * elfnn-aarch64.c: Likewise.
2200 * elfnn-riscv.c: Likewise.
2201 * elfxx-tilegx.c: Likewise.
2202 * mach-o.c: Likewise.
2203 * peXXigen.c: Likewise.
2204 * vms-alpha.c: Likewise.
2205 * vms-lib.c: Likewise.
2207 2017-05-17 H.J. Lu <hongjiu.lu@intel.com>
2210 * elflink.c (elf_gc_mark_debug_section): New function.
2211 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
2212 referenced by kept debug sections.
2214 2017-05-16 Alan Modra <amodra@gmail.com>
2216 * elf-m10300.c: Rename occurrences of non_ir_ref.
2217 * elf32-arm.c: Likewise.
2218 * elf32-bfin.c: Likewise.
2219 * elf32-cr16.c: Likewise.
2220 * elf32-cris.c: Likewise.
2221 * elf32-d10v.c: Likewise.
2222 * elf32-dlx.c: Likewise.
2223 * elf32-fr30.c: Likewise.
2224 * elf32-frv.c: Likewise.
2225 * elf32-hppa.c: Likewise.
2226 * elf32-i370.c: Likewise.
2227 * elf32-i386.c: Likewise.
2228 * elf32-iq2000.c: Likewise.
2229 * elf32-lm32.c: Likewise.
2230 * elf32-m32c.c: Likewise.
2231 * elf32-m32r.c: Likewise.
2232 * elf32-m68hc1x.c: Likewise.
2233 * elf32-m68k.c: Likewise.
2234 * elf32-mcore.c: Likewise.
2235 * elf32-metag.c: Likewise.
2236 * elf32-microblaze.c: Likewise.
2237 * elf32-moxie.c: Likewise.
2238 * elf32-msp430.c: Likewise.
2239 * elf32-mt.c: Likewise.
2240 * elf32-nios2.c: Likewise.
2241 * elf32-or1k.c: Likewise.
2242 * elf32-ppc.c: Likewise.
2243 * elf32-rl78.c: Likewise.
2244 * elf32-s390.c: Likewise.
2245 * elf32-score.c: Likewise.
2246 * elf32-score7.c: Likewise.
2247 * elf32-sh.c: Likewise.
2248 * elf32-tic6x.c: Likewise.
2249 * elf32-tilepro.c: Likewise.
2250 * elf32-v850.c: Likewise.
2251 * elf32-vax.c: Likewise.
2252 * elf32-xstormy16.c: Likewise.
2253 * elf32-xtensa.c: Likewise.
2254 * elf64-alpha.c: Likewise.
2255 * elf64-hppa.c: Likewise.
2256 * elf64-ia64-vms.c: Likewise.
2257 * elf64-mmix.c: Likewise.
2258 * elf64-ppc.c: Likewise.
2259 * elf64-s390.c: Likewise.
2260 * elf64-sh64.c: Likewise.
2261 * elf64-x86-64.c: Likewise.
2262 * elflink.c: Likewise.
2263 * elfnn-aarch64.c: Likewise.
2264 * elfnn-ia64.c: Likewise.
2265 * elfnn-riscv.c: Likewise.
2266 * elfxx-mips.c: Likewise.
2267 * elfxx-sparc.c: Likewise.
2268 * elfxx-tilegx.c: Likewise.
2269 * linker.c: Likewise.
2271 2017-05-16 Alan Modra <amodra@gmail.com>
2273 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
2274 * elflink.c (elf_link_add_object_symbols): Update to use
2276 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
2278 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
2280 2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
2282 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
2284 2017-05-12 H.J. Lu <hongjiu.lu@intel.com>
2286 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
2287 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
2289 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
2291 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
2293 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
2295 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
2296 to plt_second/plt_second_eh_frame.
2297 (elf_x86_64_link_hash_newfunc): Updated.
2298 (elf_x86_64_allocate_dynrelocs): Likewise.
2299 (elf_x86_64_size_dynamic_sections): Likewise.
2300 (elf_x86_64_relocate_section): Likewise.
2301 (elf_x86_64_finish_dynamic_symbol): Likewise.
2302 (elf_x86_64_finish_dynamic_sections): Likewise.
2303 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
2304 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
2306 (elf_backend_setup_gnu_properties): Updated. Create the
2307 .plt.sec section instead of the .plt.sec section.
2309 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
2311 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
2312 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
2313 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
2315 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
2317 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
2318 (bfd_elf64_set_reloc): Define.
2319 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
2321 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
2323 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
2324 (struct bfd_target): New field _bfd_set_reloc.
2325 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
2326 * reloc.c (_bfd_generic_set_reloc): New function.
2327 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
2328 * nlm-target.h (nlm_set_reloc): Likewise.
2329 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
2330 * aout-tic30.c (MY_set_reloc): Likewise.
2331 * aout-target.h (MY_set_reloc): Likewise.
2332 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
2333 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
2334 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
2335 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
2336 * aout-adobe.c (aout_32_set_reloc): Likewise.
2337 * bout.c (b_out_set_reloc): Likewise.
2338 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
2339 * i386os9k.c (aout_32_set_reloc): Likewise.
2340 * ieee.c (ieee_set_reloc): Likewise.
2341 * oasys.c (oasys_set_reloc): Likewise.
2342 * som.c (som_set_reloc): Likewise.
2343 * versados.c (versados_set_reloc): Likewise.
2344 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
2345 _bfd_generic_set_reloc.
2346 (rs6000_xcoff64_aix_vec): LIkewise.
2347 * libbfd.c (_bfd_norelocs_set_reloc): New function.
2348 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
2349 * i386msdos.c (msdos_set_reloc): Define to
2350 _bfd_norelocs_set_reloc.
2351 * elfcode.h (elf_set_reloc): Define.
2352 * bfd-in2.h: Regenerated.
2354 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
2357 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
2358 for IFUNC function address.
2360 2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
2362 * elf32-arc.c (FEATURE_LIST_NAME): Define.
2363 (CONFLICT_LIST): Likewise.
2364 (opcode/arc-attrs.h): Include.
2365 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
2366 (arc_extract_features): New file.
2367 (arc_stralloc): Likewise.
2368 (arc_elf_merge_attributes): Likewise.
2369 (arc_elf_merge_private_bfd_data): Use object attributes.
2370 (bfd_arc_get_mach_from_attributes): New function.
2371 (arc_elf_object_p): Use object attributes.
2372 (arc_elf_final_write_processing): Likewise.
2373 (elf32_arc_obj_attrs_arg_type): New function.
2374 (elf32_arc_obj_attrs_handle_unknown): Likewise.
2375 (elf32_arc_section_from_shdr): Likewise.
2376 (elf_backend_obj_attrs_vendor): Define.
2377 (elf_backend_obj_attrs_section): Likewise.
2378 (elf_backend_obj_attrs_arg_type): Likewise.
2379 (elf_backend_obj_attrs_section_type): Likewise.
2380 (elf_backend_obj_attrs_handle_unknown): Likewise.
2381 (elf_backend_section_from_shdr): Likewise.
2383 2017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
2386 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
2387 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
2388 and the destination is a Thumb symbol.
2390 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2392 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
2393 initializer to silence GCC 4.2.
2394 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
2396 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2398 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
2399 (LAZY_PLT_ENTRY_SIZE): This.
2400 (NON_LAZY_PLT_ENTRY_SIZE): New.
2401 (elf_x86_64_plt0_entry): Renamed to ...
2402 (elf_x86_64_lazy_plt0_entry): This.
2403 (elf_x86_64_plt_entry): Renamed to ...
2404 (elf_x86_64_lazy_plt_entry): This.
2405 (elf_x86_64_bnd_plt0_entry): Renamed to ...
2406 (elf_x86_64_lazy_bnd_plt0_entry): This.
2407 (elf_x86_64_legacy_plt_entry): Removed.
2408 (elf_x86_64_bnd_plt_entry): Renamed to ...
2409 (elf_x86_64_lazy_bnd_plt_entry): This.
2410 (elf_x86_64_legacy_plt2_entry): Renamed to ...
2411 (elf_x86_64_non_lazy_plt_entry): This.
2412 (elf_x86_64_bnd_plt2_entry): Renamed to ...
2413 (elf_x86_64_non_lazy_bnd_plt_entry): This.
2414 (elf_x86_64_eh_frame_plt): Renamed to ...
2415 (elf_x86_64_eh_frame_lazy_plt): This.
2416 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
2417 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
2418 (elf_x86_64_eh_frame_plt_got): Renamed to ...
2419 (elf_x86_64_eh_frame_non_lazy_plt): This.
2420 (elf_x86_64_lazy_plt_layout): New.
2421 (elf_x86_64_non_lazy_plt_layout): Likewise.
2422 (elf_x86_64_plt_layout): Likewise.
2423 (elf_x86_64_backend_data): Remove PLT layout information. Add
2424 os for target system.
2425 (GET_PLT_ENTRY_SIZE): Removed.
2426 (elf_x86_64_lazy_plt): New.
2427 (elf_x86_64_non_lazy_plt): Likewise.
2428 (elf_x86_64_lazy_bnd_plt): Likewise.
2429 (elf_x86_64_non_lazy_bnd_plt): Likewise.
2430 (elf_x86-64_arch_bed): Updated.
2431 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
2432 (elf_x86_64_create_dynamic_sections): Removed.
2433 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
2434 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
2435 (elf_x86-64_adjust_dynamic_symbol): Updated.
2436 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
2437 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
2438 size for PLT0 if there is no PLT0. Get plt_entry_size from
2439 non_lazy_plt for non-lazy PLT entries.
2440 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
2441 from non_lazy_plt for non-lazy PLT entries.
2442 (elf_x86-64_relocate_section): Updated. Properly get PLT index
2443 if there is no PLT0.
2444 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
2445 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
2446 entries with non-lazy PLT layout. Don't fill the second and third
2447 slots in the PLT entry if there is no PLT0.
2448 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
2449 if there is no PLT0. Set sh_entsize on the .plt.got section.
2450 (compare_relocs): New.
2451 (elf_x86_64_plt_type): Likewise.
2452 (elf_x86_64_plt): Likewise.
2453 (elf_x86_64_nacl_plt): New. Forward declaration.
2454 (elf_x86_64_get_plt_sym_val): Removed.
2455 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
2456 against all dynamic relocations.
2457 (elf_x86_64_link_setup_gnu_properties): New function.
2458 (elf_backend_create_dynamic_sections): Updated.
2459 (elf_backend_setup_gnu_properties): New.
2460 (elf_x86_64_nacl_plt): New.
2461 (elf_x86_64_nacl_arch_bed): Updated.
2463 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2465 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
2466 (LAZY_PLT_ENTRY_SIZE): This.
2467 (NON_LAZY_PLT_ENTRY_SIZE): New.
2468 (elf_i386_plt0_entry): Renamed to ...
2469 (elf_i386_lazy_plt0_entry): This.
2470 (elf_i386_plt_entry): Renamed to ...
2471 (elf_i386_lazy_plt_entry): This.
2472 (elf_i386_pic_plt0_entry): Renamed to ...
2473 (elf_i386_pic_lazy_plt0_entry): This.
2474 (elf_i386_pic_plt_entry): Renamed to ...
2475 (elf_i386_pic_lazy_plt_entry): This.
2476 (elf_i386_got_plt_entry): Renamed to ...
2477 (elf_i386_non_lazy_plt_entry): This.
2478 (elf_i386_pic_got_plt_entry): Renamed to ...
2479 (elf_i386_pic_non_lazy_plt_entry): This.
2480 (elf_i386_eh_frame_plt): Renamed to ...
2481 (elf_i386_eh_frame_lazy_plt): This.
2482 (elf_i386_eh_frame_plt_got): Renamed to ...
2483 (elf_i386_eh_frame_non_lazy_plt): This.
2484 (elf_i386_plt_layout): Renamed to ...
2485 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
2486 eh_frame_plt_got_size.
2487 (elf_i386_non_lazy_plt_layout): New.
2488 (elf_i386_plt_layout): Likewise.
2489 (elf_i386_non_lazy_plt): Likewise.
2490 (GET_PLT_ENTRY_SIZE): Removed.
2491 (elf_i386_plt): Renamed to ...
2492 (elf_i386_lazy_plt): This.
2493 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
2494 (elf_i386_arch_bed): Updated.
2495 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
2496 (elf_i386_create_dynamic_sections): Removed.
2497 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
2498 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
2499 (elf_i386_adjust_dynamic_symbol): Updated.
2500 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
2501 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
2502 size for PLT0 if there is no PLT0.
2503 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
2504 output section is discarded only if GOT isn't empty.
2505 (elf_i386_relocate_section): Updated. Properly get PLT index
2506 if there is no PLT0.
2507 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
2508 second and third slots in the PLT entry if there is no PLT0.
2509 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
2510 if there is no PLT0. Set sh_entsize on the .plt.got section.
2511 (elf_i386_nacl_plt): Forward declaration.
2512 (elf_i386_get_plt_sym_val): Removed.
2513 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
2514 against all dynamic relocations.
2515 (elf_i386_link_setup_gnu_properties): New function.
2516 (elf_backend_create_dynamic_sections): Updated.
2517 (elf_backend_setup_gnu_properties): New.
2518 (elf_i386_nacl_plt): Updated.
2519 (elf_i386_nacl_arch_bed): Likewise.
2520 (elf_i386_vxworks_arch_bed): Likewise.
2522 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
2524 * elflink.c (elf_output_implib): Remove executable flag from import
2526 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
2527 library is a relocatable object file.
2529 2017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
2532 * elf32-avr.c (avr_should_move_sym): New function.
2533 (avr_should_reduce_sym_size): Likewise.
2534 (avr_should_increase_sym_size): Likewise.
2535 (elf32_avr_relax_delete_bytes): Adjust symbol values
2536 and sizes by calling new functions.
2538 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
2540 * config.bfd (riscv32-*): Enable rv64.
2542 2017-05-02 Alan Modra <amodra@gmail.com>
2545 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
2546 rather than h->root.type == bfd_link_hash_new.
2547 (bfd_elf_record_link_assignment): Similarly, call
2548 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
2550 2017-04-29 Alan Modra <amodra@gmail.com>
2553 * reloc.c (reloc_offset_in_range): New function.
2554 (bfd_perform_relocation, bfd_install_relocation): Use it.
2555 (_bfd_final_link_relocate): Likewise.
2557 2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
2559 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
2560 before using .plt.got.
2561 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
2563 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2565 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
2566 instead of "+=" to update 0.
2568 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2570 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
2571 .plt.got section here.
2572 (elf_i386_check_relocs): Don't create the .plt.got section.
2573 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
2574 the .plt.got and .plt.bnd sections here.
2575 (elf_x86_64_check_relocs): Don't create the .plt.got nor
2578 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2580 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
2582 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
2583 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
2584 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
2585 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
2588 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2590 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
2592 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
2593 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
2594 the first relocatable ELF input with GNU properties.
2596 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2598 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
2599 VxWorks for non-PIC.
2601 2017-04-27 Alan Modra <amodra@gmail.com>
2603 * elf-bfd.h (struct elf_backend_data): Make asection param of
2604 elf_backend_eh_frame_address_size const.
2605 (_bfd_elf_eh_frame_address_size): Likewise.
2606 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
2607 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
2608 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
2609 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
2610 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
2611 (next_cie_fde_offset): Constify params.
2612 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
2614 2017-04-27 Alan Modra <amodra@gmail.com>
2616 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
2617 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
2618 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
2620 (offset_adjust): New function.
2621 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
2622 (adjust_eh_frame_local_symbols): Likewise.
2623 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
2624 after changing anything. Return true if anything changed.
2625 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
2626 _bfd_elf_adjust_eh_frame_global_symbol for globals.
2628 2017-04-27 Alan Modra <amodra@gmail.com>
2630 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
2633 2017-04-27 Alan Modra <amodra@gmail.com>
2635 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
2636 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
2637 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
2638 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
2639 for undef and undefweak dyn_relocs.
2640 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
2641 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
2642 (allocate_got, allocate_dynrelocs): Likewise.
2643 (ppc64_elf_relocate_section): Likewise.
2645 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
2647 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
2648 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
2649 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
2650 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
2652 2017-04-26 Nick Clifton <nickc@redhat.com>
2655 * reloc.c (bfd_perform_relocation): Check for a negative address
2658 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
2661 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
2663 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
2664 (elf_backend_always_renumber_dynsyms): Define.
2665 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
2666 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
2667 * elflink.c (bfd_elf_size_dynamic_sections): Also call
2668 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
2670 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
2672 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
2674 * elflink.c (bfd_elf_size_dynamic_sections): Only call
2675 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
2676 sections have been created.
2678 2017-04-26 Nick Clifton <nickc@redhat.com>
2681 * compress.c (bfd_init_section_compress_status): Check the return
2682 value from bfd_malloc.
2684 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
2686 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
2687 no_finish_dynamic_symbol.
2688 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
2690 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
2691 weak symbol, don't make it dynamic.
2692 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
2693 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
2694 relocation for GOT reference.
2695 (elf_x86_64_finish_dynamic_symbol): Abort if
2696 no_finish_dynamic_symbol isn't 0.
2698 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
2701 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
2702 undefined weak symbol, don't make it dynamic.
2703 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
2704 set no_finish_dynamic_symbol and generate R_386_RELATIVE
2705 relocation for R_386_GOT32.
2707 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
2710 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
2712 2017-04-23 Alan Modra <amodra@gmail.com>
2715 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
2716 * elf.c (lcomm_sym): New.
2717 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
2718 * bfd-in2.h: Regenerate.
2720 2017-04-23 Alan Modra <amodra@gmail.com>
2723 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
2724 parameters and comment.
2725 (_bfd_elf_get_reloc_section): Delete.
2726 (_bfd_elf_plt_get_reloc_section): Declare.
2727 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
2728 New functions. Don't blindly skip over assumed .rel/.rela prefix.
2730 (_bfd_elf_get_reloc_section): ..here. Delete.
2731 (assign_section_numbers): Call elf_get_reloc_section.
2732 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
2733 * elfxx-target.h (elf_backend_get_reloc_section): Update.
2735 2017-04-23 Alan Modra <amodra@gmail.com>
2738 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
2741 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
2744 * elf32-i386.c (elf_i386_link_hash_entry): Add
2745 no_finish_dynamic_symbol.
2746 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
2747 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
2748 symbol, don't make it dynamic in PIE.
2749 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
2750 set no_finish_dynamic_symbol and generate R_386_RELATIVE
2751 relocation for R_386_GOT32
2752 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
2755 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
2759 * elflink.c (elf_link_add_object_symbols): Require
2760 --no-dynamic-linker with -E/--dynamic-list when creating
2763 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
2765 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
2768 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
2770 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
2771 dynamic symbol sorting.
2773 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
2776 * elflink.c (elf_link_add_object_symbols): Preserve
2777 dynamic_ref_after_ir_def when restoring the symbol table for
2778 unneeded dynamic object.
2780 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
2783 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
2784 on on undefined IFUNC symbol in the second PLT.
2786 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
2788 * peXXigen.c (pe_print_reloc): Correct chunk_end.
2790 2017-04-19 Alan Modra <amodra@gmail.com>
2792 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
2793 or make dynamic for info->dynamic_undefined_weak 0 and 1.
2794 * elf32-ppc.c:Formatting.
2795 (ensure_undefweak_dynamic): Don't make dynamic when
2796 info->dynamic_undefined_weak is zero.
2797 (allocate_dynrelocs): Discard undefweak dyn_relocs for
2798 info->dynamic_undefined_weak. Discard undef dyn_relocs when
2799 not default visibility. Discard undef and undefweak
2801 (ppc_elf_relocate_section): Adjust to suit.
2802 * elf64-ppc.c: Formatting.
2803 (ensure_undefweak_dynamic): Don't make dynamic when
2804 info->dynamic_undefined_weak is zero.
2805 (allocate_dynrelocs): Discard undefweak dyn_relocs for
2806 info->dynamic_undefined_weak. Discard them earlier.
2808 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
2811 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
2812 before generating the version definition section.
2814 2017-04-17 Alan Modra <amodra@gmail.com>
2816 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
2817 state when a regular object file defines a symbol with
2818 incompatible type to that defined by an earlier shared lib.
2820 2017-04-13 Alan Modra <amodra@gmail.com>
2822 * coffcode.h: Wrap some overly long _bfd_error_handler args.
2824 * elf32-arm.c: Likewise.
2825 * elf32-i386.c: Likewise.
2826 * elf32-mep.c: Likewise.
2827 * elf64-ia64-vms.c: Likewise.
2828 * elf64-x86-64.c: Likewise.
2829 * elflink.c: Likewise.
2830 * elfnn-ia64.c: Likewise.
2831 * elfxx-mips.c: Likewise.
2833 2017-04-13 Alan Modra <amodra@gmail.com>
2835 * aoutx.h: Use %B and %A in error messages throughout file.
2836 * aout-cris.c: Likewise.
2837 * archive.c: Likewise.
2838 * binary.c: Likewise.
2839 * coff-rs6000.c: Likewise.
2840 * coff-tic4x.c: Likewise.
2841 * coffcode.h: Likewise.
2842 * coffgen.c: Likewise.
2843 * cofflink.c: Likewise.
2844 * coffswap.h: Likewise.
2845 * cpu-arm.c: Likewise.
2846 * elf-eh-frame.c: Likewise.
2847 * elf-m10300.c: Likewise.
2849 * elf32-arc.c: Likewise.
2850 * elf32-arm.c: Likewise.
2851 * elf32-bfin.c: Likewise.
2852 * elf32-frv.c: Likewise.
2853 * elf32-iq2000.c: Likewise.
2854 * elf32-m32c.c: Likewise.
2855 * elf32-microblaze.c: Likewise.
2856 * elf32-nds32.c: Likewise.
2857 * elf32-rl78.c: Likewise.
2858 * elf32-rx.c: Likewise.
2859 * elf32-score.c: Likewise.
2860 * elf32-score7.c: Likewise.
2861 * elf32-sh64.c: Likewise.
2862 * elf32-v850.c: Likewise.
2863 * elf32-vax.c: Likewise.
2864 * elf32-visium.c: Likewise.
2865 * elf64-ia64-vms.c: Likewise.
2866 * elf64-mmix.c: Likewise.
2867 * elf64-sh64.c: Likewise.
2868 * elfcode.h: Likewise.
2869 * elfnn-aarch64.c: Likewise.
2870 * elfnn-ia64.c: Likewise.
2871 * elfxx-mips.c: Likewise.
2872 * hpux-core.c: Likewise.
2875 * linker.c: Likewise.
2876 * merge.c: Likewise.
2878 * oasys.c: Likewise.
2879 * pdp11.c: Likewise.
2880 * peXXigen.c: Likewise.
2881 * rs6000-core.c: Likewise.
2882 * vms-alpha.c: Likewise.
2883 * xcofflink.c: Likewise.
2885 2017-04-13 Alan Modra <amodra@gmail.com>
2887 * bfd.c (PRINT_TYPE): Define.
2888 (_doprnt): New function.
2889 (error_handler_internal): Use _doprnt.
2890 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
2891 calls in their natural order, throughout file.
2892 * coff-mcore.c: Likewise.
2893 * coff-ppc.c: Likewise.
2894 * coff-tic80.c: Likewise.
2895 * cofflink.c: Likewise.
2896 * elf-s390-common.c: Likewise.
2898 * elf32-arm.c: Likewise.
2899 * elf32-i386.c: Likewise.
2900 * elf32-m32r.c: Likewise.
2901 * elf32-msp430.c: Likewise.
2902 * elf32-spu.c: Likewise.
2903 * elf64-ia64-vms.c: Likewise.
2904 * elf64-sparc.c: Likewise.
2905 * elf64-x86-64.c: Likewise.
2906 * elflink.c: Likewise.
2907 * elfnn-aarch64.c: Likewise.
2908 * elfnn-ia64.c: Likewise.
2909 * elfxx-mips.c: Likewise.
2911 2017-04-13 Alan Modra <amodra@gmail.com>
2913 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
2914 branch veneers" error. Fix double space and format message.
2915 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
2916 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
2918 2017-04-13 Alan Modra <amodra@gmail.com>
2920 * bfd-in2.h: Regenerate.
2922 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
2924 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
2925 extra `\n' in warning/error messages.
2926 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
2927 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
2929 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
2931 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
2932 processor-specific properties with generic ELF target vector.
2934 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
2936 * elf32-sparc.c (elf_backend_fixup_symbol): New.
2937 * elf64-sparc.c (elf_backend_fixup_symbol): New.
2938 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
2939 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
2941 (link_hash_newfunc): Initialize has_got_reloc and
2943 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
2945 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
2947 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
2949 (_bfd_sparc_elf_fixup_symbol): New function.
2950 (allocate_dynrelocs): Don't allocate space for dynamic
2951 relocations and discard relocations against resolved undefined
2952 weak symbols in executable. Don't make resolved undefined weak
2953 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
2954 relocation against undefined weak symbols in PIE.
2955 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
2956 relocations against resolved undefined weak symbols in PIE
2957 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
2958 without ynamic PLT/GOT relocations for resolved undefined weak
2960 Don't generate dynamic relocation against resolved undefined
2961 weak symbol in executable.
2962 (pie_finish_undefweak_symbol): New function.
2963 (_bfd_sparc_elf_finish_dynamic_sections): Call
2964 pie_finish_undefweak_symbol on all symbols in PIE.
2965 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
2966 (_bfd_sparc_elf_fixup_symbol): New function.
2968 2017-04-10 Nick Clifton <nickc@redhat.com>
2970 * config.bfd: Remove ns32k from obsolete list.
2972 2017-04-10 Alan Modra <amodra@gmail.com>
2975 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
2976 (special_sections_i): Likewise for .init_array.
2977 (special_sections_p): Likewise for .preinit_array.
2979 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
2983 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
2984 ELF_COMMON_DEF_P for common symbols.
2985 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
2986 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
2987 * elflink.c (_bfd_elf_merge_symbol): Revert commits
2988 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
2989 07492f668d2173da7a2bda3707ff0985e0f460b6.
2991 2017-04-07 Pedro Alves <palves@redhat.com>
2993 * opncls.c (bfd_get_debug_link_info): Rename to...
2994 (bfd_get_debug_link_info_1): ... this. Change type of second
2995 parameter to void pointer. Adjust.
2996 (bfd_get_debug_link_info): Reimplement on top of
2997 bfd_get_debug_link_info_1.
2998 (separate_debug_file_exists, separate_alt_debug_file_exists):
2999 Change type of second parameter to void pointer. Adjust.
3000 (get_func_type, check_func_type): Change type of second parameter
3002 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
3003 the callback functions instead of passing the address of a local.
3004 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
3005 find_separate_debug_file.
3006 (get_alt_debug_link_info_shim): Change type of second parameter to
3007 void pointer. Adjust.
3008 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
3009 find_separate_debug_file.
3010 (get_build_id_name, bfd_boolean check_build_id_file): Change type
3011 of second parameter to void pointer. Adjust.
3012 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
3013 pointer local to find_separate_debug_file.
3015 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
3017 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
3018 external symbols with a definition.
3019 (_bfd_coff_gc_mark_extra_sections): Fix typo.
3021 2017-04-07 Alan Modra <amodra@gmail.com>
3023 * po/SRC-POTFILES.in: Regenerate.
3025 2017-04-05 Alan Modra <amodra@gmail.com>
3027 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
3030 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
3032 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
3033 numbers for DataDirectory entry indicies passed to
3036 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
3038 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
3039 each GNU_MBIND section and align GNU_MBIND section to page size.
3040 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
3041 segment for each GNU_MBIND section.
3042 (_bfd_elf_init_private_section_data): Copy sh_info from input
3043 for GNU_MBIND section.
3045 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
3047 * elfnn-riscv.c (GP_NAME): Delete.
3048 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
3049 (_bfd_riscv_relax_lui): Likewise.
3051 2017-04-04 Nick Clifton <nickc@redhat.com>
3054 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
3056 (bfd_elf_final_link): Only initialize the extended symbol index
3057 section if there are extended symbol tables to list.
3059 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
3061 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
3062 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
3063 * configure.ac (elf): Add elf-properties.lo.
3064 * Makefile.in: Regenerated.
3065 * configure: Likewise.
3066 * elf-bfd.h (elf_property_kind): New.
3067 (elf_property): Likewise.
3068 (elf_property_list): Likewise.
3069 (elf_properties): Likewise.
3070 (_bfd_elf_parse_gnu_properties): Likewise.
3071 (_bfd_elf_get_property): Likewise.
3072 (_bfd_elf_link_setup_gnu_properties): Likewise.
3073 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
3074 and setup_gnu_properties.
3075 (elf_obj_tdata): Add properties.
3076 * elf-properties.c: New file.
3077 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
3078 (elf_i386_merge_gnu_properties): Likewise.
3079 (elf_backend_parse_gnu_properties): Likewise.
3080 (elf_backend_merge_gnu_properties): Likewise.
3081 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3082 (elf_x86_64_merge_gnu_properties): Likewise.
3083 (elf_backend_parse_gnu_properties): Likewise.
3084 (elf_backend_merge_gnu_properties): Likewise.
3085 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
3086 (elf_backend_parse_gnu_properties): Likewise.
3087 (elf_backend_setup_gnu_properties): Likewise.
3088 (elfNN_bed): Add elf_backend_parse_gnu_properties,
3089 elf_backend_merge_gnu_properties and
3090 elf_backend_setup_gnu_properties.
3092 2017-03-30 Pip Cet <pipcet@gmail.com>
3094 * elf32-wasm32.c: Add relocation code, two relocs.
3095 * reloc.c: Add wasm32 relocations.
3096 * libbfd.h: Regenerate.
3097 * bfd-in2.h: Regenerate.
3098 * bfd/po/bfd.pot: Regenerate.
3100 2017-03-29 Nick Clifton <nickc@redhat.com>
3103 * coff-bfd.h (struct coff_section_data): Add new fields:
3104 saved_bias and bias.
3105 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
3106 computed for PE binaries.
3107 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
3110 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
3113 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
3114 to handle a local symbol with a hash-symbol-entry; without PLT.
3115 Add BFD_ASSERT for an incidental case with GOT entry present.
3116 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
3117 isn't forced-or-set local.
3119 2017-03-27 Pip Cet <pipcet@gmail.com>
3121 * wasm-module.c: New file to support WebAssembly modules.
3122 * wasm-module.h: New file to support WebAssembly modules.
3123 * doc/webassembly.texi: Start documenting wasm-module.c.
3124 * config.bfd: Add wasm_vec.
3125 * targets.c: Likewise.
3126 * configure.ac: Likewise.
3127 * Makefile.am: Add entries for wasm-module.c.
3128 * Makefile.in: Regenerate.
3129 * configure: Regenerate.
3130 * po/SRC-POTFILES.in: Regenerate.
3132 2017-03-27 Pip Cet <pipcet@gmail.com>
3134 * cpu-wasm32.c: New file to support wasm32 architecture.
3135 * elf32-wasm32.c: New file to support wasm32 architecture.
3136 * Makefile.am: Add wasm32 architecture.
3137 * archures.c: Likewise.
3138 * config.bfd: Likewise.
3139 * configure.ac: Likewise.
3140 * targets.c: Likewise.
3141 * Makefile.in: Regenerate.
3142 * bfd-in2.h: Regenerate.
3143 * configure: Regenerate.
3144 * po/SRC-POTFILES.in: Regenerate.
3146 2017-03-20 Alan Modra <amodra@gmail.com>
3149 * elf64-ppc.c (compare_symbols): Stabilize sort.
3151 2017-03-18 Alan Modra <amodra@gmail.com>
3153 * elf64-ppc.c (struct ppc_link_hash_table): Add
3154 local_ifunc_resolver and maybe_local_ifunc_resolver.
3155 (ppc_build_one_stub): Set flags on emitting dynamic
3156 relocation to ifunc.
3157 (ppc64_elf_relocate_section): Likewise.
3158 (ppc64_elf_finish_dynamic_symbol): Likewise.
3159 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
3160 local dynamic relocs to ifuncs.
3161 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
3162 local_ifunc_resolver and maybe_local_ifunc_resolver.
3163 (ppc_elf_relocate_section): Set flag on emitting dynamic
3164 relocation to ifuncs.
3165 (ppc_elf_finish_dynamic_symbol): Likewise.
3166 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
3167 dynamic relocs to ifuncs.
3169 2017-03-13 Nick Clifton <nickc@redhat.com>
3172 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
3173 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
3174 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
3175 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
3176 * bfd-in2.h: Regenerate.
3177 * libbfd.h: Regenerate.
3178 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
3180 (IS_AARCH64_TLSDESC_RELOC): Likewise.
3181 (elfNN_aarch64_howto_table): Likewise.
3182 (aarch64_tls_transition_without_check): Likewise.
3183 (aarch64_reloc_got_type): Likewise.
3184 (elfNN_aarch64_final_link_relocate): Likewise.
3185 (elfNN_aarch64_tls_relax): Likewise.
3186 (elfNN_aarch64_relocate_section): Likewise.
3187 (elfNN_aarch64_gc_sweep_hook): Likewise.
3188 (elfNN_aarch64_check_relocs): Likewise.
3189 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
3190 (_bfd_aarch64_elf_resolve_relocation): Likewise.
3192 2017-03-11 Alan Modra <amodra@gmail.com>
3194 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
3195 parameter is in fact used. Whitespace fixes.
3196 * elf64-ppc.c: Likewise.
3198 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
3200 * rs6000-core.c (CORE_NEW): Simplify macro when
3201 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
3203 2017-03-07 Alan Modra <amodra@gmail.com>
3207 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
3210 2017-03-05 Alan Modra <amodra@gmail.com>
3212 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
3213 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
3214 (next_cie_fde_offset): New function.
3215 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
3216 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
3217 four bytes. Align CIEs to four or eight bytes depending on
3218 per_encoding_aligned8. Align FDEs according to their encoding.
3219 Pad last FDE to output section alignment.
3220 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
3222 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
3223 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
3224 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
3226 2017-03-02 Martin Bickel <binutils@ineranves.de>
3229 * elf.c (rewrite_elf_program_header): Do not issue a warning for
3230 empty segments which have a zero filesz, but a non-zero memsz.
3232 2017-03-02 Alan Modra <amodra@gmail.com>
3234 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
3236 2017-02-28 Alan Modra <amodra@gmail.com>
3238 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
3239 (ppc64_elf_relocate_section): Likewise.
3241 2017-02-28 Alan Modra <amodra@gmail.com>
3244 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
3245 rather than elf32_nios2_hash_table or elf_hash_table.
3246 (create_got_section): Likewise.
3247 (nios2_elf32_finish_dynamic_symbol): Likewise.
3248 (nios2_elf32_adjust_dynamic_symbol): Likewise.
3249 (nios2_elf32_size_dynamic_sections): Likewise.
3250 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
3251 vars. Use htab equivalents directly instead. Don't create
3252 all dynamic sections on needing just the GOT. Use a goto
3253 rather than a fall-through with reloc test. Ensure
3254 htab->dynobj is set when making dynamic sreloc section.
3255 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
3256 equivalent directly instead. Don't segfault on looking for
3257 .dynamic when dynamic sections have not been created. Don't
3258 segfault on .got.plt being discarded.
3259 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
3260 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
3261 fixme and another not so relevant comment.
3262 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
3263 already set, set hash table dynobj on creating .sbss.
3265 2017-02-28 Alan Modra <amodra@gmail.com>
3267 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
3268 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
3269 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
3270 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
3271 (ppc64_elf_relocate_section): Likewise.
3272 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
3273 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
3274 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
3275 * libbfd.h: Regenerate.
3276 * bfd-in2.h: Regenerate.
3278 2017-02-28 Alan Modra <amodra@gmail.com>
3280 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
3281 dynamic .data.rel.ro read-only.
3282 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
3283 rather than section flags when deciding where copy reloc goes.
3284 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
3285 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
3286 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
3287 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
3288 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
3289 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
3290 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
3291 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
3292 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3293 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
3294 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
3295 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
3296 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3297 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
3298 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
3299 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
3300 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
3301 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
3302 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
3304 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
3306 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
3307 `jalr $0, $25' instruction encoding.
3309 2017-02-27 Nick Clifton <nickc@redhat.com>
3312 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
3313 generating a seg-fault when encountering a symbol that has been
3314 deleted by garbage collection.
3316 2017-02-25 Alan Modra <amodra@gmail.com>
3318 * elf32-arc.c (struct dynamic_sections): Delete.
3319 (enum dyn_section_types): Delete.
3320 (dyn_section_names): Delete.
3321 (arc_create_dynamic_sections): Delete.
3322 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
3323 segfault on discarded .rela.plt section.
3324 (elf_arc_size_dynamic_sections): Formatting. Don't call
3325 arc_create_dynamic_sections. Don't allocate memory for sections
3326 handled by the generic linker. Correct code finding relocs in
3327 read-only sections. Set SEC_EXCLUDE on zero size .got,
3328 .got.plt, and .dynbss sections. Do set .interp for pies.
3330 2017-02-24 Andrew Waterman <andrew@sifive.com>
3332 * elfnn-riscv.c (GP_NAME): New macro.
3333 (riscv_global_pointer_value): Use it.
3334 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
3335 output section, consider only that section's alignment.
3337 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
3339 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
3340 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
3341 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
3342 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
3344 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
3346 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
3347 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
3350 2017-02-23 Alan Modra <amodra@gmail.com>
3353 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
3355 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
3356 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
3359 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
3362 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
3363 processing ahead of the call to `elf_gc_sweep_symbol'.
3365 2017-02-22 Nick Clifton <nickc@redhat.com>
3368 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
3369 created section 4-byte alignment.
3371 2017-02-22 Alan Modra <amodra@gmail.com>
3373 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
3374 on .got or .plt output section being discarded by script.
3375 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
3378 2017-02-21 Alan Modra <amodra@gmail.com>
3380 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
3381 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
3383 2017-02-20 Alan Modra <amodra@gmail.com>
3386 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
3387 if DT_RELSZ/DT_RELASZ is zero.
3389 2017-02-17 Nick Clifton <nickc@redhat.com>
3391 * compress.c (bfd_get_full_section_contents): Remember to reduce
3392 compressed size by the sizeof the compression header when
3393 decompressing the contents.
3395 2017-02-17 Pedro Alves <palves@redhat.com>
3397 * srec.c (Chunk): Rename to ...
3398 (_bfd_srec_len): ... this.
3399 (S3Forced): Rename to ...
3400 (_bfd_srec_forceS3): ... this.
3401 * objcopy.c: Adjust all references.
3403 2017-02-17 Pedro Alves <palves@redhat.com>
3405 * archive.c (bsd_write_armap): Rename to ...
3406 (_bfd_bsd_write_armap): ... this.
3407 (coff_write_armap): Rename to ...
3408 (_bfd_coff_write_armap): ... this.
3409 * libbfd-in.h (bsd_write_armap): Rename to ...
3410 (_bfd_bsd_write_armap): ... this.
3411 (coff_write_armap): Rename to ...
3412 (_bfd_coff_write_armap): ... this.
3413 * aout-target.h, aout-tic30.c: Adjust all users.
3414 * libbfd.h: Regenerate.
3416 2017-02-17 Pedro Alves <palves@redhat.com>
3418 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
3419 (warn_deprecated): Rename to ...
3420 (_bfd_warn_deprecated): ... this.
3421 * libbfd.c (warn_deprecated): Rename to ...
3422 (_bfd_warn_deprecated): ... this.
3423 * bfd-in2.h: Regenerate.
3425 2017-02-17 Pedro Alves <palves@redhat.com>
3427 * bfdio.c (real_ftell): Rename to ...
3428 (_bfd_real_ftell): ... this.
3429 (real_fseek): Rename to ...
3430 (_bfd_real_fseek): ... this.
3431 (real_fopen): Rename to ...
3432 (_bfd_real_fopen): ... this.
3433 * libbfd-in.h (real_ftell): Rename to ...
3434 (_bfd_real_ftell): ... this.
3435 (real_fseek): Rename to ...
3436 (_bfd_real_fseek): ... this.
3437 (real_fopen): Rename to ...
3438 (_bfd_real_fopen): ... this.
3439 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
3440 * libbfd.h: Regenerate.
3442 2017-02-17 Pedro Alves <palves@redhat.com>
3444 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
3445 * libbfd.c (read_unsigned_leb128): Rename to ...
3446 (_bfd_read_unsigned_leb128): ... this.
3447 (read_signed_leb128): Rename to ...
3448 (_bfd_read_signed_leb128): ... this.
3449 (safe_read_leb128): Rename to ...
3450 (_bfd_safe_read_leb128): ... this.
3451 * libbfd-in.h (read_unsigned_leb128): Rename to ...
3452 (_bfd_read_unsigned_leb128): ... this.
3453 (read_signed_leb128): Rename to ...
3454 (_bfd_read_signed_leb128): ... this.
3455 (safe_read_leb128): Rename to ...
3456 (_bfd_safe_read_leb128): ... this.
3457 * libbfd.h: Renegerate.
3459 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
3461 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
3462 before trying to fine matching file and line information.
3464 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
3466 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
3467 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
3468 not match current bfd, then reload debug information. Record bfd
3469 we're loading debug info for in the stash. If we have debug
3470 informatin in the cache then perform section placement before
3473 2017-02-16 Alan Modra <amodra@gmail.com>
3476 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
3477 * elfxx-target.h (elf_backend_no_page_alias): Define.
3478 (elfNN_bed): Init new field.
3479 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
3480 ensure PT_LOAD segment starts on a new page.
3481 * elf32-hppa.c (elf_backend_no_page_alias): Define.
3483 2017-02-16 Alan Modra <amodra@gmail.com>
3486 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
3489 2017-02-16 Jiong Wang <jiong.wang@arm.com>
3491 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
3492 * bfd-in2.h: Regenerated.
3494 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
3497 * elf32-i386.c (elf_i386_relocate_section): Allow
3498 "lea foo@GOT, %reg" in PIC.
3500 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
3503 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
3504 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
3505 error against local IFUNC symbol without a base register for
3508 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
3510 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
3511 `%P: %H:' with `info->callbacks->einfo'.
3512 (ppc_elf_relocate_section): Likewise.
3513 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
3514 (ppc64_elf_edit_toc): Likewise.
3515 (ppc64_elf_relocate_section): Likewise.
3517 2017-02-14 Alan Modra <amodra@gmail.com>
3519 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
3520 --gc-keep-exported, and test versioned field of sym rather than
3521 looking for @ in name.
3523 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
3525 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
3528 2017-02-13 Nick Clifton <nickc@redhat.com>
3531 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
3534 2017-02-07 Andrew Waterman <andrew@sifive.com>
3536 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
3537 entry size if PLT header is written.
3539 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
3541 Fix sparc64 dynamic relocation processing to use the dynamic
3543 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
3544 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
3547 2017-02-03 Nick Clifton <nickc@redhat.com>
3550 * coffcode.h (coff_write_object_contents): Enlarge size of
3551 s_name_buf in order to avoid compile time warning about possible
3553 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
3554 32-bits of insn value before printing into buffer.
3556 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3558 * elfxx-mips.c (mips_elf_hash_sort_data): Add
3559 `max_local_dynindx'.
3560 (mips_elf_sort_hash_table): Handle it.
3561 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
3562 symbols bump up `max_local_dynindx' rather than
3563 `max_non_got_dynindx'.
3565 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3567 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
3568 `min_got_dynindx', `max_unref_got_dynindx' and
3569 `max_non_got_dynindx' members to the `bfd_size_type' data type.
3570 (mips_elf_sort_hash_table): Adjust accordingly.
3572 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3574 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
3575 to access the hash table.
3577 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3579 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
3580 non-NULL `htab' to the beginning.
3582 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3584 * elflink.c (elf_gc_sweep): Wrap overlong line.
3586 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
3588 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
3589 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
3590 * elfxx-mips.c (mips_elf_link_hash_table): Add
3591 `ignore_branch_isa' member.
3592 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
3593 in branch relocation calculation as an error if
3594 `ignore_branch_isa' has been set.
3595 (_bfd_mips_elf_insn32): Rename to...
3596 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
3597 parameter to `insn32' and add an `ignore_branch_isa' parameter.
3598 Handle the new parameter.
3600 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
3602 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
3603 local variable dynobj.
3606 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
3607 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
3608 executable from read-only sections into sdynrelro.
3609 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
3610 dynamic relocs in sdynrelro.
3611 (elf_backend_want_dynrelro): Define.
3613 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
3615 * config.bfd (*-*-rtemsaout*): Mark as removed.
3617 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
3619 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
3620 (arm-*-rtems*): Move to (arm*-*-eabi*).
3621 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
3622 (m68-*-rtems*): Move to (m68*-*-elf*).
3624 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
3626 * config.bfd (*-*-rtemscoff*): Mark as removed.
3628 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
3631 * elflink.c (bfd_elf_record_link_assignment): Revert last
3632 change and don't ever clear `forced_local'. Set `mark'
3634 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
3636 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
3637 (bfd_elf_size_dynamic_sections): ... here.
3638 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
3639 and set `mark' instead in `__tls_get_addr_opt' processing.
3640 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
3642 2017-01-24 Alan Modra <amodra@gmail.com>
3644 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
3645 where dynamic relocs are preferable. Allow ifunc too.
3646 (ensure_undefweak_dynamic): New function.
3647 (allocate_dynrelocs): Use it here. Move plt handling last and
3648 don't make symbols dynamic, simplifying loop. Only make undef
3649 weak symbols with GOT entries dynamic. Correct condition
3650 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
3651 comments. Remove goto.
3652 (ppc_elf_relocate_section): Correct test for using dynamic
3653 symbol on GOT relocs. Rearrange test for emitting GOT relocs
3654 to suit. Set up explicit tls_index entries and implicit GOT
3655 tls_index entries resolvable at link time for
3656 __tls_get_addr_opt. Simplify test to clear mem for prelink.
3657 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
3658 (ensure_undefweak_dynamic): New function.
3659 (allocate_dynrelocs): Use it here. Only make undef weak symbols
3660 with GOT entries dynamic. Remove unnecessary test of
3661 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
3662 (ppc64_elf_relocate_section): Correct test for using dynamic
3663 symbol on GOT relocs. Rearrange test for emitting GOT relocs
3664 to suit. Set up explicit tls_index entries and implicit GOT
3665 tls_index entries resolvable at link time for __tls_get_addr_opt.
3666 Simplify expression to clear mem for prelink.
3668 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
3670 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
3672 2017-01-20 Jiong Wang <jiong.wang@arm.com>
3674 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
3675 (elf_backend_hash_symbol): Define.
3677 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
3680 * elflink.c (bfd_elf_record_link_assignment): Clear any
3681 `forced_local' marking for DSO symbols that are not being
3684 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
3686 * elfnn-riscv.c (riscv_elf_object_p): New function.
3688 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
3691 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
3693 (elf_x86_64_check_relocs): Create .eh_frame section for the
3695 (elf_x86_64_size_dynamic_sections): Allocate and initialize
3696 .eh_frame section for the .plt.bnd section.
3697 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
3698 for the .plt.bnd section.
3700 2017-01-12 Nick Clifton <nickc@redhat.com>
3703 * opncls.c (find_separate_debug_file): Add include_dirs
3704 parameter. Only include the directory part of the bfd's filename
3705 in search paths if include_dirs is true. Add a couple of extra
3706 locations for looking for debug files.
3707 ( bfd_follow_gnu_debuglink): Update invocation of
3708 find_separate_debug_file.
3709 (bfd_follow_gnu_debugaltlink): Likewise.
3710 (get_build_id): New function: Finds the build-id of the given bfd.
3711 (get_build_id_name): New function: Computes the name of the
3712 separate debug info file for a bfd, based upon its build-id.
3713 (check_build_id_file): New function: Checks to see if a separate
3714 debug info file exists at the given location, and that its
3715 build-id matches that of the original bfd.
3716 (bfd_follow_build_id_debuglink): New function: Finds a separate
3717 debug info file for a given bfd by using the build-id method.
3718 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
3719 method of locating a separate debug info file before using the
3721 * bfd-in2.h: Regenerate.
3723 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
3726 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
3727 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
3728 elf_x86_64_eh_frame_plt_got.
3729 (elf_x86_64_size_dynamic_sections): Get unwind info from
3730 elf_x86_64_bnd_arch_bed for the BND PLT.
3732 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
3734 * config.bfd: Add entries for i686-redox and x86_64-redox.
3736 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
3738 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
3740 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
3741 .eh_frame section to 4 bytes for x32.
3742 (elf_x86_64_check_relocs): Likewise.
3744 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
3747 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
3748 (PLT_GOT_FDE_LENGTH): Likewise.
3749 (elf_i386_plt_layout): Add eh_frame_plt_got and
3750 eh_frame_plt_got_size.
3751 (elf_i386_plt): Updated.
3752 (elf_i386_link_hash_table): Add plt_got_eh_frame.
3753 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
3754 (elf_i386_size_dynamic_sections): Allocate and initialize
3755 .eh_frame section for .plt.got.
3756 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
3758 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
3759 eh_frame_plt_got_size.
3760 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
3761 (PLT_GOT_FDE_LENGTH): Likewise.
3762 (elf_x86_64_backend_data): Add eh_frame_plt_got and
3763 eh_frame_plt_got_size.
3764 (elf_x86_64_arch_bed): Updated.
3765 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
3766 eh_frame_plt_got_size.
3767 (elf_x86_64_nacl_arch_bed): Likewise.
3768 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
3769 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
3770 (elf_x86_64_size_dynamic_sections): Allocate and initialize
3771 .eh_frame section for .plt.got.
3772 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
3775 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
3777 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
3778 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
3780 2017-01-09 Nick Clifton <nickc@redhat.com>
3782 * dwarf2.c (lookup_address_in_function_table): Return early if
3783 there are no functions in the given comp unit, or if the high
3784 address of the last function in the comp unit is less than the
3787 2017-01-09 Nick Clifton <nickc@redhat.com>
3790 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
3791 message if there are too many symbols to load.
3793 2017-01-04 James Clarke <jrtc27@jrtc27.com>
3795 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
3796 if relocs are cached.
3798 2017-01-03 Rich Felker <bugdal@aerifal.cx>
3801 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
3802 for R_MICROBLAZE_GOTOFF_64.
3804 2017-01-03 Nick Clifton <nickc@redhat.com>
3806 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
3807 warning about using a possibly uninitialised variable.
3809 2017-01-02 Alan Modra <amodra@gmail.com>
3811 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
3812 (allocate_plt_static, allocate_dynrelocs): Use it.
3814 2017-01-02 Alan Modra <amodra@gmail.com>
3816 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
3817 .PARISC.unwind section.
3819 2017-01-02 Alan Modra <amodra@gmail.com>
3822 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
3823 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
3824 indirect to GOT pointer relative code edit.
3826 2017-01-02 Alan Modra <amodra@gmail.com>
3828 Update year range in copyright notice of all files.
3830 For older changes see ChangeLog-2016
3832 Copyright (C) 2017 Free Software Foundation, Inc.
3834 Copying and distribution of this file, with or without modification,
3835 are permitted in any medium without royalty provided the copyright
3836 notice and this notice are preserved.
3842 version-control: never