1 2017-09-19 Alan Modra <amodra@gmail.com>
4 * elflink.c (bfd_elf_size_dynamic_sections): Garbage collect
5 symbols before calculating verrefs. Don't renumber dynsyms
6 after gc. Exclude .gnu.version when zero or one dynsym.
7 Localize some vars and reindent.
9 2017-09-18 H.J. Lu <hongjiu.lu@intel.com>
12 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Check error
13 return from bfd_canonicalize_dynamic_reloc.
15 2017-09-15 Alan Modra <amodra@gmail.com>
18 * archive.c (bfd_ar_hdr_from_filesystem): Detect when status.st_size
19 overflows bfd_size_type.
21 2017-09-14 H.J. Lu <hongjiu.lu@intel.com>
24 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument
25 to indicate if conversion is performed.
26 (elf_i386_check_relocs): Cache section contents and relocations
27 if conversion is performed.
28 * elf64-x86-64.c (elf_x86_64_check_relocs): Cache section
29 contents and relocations if conversion is performed.
31 2017-09-14 Nick Clifton <nickc@redhat.com>
34 * peXXigen.c (pe_print_idata): Extend check for HintName vector
37 2017-09-13 H.J. Lu <hongjiu.lu@intel.com>
39 * elfxx-x86.h: Fix a typo in comments.
41 2017-09-09 Kamil Rytarowski <n54@gmx.com>
43 * elf32-nds32.c: Rename __BIT() to N32_BIT().
45 2017-09-09 Alan Modra <amodra@gmail.com>
47 * elf64-ppp.c (plt_stub_pad): Handle positive and negative
50 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
52 * elf32-i386.c (elf_i386_relocate_section): Update usage of
53 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
54 (elf_i386_finish_dynamic_symbol): Likewise.
55 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
56 (elf_x86_64_finish_dynamic_symbol): Likewise.
57 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Likewise.
58 (_bfd_x86_elf_fixup_symbol): Likewise.
60 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
62 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
63 check has_non_got_reloc.
65 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
68 * elf32-i386.c (elf_i386_convert_load_reloc): Check linker_def.
69 Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
70 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Check
71 linker_def. Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
72 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Set local_ref
73 and linker_def on __ehdr_start if it is referenced and not
75 (_bfd_x86_elf_link_symbol_references_local): Also set local_ref
76 and return TRUE when building executable, if a symbol has
77 non-GOT/non-PLT relocations in text section or there is no
79 * elfxx-x86.h (elf_x86_link_hash_entry): Add linker_def.
81 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
83 * elfxx-x86.h: Update comments.
85 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
87 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Replace
88 elf_x86_plt_layout_table with elf_x86_init_table.
89 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
91 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties):
93 * elfxx-x86.h (elf_x86_plt_layout_table): Renamed to ...
94 (elf_x86_init_table): This.
95 (_bfd_x86_elf_link_setup_gnu_properties): Replace
96 elf_x86_plt_layout_table with elf_x86_init_table.
98 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
100 * configure.ac (bfd_backends): Don't add elf64-x86-64.lo nor
101 elf64.lo together with elfxx-x86.lo for 64-bit BFD.
102 * configure: Regenerated.
103 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set r_info
104 and r_sym fields of plt_layout.
105 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
107 * elfxx-x86.c (elf_x86_64_is_reloc_section): Remove BFD64 check.
108 (_bfd_x86_elf_link_hash_table_create): Likewise. Don't set
109 r_info nor r_sym fields.
110 (_bfd_x86_elf_link_setup_gnu_properties): Set r_info and r_sym
112 * elfxx-x86.h (elf_x86_plt_layout_table): Add r_info and r_sym.
114 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
116 * (_bfd_riscv_relax_align): Call bfd_set_error and
117 print an error message when unable to relax a .align directive.
119 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
121 * elfnn-riscv.c (riscv_zero_pcrel_hi_reloc): New function.
122 (riscv_record_pcrel_hi_reloc): Add absolute argument.
123 (riscv_elf_relocate_section): Call riscv_zero_pcrel_hi_reloc for
124 R_RISCV_PCREL_HI20 relocs, and pass the result to
125 riscv_record_pcrel_hi_reloc.
127 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
129 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument,
130 r_type_p. Remove the converted argument. Replace
131 SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P. Return
132 the new relocation type via r_type_p.
133 (elf_i386_relocate_section): Likewise.
134 (elf_i386_finish_dynamic_symbol): Likewise.
135 (need_convert_load): Removed.
136 (check_relocs_failed): Updated.
137 (elf_i386_check_relocs): Call elf_i386_convert_load_reloc,
138 instead of setting need_convert_load.
139 (_bfd_i386_elf_convert_load): Removed.
140 * elf64-x86-64.c (need_convert_load): Removed.
141 (check_relocs_failed): Updated.
142 (elf_x86_64_convert_load_reloc): Add an argument, r_type_p.
143 Replace SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P.
144 Return the new relocation type via r_type_p.
145 (elf_x86_64_check_relocs): Call elf_x86_64_convert_load_reloc,
146 instead of setting need_convert_load.
147 (elf_x86_64_check_relocs): Don't check PIC if relocation has
149 (_bfd_x86_64_elf_convert_load): Removed.
150 (elf_x86_64_relocate_section): Replace SYMBOL_REFERENCES_LOCAL
151 with SYMBOL_REFERENCES_LOCAL_P.
152 (elf_x86_64_finish_dynamic_symbol): Likewise.
153 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Don't
155 (_bfd_x86_elf_size_dynamic_sections): Don't call convert_load.
156 (_bfd_x86_elf_link_symbol_references_local): New function.
157 * elfxx-x86.h (SYMBOL_REFERENCES_LOCAL_P): New.
158 (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace elf.forced_local with
159 SYMBOL_REFERENCES_LOCAL_P.
160 (elf_x86_link_hash_entry): Add local_ref.
161 (elf_x86_link_hash_table): Remove convert_load.
162 (_bfd_i386_elf_convert_load): Removed.
163 (_bfd_x86_64_elf_convert_load): Likewise.
164 (_bfd_x86_elf_link_symbol_references_local): New.
166 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
168 * elf64-x86-64.c (R_X86_64_converted_reloc_bit): New.
169 (elf_x86_64_info_to_howto): Get the real relocation type by
170 masking out R_X86_64_converted_reloc_bit.
171 (elf_x86_64_check_tls_transition): Get the real relocation type
172 by masking out R_X86_64_converted_reloc_bit.
173 (elf_x86_64_convert_load_reloc): Set R_X86_64_converted_reloc_bit
174 instead of setting converted_reloc.
175 (elf_x86_64_relocate_section): Check R_X86_64_converted_reloc_bit
176 instead of converted_reloc. Get the real relocation type by
177 masking out R_X86_64_converted_reloc_bit.
178 (elf_x86_64_link_setup_gnu_properties): Verify that the value of
179 R_X86_64_converted_reloc_bit is valid.
180 * elfxx-x86.h (converted_reloc): Removed.
182 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
184 * elf32-i386.c (elf_i386_relocate_section): Don't change r_type
185 when calling elf_i386_tls_transition. Don't use ELF32_R_TYPE
186 to get the relocation type again.
187 * elf64-x86-64.c (elf_x86_64_relocate_section): Don't change
188 r_type when calling elf_x86_64_tls_transition. Don't use
189 ELF32_R_TYPE to get the relocation type again.
191 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
193 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Properly set
196 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
198 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Remove the sec
199 argument. Don't check relocation overflow. Avoid relocation
200 overflow if --no-relax is used. Set converted_reloc on symbol
201 if a GOTPCREL relocation is converted.
202 (elf_x86_64_relocate_section): Issue a fatal error and suggest
203 --no-relax if GOTPCREL relocation conversion leads to relocation
205 * elfxx-x86.h (elf_x86_link_hash_entry): Add converted_reloc.
207 2017-09-05 Alexander Fedotov <alexander.fedotov@nxp.com>
208 Edmar Wienskoski <edmar.wienskoski@nxp.com
210 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_VLE_ADDR20.
211 (ppc_elf_check_relocs): Handle it.
212 (ppc_elf_vle_split20): New function.
213 (ppc_elf_relocate_section): Handle R_PPC_VLE_ADDR20.
215 2017-09-03 H.J. Lu <hongjiu.lu@intel.com>
218 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Set tlsdesc_plt
219 for x86-64 if GOT_TLS_GDESC_P is true.
221 2017-09-03 Alan Modra <amodra@gmail.com>
224 * elfxx-x86.h (elf_x86_hash_table): Check is_elf_hash_table first.
226 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
228 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
229 tls_get_addr for x86-64 in one place.
231 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
233 * configure.ac (bfd_backends): Add elf64-x86-64.lo together
234 with elfxx-x86.lo for 64-bit BFD.
235 * configure: Regenerated.
237 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
239 * elf32-i386.c (elf_i386_convert_load): Renamed to ...
240 (_bfd_i386_elf_convert_load): This. Remove static.
241 (elf_i386_size_dynamic_sections): Removed.
242 (elf_backend_size_dynamic_sections): Likewise.
243 * elf64-x86-64.c (elf_x86_64_convert_load): Renamed to ...
244 (_bfd_x86_64_elf_convert_load): This. Remove static.
245 (elf_x86_64_size_dynamic_sections): Removed.
246 (elf_backend_size_dynamic_sections): Likewise.
247 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): Renamed to ...
248 (elf_x86_allocate_dynrelocs): This. Make it static.
249 (_bfd_x86_elf_allocate_local_dynrelocs): Renamed to ...
250 (elf_x86_allocate_local_dynreloc): This. Make it static.
251 (elf_i386_is_reloc_section): New function.
252 (elf_x86_64_is_reloc_section): Likewise.
253 (_bfd_x86_elf_link_hash_table_create): Initialize convert_load,
254 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
255 Rearrange got_entry_size initialization.
256 (_bfd_x86_elf_size_dynamic_sections): New function.
257 * elfxx-x86.h (elf_x86_link_hash_table): Add convert_load,
258 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
259 (_bfd_i386_elf_convert_load): New.
260 (_bfd_x86_64_elf_convert_load): Likewise.
261 (_bfd_x86_elf_size_dynamic_sections): Likewise.
262 (elf_backend_size_dynamic_sections): Likewise.
263 (_bfd_x86_elf_allocate_dynrelocs): Removed.
264 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
266 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
268 * elfxx-x86.h (elf_x86_link_hash_table): Rearrange fields and
271 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
273 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
274 sgotplt_jump_table_size with elf_x86_compute_jump_table_size.
276 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
278 * elf32-i386.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
279 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Moved to ...
280 * elfxx-x86.h (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
281 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Here.
282 * elf64-x86-64.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
283 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Removed.
285 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
287 * elf32-i386.c (elf_i386_allocate_dynrelocs): Removed.
288 (elf_i386_allocate_local_dynrelocs): Likewise.
289 (elf_i386_size_dynamic_sections): Replace
290 elf_i386_allocate_dynrelocs/elf_i386_allocate_local_dynrelocs
291 with _bfd_x86_elf_allocate_dynrelocs and
292 _bfd_x86_elf_allocate_local_dynrelocs.
293 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Removed.
294 (elf_x86_64_allocate_local_dynrelocs): Likewise.
295 (elf_x86_64_size_dynamic_sections): Replace
296 elf_x86_64_allocate_dynrelocs/elf_x86_64_allocate_local_dynrelocs
297 with _bfd_x86_elf_allocate_dynrelocs and
298 _bfd_x86_elf_allocate_local_dynrelocs.
299 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): New function.
300 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
301 * elfxx-x86.h (_bfd_x86_elf_allocate_dynrelocs): New prototype.
302 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
304 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
306 * elf32-i386.c (is_i386_elf): Removed.
307 (elf_i386_check_relocs): Replace is_i386_elf with is_x86_elf.
308 (elf_i386_size_dynamic_sections): Likewise.
309 (elf_i386_relocate_section): Likewise.
310 * elf64-x86-64.c (is_x86_64_elf): Removed.
311 (elf_x86_64_check_relocs): Replace is_x86_64_elf with
313 (elf_x86_64_size_dynamic_sections): Likewise.
314 (elf_x86_64_relocate_section): Likewise.
315 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
317 * elfxx-x86.h (elf_x86_link_hash_table): Add target_id.
320 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
322 * elf32-i386.c (elf_i386_compute_jump_table_size): Removed.
323 (elf_i386_allocate_dynrelocs): Replace
324 elf_i386_compute_jump_table_size with
325 elf_x86_compute_jump_table_size.
326 (elf_i386_size_dynamic_sections): Likewise.
327 * elf64-x86-64.c (elf_x86_64_compute_jump_table_size): Removed.
328 (elf_x86_64_allocate_dynrelocs): Replace
329 elf_x86_64_compute_jump_table_size with
330 elf_x86_compute_jump_table_size.
331 (elf_x86_64_size_dynamic_sections): Likewise.
332 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
334 * elfxx-x86.h (elf_x86_link_hash_table): Add got_entry_size.
335 (elf_x86_compute_jump_table_size): New.
337 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
339 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
341 (_bfd_x86_elf_adjust_dynamic_symbol): Use sizeof_reloc.
342 * elfxx-x86.h (elf_x86_link_hash_table): Add sizeof_reloc.
344 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
346 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check VxWorks
347 with htab->is_vxworks.
348 (elf_i386_size_dynamic_sections): Likewise.
349 (elf_i386_relocate_section): Likewise.
350 (elf_i386_finish_dynamic_symbol): Likewise.
351 (elf_i386_finish_dynamic_sections): Likewise.
353 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
355 * elf32-i386.c (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
356 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
357 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Moved to ...
358 * elfxx-x86.h (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
359 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
360 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Here.
361 * elf64-x86-64.c (GOT_TLS_IE, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
362 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Removed.
364 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
367 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Check
368 ELF_COMMON_DEF_P for common symbols.
370 2017-09-02 Alan Modra <amodra@gmail.com>
372 * elf-eh-frame.c (offset_adjust): Avoid false positive gcc warning.
373 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Likewise.
374 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
376 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
378 * elf32-i386.c (elf_i386_gc_mark_hook): Removed.
379 (elf_backend_gc_mark_hook): Likewise.
380 * elf64-x86-64.c (elf_x86_64_gc_mark_hook): Likewise.
381 (elf_backend_gc_mark_hook): Likewise.
382 * elfxx-x86.c (_bfd_x86_elf_gc_mark_hook): New function.
383 * elfxx-x86.h (_bfd_x86_elf_gc_mark_hook): New.
384 (elf_backend_gc_mark_hook): Likewise.
386 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
388 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Removed.
389 (elf_backend_adjust_dynamic_symbol): Likewise.
390 * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.
391 (elf_backend_adjust_dynamic_symbol): Likewise.
392 * elfxx-x86.c (_bfd_x86_elf_adjust_dynamic_symbol): New function.
393 (_bfd_x86_elf_link_setup_gnu_properties): Copy is_vxworks.
394 * elfxx-x86.h (elf_x86_link_hash_table): Add is_vxworks.
395 (_bfd_x86_elf_adjust_dynamic_symbol): New.
396 (elf_backend_adjust_dynamic_symbol): Likewise.
398 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
400 * elfxx-x86.h (elf_x86_plt_layout_table): Fix a typo in
403 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
405 * elf32-i386.c (elf_i386_mkobject): Removed.
406 (bfd_elf32_mkobject): Likewise.
407 * elf64-x86-64.c (elf_x86_64_mkobject): Likewise.
408 (bfd_elf64_mkobject): Likewise.
409 (bfd_elf32_mkobject): Likewise.
410 * elfxx-x86.c (_bfd_x86_elf_mkobject): New function.
411 * elfxx-x86.h (_bfd_x86_elf_mkobject): New.
412 (bfd_elf64_mkobject): Likewise.
413 (bfd_elf32_mkobject): Likewise.
415 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
417 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Updated.
418 Call _bfd_x86_elf_link_setup_gnu_properties.
419 * elf64-x86-64.c (elf_x86_lazy_plt_layout): Initialize
420 pic_plt0_entry and pic_plt_entry fields with the non-PIC PLT
422 (elf_x86_64_non_lazy_plt): Likewise.
423 (elf_x86_64_lazy_bnd_plt): Likewise.
424 (elf_x86_64_non_lazy_bnd_plt): Likewise.
425 (elf_x86_64_lazy_ibt_plt): Likewise.
426 (elf_x32_lazy_ibt_plt): Likewise.
427 (elf_x86_64_non_lazy_ibt_plt): Likewise.
428 (elf_x32_non_lazy_ibt_plt): Likewise.
429 (elf_x86_64_nacl_plt): Likewise.
430 (elf_x86_64_link_setup_gnu_properties): Updated. Call
431 _bfd_x86_elf_link_setup_gnu_properties.
432 * elfxx-x86.c: Include elf-vxworks.h".
433 (_bfd_x86_elf_link_setup_gnu_properties): New function.
434 * elfxx-x86.h (elf_x86_lazy_plt_layout): Remove "for i386 only"
435 comments for pic_plt0_entry and pic_plt_entry.
436 (elf_x86_non_lazy_plt_layout): Likewise.
437 (elf_x86_plt_layout_table): New.
438 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
440 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
443 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Create
444 .eh_frame section for the second PLT.
445 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Correct
446 alignment of .eh_frame section for the second PLT.
448 2017-09-01 Nick Clifton <nickc@redhat.com>
451 * dwarf2.c (decode_line_info): Fix test for an overlong line info
454 2017-09-01 Nick Clifton <nickc@redhat.com>
457 * elf-attrs.c (_bfd_elf_parse_attributes): Ensure that the
458 attribute buffer is NUL terminated.
460 2017-08-31 Nick Clifton <nickc@redhat.com>
463 * dwarf2.c (read_section): If necessary add a terminating NUL byte
464 to dwarf string sections.
466 2017-08-31 Alan Modra <amodra@gmail.com>
468 * po/SRC-POTFILES.in: Regenerate.
470 2017-08-31 Alan Modra <amodra@gmail.com>
472 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Don't exit early
473 for a section containing just a terminator. Allow multiple
474 terminators at end of section.
475 * elflink.c (bfd_elf_discard_info): Iterate over .eh_frame
476 sections when not adding alignment. Assert on terminator in
479 2017-08-31 Alan Modra <amodra@gmail.com>
483 * elflink.c (bfd_elf_discard_info): Don't pad embedded zero
486 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
488 * configure.ac (bfd_backends): Add elf64.lo together with
489 elfxx-x86.lo for 64-bit BFD.
490 * configure: Regenerated.
492 2017-08-31 James Bowman <james.bowman@ftdichip.com>
494 * elf32-ft32.c (ft32_elf_howto_table): Use complain_overflow_dont
497 2017-08-31 Alan Modra <amodra@gmail.com>
500 * opncls.c (bfd_close_all_done): Don't call bfd_cache_close
501 before _close_and_cleanup. Call iovec->bclose after.
502 (bfd_close): Remove code common to, and call, bfd_close_all_done.
504 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
506 * elf32-i386.c (elf_i386_plt_type): Removed.
507 (elf_i386_plt): Likewise.
508 (elf_i386_get_synthetic_symtab): Updated. Call
509 _bfd_x86_elf_get_synthetic_symtab.
510 * elf64-x86-64.c (elf_x86_64_plt_type): Removed.
511 (elf_x86_64_plt): Likewise.
512 (elf_x86_64_get_synthetic_symtab): Updated. Call
513 _bfd_x86_elf_get_synthetic_symtab.
514 * elfxx-x86.c (elf_i386_get_plt_got_vma): New function.
515 (elf_x86_64_get_plt_got_vma): Likewise.
516 (elf_i386_valid_plt_reloc_p): Likewise.
517 (elf_x86_64_valid_plt_reloc_p): Likewise.
518 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
519 * elfxx-x86.h (elf_x86_plt_type): New.
520 (elf_x86_plt): Likewise.
521 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
523 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
525 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Check
526 target_id instead of elf_machine_code.
528 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
530 * elf32-i386.c (ELF_DYNAMIC_INTERPRETER): Removed.
531 (elf_i386_lazy_plt_layout): Likewise.
532 (elf_i386_non_lazy_plt_layout): Likewise.
533 (elf_i386_plt_layout): Likewise.
534 (elf_i386_link_hash_table): Likewise.
535 (elf_i386_next_tls_desc_index): Likewise.
536 (elf_i386_srelplt2): Likewise.
537 (elf_i386_plt): Likewise.
538 (elf_i386_lazy_plt): Likewise.
539 (elf_i386_non_lazy_plt): Likewise.
540 (elf_i386_link_hash_table_create): Likewise.
541 (bfd_elf32_bfd_link_hash_table_create): Likewise.
542 (elf_i386_lazy_plt): Updated.
543 (elf_i386_non_lazy_plt): Likewise.
544 (elf_i386_lazy_ibt_plt): Likewise.
545 (elf_i386_non_lazy_ibt_plt): Likewise.
546 (elf_i386_allocate_dynrelocs): Likewise.
547 (elf_i386_size_dynamic_sections): Likewise.
548 (elf_i386_relocate_section): Likewise.
549 (elf_i386_finish_dynamic_symbol): Likewise.
550 (elf_i386_finish_dynamic_sections): Likewise.
551 (elf_i386_get_synthetic_symtab): Likewise.
552 (elf_i386_link_setup_gnu_properties): Likewise.
553 (elf_i386_nacl_plt): Likewise.
554 * elf64-x86-64.c (ABI_64_P): Removed.
555 (ELF64_DYNAMIC_INTERPRETER): Likewise.
556 (ELF32_DYNAMIC_INTERPRETER): Likewise.
557 (elf_x86_64_lazy_plt_layout): Likewise.
558 (elf_x86_64_non_lazy_plt_layout): Likewise.
559 (elf_x86_64_plt_layout): Likewise.
560 (elf_x86_64_link_hash_table): Likewise.
561 (elf_x86_64_plt): Likewise.
562 (elf_x86_64_lazy_plt): Likewise.
563 (elf_x86_64_non_lazy_plt): Likewise.
564 (elf_x86_64_link_hash_table_create): Likewise.
565 (bfd_elf64_bfd_link_hash_table_create): Likewise.
566 (bfd_elf32_bfd_link_hash_table_create): Likewise.
567 (elf_x86_64_lazy_plt): Updated.
568 (elf_x86_64_non_lazy_plt): Likewise.
569 (elf_x86_64_lazy_bnd_plt): Likewise.
570 (elf_x86_64_non_lazy_bnd_plt): Likewise.
571 (elf_x86_64_lazy_ibt_plt): Likewise.
572 (elf_x32_lazy_ibt_plt): Likewise.
573 (elf_x86_64_non_lazy_ibt_plt): Likewise.
574 (elf_x32_non_lazy_ibt_plt): Likewise.
575 (elf_x86_64_allocate_dynrelocs): Likewise.
576 (elf_x86_64_size_dynamic_sections): Likewise.
577 (elf_x86_64_relocate_section): Likewise.
578 (elf_x86_64_finish_dynamic_symbol): Likewise.
579 (elf_x86_64_finish_dynamic_sections): Likewise.
580 (elf_x86_64_get_synthetic_symtab): Likewise.
581 (elf_x86_64_link_setup_gnu_properties): Likewise.
582 (elf_x86_64_nacl_plt): Likewise.
583 * elfxx-x86.c: Include "objalloc.h", "elf/i386.h" and
585 (ELF32_DYNAMIC_INTERPRETER): New.
586 (ELF64_DYNAMIC_INTERPRETER): Likewise.
587 (ELFX32_DYNAMIC_INTERPRETER): Likewise.
588 (_bfd_x86_elf_link_hash_table_create): Likewise.
589 (_bfd_x86_elf_link_hash_table_free): Renamed to ...
590 (elf_x86_link_hash_table_free): This. Make it static.
591 * elfxx-x86.h: Don't include "objalloc.h".
593 (elf_x86_lazy_plt_layout): Likewise.
594 (elf_x86_non_lazy_plt_layout): Likewise.
595 (elf_x86_plt_layout): Likewise.
596 (_bfd_x86_elf_link_hash_table_create): Likewise.
597 (bfd_elf64_bfd_link_hash_table_create): Likewise.
598 (bfd_elf32_bfd_link_hash_table_create): Likewise.
599 (elf_x86_link_hash_table): Add plt, lazy_plt, non_lazy_plt,
600 srelplt2 and next_tls_desc_index.
601 (_bfd_x86_elf_link_hash_table_free): Removed.
603 2017-08-30 Maciej W. Rozycki <macro@imgtec.com>
605 * elfxx-mips.c (mips_elf_perform_relocation): Correct microMIPS
606 branch offset interpretation.
608 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
611 * opncls.c (bfd_close_all_done): Call _close_and_cleanup.
613 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
615 * elf64-x86-64.c (elf_x86_64_next_tls_desc_index): Removed.
616 (elf_x86_64_srelplt2): Likewise.
618 2017-08-30 Alan Modra <amodra@gmail.com>
620 * elf64-ppc.c (struct ppc_link_hash_table): Add do_tls_opt.
621 (ppc64_elf_tls_optimize): Set it.
622 (ppc64_elf_relocate_section): Nop addis on TPREL16_HA, and convert
623 insn on TPREL16_LO and TPREL16_LO_DS relocs to use r13 when
624 addis would add zero.
625 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add do_tls_opt.
626 (ppc_elf_tls_optimize): Set it.
627 (ppc_elf_relocate_section): Nop addis on TPREL16_HA, and convert
628 insn on TPREL16_LO relocs to use r2 when addis would add zero.
630 2017-08-30 Alan Modra <amodra@gmail.com>
632 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing
633 __tls_get_addr call sequences to LE, don't move the addi down
634 to the nop. Replace the bl with addi and leave the nop alone.
636 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
638 * elf32-i386.c (elf_i386_pie_finish_undefweak_symbol):
640 * elf64-x86-64.c (elf_x86_64_finish_local_dynamic_symbol):
642 (elf_x86_64_pie_finish_undefweak_symbol): Likewise.
644 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
646 * Makefile.am (BFD32_BACKENDS): Add elfxx-x86.lo.
647 (BFD64_BACKENDS): Likewise.
648 (BFD32_BACKENDS_CFILES): Add elfxx-x86.c.
649 (BFD64_BACKENDS_CFILES): Likewise.
650 * Makefile.in: Regenerated.
651 * configure.ac (bfd_backends): Add elfxx-x86.lo together with
652 elf32-i386.lo and elf64-x86-64.lo.
653 * configure: Regenerated.
654 * elf32-i386.c: Include "elfxx-x86.h" instead of "sysdep.h",
655 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
656 "objalloc.h" and "hashtab.h".
657 (ELIMINATE_COPY_RELOCS): Removed.
658 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
659 (SYMBOL_NO_COPYRELOC): Likewise.
660 (elf_i386_link_hash_entry): Likewise.
661 (GOT_UNKNOWN): Likewise.
662 (GOT_NORMAL): Likewise.
663 (GOT_TLS_GD): Likewise.
664 (elf_i386_hash_entry): Likewise.
665 (elf_i386_obj_tdata): Likewise.
666 (elf_i386_tdata): Likewise.
667 (elf_i386_local_got_tls_type): Likewise.
668 (elf_i386_local_tlsdesc_gotent): Likewise.
669 (elf_i386_hash_table): Likewise.
670 (elf_i386_link_hash_newfunc): Likewise.
671 (elf_i386_local_htab_hash): Likewise.
672 (elf_i386_local_htab_eq): Likewise.
673 (elf_i386_get_local_sym_hash): Likewise.
674 (elf_i386_link_hash_table_free): Likewise.
675 (elf_i386_copy_indirect_symbol): Likewise.
676 (elf_i386_fixup_symbol): Likewise.
677 (elf_i386_readonly_dynrelocs): Likewise.
678 (elf_i386_always_size_sections): Likewise.
679 (elf_i386_set_tls_module_base): Likewise.
680 (elf_i386_dtpoff_base): Likewise.
681 (compare_relocs): Likewise.
682 (elf_i386_hash_symbol): Likewise.
683 (elf_i386_parse_gnu_properties): Likewise.
684 (elf_i386_merge_gnu_properties): Likewise.
685 (elf_i386_link_check_relocs): Likewise.
686 (elf_i386_merge_symbol_attribute): Likewise.
687 (bfd_elf32_bfd_link_check_relocs): Likewise.
688 (elf_backend_copy_indirect_symbol): Likewise.
689 (elf_backend_always_size_sections): Likewise.
690 (elf_backend_omit_section_dynsym): Likewise.
691 (elf_backend_hash_symbol): Likewise.
692 (elf_backend_fixup_symbol): Likewise.
693 (elf_backend_parse_gnu_properties): Likewise.
694 (elf_backend_merge_gnu_properties): Likewise.
695 (elf_backend_merge_symbol_attribute): Likewise.
696 (elf_i386_mkobject): Updated.
697 (elf_i386_link_hash_table_create): Likewise.
698 (elf_i386_check_tls_transition): Likewise.
699 (elf_i386_tls_transition): Likewise.
700 (elf_i386_convert_load_reloc): Likewise.
701 (elf_i386_check_relocs): Likewise.
702 (elf_i386_adjust_dynamic_symbol): Likewise.
703 (elf_i386_allocate_dynrelocs): Likewise.
704 (elf_i386_convert_load): Likewise.
705 (elf_i386_size_dynamic_sections): Likewise.
706 (elf_i386_relocate_section): Likewise.
707 (elf_i386_finish_dynamic_symbol ): Likewise.
708 (elf_i386_finish_dynamic_sections): Likewise.
709 (elf_i386_output_arch_local_syms): Likewise.
710 (elf_i386_get_synthetic_symtab): Likewise.
711 (elf_i386_link_setup_gnu_properties): Likewise.
712 (elf_i386_link_hash_table): Use elf_x86_link_hash_table, instead
713 of elf_link_hash_table, as base.
714 (elf_i386_next_tls_desc_index): New.
715 (elf_i386_srelplt2): Likewise.
716 (elf_i386_plt): Likewise.
717 (elf_i386_lazy_plt): Likewise.
718 (elf_i386_non_lazy_plt): Likewise.
719 * elf32-x86-64.c: Include "elfxx-x86.h" instead of "sysdep.h",
720 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
721 "objalloc.h" and "hashtab.h".
722 (ELIMINATE_COPY_RELOCS): Removed.
723 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
724 (SYMBOL_NO_COPYRELOC): Likewise.
725 (elf_x86_64_link_hash_entry): Likewise.
726 (GOT_UNKNOWN): Likewise.
727 (GOT_NORMAL): Likewise.
728 (GOT_TLS_GD): Likewise.
729 (elf_x86_64_hash_entry): Likewise.
730 (elf_x86_64_obj_tdata): Likewise.
731 (elf_x86_64_tdata): Likewise.
732 (elf_x86_64_local_got_tls_type): Likewise.
733 (elf_x86_64_local_tlsdesc_gotent): Likewise.
734 (elf_x86_64_hash_table): Likewise.
735 (elf_x86_64_link_hash_newfunc): Likewise.
736 (elf_x86_64_local_htab_hash): Likewise.
737 (elf_x86_64_local_htab_eq): Likewise.
738 (elf_x86_64_get_local_sym_hash): Likewise.
739 (elf_x86_64_link_hash_table_free): Likewise.
740 (elf_x86_64_copy_indirect_symbol): Likewise.
741 (elf_x86_64_fixup_symbol): Likewise.
742 (elf_x86_64_readonly_dynrelocs): Likewise.
743 (elf_x86_64_always_size_sections): Likewise.
744 (elf_x86_64_set_tls_module_base): Likewise.
745 (elf_x86_64_dtpoff_base): Likewise.
746 (compare_relocs): Likewise.
747 (elf_x86_64_merge_symbol_attribute): Likewise.
748 (elf_x86_64_hash_symbol): Likewise.
749 (elf_x86_64_parse_gnu_properties): Likewise.
750 (elf_x86_64_merge_gnu_properties): Likewise.
751 (elf_x86_64_link_check_relocs): Likewise.
752 (elf_backend_copy_indirect_symbol): Likewise.
753 (elf_backend_always_size_sections): Likewise.
754 (bfd_elf64_bfd_link_check_relocs): Likewise.
755 (elf_backend_merge_symbol_attribute): Likewise.
756 (elf_backend_hash_symbol): Likewise.
757 (elf_backend_omit_section_dynsym): Likewise.
758 (elf_backend_fixup_symbol): Likewise.
759 (elf_backend_parse_gnu_properties): Likewise.
760 (elf_backend_merge_gnu_properties): Likewise.
761 (bfd_elf32_bfd_link_check_relocs): Likewise.
762 (elf_x86_64_mkobject): Updated.
763 (elf_x86_64_link_hash_table_create): Likewise.
764 (elf_x86_64_check_tls_transition): Likewise.
765 (elf_x86_64_tls_transition): Likewise.
766 (elf_x86_64_convert_load_reloc): Likewise.
767 (elf_x86_64_check_relocs): Likewise.
768 (elf_x86_64_adjust_dynamic_symbol): Likewise.
769 (elf_x86_64_allocate_dynrelocs): Likewise.
770 (elf_x86_64_convert_load): Likewise.
771 (elf_x86_64_size_dynamic_sections): Likewise.
772 (elf_x86_64_relocate_section): Likewise.
773 (elf_x86_64_finish_dynamic_symbol ): Likewise.
774 (elf_x86_64_finish_dynamic_sections): Likewise.
775 (elf_x86_64_output_arch_local_syms): Likewise.
776 (elf_x86_64_get_synthetic_symtab): Likewise.
777 (elf_x86_64_link_setup_gnu_properties): Likewise.
778 (elf_x86_64_link_hash_table): Use elf_x86_link_hash_table,
779 instead of elf_link_hash_table, as base.
780 (elf_x86_64_next_tls_desc_index): New.
781 (elf_x86_64_srelplt2): Likewise.
782 (elf_x86_64_plt): Likewise.
783 (elf_x86_64_lazy_plt): Likewise.
784 (elf_x86_64_non_lazy_plt): Likewise.
785 * elfxx-x86.c: New file.
786 * elfxx-x86.h: Likewise.
788 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
790 * elf32-i386.c (elf_i386_get_synthetic_symtab): Simplify bad
792 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
794 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
796 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check valid PLT
797 sections before checking dynamic relocations and free invalid
798 PLT section contents.
799 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
801 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
803 * elf-bfd.h (_bfd_elf_ifunc_get_synthetic_symtab): Removed.
804 * elf-ifunc.c (_bfd_elf_ifunc_get_synthetic_symtab): Likewise.
806 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
809 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check for valid
811 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
813 2017-08-27 H.J. Lu <hongjiu.lu@intel.com>
815 * elf32-i386.c (elf_i386_link_hash_newfunc): Initialize
817 * elf64-x86-64.c (elf_x86_64_link_hash_newfunc): Likewise.
819 2017-08-26 H.J. Lu <hongjiu.lu@intel.com>
822 * elf-bfd.h (elf_obj_tdata): Use ENUM_BITFIELD on object_id,
823 dyn_lib_class and has_gnu_symbols. Change bad_symtab to bitfield.
824 Add a has_no_copy_on_protected bitfield.
825 (elf_has_no_copy_on_protected): New.
826 * elf-properties.c (_bfd_elf_parse_gnu_properties): Set
827 elf_has_no_copy_on_protected for GNU_PROPERTY_NO_COPY_ON_PROTECTED.
828 (elf_merge_gnu_property_list): Likewise.
829 (_bfd_elf_link_setup_gnu_properties): Set extern_protected_data
830 to FALSE for elf_has_no_copy_on_protected.
831 * elf32-i386.c (SYMBOL_NO_COPYRELOC): New.
832 (elf_i386_link_hash_entry): Add def_protected.
833 (elf_i386_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
834 when checking info->nocopyreloc.
835 (elf_i386_link_setup_gnu_properties): Don't set
836 extern_protected_data here.
837 (elf_i386_merge_symbol_attribute): New function.
838 (elf_backend_merge_symbol_attribute): New.
839 * elf64-x86-64.c (SYMBOL_NO_COPYRELOC): New.
840 (elf_x86_64_link_hash_entry): Add def_protected.
841 (elf_x86_64_need_pic): Report protected symbol for def_protected.
842 (elf_x86_64_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
843 when checking info->nocopyreloc.
844 (elf_x86_64_relocate_section): Also check for R_X86_64_PC32
845 relocation run-time overflow and unresolvable R_X86_64_32S
846 relocation against protected data symbol defined in shared object
847 with GNU_PROPERTY_NO_COPY_ON_PROTECTED.
848 (elf_x86_64_link_setup_gnu_properties): Don't set
849 extern_protected_data here.
850 (elf_x86_64_merge_symbol_attribute): New function.
851 (elf_backend_merge_symbol_attribute): New.
853 2017-08-26 Alan Modra <amodra@gmail.com>
855 * elf32-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
856 (ppc_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
857 (ppc_elf_relocate_section): Comment fix.
858 * elf64-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
859 (ppc64_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
860 Support dynamic relocs for TPREL16 when non-pic too.
861 (dec_dynrel_count): Adjust TPREL16 handling as per check_relocs.
862 (ppc64_elf_relocate_section): Support dynamic relocs for TPREL16
865 2017-08-25 H.J. Lu <hongjiu.lu@intel.com>
867 * elf32-i386.c (elf_i386_link_hash_entry): Remove redundant
868 "symbol" in comments.
869 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Likewise.
871 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
874 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for
875 R_X86_64_PC32 relocation run-time overflow and unresolvable
876 R_X86_64_32S relocation with -z nocopyreloc.
878 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
880 * elf32-i386.c (elf_i386_check_relocs): Revert the last change.
881 Undefined symbols may not have a type.
882 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
884 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
886 * elf64-x86-64.c (elf_x86_64_need_pic): Add an argument for
887 bfd_link_info. Report shared, PIE or PDE object based on
889 (elf_x86_64_check_relocs): Update elf_x86_64_need_pic call.
890 (elf_x86_64_relocate_section): Likewise.
892 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
894 * elf32-i386.c (elf_i386_check_relocs): Increment PLT count only
895 for function symbols.
896 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
898 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
900 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set
901 extern_protected_data to FALSE if GNU_PROPERTY_NO_COPY_ON_PROTECTED
902 is set on any input relocatable file.
903 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
905 2017-08-23 Alan Modra <amodra@gmail.com>
908 * elf64-ppc.c (ensure_undef_dynamic): Rename from
909 ensure_undefweak_dynamic. Handle undefined too.
910 * elf32-ppc.c (ensure_undef_dynamic): Likewise.
911 * elf32-hppa.c (ensure_undef_dynamic): Likewise.
912 (allocate_dynrelocs): Discard undefined non-default visibility
913 relocs first. Make undefined syms dynamic. Tidy goto.
915 2017-08-21 Alan Modra <amodra@gmail.com>
916 H.J. Lu <hongjiu.lu@intel.com>
919 * elf-bfd.h (SYMBOLIC_BIND): Return TRUE for __start/__stop symbols.
920 * elflink.c (bfd_elf_define_start_stop): Rewrite.
922 2017-08-21 Hans-Peter Nilsson <hp@bitrange.com>
925 * elf64-mmix.c (mmix_elf_relax_section): Correct handling of
926 undefined weak symbols.
928 2017-08-18 Nick Clifton <nickc@redhat.com>
931 * tekhex.c (getsym): Fix check for source pointer walking off the
932 end of the input buffer.
934 2017-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
937 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Skip IFUNC
938 relocations in debug sections, change abort to _bfd_error_handler.
940 2017-08-14 Nick Clifton <nickc@redhat.com>
943 * elf.c (setup_group): Check for an empty or very small group
945 * po/bfd.pot: Regenerate.
947 2017-08-14 Alan Modra <amodra@gmail.com>
950 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't add
951 alignment padding here.
952 * elflink.c (bfd_elf_discard_info): Add .eh_frame padding here
953 in a reverse pass over sections.
955 2017-08-11 H.J. Lu <hongjiu.lu@intel.com>
958 * elf32-i386.c (elf_i386_get_synthetic_symtab): Allocate space
959 for @plt suffixes first.
960 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
962 2017-08-08 Nick Clifton <nickc@redhat.com>
965 * elf-attrs.c (_bfd_elf_parse_attributes): Complain about very
966 small section lengths.
967 * elf.c (_bfd_elf_setup_sections): Skip empty entries in the group
969 (elfcore_grok_freebsd_prstatus): Add checks to make sure that
970 there is enough data present in the note.
972 2017-08-08 Alan Modra <amodra@gmail.com>
975 * elf32-microblaze.c (microblaze_elf_check_relocs): Don't bump
976 got.refcount for GOTOFF relocs, just create .got section.
978 2017-08-07 H.J. Lu <hongjiu.lu@intel.com>
980 * elflink.c (elf_link_add_object_symbols): Move common symbol
981 check after bed->common_definition.
983 2017-08-07 Alan Modra <amodra@gmail.com>
986 * elflink.c (bfd_elf_final_link): Don't segfault when sections
987 needed to define various dynamic tags have been discarded.
989 2017-08-07 Nick Clifton <nickc@redhat.com>
992 * elf32-i386.c (elf_i386_link_setup_gnu_properties): If the dynobj
993 has not been set then use the bfd returned by
994 _bfd_elf_link_setup_gnu_properties. If that is null then search
995 through all the input bfds selecting the first normal, ELF format
997 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
999 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
1001 * elf32-i386.c (elf_i386_link_hash_entry): Change tls_get_addr
1003 (elf_i386_link_hash_newfunc): Initialize tls_get_addr to 0.
1004 (elf_i386_check_tls_transition): Check tls_get_addr directly.
1005 (elf_i386_convert_load_reloc): Update tls_get_addr check.
1006 (elf_i386_link_check_relocs): New function.
1007 (bfd_elf32_bfd_link_check_relocs): New.
1008 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Change tls_get_addr
1010 (elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 0.
1011 (elf_x86_64_check_tls_transition): Check tls_get_addr directly.
1012 (elf_x86_64_convert_load_reloc): Update tls_get_addr check.
1013 (elf_x86_64_link_check_relocs): New function.
1014 (bfd_elf64_bfd_link_check_relocs): New.
1015 (bfd_elf32_bfd_link_check_relocs): Likewise.
1017 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
1020 * elflink.c (elf_link_add_object_symbols): Treat common symbol
1021 as undefined for --no-define-common.
1023 2017-08-05 Alan Modra <amodra@gmail.com>
1025 * elf32-hppa.c (elf32_hppa_set_gp): Don't require an
1026 hppa_link_hash_table.
1028 2017-08-02 Max Filippov <jcmvbkbc@gmail.com>
1030 * xtensa-isa.c (xtensa_isa_init): Don't update lookup table
1031 entries for sysregs with negative indices.
1033 2017-08-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1035 * elf32-s390.c (elf_s390_finish_dynamic_sections): Skip if it
1036 isn't the S/390 specific elf data.
1037 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
1039 2017-07-31 Kuan-Lin Chen <rufus@andestech.com>
1041 * elfxx-riscv.c (riscv_elf_add_sub_reloc): New function.
1042 * (howto_table) [R_RISCV_ADD8]: Use riscv_elf_add_sub_reloc.
1043 [R_RISCV_ADD16]: Likewise.
1044 [R_RISCV_ADD32]: Likewise.
1045 [R_RISCV_ADD64]: Likewise.
1046 [R_RISCV_SUB6]: Likewise.
1047 [R_RISCV_SUB8]: Likewise.
1048 [R_RISCV_SUB16]: Likewise.
1049 [R_RISCV_SUB32]: Likewise.
1050 [R_RISCV_SUB64]: Likewise.
1052 2017-07-31 Alan Modra <amodra@gmail.com>
1054 * elf64-ppc.c (ppc64_elf_tls_setup): Warn on --plt-localentry
1055 without ld.so checks.
1057 2017-07-29 Alan Modra <amodra@gmail.com>
1060 * elf64-ppc.c (struct ppc_link_hash_entry): Add non_zero_localentry.
1061 (ppc64_elf_merge_symbol): Set non_zero_localentry.
1062 (is_elfv2_localentry0): Test non_zero_localentry.
1063 (ppc64_elf_tls_setup): Default to --no-plt-localentry.
1065 2017-07-28 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1067 * elf32-s390.c (elf_s390_finish_dynamic_sections): Add NULL
1068 pointer check for htab->elf.irelplt.
1069 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
1071 2017-07-27 Nick Clifton <nickc@redhat.com>
1074 * mach-o.c (bfd_mach_o_read_symtab_strtab): Fail if the symtab
1076 * nlmcode.h (nlm_swap_auxiliary_headers_in): Replace assertion
1078 * section.c (bfd_make_section_with_flags): Fail if the name or bfd
1080 * vms-alpha.c (bfd_make_section_with_flags): Correct computation
1082 (evax_bfd_print_emh): Check for invalid string lengths.
1084 2017-07-25 Nick Clifton <nickc@redhat.com>
1086 * po/fr.po: Updated French translation.
1088 2017-07-25 Benjamin Green <bengreen5mx@gmail.com>
1091 * elf32-msp430.c (msp430_elf_relax_section): Allow conversion of
1092 16-bit absolute branches into 10-bit pc-relative branches on the
1093 MSP430 as well as the MSP430X.
1095 2017-07-25 Alan Modra <amodra@gmail.com>
1097 * elf64-ppc.c (struct map_stub): Add tls_get_addr_opt_bctrl.
1098 (stub_eh_frame_size): New function.
1099 (ppc_size_one_stub): Set group tls_get_addr_opt_bctrl.
1100 (group_sections): Init group tls_get_addr_opt_bctrl.
1101 (ppc64_elf_size_stubs): Update sizing and initialization of
1102 .eh_frame. Iteration over stubs via group list.
1103 (ppc64_elf_build_stubs): Iterate over stubs via group list.
1104 (ppc64_elf_finish_dynamic_sections): Update finalization of
1107 2017-07-24 Nick Clifton <nickc@redhat.com>
1110 * mach-o.c (bfd_mach_o_canonicalize_relocs): Pass the base address
1111 of the relocs to the canonicalize_one_reloc routine.
1112 * mach-o.h (struct bfd_mach_o_backend_data): Update the prototype
1113 for the _bfd_mach_o_canonicalize_one_reloc field.
1114 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add
1115 res_base parameter. Use to check for corrupt pair relocs.
1116 * mach-o-aarch64.c (bfd_mach_o_arm64_canonicalize_one_reloc):
1118 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc):
1120 * mach-o-x86-64.c (bfd_mach_o_x86_64_canonicalize_one_reloc):
1123 * vms-alpha.c (_bfd_vms_slurp_eihd): Make sure that there is
1124 enough data in the record before attempting to parse it.
1125 (_bfd_vms_slurp_eeom): Likewise.
1127 (_bfd_vms_slurp_egsd): Check for an invalid section index.
1128 (image_set_ptr): Likewise.
1129 (alpha_vms_slurp_relocs): Likewise.
1131 (alpha_vms_object_p): Check for a truncated record.
1133 2017-07-24 Nick Clifton <nickc@redhat.com>
1136 * reloc.c (_bfd_unrecognized_reloc): New function. Reports
1137 an unrecognized reloc and sets the bfd_error value.
1138 * libbfd.h: Regenerate.
1139 * elf32-arm.c (elf32_arm_final_link_relocate): Use the new
1141 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1142 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
1143 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1144 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.
1145 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
1147 2017-07-23 Alan Modra <amodra@gmail.com>
1149 * elf64-ppc.c (ppc64_elf_size_stubs): Correct advance to
1152 2017-07-19 Szabolcs Nagy <szabolcs.nagy@arm.com>
1155 * elfnn-aarch64.c (elfNN_aarch64_reloc_type_class): Return
1156 reloc_class_ifunc for ifunc symbols.
1158 2017-07-19 Nick Clifton <nickc@redhat.com>
1161 * archive.c (bfd_generic_archive_p): If the bfd does not have the
1162 correct magic bytes at the start, set the error to wrong format
1163 and clear the format selector before returning NULL.
1165 2017-07-19 Nick Clifton <nickc@redhat.com>
1168 * coff-rs6000.c (_bfd_strntol): New function.
1169 (_bfd_strntoll): New function.
1170 (GET_VALUE_IN_FIELD): New macro.
1171 (EQ_VALUE_IN_FIELD): new macro.
1172 (_bfd_xcoff_slurp_armap): Use new macros.
1173 (_bfd_xcoff_archive_p): Likewise.
1174 (_bfd_xcoff_read_ar_hdr): Likewise.
1175 (_bfd_xcoff_openr_next_archived_file): Likewise.
1176 (_bfd_xcoff_stat_arch_elt): Likewise.
1177 * coff64-rs6000.c (_bfd_strntol): New function.
1178 (_bfd_strntoll): New function.
1179 (GET_VALUE_IN_FIELD): New macro.
1180 (xcoff64_slurp_armap): Use new macros.
1182 2017-07-19 Claudiu Zissulescu <claziss@synopsys.com>
1183 John Eric Martin <John.Martin@emmicro-us.com>
1185 * bfd-in2.h: Regenerate.
1186 * libbfd.h: Regenerate.
1187 * elf32-arc.c (JLI): Define.
1188 * reloc.c: Add JLI relocations.
1190 2017-07-18 Nick Clifton <nickc@redhat.com>
1193 * coff-sh.c: Fix spelling typos.
1194 * compress.c: Likewise.
1195 * cpu-pdp11.c: Likewise.
1196 * ecofflink.c: Likewise.
1197 * elf-m10300.c: Likewise.
1199 * elf32-arm.c: Likewise.
1200 * elf32-m68k.c: Likewise.
1201 * elf32-nds32.c: Likewise.
1202 * elf32-ppc.c: Likewise.
1203 * elf32-sh.c: Likewise.
1204 * elf32-v850.c: Likewise.
1205 * elf64-ppc.c: Likewise.
1206 * elf64-x86-64.c: Likewise.
1207 * elflink.c: Likewise.
1208 * elfnn-aarch64.c: Likewise.
1209 * elfxx-mips.c: Likewise.
1211 * sunos.c: Likewise.
1212 * vms-alpha.c: Likewise.
1213 * xcofflink.c: Likewise.
1215 2017-07-18 Nick Clifton <nickc@redhat.com>
1218 * coffcode.h (handle_COMDAT): Replace abort with an error message
1221 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
1224 * elf64-x86-64.c (elf_x86_64_relocate_section): Limit PIC check
1227 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
1229 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
1231 2017-07-16 Alan Modra <amodra@gmail.com>
1233 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimize
1234 __tls_index GOT entries when using __tls_get_addr_opt stub.
1235 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1237 2017-07-12 Alan Modra <amodra@gmail.com>
1239 * po/es.po: Update from translationproject.org/latest/bfd/.
1240 * po/fi.po: Likewise.
1241 * po/fr.po: Likewise.
1242 * po/id.po: Likewise.
1243 * po/ja.po: Likewise.
1244 * po/ro.po: Likewise.
1245 * po/ru.po: Likewise.
1246 * po/sr.po: Likewise.
1247 * po/sv.po: Likewise.
1248 * po/tr.po: Likewise.
1249 * po/uk.po: Likewise.
1250 * po/vi.po: Likewise.
1251 * po/zh_CN.po: Likewise.
1252 * po/hr.po: New file from translationproject.org.
1253 * configure.ac (ALL_LINGUAS): Add hr. Sort.
1254 * configure: Regenerate.
1256 2017-07-12 Nick Clifton <nickc@redhat.com>
1258 Fix compile time warnings using gcc 7.1.1.
1259 * elf32-xtensa.c (elf_xtensa_get_plt_section): Increase length of
1261 (elf_xtensa_get_gotplt_section): Increase length of got_name
1263 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add a
1264 default return of FALSE.
1265 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc): Add a
1266 default return of FALSE.
1268 2017-07-12 Alan Modra <amodra@gmail.com>
1270 * binary.c (binary_set_section_contents): Don't print filepos in
1272 (coff_write_object_contents): Cast size_t for error message.
1273 (coff_slurp_line_table): Don't use bfd_vma symndx.
1274 (coff_slurp_reloc_table): Remove unneeded cast.
1275 * dwarf2.c (read_section): Cast bfd_int64_t to long long for
1277 (find_abstract_instance_name): Likewise.
1278 * elf32-arm.c (arm_type_of_stub): Correct error arg order.
1279 (bfd_elf32_arm_stm32l4xx_erratum_scan): Don't cast error arg.
1280 (elf32_arm_check_relocs): Make r_symndx an int.
1281 * elf32-cris.c (cris_elf_check_relocs): Delete extraneous %s in
1283 * elf32-metag.c (elf_metag_relocate_section): Delete extra error
1285 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Rewrite bogus
1287 * elf32-i386.c (elf_i386_check_relocs): Make r_symndx an int.
1288 * elf32-s390.c (elf_s390_check_relocs): Likewise.
1289 * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
1290 * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
1291 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
1292 * elf64-s390.c (elf_s390_check_relocs): Likewise.
1293 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1294 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
1295 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
1296 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
1297 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
1298 * elf64-mmix.c (_bfd_mmix_after_linker_allocation): Cast size_t args
1299 and use %lu for error message.
1300 * elflink.c (elf_link_adjust_relocs): Delete extra error message arg.
1301 * mmo.c (mmo_scan): Make stab_loc a file_ptr. Cast expression for
1304 * elf32-arm.c (elf32_arm_tls_relax): Correct format string and args
1306 (elf32_arm_final_link_relocate): Likewise.
1307 * coff-arm.c (bfd_arm_process_before_allocation): Likewise.
1308 * coffcode.h (styp_to_sec_flags): Likewise.
1309 * cofflink.c (_bfd_coff_write_global_sym): Likewise.
1310 * ecoff.c (_bfd_ecoff_slurp_symbol_table): Likewise.
1311 * elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise.
1312 * elf32-bfin.c (bfinfdpic_check_relocs): Likewise.
1313 (elf32_bfin_merge_private_bfd_data): Likewise.
1314 * elf32-cris.c (cris_elf_relocate_section): Likewise.
1315 * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
1316 * elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise.
1317 (i370_elf_relocate_section): Likewise.
1318 * elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise.
1319 * elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise.
1320 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
1321 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
1322 * elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise.
1323 * elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise.
1324 * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
1325 * elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise.
1326 (_bfd_mips_elf_merge_private_bfd_data): Likewise.
1327 * ieee.c (ieee_write_id, read_id): Likewise.
1328 * mach-o.c (bfd_mach_o_write_contents): Likewise.
1329 (bfd_mach_o_layout_commands, bfd_mach_o_read_section_32): Likewise.
1330 (bfd_mach_o_read_section_64, bfd_mach_o_read_symtab_symbol): Likewise.
1331 (bfd_mach_o_read_command, bfd_mach_o_header_p): Likewise.
1332 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Likewise.
1333 * stabs.c (_bfd_link_section_stabs): Likewise.
1335 * coff-arm.c (coff_arm_relocate_section): Use L modifier in error
1337 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
1338 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
1339 * coff-rs6000.c (xcoff_reloc_type_toc): Likewise.
1340 * coff-sh.c (sh_relax_section): Likewise.
1341 (sh_relax_delete_bytes, sh_swap_insns): Likewise.
1342 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
1343 * coffcode.h (coff_slurp_reloc_table): Likewise.
1344 * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
1345 (_bfd_coff_read_string_table): Likewise.
1346 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
1347 * compress.c (bfd_get_full_section_contents): Likewise.
1348 * dwarf2.c (read_formatted_entries, decode_line_info): Likewise.
1349 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
1350 * elf.c (bfd_elf_string_from_elf_section): Likewise.
1351 * elf32-arc.c (arc_special_overflow_checks): Likewise.
1352 * elf32-arm.c (elf32_arm_tls_relax): Likewise.
1353 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Likewise.
1354 (elf32_arm_write_section): Likewise.
1355 * elf32-bfin.c (bfin_relocate_section): Likewise.
1356 (bfinfdpic_relocate_section): Likewise.
1357 * elf32-hppa.c (hppa_build_one_stub): Likewise.
1358 (final_link_relocate, elf32_hppa_relocate_section): Likewise.
1359 * elf32-i386.c (elf_i386_tls_transition): Likewise.
1360 (elf_i386_relocate_section): Likewise.
1361 * elf32-ip2k.c (ip2k_final_link_relocate): Likewise.
1362 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
1363 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
1364 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1365 * elf32-metag.c (elf_metag_relocate_section): Likewise.
1366 * elf32-nds32.c (unrecognized_reloc_msg): Likewise.
1367 (nds32_elf_relax_longcall1, nds32_elf_relax_longcall2): Likewise.
1368 (nds32_elf_relax_longcall3, nds32_elf_relax_longjump1): Likewise.
1369 (nds32_elf_relax_longjump2, nds32_elf_relax_longjump3): Likewise.
1370 (nds32_elf_relax_longcall4, nds32_elf_relax_longcall5): Likewise.
1371 (nds32_elf_relax_longcall6, nds32_elf_relax_longjump4): Likewise.
1372 (nds32_elf_relax_longjump5, nds32_elf_relax_longjump6): Likewise.
1373 (nds32_elf_relax_longjump7, nds32_elf_relax_loadstore): Likewise.
1374 (nds32_elf_relax_ptr, nds32_elf_ex9_build_hash_table): Likewise.
1375 * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
1376 * elf32-rx.c (UNSAFE_FOR_PID): Likewise.
1377 * elf32-s390.c (invalid_tls_insn, elf_s390_relocate_section): Likewise.
1378 * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
1379 * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
1380 * elf32-sh.c (sh_elf_relax_section): Likewise.
1381 (sh_elf_relax_delete_bytes, sh_elf_swap_insns): Likewise.
1382 (sh_elf_relocate_section): Likewise.
1383 * elf32-sh64.c (shmedia_prepare_reloc): Likewise.
1384 * elf32-spu.c (spu_elf_relocate_section): Likewise.
1385 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
1386 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
1387 * elf32-v850.c (v850_elf_relax_section): Likewise.
1388 * elf32-vax.c (elf_vax_check_relocs): Likewise.
1389 (elf_vax_relocate_section): Likewise.
1390 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
1391 (extend_ebb_bounds_forward, extend_ebb_bounds_backward): Likewise.
1392 (compute_text_actions, compute_ebb_proposed_actions): Likewise.
1393 (do_fix_for_relocatable_link): Likewise.
1394 * elf64-alpha.c (elf64_alpha_relax_got_load): Likewise.
1395 (elf64_alpha_relax_with_lituse): Likewise.
1396 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Likewise.
1397 (elf_hppa_final_link_relocate): Likewise.
1398 * elf64-ia64-vms.c (elf64_ia64_relax_section): Likewise.
1399 (elf64_ia64_choose_gp, elf64_ia64_relocate_section): Likewise.
1400 (elf64_vms_link_add_object_symbols): Likewise.
1401 * elf64-mmix.c (mmix_elf_perform_relocation): Likewise.
1402 (mmix_final_link_relocate): Likewise.
1403 * elf64-s390.c (invalid_tls_insn): Likewise.
1404 (elf_s390_relocate_section): Likewise.
1405 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
1406 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
1407 (elf_x86_64_relocate_section): Likewise.
1408 * elfcode.h (elf_slurp_symbol_table): Likewise.
1409 * elfcore.h (elf_core_file_p): Likewise.
1410 * elflink.c (elf_link_read_relocs_from_section): Likewise.
1411 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
1412 (elfNN_aarch64_relocate_section): Likewise.
1413 * elfnn-ia64.c (elfNN_ia64_relax_section): Likewise.
1414 (elfNN_ia64_choose_gp, elfNN_ia64_relocate_section): Likewise.
1415 * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
1416 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
1417 (_bfd_mips_elf_relocate_section): Likewise.
1418 (_bfd_mips_elf_finish_dynamic_symbol, mips_finish_exec_plt): Likewise.
1419 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
1420 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
1421 * ieee.c (ieee_slurp_external_symbols): Likewise.
1422 * ihex.c (ihex_write_object_content): Likewise.
1423 * mach-o.c (bfd_mach_o_build_exec_seg_command): Likewise.
1424 * merge.c (_bfd_merged_section_offset): Likewise.
1425 * mmo.c (mmo_write_loc_chunk): Likewise.
1426 (mmo_write_object_contents): Likewise.
1427 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Likewise.
1428 * stabs.c (_bfd_link_section_stabs): Likewise.
1429 * xcofflink.c (xcoff_link_add_symbols, xcoff_find_tc0): Likewise.
1431 2017-07-11 Alan Modra <amodra@gmail.com>
1433 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo.
1435 2017-07-11 Alan Modra <amodra@gmail.com>
1437 * elf32-ppc.c (ppc_elf_relocate_section): Emit "unexpected
1438 instruction" error using _bfd_error_handler, not einfo.
1440 2017-07-10 Nick Clifton <nickc@redhat.com>
1442 * coffcode.h (coff_slurp_symbol_table): Do not include an entry
1443 for C_AIX_WEAKEXT if it has the same value as C_WEAKEXT.
1445 2017-07-07 John Baldwin <jhb@FreeBSD.org>
1447 * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PTLWPINFO.
1449 2017-07-07 Alan Modra <amodra@gmail.com>
1451 * coffcode.h (coff_slurp_symbol_table): Handle C_AIX_WEAKEXT.
1453 2017-07-07 Alan Modra <amodra@gmail.com>
1455 * bfd.c (_doprnt): Replace "L" with "ll" when printing bfd_vma
1456 as long long. Move code replacing "ll" with "I64", and simplify.
1458 2017-07-06 H.J. Lu <hongjiu.lu@intel.com>
1460 * bfd.c (_doprnt): Convert 'L' to 'l' when setting wide_width
1463 2017-07-05 H.J. Lu <hongjiu.lu@intel.com>
1465 * dwarf2.c (line_info_add_include_dir_stub): Replace time with
1467 (line_info_add_file_name): Likewise.
1468 (decode_line_info): Likewise.
1470 2017-07-04 Tristan Gingold <gingold@adacore.com>
1472 * version.m4: Bump version to 2.29.51
1473 * configure: Regenerate.
1475 2017-07-04 Jiong Wang <jiong.wang@arm.com>
1477 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Remove the
1478 sanity check at the head of this function.
1480 2017-07-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1482 * dwarf2.c (struct dwarf2_debug): Add fields dwarf_line_str_buffer and
1483 dwarf_line_str_size.
1484 (struct attr_abbrev): Add field implicit_const.
1485 (dwarf_debug_sections): Add .debug_line_str.
1486 (enum dwarf_debug_section_enum): Add debug_line_str and debug_max.
1487 (dwarf_debug_section_assert): Add static assertion.
1488 (read_indirect_line_string): New.
1489 (read_abbrevs): Support DW_FORM_implicit_const.
1490 (is_str_attr): Support DW_FORM_line_strp.
1491 (read_attribute_value): Support DW_FORM_line_strp and
1492 DW_FORM_implicit_const.
1493 (read_attribute): Support DW_FORM_implicit_const.
1494 (line_info_add_include_dir, line_info_add_include_dir_stub):
1495 (line_info_add_file_name, read_formatted_entries): New.
1496 (decode_line_info, parse_comp_unit): Support DWARF 5.
1497 (_bfd_dwarf2_cleanup_debug_info): Free dwarf_line_str_buffer.
1499 2017-07-03 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
1501 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove the
1502 abort statement that was put for symbols that are not dynamic.
1504 2017-07-03 Tristan Gingold <gingold@adacore.com>
1506 * po/bfd.pot: Regenerate
1508 2017-07-03 Alan Modra <amodra@gmail.com>
1510 * bfd.c (_doprnt): Rewrite "ll" and "L" modifiers to "I64" for
1511 __MSVCRT__. Support "L" modifier for bfd_vma. Formatting.
1512 * elf.c (setup_group): Use "Lx" to print sh_size.
1513 (_bfd_elf_setup_sections): Remove unnecessary cast and print
1514 unknown section type in hex.
1515 (copy_special_section_fields): Style fix.
1516 (bfd_section_from_shdr): Correct format for sh_link. Use a
1517 common error message for all the variants of unrecognized
1519 (assign_file_positions_for_load_sections): Use "Lx" for lma
1520 adjust error message.
1521 (assign_file_positions_for_non_load_sections): Formatting.
1522 (rewrite_elf_program_header): Formatting. Use "Lx" for
1523 bfd_vma values in error messages.
1524 * elfcode.h (elf_slurp_reloc_table_from_section): Cast
1525 ELF_R_SYM value to type expected by format.
1526 * elflink.c (elf_link_read_relocs_from_section): Use "Lx"
1528 (elf_link_add_object_symbols): Use "Lu" for symbol sizes.
1529 (elf_link_input_bfd): Use "Lx" for r_info.
1530 (bfd_elf_gc_record_vtinherit): Use "Lx" for offset.
1532 2017-07-03 Alan Modra <amodra@gmail.com>
1534 * bfd.c (bfd_scan_vma): Don't use long long unless HAVE_LONG_LONG.
1535 * coff-rs6000.c (FMT20): Handle hosts with 64-bit long and
1536 Microsoft C library variant of long long format specifier.
1537 (PRINT20): Cast value to bfd_uint64_t not long long.
1538 * coffcode.h (coff_print_aux): Use BFD_VMA_FMT.
1539 * coff-x86_64.c (coff_amd64_reloc): Use bfd_uint64_t rather than
1540 long long. Don't cast to bfd_vma.
1541 * elf32-score.c (score3_bfd_getl48): Likewise.
1542 * vms-alpha.c (_bfd_vms_slurp_eisd): Likewise.
1544 2017-07-03 Alan Modra <amodra@gmail.com>
1546 * elf.c (_bfd_elf_print_private_bfd_data): Use BFD_VMA_FMT to
1548 (bfd_elf_print_symbol): Don't cast symbol->flags.
1549 (_bfd_elf_symbol_from_bfd_symbol): Likewise.
1550 * elf32-ppc.c (ppc_elf_begin_write_processing): Correct
1551 _bfd_error_handler argument order.
1552 (ppc_elf_merge_private_bfd_data): Don't cast flags.
1554 2017-07-03 Alan Modra <amodra@gmail.com>
1556 * configure.ac: Invoke AC_CHECK_TYPES for long long. Invoke
1557 AC_TYPE_LONG_DOUBLE.
1558 * configure: Regenerate.
1559 * config.in: Regenerate.
1561 2017-06-29 Andrew Waterman <andrew@sifive.com>
1563 * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Fix TLS copy
1566 2017-06-29 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
1568 * elfxx-sparc.c (allocate_dynrelocs): Don't make a symbol dynamic
1569 unless it is undefined weak.
1570 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Set the flag
1571 relative_reloc to direct non-dynamic symbols to R_SPARC_RELATIVE
1573 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): If symbol
1574 is not dynamic in PIC, abort.
1576 2017-06-29 Jiong Wang <jiong.wang@arm.com>
1579 * elfnn-aarch64.c (elfNN_aarch64_allocate_dynrelocs): Only make
1580 undefined weak symbols into dynamic.
1581 (elfNN_aarch64_final_link_relocate): Generate runtime RELATIVE
1582 relocation for non-dynamic symbols.
1583 (elfNN_aarch64_finish_dynamic_symbol): Add sanity check.
1585 2017-06-29 Jiong Wang <jiong.wang@arm.com>
1587 * elfnn-aarch64.c (aarch64_relocation_aginst_gp_p): New function.
1588 (elfNN_aarch64_final_link_relocate): Delete duplicated code for
1589 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15, BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
1590 BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
1591 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Optimize the
1594 2017-06-29 Andreas Arnez <arnez@linux.vnet.ibm.com>
1596 * elf-bfd.h (elfcore_write_s390_gs_cb): Add prototype.
1597 (elfcore_write_s390_gs_bc): Likewise.
1598 * elf.c (elfcore_grok_s390_gs_cb): New function.
1599 (elfcore_grok_s390_gs_bc): New function.
1600 (elfcore_grok_note): Call them.
1601 (elfcore_write_s390_gs_cb): New function.
1602 (elfcore_write_s390_gs_bc): New function.
1603 (elfcore_write_register_note): Call them.
1605 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
1607 * libbfd.c (_bfd_generic_get_section_contents): Don't call
1608 bfd_get_file_size. Check archive element size.
1609 (_bfd_generic_get_section_contents_in_window): Likewise.
1611 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
1613 * bfd-in2.h: Regenerated.
1614 * bfdio.c (bfd_get_size): Change return type to ufile_ptr.
1615 (bfd_get_file_size): Likewise.
1617 2017-06-28 Maciej W. Rozycki <macro@imgtec.com>
1618 Matthew Fortune <matthew.fortune@imgtec.com>
1620 * archures.c (bfd_mach_mips_interaptiv_mr2): New macro.
1621 * cpu-mips.c (I_interaptiv_mr2): New enum value.
1622 (arch_info_struct): Add "mips:interaptiv-mr2" entry.
1623 * elfxx-mips.c (_bfd_elf_mips_mach) <E_MIPS_MACH_IAMR2>: New
1625 (mips_set_isa_flags) <bfd_mach_mips_interaptiv_mr2>: Likewise.
1626 (bfd_mips_isa_ext) <bfd_mach_mips_interaptiv_mr2>: Likewise.
1627 (print_mips_isa_ext) <AFL_EXT_INTERAPTIV_MR2>: Likewise.
1628 (mips_mach_extensions): Add `bfd_mach_mipsisa32r3' and
1629 `bfd_mach_mips_interaptiv_mr2' entries.
1630 * bfd-in2.h: Regenerate.
1632 2017-06-27 Nick Clifton <nickc@redhat.com>
1634 * tekhex.c (pass_over): Revert accidental conversion of a local
1635 array to a static array.
1637 2017-06-27 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
1640 * elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Adjust
1641 reloc addend if necessary. Adjust diff only if
1642 shrinked_insn_address < end_address.
1644 2017-06-27 Alan Modra <amodra@gmail.com>
1647 * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
1648 (_bfd_generic_get_section_contents_in_window): Likewise.
1650 2017-06-26 Kuan-Lin Chen <rufus@andestech.com>
1652 * elfnn-riscv.c (perform_relocation): Support the new
1653 R_RISCV_32_PCREL relocation.
1654 (riscv_elf_relocate_section): Likewise.
1655 * elfxx-riscv.c (howto_table): Likewise.
1656 (riscv_reloc_map): Likewise.
1657 * bfd-in2.h (BFD_RELOC_RISCV_32_PCREL): New relocation.
1658 * libbfd.h: Regenerate.
1660 2017-06-27 Alan Modra <amodra@gmail.com>
1663 * libbfd.c (_bfd_generic_get_section_contents): Delete abort.
1664 Use unsigned file pointer type, and remove cast.
1665 * libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise.
1666 Add "count", not "sz".
1668 2017-06-26 Pedro Alves <palves@redhat.com>
1671 * libbfd.c (_bfd_generic_get_section_contents): Add "count", not
1674 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
1677 * libbfd.c (_bfd_generic_get_section_contents_in_window): Add
1680 2017-06-26 Maciej W. Rozycki <macro@imgtec.com>
1682 * cpu-mips.c (arch_info_struct): Mark the 4010 32-bit.
1683 * elfxx-mips.c (mips_set_isa_flags) <bfd_mach_mips4010>: Set
1684 E_MIPS_ARCH_2 rather than E_MIPS_ARCH_3 in `e_flags'.
1685 (mips_mach_extensions): Mark `bfd_mach_mips4010' as extending
1686 `bfd_mach_mips6000' rather than `bfd_mach_mips4000'.
1688 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
1691 * compress.c (bfd_get_full_section_contents): Don't check the
1693 * libbfd.c (_bfd_generic_get_section_contents): Check for and
1694 reject a section whose size + offset is greater than the size
1696 (_bfd_generic_get_section_contents_in_window): Likewise.
1698 2017-06-26 Nick Clifton <nickc@redhat.com>
1701 * tekhex.c (getvalue): Check for the source pointer exceeding the
1702 end pointer before the first byte is read.
1704 2017-06-26 Nick Clifton <nickc@redhat.com>
1707 * opncls.c (get_build_id): Check that the section is big enough
1708 to contain the whole note.
1709 * compress.c (bfd_get_full_section_contents): Check for and reject
1710 a section whose size is greater than the size of the entire file.
1711 * elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not
1712 contain a notes section.
1714 2017-06-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1716 * elf64-s390.c (elf_s390_additional_program_headers): Add NULL
1718 (elf_s390_modify_segment_map): Likewise.
1719 (bfd_elf_s390_set_options): Lisewise.
1721 2017-06-26 Alan Modra <amodra@gmail.com>
1723 * elflink.c (_bfd_elf_link_create_dynstrtab): Don't make dynobj
1725 (_bfd_elf_size_group_sections): Skip --just-syms bfds.
1726 (bfd_elf_size_dynamic_sections): Ignore .note.GNU-stack and
1727 .preinit_array on --just-syms bfds.
1728 (_bfd_elf_gc_mark_extra_sections): Skip --just-syms bfds.
1729 (elf_gc_sweep, bfd_elf_parse_eh_frame_entries): Likewise.
1730 (bfd_elf_gc_sections, bfd_elf_discard_info): Likewise.
1732 2017-06-25 Sergei Trofimovich <slyfox@gentoo.org>
1734 * elf.c (find_link): Bounds check "hint".
1736 2017-06-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
1738 * elf32-arm.c (using_thumb_only): Update list of architectures in
1739 BFD_ASSERT for which the logic is valid.
1740 (using_thumb2_bl): Likewise.
1741 (using_thumb2): Likewise and return true for ARMv8-R.
1742 (arch_has_arm_nop): Likewise.
1743 (tag_cpu_arch_combine): New v8r table for ARMv8-R Tag_CPU_arch
1744 merging logic. Update commentis for value 15 of v8m_baseline,
1745 v8m_mainline and v4t_plus_v6_m arrays. Use v8r array to decide
1746 merging of value 15 of Tag_CPU_arch.
1748 2017-06-23 Jiong Wang <jiong.wang@arm.com>
1750 * reloc.c (BFD_RELOC_AARCH64_ADR_GOTPAGE): Rename to
1751 BFD_RELOC_AARCH64_ADR_GOT_PAGE
1752 * bfd-in2.h: Regenerate.
1754 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1756 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Move
1757 the error_alignment label forward. Properly align program
1758 property note section.
1760 2017-06-22 Eric Christopher <echristo@gmail.com>
1762 * elf32-arm.c (elf32_arm_final_link_relocate): Use labs rather than
1763 abs to fix a truncation warning.
1765 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1767 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Resolve
1768 local undefined weak symbol to 0.
1769 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Likewise.
1771 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1773 * elf32-i386.c (elf_i386_merge_gnu_properties): If info->shstk
1774 is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
1775 (elf_i386_link_setup_gnu_properties): If info->shstk is set,
1776 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
1777 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): If
1778 info->shstk is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
1779 (elf_x86_64_link_setup_gnu_properties): If info->shstk is set,
1780 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
1782 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1784 * elf32-i386.c (elf_i386_lazy_ibt_plt0_entry): New.
1785 (elf_i386_lazy_ibt_plt_entry): Likewise.
1786 (elf_i386_pic_lazy_ibt_plt0_entry): Likewise.
1787 (elf_i386_non_lazy_ibt_plt_entry): Likewise.
1788 (elf_i386_pic_non_lazy_ibt_plt_entry): Likewise.
1789 (elf_i386_eh_frame_lazy_ibt_plt): Likewise.
1790 (elf_i386_lazy_plt_layout): Likewise.
1791 (elf_i386_non_lazy_plt_layout): Likewise.
1792 (elf_i386_link_hash_entry): Add plt_second.
1793 (elf_i386_link_hash_table): Add plt_second and
1794 plt_second_eh_frame.
1795 (elf_i386_allocate_dynrelocs): Use the second PLT if needed.
1796 (elf_i386_size_dynamic_sections): Use .plt.got unwind info for
1797 the second PLT. Check the second PLT.
1798 (elf_i386_relocate_section): Use the second PLT to resolve
1799 PLT reference if needed.
1800 (elf_i386_finish_dynamic_symbol): Fill and use the second PLT if
1802 (elf_i386_finish_dynamic_sections): Set sh_entsize on the
1803 second PLT. Generate unwind info for the second PLT.
1804 (elf_i386_plt_type): Add plt_second.
1805 (elf_i386_get_synthetic_symtab): Support the second PLT.
1806 (elf_i386_parse_gnu_properties): Support
1807 GNU_PROPERTY_X86_FEATURE_1_AND.
1808 (elf_i386_merge_gnu_properties): Support
1809 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
1810 on GNU_PROPERTY_X86_FEATURE_1_IBT
1811 (elf_i386_link_setup_gnu_properties): If info->ibt is set,
1812 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
1813 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
1814 is set on all relocatable inputs.
1815 * elf64-x86-64.c (elf_x86_64_lazy_ibt_plt_entry): New.
1816 (elf_x32_lazy_ibt_plt_entry): Likewise.
1817 (elf_x86_64_non_lazy_ibt_plt_entry): Likewise.
1818 (elf_x32_non_lazy_ibt_plt_entry): Likewise.
1819 (elf_x86_64_eh_frame_lazy_ibt_plt): Likewise.
1820 (elf_x32_eh_frame_lazy_ibt_plt): Likewise.
1821 (elf_x86_64_lazy_ibt_plt): Likewise.
1822 (elf_x32_lazy_ibt_plt): Likewise.
1823 (elf_x86_64_non_lazy_ibt_plt): Likewise.
1824 (elf_x32_non_lazy_ibt_plt): Likewise.
1825 (elf_x86_64_get_synthetic_symtab): Support the second PLT.
1826 (elf_x86_64_parse_gnu_properties): Support
1827 GNU_PROPERTY_X86_FEATURE_1_AND.
1828 (elf_x86_64_merge_gnu_properties): Support
1829 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
1830 on GNU_PROPERTY_X86_FEATURE_1_IBT
1831 (elf_x86_64_link_setup_gnu_properties): If info->ibt is set,
1832 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
1833 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
1834 is set on all relocatable inputs.
1836 2017-06-22 Nick Clifton <nickc@redhat.com>
1839 * som.c (setup_sections): NUL terminate the space_strings buffer.
1840 Check that the space.name field does not index beyond the end of
1841 the space_strings buffer.
1843 2017-06-21 Nick Clifton <nickc@redhat.com>
1846 * coff-sh.c (sh_reloc): Check for an out of range reloc.
1848 2017-06-21 Nick Clifton <nickc@redhat.com>
1851 * vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as
1852 type of the size parameter.
1853 (_bfd_vms_save_counted_string): Add second parameter - the maximum
1854 length of the counted string.
1855 * vms.h (_bfd_vms_save_sized_string): Update prototype.
1856 (_bfd_vms_save_counted_string): Likewise.
1857 * vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to
1858 _bfd_vms_save_counted_string.
1859 (_bfd_vms_slurp_ehdr): Likewise.
1860 (_bfd_vms_slurp_egsd): Likewise.
1861 (Parse_module): Likewise.
1863 2017-06-21 Alan Modra <amodra@gmail.com>
1865 * elf64-ppc.c (ppc64_elf_size_stubs): Test for localentry:0 plt
1866 calls before tocsave calls.
1867 (ppc64_elf_relocate_section): Allow localentry:0 plt calls without
1870 2017-06-21 Nick Clifton <nickc@redhat.com>
1873 * reloc.c (bfd_generic_get_relocated_section_contents): Fail if
1874 bfd_get_full_section_contents returns no contents.
1876 2017-06-21 Nick Clifton <nickc@redhat.com>
1879 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized
1882 2017-06-21 Nick Clifton <nickc@redhat.com>
1885 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section
1887 (image_set_ptr): Likewise.
1888 (alpha_vms_fix_sec_rel): Likewise.
1889 (alpha_vms_slurp_relocs): Likewise.
1891 2017-06-21 Nick Clifton <nickc@redhat.com>
1894 * ieee.c (ieee_slurp_sections): Check for a NULL return from
1896 (ieee_archive_p): Likewise.
1897 (ieee_object_p): Likewise.
1899 2017-06-21 Nick Clifton <nickc@redhat.com>
1902 * elf.c (setup_group): Zero the group section pointer list after
1903 allocation so that loops can be caught. Check for NULL pointers
1904 when processing a group list.
1906 2017-06-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1908 * elf-s390.h: New file.
1909 * elf64-s390.c (struct elf_s390_link_hash_table): Add params
1911 (elf_s390_additional_program_headers): New function.
1912 (elf_s390_modify_segment_map): New function.
1913 (bfd_elf_s390_set_options): New function.
1914 (elf_backend_additional_program_headers)
1915 (elf_backend_modify_segment_map): Add macro definitions.
1917 2017-06-19 H.J. Lu <hongjiu.lu@intel.com>
1920 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
1921 the DYNAMIC bit instead of bfd_count_sections.
1923 2017-06-19 Nick Clifton <nickc@redhat.com>
1926 * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record
1928 (evax_bfd_print_eeom): Likewise.
1929 (evax_bfd_print_egsd): Check for an overlarge record length.
1930 (evax_bfd_print_etir): Likewise.
1932 2017-06-19 Nick Clifton <nickc@redhat.com>
1935 * libieee.h (struct common_header_type): Add end_p field.
1936 * ieee.c (this_byte_and_next): Do not advance input_p beyond
1938 (read_id): Check for a length that exceeds the remaining bytes in
1940 (ieee_seek): Initialise end_p.
1941 (ieee_archive_p): Likewise.
1942 (ieee_object_p): Likewise.
1944 2017-06-19 Nick Clifton <nickc@redhat.com>
1947 * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset
1948 before reading the EIHS structure entries.
1950 2017-06-19 Nick Clifton <nickc@redhat.com>
1953 * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for
1954 gsd_size. Check that there are enough bytes remaining to read the
1955 type and size of the next egsd. Check that the size of the egsd
1956 does not exceed the size of the record.
1958 2017-06-19 Alan Modra <amodra@gmail.com>
1960 * config.bfd: Correct targ_underscore for cris.
1962 2017-06-18 Alan Modra <amodra@gmail.com>
1964 * config.bfd: Correct targ_underscore for epiphany, ip2k,
1965 m32c, mn10200, pru, rl78, rx, crisv32 and v850.
1967 2017-06-16 Nick Clifton <nickc@redhat.com>
1969 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
1970 bucketlist is empty because there are no symbols to add to the
1973 2017-06-16 Alan Modra <amodra@gmail.com>
1979 * targets.c (struct bfd_target): Add _bfd_define_start_stop.
1980 (BFD_JUMP_TABLE_LINK): Likewise.
1981 * elf-bfd.h (bfd_elf_define_start_stop): Declare.
1982 * elflink.c (_bfd_elf_gc_mark_rsec): Update comment.
1983 (bfd_elf_define_start_stop): New function.
1984 * linker.c (bfd_generic_define_start_stop): New function.
1985 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init
1987 * aout-adobe.c (aout_32_bfd_define_start_stop): Define.
1988 * aout-target.h (MY_bfd_define_start_stop): Define.
1989 * aout-tic30.c (MY_bfd_define_start_stop): Define.
1990 * binary.c (binary_bfd_define_start_stop): Define.
1991 * bout.c (b_out_bfd_define_start_stop): Define.
1992 * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define.
1993 * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define.
1994 * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define.
1995 * coffcode.h (coff_bfd_define_start_stop): Define.
1996 * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define.
1997 * i386msdos.c (msdos_bfd_define_start_stop): Define.
1998 * i386os9k.c (os9k_bfd_define_start_stop): Define.
1999 * ieee.c (ieee_bfd_define_start_stop): Define.
2000 * ihex.c (ihex_bfd_define_start_stop): Define.
2001 * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define.
2002 * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define.
2003 * mmo.c (mmo_bfd_define_start_stop): Define.
2004 * nlm-target.h (nlm_bfd_define_start_stop): Define.
2005 * oasys.c (oasys_bfd_define_start_stop): Define.
2006 * pef.c (bfd_pef_bfd_define_start_stop): Define.
2007 * plugin.c (bfd_plugin_bfd_define_start_stop): Define.
2008 * ppcboot.c (ppcboot_bfd_define_start_stop): Define.
2009 * som.c (som_bfd_define_start_stop): Define.
2010 * srec.c (srec_bfd_define_start_stop): Define.
2011 * tekhex.c (tekhex_bfd_define_start_stop): Define.
2012 * versados.c (versados_bfd_define_start_stop): Define.
2013 * vms-alpha.c (vms_bfd_define_start_stop): Define.
2014 (alpha_vms_bfd_define_start_stop): Define.
2015 * xsym.c (bfd_sym_bfd_define_start_stop): Define.
2016 * bfd-in2.h: Regenerate.
2017 * libbfd.h: Regenerate.
2019 2017-06-16 Jiong Wang <jiong.wang@arm.com>
2021 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
2022 SYMBOL_REFERENCES_LOCAL.
2024 2017-06-15 Jiong Wang <jiong.wang@arm.com>
2027 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
2028 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
2029 runtime for if there needs copy relocation elimination.
2030 (need_copy_relocation_p): New function. Return true for symbol with
2031 pc-relative references and if it's against read-only sections.
2032 (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
2033 (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
2034 that are related with accessing external objects.
2035 (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change
2036 in elfNN_aarch64_check_relocs.
2038 2017-06-15 Nick Clifton <nickc@redhat.com>
2041 * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
2044 (ieee_archive_p): Likewise.
2046 2017-06-15 Nick Clifton <nickc@redhat.com>
2049 * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
2051 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
2053 * elf32-xtensa.c (elf_xtensa_be_plt_entry,
2054 elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays,
2055 keep both windowed and call0 ABI PLT definitions.
2056 (elf_xtensa_create_plt_entry): Use selected ABI to choose upper
2057 elf_xtensa_*_plt_entry endex.
2058 (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size.
2060 2017-06-14 Nick Clifton <nickc@redhat.com>
2063 * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
2066 2017-06-14 Nick Clifton <nickc@redhat.com>
2069 * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
2070 maximum value for the ascic pointer. Check that name processing
2071 does not read beyond this value.
2072 (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
2075 2017-06-14 Nick Clifton <nickc@redhat.com>
2078 * versados.c (versados_mkobject): Zero the allocated tdata structure.
2079 (process_otr): Check for an invalid offset in the otr structure.
2081 2017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
2083 * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
2085 2017-06-13 H.J. Lu <hongjiu.lu@intel.com>
2091 * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
2092 vtable field to a union.
2093 (_bfd_elf_is_start_stop): Removed.
2094 * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
2095 __start_SECNAME and __stop_SECNAME symbols.
2096 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
2097 * elflink.c (_bfd_elf_is_start_stop): Removed.
2098 (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
2099 _bfd_elf_is_start_stop.
2100 (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
2101 __stop_SECNAME symbols. Updated.
2102 (elf_gc_smash_unused_vtentry_relocs): Likewise.
2103 (bfd_elf_gc_record_vtinherit): Likewise.
2104 (bfd_elf_gc_record_vtentry): Likewise.
2106 2017-06-13 Nick Clifton <nickc@redhat.com>
2109 * elflink.c (elf_link_adjust_relocs): Generate an error when
2110 encountering a reloc against a symbol removed by garbage
2113 2017-06-12 H.J. Lu <hongjiu.lu@intel.com>
2115 * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
2116 to merge_gnu_properties.
2117 * elf-properties.c (elf_merge_gnu_properties): Add struct
2118 bfd_link_info * and pass it to merge_gnu_properties.
2119 (elf_merge_gnu_property_list): Add struct bfd_link_info *
2120 and pass it to elf_merge_gnu_properties.
2121 (_bfd_elf_link_setup_gnu_properties): Pass info to
2122 elf_merge_gnu_property_list.
2123 * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
2125 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
2127 2017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
2130 * binary.c (binary_set_section_contents): Scale lma by octets
2131 per byte to set filepos.
2133 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2135 * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
2138 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2140 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
2143 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2145 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
2146 patched section contents for TLS IE reloc.
2147 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
2149 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2151 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
2152 RELOC_FOR_GLOBAL_SYMBOL macro.
2154 2018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2156 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
2159 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2161 * config/tc-arc.c (md_undefined_symbol): Changed.
2162 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
2164 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2166 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
2169 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2171 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
2172 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
2174 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2176 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
2179 2017-06-08 Richard Earnshaw <rearnsha@arm.com>
2181 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
2182 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
2183 is non-zero. Add clarifying comments.
2185 2017-06-08 H.J. Lu <hongjiu.lu@intel.com>
2187 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
2188 name. Use local IFUNC symbol name string to report unsupported
2189 non-PIC call to IFUNC function.
2190 (elf_i386_relocate_section): Dump local IFUNC name with minfo
2191 when generating R_386_IRELATIVE relocation.
2192 (elf_i386_finish_dynamic_symbol): Likewise.
2193 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
2195 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
2196 when generating R_X86_64_IRELATIVE relocation.
2197 (elf_x86_64_finish_dynamic_symbol): Likewise.
2199 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2201 * elf.c (setup_group): Make sure BFD sections are created for all
2202 group sections in the input file when processing SHF_GROUP
2204 (bfd_section_from_shdr): Avoid duplicating logic already
2205 implemented in `setup_group'.
2207 2017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
2210 * peXXigen.c (pe_print_idata): Use the address of the first thunk
2211 if the hint address is zero.
2213 2017-06-06 James Clarke <jrtc27@jrtc27.com>
2216 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
2217 ELF_COMMON_DEF_P for common symbols.
2219 2017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
2221 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
2222 SEC_GROUP sections as SEC_EXCLUDE.
2223 (bfd_elf_set_group_contents): Replace use of abort with an assert.
2224 (assign_section_numbers): Use resolve_section_groups flag instead
2225 of relocatable link type.
2226 (_bfd_elf_init_private_section_data): Use resolve_section_groups
2227 flag instead of checking the final_link flag for part of the
2228 checks in here. Fix white space as a result.
2229 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
2230 instead of relocatable link type.
2231 (bfd_elf_final_link): Likewise.
2233 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2235 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
2237 * elf32-score.c (score_elf_final_link_relocate): Likewise.
2238 (s3_bfd_score_elf_check_relocs): Likewise.
2239 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
2240 (score_elf_final_link_relocate): Likewise.
2241 (s7_bfd_score_elf_check_relocs): Likewise.
2243 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2245 * elflink.c (init_reloc_cookie_rels): Remove unused variable
2248 2017-06-06 Maciej W. Rozycki <macro@imgtec.com>
2250 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
2251 from `reloc_count' rather than decrementing it.
2252 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
2253 `reloc_count' by `int_rels_per_ext_rel'.
2254 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
2255 `reloc_count' by `int_rels_per_ext_rel' for last relocation
2256 entry determination.
2257 (s3_bfd_score_elf_check_relocs): Likewise.
2258 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
2259 (s7_bfd_score_elf_relocate_section): Likewise.
2260 (s7_bfd_score_elf_check_relocs): Likewise.
2261 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
2262 prototype and function.
2263 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
2264 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
2265 triple rather than once the sum of REL and RELA relocation entry
2267 (bfd_elf64_get_reloc_upper_bound): Remove macro.
2268 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
2269 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
2270 storage allocation size determination.
2271 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
2272 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
2273 by `int_rels_per_ext_rel' for last relocation entry
2275 (bfd_elf_final_link): Do not multiply `reloc_count' by
2276 `int_rels_per_ext_rel' for internal relocation storage
2277 allocation size determination.
2278 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
2279 `int_rels_per_ext_rel' for last relocation entry determination.
2280 (elf_gc_smash_unused_vtentry_relocs): Likewise.
2281 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
2282 (_bfd_mips_elf_relocate_section): Likewise.
2284 2017-06-05 Alan Modra <amodra@gmail.com>
2287 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
2289 2017-06-01 John Baldwin <jhb@FreeBSD.org>
2291 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
2292 determine structure sizes.
2293 (elfcore_grok_freebsd_prstatus): Likewise.
2295 2017-06-01 Alan Modra <amodra@gmail.com>
2297 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
2298 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
2300 (is_elfv2_localentry0): New function.
2301 (ppc64_elf_tls_setup): Default params->plt_localentry0.
2302 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
2303 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
2304 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
2305 optimized localentry:0 stubs.
2306 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
2307 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
2309 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
2311 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
2313 2017-05-30 Casey Smith <clegg89@gmail.com>
2316 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
2317 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
2319 2017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
2321 * cpu-arc.c (arc_compatible): New function.
2323 2017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
2325 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
2327 2017-05-30 H.J. Lu <hongjiu.lu@intel.com>
2330 * bfdio.c (bfd_get_file_size): New function.
2331 * bfd-in2.h: Regenerated.
2333 2017-05-23 Dilian Palauzov <git-dpa@aegee.org>
2335 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
2338 2017-05-22 H.J. Lu <hongjiu.lu@intel.com>
2340 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
2341 dynobj instead of htab->elf.dynobj.
2343 2017-05-19 Maciej W. Rozycki <macro@imgtec.com>
2345 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
2347 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
2348 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
2349 actual number of internal relocations retrieved. Adjust
2350 function description.
2351 (bfd_elf64_canonicalize_reloc): Remove macro.
2352 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
2354 2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
2356 * archures.c (bfd_mach_sparc_v9m8): Define.
2357 (bfd_mach_sparc_v8plusm8): Likewise.
2358 (bfd_mach_sparc_v9_p): Adjust to M8.
2359 (bfd_mach_sparc_64bit_p): Likewise.
2360 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
2361 bfd_mach_sparc_v8plusm8.
2362 * bfd-in2.h: Regenerated.
2363 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
2365 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
2366 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
2367 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
2369 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
2370 bfd_mach_sparc_v8plusm8.
2372 2017-05-19 Alan Modra <amodra@gmail.com>
2374 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
2375 debug and special sections when no non-note alloc sections in an
2378 2017-05-18 Alan Modra <amodra@gmail.com>
2380 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
2381 * elf-m10300.c: Likewise.
2383 * elf32-arc.c: Likewise.
2384 * elf32-bfin.c: Likewise.
2385 * elf32-m68k.c: Likewise.
2386 * elf32-nds32.c: Likewise.
2387 * elf32-tilepro.c: Likewise.
2388 * elflink.c: Likewise.
2389 * elfnn-aarch64.c: Likewise.
2390 * elfnn-riscv.c: Likewise.
2391 * elfxx-tilegx.c: Likewise.
2392 * mach-o.c: Likewise.
2393 * peXXigen.c: Likewise.
2394 * vms-alpha.c: Likewise.
2395 * vms-lib.c: Likewise.
2397 2017-05-17 H.J. Lu <hongjiu.lu@intel.com>
2400 * elflink.c (elf_gc_mark_debug_section): New function.
2401 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
2402 referenced by kept debug sections.
2404 2017-05-16 Alan Modra <amodra@gmail.com>
2406 * elf-m10300.c: Rename occurrences of non_ir_ref.
2407 * elf32-arm.c: Likewise.
2408 * elf32-bfin.c: Likewise.
2409 * elf32-cr16.c: Likewise.
2410 * elf32-cris.c: Likewise.
2411 * elf32-d10v.c: Likewise.
2412 * elf32-dlx.c: Likewise.
2413 * elf32-fr30.c: Likewise.
2414 * elf32-frv.c: Likewise.
2415 * elf32-hppa.c: Likewise.
2416 * elf32-i370.c: Likewise.
2417 * elf32-i386.c: Likewise.
2418 * elf32-iq2000.c: Likewise.
2419 * elf32-lm32.c: Likewise.
2420 * elf32-m32c.c: Likewise.
2421 * elf32-m32r.c: Likewise.
2422 * elf32-m68hc1x.c: Likewise.
2423 * elf32-m68k.c: Likewise.
2424 * elf32-mcore.c: Likewise.
2425 * elf32-metag.c: Likewise.
2426 * elf32-microblaze.c: Likewise.
2427 * elf32-moxie.c: Likewise.
2428 * elf32-msp430.c: Likewise.
2429 * elf32-mt.c: Likewise.
2430 * elf32-nios2.c: Likewise.
2431 * elf32-or1k.c: Likewise.
2432 * elf32-ppc.c: Likewise.
2433 * elf32-rl78.c: Likewise.
2434 * elf32-s390.c: Likewise.
2435 * elf32-score.c: Likewise.
2436 * elf32-score7.c: Likewise.
2437 * elf32-sh.c: Likewise.
2438 * elf32-tic6x.c: Likewise.
2439 * elf32-tilepro.c: Likewise.
2440 * elf32-v850.c: Likewise.
2441 * elf32-vax.c: Likewise.
2442 * elf32-xstormy16.c: Likewise.
2443 * elf32-xtensa.c: Likewise.
2444 * elf64-alpha.c: Likewise.
2445 * elf64-hppa.c: Likewise.
2446 * elf64-ia64-vms.c: Likewise.
2447 * elf64-mmix.c: Likewise.
2448 * elf64-ppc.c: Likewise.
2449 * elf64-s390.c: Likewise.
2450 * elf64-sh64.c: Likewise.
2451 * elf64-x86-64.c: Likewise.
2452 * elflink.c: Likewise.
2453 * elfnn-aarch64.c: Likewise.
2454 * elfnn-ia64.c: Likewise.
2455 * elfnn-riscv.c: Likewise.
2456 * elfxx-mips.c: Likewise.
2457 * elfxx-sparc.c: Likewise.
2458 * elfxx-tilegx.c: Likewise.
2459 * linker.c: Likewise.
2461 2017-05-16 Alan Modra <amodra@gmail.com>
2463 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
2464 * elflink.c (elf_link_add_object_symbols): Update to use
2466 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
2468 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
2470 2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
2472 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
2474 2017-05-12 H.J. Lu <hongjiu.lu@intel.com>
2476 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
2477 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
2479 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
2481 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
2483 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
2485 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
2486 to plt_second/plt_second_eh_frame.
2487 (elf_x86_64_link_hash_newfunc): Updated.
2488 (elf_x86_64_allocate_dynrelocs): Likewise.
2489 (elf_x86_64_size_dynamic_sections): Likewise.
2490 (elf_x86_64_relocate_section): Likewise.
2491 (elf_x86_64_finish_dynamic_symbol): Likewise.
2492 (elf_x86_64_finish_dynamic_sections): Likewise.
2493 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
2494 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
2496 (elf_backend_setup_gnu_properties): Updated. Create the
2497 .plt.sec section instead of the .plt.sec section.
2499 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
2501 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
2502 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
2503 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
2505 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
2507 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
2508 (bfd_elf64_set_reloc): Define.
2509 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
2511 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
2513 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
2514 (struct bfd_target): New field _bfd_set_reloc.
2515 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
2516 * reloc.c (_bfd_generic_set_reloc): New function.
2517 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
2518 * nlm-target.h (nlm_set_reloc): Likewise.
2519 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
2520 * aout-tic30.c (MY_set_reloc): Likewise.
2521 * aout-target.h (MY_set_reloc): Likewise.
2522 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
2523 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
2524 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
2525 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
2526 * aout-adobe.c (aout_32_set_reloc): Likewise.
2527 * bout.c (b_out_set_reloc): Likewise.
2528 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
2529 * i386os9k.c (aout_32_set_reloc): Likewise.
2530 * ieee.c (ieee_set_reloc): Likewise.
2531 * oasys.c (oasys_set_reloc): Likewise.
2532 * som.c (som_set_reloc): Likewise.
2533 * versados.c (versados_set_reloc): Likewise.
2534 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
2535 _bfd_generic_set_reloc.
2536 (rs6000_xcoff64_aix_vec): LIkewise.
2537 * libbfd.c (_bfd_norelocs_set_reloc): New function.
2538 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
2539 * i386msdos.c (msdos_set_reloc): Define to
2540 _bfd_norelocs_set_reloc.
2541 * elfcode.h (elf_set_reloc): Define.
2542 * bfd-in2.h: Regenerated.
2544 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
2547 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
2548 for IFUNC function address.
2550 2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
2552 * elf32-arc.c (FEATURE_LIST_NAME): Define.
2553 (CONFLICT_LIST): Likewise.
2554 (opcode/arc-attrs.h): Include.
2555 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
2556 (arc_extract_features): New file.
2557 (arc_stralloc): Likewise.
2558 (arc_elf_merge_attributes): Likewise.
2559 (arc_elf_merge_private_bfd_data): Use object attributes.
2560 (bfd_arc_get_mach_from_attributes): New function.
2561 (arc_elf_object_p): Use object attributes.
2562 (arc_elf_final_write_processing): Likewise.
2563 (elf32_arc_obj_attrs_arg_type): New function.
2564 (elf32_arc_obj_attrs_handle_unknown): Likewise.
2565 (elf32_arc_section_from_shdr): Likewise.
2566 (elf_backend_obj_attrs_vendor): Define.
2567 (elf_backend_obj_attrs_section): Likewise.
2568 (elf_backend_obj_attrs_arg_type): Likewise.
2569 (elf_backend_obj_attrs_section_type): Likewise.
2570 (elf_backend_obj_attrs_handle_unknown): Likewise.
2571 (elf_backend_section_from_shdr): Likewise.
2573 2017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
2576 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
2577 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
2578 and the destination is a Thumb symbol.
2580 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2582 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
2583 initializer to silence GCC 4.2.
2584 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
2586 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2588 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
2589 (LAZY_PLT_ENTRY_SIZE): This.
2590 (NON_LAZY_PLT_ENTRY_SIZE): New.
2591 (elf_x86_64_plt0_entry): Renamed to ...
2592 (elf_x86_64_lazy_plt0_entry): This.
2593 (elf_x86_64_plt_entry): Renamed to ...
2594 (elf_x86_64_lazy_plt_entry): This.
2595 (elf_x86_64_bnd_plt0_entry): Renamed to ...
2596 (elf_x86_64_lazy_bnd_plt0_entry): This.
2597 (elf_x86_64_legacy_plt_entry): Removed.
2598 (elf_x86_64_bnd_plt_entry): Renamed to ...
2599 (elf_x86_64_lazy_bnd_plt_entry): This.
2600 (elf_x86_64_legacy_plt2_entry): Renamed to ...
2601 (elf_x86_64_non_lazy_plt_entry): This.
2602 (elf_x86_64_bnd_plt2_entry): Renamed to ...
2603 (elf_x86_64_non_lazy_bnd_plt_entry): This.
2604 (elf_x86_64_eh_frame_plt): Renamed to ...
2605 (elf_x86_64_eh_frame_lazy_plt): This.
2606 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
2607 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
2608 (elf_x86_64_eh_frame_plt_got): Renamed to ...
2609 (elf_x86_64_eh_frame_non_lazy_plt): This.
2610 (elf_x86_64_lazy_plt_layout): New.
2611 (elf_x86_64_non_lazy_plt_layout): Likewise.
2612 (elf_x86_64_plt_layout): Likewise.
2613 (elf_x86_64_backend_data): Remove PLT layout information. Add
2614 os for target system.
2615 (GET_PLT_ENTRY_SIZE): Removed.
2616 (elf_x86_64_lazy_plt): New.
2617 (elf_x86_64_non_lazy_plt): Likewise.
2618 (elf_x86_64_lazy_bnd_plt): Likewise.
2619 (elf_x86_64_non_lazy_bnd_plt): Likewise.
2620 (elf_x86-64_arch_bed): Updated.
2621 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
2622 (elf_x86_64_create_dynamic_sections): Removed.
2623 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
2624 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
2625 (elf_x86-64_adjust_dynamic_symbol): Updated.
2626 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
2627 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
2628 size for PLT0 if there is no PLT0. Get plt_entry_size from
2629 non_lazy_plt for non-lazy PLT entries.
2630 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
2631 from non_lazy_plt for non-lazy PLT entries.
2632 (elf_x86-64_relocate_section): Updated. Properly get PLT index
2633 if there is no PLT0.
2634 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
2635 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
2636 entries with non-lazy PLT layout. Don't fill the second and third
2637 slots in the PLT entry if there is no PLT0.
2638 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
2639 if there is no PLT0. Set sh_entsize on the .plt.got section.
2640 (compare_relocs): New.
2641 (elf_x86_64_plt_type): Likewise.
2642 (elf_x86_64_plt): Likewise.
2643 (elf_x86_64_nacl_plt): New. Forward declaration.
2644 (elf_x86_64_get_plt_sym_val): Removed.
2645 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
2646 against all dynamic relocations.
2647 (elf_x86_64_link_setup_gnu_properties): New function.
2648 (elf_backend_create_dynamic_sections): Updated.
2649 (elf_backend_setup_gnu_properties): New.
2650 (elf_x86_64_nacl_plt): New.
2651 (elf_x86_64_nacl_arch_bed): Updated.
2653 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2655 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
2656 (LAZY_PLT_ENTRY_SIZE): This.
2657 (NON_LAZY_PLT_ENTRY_SIZE): New.
2658 (elf_i386_plt0_entry): Renamed to ...
2659 (elf_i386_lazy_plt0_entry): This.
2660 (elf_i386_plt_entry): Renamed to ...
2661 (elf_i386_lazy_plt_entry): This.
2662 (elf_i386_pic_plt0_entry): Renamed to ...
2663 (elf_i386_pic_lazy_plt0_entry): This.
2664 (elf_i386_pic_plt_entry): Renamed to ...
2665 (elf_i386_pic_lazy_plt_entry): This.
2666 (elf_i386_got_plt_entry): Renamed to ...
2667 (elf_i386_non_lazy_plt_entry): This.
2668 (elf_i386_pic_got_plt_entry): Renamed to ...
2669 (elf_i386_pic_non_lazy_plt_entry): This.
2670 (elf_i386_eh_frame_plt): Renamed to ...
2671 (elf_i386_eh_frame_lazy_plt): This.
2672 (elf_i386_eh_frame_plt_got): Renamed to ...
2673 (elf_i386_eh_frame_non_lazy_plt): This.
2674 (elf_i386_plt_layout): Renamed to ...
2675 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
2676 eh_frame_plt_got_size.
2677 (elf_i386_non_lazy_plt_layout): New.
2678 (elf_i386_plt_layout): Likewise.
2679 (elf_i386_non_lazy_plt): Likewise.
2680 (GET_PLT_ENTRY_SIZE): Removed.
2681 (elf_i386_plt): Renamed to ...
2682 (elf_i386_lazy_plt): This.
2683 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
2684 (elf_i386_arch_bed): Updated.
2685 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
2686 (elf_i386_create_dynamic_sections): Removed.
2687 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
2688 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
2689 (elf_i386_adjust_dynamic_symbol): Updated.
2690 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
2691 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
2692 size for PLT0 if there is no PLT0.
2693 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
2694 output section is discarded only if GOT isn't empty.
2695 (elf_i386_relocate_section): Updated. Properly get PLT index
2696 if there is no PLT0.
2697 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
2698 second and third slots in the PLT entry if there is no PLT0.
2699 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
2700 if there is no PLT0. Set sh_entsize on the .plt.got section.
2701 (elf_i386_nacl_plt): Forward declaration.
2702 (elf_i386_get_plt_sym_val): Removed.
2703 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
2704 against all dynamic relocations.
2705 (elf_i386_link_setup_gnu_properties): New function.
2706 (elf_backend_create_dynamic_sections): Updated.
2707 (elf_backend_setup_gnu_properties): New.
2708 (elf_i386_nacl_plt): Updated.
2709 (elf_i386_nacl_arch_bed): Likewise.
2710 (elf_i386_vxworks_arch_bed): Likewise.
2712 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
2714 * elflink.c (elf_output_implib): Remove executable flag from import
2716 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
2717 library is a relocatable object file.
2719 2017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
2722 * elf32-avr.c (avr_should_move_sym): New function.
2723 (avr_should_reduce_sym_size): Likewise.
2724 (avr_should_increase_sym_size): Likewise.
2725 (elf32_avr_relax_delete_bytes): Adjust symbol values
2726 and sizes by calling new functions.
2728 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
2730 * config.bfd (riscv32-*): Enable rv64.
2732 2017-05-02 Alan Modra <amodra@gmail.com>
2735 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
2736 rather than h->root.type == bfd_link_hash_new.
2737 (bfd_elf_record_link_assignment): Similarly, call
2738 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
2740 2017-04-29 Alan Modra <amodra@gmail.com>
2743 * reloc.c (reloc_offset_in_range): New function.
2744 (bfd_perform_relocation, bfd_install_relocation): Use it.
2745 (_bfd_final_link_relocate): Likewise.
2747 2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
2749 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
2750 before using .plt.got.
2751 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
2753 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2755 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
2756 instead of "+=" to update 0.
2758 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2760 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
2761 .plt.got section here.
2762 (elf_i386_check_relocs): Don't create the .plt.got section.
2763 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
2764 the .plt.got and .plt.bnd sections here.
2765 (elf_x86_64_check_relocs): Don't create the .plt.got nor
2768 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2770 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
2772 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
2773 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
2774 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
2775 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
2778 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2780 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
2782 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
2783 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
2784 the first relocatable ELF input with GNU properties.
2786 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2788 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
2789 VxWorks for non-PIC.
2791 2017-04-27 Alan Modra <amodra@gmail.com>
2793 * elf-bfd.h (struct elf_backend_data): Make asection param of
2794 elf_backend_eh_frame_address_size const.
2795 (_bfd_elf_eh_frame_address_size): Likewise.
2796 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
2797 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
2798 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
2799 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
2800 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
2801 (next_cie_fde_offset): Constify params.
2802 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
2804 2017-04-27 Alan Modra <amodra@gmail.com>
2806 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
2807 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
2808 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
2810 (offset_adjust): New function.
2811 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
2812 (adjust_eh_frame_local_symbols): Likewise.
2813 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
2814 after changing anything. Return true if anything changed.
2815 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
2816 _bfd_elf_adjust_eh_frame_global_symbol for globals.
2818 2017-04-27 Alan Modra <amodra@gmail.com>
2820 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
2823 2017-04-27 Alan Modra <amodra@gmail.com>
2825 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
2826 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
2827 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
2828 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
2829 for undef and undefweak dyn_relocs.
2830 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
2831 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
2832 (allocate_got, allocate_dynrelocs): Likewise.
2833 (ppc64_elf_relocate_section): Likewise.
2835 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
2837 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
2838 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
2839 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
2840 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
2842 2017-04-26 Nick Clifton <nickc@redhat.com>
2845 * reloc.c (bfd_perform_relocation): Check for a negative address
2848 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
2851 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
2853 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
2854 (elf_backend_always_renumber_dynsyms): Define.
2855 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
2856 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
2857 * elflink.c (bfd_elf_size_dynamic_sections): Also call
2858 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
2860 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
2862 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
2864 * elflink.c (bfd_elf_size_dynamic_sections): Only call
2865 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
2866 sections have been created.
2868 2017-04-26 Nick Clifton <nickc@redhat.com>
2871 * compress.c (bfd_init_section_compress_status): Check the return
2872 value from bfd_malloc.
2874 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
2876 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
2877 no_finish_dynamic_symbol.
2878 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
2880 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
2881 weak symbol, don't make it dynamic.
2882 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
2883 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
2884 relocation for GOT reference.
2885 (elf_x86_64_finish_dynamic_symbol): Abort if
2886 no_finish_dynamic_symbol isn't 0.
2888 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
2891 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
2892 undefined weak symbol, don't make it dynamic.
2893 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
2894 set no_finish_dynamic_symbol and generate R_386_RELATIVE
2895 relocation for R_386_GOT32.
2897 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
2900 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
2902 2017-04-23 Alan Modra <amodra@gmail.com>
2905 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
2906 * elf.c (lcomm_sym): New.
2907 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
2908 * bfd-in2.h: Regenerate.
2910 2017-04-23 Alan Modra <amodra@gmail.com>
2913 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
2914 parameters and comment.
2915 (_bfd_elf_get_reloc_section): Delete.
2916 (_bfd_elf_plt_get_reloc_section): Declare.
2917 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
2918 New functions. Don't blindly skip over assumed .rel/.rela prefix.
2920 (_bfd_elf_get_reloc_section): ..here. Delete.
2921 (assign_section_numbers): Call elf_get_reloc_section.
2922 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
2923 * elfxx-target.h (elf_backend_get_reloc_section): Update.
2925 2017-04-23 Alan Modra <amodra@gmail.com>
2928 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
2931 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
2934 * elf32-i386.c (elf_i386_link_hash_entry): Add
2935 no_finish_dynamic_symbol.
2936 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
2937 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
2938 symbol, don't make it dynamic in PIE.
2939 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
2940 set no_finish_dynamic_symbol and generate R_386_RELATIVE
2941 relocation for R_386_GOT32
2942 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
2945 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
2949 * elflink.c (elf_link_add_object_symbols): Require
2950 --no-dynamic-linker with -E/--dynamic-list when creating
2953 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
2955 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
2958 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
2960 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
2961 dynamic symbol sorting.
2963 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
2966 * elflink.c (elf_link_add_object_symbols): Preserve
2967 dynamic_ref_after_ir_def when restoring the symbol table for
2968 unneeded dynamic object.
2970 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
2973 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
2974 on on undefined IFUNC symbol in the second PLT.
2976 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
2978 * peXXigen.c (pe_print_reloc): Correct chunk_end.
2980 2017-04-19 Alan Modra <amodra@gmail.com>
2982 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
2983 or make dynamic for info->dynamic_undefined_weak 0 and 1.
2984 * elf32-ppc.c:Formatting.
2985 (ensure_undefweak_dynamic): Don't make dynamic when
2986 info->dynamic_undefined_weak is zero.
2987 (allocate_dynrelocs): Discard undefweak dyn_relocs for
2988 info->dynamic_undefined_weak. Discard undef dyn_relocs when
2989 not default visibility. Discard undef and undefweak
2991 (ppc_elf_relocate_section): Adjust to suit.
2992 * elf64-ppc.c: Formatting.
2993 (ensure_undefweak_dynamic): Don't make dynamic when
2994 info->dynamic_undefined_weak is zero.
2995 (allocate_dynrelocs): Discard undefweak dyn_relocs for
2996 info->dynamic_undefined_weak. Discard them earlier.
2998 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
3001 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
3002 before generating the version definition section.
3004 2017-04-17 Alan Modra <amodra@gmail.com>
3006 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
3007 state when a regular object file defines a symbol with
3008 incompatible type to that defined by an earlier shared lib.
3010 2017-04-13 Alan Modra <amodra@gmail.com>
3012 * coffcode.h: Wrap some overly long _bfd_error_handler args.
3014 * elf32-arm.c: Likewise.
3015 * elf32-i386.c: Likewise.
3016 * elf32-mep.c: Likewise.
3017 * elf64-ia64-vms.c: Likewise.
3018 * elf64-x86-64.c: Likewise.
3019 * elflink.c: Likewise.
3020 * elfnn-ia64.c: Likewise.
3021 * elfxx-mips.c: Likewise.
3023 2017-04-13 Alan Modra <amodra@gmail.com>
3025 * aoutx.h: Use %B and %A in error messages throughout file.
3026 * aout-cris.c: Likewise.
3027 * archive.c: Likewise.
3028 * binary.c: Likewise.
3029 * coff-rs6000.c: Likewise.
3030 * coff-tic4x.c: Likewise.
3031 * coffcode.h: Likewise.
3032 * coffgen.c: Likewise.
3033 * cofflink.c: Likewise.
3034 * coffswap.h: Likewise.
3035 * cpu-arm.c: Likewise.
3036 * elf-eh-frame.c: Likewise.
3037 * elf-m10300.c: Likewise.
3039 * elf32-arc.c: Likewise.
3040 * elf32-arm.c: Likewise.
3041 * elf32-bfin.c: Likewise.
3042 * elf32-frv.c: Likewise.
3043 * elf32-iq2000.c: Likewise.
3044 * elf32-m32c.c: Likewise.
3045 * elf32-microblaze.c: Likewise.
3046 * elf32-nds32.c: Likewise.
3047 * elf32-rl78.c: Likewise.
3048 * elf32-rx.c: Likewise.
3049 * elf32-score.c: Likewise.
3050 * elf32-score7.c: Likewise.
3051 * elf32-sh64.c: Likewise.
3052 * elf32-v850.c: Likewise.
3053 * elf32-vax.c: Likewise.
3054 * elf32-visium.c: Likewise.
3055 * elf64-ia64-vms.c: Likewise.
3056 * elf64-mmix.c: Likewise.
3057 * elf64-sh64.c: Likewise.
3058 * elfcode.h: Likewise.
3059 * elfnn-aarch64.c: Likewise.
3060 * elfnn-ia64.c: Likewise.
3061 * elfxx-mips.c: Likewise.
3062 * hpux-core.c: Likewise.
3065 * linker.c: Likewise.
3066 * merge.c: Likewise.
3068 * oasys.c: Likewise.
3069 * pdp11.c: Likewise.
3070 * peXXigen.c: Likewise.
3071 * rs6000-core.c: Likewise.
3072 * vms-alpha.c: Likewise.
3073 * xcofflink.c: Likewise.
3075 2017-04-13 Alan Modra <amodra@gmail.com>
3077 * bfd.c (PRINT_TYPE): Define.
3078 (_doprnt): New function.
3079 (error_handler_internal): Use _doprnt.
3080 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
3081 calls in their natural order, throughout file.
3082 * coff-mcore.c: Likewise.
3083 * coff-ppc.c: Likewise.
3084 * coff-tic80.c: Likewise.
3085 * cofflink.c: Likewise.
3086 * elf-s390-common.c: Likewise.
3088 * elf32-arm.c: Likewise.
3089 * elf32-i386.c: Likewise.
3090 * elf32-m32r.c: Likewise.
3091 * elf32-msp430.c: Likewise.
3092 * elf32-spu.c: Likewise.
3093 * elf64-ia64-vms.c: Likewise.
3094 * elf64-sparc.c: Likewise.
3095 * elf64-x86-64.c: Likewise.
3096 * elflink.c: Likewise.
3097 * elfnn-aarch64.c: Likewise.
3098 * elfnn-ia64.c: Likewise.
3099 * elfxx-mips.c: Likewise.
3101 2017-04-13 Alan Modra <amodra@gmail.com>
3103 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
3104 branch veneers" error. Fix double space and format message.
3105 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
3106 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
3108 2017-04-13 Alan Modra <amodra@gmail.com>
3110 * bfd-in2.h: Regenerate.
3112 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
3114 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
3115 extra `\n' in warning/error messages.
3116 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
3117 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3119 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
3121 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
3122 processor-specific properties with generic ELF target vector.
3124 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
3126 * elf32-sparc.c (elf_backend_fixup_symbol): New.
3127 * elf64-sparc.c (elf_backend_fixup_symbol): New.
3128 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
3129 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
3131 (link_hash_newfunc): Initialize has_got_reloc and
3133 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
3135 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
3137 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
3139 (_bfd_sparc_elf_fixup_symbol): New function.
3140 (allocate_dynrelocs): Don't allocate space for dynamic
3141 relocations and discard relocations against resolved undefined
3142 weak symbols in executable. Don't make resolved undefined weak
3143 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
3144 relocation against undefined weak symbols in PIE.
3145 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
3146 relocations against resolved undefined weak symbols in PIE
3147 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
3148 without ynamic PLT/GOT relocations for resolved undefined weak
3150 Don't generate dynamic relocation against resolved undefined
3151 weak symbol in executable.
3152 (pie_finish_undefweak_symbol): New function.
3153 (_bfd_sparc_elf_finish_dynamic_sections): Call
3154 pie_finish_undefweak_symbol on all symbols in PIE.
3155 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
3156 (_bfd_sparc_elf_fixup_symbol): New function.
3158 2017-04-10 Nick Clifton <nickc@redhat.com>
3160 * config.bfd: Remove ns32k from obsolete list.
3162 2017-04-10 Alan Modra <amodra@gmail.com>
3165 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
3166 (special_sections_i): Likewise for .init_array.
3167 (special_sections_p): Likewise for .preinit_array.
3169 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
3173 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
3174 ELF_COMMON_DEF_P for common symbols.
3175 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3176 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
3177 * elflink.c (_bfd_elf_merge_symbol): Revert commits
3178 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
3179 07492f668d2173da7a2bda3707ff0985e0f460b6.
3181 2017-04-07 Pedro Alves <palves@redhat.com>
3183 * opncls.c (bfd_get_debug_link_info): Rename to...
3184 (bfd_get_debug_link_info_1): ... this. Change type of second
3185 parameter to void pointer. Adjust.
3186 (bfd_get_debug_link_info): Reimplement on top of
3187 bfd_get_debug_link_info_1.
3188 (separate_debug_file_exists, separate_alt_debug_file_exists):
3189 Change type of second parameter to void pointer. Adjust.
3190 (get_func_type, check_func_type): Change type of second parameter
3192 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
3193 the callback functions instead of passing the address of a local.
3194 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
3195 find_separate_debug_file.
3196 (get_alt_debug_link_info_shim): Change type of second parameter to
3197 void pointer. Adjust.
3198 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
3199 find_separate_debug_file.
3200 (get_build_id_name, bfd_boolean check_build_id_file): Change type
3201 of second parameter to void pointer. Adjust.
3202 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
3203 pointer local to find_separate_debug_file.
3205 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
3207 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
3208 external symbols with a definition.
3209 (_bfd_coff_gc_mark_extra_sections): Fix typo.
3211 2017-04-07 Alan Modra <amodra@gmail.com>
3213 * po/SRC-POTFILES.in: Regenerate.
3215 2017-04-05 Alan Modra <amodra@gmail.com>
3217 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
3220 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
3222 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
3223 numbers for DataDirectory entry indicies passed to
3226 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
3228 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
3229 each GNU_MBIND section and align GNU_MBIND section to page size.
3230 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
3231 segment for each GNU_MBIND section.
3232 (_bfd_elf_init_private_section_data): Copy sh_info from input
3233 for GNU_MBIND section.
3235 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
3237 * elfnn-riscv.c (GP_NAME): Delete.
3238 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
3239 (_bfd_riscv_relax_lui): Likewise.
3241 2017-04-04 Nick Clifton <nickc@redhat.com>
3244 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
3246 (bfd_elf_final_link): Only initialize the extended symbol index
3247 section if there are extended symbol tables to list.
3249 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
3251 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
3252 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
3253 * configure.ac (elf): Add elf-properties.lo.
3254 * Makefile.in: Regenerated.
3255 * configure: Likewise.
3256 * elf-bfd.h (elf_property_kind): New.
3257 (elf_property): Likewise.
3258 (elf_property_list): Likewise.
3259 (elf_properties): Likewise.
3260 (_bfd_elf_parse_gnu_properties): Likewise.
3261 (_bfd_elf_get_property): Likewise.
3262 (_bfd_elf_link_setup_gnu_properties): Likewise.
3263 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
3264 and setup_gnu_properties.
3265 (elf_obj_tdata): Add properties.
3266 * elf-properties.c: New file.
3267 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
3268 (elf_i386_merge_gnu_properties): Likewise.
3269 (elf_backend_parse_gnu_properties): Likewise.
3270 (elf_backend_merge_gnu_properties): Likewise.
3271 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3272 (elf_x86_64_merge_gnu_properties): Likewise.
3273 (elf_backend_parse_gnu_properties): Likewise.
3274 (elf_backend_merge_gnu_properties): Likewise.
3275 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
3276 (elf_backend_parse_gnu_properties): Likewise.
3277 (elf_backend_setup_gnu_properties): Likewise.
3278 (elfNN_bed): Add elf_backend_parse_gnu_properties,
3279 elf_backend_merge_gnu_properties and
3280 elf_backend_setup_gnu_properties.
3282 2017-03-30 Pip Cet <pipcet@gmail.com>
3284 * elf32-wasm32.c: Add relocation code, two relocs.
3285 * reloc.c: Add wasm32 relocations.
3286 * libbfd.h: Regenerate.
3287 * bfd-in2.h: Regenerate.
3288 * bfd/po/bfd.pot: Regenerate.
3290 2017-03-29 Nick Clifton <nickc@redhat.com>
3293 * coff-bfd.h (struct coff_section_data): Add new fields:
3294 saved_bias and bias.
3295 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
3296 computed for PE binaries.
3297 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
3300 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
3303 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
3304 to handle a local symbol with a hash-symbol-entry; without PLT.
3305 Add BFD_ASSERT for an incidental case with GOT entry present.
3306 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
3307 isn't forced-or-set local.
3309 2017-03-27 Pip Cet <pipcet@gmail.com>
3311 * wasm-module.c: New file to support WebAssembly modules.
3312 * wasm-module.h: New file to support WebAssembly modules.
3313 * doc/webassembly.texi: Start documenting wasm-module.c.
3314 * config.bfd: Add wasm_vec.
3315 * targets.c: Likewise.
3316 * configure.ac: Likewise.
3317 * Makefile.am: Add entries for wasm-module.c.
3318 * Makefile.in: Regenerate.
3319 * configure: Regenerate.
3320 * po/SRC-POTFILES.in: Regenerate.
3322 2017-03-27 Pip Cet <pipcet@gmail.com>
3324 * cpu-wasm32.c: New file to support wasm32 architecture.
3325 * elf32-wasm32.c: New file to support wasm32 architecture.
3326 * Makefile.am: Add wasm32 architecture.
3327 * archures.c: Likewise.
3328 * config.bfd: Likewise.
3329 * configure.ac: Likewise.
3330 * targets.c: Likewise.
3331 * Makefile.in: Regenerate.
3332 * bfd-in2.h: Regenerate.
3333 * configure: Regenerate.
3334 * po/SRC-POTFILES.in: Regenerate.
3336 2017-03-20 Alan Modra <amodra@gmail.com>
3339 * elf64-ppc.c (compare_symbols): Stabilize sort.
3341 2017-03-18 Alan Modra <amodra@gmail.com>
3343 * elf64-ppc.c (struct ppc_link_hash_table): Add
3344 local_ifunc_resolver and maybe_local_ifunc_resolver.
3345 (ppc_build_one_stub): Set flags on emitting dynamic
3346 relocation to ifunc.
3347 (ppc64_elf_relocate_section): Likewise.
3348 (ppc64_elf_finish_dynamic_symbol): Likewise.
3349 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
3350 local dynamic relocs to ifuncs.
3351 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
3352 local_ifunc_resolver and maybe_local_ifunc_resolver.
3353 (ppc_elf_relocate_section): Set flag on emitting dynamic
3354 relocation to ifuncs.
3355 (ppc_elf_finish_dynamic_symbol): Likewise.
3356 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
3357 dynamic relocs to ifuncs.
3359 2017-03-13 Nick Clifton <nickc@redhat.com>
3362 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
3363 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
3364 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
3365 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
3366 * bfd-in2.h: Regenerate.
3367 * libbfd.h: Regenerate.
3368 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
3370 (IS_AARCH64_TLSDESC_RELOC): Likewise.
3371 (elfNN_aarch64_howto_table): Likewise.
3372 (aarch64_tls_transition_without_check): Likewise.
3373 (aarch64_reloc_got_type): Likewise.
3374 (elfNN_aarch64_final_link_relocate): Likewise.
3375 (elfNN_aarch64_tls_relax): Likewise.
3376 (elfNN_aarch64_relocate_section): Likewise.
3377 (elfNN_aarch64_gc_sweep_hook): Likewise.
3378 (elfNN_aarch64_check_relocs): Likewise.
3379 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
3380 (_bfd_aarch64_elf_resolve_relocation): Likewise.
3382 2017-03-11 Alan Modra <amodra@gmail.com>
3384 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
3385 parameter is in fact used. Whitespace fixes.
3386 * elf64-ppc.c: Likewise.
3388 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
3390 * rs6000-core.c (CORE_NEW): Simplify macro when
3391 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
3393 2017-03-07 Alan Modra <amodra@gmail.com>
3397 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
3400 2017-03-05 Alan Modra <amodra@gmail.com>
3402 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
3403 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
3404 (next_cie_fde_offset): New function.
3405 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
3406 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
3407 four bytes. Align CIEs to four or eight bytes depending on
3408 per_encoding_aligned8. Align FDEs according to their encoding.
3409 Pad last FDE to output section alignment.
3410 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
3412 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
3413 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
3414 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
3416 2017-03-02 Martin Bickel <binutils@ineranves.de>
3419 * elf.c (rewrite_elf_program_header): Do not issue a warning for
3420 empty segments which have a zero filesz, but a non-zero memsz.
3422 2017-03-02 Alan Modra <amodra@gmail.com>
3424 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
3426 2017-02-28 Alan Modra <amodra@gmail.com>
3428 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
3429 (ppc64_elf_relocate_section): Likewise.
3431 2017-02-28 Alan Modra <amodra@gmail.com>
3434 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
3435 rather than elf32_nios2_hash_table or elf_hash_table.
3436 (create_got_section): Likewise.
3437 (nios2_elf32_finish_dynamic_symbol): Likewise.
3438 (nios2_elf32_adjust_dynamic_symbol): Likewise.
3439 (nios2_elf32_size_dynamic_sections): Likewise.
3440 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
3441 vars. Use htab equivalents directly instead. Don't create
3442 all dynamic sections on needing just the GOT. Use a goto
3443 rather than a fall-through with reloc test. Ensure
3444 htab->dynobj is set when making dynamic sreloc section.
3445 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
3446 equivalent directly instead. Don't segfault on looking for
3447 .dynamic when dynamic sections have not been created. Don't
3448 segfault on .got.plt being discarded.
3449 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
3450 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
3451 fixme and another not so relevant comment.
3452 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
3453 already set, set hash table dynobj on creating .sbss.
3455 2017-02-28 Alan Modra <amodra@gmail.com>
3457 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
3458 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
3459 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
3460 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
3461 (ppc64_elf_relocate_section): Likewise.
3462 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
3463 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
3464 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
3465 * libbfd.h: Regenerate.
3466 * bfd-in2.h: Regenerate.
3468 2017-02-28 Alan Modra <amodra@gmail.com>
3470 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
3471 dynamic .data.rel.ro read-only.
3472 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
3473 rather than section flags when deciding where copy reloc goes.
3474 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
3475 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
3476 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
3477 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
3478 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
3479 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
3480 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
3481 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
3482 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3483 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
3484 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
3485 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
3486 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3487 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
3488 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
3489 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
3490 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
3491 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
3492 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
3494 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
3496 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
3497 `jalr $0, $25' instruction encoding.
3499 2017-02-27 Nick Clifton <nickc@redhat.com>
3502 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
3503 generating a seg-fault when encountering a symbol that has been
3504 deleted by garbage collection.
3506 2017-02-25 Alan Modra <amodra@gmail.com>
3508 * elf32-arc.c (struct dynamic_sections): Delete.
3509 (enum dyn_section_types): Delete.
3510 (dyn_section_names): Delete.
3511 (arc_create_dynamic_sections): Delete.
3512 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
3513 segfault on discarded .rela.plt section.
3514 (elf_arc_size_dynamic_sections): Formatting. Don't call
3515 arc_create_dynamic_sections. Don't allocate memory for sections
3516 handled by the generic linker. Correct code finding relocs in
3517 read-only sections. Set SEC_EXCLUDE on zero size .got,
3518 .got.plt, and .dynbss sections. Do set .interp for pies.
3520 2017-02-24 Andrew Waterman <andrew@sifive.com>
3522 * elfnn-riscv.c (GP_NAME): New macro.
3523 (riscv_global_pointer_value): Use it.
3524 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
3525 output section, consider only that section's alignment.
3527 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
3529 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
3530 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
3531 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
3532 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
3534 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
3536 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
3537 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
3540 2017-02-23 Alan Modra <amodra@gmail.com>
3543 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
3545 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
3546 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
3549 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
3552 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
3553 processing ahead of the call to `elf_gc_sweep_symbol'.
3555 2017-02-22 Nick Clifton <nickc@redhat.com>
3558 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
3559 created section 4-byte alignment.
3561 2017-02-22 Alan Modra <amodra@gmail.com>
3563 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
3564 on .got or .plt output section being discarded by script.
3565 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
3568 2017-02-21 Alan Modra <amodra@gmail.com>
3570 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
3571 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
3573 2017-02-20 Alan Modra <amodra@gmail.com>
3576 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
3577 if DT_RELSZ/DT_RELASZ is zero.
3579 2017-02-17 Nick Clifton <nickc@redhat.com>
3581 * compress.c (bfd_get_full_section_contents): Remember to reduce
3582 compressed size by the sizeof the compression header when
3583 decompressing the contents.
3585 2017-02-17 Pedro Alves <palves@redhat.com>
3587 * srec.c (Chunk): Rename to ...
3588 (_bfd_srec_len): ... this.
3589 (S3Forced): Rename to ...
3590 (_bfd_srec_forceS3): ... this.
3591 * objcopy.c: Adjust all references.
3593 2017-02-17 Pedro Alves <palves@redhat.com>
3595 * archive.c (bsd_write_armap): Rename to ...
3596 (_bfd_bsd_write_armap): ... this.
3597 (coff_write_armap): Rename to ...
3598 (_bfd_coff_write_armap): ... this.
3599 * libbfd-in.h (bsd_write_armap): Rename to ...
3600 (_bfd_bsd_write_armap): ... this.
3601 (coff_write_armap): Rename to ...
3602 (_bfd_coff_write_armap): ... this.
3603 * aout-target.h, aout-tic30.c: Adjust all users.
3604 * libbfd.h: Regenerate.
3606 2017-02-17 Pedro Alves <palves@redhat.com>
3608 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
3609 (warn_deprecated): Rename to ...
3610 (_bfd_warn_deprecated): ... this.
3611 * libbfd.c (warn_deprecated): Rename to ...
3612 (_bfd_warn_deprecated): ... this.
3613 * bfd-in2.h: Regenerate.
3615 2017-02-17 Pedro Alves <palves@redhat.com>
3617 * bfdio.c (real_ftell): Rename to ...
3618 (_bfd_real_ftell): ... this.
3619 (real_fseek): Rename to ...
3620 (_bfd_real_fseek): ... this.
3621 (real_fopen): Rename to ...
3622 (_bfd_real_fopen): ... this.
3623 * libbfd-in.h (real_ftell): Rename to ...
3624 (_bfd_real_ftell): ... this.
3625 (real_fseek): Rename to ...
3626 (_bfd_real_fseek): ... this.
3627 (real_fopen): Rename to ...
3628 (_bfd_real_fopen): ... this.
3629 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
3630 * libbfd.h: Regenerate.
3632 2017-02-17 Pedro Alves <palves@redhat.com>
3634 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
3635 * libbfd.c (read_unsigned_leb128): Rename to ...
3636 (_bfd_read_unsigned_leb128): ... this.
3637 (read_signed_leb128): Rename to ...
3638 (_bfd_read_signed_leb128): ... this.
3639 (safe_read_leb128): Rename to ...
3640 (_bfd_safe_read_leb128): ... this.
3641 * libbfd-in.h (read_unsigned_leb128): Rename to ...
3642 (_bfd_read_unsigned_leb128): ... this.
3643 (read_signed_leb128): Rename to ...
3644 (_bfd_read_signed_leb128): ... this.
3645 (safe_read_leb128): Rename to ...
3646 (_bfd_safe_read_leb128): ... this.
3647 * libbfd.h: Renegerate.
3649 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
3651 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
3652 before trying to fine matching file and line information.
3654 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
3656 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
3657 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
3658 not match current bfd, then reload debug information. Record bfd
3659 we're loading debug info for in the stash. If we have debug
3660 informatin in the cache then perform section placement before
3663 2017-02-16 Alan Modra <amodra@gmail.com>
3666 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
3667 * elfxx-target.h (elf_backend_no_page_alias): Define.
3668 (elfNN_bed): Init new field.
3669 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
3670 ensure PT_LOAD segment starts on a new page.
3671 * elf32-hppa.c (elf_backend_no_page_alias): Define.
3673 2017-02-16 Alan Modra <amodra@gmail.com>
3676 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
3679 2017-02-16 Jiong Wang <jiong.wang@arm.com>
3681 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
3682 * bfd-in2.h: Regenerated.
3684 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
3687 * elf32-i386.c (elf_i386_relocate_section): Allow
3688 "lea foo@GOT, %reg" in PIC.
3690 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
3693 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
3694 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
3695 error against local IFUNC symbol without a base register for
3698 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
3700 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
3701 `%P: %H:' with `info->callbacks->einfo'.
3702 (ppc_elf_relocate_section): Likewise.
3703 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
3704 (ppc64_elf_edit_toc): Likewise.
3705 (ppc64_elf_relocate_section): Likewise.
3707 2017-02-14 Alan Modra <amodra@gmail.com>
3709 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
3710 --gc-keep-exported, and test versioned field of sym rather than
3711 looking for @ in name.
3713 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
3715 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
3718 2017-02-13 Nick Clifton <nickc@redhat.com>
3721 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
3724 2017-02-07 Andrew Waterman <andrew@sifive.com>
3726 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
3727 entry size if PLT header is written.
3729 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
3731 Fix sparc64 dynamic relocation processing to use the dynamic
3733 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
3734 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
3737 2017-02-03 Nick Clifton <nickc@redhat.com>
3740 * coffcode.h (coff_write_object_contents): Enlarge size of
3741 s_name_buf in order to avoid compile time warning about possible
3743 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
3744 32-bits of insn value before printing into buffer.
3746 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3748 * elfxx-mips.c (mips_elf_hash_sort_data): Add
3749 `max_local_dynindx'.
3750 (mips_elf_sort_hash_table): Handle it.
3751 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
3752 symbols bump up `max_local_dynindx' rather than
3753 `max_non_got_dynindx'.
3755 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3757 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
3758 `min_got_dynindx', `max_unref_got_dynindx' and
3759 `max_non_got_dynindx' members to the `bfd_size_type' data type.
3760 (mips_elf_sort_hash_table): Adjust accordingly.
3762 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3764 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
3765 to access the hash table.
3767 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3769 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
3770 non-NULL `htab' to the beginning.
3772 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3774 * elflink.c (elf_gc_sweep): Wrap overlong line.
3776 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
3778 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
3779 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
3780 * elfxx-mips.c (mips_elf_link_hash_table): Add
3781 `ignore_branch_isa' member.
3782 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
3783 in branch relocation calculation as an error if
3784 `ignore_branch_isa' has been set.
3785 (_bfd_mips_elf_insn32): Rename to...
3786 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
3787 parameter to `insn32' and add an `ignore_branch_isa' parameter.
3788 Handle the new parameter.
3790 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
3792 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
3793 local variable dynobj.
3796 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
3797 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
3798 executable from read-only sections into sdynrelro.
3799 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
3800 dynamic relocs in sdynrelro.
3801 (elf_backend_want_dynrelro): Define.
3803 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
3805 * config.bfd (*-*-rtemsaout*): Mark as removed.
3807 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
3809 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
3810 (arm-*-rtems*): Move to (arm*-*-eabi*).
3811 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
3812 (m68-*-rtems*): Move to (m68*-*-elf*).
3814 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
3816 * config.bfd (*-*-rtemscoff*): Mark as removed.
3818 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
3821 * elflink.c (bfd_elf_record_link_assignment): Revert last
3822 change and don't ever clear `forced_local'. Set `mark'
3824 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
3826 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
3827 (bfd_elf_size_dynamic_sections): ... here.
3828 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
3829 and set `mark' instead in `__tls_get_addr_opt' processing.
3830 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
3832 2017-01-24 Alan Modra <amodra@gmail.com>
3834 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
3835 where dynamic relocs are preferable. Allow ifunc too.
3836 (ensure_undefweak_dynamic): New function.
3837 (allocate_dynrelocs): Use it here. Move plt handling last and
3838 don't make symbols dynamic, simplifying loop. Only make undef
3839 weak symbols with GOT entries dynamic. Correct condition
3840 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
3841 comments. Remove goto.
3842 (ppc_elf_relocate_section): Correct test for using dynamic
3843 symbol on GOT relocs. Rearrange test for emitting GOT relocs
3844 to suit. Set up explicit tls_index entries and implicit GOT
3845 tls_index entries resolvable at link time for
3846 __tls_get_addr_opt. Simplify test to clear mem for prelink.
3847 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
3848 (ensure_undefweak_dynamic): New function.
3849 (allocate_dynrelocs): Use it here. Only make undef weak symbols
3850 with GOT entries dynamic. Remove unnecessary test of
3851 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
3852 (ppc64_elf_relocate_section): Correct test for using dynamic
3853 symbol on GOT relocs. Rearrange test for emitting GOT relocs
3854 to suit. Set up explicit tls_index entries and implicit GOT
3855 tls_index entries resolvable at link time for __tls_get_addr_opt.
3856 Simplify expression to clear mem for prelink.
3858 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
3860 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
3862 2017-01-20 Jiong Wang <jiong.wang@arm.com>
3864 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
3865 (elf_backend_hash_symbol): Define.
3867 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
3870 * elflink.c (bfd_elf_record_link_assignment): Clear any
3871 `forced_local' marking for DSO symbols that are not being
3874 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
3876 * elfnn-riscv.c (riscv_elf_object_p): New function.
3878 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
3881 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
3883 (elf_x86_64_check_relocs): Create .eh_frame section for the
3885 (elf_x86_64_size_dynamic_sections): Allocate and initialize
3886 .eh_frame section for the .plt.bnd section.
3887 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
3888 for the .plt.bnd section.
3890 2017-01-12 Nick Clifton <nickc@redhat.com>
3893 * opncls.c (find_separate_debug_file): Add include_dirs
3894 parameter. Only include the directory part of the bfd's filename
3895 in search paths if include_dirs is true. Add a couple of extra
3896 locations for looking for debug files.
3897 ( bfd_follow_gnu_debuglink): Update invocation of
3898 find_separate_debug_file.
3899 (bfd_follow_gnu_debugaltlink): Likewise.
3900 (get_build_id): New function: Finds the build-id of the given bfd.
3901 (get_build_id_name): New function: Computes the name of the
3902 separate debug info file for a bfd, based upon its build-id.
3903 (check_build_id_file): New function: Checks to see if a separate
3904 debug info file exists at the given location, and that its
3905 build-id matches that of the original bfd.
3906 (bfd_follow_build_id_debuglink): New function: Finds a separate
3907 debug info file for a given bfd by using the build-id method.
3908 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
3909 method of locating a separate debug info file before using the
3911 * bfd-in2.h: Regenerate.
3913 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
3916 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
3917 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
3918 elf_x86_64_eh_frame_plt_got.
3919 (elf_x86_64_size_dynamic_sections): Get unwind info from
3920 elf_x86_64_bnd_arch_bed for the BND PLT.
3922 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
3924 * config.bfd: Add entries for i686-redox and x86_64-redox.
3926 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
3928 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
3930 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
3931 .eh_frame section to 4 bytes for x32.
3932 (elf_x86_64_check_relocs): Likewise.
3934 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
3937 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
3938 (PLT_GOT_FDE_LENGTH): Likewise.
3939 (elf_i386_plt_layout): Add eh_frame_plt_got and
3940 eh_frame_plt_got_size.
3941 (elf_i386_plt): Updated.
3942 (elf_i386_link_hash_table): Add plt_got_eh_frame.
3943 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
3944 (elf_i386_size_dynamic_sections): Allocate and initialize
3945 .eh_frame section for .plt.got.
3946 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
3948 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
3949 eh_frame_plt_got_size.
3950 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
3951 (PLT_GOT_FDE_LENGTH): Likewise.
3952 (elf_x86_64_backend_data): Add eh_frame_plt_got and
3953 eh_frame_plt_got_size.
3954 (elf_x86_64_arch_bed): Updated.
3955 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
3956 eh_frame_plt_got_size.
3957 (elf_x86_64_nacl_arch_bed): Likewise.
3958 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
3959 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
3960 (elf_x86_64_size_dynamic_sections): Allocate and initialize
3961 .eh_frame section for .plt.got.
3962 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
3965 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
3967 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
3968 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
3970 2017-01-09 Nick Clifton <nickc@redhat.com>
3972 * dwarf2.c (lookup_address_in_function_table): Return early if
3973 there are no functions in the given comp unit, or if the high
3974 address of the last function in the comp unit is less than the
3977 2017-01-09 Nick Clifton <nickc@redhat.com>
3980 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
3981 message if there are too many symbols to load.
3983 2017-01-04 James Clarke <jrtc27@jrtc27.com>
3985 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
3986 if relocs are cached.
3988 2017-01-03 Rich Felker <bugdal@aerifal.cx>
3991 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
3992 for R_MICROBLAZE_GOTOFF_64.
3994 2017-01-03 Nick Clifton <nickc@redhat.com>
3996 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
3997 warning about using a possibly uninitialised variable.
3999 2017-01-02 Alan Modra <amodra@gmail.com>
4001 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
4002 (allocate_plt_static, allocate_dynrelocs): Use it.
4004 2017-01-02 Alan Modra <amodra@gmail.com>
4006 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
4007 .PARISC.unwind section.
4009 2017-01-02 Alan Modra <amodra@gmail.com>
4012 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
4013 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
4014 indirect to GOT pointer relative code edit.
4016 2017-01-02 Alan Modra <amodra@gmail.com>
4018 Update year range in copyright notice of all files.
4020 For older changes see ChangeLog-2016
4022 Copyright (C) 2017 Free Software Foundation, Inc.
4024 Copying and distribution of this file, with or without modification,
4025 are permitted in any medium without royalty provided the copyright
4026 notice and this notice are preserved.
4032 version-control: never