1 2017-09-15 Alan Modra <amodra@gmail.com>
4 * archive.c (bfd_ar_hdr_from_filesystem): Detect when status.st_size
5 overflows bfd_size_type.
7 2017-09-14 H.J. Lu <hongjiu.lu@intel.com>
10 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument
11 to indicate if conversion is performed.
12 (elf_i386_check_relocs): Cache section contents and relocations
13 if conversion is performed.
14 * elf64-x86-64.c (elf_x86_64_check_relocs): Cache section
15 contents and relocations if conversion is performed.
17 2017-09-14 Nick Clifton <nickc@redhat.com>
20 * peXXigen.c (pe_print_idata): Extend check for HintName vector
23 2017-09-13 H.J. Lu <hongjiu.lu@intel.com>
25 * elfxx-x86.h: Fix a typo in comments.
27 2017-09-09 Kamil Rytarowski <n54@gmx.com>
29 * elf32-nds32.c: Rename __BIT() to N32_BIT().
31 2017-09-09 Alan Modra <amodra@gmail.com>
33 * elf64-ppp.c (plt_stub_pad): Handle positive and negative
36 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
38 * elf32-i386.c (elf_i386_relocate_section): Update usage of
39 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
40 (elf_i386_finish_dynamic_symbol): Likewise.
41 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
42 (elf_x86_64_finish_dynamic_symbol): Likewise.
43 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Likewise.
44 (_bfd_x86_elf_fixup_symbol): Likewise.
46 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
48 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
49 check has_non_got_reloc.
51 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
54 * elf32-i386.c (elf_i386_convert_load_reloc): Check linker_def.
55 Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
56 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Check
57 linker_def. Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
58 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Set local_ref
59 and linker_def on __ehdr_start if it is referenced and not
61 (_bfd_x86_elf_link_symbol_references_local): Also set local_ref
62 and return TRUE when building executable, if a symbol has
63 non-GOT/non-PLT relocations in text section or there is no
65 * elfxx-x86.h (elf_x86_link_hash_entry): Add linker_def.
67 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
69 * elfxx-x86.h: Update comments.
71 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
73 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Replace
74 elf_x86_plt_layout_table with elf_x86_init_table.
75 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
77 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties):
79 * elfxx-x86.h (elf_x86_plt_layout_table): Renamed to ...
80 (elf_x86_init_table): This.
81 (_bfd_x86_elf_link_setup_gnu_properties): Replace
82 elf_x86_plt_layout_table with elf_x86_init_table.
84 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
86 * configure.ac (bfd_backends): Don't add elf64-x86-64.lo nor
87 elf64.lo together with elfxx-x86.lo for 64-bit BFD.
88 * configure: Regenerated.
89 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set r_info
90 and r_sym fields of plt_layout.
91 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
93 * elfxx-x86.c (elf_x86_64_is_reloc_section): Remove BFD64 check.
94 (_bfd_x86_elf_link_hash_table_create): Likewise. Don't set
95 r_info nor r_sym fields.
96 (_bfd_x86_elf_link_setup_gnu_properties): Set r_info and r_sym
98 * elfxx-x86.h (elf_x86_plt_layout_table): Add r_info and r_sym.
100 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
102 * (_bfd_riscv_relax_align): Call bfd_set_error and
103 print an error message when unable to relax a .align directive.
105 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
107 * elfnn-riscv.c (riscv_zero_pcrel_hi_reloc): New function.
108 (riscv_record_pcrel_hi_reloc): Add absolute argument.
109 (riscv_elf_relocate_section): Call riscv_zero_pcrel_hi_reloc for
110 R_RISCV_PCREL_HI20 relocs, and pass the result to
111 riscv_record_pcrel_hi_reloc.
113 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
115 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument,
116 r_type_p. Remove the converted argument. Replace
117 SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P. Return
118 the new relocation type via r_type_p.
119 (elf_i386_relocate_section): Likewise.
120 (elf_i386_finish_dynamic_symbol): Likewise.
121 (need_convert_load): Removed.
122 (check_relocs_failed): Updated.
123 (elf_i386_check_relocs): Call elf_i386_convert_load_reloc,
124 instead of setting need_convert_load.
125 (_bfd_i386_elf_convert_load): Removed.
126 * elf64-x86-64.c (need_convert_load): Removed.
127 (check_relocs_failed): Updated.
128 (elf_x86_64_convert_load_reloc): Add an argument, r_type_p.
129 Replace SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P.
130 Return the new relocation type via r_type_p.
131 (elf_x86_64_check_relocs): Call elf_x86_64_convert_load_reloc,
132 instead of setting need_convert_load.
133 (elf_x86_64_check_relocs): Don't check PIC if relocation has
135 (_bfd_x86_64_elf_convert_load): Removed.
136 (elf_x86_64_relocate_section): Replace SYMBOL_REFERENCES_LOCAL
137 with SYMBOL_REFERENCES_LOCAL_P.
138 (elf_x86_64_finish_dynamic_symbol): Likewise.
139 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Don't
141 (_bfd_x86_elf_size_dynamic_sections): Don't call convert_load.
142 (_bfd_x86_elf_link_symbol_references_local): New function.
143 * elfxx-x86.h (SYMBOL_REFERENCES_LOCAL_P): New.
144 (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace elf.forced_local with
145 SYMBOL_REFERENCES_LOCAL_P.
146 (elf_x86_link_hash_entry): Add local_ref.
147 (elf_x86_link_hash_table): Remove convert_load.
148 (_bfd_i386_elf_convert_load): Removed.
149 (_bfd_x86_64_elf_convert_load): Likewise.
150 (_bfd_x86_elf_link_symbol_references_local): New.
152 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
154 * elf64-x86-64.c (R_X86_64_converted_reloc_bit): New.
155 (elf_x86_64_info_to_howto): Get the real relocation type by
156 masking out R_X86_64_converted_reloc_bit.
157 (elf_x86_64_check_tls_transition): Get the real relocation type
158 by masking out R_X86_64_converted_reloc_bit.
159 (elf_x86_64_convert_load_reloc): Set R_X86_64_converted_reloc_bit
160 instead of setting converted_reloc.
161 (elf_x86_64_relocate_section): Check R_X86_64_converted_reloc_bit
162 instead of converted_reloc. Get the real relocation type by
163 masking out R_X86_64_converted_reloc_bit.
164 (elf_x86_64_link_setup_gnu_properties): Verify that the value of
165 R_X86_64_converted_reloc_bit is valid.
166 * elfxx-x86.h (converted_reloc): Removed.
168 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
170 * elf32-i386.c (elf_i386_relocate_section): Don't change r_type
171 when calling elf_i386_tls_transition. Don't use ELF32_R_TYPE
172 to get the relocation type again.
173 * elf64-x86-64.c (elf_x86_64_relocate_section): Don't change
174 r_type when calling elf_x86_64_tls_transition. Don't use
175 ELF32_R_TYPE to get the relocation type again.
177 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
179 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Properly set
182 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
184 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Remove the sec
185 argument. Don't check relocation overflow. Avoid relocation
186 overflow if --no-relax is used. Set converted_reloc on symbol
187 if a GOTPCREL relocation is converted.
188 (elf_x86_64_relocate_section): Issue a fatal error and suggest
189 --no-relax if GOTPCREL relocation conversion leads to relocation
191 * elfxx-x86.h (elf_x86_link_hash_entry): Add converted_reloc.
193 2017-09-05 Alexander Fedotov <alexander.fedotov@nxp.com>
194 Edmar Wienskoski <edmar.wienskoski@nxp.com
196 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_VLE_ADDR20.
197 (ppc_elf_check_relocs): Handle it.
198 (ppc_elf_vle_split20): New function.
199 (ppc_elf_relocate_section): Handle R_PPC_VLE_ADDR20.
201 2017-09-03 H.J. Lu <hongjiu.lu@intel.com>
204 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Set tlsdesc_plt
205 for x86-64 if GOT_TLS_GDESC_P is true.
207 2017-09-03 Alan Modra <amodra@gmail.com>
210 * elfxx-x86.h (elf_x86_hash_table): Check is_elf_hash_table first.
212 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
214 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
215 tls_get_addr for x86-64 in one place.
217 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
219 * configure.ac (bfd_backends): Add elf64-x86-64.lo together
220 with elfxx-x86.lo for 64-bit BFD.
221 * configure: Regenerated.
223 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
225 * elf32-i386.c (elf_i386_convert_load): Renamed to ...
226 (_bfd_i386_elf_convert_load): This. Remove static.
227 (elf_i386_size_dynamic_sections): Removed.
228 (elf_backend_size_dynamic_sections): Likewise.
229 * elf64-x86-64.c (elf_x86_64_convert_load): Renamed to ...
230 (_bfd_x86_64_elf_convert_load): This. Remove static.
231 (elf_x86_64_size_dynamic_sections): Removed.
232 (elf_backend_size_dynamic_sections): Likewise.
233 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): Renamed to ...
234 (elf_x86_allocate_dynrelocs): This. Make it static.
235 (_bfd_x86_elf_allocate_local_dynrelocs): Renamed to ...
236 (elf_x86_allocate_local_dynreloc): This. Make it static.
237 (elf_i386_is_reloc_section): New function.
238 (elf_x86_64_is_reloc_section): Likewise.
239 (_bfd_x86_elf_link_hash_table_create): Initialize convert_load,
240 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
241 Rearrange got_entry_size initialization.
242 (_bfd_x86_elf_size_dynamic_sections): New function.
243 * elfxx-x86.h (elf_x86_link_hash_table): Add convert_load,
244 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
245 (_bfd_i386_elf_convert_load): New.
246 (_bfd_x86_64_elf_convert_load): Likewise.
247 (_bfd_x86_elf_size_dynamic_sections): Likewise.
248 (elf_backend_size_dynamic_sections): Likewise.
249 (_bfd_x86_elf_allocate_dynrelocs): Removed.
250 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
252 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
254 * elfxx-x86.h (elf_x86_link_hash_table): Rearrange fields and
257 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
259 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
260 sgotplt_jump_table_size with elf_x86_compute_jump_table_size.
262 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
264 * elf32-i386.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
265 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Moved to ...
266 * elfxx-x86.h (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
267 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Here.
268 * elf64-x86-64.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
269 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Removed.
271 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
273 * elf32-i386.c (elf_i386_allocate_dynrelocs): Removed.
274 (elf_i386_allocate_local_dynrelocs): Likewise.
275 (elf_i386_size_dynamic_sections): Replace
276 elf_i386_allocate_dynrelocs/elf_i386_allocate_local_dynrelocs
277 with _bfd_x86_elf_allocate_dynrelocs and
278 _bfd_x86_elf_allocate_local_dynrelocs.
279 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Removed.
280 (elf_x86_64_allocate_local_dynrelocs): Likewise.
281 (elf_x86_64_size_dynamic_sections): Replace
282 elf_x86_64_allocate_dynrelocs/elf_x86_64_allocate_local_dynrelocs
283 with _bfd_x86_elf_allocate_dynrelocs and
284 _bfd_x86_elf_allocate_local_dynrelocs.
285 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): New function.
286 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
287 * elfxx-x86.h (_bfd_x86_elf_allocate_dynrelocs): New prototype.
288 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
290 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
292 * elf32-i386.c (is_i386_elf): Removed.
293 (elf_i386_check_relocs): Replace is_i386_elf with is_x86_elf.
294 (elf_i386_size_dynamic_sections): Likewise.
295 (elf_i386_relocate_section): Likewise.
296 * elf64-x86-64.c (is_x86_64_elf): Removed.
297 (elf_x86_64_check_relocs): Replace is_x86_64_elf with
299 (elf_x86_64_size_dynamic_sections): Likewise.
300 (elf_x86_64_relocate_section): Likewise.
301 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
303 * elfxx-x86.h (elf_x86_link_hash_table): Add target_id.
306 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
308 * elf32-i386.c (elf_i386_compute_jump_table_size): Removed.
309 (elf_i386_allocate_dynrelocs): Replace
310 elf_i386_compute_jump_table_size with
311 elf_x86_compute_jump_table_size.
312 (elf_i386_size_dynamic_sections): Likewise.
313 * elf64-x86-64.c (elf_x86_64_compute_jump_table_size): Removed.
314 (elf_x86_64_allocate_dynrelocs): Replace
315 elf_x86_64_compute_jump_table_size with
316 elf_x86_compute_jump_table_size.
317 (elf_x86_64_size_dynamic_sections): Likewise.
318 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
320 * elfxx-x86.h (elf_x86_link_hash_table): Add got_entry_size.
321 (elf_x86_compute_jump_table_size): New.
323 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
325 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
327 (_bfd_x86_elf_adjust_dynamic_symbol): Use sizeof_reloc.
328 * elfxx-x86.h (elf_x86_link_hash_table): Add sizeof_reloc.
330 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
332 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check VxWorks
333 with htab->is_vxworks.
334 (elf_i386_size_dynamic_sections): Likewise.
335 (elf_i386_relocate_section): Likewise.
336 (elf_i386_finish_dynamic_symbol): Likewise.
337 (elf_i386_finish_dynamic_sections): Likewise.
339 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
341 * elf32-i386.c (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
342 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
343 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Moved to ...
344 * elfxx-x86.h (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
345 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
346 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Here.
347 * elf64-x86-64.c (GOT_TLS_IE, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
348 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Removed.
350 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
353 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Check
354 ELF_COMMON_DEF_P for common symbols.
356 2017-09-02 Alan Modra <amodra@gmail.com>
358 * elf-eh-frame.c (offset_adjust): Avoid false positive gcc warning.
359 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Likewise.
360 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
362 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
364 * elf32-i386.c (elf_i386_gc_mark_hook): Removed.
365 (elf_backend_gc_mark_hook): Likewise.
366 * elf64-x86-64.c (elf_x86_64_gc_mark_hook): Likewise.
367 (elf_backend_gc_mark_hook): Likewise.
368 * elfxx-x86.c (_bfd_x86_elf_gc_mark_hook): New function.
369 * elfxx-x86.h (_bfd_x86_elf_gc_mark_hook): New.
370 (elf_backend_gc_mark_hook): Likewise.
372 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
374 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Removed.
375 (elf_backend_adjust_dynamic_symbol): Likewise.
376 * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.
377 (elf_backend_adjust_dynamic_symbol): Likewise.
378 * elfxx-x86.c (_bfd_x86_elf_adjust_dynamic_symbol): New function.
379 (_bfd_x86_elf_link_setup_gnu_properties): Copy is_vxworks.
380 * elfxx-x86.h (elf_x86_link_hash_table): Add is_vxworks.
381 (_bfd_x86_elf_adjust_dynamic_symbol): New.
382 (elf_backend_adjust_dynamic_symbol): Likewise.
384 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
386 * elfxx-x86.h (elf_x86_plt_layout_table): Fix a typo in
389 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
391 * elf32-i386.c (elf_i386_mkobject): Removed.
392 (bfd_elf32_mkobject): Likewise.
393 * elf64-x86-64.c (elf_x86_64_mkobject): Likewise.
394 (bfd_elf64_mkobject): Likewise.
395 (bfd_elf32_mkobject): Likewise.
396 * elfxx-x86.c (_bfd_x86_elf_mkobject): New function.
397 * elfxx-x86.h (_bfd_x86_elf_mkobject): New.
398 (bfd_elf64_mkobject): Likewise.
399 (bfd_elf32_mkobject): Likewise.
401 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
403 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Updated.
404 Call _bfd_x86_elf_link_setup_gnu_properties.
405 * elf64-x86-64.c (elf_x86_lazy_plt_layout): Initialize
406 pic_plt0_entry and pic_plt_entry fields with the non-PIC PLT
408 (elf_x86_64_non_lazy_plt): Likewise.
409 (elf_x86_64_lazy_bnd_plt): Likewise.
410 (elf_x86_64_non_lazy_bnd_plt): Likewise.
411 (elf_x86_64_lazy_ibt_plt): Likewise.
412 (elf_x32_lazy_ibt_plt): Likewise.
413 (elf_x86_64_non_lazy_ibt_plt): Likewise.
414 (elf_x32_non_lazy_ibt_plt): Likewise.
415 (elf_x86_64_nacl_plt): Likewise.
416 (elf_x86_64_link_setup_gnu_properties): Updated. Call
417 _bfd_x86_elf_link_setup_gnu_properties.
418 * elfxx-x86.c: Include elf-vxworks.h".
419 (_bfd_x86_elf_link_setup_gnu_properties): New function.
420 * elfxx-x86.h (elf_x86_lazy_plt_layout): Remove "for i386 only"
421 comments for pic_plt0_entry and pic_plt_entry.
422 (elf_x86_non_lazy_plt_layout): Likewise.
423 (elf_x86_plt_layout_table): New.
424 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
426 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
429 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Create
430 .eh_frame section for the second PLT.
431 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Correct
432 alignment of .eh_frame section for the second PLT.
434 2017-09-01 Nick Clifton <nickc@redhat.com>
437 * dwarf2.c (decode_line_info): Fix test for an overlong line info
440 2017-09-01 Nick Clifton <nickc@redhat.com>
443 * elf-attrs.c (_bfd_elf_parse_attributes): Ensure that the
444 attribute buffer is NUL terminated.
446 2017-08-31 Nick Clifton <nickc@redhat.com>
449 * dwarf2.c (read_section): If necessary add a terminating NUL byte
450 to dwarf string sections.
452 2017-08-31 Alan Modra <amodra@gmail.com>
454 * po/SRC-POTFILES.in: Regenerate.
456 2017-08-31 Alan Modra <amodra@gmail.com>
458 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Don't exit early
459 for a section containing just a terminator. Allow multiple
460 terminators at end of section.
461 * elflink.c (bfd_elf_discard_info): Iterate over .eh_frame
462 sections when not adding alignment. Assert on terminator in
465 2017-08-31 Alan Modra <amodra@gmail.com>
469 * elflink.c (bfd_elf_discard_info): Don't pad embedded zero
472 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
474 * configure.ac (bfd_backends): Add elf64.lo together with
475 elfxx-x86.lo for 64-bit BFD.
476 * configure: Regenerated.
478 2017-08-31 James Bowman <james.bowman@ftdichip.com>
480 * elf32-ft32.c (ft32_elf_howto_table): Use complain_overflow_dont
483 2017-08-31 Alan Modra <amodra@gmail.com>
486 * opncls.c (bfd_close_all_done): Don't call bfd_cache_close
487 before _close_and_cleanup. Call iovec->bclose after.
488 (bfd_close): Remove code common to, and call, bfd_close_all_done.
490 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
492 * elf32-i386.c (elf_i386_plt_type): Removed.
493 (elf_i386_plt): Likewise.
494 (elf_i386_get_synthetic_symtab): Updated. Call
495 _bfd_x86_elf_get_synthetic_symtab.
496 * elf64-x86-64.c (elf_x86_64_plt_type): Removed.
497 (elf_x86_64_plt): Likewise.
498 (elf_x86_64_get_synthetic_symtab): Updated. Call
499 _bfd_x86_elf_get_synthetic_symtab.
500 * elfxx-x86.c (elf_i386_get_plt_got_vma): New function.
501 (elf_x86_64_get_plt_got_vma): Likewise.
502 (elf_i386_valid_plt_reloc_p): Likewise.
503 (elf_x86_64_valid_plt_reloc_p): Likewise.
504 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
505 * elfxx-x86.h (elf_x86_plt_type): New.
506 (elf_x86_plt): Likewise.
507 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
509 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
511 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Check
512 target_id instead of elf_machine_code.
514 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
516 * elf32-i386.c (ELF_DYNAMIC_INTERPRETER): Removed.
517 (elf_i386_lazy_plt_layout): Likewise.
518 (elf_i386_non_lazy_plt_layout): Likewise.
519 (elf_i386_plt_layout): Likewise.
520 (elf_i386_link_hash_table): Likewise.
521 (elf_i386_next_tls_desc_index): Likewise.
522 (elf_i386_srelplt2): Likewise.
523 (elf_i386_plt): Likewise.
524 (elf_i386_lazy_plt): Likewise.
525 (elf_i386_non_lazy_plt): Likewise.
526 (elf_i386_link_hash_table_create): Likewise.
527 (bfd_elf32_bfd_link_hash_table_create): Likewise.
528 (elf_i386_lazy_plt): Updated.
529 (elf_i386_non_lazy_plt): Likewise.
530 (elf_i386_lazy_ibt_plt): Likewise.
531 (elf_i386_non_lazy_ibt_plt): Likewise.
532 (elf_i386_allocate_dynrelocs): Likewise.
533 (elf_i386_size_dynamic_sections): Likewise.
534 (elf_i386_relocate_section): Likewise.
535 (elf_i386_finish_dynamic_symbol): Likewise.
536 (elf_i386_finish_dynamic_sections): Likewise.
537 (elf_i386_get_synthetic_symtab): Likewise.
538 (elf_i386_link_setup_gnu_properties): Likewise.
539 (elf_i386_nacl_plt): Likewise.
540 * elf64-x86-64.c (ABI_64_P): Removed.
541 (ELF64_DYNAMIC_INTERPRETER): Likewise.
542 (ELF32_DYNAMIC_INTERPRETER): Likewise.
543 (elf_x86_64_lazy_plt_layout): Likewise.
544 (elf_x86_64_non_lazy_plt_layout): Likewise.
545 (elf_x86_64_plt_layout): Likewise.
546 (elf_x86_64_link_hash_table): Likewise.
547 (elf_x86_64_plt): Likewise.
548 (elf_x86_64_lazy_plt): Likewise.
549 (elf_x86_64_non_lazy_plt): Likewise.
550 (elf_x86_64_link_hash_table_create): Likewise.
551 (bfd_elf64_bfd_link_hash_table_create): Likewise.
552 (bfd_elf32_bfd_link_hash_table_create): Likewise.
553 (elf_x86_64_lazy_plt): Updated.
554 (elf_x86_64_non_lazy_plt): Likewise.
555 (elf_x86_64_lazy_bnd_plt): Likewise.
556 (elf_x86_64_non_lazy_bnd_plt): Likewise.
557 (elf_x86_64_lazy_ibt_plt): Likewise.
558 (elf_x32_lazy_ibt_plt): Likewise.
559 (elf_x86_64_non_lazy_ibt_plt): Likewise.
560 (elf_x32_non_lazy_ibt_plt): Likewise.
561 (elf_x86_64_allocate_dynrelocs): Likewise.
562 (elf_x86_64_size_dynamic_sections): Likewise.
563 (elf_x86_64_relocate_section): Likewise.
564 (elf_x86_64_finish_dynamic_symbol): Likewise.
565 (elf_x86_64_finish_dynamic_sections): Likewise.
566 (elf_x86_64_get_synthetic_symtab): Likewise.
567 (elf_x86_64_link_setup_gnu_properties): Likewise.
568 (elf_x86_64_nacl_plt): Likewise.
569 * elfxx-x86.c: Include "objalloc.h", "elf/i386.h" and
571 (ELF32_DYNAMIC_INTERPRETER): New.
572 (ELF64_DYNAMIC_INTERPRETER): Likewise.
573 (ELFX32_DYNAMIC_INTERPRETER): Likewise.
574 (_bfd_x86_elf_link_hash_table_create): Likewise.
575 (_bfd_x86_elf_link_hash_table_free): Renamed to ...
576 (elf_x86_link_hash_table_free): This. Make it static.
577 * elfxx-x86.h: Don't include "objalloc.h".
579 (elf_x86_lazy_plt_layout): Likewise.
580 (elf_x86_non_lazy_plt_layout): Likewise.
581 (elf_x86_plt_layout): Likewise.
582 (_bfd_x86_elf_link_hash_table_create): Likewise.
583 (bfd_elf64_bfd_link_hash_table_create): Likewise.
584 (bfd_elf32_bfd_link_hash_table_create): Likewise.
585 (elf_x86_link_hash_table): Add plt, lazy_plt, non_lazy_plt,
586 srelplt2 and next_tls_desc_index.
587 (_bfd_x86_elf_link_hash_table_free): Removed.
589 2017-08-30 Maciej W. Rozycki <macro@imgtec.com>
591 * elfxx-mips.c (mips_elf_perform_relocation): Correct microMIPS
592 branch offset interpretation.
594 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
597 * opncls.c (bfd_close_all_done): Call _close_and_cleanup.
599 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
601 * elf64-x86-64.c (elf_x86_64_next_tls_desc_index): Removed.
602 (elf_x86_64_srelplt2): Likewise.
604 2017-08-30 Alan Modra <amodra@gmail.com>
606 * elf64-ppc.c (struct ppc_link_hash_table): Add do_tls_opt.
607 (ppc64_elf_tls_optimize): Set it.
608 (ppc64_elf_relocate_section): Nop addis on TPREL16_HA, and convert
609 insn on TPREL16_LO and TPREL16_LO_DS relocs to use r13 when
610 addis would add zero.
611 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add do_tls_opt.
612 (ppc_elf_tls_optimize): Set it.
613 (ppc_elf_relocate_section): Nop addis on TPREL16_HA, and convert
614 insn on TPREL16_LO relocs to use r2 when addis would add zero.
616 2017-08-30 Alan Modra <amodra@gmail.com>
618 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing
619 __tls_get_addr call sequences to LE, don't move the addi down
620 to the nop. Replace the bl with addi and leave the nop alone.
622 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
624 * elf32-i386.c (elf_i386_pie_finish_undefweak_symbol):
626 * elf64-x86-64.c (elf_x86_64_finish_local_dynamic_symbol):
628 (elf_x86_64_pie_finish_undefweak_symbol): Likewise.
630 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
632 * Makefile.am (BFD32_BACKENDS): Add elfxx-x86.lo.
633 (BFD64_BACKENDS): Likewise.
634 (BFD32_BACKENDS_CFILES): Add elfxx-x86.c.
635 (BFD64_BACKENDS_CFILES): Likewise.
636 * Makefile.in: Regenerated.
637 * configure.ac (bfd_backends): Add elfxx-x86.lo together with
638 elf32-i386.lo and elf64-x86-64.lo.
639 * configure: Regenerated.
640 * elf32-i386.c: Include "elfxx-x86.h" instead of "sysdep.h",
641 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
642 "objalloc.h" and "hashtab.h".
643 (ELIMINATE_COPY_RELOCS): Removed.
644 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
645 (SYMBOL_NO_COPYRELOC): Likewise.
646 (elf_i386_link_hash_entry): Likewise.
647 (GOT_UNKNOWN): Likewise.
648 (GOT_NORMAL): Likewise.
649 (GOT_TLS_GD): Likewise.
650 (elf_i386_hash_entry): Likewise.
651 (elf_i386_obj_tdata): Likewise.
652 (elf_i386_tdata): Likewise.
653 (elf_i386_local_got_tls_type): Likewise.
654 (elf_i386_local_tlsdesc_gotent): Likewise.
655 (elf_i386_hash_table): Likewise.
656 (elf_i386_link_hash_newfunc): Likewise.
657 (elf_i386_local_htab_hash): Likewise.
658 (elf_i386_local_htab_eq): Likewise.
659 (elf_i386_get_local_sym_hash): Likewise.
660 (elf_i386_link_hash_table_free): Likewise.
661 (elf_i386_copy_indirect_symbol): Likewise.
662 (elf_i386_fixup_symbol): Likewise.
663 (elf_i386_readonly_dynrelocs): Likewise.
664 (elf_i386_always_size_sections): Likewise.
665 (elf_i386_set_tls_module_base): Likewise.
666 (elf_i386_dtpoff_base): Likewise.
667 (compare_relocs): Likewise.
668 (elf_i386_hash_symbol): Likewise.
669 (elf_i386_parse_gnu_properties): Likewise.
670 (elf_i386_merge_gnu_properties): Likewise.
671 (elf_i386_link_check_relocs): Likewise.
672 (elf_i386_merge_symbol_attribute): Likewise.
673 (bfd_elf32_bfd_link_check_relocs): Likewise.
674 (elf_backend_copy_indirect_symbol): Likewise.
675 (elf_backend_always_size_sections): Likewise.
676 (elf_backend_omit_section_dynsym): Likewise.
677 (elf_backend_hash_symbol): Likewise.
678 (elf_backend_fixup_symbol): Likewise.
679 (elf_backend_parse_gnu_properties): Likewise.
680 (elf_backend_merge_gnu_properties): Likewise.
681 (elf_backend_merge_symbol_attribute): Likewise.
682 (elf_i386_mkobject): Updated.
683 (elf_i386_link_hash_table_create): Likewise.
684 (elf_i386_check_tls_transition): Likewise.
685 (elf_i386_tls_transition): Likewise.
686 (elf_i386_convert_load_reloc): Likewise.
687 (elf_i386_check_relocs): Likewise.
688 (elf_i386_adjust_dynamic_symbol): Likewise.
689 (elf_i386_allocate_dynrelocs): Likewise.
690 (elf_i386_convert_load): Likewise.
691 (elf_i386_size_dynamic_sections): Likewise.
692 (elf_i386_relocate_section): Likewise.
693 (elf_i386_finish_dynamic_symbol ): Likewise.
694 (elf_i386_finish_dynamic_sections): Likewise.
695 (elf_i386_output_arch_local_syms): Likewise.
696 (elf_i386_get_synthetic_symtab): Likewise.
697 (elf_i386_link_setup_gnu_properties): Likewise.
698 (elf_i386_link_hash_table): Use elf_x86_link_hash_table, instead
699 of elf_link_hash_table, as base.
700 (elf_i386_next_tls_desc_index): New.
701 (elf_i386_srelplt2): Likewise.
702 (elf_i386_plt): Likewise.
703 (elf_i386_lazy_plt): Likewise.
704 (elf_i386_non_lazy_plt): Likewise.
705 * elf32-x86-64.c: Include "elfxx-x86.h" instead of "sysdep.h",
706 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
707 "objalloc.h" and "hashtab.h".
708 (ELIMINATE_COPY_RELOCS): Removed.
709 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
710 (SYMBOL_NO_COPYRELOC): Likewise.
711 (elf_x86_64_link_hash_entry): Likewise.
712 (GOT_UNKNOWN): Likewise.
713 (GOT_NORMAL): Likewise.
714 (GOT_TLS_GD): Likewise.
715 (elf_x86_64_hash_entry): Likewise.
716 (elf_x86_64_obj_tdata): Likewise.
717 (elf_x86_64_tdata): Likewise.
718 (elf_x86_64_local_got_tls_type): Likewise.
719 (elf_x86_64_local_tlsdesc_gotent): Likewise.
720 (elf_x86_64_hash_table): Likewise.
721 (elf_x86_64_link_hash_newfunc): Likewise.
722 (elf_x86_64_local_htab_hash): Likewise.
723 (elf_x86_64_local_htab_eq): Likewise.
724 (elf_x86_64_get_local_sym_hash): Likewise.
725 (elf_x86_64_link_hash_table_free): Likewise.
726 (elf_x86_64_copy_indirect_symbol): Likewise.
727 (elf_x86_64_fixup_symbol): Likewise.
728 (elf_x86_64_readonly_dynrelocs): Likewise.
729 (elf_x86_64_always_size_sections): Likewise.
730 (elf_x86_64_set_tls_module_base): Likewise.
731 (elf_x86_64_dtpoff_base): Likewise.
732 (compare_relocs): Likewise.
733 (elf_x86_64_merge_symbol_attribute): Likewise.
734 (elf_x86_64_hash_symbol): Likewise.
735 (elf_x86_64_parse_gnu_properties): Likewise.
736 (elf_x86_64_merge_gnu_properties): Likewise.
737 (elf_x86_64_link_check_relocs): Likewise.
738 (elf_backend_copy_indirect_symbol): Likewise.
739 (elf_backend_always_size_sections): Likewise.
740 (bfd_elf64_bfd_link_check_relocs): Likewise.
741 (elf_backend_merge_symbol_attribute): Likewise.
742 (elf_backend_hash_symbol): Likewise.
743 (elf_backend_omit_section_dynsym): Likewise.
744 (elf_backend_fixup_symbol): Likewise.
745 (elf_backend_parse_gnu_properties): Likewise.
746 (elf_backend_merge_gnu_properties): Likewise.
747 (bfd_elf32_bfd_link_check_relocs): Likewise.
748 (elf_x86_64_mkobject): Updated.
749 (elf_x86_64_link_hash_table_create): Likewise.
750 (elf_x86_64_check_tls_transition): Likewise.
751 (elf_x86_64_tls_transition): Likewise.
752 (elf_x86_64_convert_load_reloc): Likewise.
753 (elf_x86_64_check_relocs): Likewise.
754 (elf_x86_64_adjust_dynamic_symbol): Likewise.
755 (elf_x86_64_allocate_dynrelocs): Likewise.
756 (elf_x86_64_convert_load): Likewise.
757 (elf_x86_64_size_dynamic_sections): Likewise.
758 (elf_x86_64_relocate_section): Likewise.
759 (elf_x86_64_finish_dynamic_symbol ): Likewise.
760 (elf_x86_64_finish_dynamic_sections): Likewise.
761 (elf_x86_64_output_arch_local_syms): Likewise.
762 (elf_x86_64_get_synthetic_symtab): Likewise.
763 (elf_x86_64_link_setup_gnu_properties): Likewise.
764 (elf_x86_64_link_hash_table): Use elf_x86_link_hash_table,
765 instead of elf_link_hash_table, as base.
766 (elf_x86_64_next_tls_desc_index): New.
767 (elf_x86_64_srelplt2): Likewise.
768 (elf_x86_64_plt): Likewise.
769 (elf_x86_64_lazy_plt): Likewise.
770 (elf_x86_64_non_lazy_plt): Likewise.
771 * elfxx-x86.c: New file.
772 * elfxx-x86.h: Likewise.
774 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
776 * elf32-i386.c (elf_i386_get_synthetic_symtab): Simplify bad
778 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
780 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
782 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check valid PLT
783 sections before checking dynamic relocations and free invalid
784 PLT section contents.
785 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
787 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
789 * elf-bfd.h (_bfd_elf_ifunc_get_synthetic_symtab): Removed.
790 * elf-ifunc.c (_bfd_elf_ifunc_get_synthetic_symtab): Likewise.
792 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
795 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check for valid
797 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
799 2017-08-27 H.J. Lu <hongjiu.lu@intel.com>
801 * elf32-i386.c (elf_i386_link_hash_newfunc): Initialize
803 * elf64-x86-64.c (elf_x86_64_link_hash_newfunc): Likewise.
805 2017-08-26 H.J. Lu <hongjiu.lu@intel.com>
808 * elf-bfd.h (elf_obj_tdata): Use ENUM_BITFIELD on object_id,
809 dyn_lib_class and has_gnu_symbols. Change bad_symtab to bitfield.
810 Add a has_no_copy_on_protected bitfield.
811 (elf_has_no_copy_on_protected): New.
812 * elf-properties.c (_bfd_elf_parse_gnu_properties): Set
813 elf_has_no_copy_on_protected for GNU_PROPERTY_NO_COPY_ON_PROTECTED.
814 (elf_merge_gnu_property_list): Likewise.
815 (_bfd_elf_link_setup_gnu_properties): Set extern_protected_data
816 to FALSE for elf_has_no_copy_on_protected.
817 * elf32-i386.c (SYMBOL_NO_COPYRELOC): New.
818 (elf_i386_link_hash_entry): Add def_protected.
819 (elf_i386_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
820 when checking info->nocopyreloc.
821 (elf_i386_link_setup_gnu_properties): Don't set
822 extern_protected_data here.
823 (elf_i386_merge_symbol_attribute): New function.
824 (elf_backend_merge_symbol_attribute): New.
825 * elf64-x86-64.c (SYMBOL_NO_COPYRELOC): New.
826 (elf_x86_64_link_hash_entry): Add def_protected.
827 (elf_x86_64_need_pic): Report protected symbol for def_protected.
828 (elf_x86_64_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
829 when checking info->nocopyreloc.
830 (elf_x86_64_relocate_section): Also check for R_X86_64_PC32
831 relocation run-time overflow and unresolvable R_X86_64_32S
832 relocation against protected data symbol defined in shared object
833 with GNU_PROPERTY_NO_COPY_ON_PROTECTED.
834 (elf_x86_64_link_setup_gnu_properties): Don't set
835 extern_protected_data here.
836 (elf_x86_64_merge_symbol_attribute): New function.
837 (elf_backend_merge_symbol_attribute): New.
839 2017-08-26 Alan Modra <amodra@gmail.com>
841 * elf32-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
842 (ppc_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
843 (ppc_elf_relocate_section): Comment fix.
844 * elf64-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
845 (ppc64_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
846 Support dynamic relocs for TPREL16 when non-pic too.
847 (dec_dynrel_count): Adjust TPREL16 handling as per check_relocs.
848 (ppc64_elf_relocate_section): Support dynamic relocs for TPREL16
851 2017-08-25 H.J. Lu <hongjiu.lu@intel.com>
853 * elf32-i386.c (elf_i386_link_hash_entry): Remove redundant
854 "symbol" in comments.
855 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Likewise.
857 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
860 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for
861 R_X86_64_PC32 relocation run-time overflow and unresolvable
862 R_X86_64_32S relocation with -z nocopyreloc.
864 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
866 * elf32-i386.c (elf_i386_check_relocs): Revert the last change.
867 Undefined symbols may not have a type.
868 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
870 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
872 * elf64-x86-64.c (elf_x86_64_need_pic): Add an argument for
873 bfd_link_info. Report shared, PIE or PDE object based on
875 (elf_x86_64_check_relocs): Update elf_x86_64_need_pic call.
876 (elf_x86_64_relocate_section): Likewise.
878 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
880 * elf32-i386.c (elf_i386_check_relocs): Increment PLT count only
881 for function symbols.
882 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
884 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
886 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set
887 extern_protected_data to FALSE if GNU_PROPERTY_NO_COPY_ON_PROTECTED
888 is set on any input relocatable file.
889 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
891 2017-08-23 Alan Modra <amodra@gmail.com>
894 * elf64-ppc.c (ensure_undef_dynamic): Rename from
895 ensure_undefweak_dynamic. Handle undefined too.
896 * elf32-ppc.c (ensure_undef_dynamic): Likewise.
897 * elf32-hppa.c (ensure_undef_dynamic): Likewise.
898 (allocate_dynrelocs): Discard undefined non-default visibility
899 relocs first. Make undefined syms dynamic. Tidy goto.
901 2017-08-21 Alan Modra <amodra@gmail.com>
902 H.J. Lu <hongjiu.lu@intel.com>
905 * elf-bfd.h (SYMBOLIC_BIND): Return TRUE for __start/__stop symbols.
906 * elflink.c (bfd_elf_define_start_stop): Rewrite.
908 2017-08-21 Hans-Peter Nilsson <hp@bitrange.com>
911 * elf64-mmix.c (mmix_elf_relax_section): Correct handling of
912 undefined weak symbols.
914 2017-08-18 Nick Clifton <nickc@redhat.com>
917 * tekhex.c (getsym): Fix check for source pointer walking off the
918 end of the input buffer.
920 2017-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
923 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Skip IFUNC
924 relocations in debug sections, change abort to _bfd_error_handler.
926 2017-08-14 Nick Clifton <nickc@redhat.com>
929 * elf.c (setup_group): Check for an empty or very small group
931 * po/bfd.pot: Regenerate.
933 2017-08-14 Alan Modra <amodra@gmail.com>
936 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't add
937 alignment padding here.
938 * elflink.c (bfd_elf_discard_info): Add .eh_frame padding here
939 in a reverse pass over sections.
941 2017-08-11 H.J. Lu <hongjiu.lu@intel.com>
944 * elf32-i386.c (elf_i386_get_synthetic_symtab): Allocate space
945 for @plt suffixes first.
946 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
948 2017-08-08 Nick Clifton <nickc@redhat.com>
951 * elf-attrs.c (_bfd_elf_parse_attributes): Complain about very
952 small section lengths.
953 * elf.c (_bfd_elf_setup_sections): Skip empty entries in the group
955 (elfcore_grok_freebsd_prstatus): Add checks to make sure that
956 there is enough data present in the note.
958 2017-08-08 Alan Modra <amodra@gmail.com>
961 * elf32-microblaze.c (microblaze_elf_check_relocs): Don't bump
962 got.refcount for GOTOFF relocs, just create .got section.
964 2017-08-07 H.J. Lu <hongjiu.lu@intel.com>
966 * elflink.c (elf_link_add_object_symbols): Move common symbol
967 check after bed->common_definition.
969 2017-08-07 Alan Modra <amodra@gmail.com>
972 * elflink.c (bfd_elf_final_link): Don't segfault when sections
973 needed to define various dynamic tags have been discarded.
975 2017-08-07 Nick Clifton <nickc@redhat.com>
978 * elf32-i386.c (elf_i386_link_setup_gnu_properties): If the dynobj
979 has not been set then use the bfd returned by
980 _bfd_elf_link_setup_gnu_properties. If that is null then search
981 through all the input bfds selecting the first normal, ELF format
983 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
985 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
987 * elf32-i386.c (elf_i386_link_hash_entry): Change tls_get_addr
989 (elf_i386_link_hash_newfunc): Initialize tls_get_addr to 0.
990 (elf_i386_check_tls_transition): Check tls_get_addr directly.
991 (elf_i386_convert_load_reloc): Update tls_get_addr check.
992 (elf_i386_link_check_relocs): New function.
993 (bfd_elf32_bfd_link_check_relocs): New.
994 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Change tls_get_addr
996 (elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 0.
997 (elf_x86_64_check_tls_transition): Check tls_get_addr directly.
998 (elf_x86_64_convert_load_reloc): Update tls_get_addr check.
999 (elf_x86_64_link_check_relocs): New function.
1000 (bfd_elf64_bfd_link_check_relocs): New.
1001 (bfd_elf32_bfd_link_check_relocs): Likewise.
1003 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
1006 * elflink.c (elf_link_add_object_symbols): Treat common symbol
1007 as undefined for --no-define-common.
1009 2017-08-05 Alan Modra <amodra@gmail.com>
1011 * elf32-hppa.c (elf32_hppa_set_gp): Don't require an
1012 hppa_link_hash_table.
1014 2017-08-02 Max Filippov <jcmvbkbc@gmail.com>
1016 * xtensa-isa.c (xtensa_isa_init): Don't update lookup table
1017 entries for sysregs with negative indices.
1019 2017-08-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1021 * elf32-s390.c (elf_s390_finish_dynamic_sections): Skip if it
1022 isn't the S/390 specific elf data.
1023 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
1025 2017-07-31 Kuan-Lin Chen <rufus@andestech.com>
1027 * elfxx-riscv.c (riscv_elf_add_sub_reloc): New function.
1028 * (howto_table) [R_RISCV_ADD8]: Use riscv_elf_add_sub_reloc.
1029 [R_RISCV_ADD16]: Likewise.
1030 [R_RISCV_ADD32]: Likewise.
1031 [R_RISCV_ADD64]: Likewise.
1032 [R_RISCV_SUB6]: Likewise.
1033 [R_RISCV_SUB8]: Likewise.
1034 [R_RISCV_SUB16]: Likewise.
1035 [R_RISCV_SUB32]: Likewise.
1036 [R_RISCV_SUB64]: Likewise.
1038 2017-07-31 Alan Modra <amodra@gmail.com>
1040 * elf64-ppc.c (ppc64_elf_tls_setup): Warn on --plt-localentry
1041 without ld.so checks.
1043 2017-07-29 Alan Modra <amodra@gmail.com>
1046 * elf64-ppc.c (struct ppc_link_hash_entry): Add non_zero_localentry.
1047 (ppc64_elf_merge_symbol): Set non_zero_localentry.
1048 (is_elfv2_localentry0): Test non_zero_localentry.
1049 (ppc64_elf_tls_setup): Default to --no-plt-localentry.
1051 2017-07-28 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1053 * elf32-s390.c (elf_s390_finish_dynamic_sections): Add NULL
1054 pointer check for htab->elf.irelplt.
1055 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
1057 2017-07-27 Nick Clifton <nickc@redhat.com>
1060 * mach-o.c (bfd_mach_o_read_symtab_strtab): Fail if the symtab
1062 * nlmcode.h (nlm_swap_auxiliary_headers_in): Replace assertion
1064 * section.c (bfd_make_section_with_flags): Fail if the name or bfd
1066 * vms-alpha.c (bfd_make_section_with_flags): Correct computation
1068 (evax_bfd_print_emh): Check for invalid string lengths.
1070 2017-07-25 Nick Clifton <nickc@redhat.com>
1072 * po/fr.po: Updated French translation.
1074 2017-07-25 Benjamin Green <bengreen5mx@gmail.com>
1077 * elf32-msp430.c (msp430_elf_relax_section): Allow conversion of
1078 16-bit absolute branches into 10-bit pc-relative branches on the
1079 MSP430 as well as the MSP430X.
1081 2017-07-25 Alan Modra <amodra@gmail.com>
1083 * elf64-ppc.c (struct map_stub): Add tls_get_addr_opt_bctrl.
1084 (stub_eh_frame_size): New function.
1085 (ppc_size_one_stub): Set group tls_get_addr_opt_bctrl.
1086 (group_sections): Init group tls_get_addr_opt_bctrl.
1087 (ppc64_elf_size_stubs): Update sizing and initialization of
1088 .eh_frame. Iteration over stubs via group list.
1089 (ppc64_elf_build_stubs): Iterate over stubs via group list.
1090 (ppc64_elf_finish_dynamic_sections): Update finalization of
1093 2017-07-24 Nick Clifton <nickc@redhat.com>
1096 * mach-o.c (bfd_mach_o_canonicalize_relocs): Pass the base address
1097 of the relocs to the canonicalize_one_reloc routine.
1098 * mach-o.h (struct bfd_mach_o_backend_data): Update the prototype
1099 for the _bfd_mach_o_canonicalize_one_reloc field.
1100 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add
1101 res_base parameter. Use to check for corrupt pair relocs.
1102 * mach-o-aarch64.c (bfd_mach_o_arm64_canonicalize_one_reloc):
1104 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc):
1106 * mach-o-x86-64.c (bfd_mach_o_x86_64_canonicalize_one_reloc):
1109 * vms-alpha.c (_bfd_vms_slurp_eihd): Make sure that there is
1110 enough data in the record before attempting to parse it.
1111 (_bfd_vms_slurp_eeom): Likewise.
1113 (_bfd_vms_slurp_egsd): Check for an invalid section index.
1114 (image_set_ptr): Likewise.
1115 (alpha_vms_slurp_relocs): Likewise.
1117 (alpha_vms_object_p): Check for a truncated record.
1119 2017-07-24 Nick Clifton <nickc@redhat.com>
1122 * reloc.c (_bfd_unrecognized_reloc): New function. Reports
1123 an unrecognized reloc and sets the bfd_error value.
1124 * libbfd.h: Regenerate.
1125 * elf32-arm.c (elf32_arm_final_link_relocate): Use the new
1127 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1128 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
1129 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1130 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.
1131 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
1133 2017-07-23 Alan Modra <amodra@gmail.com>
1135 * elf64-ppc.c (ppc64_elf_size_stubs): Correct advance to
1138 2017-07-19 Szabolcs Nagy <szabolcs.nagy@arm.com>
1141 * elfnn-aarch64.c (elfNN_aarch64_reloc_type_class): Return
1142 reloc_class_ifunc for ifunc symbols.
1144 2017-07-19 Nick Clifton <nickc@redhat.com>
1147 * archive.c (bfd_generic_archive_p): If the bfd does not have the
1148 correct magic bytes at the start, set the error to wrong format
1149 and clear the format selector before returning NULL.
1151 2017-07-19 Nick Clifton <nickc@redhat.com>
1154 * coff-rs6000.c (_bfd_strntol): New function.
1155 (_bfd_strntoll): New function.
1156 (GET_VALUE_IN_FIELD): New macro.
1157 (EQ_VALUE_IN_FIELD): new macro.
1158 (_bfd_xcoff_slurp_armap): Use new macros.
1159 (_bfd_xcoff_archive_p): Likewise.
1160 (_bfd_xcoff_read_ar_hdr): Likewise.
1161 (_bfd_xcoff_openr_next_archived_file): Likewise.
1162 (_bfd_xcoff_stat_arch_elt): Likewise.
1163 * coff64-rs6000.c (_bfd_strntol): New function.
1164 (_bfd_strntoll): New function.
1165 (GET_VALUE_IN_FIELD): New macro.
1166 (xcoff64_slurp_armap): Use new macros.
1168 2017-07-19 Claudiu Zissulescu <claziss@synopsys.com>
1169 John Eric Martin <John.Martin@emmicro-us.com>
1171 * bfd-in2.h: Regenerate.
1172 * libbfd.h: Regenerate.
1173 * elf32-arc.c (JLI): Define.
1174 * reloc.c: Add JLI relocations.
1176 2017-07-18 Nick Clifton <nickc@redhat.com>
1179 * coff-sh.c: Fix spelling typos.
1180 * compress.c: Likewise.
1181 * cpu-pdp11.c: Likewise.
1182 * ecofflink.c: Likewise.
1183 * elf-m10300.c: Likewise.
1185 * elf32-arm.c: Likewise.
1186 * elf32-m68k.c: Likewise.
1187 * elf32-nds32.c: Likewise.
1188 * elf32-ppc.c: Likewise.
1189 * elf32-sh.c: Likewise.
1190 * elf32-v850.c: Likewise.
1191 * elf64-ppc.c: Likewise.
1192 * elf64-x86-64.c: Likewise.
1193 * elflink.c: Likewise.
1194 * elfnn-aarch64.c: Likewise.
1195 * elfxx-mips.c: Likewise.
1197 * sunos.c: Likewise.
1198 * vms-alpha.c: Likewise.
1199 * xcofflink.c: Likewise.
1201 2017-07-18 Nick Clifton <nickc@redhat.com>
1204 * coffcode.h (handle_COMDAT): Replace abort with an error message
1207 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
1210 * elf64-x86-64.c (elf_x86_64_relocate_section): Limit PIC check
1213 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
1215 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
1217 2017-07-16 Alan Modra <amodra@gmail.com>
1219 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimize
1220 __tls_index GOT entries when using __tls_get_addr_opt stub.
1221 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1223 2017-07-12 Alan Modra <amodra@gmail.com>
1225 * po/es.po: Update from translationproject.org/latest/bfd/.
1226 * po/fi.po: Likewise.
1227 * po/fr.po: Likewise.
1228 * po/id.po: Likewise.
1229 * po/ja.po: Likewise.
1230 * po/ro.po: Likewise.
1231 * po/ru.po: Likewise.
1232 * po/sr.po: Likewise.
1233 * po/sv.po: Likewise.
1234 * po/tr.po: Likewise.
1235 * po/uk.po: Likewise.
1236 * po/vi.po: Likewise.
1237 * po/zh_CN.po: Likewise.
1238 * po/hr.po: New file from translationproject.org.
1239 * configure.ac (ALL_LINGUAS): Add hr. Sort.
1240 * configure: Regenerate.
1242 2017-07-12 Nick Clifton <nickc@redhat.com>
1244 Fix compile time warnings using gcc 7.1.1.
1245 * elf32-xtensa.c (elf_xtensa_get_plt_section): Increase length of
1247 (elf_xtensa_get_gotplt_section): Increase length of got_name
1249 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add a
1250 default return of FALSE.
1251 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc): Add a
1252 default return of FALSE.
1254 2017-07-12 Alan Modra <amodra@gmail.com>
1256 * binary.c (binary_set_section_contents): Don't print filepos in
1258 (coff_write_object_contents): Cast size_t for error message.
1259 (coff_slurp_line_table): Don't use bfd_vma symndx.
1260 (coff_slurp_reloc_table): Remove unneeded cast.
1261 * dwarf2.c (read_section): Cast bfd_int64_t to long long for
1263 (find_abstract_instance_name): Likewise.
1264 * elf32-arm.c (arm_type_of_stub): Correct error arg order.
1265 (bfd_elf32_arm_stm32l4xx_erratum_scan): Don't cast error arg.
1266 (elf32_arm_check_relocs): Make r_symndx an int.
1267 * elf32-cris.c (cris_elf_check_relocs): Delete extraneous %s in
1269 * elf32-metag.c (elf_metag_relocate_section): Delete extra error
1271 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Rewrite bogus
1273 * elf32-i386.c (elf_i386_check_relocs): Make r_symndx an int.
1274 * elf32-s390.c (elf_s390_check_relocs): Likewise.
1275 * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
1276 * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
1277 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
1278 * elf64-s390.c (elf_s390_check_relocs): Likewise.
1279 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1280 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
1281 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
1282 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
1283 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
1284 * elf64-mmix.c (_bfd_mmix_after_linker_allocation): Cast size_t args
1285 and use %lu for error message.
1286 * elflink.c (elf_link_adjust_relocs): Delete extra error message arg.
1287 * mmo.c (mmo_scan): Make stab_loc a file_ptr. Cast expression for
1290 * elf32-arm.c (elf32_arm_tls_relax): Correct format string and args
1292 (elf32_arm_final_link_relocate): Likewise.
1293 * coff-arm.c (bfd_arm_process_before_allocation): Likewise.
1294 * coffcode.h (styp_to_sec_flags): Likewise.
1295 * cofflink.c (_bfd_coff_write_global_sym): Likewise.
1296 * ecoff.c (_bfd_ecoff_slurp_symbol_table): Likewise.
1297 * elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise.
1298 * elf32-bfin.c (bfinfdpic_check_relocs): Likewise.
1299 (elf32_bfin_merge_private_bfd_data): Likewise.
1300 * elf32-cris.c (cris_elf_relocate_section): Likewise.
1301 * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
1302 * elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise.
1303 (i370_elf_relocate_section): Likewise.
1304 * elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise.
1305 * elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise.
1306 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
1307 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
1308 * elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise.
1309 * elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise.
1310 * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
1311 * elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise.
1312 (_bfd_mips_elf_merge_private_bfd_data): Likewise.
1313 * ieee.c (ieee_write_id, read_id): Likewise.
1314 * mach-o.c (bfd_mach_o_write_contents): Likewise.
1315 (bfd_mach_o_layout_commands, bfd_mach_o_read_section_32): Likewise.
1316 (bfd_mach_o_read_section_64, bfd_mach_o_read_symtab_symbol): Likewise.
1317 (bfd_mach_o_read_command, bfd_mach_o_header_p): Likewise.
1318 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Likewise.
1319 * stabs.c (_bfd_link_section_stabs): Likewise.
1321 * coff-arm.c (coff_arm_relocate_section): Use L modifier in error
1323 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
1324 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
1325 * coff-rs6000.c (xcoff_reloc_type_toc): Likewise.
1326 * coff-sh.c (sh_relax_section): Likewise.
1327 (sh_relax_delete_bytes, sh_swap_insns): Likewise.
1328 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
1329 * coffcode.h (coff_slurp_reloc_table): Likewise.
1330 * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
1331 (_bfd_coff_read_string_table): Likewise.
1332 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
1333 * compress.c (bfd_get_full_section_contents): Likewise.
1334 * dwarf2.c (read_formatted_entries, decode_line_info): Likewise.
1335 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
1336 * elf.c (bfd_elf_string_from_elf_section): Likewise.
1337 * elf32-arc.c (arc_special_overflow_checks): Likewise.
1338 * elf32-arm.c (elf32_arm_tls_relax): Likewise.
1339 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Likewise.
1340 (elf32_arm_write_section): Likewise.
1341 * elf32-bfin.c (bfin_relocate_section): Likewise.
1342 (bfinfdpic_relocate_section): Likewise.
1343 * elf32-hppa.c (hppa_build_one_stub): Likewise.
1344 (final_link_relocate, elf32_hppa_relocate_section): Likewise.
1345 * elf32-i386.c (elf_i386_tls_transition): Likewise.
1346 (elf_i386_relocate_section): Likewise.
1347 * elf32-ip2k.c (ip2k_final_link_relocate): Likewise.
1348 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
1349 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
1350 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1351 * elf32-metag.c (elf_metag_relocate_section): Likewise.
1352 * elf32-nds32.c (unrecognized_reloc_msg): Likewise.
1353 (nds32_elf_relax_longcall1, nds32_elf_relax_longcall2): Likewise.
1354 (nds32_elf_relax_longcall3, nds32_elf_relax_longjump1): Likewise.
1355 (nds32_elf_relax_longjump2, nds32_elf_relax_longjump3): Likewise.
1356 (nds32_elf_relax_longcall4, nds32_elf_relax_longcall5): Likewise.
1357 (nds32_elf_relax_longcall6, nds32_elf_relax_longjump4): Likewise.
1358 (nds32_elf_relax_longjump5, nds32_elf_relax_longjump6): Likewise.
1359 (nds32_elf_relax_longjump7, nds32_elf_relax_loadstore): Likewise.
1360 (nds32_elf_relax_ptr, nds32_elf_ex9_build_hash_table): Likewise.
1361 * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
1362 * elf32-rx.c (UNSAFE_FOR_PID): Likewise.
1363 * elf32-s390.c (invalid_tls_insn, elf_s390_relocate_section): Likewise.
1364 * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
1365 * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
1366 * elf32-sh.c (sh_elf_relax_section): Likewise.
1367 (sh_elf_relax_delete_bytes, sh_elf_swap_insns): Likewise.
1368 (sh_elf_relocate_section): Likewise.
1369 * elf32-sh64.c (shmedia_prepare_reloc): Likewise.
1370 * elf32-spu.c (spu_elf_relocate_section): Likewise.
1371 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
1372 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
1373 * elf32-v850.c (v850_elf_relax_section): Likewise.
1374 * elf32-vax.c (elf_vax_check_relocs): Likewise.
1375 (elf_vax_relocate_section): Likewise.
1376 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
1377 (extend_ebb_bounds_forward, extend_ebb_bounds_backward): Likewise.
1378 (compute_text_actions, compute_ebb_proposed_actions): Likewise.
1379 (do_fix_for_relocatable_link): Likewise.
1380 * elf64-alpha.c (elf64_alpha_relax_got_load): Likewise.
1381 (elf64_alpha_relax_with_lituse): Likewise.
1382 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Likewise.
1383 (elf_hppa_final_link_relocate): Likewise.
1384 * elf64-ia64-vms.c (elf64_ia64_relax_section): Likewise.
1385 (elf64_ia64_choose_gp, elf64_ia64_relocate_section): Likewise.
1386 (elf64_vms_link_add_object_symbols): Likewise.
1387 * elf64-mmix.c (mmix_elf_perform_relocation): Likewise.
1388 (mmix_final_link_relocate): Likewise.
1389 * elf64-s390.c (invalid_tls_insn): Likewise.
1390 (elf_s390_relocate_section): Likewise.
1391 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
1392 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
1393 (elf_x86_64_relocate_section): Likewise.
1394 * elfcode.h (elf_slurp_symbol_table): Likewise.
1395 * elfcore.h (elf_core_file_p): Likewise.
1396 * elflink.c (elf_link_read_relocs_from_section): Likewise.
1397 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
1398 (elfNN_aarch64_relocate_section): Likewise.
1399 * elfnn-ia64.c (elfNN_ia64_relax_section): Likewise.
1400 (elfNN_ia64_choose_gp, elfNN_ia64_relocate_section): Likewise.
1401 * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
1402 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
1403 (_bfd_mips_elf_relocate_section): Likewise.
1404 (_bfd_mips_elf_finish_dynamic_symbol, mips_finish_exec_plt): Likewise.
1405 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
1406 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
1407 * ieee.c (ieee_slurp_external_symbols): Likewise.
1408 * ihex.c (ihex_write_object_content): Likewise.
1409 * mach-o.c (bfd_mach_o_build_exec_seg_command): Likewise.
1410 * merge.c (_bfd_merged_section_offset): Likewise.
1411 * mmo.c (mmo_write_loc_chunk): Likewise.
1412 (mmo_write_object_contents): Likewise.
1413 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Likewise.
1414 * stabs.c (_bfd_link_section_stabs): Likewise.
1415 * xcofflink.c (xcoff_link_add_symbols, xcoff_find_tc0): Likewise.
1417 2017-07-11 Alan Modra <amodra@gmail.com>
1419 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo.
1421 2017-07-11 Alan Modra <amodra@gmail.com>
1423 * elf32-ppc.c (ppc_elf_relocate_section): Emit "unexpected
1424 instruction" error using _bfd_error_handler, not einfo.
1426 2017-07-10 Nick Clifton <nickc@redhat.com>
1428 * coffcode.h (coff_slurp_symbol_table): Do not include an entry
1429 for C_AIX_WEAKEXT if it has the same value as C_WEAKEXT.
1431 2017-07-07 John Baldwin <jhb@FreeBSD.org>
1433 * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PTLWPINFO.
1435 2017-07-07 Alan Modra <amodra@gmail.com>
1437 * coffcode.h (coff_slurp_symbol_table): Handle C_AIX_WEAKEXT.
1439 2017-07-07 Alan Modra <amodra@gmail.com>
1441 * bfd.c (_doprnt): Replace "L" with "ll" when printing bfd_vma
1442 as long long. Move code replacing "ll" with "I64", and simplify.
1444 2017-07-06 H.J. Lu <hongjiu.lu@intel.com>
1446 * bfd.c (_doprnt): Convert 'L' to 'l' when setting wide_width
1449 2017-07-05 H.J. Lu <hongjiu.lu@intel.com>
1451 * dwarf2.c (line_info_add_include_dir_stub): Replace time with
1453 (line_info_add_file_name): Likewise.
1454 (decode_line_info): Likewise.
1456 2017-07-04 Tristan Gingold <gingold@adacore.com>
1458 * version.m4: Bump version to 2.29.51
1459 * configure: Regenerate.
1461 2017-07-04 Jiong Wang <jiong.wang@arm.com>
1463 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Remove the
1464 sanity check at the head of this function.
1466 2017-07-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1468 * dwarf2.c (struct dwarf2_debug): Add fields dwarf_line_str_buffer and
1469 dwarf_line_str_size.
1470 (struct attr_abbrev): Add field implicit_const.
1471 (dwarf_debug_sections): Add .debug_line_str.
1472 (enum dwarf_debug_section_enum): Add debug_line_str and debug_max.
1473 (dwarf_debug_section_assert): Add static assertion.
1474 (read_indirect_line_string): New.
1475 (read_abbrevs): Support DW_FORM_implicit_const.
1476 (is_str_attr): Support DW_FORM_line_strp.
1477 (read_attribute_value): Support DW_FORM_line_strp and
1478 DW_FORM_implicit_const.
1479 (read_attribute): Support DW_FORM_implicit_const.
1480 (line_info_add_include_dir, line_info_add_include_dir_stub):
1481 (line_info_add_file_name, read_formatted_entries): New.
1482 (decode_line_info, parse_comp_unit): Support DWARF 5.
1483 (_bfd_dwarf2_cleanup_debug_info): Free dwarf_line_str_buffer.
1485 2017-07-03 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
1487 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove the
1488 abort statement that was put for symbols that are not dynamic.
1490 2017-07-03 Tristan Gingold <gingold@adacore.com>
1492 * po/bfd.pot: Regenerate
1494 2017-07-03 Alan Modra <amodra@gmail.com>
1496 * bfd.c (_doprnt): Rewrite "ll" and "L" modifiers to "I64" for
1497 __MSVCRT__. Support "L" modifier for bfd_vma. Formatting.
1498 * elf.c (setup_group): Use "Lx" to print sh_size.
1499 (_bfd_elf_setup_sections): Remove unnecessary cast and print
1500 unknown section type in hex.
1501 (copy_special_section_fields): Style fix.
1502 (bfd_section_from_shdr): Correct format for sh_link. Use a
1503 common error message for all the variants of unrecognized
1505 (assign_file_positions_for_load_sections): Use "Lx" for lma
1506 adjust error message.
1507 (assign_file_positions_for_non_load_sections): Formatting.
1508 (rewrite_elf_program_header): Formatting. Use "Lx" for
1509 bfd_vma values in error messages.
1510 * elfcode.h (elf_slurp_reloc_table_from_section): Cast
1511 ELF_R_SYM value to type expected by format.
1512 * elflink.c (elf_link_read_relocs_from_section): Use "Lx"
1514 (elf_link_add_object_symbols): Use "Lu" for symbol sizes.
1515 (elf_link_input_bfd): Use "Lx" for r_info.
1516 (bfd_elf_gc_record_vtinherit): Use "Lx" for offset.
1518 2017-07-03 Alan Modra <amodra@gmail.com>
1520 * bfd.c (bfd_scan_vma): Don't use long long unless HAVE_LONG_LONG.
1521 * coff-rs6000.c (FMT20): Handle hosts with 64-bit long and
1522 Microsoft C library variant of long long format specifier.
1523 (PRINT20): Cast value to bfd_uint64_t not long long.
1524 * coffcode.h (coff_print_aux): Use BFD_VMA_FMT.
1525 * coff-x86_64.c (coff_amd64_reloc): Use bfd_uint64_t rather than
1526 long long. Don't cast to bfd_vma.
1527 * elf32-score.c (score3_bfd_getl48): Likewise.
1528 * vms-alpha.c (_bfd_vms_slurp_eisd): Likewise.
1530 2017-07-03 Alan Modra <amodra@gmail.com>
1532 * elf.c (_bfd_elf_print_private_bfd_data): Use BFD_VMA_FMT to
1534 (bfd_elf_print_symbol): Don't cast symbol->flags.
1535 (_bfd_elf_symbol_from_bfd_symbol): Likewise.
1536 * elf32-ppc.c (ppc_elf_begin_write_processing): Correct
1537 _bfd_error_handler argument order.
1538 (ppc_elf_merge_private_bfd_data): Don't cast flags.
1540 2017-07-03 Alan Modra <amodra@gmail.com>
1542 * configure.ac: Invoke AC_CHECK_TYPES for long long. Invoke
1543 AC_TYPE_LONG_DOUBLE.
1544 * configure: Regenerate.
1545 * config.in: Regenerate.
1547 2017-06-29 Andrew Waterman <andrew@sifive.com>
1549 * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Fix TLS copy
1552 2017-06-29 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
1554 * elfxx-sparc.c (allocate_dynrelocs): Don't make a symbol dynamic
1555 unless it is undefined weak.
1556 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Set the flag
1557 relative_reloc to direct non-dynamic symbols to R_SPARC_RELATIVE
1559 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): If symbol
1560 is not dynamic in PIC, abort.
1562 2017-06-29 Jiong Wang <jiong.wang@arm.com>
1565 * elfnn-aarch64.c (elfNN_aarch64_allocate_dynrelocs): Only make
1566 undefined weak symbols into dynamic.
1567 (elfNN_aarch64_final_link_relocate): Generate runtime RELATIVE
1568 relocation for non-dynamic symbols.
1569 (elfNN_aarch64_finish_dynamic_symbol): Add sanity check.
1571 2017-06-29 Jiong Wang <jiong.wang@arm.com>
1573 * elfnn-aarch64.c (aarch64_relocation_aginst_gp_p): New function.
1574 (elfNN_aarch64_final_link_relocate): Delete duplicated code for
1575 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15, BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
1576 BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
1577 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Optimize the
1580 2017-06-29 Andreas Arnez <arnez@linux.vnet.ibm.com>
1582 * elf-bfd.h (elfcore_write_s390_gs_cb): Add prototype.
1583 (elfcore_write_s390_gs_bc): Likewise.
1584 * elf.c (elfcore_grok_s390_gs_cb): New function.
1585 (elfcore_grok_s390_gs_bc): New function.
1586 (elfcore_grok_note): Call them.
1587 (elfcore_write_s390_gs_cb): New function.
1588 (elfcore_write_s390_gs_bc): New function.
1589 (elfcore_write_register_note): Call them.
1591 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
1593 * libbfd.c (_bfd_generic_get_section_contents): Don't call
1594 bfd_get_file_size. Check archive element size.
1595 (_bfd_generic_get_section_contents_in_window): Likewise.
1597 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
1599 * bfd-in2.h: Regenerated.
1600 * bfdio.c (bfd_get_size): Change return type to ufile_ptr.
1601 (bfd_get_file_size): Likewise.
1603 2017-06-28 Maciej W. Rozycki <macro@imgtec.com>
1604 Matthew Fortune <matthew.fortune@imgtec.com>
1606 * archures.c (bfd_mach_mips_interaptiv_mr2): New macro.
1607 * cpu-mips.c (I_interaptiv_mr2): New enum value.
1608 (arch_info_struct): Add "mips:interaptiv-mr2" entry.
1609 * elfxx-mips.c (_bfd_elf_mips_mach) <E_MIPS_MACH_IAMR2>: New
1611 (mips_set_isa_flags) <bfd_mach_mips_interaptiv_mr2>: Likewise.
1612 (bfd_mips_isa_ext) <bfd_mach_mips_interaptiv_mr2>: Likewise.
1613 (print_mips_isa_ext) <AFL_EXT_INTERAPTIV_MR2>: Likewise.
1614 (mips_mach_extensions): Add `bfd_mach_mipsisa32r3' and
1615 `bfd_mach_mips_interaptiv_mr2' entries.
1616 * bfd-in2.h: Regenerate.
1618 2017-06-27 Nick Clifton <nickc@redhat.com>
1620 * tekhex.c (pass_over): Revert accidental conversion of a local
1621 array to a static array.
1623 2017-06-27 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
1626 * elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Adjust
1627 reloc addend if necessary. Adjust diff only if
1628 shrinked_insn_address < end_address.
1630 2017-06-27 Alan Modra <amodra@gmail.com>
1633 * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
1634 (_bfd_generic_get_section_contents_in_window): Likewise.
1636 2017-06-26 Kuan-Lin Chen <rufus@andestech.com>
1638 * elfnn-riscv.c (perform_relocation): Support the new
1639 R_RISCV_32_PCREL relocation.
1640 (riscv_elf_relocate_section): Likewise.
1641 * elfxx-riscv.c (howto_table): Likewise.
1642 (riscv_reloc_map): Likewise.
1643 * bfd-in2.h (BFD_RELOC_RISCV_32_PCREL): New relocation.
1644 * libbfd.h: Regenerate.
1646 2017-06-27 Alan Modra <amodra@gmail.com>
1649 * libbfd.c (_bfd_generic_get_section_contents): Delete abort.
1650 Use unsigned file pointer type, and remove cast.
1651 * libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise.
1652 Add "count", not "sz".
1654 2017-06-26 Pedro Alves <palves@redhat.com>
1657 * libbfd.c (_bfd_generic_get_section_contents): Add "count", not
1660 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
1663 * libbfd.c (_bfd_generic_get_section_contents_in_window): Add
1666 2017-06-26 Maciej W. Rozycki <macro@imgtec.com>
1668 * cpu-mips.c (arch_info_struct): Mark the 4010 32-bit.
1669 * elfxx-mips.c (mips_set_isa_flags) <bfd_mach_mips4010>: Set
1670 E_MIPS_ARCH_2 rather than E_MIPS_ARCH_3 in `e_flags'.
1671 (mips_mach_extensions): Mark `bfd_mach_mips4010' as extending
1672 `bfd_mach_mips6000' rather than `bfd_mach_mips4000'.
1674 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
1677 * compress.c (bfd_get_full_section_contents): Don't check the
1679 * libbfd.c (_bfd_generic_get_section_contents): Check for and
1680 reject a section whose size + offset is greater than the size
1682 (_bfd_generic_get_section_contents_in_window): Likewise.
1684 2017-06-26 Nick Clifton <nickc@redhat.com>
1687 * tekhex.c (getvalue): Check for the source pointer exceeding the
1688 end pointer before the first byte is read.
1690 2017-06-26 Nick Clifton <nickc@redhat.com>
1693 * opncls.c (get_build_id): Check that the section is big enough
1694 to contain the whole note.
1695 * compress.c (bfd_get_full_section_contents): Check for and reject
1696 a section whose size is greater than the size of the entire file.
1697 * elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not
1698 contain a notes section.
1700 2017-06-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1702 * elf64-s390.c (elf_s390_additional_program_headers): Add NULL
1704 (elf_s390_modify_segment_map): Likewise.
1705 (bfd_elf_s390_set_options): Lisewise.
1707 2017-06-26 Alan Modra <amodra@gmail.com>
1709 * elflink.c (_bfd_elf_link_create_dynstrtab): Don't make dynobj
1711 (_bfd_elf_size_group_sections): Skip --just-syms bfds.
1712 (bfd_elf_size_dynamic_sections): Ignore .note.GNU-stack and
1713 .preinit_array on --just-syms bfds.
1714 (_bfd_elf_gc_mark_extra_sections): Skip --just-syms bfds.
1715 (elf_gc_sweep, bfd_elf_parse_eh_frame_entries): Likewise.
1716 (bfd_elf_gc_sections, bfd_elf_discard_info): Likewise.
1718 2017-06-25 Sergei Trofimovich <slyfox@gentoo.org>
1720 * elf.c (find_link): Bounds check "hint".
1722 2017-06-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
1724 * elf32-arm.c (using_thumb_only): Update list of architectures in
1725 BFD_ASSERT for which the logic is valid.
1726 (using_thumb2_bl): Likewise.
1727 (using_thumb2): Likewise and return true for ARMv8-R.
1728 (arch_has_arm_nop): Likewise.
1729 (tag_cpu_arch_combine): New v8r table for ARMv8-R Tag_CPU_arch
1730 merging logic. Update commentis for value 15 of v8m_baseline,
1731 v8m_mainline and v4t_plus_v6_m arrays. Use v8r array to decide
1732 merging of value 15 of Tag_CPU_arch.
1734 2017-06-23 Jiong Wang <jiong.wang@arm.com>
1736 * reloc.c (BFD_RELOC_AARCH64_ADR_GOTPAGE): Rename to
1737 BFD_RELOC_AARCH64_ADR_GOT_PAGE
1738 * bfd-in2.h: Regenerate.
1740 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1742 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Move
1743 the error_alignment label forward. Properly align program
1744 property note section.
1746 2017-06-22 Eric Christopher <echristo@gmail.com>
1748 * elf32-arm.c (elf32_arm_final_link_relocate): Use labs rather than
1749 abs to fix a truncation warning.
1751 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1753 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Resolve
1754 local undefined weak symbol to 0.
1755 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Likewise.
1757 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1759 * elf32-i386.c (elf_i386_merge_gnu_properties): If info->shstk
1760 is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
1761 (elf_i386_link_setup_gnu_properties): If info->shstk is set,
1762 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
1763 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): If
1764 info->shstk is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
1765 (elf_x86_64_link_setup_gnu_properties): If info->shstk is set,
1766 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
1768 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1770 * elf32-i386.c (elf_i386_lazy_ibt_plt0_entry): New.
1771 (elf_i386_lazy_ibt_plt_entry): Likewise.
1772 (elf_i386_pic_lazy_ibt_plt0_entry): Likewise.
1773 (elf_i386_non_lazy_ibt_plt_entry): Likewise.
1774 (elf_i386_pic_non_lazy_ibt_plt_entry): Likewise.
1775 (elf_i386_eh_frame_lazy_ibt_plt): Likewise.
1776 (elf_i386_lazy_plt_layout): Likewise.
1777 (elf_i386_non_lazy_plt_layout): Likewise.
1778 (elf_i386_link_hash_entry): Add plt_second.
1779 (elf_i386_link_hash_table): Add plt_second and
1780 plt_second_eh_frame.
1781 (elf_i386_allocate_dynrelocs): Use the second PLT if needed.
1782 (elf_i386_size_dynamic_sections): Use .plt.got unwind info for
1783 the second PLT. Check the second PLT.
1784 (elf_i386_relocate_section): Use the second PLT to resolve
1785 PLT reference if needed.
1786 (elf_i386_finish_dynamic_symbol): Fill and use the second PLT if
1788 (elf_i386_finish_dynamic_sections): Set sh_entsize on the
1789 second PLT. Generate unwind info for the second PLT.
1790 (elf_i386_plt_type): Add plt_second.
1791 (elf_i386_get_synthetic_symtab): Support the second PLT.
1792 (elf_i386_parse_gnu_properties): Support
1793 GNU_PROPERTY_X86_FEATURE_1_AND.
1794 (elf_i386_merge_gnu_properties): Support
1795 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
1796 on GNU_PROPERTY_X86_FEATURE_1_IBT
1797 (elf_i386_link_setup_gnu_properties): If info->ibt is set,
1798 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
1799 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
1800 is set on all relocatable inputs.
1801 * elf64-x86-64.c (elf_x86_64_lazy_ibt_plt_entry): New.
1802 (elf_x32_lazy_ibt_plt_entry): Likewise.
1803 (elf_x86_64_non_lazy_ibt_plt_entry): Likewise.
1804 (elf_x32_non_lazy_ibt_plt_entry): Likewise.
1805 (elf_x86_64_eh_frame_lazy_ibt_plt): Likewise.
1806 (elf_x32_eh_frame_lazy_ibt_plt): Likewise.
1807 (elf_x86_64_lazy_ibt_plt): Likewise.
1808 (elf_x32_lazy_ibt_plt): Likewise.
1809 (elf_x86_64_non_lazy_ibt_plt): Likewise.
1810 (elf_x32_non_lazy_ibt_plt): Likewise.
1811 (elf_x86_64_get_synthetic_symtab): Support the second PLT.
1812 (elf_x86_64_parse_gnu_properties): Support
1813 GNU_PROPERTY_X86_FEATURE_1_AND.
1814 (elf_x86_64_merge_gnu_properties): Support
1815 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
1816 on GNU_PROPERTY_X86_FEATURE_1_IBT
1817 (elf_x86_64_link_setup_gnu_properties): If info->ibt is set,
1818 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
1819 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
1820 is set on all relocatable inputs.
1822 2017-06-22 Nick Clifton <nickc@redhat.com>
1825 * som.c (setup_sections): NUL terminate the space_strings buffer.
1826 Check that the space.name field does not index beyond the end of
1827 the space_strings buffer.
1829 2017-06-21 Nick Clifton <nickc@redhat.com>
1832 * coff-sh.c (sh_reloc): Check for an out of range reloc.
1834 2017-06-21 Nick Clifton <nickc@redhat.com>
1837 * vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as
1838 type of the size parameter.
1839 (_bfd_vms_save_counted_string): Add second parameter - the maximum
1840 length of the counted string.
1841 * vms.h (_bfd_vms_save_sized_string): Update prototype.
1842 (_bfd_vms_save_counted_string): Likewise.
1843 * vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to
1844 _bfd_vms_save_counted_string.
1845 (_bfd_vms_slurp_ehdr): Likewise.
1846 (_bfd_vms_slurp_egsd): Likewise.
1847 (Parse_module): Likewise.
1849 2017-06-21 Alan Modra <amodra@gmail.com>
1851 * elf64-ppc.c (ppc64_elf_size_stubs): Test for localentry:0 plt
1852 calls before tocsave calls.
1853 (ppc64_elf_relocate_section): Allow localentry:0 plt calls without
1856 2017-06-21 Nick Clifton <nickc@redhat.com>
1859 * reloc.c (bfd_generic_get_relocated_section_contents): Fail if
1860 bfd_get_full_section_contents returns no contents.
1862 2017-06-21 Nick Clifton <nickc@redhat.com>
1865 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized
1868 2017-06-21 Nick Clifton <nickc@redhat.com>
1871 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section
1873 (image_set_ptr): Likewise.
1874 (alpha_vms_fix_sec_rel): Likewise.
1875 (alpha_vms_slurp_relocs): Likewise.
1877 2017-06-21 Nick Clifton <nickc@redhat.com>
1880 * ieee.c (ieee_slurp_sections): Check for a NULL return from
1882 (ieee_archive_p): Likewise.
1883 (ieee_object_p): Likewise.
1885 2017-06-21 Nick Clifton <nickc@redhat.com>
1888 * elf.c (setup_group): Zero the group section pointer list after
1889 allocation so that loops can be caught. Check for NULL pointers
1890 when processing a group list.
1892 2017-06-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1894 * elf-s390.h: New file.
1895 * elf64-s390.c (struct elf_s390_link_hash_table): Add params
1897 (elf_s390_additional_program_headers): New function.
1898 (elf_s390_modify_segment_map): New function.
1899 (bfd_elf_s390_set_options): New function.
1900 (elf_backend_additional_program_headers)
1901 (elf_backend_modify_segment_map): Add macro definitions.
1903 2017-06-19 H.J. Lu <hongjiu.lu@intel.com>
1906 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
1907 the DYNAMIC bit instead of bfd_count_sections.
1909 2017-06-19 Nick Clifton <nickc@redhat.com>
1912 * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record
1914 (evax_bfd_print_eeom): Likewise.
1915 (evax_bfd_print_egsd): Check for an overlarge record length.
1916 (evax_bfd_print_etir): Likewise.
1918 2017-06-19 Nick Clifton <nickc@redhat.com>
1921 * libieee.h (struct common_header_type): Add end_p field.
1922 * ieee.c (this_byte_and_next): Do not advance input_p beyond
1924 (read_id): Check for a length that exceeds the remaining bytes in
1926 (ieee_seek): Initialise end_p.
1927 (ieee_archive_p): Likewise.
1928 (ieee_object_p): Likewise.
1930 2017-06-19 Nick Clifton <nickc@redhat.com>
1933 * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset
1934 before reading the EIHS structure entries.
1936 2017-06-19 Nick Clifton <nickc@redhat.com>
1939 * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for
1940 gsd_size. Check that there are enough bytes remaining to read the
1941 type and size of the next egsd. Check that the size of the egsd
1942 does not exceed the size of the record.
1944 2017-06-19 Alan Modra <amodra@gmail.com>
1946 * config.bfd: Correct targ_underscore for cris.
1948 2017-06-18 Alan Modra <amodra@gmail.com>
1950 * config.bfd: Correct targ_underscore for epiphany, ip2k,
1951 m32c, mn10200, pru, rl78, rx, crisv32 and v850.
1953 2017-06-16 Nick Clifton <nickc@redhat.com>
1955 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
1956 bucketlist is empty because there are no symbols to add to the
1959 2017-06-16 Alan Modra <amodra@gmail.com>
1965 * targets.c (struct bfd_target): Add _bfd_define_start_stop.
1966 (BFD_JUMP_TABLE_LINK): Likewise.
1967 * elf-bfd.h (bfd_elf_define_start_stop): Declare.
1968 * elflink.c (_bfd_elf_gc_mark_rsec): Update comment.
1969 (bfd_elf_define_start_stop): New function.
1970 * linker.c (bfd_generic_define_start_stop): New function.
1971 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init
1973 * aout-adobe.c (aout_32_bfd_define_start_stop): Define.
1974 * aout-target.h (MY_bfd_define_start_stop): Define.
1975 * aout-tic30.c (MY_bfd_define_start_stop): Define.
1976 * binary.c (binary_bfd_define_start_stop): Define.
1977 * bout.c (b_out_bfd_define_start_stop): Define.
1978 * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define.
1979 * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define.
1980 * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define.
1981 * coffcode.h (coff_bfd_define_start_stop): Define.
1982 * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define.
1983 * i386msdos.c (msdos_bfd_define_start_stop): Define.
1984 * i386os9k.c (os9k_bfd_define_start_stop): Define.
1985 * ieee.c (ieee_bfd_define_start_stop): Define.
1986 * ihex.c (ihex_bfd_define_start_stop): Define.
1987 * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define.
1988 * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define.
1989 * mmo.c (mmo_bfd_define_start_stop): Define.
1990 * nlm-target.h (nlm_bfd_define_start_stop): Define.
1991 * oasys.c (oasys_bfd_define_start_stop): Define.
1992 * pef.c (bfd_pef_bfd_define_start_stop): Define.
1993 * plugin.c (bfd_plugin_bfd_define_start_stop): Define.
1994 * ppcboot.c (ppcboot_bfd_define_start_stop): Define.
1995 * som.c (som_bfd_define_start_stop): Define.
1996 * srec.c (srec_bfd_define_start_stop): Define.
1997 * tekhex.c (tekhex_bfd_define_start_stop): Define.
1998 * versados.c (versados_bfd_define_start_stop): Define.
1999 * vms-alpha.c (vms_bfd_define_start_stop): Define.
2000 (alpha_vms_bfd_define_start_stop): Define.
2001 * xsym.c (bfd_sym_bfd_define_start_stop): Define.
2002 * bfd-in2.h: Regenerate.
2003 * libbfd.h: Regenerate.
2005 2017-06-16 Jiong Wang <jiong.wang@arm.com>
2007 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
2008 SYMBOL_REFERENCES_LOCAL.
2010 2017-06-15 Jiong Wang <jiong.wang@arm.com>
2013 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
2014 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
2015 runtime for if there needs copy relocation elimination.
2016 (need_copy_relocation_p): New function. Return true for symbol with
2017 pc-relative references and if it's against read-only sections.
2018 (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
2019 (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
2020 that are related with accessing external objects.
2021 (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change
2022 in elfNN_aarch64_check_relocs.
2024 2017-06-15 Nick Clifton <nickc@redhat.com>
2027 * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
2030 (ieee_archive_p): Likewise.
2032 2017-06-15 Nick Clifton <nickc@redhat.com>
2035 * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
2037 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
2039 * elf32-xtensa.c (elf_xtensa_be_plt_entry,
2040 elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays,
2041 keep both windowed and call0 ABI PLT definitions.
2042 (elf_xtensa_create_plt_entry): Use selected ABI to choose upper
2043 elf_xtensa_*_plt_entry endex.
2044 (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size.
2046 2017-06-14 Nick Clifton <nickc@redhat.com>
2049 * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
2052 2017-06-14 Nick Clifton <nickc@redhat.com>
2055 * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
2056 maximum value for the ascic pointer. Check that name processing
2057 does not read beyond this value.
2058 (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
2061 2017-06-14 Nick Clifton <nickc@redhat.com>
2064 * versados.c (versados_mkobject): Zero the allocated tdata structure.
2065 (process_otr): Check for an invalid offset in the otr structure.
2067 2017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
2069 * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
2071 2017-06-13 H.J. Lu <hongjiu.lu@intel.com>
2077 * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
2078 vtable field to a union.
2079 (_bfd_elf_is_start_stop): Removed.
2080 * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
2081 __start_SECNAME and __stop_SECNAME symbols.
2082 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
2083 * elflink.c (_bfd_elf_is_start_stop): Removed.
2084 (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
2085 _bfd_elf_is_start_stop.
2086 (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
2087 __stop_SECNAME symbols. Updated.
2088 (elf_gc_smash_unused_vtentry_relocs): Likewise.
2089 (bfd_elf_gc_record_vtinherit): Likewise.
2090 (bfd_elf_gc_record_vtentry): Likewise.
2092 2017-06-13 Nick Clifton <nickc@redhat.com>
2095 * elflink.c (elf_link_adjust_relocs): Generate an error when
2096 encountering a reloc against a symbol removed by garbage
2099 2017-06-12 H.J. Lu <hongjiu.lu@intel.com>
2101 * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
2102 to merge_gnu_properties.
2103 * elf-properties.c (elf_merge_gnu_properties): Add struct
2104 bfd_link_info * and pass it to merge_gnu_properties.
2105 (elf_merge_gnu_property_list): Add struct bfd_link_info *
2106 and pass it to elf_merge_gnu_properties.
2107 (_bfd_elf_link_setup_gnu_properties): Pass info to
2108 elf_merge_gnu_property_list.
2109 * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
2111 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
2113 2017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
2116 * binary.c (binary_set_section_contents): Scale lma by octets
2117 per byte to set filepos.
2119 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2121 * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
2124 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2126 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
2129 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2131 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
2132 patched section contents for TLS IE reloc.
2133 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
2135 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2137 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
2138 RELOC_FOR_GLOBAL_SYMBOL macro.
2140 2018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2142 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
2145 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2147 * config/tc-arc.c (md_undefined_symbol): Changed.
2148 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
2150 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2152 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
2155 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2157 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
2158 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
2160 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2162 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
2165 2017-06-08 Richard Earnshaw <rearnsha@arm.com>
2167 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
2168 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
2169 is non-zero. Add clarifying comments.
2171 2017-06-08 H.J. Lu <hongjiu.lu@intel.com>
2173 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
2174 name. Use local IFUNC symbol name string to report unsupported
2175 non-PIC call to IFUNC function.
2176 (elf_i386_relocate_section): Dump local IFUNC name with minfo
2177 when generating R_386_IRELATIVE relocation.
2178 (elf_i386_finish_dynamic_symbol): Likewise.
2179 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
2181 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
2182 when generating R_X86_64_IRELATIVE relocation.
2183 (elf_x86_64_finish_dynamic_symbol): Likewise.
2185 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2187 * elf.c (setup_group): Make sure BFD sections are created for all
2188 group sections in the input file when processing SHF_GROUP
2190 (bfd_section_from_shdr): Avoid duplicating logic already
2191 implemented in `setup_group'.
2193 2017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
2196 * peXXigen.c (pe_print_idata): Use the address of the first thunk
2197 if the hint address is zero.
2199 2017-06-06 James Clarke <jrtc27@jrtc27.com>
2202 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
2203 ELF_COMMON_DEF_P for common symbols.
2205 2017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
2207 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
2208 SEC_GROUP sections as SEC_EXCLUDE.
2209 (bfd_elf_set_group_contents): Replace use of abort with an assert.
2210 (assign_section_numbers): Use resolve_section_groups flag instead
2211 of relocatable link type.
2212 (_bfd_elf_init_private_section_data): Use resolve_section_groups
2213 flag instead of checking the final_link flag for part of the
2214 checks in here. Fix white space as a result.
2215 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
2216 instead of relocatable link type.
2217 (bfd_elf_final_link): Likewise.
2219 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2221 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
2223 * elf32-score.c (score_elf_final_link_relocate): Likewise.
2224 (s3_bfd_score_elf_check_relocs): Likewise.
2225 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
2226 (score_elf_final_link_relocate): Likewise.
2227 (s7_bfd_score_elf_check_relocs): Likewise.
2229 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2231 * elflink.c (init_reloc_cookie_rels): Remove unused variable
2234 2017-06-06 Maciej W. Rozycki <macro@imgtec.com>
2236 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
2237 from `reloc_count' rather than decrementing it.
2238 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
2239 `reloc_count' by `int_rels_per_ext_rel'.
2240 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
2241 `reloc_count' by `int_rels_per_ext_rel' for last relocation
2242 entry determination.
2243 (s3_bfd_score_elf_check_relocs): Likewise.
2244 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
2245 (s7_bfd_score_elf_relocate_section): Likewise.
2246 (s7_bfd_score_elf_check_relocs): Likewise.
2247 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
2248 prototype and function.
2249 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
2250 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
2251 triple rather than once the sum of REL and RELA relocation entry
2253 (bfd_elf64_get_reloc_upper_bound): Remove macro.
2254 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
2255 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
2256 storage allocation size determination.
2257 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
2258 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
2259 by `int_rels_per_ext_rel' for last relocation entry
2261 (bfd_elf_final_link): Do not multiply `reloc_count' by
2262 `int_rels_per_ext_rel' for internal relocation storage
2263 allocation size determination.
2264 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
2265 `int_rels_per_ext_rel' for last relocation entry determination.
2266 (elf_gc_smash_unused_vtentry_relocs): Likewise.
2267 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
2268 (_bfd_mips_elf_relocate_section): Likewise.
2270 2017-06-05 Alan Modra <amodra@gmail.com>
2273 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
2275 2017-06-01 John Baldwin <jhb@FreeBSD.org>
2277 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
2278 determine structure sizes.
2279 (elfcore_grok_freebsd_prstatus): Likewise.
2281 2017-06-01 Alan Modra <amodra@gmail.com>
2283 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
2284 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
2286 (is_elfv2_localentry0): New function.
2287 (ppc64_elf_tls_setup): Default params->plt_localentry0.
2288 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
2289 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
2290 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
2291 optimized localentry:0 stubs.
2292 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
2293 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
2295 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
2297 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
2299 2017-05-30 Casey Smith <clegg89@gmail.com>
2302 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
2303 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
2305 2017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
2307 * cpu-arc.c (arc_compatible): New function.
2309 2017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
2311 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
2313 2017-05-30 H.J. Lu <hongjiu.lu@intel.com>
2316 * bfdio.c (bfd_get_file_size): New function.
2317 * bfd-in2.h: Regenerated.
2319 2017-05-23 Dilian Palauzov <git-dpa@aegee.org>
2321 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
2324 2017-05-22 H.J. Lu <hongjiu.lu@intel.com>
2326 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
2327 dynobj instead of htab->elf.dynobj.
2329 2017-05-19 Maciej W. Rozycki <macro@imgtec.com>
2331 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
2333 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
2334 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
2335 actual number of internal relocations retrieved. Adjust
2336 function description.
2337 (bfd_elf64_canonicalize_reloc): Remove macro.
2338 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
2340 2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
2342 * archures.c (bfd_mach_sparc_v9m8): Define.
2343 (bfd_mach_sparc_v8plusm8): Likewise.
2344 (bfd_mach_sparc_v9_p): Adjust to M8.
2345 (bfd_mach_sparc_64bit_p): Likewise.
2346 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
2347 bfd_mach_sparc_v8plusm8.
2348 * bfd-in2.h: Regenerated.
2349 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
2351 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
2352 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
2353 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
2355 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
2356 bfd_mach_sparc_v8plusm8.
2358 2017-05-19 Alan Modra <amodra@gmail.com>
2360 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
2361 debug and special sections when no non-note alloc sections in an
2364 2017-05-18 Alan Modra <amodra@gmail.com>
2366 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
2367 * elf-m10300.c: Likewise.
2369 * elf32-arc.c: Likewise.
2370 * elf32-bfin.c: Likewise.
2371 * elf32-m68k.c: Likewise.
2372 * elf32-nds32.c: Likewise.
2373 * elf32-tilepro.c: Likewise.
2374 * elflink.c: Likewise.
2375 * elfnn-aarch64.c: Likewise.
2376 * elfnn-riscv.c: Likewise.
2377 * elfxx-tilegx.c: Likewise.
2378 * mach-o.c: Likewise.
2379 * peXXigen.c: Likewise.
2380 * vms-alpha.c: Likewise.
2381 * vms-lib.c: Likewise.
2383 2017-05-17 H.J. Lu <hongjiu.lu@intel.com>
2386 * elflink.c (elf_gc_mark_debug_section): New function.
2387 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
2388 referenced by kept debug sections.
2390 2017-05-16 Alan Modra <amodra@gmail.com>
2392 * elf-m10300.c: Rename occurrences of non_ir_ref.
2393 * elf32-arm.c: Likewise.
2394 * elf32-bfin.c: Likewise.
2395 * elf32-cr16.c: Likewise.
2396 * elf32-cris.c: Likewise.
2397 * elf32-d10v.c: Likewise.
2398 * elf32-dlx.c: Likewise.
2399 * elf32-fr30.c: Likewise.
2400 * elf32-frv.c: Likewise.
2401 * elf32-hppa.c: Likewise.
2402 * elf32-i370.c: Likewise.
2403 * elf32-i386.c: Likewise.
2404 * elf32-iq2000.c: Likewise.
2405 * elf32-lm32.c: Likewise.
2406 * elf32-m32c.c: Likewise.
2407 * elf32-m32r.c: Likewise.
2408 * elf32-m68hc1x.c: Likewise.
2409 * elf32-m68k.c: Likewise.
2410 * elf32-mcore.c: Likewise.
2411 * elf32-metag.c: Likewise.
2412 * elf32-microblaze.c: Likewise.
2413 * elf32-moxie.c: Likewise.
2414 * elf32-msp430.c: Likewise.
2415 * elf32-mt.c: Likewise.
2416 * elf32-nios2.c: Likewise.
2417 * elf32-or1k.c: Likewise.
2418 * elf32-ppc.c: Likewise.
2419 * elf32-rl78.c: Likewise.
2420 * elf32-s390.c: Likewise.
2421 * elf32-score.c: Likewise.
2422 * elf32-score7.c: Likewise.
2423 * elf32-sh.c: Likewise.
2424 * elf32-tic6x.c: Likewise.
2425 * elf32-tilepro.c: Likewise.
2426 * elf32-v850.c: Likewise.
2427 * elf32-vax.c: Likewise.
2428 * elf32-xstormy16.c: Likewise.
2429 * elf32-xtensa.c: Likewise.
2430 * elf64-alpha.c: Likewise.
2431 * elf64-hppa.c: Likewise.
2432 * elf64-ia64-vms.c: Likewise.
2433 * elf64-mmix.c: Likewise.
2434 * elf64-ppc.c: Likewise.
2435 * elf64-s390.c: Likewise.
2436 * elf64-sh64.c: Likewise.
2437 * elf64-x86-64.c: Likewise.
2438 * elflink.c: Likewise.
2439 * elfnn-aarch64.c: Likewise.
2440 * elfnn-ia64.c: Likewise.
2441 * elfnn-riscv.c: Likewise.
2442 * elfxx-mips.c: Likewise.
2443 * elfxx-sparc.c: Likewise.
2444 * elfxx-tilegx.c: Likewise.
2445 * linker.c: Likewise.
2447 2017-05-16 Alan Modra <amodra@gmail.com>
2449 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
2450 * elflink.c (elf_link_add_object_symbols): Update to use
2452 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
2454 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
2456 2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
2458 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
2460 2017-05-12 H.J. Lu <hongjiu.lu@intel.com>
2462 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
2463 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
2465 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
2467 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
2469 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
2471 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
2472 to plt_second/plt_second_eh_frame.
2473 (elf_x86_64_link_hash_newfunc): Updated.
2474 (elf_x86_64_allocate_dynrelocs): Likewise.
2475 (elf_x86_64_size_dynamic_sections): Likewise.
2476 (elf_x86_64_relocate_section): Likewise.
2477 (elf_x86_64_finish_dynamic_symbol): Likewise.
2478 (elf_x86_64_finish_dynamic_sections): Likewise.
2479 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
2480 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
2482 (elf_backend_setup_gnu_properties): Updated. Create the
2483 .plt.sec section instead of the .plt.sec section.
2485 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
2487 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
2488 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
2489 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
2491 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
2493 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
2494 (bfd_elf64_set_reloc): Define.
2495 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
2497 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
2499 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
2500 (struct bfd_target): New field _bfd_set_reloc.
2501 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
2502 * reloc.c (_bfd_generic_set_reloc): New function.
2503 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
2504 * nlm-target.h (nlm_set_reloc): Likewise.
2505 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
2506 * aout-tic30.c (MY_set_reloc): Likewise.
2507 * aout-target.h (MY_set_reloc): Likewise.
2508 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
2509 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
2510 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
2511 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
2512 * aout-adobe.c (aout_32_set_reloc): Likewise.
2513 * bout.c (b_out_set_reloc): Likewise.
2514 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
2515 * i386os9k.c (aout_32_set_reloc): Likewise.
2516 * ieee.c (ieee_set_reloc): Likewise.
2517 * oasys.c (oasys_set_reloc): Likewise.
2518 * som.c (som_set_reloc): Likewise.
2519 * versados.c (versados_set_reloc): Likewise.
2520 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
2521 _bfd_generic_set_reloc.
2522 (rs6000_xcoff64_aix_vec): LIkewise.
2523 * libbfd.c (_bfd_norelocs_set_reloc): New function.
2524 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
2525 * i386msdos.c (msdos_set_reloc): Define to
2526 _bfd_norelocs_set_reloc.
2527 * elfcode.h (elf_set_reloc): Define.
2528 * bfd-in2.h: Regenerated.
2530 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
2533 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
2534 for IFUNC function address.
2536 2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
2538 * elf32-arc.c (FEATURE_LIST_NAME): Define.
2539 (CONFLICT_LIST): Likewise.
2540 (opcode/arc-attrs.h): Include.
2541 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
2542 (arc_extract_features): New file.
2543 (arc_stralloc): Likewise.
2544 (arc_elf_merge_attributes): Likewise.
2545 (arc_elf_merge_private_bfd_data): Use object attributes.
2546 (bfd_arc_get_mach_from_attributes): New function.
2547 (arc_elf_object_p): Use object attributes.
2548 (arc_elf_final_write_processing): Likewise.
2549 (elf32_arc_obj_attrs_arg_type): New function.
2550 (elf32_arc_obj_attrs_handle_unknown): Likewise.
2551 (elf32_arc_section_from_shdr): Likewise.
2552 (elf_backend_obj_attrs_vendor): Define.
2553 (elf_backend_obj_attrs_section): Likewise.
2554 (elf_backend_obj_attrs_arg_type): Likewise.
2555 (elf_backend_obj_attrs_section_type): Likewise.
2556 (elf_backend_obj_attrs_handle_unknown): Likewise.
2557 (elf_backend_section_from_shdr): Likewise.
2559 2017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
2562 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
2563 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
2564 and the destination is a Thumb symbol.
2566 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2568 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
2569 initializer to silence GCC 4.2.
2570 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
2572 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2574 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
2575 (LAZY_PLT_ENTRY_SIZE): This.
2576 (NON_LAZY_PLT_ENTRY_SIZE): New.
2577 (elf_x86_64_plt0_entry): Renamed to ...
2578 (elf_x86_64_lazy_plt0_entry): This.
2579 (elf_x86_64_plt_entry): Renamed to ...
2580 (elf_x86_64_lazy_plt_entry): This.
2581 (elf_x86_64_bnd_plt0_entry): Renamed to ...
2582 (elf_x86_64_lazy_bnd_plt0_entry): This.
2583 (elf_x86_64_legacy_plt_entry): Removed.
2584 (elf_x86_64_bnd_plt_entry): Renamed to ...
2585 (elf_x86_64_lazy_bnd_plt_entry): This.
2586 (elf_x86_64_legacy_plt2_entry): Renamed to ...
2587 (elf_x86_64_non_lazy_plt_entry): This.
2588 (elf_x86_64_bnd_plt2_entry): Renamed to ...
2589 (elf_x86_64_non_lazy_bnd_plt_entry): This.
2590 (elf_x86_64_eh_frame_plt): Renamed to ...
2591 (elf_x86_64_eh_frame_lazy_plt): This.
2592 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
2593 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
2594 (elf_x86_64_eh_frame_plt_got): Renamed to ...
2595 (elf_x86_64_eh_frame_non_lazy_plt): This.
2596 (elf_x86_64_lazy_plt_layout): New.
2597 (elf_x86_64_non_lazy_plt_layout): Likewise.
2598 (elf_x86_64_plt_layout): Likewise.
2599 (elf_x86_64_backend_data): Remove PLT layout information. Add
2600 os for target system.
2601 (GET_PLT_ENTRY_SIZE): Removed.
2602 (elf_x86_64_lazy_plt): New.
2603 (elf_x86_64_non_lazy_plt): Likewise.
2604 (elf_x86_64_lazy_bnd_plt): Likewise.
2605 (elf_x86_64_non_lazy_bnd_plt): Likewise.
2606 (elf_x86-64_arch_bed): Updated.
2607 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
2608 (elf_x86_64_create_dynamic_sections): Removed.
2609 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
2610 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
2611 (elf_x86-64_adjust_dynamic_symbol): Updated.
2612 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
2613 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
2614 size for PLT0 if there is no PLT0. Get plt_entry_size from
2615 non_lazy_plt for non-lazy PLT entries.
2616 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
2617 from non_lazy_plt for non-lazy PLT entries.
2618 (elf_x86-64_relocate_section): Updated. Properly get PLT index
2619 if there is no PLT0.
2620 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
2621 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
2622 entries with non-lazy PLT layout. Don't fill the second and third
2623 slots in the PLT entry if there is no PLT0.
2624 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
2625 if there is no PLT0. Set sh_entsize on the .plt.got section.
2626 (compare_relocs): New.
2627 (elf_x86_64_plt_type): Likewise.
2628 (elf_x86_64_plt): Likewise.
2629 (elf_x86_64_nacl_plt): New. Forward declaration.
2630 (elf_x86_64_get_plt_sym_val): Removed.
2631 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
2632 against all dynamic relocations.
2633 (elf_x86_64_link_setup_gnu_properties): New function.
2634 (elf_backend_create_dynamic_sections): Updated.
2635 (elf_backend_setup_gnu_properties): New.
2636 (elf_x86_64_nacl_plt): New.
2637 (elf_x86_64_nacl_arch_bed): Updated.
2639 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2641 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
2642 (LAZY_PLT_ENTRY_SIZE): This.
2643 (NON_LAZY_PLT_ENTRY_SIZE): New.
2644 (elf_i386_plt0_entry): Renamed to ...
2645 (elf_i386_lazy_plt0_entry): This.
2646 (elf_i386_plt_entry): Renamed to ...
2647 (elf_i386_lazy_plt_entry): This.
2648 (elf_i386_pic_plt0_entry): Renamed to ...
2649 (elf_i386_pic_lazy_plt0_entry): This.
2650 (elf_i386_pic_plt_entry): Renamed to ...
2651 (elf_i386_pic_lazy_plt_entry): This.
2652 (elf_i386_got_plt_entry): Renamed to ...
2653 (elf_i386_non_lazy_plt_entry): This.
2654 (elf_i386_pic_got_plt_entry): Renamed to ...
2655 (elf_i386_pic_non_lazy_plt_entry): This.
2656 (elf_i386_eh_frame_plt): Renamed to ...
2657 (elf_i386_eh_frame_lazy_plt): This.
2658 (elf_i386_eh_frame_plt_got): Renamed to ...
2659 (elf_i386_eh_frame_non_lazy_plt): This.
2660 (elf_i386_plt_layout): Renamed to ...
2661 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
2662 eh_frame_plt_got_size.
2663 (elf_i386_non_lazy_plt_layout): New.
2664 (elf_i386_plt_layout): Likewise.
2665 (elf_i386_non_lazy_plt): Likewise.
2666 (GET_PLT_ENTRY_SIZE): Removed.
2667 (elf_i386_plt): Renamed to ...
2668 (elf_i386_lazy_plt): This.
2669 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
2670 (elf_i386_arch_bed): Updated.
2671 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
2672 (elf_i386_create_dynamic_sections): Removed.
2673 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
2674 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
2675 (elf_i386_adjust_dynamic_symbol): Updated.
2676 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
2677 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
2678 size for PLT0 if there is no PLT0.
2679 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
2680 output section is discarded only if GOT isn't empty.
2681 (elf_i386_relocate_section): Updated. Properly get PLT index
2682 if there is no PLT0.
2683 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
2684 second and third slots in the PLT entry if there is no PLT0.
2685 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
2686 if there is no PLT0. Set sh_entsize on the .plt.got section.
2687 (elf_i386_nacl_plt): Forward declaration.
2688 (elf_i386_get_plt_sym_val): Removed.
2689 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
2690 against all dynamic relocations.
2691 (elf_i386_link_setup_gnu_properties): New function.
2692 (elf_backend_create_dynamic_sections): Updated.
2693 (elf_backend_setup_gnu_properties): New.
2694 (elf_i386_nacl_plt): Updated.
2695 (elf_i386_nacl_arch_bed): Likewise.
2696 (elf_i386_vxworks_arch_bed): Likewise.
2698 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
2700 * elflink.c (elf_output_implib): Remove executable flag from import
2702 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
2703 library is a relocatable object file.
2705 2017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
2708 * elf32-avr.c (avr_should_move_sym): New function.
2709 (avr_should_reduce_sym_size): Likewise.
2710 (avr_should_increase_sym_size): Likewise.
2711 (elf32_avr_relax_delete_bytes): Adjust symbol values
2712 and sizes by calling new functions.
2714 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
2716 * config.bfd (riscv32-*): Enable rv64.
2718 2017-05-02 Alan Modra <amodra@gmail.com>
2721 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
2722 rather than h->root.type == bfd_link_hash_new.
2723 (bfd_elf_record_link_assignment): Similarly, call
2724 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
2726 2017-04-29 Alan Modra <amodra@gmail.com>
2729 * reloc.c (reloc_offset_in_range): New function.
2730 (bfd_perform_relocation, bfd_install_relocation): Use it.
2731 (_bfd_final_link_relocate): Likewise.
2733 2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
2735 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
2736 before using .plt.got.
2737 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
2739 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2741 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
2742 instead of "+=" to update 0.
2744 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2746 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
2747 .plt.got section here.
2748 (elf_i386_check_relocs): Don't create the .plt.got section.
2749 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
2750 the .plt.got and .plt.bnd sections here.
2751 (elf_x86_64_check_relocs): Don't create the .plt.got nor
2754 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2756 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
2758 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
2759 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
2760 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
2761 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
2764 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2766 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
2768 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
2769 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
2770 the first relocatable ELF input with GNU properties.
2772 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2774 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
2775 VxWorks for non-PIC.
2777 2017-04-27 Alan Modra <amodra@gmail.com>
2779 * elf-bfd.h (struct elf_backend_data): Make asection param of
2780 elf_backend_eh_frame_address_size const.
2781 (_bfd_elf_eh_frame_address_size): Likewise.
2782 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
2783 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
2784 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
2785 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
2786 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
2787 (next_cie_fde_offset): Constify params.
2788 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
2790 2017-04-27 Alan Modra <amodra@gmail.com>
2792 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
2793 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
2794 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
2796 (offset_adjust): New function.
2797 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
2798 (adjust_eh_frame_local_symbols): Likewise.
2799 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
2800 after changing anything. Return true if anything changed.
2801 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
2802 _bfd_elf_adjust_eh_frame_global_symbol for globals.
2804 2017-04-27 Alan Modra <amodra@gmail.com>
2806 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
2809 2017-04-27 Alan Modra <amodra@gmail.com>
2811 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
2812 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
2813 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
2814 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
2815 for undef and undefweak dyn_relocs.
2816 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
2817 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
2818 (allocate_got, allocate_dynrelocs): Likewise.
2819 (ppc64_elf_relocate_section): Likewise.
2821 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
2823 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
2824 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
2825 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
2826 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
2828 2017-04-26 Nick Clifton <nickc@redhat.com>
2831 * reloc.c (bfd_perform_relocation): Check for a negative address
2834 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
2837 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
2839 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
2840 (elf_backend_always_renumber_dynsyms): Define.
2841 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
2842 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
2843 * elflink.c (bfd_elf_size_dynamic_sections): Also call
2844 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
2846 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
2848 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
2850 * elflink.c (bfd_elf_size_dynamic_sections): Only call
2851 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
2852 sections have been created.
2854 2017-04-26 Nick Clifton <nickc@redhat.com>
2857 * compress.c (bfd_init_section_compress_status): Check the return
2858 value from bfd_malloc.
2860 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
2862 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
2863 no_finish_dynamic_symbol.
2864 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
2866 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
2867 weak symbol, don't make it dynamic.
2868 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
2869 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
2870 relocation for GOT reference.
2871 (elf_x86_64_finish_dynamic_symbol): Abort if
2872 no_finish_dynamic_symbol isn't 0.
2874 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
2877 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
2878 undefined weak symbol, don't make it dynamic.
2879 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
2880 set no_finish_dynamic_symbol and generate R_386_RELATIVE
2881 relocation for R_386_GOT32.
2883 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
2886 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
2888 2017-04-23 Alan Modra <amodra@gmail.com>
2891 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
2892 * elf.c (lcomm_sym): New.
2893 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
2894 * bfd-in2.h: Regenerate.
2896 2017-04-23 Alan Modra <amodra@gmail.com>
2899 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
2900 parameters and comment.
2901 (_bfd_elf_get_reloc_section): Delete.
2902 (_bfd_elf_plt_get_reloc_section): Declare.
2903 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
2904 New functions. Don't blindly skip over assumed .rel/.rela prefix.
2906 (_bfd_elf_get_reloc_section): ..here. Delete.
2907 (assign_section_numbers): Call elf_get_reloc_section.
2908 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
2909 * elfxx-target.h (elf_backend_get_reloc_section): Update.
2911 2017-04-23 Alan Modra <amodra@gmail.com>
2914 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
2917 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
2920 * elf32-i386.c (elf_i386_link_hash_entry): Add
2921 no_finish_dynamic_symbol.
2922 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
2923 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
2924 symbol, don't make it dynamic in PIE.
2925 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
2926 set no_finish_dynamic_symbol and generate R_386_RELATIVE
2927 relocation for R_386_GOT32
2928 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
2931 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
2935 * elflink.c (elf_link_add_object_symbols): Require
2936 --no-dynamic-linker with -E/--dynamic-list when creating
2939 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
2941 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
2944 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
2946 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
2947 dynamic symbol sorting.
2949 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
2952 * elflink.c (elf_link_add_object_symbols): Preserve
2953 dynamic_ref_after_ir_def when restoring the symbol table for
2954 unneeded dynamic object.
2956 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
2959 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
2960 on on undefined IFUNC symbol in the second PLT.
2962 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
2964 * peXXigen.c (pe_print_reloc): Correct chunk_end.
2966 2017-04-19 Alan Modra <amodra@gmail.com>
2968 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
2969 or make dynamic for info->dynamic_undefined_weak 0 and 1.
2970 * elf32-ppc.c:Formatting.
2971 (ensure_undefweak_dynamic): Don't make dynamic when
2972 info->dynamic_undefined_weak is zero.
2973 (allocate_dynrelocs): Discard undefweak dyn_relocs for
2974 info->dynamic_undefined_weak. Discard undef dyn_relocs when
2975 not default visibility. Discard undef and undefweak
2977 (ppc_elf_relocate_section): Adjust to suit.
2978 * elf64-ppc.c: Formatting.
2979 (ensure_undefweak_dynamic): Don't make dynamic when
2980 info->dynamic_undefined_weak is zero.
2981 (allocate_dynrelocs): Discard undefweak dyn_relocs for
2982 info->dynamic_undefined_weak. Discard them earlier.
2984 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
2987 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
2988 before generating the version definition section.
2990 2017-04-17 Alan Modra <amodra@gmail.com>
2992 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
2993 state when a regular object file defines a symbol with
2994 incompatible type to that defined by an earlier shared lib.
2996 2017-04-13 Alan Modra <amodra@gmail.com>
2998 * coffcode.h: Wrap some overly long _bfd_error_handler args.
3000 * elf32-arm.c: Likewise.
3001 * elf32-i386.c: Likewise.
3002 * elf32-mep.c: Likewise.
3003 * elf64-ia64-vms.c: Likewise.
3004 * elf64-x86-64.c: Likewise.
3005 * elflink.c: Likewise.
3006 * elfnn-ia64.c: Likewise.
3007 * elfxx-mips.c: Likewise.
3009 2017-04-13 Alan Modra <amodra@gmail.com>
3011 * aoutx.h: Use %B and %A in error messages throughout file.
3012 * aout-cris.c: Likewise.
3013 * archive.c: Likewise.
3014 * binary.c: Likewise.
3015 * coff-rs6000.c: Likewise.
3016 * coff-tic4x.c: Likewise.
3017 * coffcode.h: Likewise.
3018 * coffgen.c: Likewise.
3019 * cofflink.c: Likewise.
3020 * coffswap.h: Likewise.
3021 * cpu-arm.c: Likewise.
3022 * elf-eh-frame.c: Likewise.
3023 * elf-m10300.c: Likewise.
3025 * elf32-arc.c: Likewise.
3026 * elf32-arm.c: Likewise.
3027 * elf32-bfin.c: Likewise.
3028 * elf32-frv.c: Likewise.
3029 * elf32-iq2000.c: Likewise.
3030 * elf32-m32c.c: Likewise.
3031 * elf32-microblaze.c: Likewise.
3032 * elf32-nds32.c: Likewise.
3033 * elf32-rl78.c: Likewise.
3034 * elf32-rx.c: Likewise.
3035 * elf32-score.c: Likewise.
3036 * elf32-score7.c: Likewise.
3037 * elf32-sh64.c: Likewise.
3038 * elf32-v850.c: Likewise.
3039 * elf32-vax.c: Likewise.
3040 * elf32-visium.c: Likewise.
3041 * elf64-ia64-vms.c: Likewise.
3042 * elf64-mmix.c: Likewise.
3043 * elf64-sh64.c: Likewise.
3044 * elfcode.h: Likewise.
3045 * elfnn-aarch64.c: Likewise.
3046 * elfnn-ia64.c: Likewise.
3047 * elfxx-mips.c: Likewise.
3048 * hpux-core.c: Likewise.
3051 * linker.c: Likewise.
3052 * merge.c: Likewise.
3054 * oasys.c: Likewise.
3055 * pdp11.c: Likewise.
3056 * peXXigen.c: Likewise.
3057 * rs6000-core.c: Likewise.
3058 * vms-alpha.c: Likewise.
3059 * xcofflink.c: Likewise.
3061 2017-04-13 Alan Modra <amodra@gmail.com>
3063 * bfd.c (PRINT_TYPE): Define.
3064 (_doprnt): New function.
3065 (error_handler_internal): Use _doprnt.
3066 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
3067 calls in their natural order, throughout file.
3068 * coff-mcore.c: Likewise.
3069 * coff-ppc.c: Likewise.
3070 * coff-tic80.c: Likewise.
3071 * cofflink.c: Likewise.
3072 * elf-s390-common.c: Likewise.
3074 * elf32-arm.c: Likewise.
3075 * elf32-i386.c: Likewise.
3076 * elf32-m32r.c: Likewise.
3077 * elf32-msp430.c: Likewise.
3078 * elf32-spu.c: Likewise.
3079 * elf64-ia64-vms.c: Likewise.
3080 * elf64-sparc.c: Likewise.
3081 * elf64-x86-64.c: Likewise.
3082 * elflink.c: Likewise.
3083 * elfnn-aarch64.c: Likewise.
3084 * elfnn-ia64.c: Likewise.
3085 * elfxx-mips.c: Likewise.
3087 2017-04-13 Alan Modra <amodra@gmail.com>
3089 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
3090 branch veneers" error. Fix double space and format message.
3091 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
3092 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
3094 2017-04-13 Alan Modra <amodra@gmail.com>
3096 * bfd-in2.h: Regenerate.
3098 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
3100 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
3101 extra `\n' in warning/error messages.
3102 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
3103 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3105 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
3107 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
3108 processor-specific properties with generic ELF target vector.
3110 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
3112 * elf32-sparc.c (elf_backend_fixup_symbol): New.
3113 * elf64-sparc.c (elf_backend_fixup_symbol): New.
3114 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
3115 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
3117 (link_hash_newfunc): Initialize has_got_reloc and
3119 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
3121 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
3123 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
3125 (_bfd_sparc_elf_fixup_symbol): New function.
3126 (allocate_dynrelocs): Don't allocate space for dynamic
3127 relocations and discard relocations against resolved undefined
3128 weak symbols in executable. Don't make resolved undefined weak
3129 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
3130 relocation against undefined weak symbols in PIE.
3131 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
3132 relocations against resolved undefined weak symbols in PIE
3133 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
3134 without ynamic PLT/GOT relocations for resolved undefined weak
3136 Don't generate dynamic relocation against resolved undefined
3137 weak symbol in executable.
3138 (pie_finish_undefweak_symbol): New function.
3139 (_bfd_sparc_elf_finish_dynamic_sections): Call
3140 pie_finish_undefweak_symbol on all symbols in PIE.
3141 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
3142 (_bfd_sparc_elf_fixup_symbol): New function.
3144 2017-04-10 Nick Clifton <nickc@redhat.com>
3146 * config.bfd: Remove ns32k from obsolete list.
3148 2017-04-10 Alan Modra <amodra@gmail.com>
3151 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
3152 (special_sections_i): Likewise for .init_array.
3153 (special_sections_p): Likewise for .preinit_array.
3155 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
3159 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
3160 ELF_COMMON_DEF_P for common symbols.
3161 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3162 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
3163 * elflink.c (_bfd_elf_merge_symbol): Revert commits
3164 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
3165 07492f668d2173da7a2bda3707ff0985e0f460b6.
3167 2017-04-07 Pedro Alves <palves@redhat.com>
3169 * opncls.c (bfd_get_debug_link_info): Rename to...
3170 (bfd_get_debug_link_info_1): ... this. Change type of second
3171 parameter to void pointer. Adjust.
3172 (bfd_get_debug_link_info): Reimplement on top of
3173 bfd_get_debug_link_info_1.
3174 (separate_debug_file_exists, separate_alt_debug_file_exists):
3175 Change type of second parameter to void pointer. Adjust.
3176 (get_func_type, check_func_type): Change type of second parameter
3178 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
3179 the callback functions instead of passing the address of a local.
3180 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
3181 find_separate_debug_file.
3182 (get_alt_debug_link_info_shim): Change type of second parameter to
3183 void pointer. Adjust.
3184 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
3185 find_separate_debug_file.
3186 (get_build_id_name, bfd_boolean check_build_id_file): Change type
3187 of second parameter to void pointer. Adjust.
3188 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
3189 pointer local to find_separate_debug_file.
3191 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
3193 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
3194 external symbols with a definition.
3195 (_bfd_coff_gc_mark_extra_sections): Fix typo.
3197 2017-04-07 Alan Modra <amodra@gmail.com>
3199 * po/SRC-POTFILES.in: Regenerate.
3201 2017-04-05 Alan Modra <amodra@gmail.com>
3203 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
3206 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
3208 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
3209 numbers for DataDirectory entry indicies passed to
3212 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
3214 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
3215 each GNU_MBIND section and align GNU_MBIND section to page size.
3216 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
3217 segment for each GNU_MBIND section.
3218 (_bfd_elf_init_private_section_data): Copy sh_info from input
3219 for GNU_MBIND section.
3221 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
3223 * elfnn-riscv.c (GP_NAME): Delete.
3224 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
3225 (_bfd_riscv_relax_lui): Likewise.
3227 2017-04-04 Nick Clifton <nickc@redhat.com>
3230 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
3232 (bfd_elf_final_link): Only initialize the extended symbol index
3233 section if there are extended symbol tables to list.
3235 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
3237 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
3238 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
3239 * configure.ac (elf): Add elf-properties.lo.
3240 * Makefile.in: Regenerated.
3241 * configure: Likewise.
3242 * elf-bfd.h (elf_property_kind): New.
3243 (elf_property): Likewise.
3244 (elf_property_list): Likewise.
3245 (elf_properties): Likewise.
3246 (_bfd_elf_parse_gnu_properties): Likewise.
3247 (_bfd_elf_get_property): Likewise.
3248 (_bfd_elf_link_setup_gnu_properties): Likewise.
3249 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
3250 and setup_gnu_properties.
3251 (elf_obj_tdata): Add properties.
3252 * elf-properties.c: New file.
3253 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
3254 (elf_i386_merge_gnu_properties): Likewise.
3255 (elf_backend_parse_gnu_properties): Likewise.
3256 (elf_backend_merge_gnu_properties): Likewise.
3257 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3258 (elf_x86_64_merge_gnu_properties): Likewise.
3259 (elf_backend_parse_gnu_properties): Likewise.
3260 (elf_backend_merge_gnu_properties): Likewise.
3261 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
3262 (elf_backend_parse_gnu_properties): Likewise.
3263 (elf_backend_setup_gnu_properties): Likewise.
3264 (elfNN_bed): Add elf_backend_parse_gnu_properties,
3265 elf_backend_merge_gnu_properties and
3266 elf_backend_setup_gnu_properties.
3268 2017-03-30 Pip Cet <pipcet@gmail.com>
3270 * elf32-wasm32.c: Add relocation code, two relocs.
3271 * reloc.c: Add wasm32 relocations.
3272 * libbfd.h: Regenerate.
3273 * bfd-in2.h: Regenerate.
3274 * bfd/po/bfd.pot: Regenerate.
3276 2017-03-29 Nick Clifton <nickc@redhat.com>
3279 * coff-bfd.h (struct coff_section_data): Add new fields:
3280 saved_bias and bias.
3281 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
3282 computed for PE binaries.
3283 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
3286 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
3289 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
3290 to handle a local symbol with a hash-symbol-entry; without PLT.
3291 Add BFD_ASSERT for an incidental case with GOT entry present.
3292 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
3293 isn't forced-or-set local.
3295 2017-03-27 Pip Cet <pipcet@gmail.com>
3297 * wasm-module.c: New file to support WebAssembly modules.
3298 * wasm-module.h: New file to support WebAssembly modules.
3299 * doc/webassembly.texi: Start documenting wasm-module.c.
3300 * config.bfd: Add wasm_vec.
3301 * targets.c: Likewise.
3302 * configure.ac: Likewise.
3303 * Makefile.am: Add entries for wasm-module.c.
3304 * Makefile.in: Regenerate.
3305 * configure: Regenerate.
3306 * po/SRC-POTFILES.in: Regenerate.
3308 2017-03-27 Pip Cet <pipcet@gmail.com>
3310 * cpu-wasm32.c: New file to support wasm32 architecture.
3311 * elf32-wasm32.c: New file to support wasm32 architecture.
3312 * Makefile.am: Add wasm32 architecture.
3313 * archures.c: Likewise.
3314 * config.bfd: Likewise.
3315 * configure.ac: Likewise.
3316 * targets.c: Likewise.
3317 * Makefile.in: Regenerate.
3318 * bfd-in2.h: Regenerate.
3319 * configure: Regenerate.
3320 * po/SRC-POTFILES.in: Regenerate.
3322 2017-03-20 Alan Modra <amodra@gmail.com>
3325 * elf64-ppc.c (compare_symbols): Stabilize sort.
3327 2017-03-18 Alan Modra <amodra@gmail.com>
3329 * elf64-ppc.c (struct ppc_link_hash_table): Add
3330 local_ifunc_resolver and maybe_local_ifunc_resolver.
3331 (ppc_build_one_stub): Set flags on emitting dynamic
3332 relocation to ifunc.
3333 (ppc64_elf_relocate_section): Likewise.
3334 (ppc64_elf_finish_dynamic_symbol): Likewise.
3335 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
3336 local dynamic relocs to ifuncs.
3337 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
3338 local_ifunc_resolver and maybe_local_ifunc_resolver.
3339 (ppc_elf_relocate_section): Set flag on emitting dynamic
3340 relocation to ifuncs.
3341 (ppc_elf_finish_dynamic_symbol): Likewise.
3342 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
3343 dynamic relocs to ifuncs.
3345 2017-03-13 Nick Clifton <nickc@redhat.com>
3348 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
3349 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
3350 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
3351 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
3352 * bfd-in2.h: Regenerate.
3353 * libbfd.h: Regenerate.
3354 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
3356 (IS_AARCH64_TLSDESC_RELOC): Likewise.
3357 (elfNN_aarch64_howto_table): Likewise.
3358 (aarch64_tls_transition_without_check): Likewise.
3359 (aarch64_reloc_got_type): Likewise.
3360 (elfNN_aarch64_final_link_relocate): Likewise.
3361 (elfNN_aarch64_tls_relax): Likewise.
3362 (elfNN_aarch64_relocate_section): Likewise.
3363 (elfNN_aarch64_gc_sweep_hook): Likewise.
3364 (elfNN_aarch64_check_relocs): Likewise.
3365 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
3366 (_bfd_aarch64_elf_resolve_relocation): Likewise.
3368 2017-03-11 Alan Modra <amodra@gmail.com>
3370 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
3371 parameter is in fact used. Whitespace fixes.
3372 * elf64-ppc.c: Likewise.
3374 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
3376 * rs6000-core.c (CORE_NEW): Simplify macro when
3377 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
3379 2017-03-07 Alan Modra <amodra@gmail.com>
3383 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
3386 2017-03-05 Alan Modra <amodra@gmail.com>
3388 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
3389 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
3390 (next_cie_fde_offset): New function.
3391 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
3392 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
3393 four bytes. Align CIEs to four or eight bytes depending on
3394 per_encoding_aligned8. Align FDEs according to their encoding.
3395 Pad last FDE to output section alignment.
3396 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
3398 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
3399 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
3400 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
3402 2017-03-02 Martin Bickel <binutils@ineranves.de>
3405 * elf.c (rewrite_elf_program_header): Do not issue a warning for
3406 empty segments which have a zero filesz, but a non-zero memsz.
3408 2017-03-02 Alan Modra <amodra@gmail.com>
3410 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
3412 2017-02-28 Alan Modra <amodra@gmail.com>
3414 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
3415 (ppc64_elf_relocate_section): Likewise.
3417 2017-02-28 Alan Modra <amodra@gmail.com>
3420 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
3421 rather than elf32_nios2_hash_table or elf_hash_table.
3422 (create_got_section): Likewise.
3423 (nios2_elf32_finish_dynamic_symbol): Likewise.
3424 (nios2_elf32_adjust_dynamic_symbol): Likewise.
3425 (nios2_elf32_size_dynamic_sections): Likewise.
3426 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
3427 vars. Use htab equivalents directly instead. Don't create
3428 all dynamic sections on needing just the GOT. Use a goto
3429 rather than a fall-through with reloc test. Ensure
3430 htab->dynobj is set when making dynamic sreloc section.
3431 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
3432 equivalent directly instead. Don't segfault on looking for
3433 .dynamic when dynamic sections have not been created. Don't
3434 segfault on .got.plt being discarded.
3435 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
3436 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
3437 fixme and another not so relevant comment.
3438 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
3439 already set, set hash table dynobj on creating .sbss.
3441 2017-02-28 Alan Modra <amodra@gmail.com>
3443 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
3444 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
3445 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
3446 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
3447 (ppc64_elf_relocate_section): Likewise.
3448 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
3449 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
3450 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
3451 * libbfd.h: Regenerate.
3452 * bfd-in2.h: Regenerate.
3454 2017-02-28 Alan Modra <amodra@gmail.com>
3456 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
3457 dynamic .data.rel.ro read-only.
3458 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
3459 rather than section flags when deciding where copy reloc goes.
3460 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
3461 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
3462 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
3463 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
3464 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
3465 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
3466 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
3467 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
3468 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3469 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
3470 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
3471 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
3472 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3473 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
3474 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
3475 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
3476 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
3477 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
3478 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
3480 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
3482 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
3483 `jalr $0, $25' instruction encoding.
3485 2017-02-27 Nick Clifton <nickc@redhat.com>
3488 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
3489 generating a seg-fault when encountering a symbol that has been
3490 deleted by garbage collection.
3492 2017-02-25 Alan Modra <amodra@gmail.com>
3494 * elf32-arc.c (struct dynamic_sections): Delete.
3495 (enum dyn_section_types): Delete.
3496 (dyn_section_names): Delete.
3497 (arc_create_dynamic_sections): Delete.
3498 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
3499 segfault on discarded .rela.plt section.
3500 (elf_arc_size_dynamic_sections): Formatting. Don't call
3501 arc_create_dynamic_sections. Don't allocate memory for sections
3502 handled by the generic linker. Correct code finding relocs in
3503 read-only sections. Set SEC_EXCLUDE on zero size .got,
3504 .got.plt, and .dynbss sections. Do set .interp for pies.
3506 2017-02-24 Andrew Waterman <andrew@sifive.com>
3508 * elfnn-riscv.c (GP_NAME): New macro.
3509 (riscv_global_pointer_value): Use it.
3510 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
3511 output section, consider only that section's alignment.
3513 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
3515 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
3516 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
3517 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
3518 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
3520 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
3522 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
3523 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
3526 2017-02-23 Alan Modra <amodra@gmail.com>
3529 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
3531 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
3532 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
3535 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
3538 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
3539 processing ahead of the call to `elf_gc_sweep_symbol'.
3541 2017-02-22 Nick Clifton <nickc@redhat.com>
3544 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
3545 created section 4-byte alignment.
3547 2017-02-22 Alan Modra <amodra@gmail.com>
3549 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
3550 on .got or .plt output section being discarded by script.
3551 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
3554 2017-02-21 Alan Modra <amodra@gmail.com>
3556 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
3557 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
3559 2017-02-20 Alan Modra <amodra@gmail.com>
3562 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
3563 if DT_RELSZ/DT_RELASZ is zero.
3565 2017-02-17 Nick Clifton <nickc@redhat.com>
3567 * compress.c (bfd_get_full_section_contents): Remember to reduce
3568 compressed size by the sizeof the compression header when
3569 decompressing the contents.
3571 2017-02-17 Pedro Alves <palves@redhat.com>
3573 * srec.c (Chunk): Rename to ...
3574 (_bfd_srec_len): ... this.
3575 (S3Forced): Rename to ...
3576 (_bfd_srec_forceS3): ... this.
3577 * objcopy.c: Adjust all references.
3579 2017-02-17 Pedro Alves <palves@redhat.com>
3581 * archive.c (bsd_write_armap): Rename to ...
3582 (_bfd_bsd_write_armap): ... this.
3583 (coff_write_armap): Rename to ...
3584 (_bfd_coff_write_armap): ... this.
3585 * libbfd-in.h (bsd_write_armap): Rename to ...
3586 (_bfd_bsd_write_armap): ... this.
3587 (coff_write_armap): Rename to ...
3588 (_bfd_coff_write_armap): ... this.
3589 * aout-target.h, aout-tic30.c: Adjust all users.
3590 * libbfd.h: Regenerate.
3592 2017-02-17 Pedro Alves <palves@redhat.com>
3594 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
3595 (warn_deprecated): Rename to ...
3596 (_bfd_warn_deprecated): ... this.
3597 * libbfd.c (warn_deprecated): Rename to ...
3598 (_bfd_warn_deprecated): ... this.
3599 * bfd-in2.h: Regenerate.
3601 2017-02-17 Pedro Alves <palves@redhat.com>
3603 * bfdio.c (real_ftell): Rename to ...
3604 (_bfd_real_ftell): ... this.
3605 (real_fseek): Rename to ...
3606 (_bfd_real_fseek): ... this.
3607 (real_fopen): Rename to ...
3608 (_bfd_real_fopen): ... this.
3609 * libbfd-in.h (real_ftell): Rename to ...
3610 (_bfd_real_ftell): ... this.
3611 (real_fseek): Rename to ...
3612 (_bfd_real_fseek): ... this.
3613 (real_fopen): Rename to ...
3614 (_bfd_real_fopen): ... this.
3615 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
3616 * libbfd.h: Regenerate.
3618 2017-02-17 Pedro Alves <palves@redhat.com>
3620 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
3621 * libbfd.c (read_unsigned_leb128): Rename to ...
3622 (_bfd_read_unsigned_leb128): ... this.
3623 (read_signed_leb128): Rename to ...
3624 (_bfd_read_signed_leb128): ... this.
3625 (safe_read_leb128): Rename to ...
3626 (_bfd_safe_read_leb128): ... this.
3627 * libbfd-in.h (read_unsigned_leb128): Rename to ...
3628 (_bfd_read_unsigned_leb128): ... this.
3629 (read_signed_leb128): Rename to ...
3630 (_bfd_read_signed_leb128): ... this.
3631 (safe_read_leb128): Rename to ...
3632 (_bfd_safe_read_leb128): ... this.
3633 * libbfd.h: Renegerate.
3635 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
3637 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
3638 before trying to fine matching file and line information.
3640 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
3642 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
3643 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
3644 not match current bfd, then reload debug information. Record bfd
3645 we're loading debug info for in the stash. If we have debug
3646 informatin in the cache then perform section placement before
3649 2017-02-16 Alan Modra <amodra@gmail.com>
3652 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
3653 * elfxx-target.h (elf_backend_no_page_alias): Define.
3654 (elfNN_bed): Init new field.
3655 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
3656 ensure PT_LOAD segment starts on a new page.
3657 * elf32-hppa.c (elf_backend_no_page_alias): Define.
3659 2017-02-16 Alan Modra <amodra@gmail.com>
3662 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
3665 2017-02-16 Jiong Wang <jiong.wang@arm.com>
3667 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
3668 * bfd-in2.h: Regenerated.
3670 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
3673 * elf32-i386.c (elf_i386_relocate_section): Allow
3674 "lea foo@GOT, %reg" in PIC.
3676 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
3679 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
3680 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
3681 error against local IFUNC symbol without a base register for
3684 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
3686 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
3687 `%P: %H:' with `info->callbacks->einfo'.
3688 (ppc_elf_relocate_section): Likewise.
3689 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
3690 (ppc64_elf_edit_toc): Likewise.
3691 (ppc64_elf_relocate_section): Likewise.
3693 2017-02-14 Alan Modra <amodra@gmail.com>
3695 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
3696 --gc-keep-exported, and test versioned field of sym rather than
3697 looking for @ in name.
3699 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
3701 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
3704 2017-02-13 Nick Clifton <nickc@redhat.com>
3707 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
3710 2017-02-07 Andrew Waterman <andrew@sifive.com>
3712 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
3713 entry size if PLT header is written.
3715 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
3717 Fix sparc64 dynamic relocation processing to use the dynamic
3719 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
3720 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
3723 2017-02-03 Nick Clifton <nickc@redhat.com>
3726 * coffcode.h (coff_write_object_contents): Enlarge size of
3727 s_name_buf in order to avoid compile time warning about possible
3729 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
3730 32-bits of insn value before printing into buffer.
3732 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3734 * elfxx-mips.c (mips_elf_hash_sort_data): Add
3735 `max_local_dynindx'.
3736 (mips_elf_sort_hash_table): Handle it.
3737 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
3738 symbols bump up `max_local_dynindx' rather than
3739 `max_non_got_dynindx'.
3741 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3743 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
3744 `min_got_dynindx', `max_unref_got_dynindx' and
3745 `max_non_got_dynindx' members to the `bfd_size_type' data type.
3746 (mips_elf_sort_hash_table): Adjust accordingly.
3748 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3750 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
3751 to access the hash table.
3753 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3755 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
3756 non-NULL `htab' to the beginning.
3758 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3760 * elflink.c (elf_gc_sweep): Wrap overlong line.
3762 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
3764 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
3765 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
3766 * elfxx-mips.c (mips_elf_link_hash_table): Add
3767 `ignore_branch_isa' member.
3768 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
3769 in branch relocation calculation as an error if
3770 `ignore_branch_isa' has been set.
3771 (_bfd_mips_elf_insn32): Rename to...
3772 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
3773 parameter to `insn32' and add an `ignore_branch_isa' parameter.
3774 Handle the new parameter.
3776 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
3778 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
3779 local variable dynobj.
3782 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
3783 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
3784 executable from read-only sections into sdynrelro.
3785 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
3786 dynamic relocs in sdynrelro.
3787 (elf_backend_want_dynrelro): Define.
3789 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
3791 * config.bfd (*-*-rtemsaout*): Mark as removed.
3793 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
3795 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
3796 (arm-*-rtems*): Move to (arm*-*-eabi*).
3797 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
3798 (m68-*-rtems*): Move to (m68*-*-elf*).
3800 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
3802 * config.bfd (*-*-rtemscoff*): Mark as removed.
3804 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
3807 * elflink.c (bfd_elf_record_link_assignment): Revert last
3808 change and don't ever clear `forced_local'. Set `mark'
3810 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
3812 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
3813 (bfd_elf_size_dynamic_sections): ... here.
3814 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
3815 and set `mark' instead in `__tls_get_addr_opt' processing.
3816 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
3818 2017-01-24 Alan Modra <amodra@gmail.com>
3820 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
3821 where dynamic relocs are preferable. Allow ifunc too.
3822 (ensure_undefweak_dynamic): New function.
3823 (allocate_dynrelocs): Use it here. Move plt handling last and
3824 don't make symbols dynamic, simplifying loop. Only make undef
3825 weak symbols with GOT entries dynamic. Correct condition
3826 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
3827 comments. Remove goto.
3828 (ppc_elf_relocate_section): Correct test for using dynamic
3829 symbol on GOT relocs. Rearrange test for emitting GOT relocs
3830 to suit. Set up explicit tls_index entries and implicit GOT
3831 tls_index entries resolvable at link time for
3832 __tls_get_addr_opt. Simplify test to clear mem for prelink.
3833 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
3834 (ensure_undefweak_dynamic): New function.
3835 (allocate_dynrelocs): Use it here. Only make undef weak symbols
3836 with GOT entries dynamic. Remove unnecessary test of
3837 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
3838 (ppc64_elf_relocate_section): Correct test for using dynamic
3839 symbol on GOT relocs. Rearrange test for emitting GOT relocs
3840 to suit. Set up explicit tls_index entries and implicit GOT
3841 tls_index entries resolvable at link time for __tls_get_addr_opt.
3842 Simplify expression to clear mem for prelink.
3844 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
3846 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
3848 2017-01-20 Jiong Wang <jiong.wang@arm.com>
3850 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
3851 (elf_backend_hash_symbol): Define.
3853 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
3856 * elflink.c (bfd_elf_record_link_assignment): Clear any
3857 `forced_local' marking for DSO symbols that are not being
3860 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
3862 * elfnn-riscv.c (riscv_elf_object_p): New function.
3864 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
3867 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
3869 (elf_x86_64_check_relocs): Create .eh_frame section for the
3871 (elf_x86_64_size_dynamic_sections): Allocate and initialize
3872 .eh_frame section for the .plt.bnd section.
3873 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
3874 for the .plt.bnd section.
3876 2017-01-12 Nick Clifton <nickc@redhat.com>
3879 * opncls.c (find_separate_debug_file): Add include_dirs
3880 parameter. Only include the directory part of the bfd's filename
3881 in search paths if include_dirs is true. Add a couple of extra
3882 locations for looking for debug files.
3883 ( bfd_follow_gnu_debuglink): Update invocation of
3884 find_separate_debug_file.
3885 (bfd_follow_gnu_debugaltlink): Likewise.
3886 (get_build_id): New function: Finds the build-id of the given bfd.
3887 (get_build_id_name): New function: Computes the name of the
3888 separate debug info file for a bfd, based upon its build-id.
3889 (check_build_id_file): New function: Checks to see if a separate
3890 debug info file exists at the given location, and that its
3891 build-id matches that of the original bfd.
3892 (bfd_follow_build_id_debuglink): New function: Finds a separate
3893 debug info file for a given bfd by using the build-id method.
3894 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
3895 method of locating a separate debug info file before using the
3897 * bfd-in2.h: Regenerate.
3899 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
3902 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
3903 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
3904 elf_x86_64_eh_frame_plt_got.
3905 (elf_x86_64_size_dynamic_sections): Get unwind info from
3906 elf_x86_64_bnd_arch_bed for the BND PLT.
3908 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
3910 * config.bfd: Add entries for i686-redox and x86_64-redox.
3912 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
3914 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
3916 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
3917 .eh_frame section to 4 bytes for x32.
3918 (elf_x86_64_check_relocs): Likewise.
3920 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
3923 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
3924 (PLT_GOT_FDE_LENGTH): Likewise.
3925 (elf_i386_plt_layout): Add eh_frame_plt_got and
3926 eh_frame_plt_got_size.
3927 (elf_i386_plt): Updated.
3928 (elf_i386_link_hash_table): Add plt_got_eh_frame.
3929 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
3930 (elf_i386_size_dynamic_sections): Allocate and initialize
3931 .eh_frame section for .plt.got.
3932 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
3934 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
3935 eh_frame_plt_got_size.
3936 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
3937 (PLT_GOT_FDE_LENGTH): Likewise.
3938 (elf_x86_64_backend_data): Add eh_frame_plt_got and
3939 eh_frame_plt_got_size.
3940 (elf_x86_64_arch_bed): Updated.
3941 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
3942 eh_frame_plt_got_size.
3943 (elf_x86_64_nacl_arch_bed): Likewise.
3944 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
3945 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
3946 (elf_x86_64_size_dynamic_sections): Allocate and initialize
3947 .eh_frame section for .plt.got.
3948 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
3951 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
3953 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
3954 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
3956 2017-01-09 Nick Clifton <nickc@redhat.com>
3958 * dwarf2.c (lookup_address_in_function_table): Return early if
3959 there are no functions in the given comp unit, or if the high
3960 address of the last function in the comp unit is less than the
3963 2017-01-09 Nick Clifton <nickc@redhat.com>
3966 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
3967 message if there are too many symbols to load.
3969 2017-01-04 James Clarke <jrtc27@jrtc27.com>
3971 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
3972 if relocs are cached.
3974 2017-01-03 Rich Felker <bugdal@aerifal.cx>
3977 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
3978 for R_MICROBLAZE_GOTOFF_64.
3980 2017-01-03 Nick Clifton <nickc@redhat.com>
3982 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
3983 warning about using a possibly uninitialised variable.
3985 2017-01-02 Alan Modra <amodra@gmail.com>
3987 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
3988 (allocate_plt_static, allocate_dynrelocs): Use it.
3990 2017-01-02 Alan Modra <amodra@gmail.com>
3992 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
3993 .PARISC.unwind section.
3995 2017-01-02 Alan Modra <amodra@gmail.com>
3998 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
3999 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
4000 indirect to GOT pointer relative code edit.
4002 2017-01-02 Alan Modra <amodra@gmail.com>
4004 Update year range in copyright notice of all files.
4006 For older changes see ChangeLog-2016
4008 Copyright (C) 2017 Free Software Foundation, Inc.
4010 Copying and distribution of this file, with or without modification,
4011 are permitted in any medium without royalty provided the copyright
4012 notice and this notice are preserved.
4018 version-control: never