1 2017-11-28 Nick Clifton <nickc@redhat.com>
4 * coffgen.c (_bfd_coff_read_string_table): Check for an excessive
5 size of the external string table.
7 2017-11-28 Nick Clifton <nickc@redhat.com>
10 * reloc.c (reloc_offset_in_range): Rename to
11 bfd_reloc_offset_in_range and export.
12 (bfd_perform_relocation): Rename function invocation.
13 (bfd_install_relocation): Likewise.
14 (bfd_final_link_relocate): Likewise.
15 * bfd-in2.h: Regenerate.
16 * coff-arm.c (coff_arm_reloc): Use bfd_reloc_offset_in_range.
17 * coff-i386.c (coff_i386_reloc): Likewise.
18 * coff-i860.c (coff_i860_reloc): Likewise.
19 * coff-m68k.c (mk68kcoff_common_addend_special_fn): Likewise.
20 * coff-m88k.c (m88k_special_reloc): Likewise.
21 * coff-mips.c (mips_reflo_reloc): Likewise.
22 * coff-x86_64.c (coff_amd64_reloc): Likewise.
24 2017-11-28 H.J. Lu <hongjiu.lu@intel.com>
26 * elf-m10300.c (mn10300_elf_check_relocs): Don't set
28 * elf32-arm.c (elf32_arm_check_relocs): Likewise.
29 * elf32-bfin.c (bfin_check_relocs): Likewise.
30 * elf32-cr16.c (cr16_elf_check_relocs): Likewise.
31 * elf32-cris.c (cris_elf_check_relocs): Likewise.
32 * elf32-d10v.c (elf32_d10v_check_relocs): Likewise.
33 * elf32-dlx.c (elf32_dlx_check_relocs): Likewise.
34 * elf32-fr30.c (fr30_elf_check_relocs): Likewise.
35 * elf32-frv.c (elf32_frv_check_relocs): Likewise.
36 * elf32-hppa.c (elf32_hppa_check_relocs): Likewise.
37 * elf32-i370.c (i370_elf_check_relocs): Likewise.
38 * elf32-i386.c (elf_i386_check_relocs): Likewise.
39 * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
40 * elf32-lm32.c (lm32_elf_check_relocs): Likewise.
41 * elf32-m32c.c (m32c_elf_check_relocs): Likewise.
42 * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
43 * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
44 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
45 * elf32-mcore.c (mcore_elf_check_relocs): Likewise.
46 * elf32-metag.c (elf_metag_check_relocs): Likewise.
47 * elf32-microblaze.c (microblaze_elf_check_relocs): Likewise.
48 * elf32-moxie.c (moxie_elf_check_relocs): Likewise.
49 * elf32-msp430.c (elf32_msp430_check_relocs): Likewise.
50 * elf32-mt.c (mt_elf_check_relocs): Likewise.
51 * elf32-nios2.c (nios2_elf32_check_relocs): Likewise.
52 * elf32-or1k.c (or1k_elf_check_relocs): Likewise.
53 * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
54 * elf32-rl78.c (rl78_elf_check_relocs): Likewise.
55 * elf32-s390.c (elf_s390_check_relocs): Likewise.
56 * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
57 * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
58 * elf32-sh.c (sh_elf_check_relocs): Likewise.
59 * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
60 * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
61 * elf32-v850.c (v850_elf_check_relocs): Likewise.
62 * elf32-vax.c (elf_vax_check_relocs): Likewise.
63 * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
64 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
65 * elf64-aarch64.c (elf64_aarch64_check_relocs): Likewise.
66 * elf64-alpha.c (elf64_alpha_check_relocs): Likewise.
67 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
68 * elf64-ia64-vms.c (elf64_ia64_check_relocs): Likewise.
69 * elf64-mmix.c (mmix_elf_check_relocs): Likewise.
70 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
71 * elf64-s390.c (elf_s390_check_relocs): Likewise.
72 * elf64-sh64.c (sh_elf64_check_relocs): Likewise.
73 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
74 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
75 * elfnn-ia64.c (elfNN_ia64_check_relocs): Likewise.
76 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
77 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
78 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
79 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
81 2017-11-28 Alan Modra <amodra@gmail.com>
84 * elflink.c (_bfd_elf_merge_symbol): Allow weak symbols to override
85 early passes over linker script symbols.
86 * linker.c (_bfd_generic_link_add_one_symbol): Allow symbols to
87 override early passes over linker script symbols. Clear ldscript_def
88 on symbol definitions.
90 2017-11-28 Alan Modra <amodra@gmail.com>
92 * elf64-mmix.c (bfd_elf64_bfd_copy_link_hash_symbol_type): Define.
94 2017-11-28 H.J. Lu <hongjiu.lu@intel.com>
97 * elflink.c (_bfd_elf_merge_symbol): Also skip definition from
99 (elf_link_add_object_symbols): If linker plugin is enabled, set
100 non_ir_ref_regular on symbols referenced in regular objects so
101 that linker plugin will get the correct symbol resolution.
103 2017-11-27 Szabolcs Nagy <szabolcs.nagy@arm.com>
106 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Use
107 bfd_link_executable instead of bfd_link_pic for TLS.
108 (elfNN_aarch64_allocate_dynrelocs): Likewise.
109 (aarch64_can_relax_tls): Likewise.
111 2017-11-27 Szabolcs Nagy <szabolcs.nagy@arm.com>
114 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Use
115 UNDEFWEAK_NO_DYNAMIC_RELOC to avoid dynamic GOT relocs.
116 (elfNN_aarch64_allocate_dynrelocs): Likewise.
118 2017-11-24 H.J. Lu <hongjiu.lu@intel.com>
121 * elf.c (elf_read_notes): Add an argument for note aligment.
122 (elf_parse_notes): Likewise.
123 (_bfd_elf_make_section_from_shdr): Pass section aligment to
125 (bfd_section_from_phdr): Pass segment aligment to elf_read_notes.
126 (elf_parse_notes): Add an argument for note aligment. Use
127 ELF_NOTE_DESC_OFFSET to get the offset of the note descriptor.
128 Use ELF_NOTE_NEXT_OFFSET to get the offset of the next note
130 (elf_read_notes): Add an argument for note aligment and pass it
133 2017-11-23 Alan Modra <amodra@gmail.com>
135 * elf32-hppa.c (pc_dynrelocs): Define.
136 (elf32_hppa_copy_indirect_symbol): Don't copy dyn_relocs to weakdefs.
137 (alias_readonly_dynrelocs): New function.
138 (elf32_hppa_adjust_dynamic_symbol): Don't clear non_got_ref to
139 indicate dyn_relocs should be discarded, discard them here.
140 Use alias_readonly_dynrelocs.
141 (allocate_dynrelocs): Don't test or clear non_got_ref.
142 (elf32_hppa_relocate_section): Simplify test for dynamic relocs.
143 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Don't copy dyn_relocs
145 (alias_readonly_dynrelocs, pc_dynrelocs): New functions.
146 (ppc_elf_adjust_dynamic_symbol): Don't clear non_got_ref to
147 indicate dyn_relocs should be discarded, discard them here.
148 Use alias_readonly_dynrelocs.
149 (allocate_dynrelocs): Don't test or clear non_got_ref.
150 (ppc_elf_relocate_section): Simplify test for dynamic relocs.
152 2017-11-23 Alan Modra <amodra@gmail.com>
154 * elf64-ppc.c (struct ppc_link_hash_entry): Delete weakref field.
155 (ppc64_elf_copy_indirect_symbol): Don't set weakref.
156 (alias_readonly_dynrelocs): Use u.alias rather than weakref.
157 (ppc64_elf_adjust_dynamic_symbol): Don't use
158 alias_readonly_dynrelocs for function symbols.
160 2017-11-23 Alan Modra <amodra@gmail.com>
162 * elf-bfd.h (struct elf_link_hash_entry): Add is_weakalias.
163 Rename u.weakdef to u.alias and update comment.
164 (weakdef): New static inline function.
165 * elflink.c (bfd_elf_record_link_assignment) Test is_weakalias
166 rather than u.weakdef != NULL, and use weakdef function.
167 (_bfd_elf_adjust_dynamic_symbol): Likewise.
168 (_bfd_elf_fix_symbol_flags): Likewise. Clear is_weakalias on
169 all aliases if def has been overridden in a regular object, not
171 (elf_link_add_object_symbols): Delete new_weakdef flag. Test
172 is_weakalias and use weakdef. Set is_weakalias and circular
173 u.alias. Update comments.
174 (_bfd_elf_gc_mark_rsec): Test is_weakalias rather than
175 u.weakdef != NULL and use weakdef function.
176 * elf-m10300.c (_bfd_mn10300_elf_adjust_dynamic_symbol): Test
177 is_weakalias rather than u.weakdef != NULL and use weakdef
178 function. Assert that def is strong defined.
179 * elf32-arc.c (elf_arc_adjust_dynamic_symbol): Likewise.
180 * elf32-arm.c (elf32_arm_adjust_dynamic_symbol): Likewise.
181 * elf32-bfin.c (elf32_bfinfdpic_adjust_dynamic_symbol): Likewise.
182 (bfin_adjust_dynamic_symbol): Likewise.
183 * elf32-cr16.c (_bfd_cr16_elf_adjust_dynamic_symbol): Likewise.
184 * elf32-cris.c (elf_cris_adjust_dynamic_symbol): Likewise.
185 * elf32-frv.c (elf32_frvfdpic_adjust_dynamic_symbol): Likewise.
186 * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Likewise.
187 * elf32-i370.c (i370_elf_adjust_dynamic_symbol): Likewise.
188 * elf32-lm32.c (lm32_elf_adjust_dynamic_symbol): Likewise.
189 * elf32-m32r.c (m32r_elf_adjust_dynamic_symbol): Likewise.
190 * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Likewise.
191 * elf32-metag.c (elf_metag_adjust_dynamic_symbol): Likewise.
192 * elf32-microblaze.c (microblaze_elf_adjust_dynamic_symbol): Likewise.
193 * elf32-nds32.c (nds32_elf_adjust_dynamic_symbol): Likewise.
194 * elf32-nios2.c (nios2_elf32_adjust_dynamic_symbol): Likewise.
195 * elf32-or1k.c (or1k_elf_adjust_dynamic_symbol): Likewise.
196 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Likewise.
197 * elf32-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
198 * elf32-score.c (s3_bfd_score_elf_adjust_dynamic_symbol): Likewise.
199 * elf32-score7.c (s7_bfd_score_elf_adjust_dynamic_symbol): Likewise.
200 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): Likewise.
201 * elf32-tic6x.c (elf32_tic6x_adjust_dynamic_symbol): Likewise.
202 * elf32-tilepro.c (tilepro_elf_gc_mark_hook): Likewise.
203 (tilepro_elf_adjust_dynamic_symbol): Likewise.
204 * elf32-vax.c (elf_vax_adjust_dynamic_symbol): Likewise.
205 * elf32-xtensa.c (elf_xtensa_adjust_dynamic_symbol): Likewise.
206 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Likewise.
207 * elf64-hppa.c (elf64_hppa_adjust_dynamic_symbol): Likewise.
208 * elf64-ia64-vms.c (elf64_ia64_adjust_dynamic_symbol): Likewise.
209 * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
210 (ppc64_elf_adjust_dynamic_symbol): Likewise.
211 * elf64-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
212 * elf64-sh64.c (sh64_elf64_adjust_dynamic_symbol): Likewise.
213 * elfnn-aarch64.c (elfNN_aarch64_adjust_dynamic_symbol): Likewise.
214 * elfnn-ia64.c (elfNN_ia64_adjust_dynamic_symbol): Likewise.
215 * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Likewise.
216 * elfxx-mips.c (_bfd_mips_elf_adjust_dynamic_symbol): Likewise.
217 * elfxx-sparc.c (_bfd_sparc_elf_gc_mark_hook): Likewise.
218 (_bfd_sparc_elf_adjust_dynamic_symbol): Likewise.
219 * elfxx-tilegx.c (tilegx_elf_gc_mark_hook): Likewise.
220 (tilegx_elf_adjust_dynamic_symbol): Likewise.
221 * elfxx-x86.c (_bfd_x86_elf_adjust_dynamic_symbol): Likewise.
223 2017-11-21 Alan Modra <amodra@gmail.com>
225 * elf-bfd.h (elf_symbol_from): Check for NULL symbol bfd.
226 * elfcode.h (elf_slurp_reloc_table_from_section): Add FIXME comment.
228 2017-11-20 Nick Clifton <nickc@redhat.com>
231 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Skip
232 objects without a GNU_PROPERTY note section when looking for a bfd
233 onto which notes can be accumulated.
235 2017-11-20 Alan Modra <amodra@gmail.com>
239 * elf.c (_bfd_elf_init_reloc_shdr): Delete "sec_hdr" parameter
240 and leave rel_hdr->sh_flags zero. Update calls.
241 (bfd_elf_set_group_contents): Check input rel/rela SHF_GROUP
242 flag when !gas before adding rel/rela section to group. Set
243 output rel/rela SHF_GROUP flags.
245 2017-11-18 Jim Wilson <jimw@sifive.com>
247 * elfnn-riscv.c (_bfd_riscv_relax_align): Add space between alignment
248 and to in error message.
250 2017-11-17 H.J. Lu <hongjiu.lu@intel.com>
252 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Pass
253 "%F%P:", instead of "%F:", to linker callback in case of error.
255 2017-11-16 Nick Clifton <nickc@redhat.com>
258 * elf.c (elfcore_grok_netbsd_procinfo): Check that the note is big enough.
259 (elfcore_grok_openbsd_procinfo): Likewise.
260 (elfcore_grok_nto_status): Likewise.
262 2017-11-16 Nick Clifton <nickc@redhat.com>
264 * merge.c (sec_merge_emit): Always create padding buffer. Add
265 asserts to make sure that the buffer is long enough.
267 2017-11-15 Alan Modra <amodra@gmail.com>
269 * bfd.c (union _bfd_doprnt_args): Add "Bad".
270 (_bfd_doprnt): Handle more flags.
271 (_bfd_doprnt_scan): Likewise. Tidy setting of args array.
272 (error_handler_internal): Init args type to Bad.
274 2017-11-14 Alan Modra <amodra@gmail.com>
277 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Warn on discarding
278 non-empty dynamic section.
279 (ppc_build_one_stub): Take elf_gp from output bfd, not output
281 (ppc_size_one_stub, ppc64_elf_next_toc_section): Likewise.
283 2017-11-14 Alan Modra <amodra@gmail.com>
285 * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for user
288 2017-11-13 Jan Beulich <jbeulich@suse.com>
290 * coff-tic80.c (COFF_ENCODE_ALIGNMENT, COFF_DECODE_ALIGNMENT):
292 * coffcode.h (coff_set_alignment_hook): Drop tic80 special case.
293 (coff_write_object_contents): Likewise. Issue diagnostic for too
296 2017-11-12 H.J. Lu <hongjiu.lu@intel.com>
299 * elf.c (_bfd_elf_map_sections_to_segments): Remove PF_X from
302 2017-11-12 Alan Modra <amodra@gmail.com>
304 * elflink.c (elf_link_add_object_symbols): Ignore anything but
305 defined and defweak symbols when setting up weakdefs.
307 2017-11-12 Alan Modra <amodra@gmail.com>
309 * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Set non_got_ref
310 to keep dyn_relocs, clear to discard. Comment.
311 (allocate_dynrelocs): Always clear non_got_ref when clearing
312 dyn_relocs in non-pic case. Invert non_got_ref test. Also test
313 dynamic_adjusted and ELF_COMMON_DEF_P. Move code deleting
314 dyn_relocs on undefined syms to handle for non-pic too.
315 (elf32_hppa_relocate_section): Simplify test for non-pic dyn relocs.
316 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Set non_got_ref
317 to keep dyn_relocs, clear to discard. Comment.
318 (allocate_dynrelocs): Always clear non_got_ref when clearing
319 dyn_relocs in non-pic case. Invert non_got_ref test. Also test
320 dynamic_adjusted and ELF_COMMON_DEF_P. Move code deleting
321 dyn_relocs on undefined syms to handle for non-pic too.
322 (ppc_elf_relocate_section): Simplify test for non-pic dyn relocs.
323 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Discard
324 dyn_relocs here. Don't bother setting non_got_ref. Comment.
325 (allocate_dynrelocs): Delete special handling of non-pic ELFv2
326 ifuncs. Move code deleting dyn_relocs on undefined symbols to
327 handle for non-pic too. Don't test non_got_ref. Do test
328 dynamic_adjusted and ELF_COMMON_DEF_P.
330 2017-11-08 Djordje Todorovic <djordje.todorovic@rt-rk.com>
332 * elf32-mips.c (elf32_mips_grok_psinfo): Extract core->pid.
333 * elf64-mips.c (elf64_mips_grok_psinfo): Likewise.
334 * elfn32-mips.c (elf32_mips_grok_psinfo): Likewise.
336 2017-11-08 Djordje Todorovic <djordje.todorovic@rt-rk.com>
338 * elf32-mips.c (elf32_mips_write_core_note): New function.
339 (elf_backend_write_core_note): New macro.
340 * elf64-mips.c (elf64_mips_write_core_note): New function.
341 (elf_backend_write_core_note): New macro.
342 * elfn32-mips.c (elf32_mips_write_core_note): New function.
343 (elf_backend_write_core_note): New macro.
345 2017-11-07 Alan Modra <amodra@gmail.com>
347 * elf64-ppc.c (ppc64_elf_build_stubs): Correct pluralization in
350 2017-11-07 Alan Modra <amodra@gmail.com>
352 * sysdep.h: Formatting, comment fixes.
353 (gettext, ngettext): Redefine when ENABLE_NLS.
354 (ngettext, dngettext, dcngettext): Define when !ENABLE_NLS.
355 (_): Define using gettext.
356 (textdomain, bindtextdomain): Use safer "do nothing".
357 * hosts/alphavms.h (textdomain, bindtextdomain): Likewise.
358 (ngettext, dngettext, dcngettext): Define when !ENABLE_NLS.
360 2017-11-05 Alan Modra <amodra@gmail.com>
363 * bfd.c (_bfd_doprnt_scan): Check args index before storing, not
366 2017-11-05 Alan Modra <amodra@gmail.com>
369 * bfd.c (union _bfd_doprnt_args): New.
370 (PRINT_TYPE): Add FIELD arg. Take value from args.
371 (_bfd_doprnt): Replace ap parameter with args. Adjust all
372 PRINT_TYPE invocations and reading of format args to suit.
373 Move "%%" handling out of switch handling args. Support
374 positional parameters.
375 (_bfd_doprnt_scan): New function.
376 (error_handler_internal): Call _bfd_doprnt_scan and read args.
378 2017-11-04 Alan Modra <amodra@gmail.com>
380 * elf32-ppc.c (got_entries_needed, got_relocs_needed): New functions.
381 (allocate_dynrelocs, ppc_elf_size_dynamic_sections): Use them here.
382 (ppc_elf_relocate_section): Don't output a dynamic relocation
383 for IE GOT entries in an executable.
384 * elf64-ppc.c (allocate_got): Trim unnecessary TPREL relocs.
385 (ppc64_elf_size_dynamic_sections): Likewise.
386 (ppc64_elf_relocate_section): Likewise.
388 2017-11-04 Alan Modra <amodra@gmail.com>
390 * elf32-ppc.c (readonly_dynrelocs): Delete info param. Update all
391 callers. Don't bother with SEC_ALLOC test. Return section pointer.
393 (maybe_set_textrel): ..here.
394 * elf64-ppc.c (readonly_dynrelocs): Return section pointer.
395 (maybe_set_textrel): Call minfo to print textrel warning to map file.
397 2017-11-04 Alan Modra <amodra@gmail.com>
399 * elf32-hppa.c (enum _tls_type): Move.
400 (struct elf32_hppa_link_hash_entry): Make tls_type a bitfield.
401 (elf32_hppa_check_relocs): Set DF_STATIC_TLS only for shared libraries.
402 Tidy tls_type handling. Set symbol tls_type for GOT_TLS_LDM too.
403 (got_entries_needed, got_relocs_needed): New functions.
404 (allocate_dynrelocs): Use them.
405 (elf32_hppa_size_dynamic_sections): Likewise.
406 (elf32_hppa_relocate_section): Delete bogus FIXME. Formatting.
407 Correct code emitting relocs on GD/IE got entries. Report an
408 error when a symbol has both normal and TLS GOT relocs.
410 2017-11-04 Alan Modra <amodra@gmail.com>
413 * elf32-hppa.c (elf32_hppa_check_relocs): Don't create dyn_relocs
414 for plabels when non-pic.
415 (maybe_set_textrel): New function.
416 (readonly_dynrelocs): Move and rewrite.
417 (elf32_hppa_adjust_dynamic_symbol): Use it. Don't create copy
418 relocs when def_regular or -z nocopyreloc. Handle non_got_ref
419 for functions. Expand non_got_ref comments.
420 (elf32_hppa_size_dynamic_sections): Use maybe_set_textrel.
422 2017-11-03 H.J. Lu <hongjiu.lu@intel.com>
424 * elf32-i386.c (elf_i386_check_relocs): Set plt.refcount to 1.
425 Don't use func_pointer_refcount. Don't set plt.refcount nor
426 non_got_ref for function pointer reference.
427 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
428 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Don't use
429 func_pointer_refcount.
430 (_bfd_x86_elf_copy_indirect_symbol): Don't copy
431 func_pointer_refcount.
432 (_bfd_x86_elf_hide_symbol): Don't use func_pointer_refcount.
433 * elfxx-x86.h (GENERATE_DYNAMIC_RELOCATION_P): Likewise.
434 (elf_x86_link_hash_entry): Remove func_pointer_refcount.
436 2017-11-03 Mingi Cho <mgcho.minic@gmail.com>
437 Nick Clifton <nickc@redhat.com>
440 * coffgen.c (_bfd_coff_get_external_symbols): Check for an
441 overlarge raw syment count.
442 (coff_get_normalized_symtab): Likewise.
444 2017-11-01 James Bowman <james.bowman@ftdichip.com>
446 * archures.c: Add bfd_mach_ft32b.
447 * cpu-ft32.c: Add arch_info_struct.
448 * elf32-ft32.c: Add R_FT32_RELAX, SC0, SC1,
450 (ft32_elf_relocate_section): Add clauses for R_FT32_SC0, SC1,
452 (ft32_reloc_shortable, elf32_ft32_is_diff_reloc)
453 (elf32_ft32_adjust_diff_reloc_value)
454 (elf32_ft32_adjust_reloc_if_spans_insn)
455 (elf32_ft32_relax_delete_bytes, elf32_ft32_relax_is_branch_target)
456 (ft32_elf_relax_section): New function.
457 * reloc.c: Add BFD_RELOC_FT32_RELAX, SC0, SC1, DIFF32.
458 * bfd-in2.h: Regenerate.
459 * libbfd.h: Regenerate.
461 2017-11-01 Nick Clifton <nickc@redhat.com>
464 * coffcode.h (coff_slurp_line_table): Check for an excessively
465 large line number count.
467 2017-11-01 Nick Clifton <nickc@redhat.com>
470 * peicode.h (pe_bfd_read_buildid): Revise check for invalid size
471 and offset in light of further possible bogus values.
473 2017-11-01 Alan Modra <amodra@gmail.com>
476 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't create a plt
477 entry when just a dynamic reloc can serve. Ensure no dynamic
478 relocations when UNDEFWEAK_NO_DYNAMIC_RELOC by setting non_got_ref.
479 Expand and move the non_got_ref comment.
480 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
482 2017-11-01 Nick Clifton <nickc@redhat.com>
485 * coffgen.c (_bfd_coff_free_symbols): Fail if called on a non-COFF
487 * cofflink.c (coff_link_check_archive_element): Skip non-COFF
488 members of an archive.
490 2017-10-31 Nick Clifton <nickc@redhat.com>
493 * peicode.h (pe_bfd_read_buildid): Check for invalid size and data
496 2017-10-30 Alan Modra <amodra@gmail.com>
498 * elf32-frv.c (ELF_TARGET_ID): Don't define for generic
501 * elflink.c (elf_gc_sweep): Test elf_object_id in addition to
503 (bfd_elf_gc_sections): Likewise.
505 2017-10-30 Alan Modra <amodra@gmail.com>
508 * elf32-hppa.c (elf32_hppa_check_relocs): Move SEC_ALLOC test to
509 ensure non_got_ref is not set due to debug references.
510 (elf32_hppa_adjust_dynamic_symbol): Tidy plabel handling. Use
511 SYMBOL_CALLS_LOCAL and UNDEFWEAK_NO_DYNAMIC_RELOC when determining
512 need for a plt entry.
513 (allocate_dynrelocs): Similarly for got entries. Tidy code discarding
514 dynamic relocs when pic. Remove bogus code attempting to handle
516 (elf32_hppa_relocate_section): Similarly. Delete resolved_to_zero
518 (elf32_hppa_finish_dynamic_symbol): Use UNDEFWEAK_NO_DYNAMIC_RELOC
519 and SYMBOL_REFERENCES_LOCAL in GOT handling.
521 2017-10-28 Alan Modra <amodra@gmail.com>
524 * elflink.c (_bfd_elf_merge_symbol): Remove relocs_compatible check.
525 * elf32-hppa.c (elf_backend_relocs_compatible): Define.
526 * elf32-ppc.c (elf_backend_relocs_compatible): Define.
527 * elf64-ppc.c (elf_backend_relocs_compatible): Define.
529 2017-10-25 Alan Modra <amodra@gmail.com>
531 * archive.c (_bfd_compute_and_write_armap): Match "__gnu_lto_slim"
532 optionally prefixed with "_".
533 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
535 2017-10-24 Andrew Waterman <andrew@sifive.com>
537 * elfnn-riscv.c (_bfd_riscv_relax_lui): Don't relax to c.lui
540 2017-10-24 Renlin Li <renlin.li@arm.com>
543 * elflink.c (_bfd_elf_merge_symbol): Handle multiple definition case.
545 2017-10-23 Nick Clifton <nickc@redhat.com>
548 * elflink.c (elf_link_output_extsym): Keep global undefined
549 symbols if they have been marked as needed.
551 2017-10-23 Maciej W. Rozycki <macro@imgtec.com>
553 * elfn32-mips.c (mips_elf_n32_mkobject): New prototype and
555 (bfd_elf32_mkobject): Use `mips_elf_n32_mkobject' rather than
556 `_bfd_mips_elf_mkobject'.
558 2017-10-22 Hans-Peter Nilsson <hp@axis.com>
561 * config.bfd (cris-*-* | crisv32-*-*): Require a 64-bit BFD.
563 2017-10-19 Palmer Dabbelt <palmer@dabbelt.com>
565 * elfnn-riscv.c (riscv_pcgp_hi_reloc): New structure.
566 (riscv_pcgp_lo_reloc): Likewise.
567 (riscv_pcgp_relocs): Likewise.
568 (riscv_init_pcgp_relocs): New function.
569 (riscv_free_pcgp_relocs): Likewise.
570 (riscv_record_pcgp_hi_reloc): Likewise.
571 (riscv_record_pcgp_lo_reloc): Likewise.
572 (riscv_delete_pcgp_hi_reloc): Likewise.
573 (riscv_use_pcgp_hi_reloc): Likewise.
574 (riscv_record_pcgp_lo_reloc): Likewise.
575 (riscv_find_pcgp_lo_reloc): Likewise.
576 (riscv_delete_pcgp_lo_reloc): Likewise.
577 (_bfd_riscv_relax_pc): Likewise.
578 (_bfd_riscv_relax_section): Handle R_RISCV_PCREL_* relocations
579 via the new functions above.
581 2017-10-19 Palmer Dabbelt <palmer@dabbelt.com>
583 * elfnn-riscv.c (R_RISCV_DELETE): New define.
584 (_bfd_riscv_relax_delete): New function.
585 (perform_relocation): Handle R_RISCV_DELETE.
586 (_bfd_riscv_relax_section): Likewise.
588 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
591 * elfxx-tilegx.c (tilegx_elf_tls_transition): Replace
592 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
593 bfd_link_executable for TLS check.
594 (tilegx_elf_check_relocs): Likewise.
595 (allocate_dynrelocs): Likewise.
596 (tilegx_elf_relocate_section): Likewise.
598 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
601 * elf32-tilepro.c (tilepro_elf_tls_transition): Replace
602 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
603 bfd_link_executable for TLS check.
604 (tilepro_elf_check_relocs): Likewise.
605 (allocate_dynrelocs): Likewise.
606 (tilepro_elf_relocate_section): Likewise.
608 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
611 * elfxx-sparc.c (sparc_elf_tls_transition): Replace
612 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
613 bfd_link_executable for TLS check.
614 (_bfd_sparc_elf_check_relocs): Likewise.
615 (allocate_dynrelocs): Likewise.
616 (_bfd_sparc_elf_relocate_section): Likewise.
618 2017-10-18 H.J. Lu <hongjiu.lu@intel.com>
620 * elf32-tilepro.c (tilepro_elf_gc_mark_hook): Call
621 _bfd_generic_link_add_one_symbol to mark __tls_get_addr.
622 * elfxx-tilegx.c (tilegx_elf_gc_mark_hook): Likewise.
624 2017-10-17 H.J. Lu <hongjiu.lu@intel.com>
626 * elf32-microblaze.c (microblaze_elf_check_relocs): Check for
627 indirect and warning symbols.
629 2017-10-17 Alan Modra <amodra@gmail.com>
632 * elf-properties.c (_bfd_elf_parse_gnu_properties): Compare datasz
633 against size left rather than comparing pointers. Reorganise loop.
635 2017-10-17 Alan Modra <amodra@gmail.com>
638 * aoutx.h (aout_get_external_symbols): Handle stringsize of zero,
639 and error for any other size that doesn't cover the header word.
641 2017-10-16 H.J. Lu <hongjiu.lu@intel.com>
643 * elf-bfd.h (elf_backend_data): Remove gc_sweep_hook.
644 * elf32-arm.c (elf32_arm_gc_sweep_hook): Removed.
645 (elf_backend_gc_sweep_hook): Likewise.
646 * elf32-bfin.c (bfin_gc_sweep_hook): Likewise.
647 (bfinfdpic_gc_sweep_hook): Likewise.
648 (elf_backend_gc_sweep_hook): Likewise.
649 * elf32-cr16.c (elf32_cr16_gc_sweep_hook): Likewise.
650 (elf_backend_gc_sweep_hook): Likewise.
651 * elf32-cris.c (cris_elf_gc_sweep_hook): Likewise.
652 (elf_backend_gc_sweep_hook): Likewise.
653 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Likewise.
654 (elf_backend_gc_sweep_hook): Likewise.
655 * elf32-lm32.c (lm32_elf_gc_sweep_hook): Likewise.
656 (elf_backend_gc_sweep_hook): Likewise.
657 * elf32-m32r.c (m32r_elf_gc_sweep_hook): Likewise.
658 (elf_backend_gc_sweep_hook): Likewise.
659 * elf32-m68k.c (elf_m68k_got_entry): Remove elf_m68k_gc_sweep_hook
661 (elf_m68k_remove_got_entry_type): Removed.
662 (elf_m68k_find_got_entry_ptr): Likewise.
663 (elf_m68k_remove_got_entry): Likewise.
664 (elf_m68k_gc_sweep_hook): Likewise.
665 (elf_backend_gc_sweep_hook): Likewise.
666 * elf32-mcore.c (mcore_elf_gc_sweep_hook): Likewise.
667 (elf_backend_gc_sweep_hook): Likewise.
668 * elf32-metag.c (elf_metag_gc_sweep_hook): Likewise.
669 (elf_backend_gc_sweep_hook): Likewise.
670 * elf32-microblaze.c (elf_backend_gc_sweep_hook): Likewise.
671 (elf_backend_gc_sweep_hook): Likewise.
672 * elf32-mips.c (elf_backend_gc_sweep_hook): Likewise.
673 (elf_backend_gc_sweep_hook): Likewise.
674 * elf32-nds32.c (nds32_elf_gc_sweep_hook): Likewise.
675 (elf_backend_gc_sweep_hook): Likewise.
676 * elf32-nios2.c (nios2_elf32_gc_sweep_hook): Likewise.
677 (elf_backend_gc_sweep_hook): Likewise.
678 * elf32-or1k.c (or1k_elf_gc_sweep_hook): Likewise.
679 (elf_backend_gc_sweep_hook): Likewise.
680 * elf32-ppc.c (ppc_elf_gc_sweep_hook): Likewise.
681 (elf_backend_gc_sweep_hook): Likewise.
682 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
683 (elf_backend_gc_sweep_hook): Likewise.
684 * elf32-sparc.c (elf_backend_gc_sweep_hook): Likewise.
685 * elf32-tic6x.c (elf32_tic6x_gc_sweep_hook): Likewise.
686 (elf_backend_gc_sweep_hook): Likewise.
687 * elf32-tilegx.c (elf_backend_gc_sweep_hook): Likewise.
688 * elf32-tilepro.c (tilepro_elf_gc_sweep_hook): Likewise.
689 (elf_backend_gc_sweep_hook): Likewise.
690 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
691 (elf_backend_gc_sweep_hook): Likewise.
692 * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Likewise.
693 (elf_backend_gc_sweep_hook): Likewise.
694 * elf64-alpha.c (elf64_alpha_gc_sweep_hook): Likewise.
695 (elf_backend_gc_sweep_hook): Likewise.
696 * elf64-mips.c (elf_backend_gc_sweep_hook): Likewise.
697 * elf64-mmix.c (mmix_elf_gc_sweep_hook): Likewise.
698 (elf_backend_gc_sweep_hook): Likewise.
699 * elf64-ppc.c (elf_backend_gc_sweep_hook): Likewise.
700 (ppc64_elf_gc_sweep_hook): Likewise.
701 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
702 (elf_backend_gc_sweep_hook): Likewise.
703 * elf64-sparc.c (elf_backend_gc_sweep_hook): Likewise.
704 * elf64-tilegx.c (elf_backend_gc_sweep_hook): Likewise.
705 * elflink.c (elf_link_add_object_symbols): Don't call
706 _bfd_elf_link_check_relocs here.
707 (gc_sweep_hook_fn): Removed.
708 (elf_gc_sweep): Remove gc_sweep_hook.
709 * elfnn-aarch64.c (elfNN_aarch64_gc_sweep_hook): Removed.
710 (elf_backend_gc_sweep_hook): Likewise.
711 * elfnn-riscv.c (riscv_elf_gc_sweep_hook): Likewise.
712 (elf_backend_gc_sweep_hook): Likewise.
713 * elfxx-mips.c (_bfd_mips_elf_gc_sweep_hook): Likewise.
714 * elfxx-mips.h (_bfd_mips_elf_gc_sweep_hook): Likewise.
715 (elf_backend_gc_sweep_hook): Likewise.
716 * elfxx-sparc.c (_bfd_sparc_elf_gc_sweep_hook): Likewise.
717 * elfxx-sparc.h (_bfd_sparc_elf_gc_sweep_hook): Likewise.
718 * elfxx-target.h (elf_backend_gc_sweep_hook): Likewise.
719 (elfNN_bed): Remove elf_backend_gc_sweep_hook.
720 * elfxx-tilegx.c (tilegx_elf_gc_sweep_hook): Removed.
721 * elfxx-tilegx.h (tilegx_elf_gc_sweep_hook): Likewise.
723 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
725 * elf32-i386.c (elf_i386_backend_data): Removed.
726 (get_elf_i386_backend_data): Likewise.
727 (elf_i386_arch_bed): Replace elf_i386_backend_data with
728 elf_x86_backend_data.
729 (elf_i386_get_synthetic_symtab): Likewise.
730 (elf_i386_nacl_arch_bed): Likewise.
731 (elf_i386_vxworks_arch_bed): Likewise.
732 (elf_i386_relocate_section): Check target_os instead of
734 (elf_i386_finish_dynamic_symbol): Likewise.
735 (elf_i386_finish_dynamic_sections): Use htab->plt0_pad_byte.
736 Check target_os instead of is_vxworks.
737 (elf_i386_link_setup_gnu_properties): Remove normal_target and
738 is_vxworks. Initialize plt0_pad_byte.
739 * elf64-x86-64.c (elf_x86_64_backend_data); Removed.
740 (get_elf_x86_64_arch_data): Likewise.
741 (get_elf_x86_64_backend_data): Likewise.
742 (elf_x86_64_arch_bed): Replace elf_x86_64_backend_data with
743 elf_x86_backend_data.
744 (elf_x86_64_get_synthetic_symtab): Likewise.
745 (elf_x86_64_nacl_arch_bed): Likewise.
746 (elf_x86_64_link_setup_gnu_properties): Remove is_vxworks and
747 normal_target. Initialize plt0_pad_byte.
748 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Check target_os
749 instead of is_vxworks.
750 (_bfd_x86_elf_size_dynamic_sections): Likewise.
751 (_bfd_x86_elf_finish_dynamic_sections): Likewise.
752 (_bfd_x86_elf_adjust_dynamic_symbol): Likewise.
753 (_bfd_x86_elf_link_hash_table_create): Initialize target_os.
754 (_bfd_x86_elf_link_setup_gnu_properties): Remove is_vxworks.
755 Update normal_target. Set up plt0_pad_byte. Check target_os
756 instead of is_vxworks.
757 * elfxx-x86.h (elf_x86_target_os): New.
758 (elf_x86_backend_data): Likewise.
759 (get_elf_x86_backend_data): Likewise.
760 (elf_x86_link_hash_table): Remove is_vxworks. Add plt0_pad_byte
762 (elf_x86_init_table): Remove normal_target and is_vxworks. Add
765 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
767 * elf32-i386.c (elf_i386_finish_dynamic_sections): Call
768 _bfd_x86_elf_finish_dynamic_sections.
769 * elf64-x86-64.c (elf_x86_64_finish_dynamic_sections): Likewise.
770 * elfxx-x86.c (_bfd_x86_elf_finish_dynamic_sections): New
772 * elfxx-x86.h (_bfd_x86_elf_finish_dynamic_sections): New
775 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
778 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
779 hide symbol which was forced to be dynamic.
781 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
784 * elf32-cris.c (cris_elf_relocate_section): Don't generate
785 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
786 (cris_elf_check_relocs): Don't allocate dynamic relocation
787 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
789 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
792 * elf32-sh.c (allocate_dynrelocs): Discard dynamic relocations
793 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
794 (sh_elf_relocate_section): Don't generate dynamic relocation if
795 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
797 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
800 * elf32-s390.c (allocate_dynrelocs): Discard dynamic
801 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
802 (elf_s390_relocate_section): Don't generate dynamic relocation
803 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
804 * elf64-s390.c (allocate_dynrelocs): Discard dynamic
805 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
806 (elf_s390_relocate_section): Don't generate dynamic relocation
807 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
809 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
812 * elf32-nios2.c (nios2_elf32_relocate_section): Don't generate
813 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
814 (allocate_dynrelocs): Discard dynamic relocations if
815 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
817 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
820 * elf32-microblaze.c (microblaze_elf_relocate_section): Don't
821 generate dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is
823 (allocate_dynrelocs): Discard dynamic relocations if
824 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
826 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
829 * elf32-m68k.c (elf_m68k_check_relocs): Don't allocate dynamic
830 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
831 (elf_m68k_adjust_dynamic_symbol): Don't make symbol dynamic if
832 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
833 (elf_m68k_relocate_section): Don't generate dynamic relocation
834 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
836 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
839 * elf32-hppa.c (ensure_undef_dynamic): Don't make undefined
840 symbol dynamic if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
841 (allocate_dynrelocs): Discard dynamic relocations if
842 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
843 (elf32_hppa_relocate_section): Don't generate dynamic
844 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
846 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
849 * elfnn-ia64.c (elfNN_ia64_check_relocs): Don't allocate
850 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
851 (allocate_fptr): Don't allocate function pointer if
852 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
853 (allocate_dynrel_entries): Don't allocate dynamic relocation
854 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
855 (set_got_entry): Don't set GOT entry if
856 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
857 (set_pltoff_entry): Don't set PLTOFF entry if
858 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
859 (elfNN_ia64_relocate_section): Don't install dynamic relocation
860 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
862 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
865 * elfxx-mips.c (mips_elf_calculate_relocation): Don't generate
866 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
867 (allocate_dynrelocs): Don't allocate dynamic relocations if
868 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
870 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
873 * elf32-arm.c (elf32_arm_final_link_relocate): Don't generate
874 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
875 (allocate_dynrelocs_for_symbol): Discard dynamic relocations
876 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
878 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
881 * elf32-tilepro.c (allocate_dynrelocs): Discard dynamic
882 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
883 (tilepro_elf_relocate_section): Don't generate dynamic
884 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
885 * elfxx-tilegx.c (allocate_dynrelocs): Discard dynamic
886 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
887 (tilegx_elf_relocate_section): Don't generate dynamic
888 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
890 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
893 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Don't
894 generate dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is
896 (elfNN_aarch64_allocate_dynrelocs): Discard dynamic relocations
897 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
899 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
901 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Moved to ...
902 * elf-bfd.h (UNDEFWEAK_NO_DYNAMIC_RELOC): Here.
903 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Removed.
905 2017-10-12 James Bowman <james.bowman@ftdichip.com>
907 * bfd-in2.h: Regenerate.
908 * libbfd.h: Regenerate.
909 * elf32-ft32.c: Add HOWTO R_FT32_15.
910 * reloc.c: Add BFD_RELOC_FT32_15.
912 2017-10-12 Nick Clifton <nickc@redhat.com>
914 * reloc.c (enum bfd_reloc_status): Start values at 2.
915 * bfd-in2.h: Regenerate.
916 * elfnn-aarch64.c (aarch64_relocate): Invert sense of function, so
917 that a TRUE return indicates success. Compare the result of
918 calling _bfd_aarch64_elf_put_addend against bfd_reloc_ok.
919 (build_one_stub): Change sense of tests against aarch64_relocate
921 (elfNN_aarch64_tls_relax): Return bfd_reloc_notsupported, rather
922 than FALSE, when an error is detected.
923 (elfNN_aarch64_final_link_relocate): Likewise.
925 2017-10-12 H.J. Lu <hongjiu.lu@intel.com>
927 * elf32-i386.c (elf_backend_hide_symbol): New.
928 * elf64-x86-64.c (elf_backend_hide_symbol): Likewise.
929 * elfxx-x86.c (_bfd_x86_elf_hide_symbol): Likewise.
930 * elfxx-x86.h (_bfd_x86_elf_hide_symbol): Likewise.
932 2017-10-12 Alan Modra <amodra@gmail.com>
934 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Call
935 elf_backend_hide_symbol, not _bfd_elf_link_hash_hide_symbol.
936 (bfd_elf_define_start_stop): Likewise.
938 2017-10-12 Alan Modra <amodra@gmail.com>
940 * elf32-nds32.c (nds32_elf_size_dynamic_sections): Set .interp
941 when executable rather than non-PIC.
942 * elf32-score.c (s3_bfd_score_elf_size_dynamic_sections): Likewise.
943 * elf32-score7.c (s7_bfd_score_elf_size_dynamic_sections): Likewise.
945 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
947 * elf-bfd.h (elf_backend_data): Add `linux_prpsinfo64_ugid16'
949 * elf-linux-core.h (elf_external_linux_prpsinfo64): Rename to...
950 (elf_external_linux_prpsinfo64_ugid32): ... this.
951 (swap_linux_prpsinfo32_out): Rename to...
952 (swap_linux_prpsinfo32_ugid32_out): ... this.
953 (elf_external_linux_prpsinfo64_ugid16): New structure.
954 (swap_linux_prpsinfo64_ugid16_out): New function.
955 * elfxx-target.h [!elf_backend_linux_prpsinfo64_ugid16]
956 (elf_backend_linux_prpsinfo64_ugid16): Define.
957 (elfNN_bed): Initialize `linux_prpsinfo64_ugid16' member.
958 * elf.c (elfcore_write_linux_prpsinfo64): Handle both variants
959 of the 64-bit Linux core PRPSINFO note.
960 * elf64-sh64.c (elf_backend_linux_prpsinfo64_ugid16): Define.
962 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
964 * elf-bfd.h (elf_backend_data): Add `linux_prpsinfo32_ugid16'
966 (elfcore_write_ppc_linux_prpsinfo32): Remove prototype.
967 * elf32-ppc.c (elfcore_write_ppc_linux_prpsinfo32): Remove.
968 (elf_external_ppc_linux_prpsinfo32)
969 (swap_ppc_linux_prpsinfo32_out): Move to...
970 * elf-linux-core.h (elf_external_linux_prpsinfo32_ugid32)
971 (swap_linux_prpsinfo32_ugid32_out): ... these.
972 (elf_external_linux_prpsinfo32): Rename to...
973 (elf_external_linux_prpsinfo32_ugid16): ... this.
974 (swap_linux_prpsinfo32_out): Rename to...
975 (swap_linux_prpsinfo32_ugid16_out): ... this.
976 * elfxx-target.h [!elf_backend_linux_prpsinfo32_ugid16]
977 (elf_backend_linux_prpsinfo32_ugid16): Define.
978 (elfNN_bed): Initialize `linux_prpsinfo32_ugid16' member.
979 * elf.c (elfcore_write_linux_prpsinfo32): Handle both variants
980 of the 32-bit Linux core PRPSINFO note.
981 * elf32-am33lin.c (elf_backend_linux_prpsinfo32_ugid16): Define.
982 * elf32-arm.c (elf_backend_linux_prpsinfo32_ugid16): Define.
983 * elf32-cris.c (elf_backend_linux_prpsinfo32_ugid16): Define.
984 * elf32-frv.c (elf_backend_linux_prpsinfo32_ugid16): Define.
985 * elf32-i386.c (elf_backend_linux_prpsinfo32_ugid16): Define.
986 * elf32-m32r.c (elf_backend_linux_prpsinfo32_ugid16): Define.
987 * elf32-m68k.c (elf_backend_linux_prpsinfo32_ugid16): Define.
988 * elf32-s390.c (elf_backend_linux_prpsinfo32_ugid16): Define.
989 * elf32-sh.c (elf_backend_linux_prpsinfo32_ugid16): Define.
990 * elf32-sparc.c (elf_backend_linux_prpsinfo32_ugid16): Define.
992 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
994 * elf-linux-core.h (elf_external_linux_prpsinfo64): Move the
995 `gap' member ahead of `pr_flag'.
997 2017-10-11 Pedro Alves <palves@redhat.com>
999 * bfd.c (_doprnt): Rename to ...
1000 (_bfd_doprnt): ... this.
1001 (error_handler_internal): Adjust.
1003 2017-10-10 H.J. Lu <hongjiu.lu@intel.com>
1005 * elf32-i386.c (elf_i386_check_relocs): Set GOT refcount to 1
1006 instead of incrementing it.
1007 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1009 2017-10-10 Renlin Li <renlin.li@arm.com>
1012 * elf32-arm.c (allocate_dynrelocs_for_symbol): Only make undefined weak
1013 symbols into dynamic.
1015 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
1018 * elfnn-riscv.c (riscv_elf_link_hash_table): Add max_alignment.
1019 (riscv_elf_link_hash_table_create): Initialize max_alignment to
1021 (_bfd_riscv_relax_section): Cache the max alignment of output
1022 sections if possible.
1024 2017-10-10 Alan Modra <amodra@gmail.com>
1026 * elf64-ppc.c (ppc64_elf_before_check_relocs): Set sec_type for
1027 .opd whenever .opd is present and non-zero size. Move code
1028 setting abiversion to/from output file earlier. Only set
1029 u.opd.func_sec when --gc-sections. Read relocs and set up
1030 u.opd.func_sec values here..
1031 (ppc64_elf_check_relocs): ..rather than here. Simplify opd
1033 (ppc64_elf_edit_opd): Don't set sec_type for .opd here.
1035 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
1037 * elf-m10300.c (mn10300_elf_check_relocs): Don't free cached
1040 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
1042 * elf32-bfin.c (bfin_size_dynamic_sections): Don't create the
1043 .interp section with "ld --no-dynamic-linker".
1045 2017-10-09 Alan Modra <amodra@gmail.com>
1048 * dwarf2.c (_bfd_dwarf2_cleanup_debug_info): Free
1049 funcinfo_hash_table and varinfo_hash_table.
1051 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
1053 * elf32-sh.c (readonly_dynrelocs): Dump dynamic relocation
1054 in read-only section with minfo.
1055 (sh_elf_size_dynamic_sections): Likewise.
1057 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
1059 * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Remove
1062 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
1064 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_sections): Set
1065 this_hdr.sh_entsize only if section size > 0.
1067 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
1069 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Reformat.
1071 2017-10-07 H.J. Lu <hongjiu.lu@intel.com>
1073 * elfxx-sparc.c (readonly_dynrelocs): Dump dynamic relocation
1074 in read-only section with minfo.
1075 (_bfd_sparc_elf_size_dynamic_sections): Likewise.
1077 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1079 * elfxx-x86.h (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Update
1082 2017-10-06 John Baldwin <jhb@FreeBSD.org>
1084 * elf-bfd.h (struct elf_backend_data): Add
1085 `elf_backend_grok_freebsd_prstatus'.
1086 * elf.c (elfcore_grok_freebsd_note): Call
1087 `elf_backend_grok_freebsd_prstatus' to handle NT_PRSTATUS if
1089 * elfn32-mips.c (elf_n32_mips_grok_freebsd_prstatus): New
1091 (elf_backend_grok_freebsd_prstatus): Define.
1092 * elfxx-target.h (elf_backend_grok_freebsd_prstatus): Define.
1093 (elfNN_bed): Initialize `elf_backend_grok_freebsd_prstatus'.
1095 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1097 * elf32-i386.c (elf_i386_check_relocs): Replace has_got_reloc
1098 and has_non_got_reloc with zero_undefweak.
1099 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1100 * elfxx-x86.c (_bfd_x86_elf_link_hash_newfunc): Initialize
1101 zero_undefweak to 1.
1102 (_bfd_x86_elf_copy_indirect_symbol): Replace has_got_reloc and
1103 has_non_got_reloc with zero_undefweak.
1104 * elfxx-x86.h (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace
1105 has_got_reloc and has_non_got_reloc with zero_undefweak.
1106 (elf_x86_link_hash_entry): Likewise.
1108 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1110 * elfxx-x86.h (COPY_INPUT_RELOC_P): Add "do/while(0);".
1111 (VERIFY_COPY_RELOC): Likewise.
1113 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1115 * elfxx-x86.h (VERIFY_COPY_RELOC): New.
1116 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Use it.
1117 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
1119 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1121 * elfxx-x86.h (VERIFY_PLT_ENTRY): New.
1122 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Use it.
1123 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
1125 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1127 * elfxx-x86.h (COPY_INPUT_RELOC_P): New.
1128 * elf32-i386.c (elf_i386_relocate_section): Use it.
1129 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1131 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1133 * elf32-i386.c (X86_SIZE_TYPE_P): New.
1134 (elf_i386_relocate_section): Use GENERATE_DYNAMIC_RELOCATION_P.
1135 * elf64-x86-64.c (X86_SIZE_TYPE_P): New.
1136 (elf_x86_64_relocate_section): Use GENERATE_DYNAMIC_RELOCATION_P.
1137 * elfxx-x86.h (GENERATE_DYNAMIC_RELOCATION_P): New.
1139 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1141 * elfxx-x86.h (POINTER_LOCAL_IFUNC_P): New.
1142 (PLT_LOCAL_IFUNC_P): Likewise.
1143 * elf32-i386.c (elf_i386_relocate_section): Use them.
1144 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1146 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1148 * elfxx-x86.h (GENERATE_RELATIVE_RELOC_P): New.
1149 * elf32-i386.c (elf_i386_relocate_section): Use it.
1150 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1152 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1154 * elfxx-x86.h (RESOLVED_LOCALLY_P): New.
1155 * elf32-i386.c (elf_i386_relocate_section): Use it.
1156 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1158 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1160 * elf32-i386.c (X86_PCREL_TYPE_P): New.
1161 (elf_i386_check_relocs): Use NEED_DYNAMIC_RELOCATION_P.
1162 * elf64-x86-64.c (IS_X86_64_PCREL_TYPE): Renamed to ...
1163 (X86_PCREL_TYPE_P): This.
1164 (elf_x86_64_check_relocs): Use NEED_DYNAMIC_RELOCATION_P.
1165 Replace IS_X86_64_PCREL_TYPE with X86_PCREL_TYPE_P.
1166 (elf_x86_64_relocate_section): Replace IS_X86_64_PCREL_TYPE with
1168 * elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): New.
1170 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1172 * elfxx-x86.h (TLS_TRANSITION_IE_TO_LE_P): New.
1173 * elf32-i386.c (elf_i386_tls_transition): Use it.
1174 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
1176 2017-10-05 H.J. Lu <hongjiu.lu@intel.com>
1178 * elf32-ppc.c (readonly_dynrelocs): Add a link_info argument.
1179 Dump dynamic relocation in read-only section with minfo if
1181 (ppc_elf_adjust_dynamic_symbol): Pass NULL to readonly_dynrelocs.
1182 (maybe_set_textrel): Likewise.
1183 (ppc_elf_size_dynamic_sections): Dump dynamic relocation in
1184 read-only section with minfo.
1186 2017-10-05 John Baldwin <jhb@FreeBSD.org>
1188 * elf.c (elfcore_grok_freebsd_note): Handle NT_ARM_VFP.
1190 2017-10-05 H.J. Lu <hongjiu.lu@intel.com>
1192 * elf32-tilepro.c (readonly_dynrelocs): Dump dynamic relocation
1193 in read-only section with minfo.
1194 (tilepro_elf_size_dynamic_sections): Likewise.
1195 * elfxx-tilegx.c (readonly_dynrelocs): Likewise.
1196 (tilegx_elf_size_dynamic_sections): Likewise.
1198 2017-10-05 Pedro Alves <palves@redhat.com>
1201 * bfd.c (bfd_set_error): Revert 2017-10-04 change. Remove
1202 ellipsis parameter. Split out bfd_error_on_input code to..
1203 (bfd_set_input_error): .. New function.
1204 * archive.c (_bfd_write_archive_contents): Use bfd_set_input_error.
1205 * vms-lib.c (_bfd_vms_lib_write_archive_contents): Likewise.
1206 * bfd-in2.h: Regenerate.
1208 2017-10-05 Alan Modra <amodra@gmail.com>
1210 * elflink.c (elf_link_input_bfd): Correct ctor/dtor in init_array/
1211 fini_array error value.
1213 2017-10-05 Alan Modra <amodra@gmail.com>
1216 * elf.c (_bfd_elf_setup_sections): Don't trim reloc sections from
1218 (_bfd_elf_init_reloc_shdr): Pass sec_hdr, use it to copy SHF_GROUP
1220 (elf_fake_sections): Adjust calls. Exit immediately on failure.
1221 (bfd_elf_set_group_contents): Add associated reloc section indices
1224 2017-10-04 Alan Modra <amodra@gmail.com>
1226 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't sort or
1227 classify symbols for ELFv2.
1229 2017-10-04 Pavel I. Kryukov <kryukov@frtk.ru>
1232 * bfd.c (bfd_set_error): Avoid UB on passing arg to va_start that
1233 undergoes default promotion.
1234 * bfd-in2.h: Regenerate.
1236 2017-10-02 Alan Modra <amodra@gmail.com>
1238 * elf32-ppc.c (ppc_elf_relocate_section): Fix comment typo.
1239 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1241 2017-10-01 Alan Modra <amodra@gmail.com>
1244 * dwarf2.c (new_line_sorts_after): Remove end_sequence comparison.
1245 (add_line_info): Always put end_sequence last.
1247 2017-10-01 Alan Modra <amodra@gmail.com>
1250 * dwarf2.c (read_section): Allocate buffer with extra byte for
1251 bfd_simple_get_relocated_section_contents rather than copying
1254 2017-09-29 Alan Modra <amodra@gmail.com>
1256 * merge.c (merge_strings): Return FALSE on malloc failure.
1257 (_bfd_merge_sections): Return failures from record_section and
1260 2017-09-28 Alan Modra <amodra@gmail.com>
1263 * elflink.c (_bfd_elf_merge_symbol): Set non_ir_ref_dynamic in
1264 a case where plugin_notice isn't called.
1266 2017-09-27 Kuan-Lin Chen <kuanlinchentw@gmail.com>
1268 * elf32-nds32.c (nds32_elf_relax_section): Fix a tautological
1271 2017-09-26 H.J. Lu <hongjiu.lu@intel.com>
1274 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't pass
1275 output_bfd to info->callbacks->minfo.
1277 2017-09-26 Nick Clifton <nickc@redhat.com>
1280 * elf64-x86-64.c (elf_x86_64_info_to_howto): Do not trigger an
1281 assertion failure if elf_x86_64_rtype_to_howto has already issued
1284 2017-09-26 Alan Modra <amodra@gmail.com>
1287 * dwarf2.c (read_formatted_entries): Use read_attribute_value to
1290 2017-09-26 Nick Clifton <nickc@redhat.com>
1293 * dwarf2.c (read_formatted_entries): Fail early if we know that
1294 the loop parsing data entries will overflow the end of the
1297 2017-09-26 Alan Modra <amodra@gmail.com>
1300 * dwarf2.c (struct comp_unit): Delete sec_info_ptr field.
1301 (find_abstract_instance_name): Calculate DW_FORM_ref_addr relative
1302 to stash->info_ptr_memory, and check die_ref is within that memory.
1303 Set info_ptr_end correctly when another CU is refd. Check die_ref
1304 for DW_FORM_ref4 etc. is within CU.
1306 2017-09-26 Alan Modra <amodra@gmail.com>
1309 * dwarf2.c (concat_filename): Return "<unknown>" on NULL filename.
1310 (read_formatted_entries): Init "fe".
1311 (decode_line_info <DW_LNE_define_file>): Use line_info_add_file_name.
1313 2017-09-26 Alan Modra <amodra@gmail.com>
1316 * dwarf2.c (decode_line_info): Ensure line_ptr stays within
1317 bounds in inner loop.
1319 2017-09-25 Alan Modra <amodra@gmail.com>
1322 * dwarf1.c (parse_die): Sanity check pointer against section limit
1323 before dereferencing.
1324 (parse_line_table): Likewise.
1326 2017-09-25 Alan Modra <amodra@gmail.com>
1329 * dwarf2.c (scan_unit_for_symbols): Ignore DW_AT_name unless it
1331 (parse_comp_unit): Likewise.
1333 2017-09-25 Alan Modra <amodra@gmail.com>
1336 * dwarf2.c (read_formatted_entries): Error on format_count zero.
1338 2017-09-24 Alan Modra <amodra@gmail.com>
1341 * opncls.c (bfd_get_debug_link_info_1): Properly check that crc is
1342 within section bounds.
1344 2017-09-24 Alan Modra <amodra@gmail.com>
1347 * dwarf2.c (decode_line_info): Properly free line sequences on error.
1349 2017-09-24 Alan Modra <amodra@gmail.com>
1352 * dwarf2.c (find_abstract_instance_name): Add orig_info_ptr and
1353 pname param. Return status. Make name const. Don't abort,
1354 return an error. Formatting. Exit if current info_ptr matches
1355 orig_info_ptr. Update callers.
1356 (scan_unit_for_symbols): Start at nesting_level of zero. Make
1357 nested_funcs an array of structs for extensibility. Formatting.
1359 2017-09-24 Alan Modra <amodra@gmail.com>
1362 * dwarf2.c (decode_line_info): Fail on lh.line_range of zero
1363 rather than dividing by zero.
1365 2017-09-24 Alan Modra <amodra@gmail.com>
1368 * dwarf2.c (decode_line_info): Correct .debug_line unit_length check.
1370 2017-09-24 Alan Modra <amodra@gmail.com>
1373 * dwarf2.c (scan_unit_for_symbols): Check u.blk->data is non-NULL.
1375 2017-09-24 Alan Modra <amodra@gmail.com>
1378 * elf.c (_bfd_elf_slurp_version_tables): Test sh_info on
1379 SHT_GNU_verneed section for sanity. Don't zalloc memory for
1382 2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
1385 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Guard against
1388 2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
1391 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Also return
1392 -1 if bfd_canonicalize_dynamic_reloc returns 0.
1394 2017-09-22 Pedro Alves <palves@redhat.com>
1395 Alan Modra <amodra@gmail.com>
1397 * version.h: Add comment.
1399 2017-09-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1401 * elf.c (elfcore_grok_note): For the cases NT_S390_GS_CB and
1402 NT_S390_GS_BC, correct the previously swapped invocations of
1403 elfcore_grok_s390_gs_bc and elfcore_grok_s390_gs_cb.
1405 2017-09-19 Alan Modra <amodra@gmail.com>
1408 * elf64-ppc.c (ppc64_elf_build_stubs): Don't check glink_eh_frame
1411 2017-09-19 Alan Modra <amodra@gmail.com>
1414 * elflink.c (bfd_elf_size_dynamic_sections): Garbage collect
1415 symbols before calculating verrefs. Don't renumber dynsyms
1416 after gc. Exclude .gnu.version when zero or one dynsym.
1417 Localize some vars and reindent.
1419 2017-09-18 H.J. Lu <hongjiu.lu@intel.com>
1422 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Check error
1423 return from bfd_canonicalize_dynamic_reloc.
1425 2017-09-15 Alan Modra <amodra@gmail.com>
1428 * archive.c (bfd_ar_hdr_from_filesystem): Detect when status.st_size
1429 overflows bfd_size_type.
1431 2017-09-14 H.J. Lu <hongjiu.lu@intel.com>
1434 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument
1435 to indicate if conversion is performed.
1436 (elf_i386_check_relocs): Cache section contents and relocations
1437 if conversion is performed.
1438 * elf64-x86-64.c (elf_x86_64_check_relocs): Cache section
1439 contents and relocations if conversion is performed.
1441 2017-09-14 Nick Clifton <nickc@redhat.com>
1444 * peXXigen.c (pe_print_idata): Extend check for HintName vector
1447 2017-09-13 H.J. Lu <hongjiu.lu@intel.com>
1449 * elfxx-x86.h: Fix a typo in comments.
1451 2017-09-09 Kamil Rytarowski <n54@gmx.com>
1453 * elf32-nds32.c: Rename __BIT() to N32_BIT().
1455 2017-09-09 Alan Modra <amodra@gmail.com>
1457 * elf64-ppp.c (plt_stub_pad): Handle positive and negative
1460 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
1462 * elf32-i386.c (elf_i386_relocate_section): Update usage of
1463 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
1464 (elf_i386_finish_dynamic_symbol): Likewise.
1465 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1466 (elf_x86_64_finish_dynamic_symbol): Likewise.
1467 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Likewise.
1468 (_bfd_x86_elf_fixup_symbol): Likewise.
1470 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
1472 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
1473 check has_non_got_reloc.
1475 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
1478 * elf32-i386.c (elf_i386_convert_load_reloc): Check linker_def.
1479 Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
1480 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Check
1481 linker_def. Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
1482 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Set local_ref
1483 and linker_def on __ehdr_start if it is referenced and not
1485 (_bfd_x86_elf_link_symbol_references_local): Also set local_ref
1486 and return TRUE when building executable, if a symbol has
1487 non-GOT/non-PLT relocations in text section or there is no
1489 * elfxx-x86.h (elf_x86_link_hash_entry): Add linker_def.
1491 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
1493 * elfxx-x86.h: Update comments.
1495 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
1497 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Replace
1498 elf_x86_plt_layout_table with elf_x86_init_table.
1499 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
1501 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties):
1503 * elfxx-x86.h (elf_x86_plt_layout_table): Renamed to ...
1504 (elf_x86_init_table): This.
1505 (_bfd_x86_elf_link_setup_gnu_properties): Replace
1506 elf_x86_plt_layout_table with elf_x86_init_table.
1508 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
1510 * configure.ac (bfd_backends): Don't add elf64-x86-64.lo nor
1511 elf64.lo together with elfxx-x86.lo for 64-bit BFD.
1512 * configure: Regenerated.
1513 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set r_info
1514 and r_sym fields of plt_layout.
1515 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
1517 * elfxx-x86.c (elf_x86_64_is_reloc_section): Remove BFD64 check.
1518 (_bfd_x86_elf_link_hash_table_create): Likewise. Don't set
1519 r_info nor r_sym fields.
1520 (_bfd_x86_elf_link_setup_gnu_properties): Set r_info and r_sym
1522 * elfxx-x86.h (elf_x86_plt_layout_table): Add r_info and r_sym.
1524 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
1526 * (_bfd_riscv_relax_align): Call bfd_set_error and
1527 print an error message when unable to relax a .align directive.
1529 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
1531 * elfnn-riscv.c (riscv_zero_pcrel_hi_reloc): New function.
1532 (riscv_record_pcrel_hi_reloc): Add absolute argument.
1533 (riscv_elf_relocate_section): Call riscv_zero_pcrel_hi_reloc for
1534 R_RISCV_PCREL_HI20 relocs, and pass the result to
1535 riscv_record_pcrel_hi_reloc.
1537 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
1539 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument,
1540 r_type_p. Remove the converted argument. Replace
1541 SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P. Return
1542 the new relocation type via r_type_p.
1543 (elf_i386_relocate_section): Likewise.
1544 (elf_i386_finish_dynamic_symbol): Likewise.
1545 (need_convert_load): Removed.
1546 (check_relocs_failed): Updated.
1547 (elf_i386_check_relocs): Call elf_i386_convert_load_reloc,
1548 instead of setting need_convert_load.
1549 (_bfd_i386_elf_convert_load): Removed.
1550 * elf64-x86-64.c (need_convert_load): Removed.
1551 (check_relocs_failed): Updated.
1552 (elf_x86_64_convert_load_reloc): Add an argument, r_type_p.
1553 Replace SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P.
1554 Return the new relocation type via r_type_p.
1555 (elf_x86_64_check_relocs): Call elf_x86_64_convert_load_reloc,
1556 instead of setting need_convert_load.
1557 (elf_x86_64_check_relocs): Don't check PIC if relocation has
1559 (_bfd_x86_64_elf_convert_load): Removed.
1560 (elf_x86_64_relocate_section): Replace SYMBOL_REFERENCES_LOCAL
1561 with SYMBOL_REFERENCES_LOCAL_P.
1562 (elf_x86_64_finish_dynamic_symbol): Likewise.
1563 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Don't
1565 (_bfd_x86_elf_size_dynamic_sections): Don't call convert_load.
1566 (_bfd_x86_elf_link_symbol_references_local): New function.
1567 * elfxx-x86.h (SYMBOL_REFERENCES_LOCAL_P): New.
1568 (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace elf.forced_local with
1569 SYMBOL_REFERENCES_LOCAL_P.
1570 (elf_x86_link_hash_entry): Add local_ref.
1571 (elf_x86_link_hash_table): Remove convert_load.
1572 (_bfd_i386_elf_convert_load): Removed.
1573 (_bfd_x86_64_elf_convert_load): Likewise.
1574 (_bfd_x86_elf_link_symbol_references_local): New.
1576 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
1578 * elf64-x86-64.c (R_X86_64_converted_reloc_bit): New.
1579 (elf_x86_64_info_to_howto): Get the real relocation type by
1580 masking out R_X86_64_converted_reloc_bit.
1581 (elf_x86_64_check_tls_transition): Get the real relocation type
1582 by masking out R_X86_64_converted_reloc_bit.
1583 (elf_x86_64_convert_load_reloc): Set R_X86_64_converted_reloc_bit
1584 instead of setting converted_reloc.
1585 (elf_x86_64_relocate_section): Check R_X86_64_converted_reloc_bit
1586 instead of converted_reloc. Get the real relocation type by
1587 masking out R_X86_64_converted_reloc_bit.
1588 (elf_x86_64_link_setup_gnu_properties): Verify that the value of
1589 R_X86_64_converted_reloc_bit is valid.
1590 * elfxx-x86.h (converted_reloc): Removed.
1592 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
1594 * elf32-i386.c (elf_i386_relocate_section): Don't change r_type
1595 when calling elf_i386_tls_transition. Don't use ELF32_R_TYPE
1596 to get the relocation type again.
1597 * elf64-x86-64.c (elf_x86_64_relocate_section): Don't change
1598 r_type when calling elf_x86_64_tls_transition. Don't use
1599 ELF32_R_TYPE to get the relocation type again.
1601 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
1603 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Properly set
1606 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
1608 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Remove the sec
1609 argument. Don't check relocation overflow. Avoid relocation
1610 overflow if --no-relax is used. Set converted_reloc on symbol
1611 if a GOTPCREL relocation is converted.
1612 (elf_x86_64_relocate_section): Issue a fatal error and suggest
1613 --no-relax if GOTPCREL relocation conversion leads to relocation
1615 * elfxx-x86.h (elf_x86_link_hash_entry): Add converted_reloc.
1617 2017-09-05 Alexander Fedotov <alexander.fedotov@nxp.com>
1618 Edmar Wienskoski <edmar.wienskoski@nxp.com
1620 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_VLE_ADDR20.
1621 (ppc_elf_check_relocs): Handle it.
1622 (ppc_elf_vle_split20): New function.
1623 (ppc_elf_relocate_section): Handle R_PPC_VLE_ADDR20.
1625 2017-09-03 H.J. Lu <hongjiu.lu@intel.com>
1628 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Set tlsdesc_plt
1629 for x86-64 if GOT_TLS_GDESC_P is true.
1631 2017-09-03 Alan Modra <amodra@gmail.com>
1634 * elfxx-x86.h (elf_x86_hash_table): Check is_elf_hash_table first.
1636 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1638 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1639 tls_get_addr for x86-64 in one place.
1641 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1643 * configure.ac (bfd_backends): Add elf64-x86-64.lo together
1644 with elfxx-x86.lo for 64-bit BFD.
1645 * configure: Regenerated.
1647 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1649 * elf32-i386.c (elf_i386_convert_load): Renamed to ...
1650 (_bfd_i386_elf_convert_load): This. Remove static.
1651 (elf_i386_size_dynamic_sections): Removed.
1652 (elf_backend_size_dynamic_sections): Likewise.
1653 * elf64-x86-64.c (elf_x86_64_convert_load): Renamed to ...
1654 (_bfd_x86_64_elf_convert_load): This. Remove static.
1655 (elf_x86_64_size_dynamic_sections): Removed.
1656 (elf_backend_size_dynamic_sections): Likewise.
1657 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): Renamed to ...
1658 (elf_x86_allocate_dynrelocs): This. Make it static.
1659 (_bfd_x86_elf_allocate_local_dynrelocs): Renamed to ...
1660 (elf_x86_allocate_local_dynreloc): This. Make it static.
1661 (elf_i386_is_reloc_section): New function.
1662 (elf_x86_64_is_reloc_section): Likewise.
1663 (_bfd_x86_elf_link_hash_table_create): Initialize convert_load,
1664 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
1665 Rearrange got_entry_size initialization.
1666 (_bfd_x86_elf_size_dynamic_sections): New function.
1667 * elfxx-x86.h (elf_x86_link_hash_table): Add convert_load,
1668 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
1669 (_bfd_i386_elf_convert_load): New.
1670 (_bfd_x86_64_elf_convert_load): Likewise.
1671 (_bfd_x86_elf_size_dynamic_sections): Likewise.
1672 (elf_backend_size_dynamic_sections): Likewise.
1673 (_bfd_x86_elf_allocate_dynrelocs): Removed.
1674 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
1676 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1678 * elfxx-x86.h (elf_x86_link_hash_table): Rearrange fields and
1681 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1683 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
1684 sgotplt_jump_table_size with elf_x86_compute_jump_table_size.
1686 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1688 * elf32-i386.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
1689 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Moved to ...
1690 * elfxx-x86.h (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
1691 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Here.
1692 * elf64-x86-64.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
1693 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Removed.
1695 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1697 * elf32-i386.c (elf_i386_allocate_dynrelocs): Removed.
1698 (elf_i386_allocate_local_dynrelocs): Likewise.
1699 (elf_i386_size_dynamic_sections): Replace
1700 elf_i386_allocate_dynrelocs/elf_i386_allocate_local_dynrelocs
1701 with _bfd_x86_elf_allocate_dynrelocs and
1702 _bfd_x86_elf_allocate_local_dynrelocs.
1703 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Removed.
1704 (elf_x86_64_allocate_local_dynrelocs): Likewise.
1705 (elf_x86_64_size_dynamic_sections): Replace
1706 elf_x86_64_allocate_dynrelocs/elf_x86_64_allocate_local_dynrelocs
1707 with _bfd_x86_elf_allocate_dynrelocs and
1708 _bfd_x86_elf_allocate_local_dynrelocs.
1709 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): New function.
1710 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
1711 * elfxx-x86.h (_bfd_x86_elf_allocate_dynrelocs): New prototype.
1712 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
1714 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1716 * elf32-i386.c (is_i386_elf): Removed.
1717 (elf_i386_check_relocs): Replace is_i386_elf with is_x86_elf.
1718 (elf_i386_size_dynamic_sections): Likewise.
1719 (elf_i386_relocate_section): Likewise.
1720 * elf64-x86-64.c (is_x86_64_elf): Removed.
1721 (elf_x86_64_check_relocs): Replace is_x86_64_elf with
1723 (elf_x86_64_size_dynamic_sections): Likewise.
1724 (elf_x86_64_relocate_section): Likewise.
1725 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1727 * elfxx-x86.h (elf_x86_link_hash_table): Add target_id.
1730 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1732 * elf32-i386.c (elf_i386_compute_jump_table_size): Removed.
1733 (elf_i386_allocate_dynrelocs): Replace
1734 elf_i386_compute_jump_table_size with
1735 elf_x86_compute_jump_table_size.
1736 (elf_i386_size_dynamic_sections): Likewise.
1737 * elf64-x86-64.c (elf_x86_64_compute_jump_table_size): Removed.
1738 (elf_x86_64_allocate_dynrelocs): Replace
1739 elf_x86_64_compute_jump_table_size with
1740 elf_x86_compute_jump_table_size.
1741 (elf_x86_64_size_dynamic_sections): Likewise.
1742 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1744 * elfxx-x86.h (elf_x86_link_hash_table): Add got_entry_size.
1745 (elf_x86_compute_jump_table_size): New.
1747 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1749 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1751 (_bfd_x86_elf_adjust_dynamic_symbol): Use sizeof_reloc.
1752 * elfxx-x86.h (elf_x86_link_hash_table): Add sizeof_reloc.
1754 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1756 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check VxWorks
1757 with htab->is_vxworks.
1758 (elf_i386_size_dynamic_sections): Likewise.
1759 (elf_i386_relocate_section): Likewise.
1760 (elf_i386_finish_dynamic_symbol): Likewise.
1761 (elf_i386_finish_dynamic_sections): Likewise.
1763 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1765 * elf32-i386.c (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
1766 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
1767 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Moved to ...
1768 * elfxx-x86.h (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
1769 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
1770 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Here.
1771 * elf64-x86-64.c (GOT_TLS_IE, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
1772 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Removed.
1774 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1777 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Check
1778 ELF_COMMON_DEF_P for common symbols.
1780 2017-09-02 Alan Modra <amodra@gmail.com>
1782 * elf-eh-frame.c (offset_adjust): Avoid false positive gcc warning.
1783 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Likewise.
1784 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
1786 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1788 * elf32-i386.c (elf_i386_gc_mark_hook): Removed.
1789 (elf_backend_gc_mark_hook): Likewise.
1790 * elf64-x86-64.c (elf_x86_64_gc_mark_hook): Likewise.
1791 (elf_backend_gc_mark_hook): Likewise.
1792 * elfxx-x86.c (_bfd_x86_elf_gc_mark_hook): New function.
1793 * elfxx-x86.h (_bfd_x86_elf_gc_mark_hook): New.
1794 (elf_backend_gc_mark_hook): Likewise.
1796 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1798 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Removed.
1799 (elf_backend_adjust_dynamic_symbol): Likewise.
1800 * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.
1801 (elf_backend_adjust_dynamic_symbol): Likewise.
1802 * elfxx-x86.c (_bfd_x86_elf_adjust_dynamic_symbol): New function.
1803 (_bfd_x86_elf_link_setup_gnu_properties): Copy is_vxworks.
1804 * elfxx-x86.h (elf_x86_link_hash_table): Add is_vxworks.
1805 (_bfd_x86_elf_adjust_dynamic_symbol): New.
1806 (elf_backend_adjust_dynamic_symbol): Likewise.
1808 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1810 * elfxx-x86.h (elf_x86_plt_layout_table): Fix a typo in
1813 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1815 * elf32-i386.c (elf_i386_mkobject): Removed.
1816 (bfd_elf32_mkobject): Likewise.
1817 * elf64-x86-64.c (elf_x86_64_mkobject): Likewise.
1818 (bfd_elf64_mkobject): Likewise.
1819 (bfd_elf32_mkobject): Likewise.
1820 * elfxx-x86.c (_bfd_x86_elf_mkobject): New function.
1821 * elfxx-x86.h (_bfd_x86_elf_mkobject): New.
1822 (bfd_elf64_mkobject): Likewise.
1823 (bfd_elf32_mkobject): Likewise.
1825 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1827 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Updated.
1828 Call _bfd_x86_elf_link_setup_gnu_properties.
1829 * elf64-x86-64.c (elf_x86_lazy_plt_layout): Initialize
1830 pic_plt0_entry and pic_plt_entry fields with the non-PIC PLT
1832 (elf_x86_64_non_lazy_plt): Likewise.
1833 (elf_x86_64_lazy_bnd_plt): Likewise.
1834 (elf_x86_64_non_lazy_bnd_plt): Likewise.
1835 (elf_x86_64_lazy_ibt_plt): Likewise.
1836 (elf_x32_lazy_ibt_plt): Likewise.
1837 (elf_x86_64_non_lazy_ibt_plt): Likewise.
1838 (elf_x32_non_lazy_ibt_plt): Likewise.
1839 (elf_x86_64_nacl_plt): Likewise.
1840 (elf_x86_64_link_setup_gnu_properties): Updated. Call
1841 _bfd_x86_elf_link_setup_gnu_properties.
1842 * elfxx-x86.c: Include elf-vxworks.h".
1843 (_bfd_x86_elf_link_setup_gnu_properties): New function.
1844 * elfxx-x86.h (elf_x86_lazy_plt_layout): Remove "for i386 only"
1845 comments for pic_plt0_entry and pic_plt_entry.
1846 (elf_x86_non_lazy_plt_layout): Likewise.
1847 (elf_x86_plt_layout_table): New.
1848 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
1850 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1853 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Create
1854 .eh_frame section for the second PLT.
1855 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Correct
1856 alignment of .eh_frame section for the second PLT.
1858 2017-09-01 Nick Clifton <nickc@redhat.com>
1861 * dwarf2.c (decode_line_info): Fix test for an overlong line info
1864 2017-09-01 Nick Clifton <nickc@redhat.com>
1867 * elf-attrs.c (_bfd_elf_parse_attributes): Ensure that the
1868 attribute buffer is NUL terminated.
1870 2017-08-31 Nick Clifton <nickc@redhat.com>
1873 * dwarf2.c (read_section): If necessary add a terminating NUL byte
1874 to dwarf string sections.
1876 2017-08-31 Alan Modra <amodra@gmail.com>
1878 * po/SRC-POTFILES.in: Regenerate.
1880 2017-08-31 Alan Modra <amodra@gmail.com>
1882 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Don't exit early
1883 for a section containing just a terminator. Allow multiple
1884 terminators at end of section.
1885 * elflink.c (bfd_elf_discard_info): Iterate over .eh_frame
1886 sections when not adding alignment. Assert on terminator in
1889 2017-08-31 Alan Modra <amodra@gmail.com>
1893 * elflink.c (bfd_elf_discard_info): Don't pad embedded zero
1896 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1898 * configure.ac (bfd_backends): Add elf64.lo together with
1899 elfxx-x86.lo for 64-bit BFD.
1900 * configure: Regenerated.
1902 2017-08-31 James Bowman <james.bowman@ftdichip.com>
1904 * elf32-ft32.c (ft32_elf_howto_table): Use complain_overflow_dont
1907 2017-08-31 Alan Modra <amodra@gmail.com>
1910 * opncls.c (bfd_close_all_done): Don't call bfd_cache_close
1911 before _close_and_cleanup. Call iovec->bclose after.
1912 (bfd_close): Remove code common to, and call, bfd_close_all_done.
1914 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1916 * elf32-i386.c (elf_i386_plt_type): Removed.
1917 (elf_i386_plt): Likewise.
1918 (elf_i386_get_synthetic_symtab): Updated. Call
1919 _bfd_x86_elf_get_synthetic_symtab.
1920 * elf64-x86-64.c (elf_x86_64_plt_type): Removed.
1921 (elf_x86_64_plt): Likewise.
1922 (elf_x86_64_get_synthetic_symtab): Updated. Call
1923 _bfd_x86_elf_get_synthetic_symtab.
1924 * elfxx-x86.c (elf_i386_get_plt_got_vma): New function.
1925 (elf_x86_64_get_plt_got_vma): Likewise.
1926 (elf_i386_valid_plt_reloc_p): Likewise.
1927 (elf_x86_64_valid_plt_reloc_p): Likewise.
1928 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
1929 * elfxx-x86.h (elf_x86_plt_type): New.
1930 (elf_x86_plt): Likewise.
1931 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
1933 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1935 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Check
1936 target_id instead of elf_machine_code.
1938 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1940 * elf32-i386.c (ELF_DYNAMIC_INTERPRETER): Removed.
1941 (elf_i386_lazy_plt_layout): Likewise.
1942 (elf_i386_non_lazy_plt_layout): Likewise.
1943 (elf_i386_plt_layout): Likewise.
1944 (elf_i386_link_hash_table): Likewise.
1945 (elf_i386_next_tls_desc_index): Likewise.
1946 (elf_i386_srelplt2): Likewise.
1947 (elf_i386_plt): Likewise.
1948 (elf_i386_lazy_plt): Likewise.
1949 (elf_i386_non_lazy_plt): Likewise.
1950 (elf_i386_link_hash_table_create): Likewise.
1951 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1952 (elf_i386_lazy_plt): Updated.
1953 (elf_i386_non_lazy_plt): Likewise.
1954 (elf_i386_lazy_ibt_plt): Likewise.
1955 (elf_i386_non_lazy_ibt_plt): Likewise.
1956 (elf_i386_allocate_dynrelocs): Likewise.
1957 (elf_i386_size_dynamic_sections): Likewise.
1958 (elf_i386_relocate_section): Likewise.
1959 (elf_i386_finish_dynamic_symbol): Likewise.
1960 (elf_i386_finish_dynamic_sections): Likewise.
1961 (elf_i386_get_synthetic_symtab): Likewise.
1962 (elf_i386_link_setup_gnu_properties): Likewise.
1963 (elf_i386_nacl_plt): Likewise.
1964 * elf64-x86-64.c (ABI_64_P): Removed.
1965 (ELF64_DYNAMIC_INTERPRETER): Likewise.
1966 (ELF32_DYNAMIC_INTERPRETER): Likewise.
1967 (elf_x86_64_lazy_plt_layout): Likewise.
1968 (elf_x86_64_non_lazy_plt_layout): Likewise.
1969 (elf_x86_64_plt_layout): Likewise.
1970 (elf_x86_64_link_hash_table): Likewise.
1971 (elf_x86_64_plt): Likewise.
1972 (elf_x86_64_lazy_plt): Likewise.
1973 (elf_x86_64_non_lazy_plt): Likewise.
1974 (elf_x86_64_link_hash_table_create): Likewise.
1975 (bfd_elf64_bfd_link_hash_table_create): Likewise.
1976 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1977 (elf_x86_64_lazy_plt): Updated.
1978 (elf_x86_64_non_lazy_plt): Likewise.
1979 (elf_x86_64_lazy_bnd_plt): Likewise.
1980 (elf_x86_64_non_lazy_bnd_plt): Likewise.
1981 (elf_x86_64_lazy_ibt_plt): Likewise.
1982 (elf_x32_lazy_ibt_plt): Likewise.
1983 (elf_x86_64_non_lazy_ibt_plt): Likewise.
1984 (elf_x32_non_lazy_ibt_plt): Likewise.
1985 (elf_x86_64_allocate_dynrelocs): Likewise.
1986 (elf_x86_64_size_dynamic_sections): Likewise.
1987 (elf_x86_64_relocate_section): Likewise.
1988 (elf_x86_64_finish_dynamic_symbol): Likewise.
1989 (elf_x86_64_finish_dynamic_sections): Likewise.
1990 (elf_x86_64_get_synthetic_symtab): Likewise.
1991 (elf_x86_64_link_setup_gnu_properties): Likewise.
1992 (elf_x86_64_nacl_plt): Likewise.
1993 * elfxx-x86.c: Include "objalloc.h", "elf/i386.h" and
1995 (ELF32_DYNAMIC_INTERPRETER): New.
1996 (ELF64_DYNAMIC_INTERPRETER): Likewise.
1997 (ELFX32_DYNAMIC_INTERPRETER): Likewise.
1998 (_bfd_x86_elf_link_hash_table_create): Likewise.
1999 (_bfd_x86_elf_link_hash_table_free): Renamed to ...
2000 (elf_x86_link_hash_table_free): This. Make it static.
2001 * elfxx-x86.h: Don't include "objalloc.h".
2003 (elf_x86_lazy_plt_layout): Likewise.
2004 (elf_x86_non_lazy_plt_layout): Likewise.
2005 (elf_x86_plt_layout): Likewise.
2006 (_bfd_x86_elf_link_hash_table_create): Likewise.
2007 (bfd_elf64_bfd_link_hash_table_create): Likewise.
2008 (bfd_elf32_bfd_link_hash_table_create): Likewise.
2009 (elf_x86_link_hash_table): Add plt, lazy_plt, non_lazy_plt,
2010 srelplt2 and next_tls_desc_index.
2011 (_bfd_x86_elf_link_hash_table_free): Removed.
2013 2017-08-30 Maciej W. Rozycki <macro@imgtec.com>
2015 * elfxx-mips.c (mips_elf_perform_relocation): Correct microMIPS
2016 branch offset interpretation.
2018 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
2021 * opncls.c (bfd_close_all_done): Call _close_and_cleanup.
2023 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
2025 * elf64-x86-64.c (elf_x86_64_next_tls_desc_index): Removed.
2026 (elf_x86_64_srelplt2): Likewise.
2028 2017-08-30 Alan Modra <amodra@gmail.com>
2030 * elf64-ppc.c (struct ppc_link_hash_table): Add do_tls_opt.
2031 (ppc64_elf_tls_optimize): Set it.
2032 (ppc64_elf_relocate_section): Nop addis on TPREL16_HA, and convert
2033 insn on TPREL16_LO and TPREL16_LO_DS relocs to use r13 when
2034 addis would add zero.
2035 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add do_tls_opt.
2036 (ppc_elf_tls_optimize): Set it.
2037 (ppc_elf_relocate_section): Nop addis on TPREL16_HA, and convert
2038 insn on TPREL16_LO relocs to use r2 when addis would add zero.
2040 2017-08-30 Alan Modra <amodra@gmail.com>
2042 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing
2043 __tls_get_addr call sequences to LE, don't move the addi down
2044 to the nop. Replace the bl with addi and leave the nop alone.
2046 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
2048 * elf32-i386.c (elf_i386_pie_finish_undefweak_symbol):
2050 * elf64-x86-64.c (elf_x86_64_finish_local_dynamic_symbol):
2052 (elf_x86_64_pie_finish_undefweak_symbol): Likewise.
2054 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
2056 * Makefile.am (BFD32_BACKENDS): Add elfxx-x86.lo.
2057 (BFD64_BACKENDS): Likewise.
2058 (BFD32_BACKENDS_CFILES): Add elfxx-x86.c.
2059 (BFD64_BACKENDS_CFILES): Likewise.
2060 * Makefile.in: Regenerated.
2061 * configure.ac (bfd_backends): Add elfxx-x86.lo together with
2062 elf32-i386.lo and elf64-x86-64.lo.
2063 * configure: Regenerated.
2064 * elf32-i386.c: Include "elfxx-x86.h" instead of "sysdep.h",
2065 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
2066 "objalloc.h" and "hashtab.h".
2067 (ELIMINATE_COPY_RELOCS): Removed.
2068 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
2069 (SYMBOL_NO_COPYRELOC): Likewise.
2070 (elf_i386_link_hash_entry): Likewise.
2071 (GOT_UNKNOWN): Likewise.
2072 (GOT_NORMAL): Likewise.
2073 (GOT_TLS_GD): Likewise.
2074 (elf_i386_hash_entry): Likewise.
2075 (elf_i386_obj_tdata): Likewise.
2076 (elf_i386_tdata): Likewise.
2077 (elf_i386_local_got_tls_type): Likewise.
2078 (elf_i386_local_tlsdesc_gotent): Likewise.
2079 (elf_i386_hash_table): Likewise.
2080 (elf_i386_link_hash_newfunc): Likewise.
2081 (elf_i386_local_htab_hash): Likewise.
2082 (elf_i386_local_htab_eq): Likewise.
2083 (elf_i386_get_local_sym_hash): Likewise.
2084 (elf_i386_link_hash_table_free): Likewise.
2085 (elf_i386_copy_indirect_symbol): Likewise.
2086 (elf_i386_fixup_symbol): Likewise.
2087 (elf_i386_readonly_dynrelocs): Likewise.
2088 (elf_i386_always_size_sections): Likewise.
2089 (elf_i386_set_tls_module_base): Likewise.
2090 (elf_i386_dtpoff_base): Likewise.
2091 (compare_relocs): Likewise.
2092 (elf_i386_hash_symbol): Likewise.
2093 (elf_i386_parse_gnu_properties): Likewise.
2094 (elf_i386_merge_gnu_properties): Likewise.
2095 (elf_i386_link_check_relocs): Likewise.
2096 (elf_i386_merge_symbol_attribute): Likewise.
2097 (bfd_elf32_bfd_link_check_relocs): Likewise.
2098 (elf_backend_copy_indirect_symbol): Likewise.
2099 (elf_backend_always_size_sections): Likewise.
2100 (elf_backend_omit_section_dynsym): Likewise.
2101 (elf_backend_hash_symbol): Likewise.
2102 (elf_backend_fixup_symbol): Likewise.
2103 (elf_backend_parse_gnu_properties): Likewise.
2104 (elf_backend_merge_gnu_properties): Likewise.
2105 (elf_backend_merge_symbol_attribute): Likewise.
2106 (elf_i386_mkobject): Updated.
2107 (elf_i386_link_hash_table_create): Likewise.
2108 (elf_i386_check_tls_transition): Likewise.
2109 (elf_i386_tls_transition): Likewise.
2110 (elf_i386_convert_load_reloc): Likewise.
2111 (elf_i386_check_relocs): Likewise.
2112 (elf_i386_adjust_dynamic_symbol): Likewise.
2113 (elf_i386_allocate_dynrelocs): Likewise.
2114 (elf_i386_convert_load): Likewise.
2115 (elf_i386_size_dynamic_sections): Likewise.
2116 (elf_i386_relocate_section): Likewise.
2117 (elf_i386_finish_dynamic_symbol ): Likewise.
2118 (elf_i386_finish_dynamic_sections): Likewise.
2119 (elf_i386_output_arch_local_syms): Likewise.
2120 (elf_i386_get_synthetic_symtab): Likewise.
2121 (elf_i386_link_setup_gnu_properties): Likewise.
2122 (elf_i386_link_hash_table): Use elf_x86_link_hash_table, instead
2123 of elf_link_hash_table, as base.
2124 (elf_i386_next_tls_desc_index): New.
2125 (elf_i386_srelplt2): Likewise.
2126 (elf_i386_plt): Likewise.
2127 (elf_i386_lazy_plt): Likewise.
2128 (elf_i386_non_lazy_plt): Likewise.
2129 * elf32-x86-64.c: Include "elfxx-x86.h" instead of "sysdep.h",
2130 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
2131 "objalloc.h" and "hashtab.h".
2132 (ELIMINATE_COPY_RELOCS): Removed.
2133 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
2134 (SYMBOL_NO_COPYRELOC): Likewise.
2135 (elf_x86_64_link_hash_entry): Likewise.
2136 (GOT_UNKNOWN): Likewise.
2137 (GOT_NORMAL): Likewise.
2138 (GOT_TLS_GD): Likewise.
2139 (elf_x86_64_hash_entry): Likewise.
2140 (elf_x86_64_obj_tdata): Likewise.
2141 (elf_x86_64_tdata): Likewise.
2142 (elf_x86_64_local_got_tls_type): Likewise.
2143 (elf_x86_64_local_tlsdesc_gotent): Likewise.
2144 (elf_x86_64_hash_table): Likewise.
2145 (elf_x86_64_link_hash_newfunc): Likewise.
2146 (elf_x86_64_local_htab_hash): Likewise.
2147 (elf_x86_64_local_htab_eq): Likewise.
2148 (elf_x86_64_get_local_sym_hash): Likewise.
2149 (elf_x86_64_link_hash_table_free): Likewise.
2150 (elf_x86_64_copy_indirect_symbol): Likewise.
2151 (elf_x86_64_fixup_symbol): Likewise.
2152 (elf_x86_64_readonly_dynrelocs): Likewise.
2153 (elf_x86_64_always_size_sections): Likewise.
2154 (elf_x86_64_set_tls_module_base): Likewise.
2155 (elf_x86_64_dtpoff_base): Likewise.
2156 (compare_relocs): Likewise.
2157 (elf_x86_64_merge_symbol_attribute): Likewise.
2158 (elf_x86_64_hash_symbol): Likewise.
2159 (elf_x86_64_parse_gnu_properties): Likewise.
2160 (elf_x86_64_merge_gnu_properties): Likewise.
2161 (elf_x86_64_link_check_relocs): Likewise.
2162 (elf_backend_copy_indirect_symbol): Likewise.
2163 (elf_backend_always_size_sections): Likewise.
2164 (bfd_elf64_bfd_link_check_relocs): Likewise.
2165 (elf_backend_merge_symbol_attribute): Likewise.
2166 (elf_backend_hash_symbol): Likewise.
2167 (elf_backend_omit_section_dynsym): Likewise.
2168 (elf_backend_fixup_symbol): Likewise.
2169 (elf_backend_parse_gnu_properties): Likewise.
2170 (elf_backend_merge_gnu_properties): Likewise.
2171 (bfd_elf32_bfd_link_check_relocs): Likewise.
2172 (elf_x86_64_mkobject): Updated.
2173 (elf_x86_64_link_hash_table_create): Likewise.
2174 (elf_x86_64_check_tls_transition): Likewise.
2175 (elf_x86_64_tls_transition): Likewise.
2176 (elf_x86_64_convert_load_reloc): Likewise.
2177 (elf_x86_64_check_relocs): Likewise.
2178 (elf_x86_64_adjust_dynamic_symbol): Likewise.
2179 (elf_x86_64_allocate_dynrelocs): Likewise.
2180 (elf_x86_64_convert_load): Likewise.
2181 (elf_x86_64_size_dynamic_sections): Likewise.
2182 (elf_x86_64_relocate_section): Likewise.
2183 (elf_x86_64_finish_dynamic_symbol ): Likewise.
2184 (elf_x86_64_finish_dynamic_sections): Likewise.
2185 (elf_x86_64_output_arch_local_syms): Likewise.
2186 (elf_x86_64_get_synthetic_symtab): Likewise.
2187 (elf_x86_64_link_setup_gnu_properties): Likewise.
2188 (elf_x86_64_link_hash_table): Use elf_x86_link_hash_table,
2189 instead of elf_link_hash_table, as base.
2190 (elf_x86_64_next_tls_desc_index): New.
2191 (elf_x86_64_srelplt2): Likewise.
2192 (elf_x86_64_plt): Likewise.
2193 (elf_x86_64_lazy_plt): Likewise.
2194 (elf_x86_64_non_lazy_plt): Likewise.
2195 * elfxx-x86.c: New file.
2196 * elfxx-x86.h: Likewise.
2198 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
2200 * elf32-i386.c (elf_i386_get_synthetic_symtab): Simplify bad
2202 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
2204 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
2206 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check valid PLT
2207 sections before checking dynamic relocations and free invalid
2208 PLT section contents.
2209 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
2211 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
2213 * elf-bfd.h (_bfd_elf_ifunc_get_synthetic_symtab): Removed.
2214 * elf-ifunc.c (_bfd_elf_ifunc_get_synthetic_symtab): Likewise.
2216 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
2219 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check for valid
2221 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
2223 2017-08-27 H.J. Lu <hongjiu.lu@intel.com>
2225 * elf32-i386.c (elf_i386_link_hash_newfunc): Initialize
2227 * elf64-x86-64.c (elf_x86_64_link_hash_newfunc): Likewise.
2229 2017-08-26 H.J. Lu <hongjiu.lu@intel.com>
2232 * elf-bfd.h (elf_obj_tdata): Use ENUM_BITFIELD on object_id,
2233 dyn_lib_class and has_gnu_symbols. Change bad_symtab to bitfield.
2234 Add a has_no_copy_on_protected bitfield.
2235 (elf_has_no_copy_on_protected): New.
2236 * elf-properties.c (_bfd_elf_parse_gnu_properties): Set
2237 elf_has_no_copy_on_protected for GNU_PROPERTY_NO_COPY_ON_PROTECTED.
2238 (elf_merge_gnu_property_list): Likewise.
2239 (_bfd_elf_link_setup_gnu_properties): Set extern_protected_data
2240 to FALSE for elf_has_no_copy_on_protected.
2241 * elf32-i386.c (SYMBOL_NO_COPYRELOC): New.
2242 (elf_i386_link_hash_entry): Add def_protected.
2243 (elf_i386_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
2244 when checking info->nocopyreloc.
2245 (elf_i386_link_setup_gnu_properties): Don't set
2246 extern_protected_data here.
2247 (elf_i386_merge_symbol_attribute): New function.
2248 (elf_backend_merge_symbol_attribute): New.
2249 * elf64-x86-64.c (SYMBOL_NO_COPYRELOC): New.
2250 (elf_x86_64_link_hash_entry): Add def_protected.
2251 (elf_x86_64_need_pic): Report protected symbol for def_protected.
2252 (elf_x86_64_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
2253 when checking info->nocopyreloc.
2254 (elf_x86_64_relocate_section): Also check for R_X86_64_PC32
2255 relocation run-time overflow and unresolvable R_X86_64_32S
2256 relocation against protected data symbol defined in shared object
2257 with GNU_PROPERTY_NO_COPY_ON_PROTECTED.
2258 (elf_x86_64_link_setup_gnu_properties): Don't set
2259 extern_protected_data here.
2260 (elf_x86_64_merge_symbol_attribute): New function.
2261 (elf_backend_merge_symbol_attribute): New.
2263 2017-08-26 Alan Modra <amodra@gmail.com>
2265 * elf32-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
2266 (ppc_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
2267 (ppc_elf_relocate_section): Comment fix.
2268 * elf64-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
2269 (ppc64_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
2270 Support dynamic relocs for TPREL16 when non-pic too.
2271 (dec_dynrel_count): Adjust TPREL16 handling as per check_relocs.
2272 (ppc64_elf_relocate_section): Support dynamic relocs for TPREL16
2275 2017-08-25 H.J. Lu <hongjiu.lu@intel.com>
2277 * elf32-i386.c (elf_i386_link_hash_entry): Remove redundant
2278 "symbol" in comments.
2279 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Likewise.
2281 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
2284 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for
2285 R_X86_64_PC32 relocation run-time overflow and unresolvable
2286 R_X86_64_32S relocation with -z nocopyreloc.
2288 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
2290 * elf32-i386.c (elf_i386_check_relocs): Revert the last change.
2291 Undefined symbols may not have a type.
2292 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
2294 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
2296 * elf64-x86-64.c (elf_x86_64_need_pic): Add an argument for
2297 bfd_link_info. Report shared, PIE or PDE object based on
2299 (elf_x86_64_check_relocs): Update elf_x86_64_need_pic call.
2300 (elf_x86_64_relocate_section): Likewise.
2302 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
2304 * elf32-i386.c (elf_i386_check_relocs): Increment PLT count only
2305 for function symbols.
2306 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
2308 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
2310 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set
2311 extern_protected_data to FALSE if GNU_PROPERTY_NO_COPY_ON_PROTECTED
2312 is set on any input relocatable file.
2313 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
2315 2017-08-23 Alan Modra <amodra@gmail.com>
2318 * elf64-ppc.c (ensure_undef_dynamic): Rename from
2319 ensure_undefweak_dynamic. Handle undefined too.
2320 * elf32-ppc.c (ensure_undef_dynamic): Likewise.
2321 * elf32-hppa.c (ensure_undef_dynamic): Likewise.
2322 (allocate_dynrelocs): Discard undefined non-default visibility
2323 relocs first. Make undefined syms dynamic. Tidy goto.
2325 2017-08-21 Alan Modra <amodra@gmail.com>
2326 H.J. Lu <hongjiu.lu@intel.com>
2329 * elf-bfd.h (SYMBOLIC_BIND): Return TRUE for __start/__stop symbols.
2330 * elflink.c (bfd_elf_define_start_stop): Rewrite.
2332 2017-08-21 Hans-Peter Nilsson <hp@bitrange.com>
2335 * elf64-mmix.c (mmix_elf_relax_section): Correct handling of
2336 undefined weak symbols.
2338 2017-08-18 Nick Clifton <nickc@redhat.com>
2341 * tekhex.c (getsym): Fix check for source pointer walking off the
2342 end of the input buffer.
2344 2017-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
2347 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Skip IFUNC
2348 relocations in debug sections, change abort to _bfd_error_handler.
2350 2017-08-14 Nick Clifton <nickc@redhat.com>
2353 * elf.c (setup_group): Check for an empty or very small group
2355 * po/bfd.pot: Regenerate.
2357 2017-08-14 Alan Modra <amodra@gmail.com>
2360 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't add
2361 alignment padding here.
2362 * elflink.c (bfd_elf_discard_info): Add .eh_frame padding here
2363 in a reverse pass over sections.
2365 2017-08-11 H.J. Lu <hongjiu.lu@intel.com>
2368 * elf32-i386.c (elf_i386_get_synthetic_symtab): Allocate space
2369 for @plt suffixes first.
2370 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
2372 2017-08-08 Nick Clifton <nickc@redhat.com>
2375 * elf-attrs.c (_bfd_elf_parse_attributes): Complain about very
2376 small section lengths.
2377 * elf.c (_bfd_elf_setup_sections): Skip empty entries in the group
2379 (elfcore_grok_freebsd_prstatus): Add checks to make sure that
2380 there is enough data present in the note.
2382 2017-08-08 Alan Modra <amodra@gmail.com>
2385 * elf32-microblaze.c (microblaze_elf_check_relocs): Don't bump
2386 got.refcount for GOTOFF relocs, just create .got section.
2388 2017-08-07 H.J. Lu <hongjiu.lu@intel.com>
2390 * elflink.c (elf_link_add_object_symbols): Move common symbol
2391 check after bed->common_definition.
2393 2017-08-07 Alan Modra <amodra@gmail.com>
2396 * elflink.c (bfd_elf_final_link): Don't segfault when sections
2397 needed to define various dynamic tags have been discarded.
2399 2017-08-07 Nick Clifton <nickc@redhat.com>
2402 * elf32-i386.c (elf_i386_link_setup_gnu_properties): If the dynobj
2403 has not been set then use the bfd returned by
2404 _bfd_elf_link_setup_gnu_properties. If that is null then search
2405 through all the input bfds selecting the first normal, ELF format
2407 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
2409 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
2411 * elf32-i386.c (elf_i386_link_hash_entry): Change tls_get_addr
2413 (elf_i386_link_hash_newfunc): Initialize tls_get_addr to 0.
2414 (elf_i386_check_tls_transition): Check tls_get_addr directly.
2415 (elf_i386_convert_load_reloc): Update tls_get_addr check.
2416 (elf_i386_link_check_relocs): New function.
2417 (bfd_elf32_bfd_link_check_relocs): New.
2418 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Change tls_get_addr
2420 (elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 0.
2421 (elf_x86_64_check_tls_transition): Check tls_get_addr directly.
2422 (elf_x86_64_convert_load_reloc): Update tls_get_addr check.
2423 (elf_x86_64_link_check_relocs): New function.
2424 (bfd_elf64_bfd_link_check_relocs): New.
2425 (bfd_elf32_bfd_link_check_relocs): Likewise.
2427 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
2430 * elflink.c (elf_link_add_object_symbols): Treat common symbol
2431 as undefined for --no-define-common.
2433 2017-08-05 Alan Modra <amodra@gmail.com>
2435 * elf32-hppa.c (elf32_hppa_set_gp): Don't require an
2436 hppa_link_hash_table.
2438 2017-08-02 Max Filippov <jcmvbkbc@gmail.com>
2440 * xtensa-isa.c (xtensa_isa_init): Don't update lookup table
2441 entries for sysregs with negative indices.
2443 2017-08-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2445 * elf32-s390.c (elf_s390_finish_dynamic_sections): Skip if it
2446 isn't the S/390 specific elf data.
2447 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
2449 2017-07-31 Kuan-Lin Chen <rufus@andestech.com>
2451 * elfxx-riscv.c (riscv_elf_add_sub_reloc): New function.
2452 * (howto_table) [R_RISCV_ADD8]: Use riscv_elf_add_sub_reloc.
2453 [R_RISCV_ADD16]: Likewise.
2454 [R_RISCV_ADD32]: Likewise.
2455 [R_RISCV_ADD64]: Likewise.
2456 [R_RISCV_SUB6]: Likewise.
2457 [R_RISCV_SUB8]: Likewise.
2458 [R_RISCV_SUB16]: Likewise.
2459 [R_RISCV_SUB32]: Likewise.
2460 [R_RISCV_SUB64]: Likewise.
2462 2017-07-31 Alan Modra <amodra@gmail.com>
2464 * elf64-ppc.c (ppc64_elf_tls_setup): Warn on --plt-localentry
2465 without ld.so checks.
2467 2017-07-29 Alan Modra <amodra@gmail.com>
2470 * elf64-ppc.c (struct ppc_link_hash_entry): Add non_zero_localentry.
2471 (ppc64_elf_merge_symbol): Set non_zero_localentry.
2472 (is_elfv2_localentry0): Test non_zero_localentry.
2473 (ppc64_elf_tls_setup): Default to --no-plt-localentry.
2475 2017-07-28 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2477 * elf32-s390.c (elf_s390_finish_dynamic_sections): Add NULL
2478 pointer check for htab->elf.irelplt.
2479 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
2481 2017-07-27 Nick Clifton <nickc@redhat.com>
2484 * mach-o.c (bfd_mach_o_read_symtab_strtab): Fail if the symtab
2486 * nlmcode.h (nlm_swap_auxiliary_headers_in): Replace assertion
2488 * section.c (bfd_make_section_with_flags): Fail if the name or bfd
2490 * vms-alpha.c (bfd_make_section_with_flags): Correct computation
2492 (evax_bfd_print_emh): Check for invalid string lengths.
2494 2017-07-25 Nick Clifton <nickc@redhat.com>
2496 * po/fr.po: Updated French translation.
2498 2017-07-25 Benjamin Green <bengreen5mx@gmail.com>
2501 * elf32-msp430.c (msp430_elf_relax_section): Allow conversion of
2502 16-bit absolute branches into 10-bit pc-relative branches on the
2503 MSP430 as well as the MSP430X.
2505 2017-07-25 Alan Modra <amodra@gmail.com>
2507 * elf64-ppc.c (struct map_stub): Add tls_get_addr_opt_bctrl.
2508 (stub_eh_frame_size): New function.
2509 (ppc_size_one_stub): Set group tls_get_addr_opt_bctrl.
2510 (group_sections): Init group tls_get_addr_opt_bctrl.
2511 (ppc64_elf_size_stubs): Update sizing and initialization of
2512 .eh_frame. Iteration over stubs via group list.
2513 (ppc64_elf_build_stubs): Iterate over stubs via group list.
2514 (ppc64_elf_finish_dynamic_sections): Update finalization of
2517 2017-07-24 Nick Clifton <nickc@redhat.com>
2520 * mach-o.c (bfd_mach_o_canonicalize_relocs): Pass the base address
2521 of the relocs to the canonicalize_one_reloc routine.
2522 * mach-o.h (struct bfd_mach_o_backend_data): Update the prototype
2523 for the _bfd_mach_o_canonicalize_one_reloc field.
2524 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add
2525 res_base parameter. Use to check for corrupt pair relocs.
2526 * mach-o-aarch64.c (bfd_mach_o_arm64_canonicalize_one_reloc):
2528 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc):
2530 * mach-o-x86-64.c (bfd_mach_o_x86_64_canonicalize_one_reloc):
2533 * vms-alpha.c (_bfd_vms_slurp_eihd): Make sure that there is
2534 enough data in the record before attempting to parse it.
2535 (_bfd_vms_slurp_eeom): Likewise.
2537 (_bfd_vms_slurp_egsd): Check for an invalid section index.
2538 (image_set_ptr): Likewise.
2539 (alpha_vms_slurp_relocs): Likewise.
2541 (alpha_vms_object_p): Check for a truncated record.
2543 2017-07-24 Nick Clifton <nickc@redhat.com>
2546 * reloc.c (_bfd_unrecognized_reloc): New function. Reports
2547 an unrecognized reloc and sets the bfd_error value.
2548 * libbfd.h: Regenerate.
2549 * elf32-arm.c (elf32_arm_final_link_relocate): Use the new
2551 * elf32-i386.c (elf_i386_relocate_section): Likewise.
2552 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
2553 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
2554 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.
2555 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
2557 2017-07-23 Alan Modra <amodra@gmail.com>
2559 * elf64-ppc.c (ppc64_elf_size_stubs): Correct advance to
2562 2017-07-19 Szabolcs Nagy <szabolcs.nagy@arm.com>
2565 * elfnn-aarch64.c (elfNN_aarch64_reloc_type_class): Return
2566 reloc_class_ifunc for ifunc symbols.
2568 2017-07-19 Nick Clifton <nickc@redhat.com>
2571 * archive.c (bfd_generic_archive_p): If the bfd does not have the
2572 correct magic bytes at the start, set the error to wrong format
2573 and clear the format selector before returning NULL.
2575 2017-07-19 Nick Clifton <nickc@redhat.com>
2578 * coff-rs6000.c (_bfd_strntol): New function.
2579 (_bfd_strntoll): New function.
2580 (GET_VALUE_IN_FIELD): New macro.
2581 (EQ_VALUE_IN_FIELD): new macro.
2582 (_bfd_xcoff_slurp_armap): Use new macros.
2583 (_bfd_xcoff_archive_p): Likewise.
2584 (_bfd_xcoff_read_ar_hdr): Likewise.
2585 (_bfd_xcoff_openr_next_archived_file): Likewise.
2586 (_bfd_xcoff_stat_arch_elt): Likewise.
2587 * coff64-rs6000.c (_bfd_strntol): New function.
2588 (_bfd_strntoll): New function.
2589 (GET_VALUE_IN_FIELD): New macro.
2590 (xcoff64_slurp_armap): Use new macros.
2592 2017-07-19 Claudiu Zissulescu <claziss@synopsys.com>
2593 John Eric Martin <John.Martin@emmicro-us.com>
2595 * bfd-in2.h: Regenerate.
2596 * libbfd.h: Regenerate.
2597 * elf32-arc.c (JLI): Define.
2598 * reloc.c: Add JLI relocations.
2600 2017-07-18 Nick Clifton <nickc@redhat.com>
2603 * coff-sh.c: Fix spelling typos.
2604 * compress.c: Likewise.
2605 * cpu-pdp11.c: Likewise.
2606 * ecofflink.c: Likewise.
2607 * elf-m10300.c: Likewise.
2609 * elf32-arm.c: Likewise.
2610 * elf32-m68k.c: Likewise.
2611 * elf32-nds32.c: Likewise.
2612 * elf32-ppc.c: Likewise.
2613 * elf32-sh.c: Likewise.
2614 * elf32-v850.c: Likewise.
2615 * elf64-ppc.c: Likewise.
2616 * elf64-x86-64.c: Likewise.
2617 * elflink.c: Likewise.
2618 * elfnn-aarch64.c: Likewise.
2619 * elfxx-mips.c: Likewise.
2621 * sunos.c: Likewise.
2622 * vms-alpha.c: Likewise.
2623 * xcofflink.c: Likewise.
2625 2017-07-18 Nick Clifton <nickc@redhat.com>
2628 * coffcode.h (handle_COMDAT): Replace abort with an error message
2631 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
2634 * elf64-x86-64.c (elf_x86_64_relocate_section): Limit PIC check
2637 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
2639 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
2641 2017-07-16 Alan Modra <amodra@gmail.com>
2643 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimize
2644 __tls_index GOT entries when using __tls_get_addr_opt stub.
2645 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2647 2017-07-12 Alan Modra <amodra@gmail.com>
2649 * po/es.po: Update from translationproject.org/latest/bfd/.
2650 * po/fi.po: Likewise.
2651 * po/fr.po: Likewise.
2652 * po/id.po: Likewise.
2653 * po/ja.po: Likewise.
2654 * po/ro.po: Likewise.
2655 * po/ru.po: Likewise.
2656 * po/sr.po: Likewise.
2657 * po/sv.po: Likewise.
2658 * po/tr.po: Likewise.
2659 * po/uk.po: Likewise.
2660 * po/vi.po: Likewise.
2661 * po/zh_CN.po: Likewise.
2662 * po/hr.po: New file from translationproject.org.
2663 * configure.ac (ALL_LINGUAS): Add hr. Sort.
2664 * configure: Regenerate.
2666 2017-07-12 Nick Clifton <nickc@redhat.com>
2668 Fix compile time warnings using gcc 7.1.1.
2669 * elf32-xtensa.c (elf_xtensa_get_plt_section): Increase length of
2671 (elf_xtensa_get_gotplt_section): Increase length of got_name
2673 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add a
2674 default return of FALSE.
2675 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc): Add a
2676 default return of FALSE.
2678 2017-07-12 Alan Modra <amodra@gmail.com>
2680 * binary.c (binary_set_section_contents): Don't print filepos in
2682 (coff_write_object_contents): Cast size_t for error message.
2683 (coff_slurp_line_table): Don't use bfd_vma symndx.
2684 (coff_slurp_reloc_table): Remove unneeded cast.
2685 * dwarf2.c (read_section): Cast bfd_int64_t to long long for
2687 (find_abstract_instance_name): Likewise.
2688 * elf32-arm.c (arm_type_of_stub): Correct error arg order.
2689 (bfd_elf32_arm_stm32l4xx_erratum_scan): Don't cast error arg.
2690 (elf32_arm_check_relocs): Make r_symndx an int.
2691 * elf32-cris.c (cris_elf_check_relocs): Delete extraneous %s in
2693 * elf32-metag.c (elf_metag_relocate_section): Delete extra error
2695 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Rewrite bogus
2697 * elf32-i386.c (elf_i386_check_relocs): Make r_symndx an int.
2698 * elf32-s390.c (elf_s390_check_relocs): Likewise.
2699 * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
2700 * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
2701 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
2702 * elf64-s390.c (elf_s390_check_relocs): Likewise.
2703 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
2704 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
2705 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
2706 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
2707 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
2708 * elf64-mmix.c (_bfd_mmix_after_linker_allocation): Cast size_t args
2709 and use %lu for error message.
2710 * elflink.c (elf_link_adjust_relocs): Delete extra error message arg.
2711 * mmo.c (mmo_scan): Make stab_loc a file_ptr. Cast expression for
2714 * elf32-arm.c (elf32_arm_tls_relax): Correct format string and args
2716 (elf32_arm_final_link_relocate): Likewise.
2717 * coff-arm.c (bfd_arm_process_before_allocation): Likewise.
2718 * coffcode.h (styp_to_sec_flags): Likewise.
2719 * cofflink.c (_bfd_coff_write_global_sym): Likewise.
2720 * ecoff.c (_bfd_ecoff_slurp_symbol_table): Likewise.
2721 * elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise.
2722 * elf32-bfin.c (bfinfdpic_check_relocs): Likewise.
2723 (elf32_bfin_merge_private_bfd_data): Likewise.
2724 * elf32-cris.c (cris_elf_relocate_section): Likewise.
2725 * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
2726 * elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise.
2727 (i370_elf_relocate_section): Likewise.
2728 * elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise.
2729 * elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise.
2730 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
2731 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
2732 * elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise.
2733 * elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise.
2734 * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
2735 * elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise.
2736 (_bfd_mips_elf_merge_private_bfd_data): Likewise.
2737 * ieee.c (ieee_write_id, read_id): Likewise.
2738 * mach-o.c (bfd_mach_o_write_contents): Likewise.
2739 (bfd_mach_o_layout_commands, bfd_mach_o_read_section_32): Likewise.
2740 (bfd_mach_o_read_section_64, bfd_mach_o_read_symtab_symbol): Likewise.
2741 (bfd_mach_o_read_command, bfd_mach_o_header_p): Likewise.
2742 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Likewise.
2743 * stabs.c (_bfd_link_section_stabs): Likewise.
2745 * coff-arm.c (coff_arm_relocate_section): Use L modifier in error
2747 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
2748 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
2749 * coff-rs6000.c (xcoff_reloc_type_toc): Likewise.
2750 * coff-sh.c (sh_relax_section): Likewise.
2751 (sh_relax_delete_bytes, sh_swap_insns): Likewise.
2752 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
2753 * coffcode.h (coff_slurp_reloc_table): Likewise.
2754 * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
2755 (_bfd_coff_read_string_table): Likewise.
2756 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
2757 * compress.c (bfd_get_full_section_contents): Likewise.
2758 * dwarf2.c (read_formatted_entries, decode_line_info): Likewise.
2759 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
2760 * elf.c (bfd_elf_string_from_elf_section): Likewise.
2761 * elf32-arc.c (arc_special_overflow_checks): Likewise.
2762 * elf32-arm.c (elf32_arm_tls_relax): Likewise.
2763 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Likewise.
2764 (elf32_arm_write_section): Likewise.
2765 * elf32-bfin.c (bfin_relocate_section): Likewise.
2766 (bfinfdpic_relocate_section): Likewise.
2767 * elf32-hppa.c (hppa_build_one_stub): Likewise.
2768 (final_link_relocate, elf32_hppa_relocate_section): Likewise.
2769 * elf32-i386.c (elf_i386_tls_transition): Likewise.
2770 (elf_i386_relocate_section): Likewise.
2771 * elf32-ip2k.c (ip2k_final_link_relocate): Likewise.
2772 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
2773 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
2774 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
2775 * elf32-metag.c (elf_metag_relocate_section): Likewise.
2776 * elf32-nds32.c (unrecognized_reloc_msg): Likewise.
2777 (nds32_elf_relax_longcall1, nds32_elf_relax_longcall2): Likewise.
2778 (nds32_elf_relax_longcall3, nds32_elf_relax_longjump1): Likewise.
2779 (nds32_elf_relax_longjump2, nds32_elf_relax_longjump3): Likewise.
2780 (nds32_elf_relax_longcall4, nds32_elf_relax_longcall5): Likewise.
2781 (nds32_elf_relax_longcall6, nds32_elf_relax_longjump4): Likewise.
2782 (nds32_elf_relax_longjump5, nds32_elf_relax_longjump6): Likewise.
2783 (nds32_elf_relax_longjump7, nds32_elf_relax_loadstore): Likewise.
2784 (nds32_elf_relax_ptr, nds32_elf_ex9_build_hash_table): Likewise.
2785 * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
2786 * elf32-rx.c (UNSAFE_FOR_PID): Likewise.
2787 * elf32-s390.c (invalid_tls_insn, elf_s390_relocate_section): Likewise.
2788 * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
2789 * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
2790 * elf32-sh.c (sh_elf_relax_section): Likewise.
2791 (sh_elf_relax_delete_bytes, sh_elf_swap_insns): Likewise.
2792 (sh_elf_relocate_section): Likewise.
2793 * elf32-sh64.c (shmedia_prepare_reloc): Likewise.
2794 * elf32-spu.c (spu_elf_relocate_section): Likewise.
2795 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
2796 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
2797 * elf32-v850.c (v850_elf_relax_section): Likewise.
2798 * elf32-vax.c (elf_vax_check_relocs): Likewise.
2799 (elf_vax_relocate_section): Likewise.
2800 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
2801 (extend_ebb_bounds_forward, extend_ebb_bounds_backward): Likewise.
2802 (compute_text_actions, compute_ebb_proposed_actions): Likewise.
2803 (do_fix_for_relocatable_link): Likewise.
2804 * elf64-alpha.c (elf64_alpha_relax_got_load): Likewise.
2805 (elf64_alpha_relax_with_lituse): Likewise.
2806 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Likewise.
2807 (elf_hppa_final_link_relocate): Likewise.
2808 * elf64-ia64-vms.c (elf64_ia64_relax_section): Likewise.
2809 (elf64_ia64_choose_gp, elf64_ia64_relocate_section): Likewise.
2810 (elf64_vms_link_add_object_symbols): Likewise.
2811 * elf64-mmix.c (mmix_elf_perform_relocation): Likewise.
2812 (mmix_final_link_relocate): Likewise.
2813 * elf64-s390.c (invalid_tls_insn): Likewise.
2814 (elf_s390_relocate_section): Likewise.
2815 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
2816 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
2817 (elf_x86_64_relocate_section): Likewise.
2818 * elfcode.h (elf_slurp_symbol_table): Likewise.
2819 * elfcore.h (elf_core_file_p): Likewise.
2820 * elflink.c (elf_link_read_relocs_from_section): Likewise.
2821 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
2822 (elfNN_aarch64_relocate_section): Likewise.
2823 * elfnn-ia64.c (elfNN_ia64_relax_section): Likewise.
2824 (elfNN_ia64_choose_gp, elfNN_ia64_relocate_section): Likewise.
2825 * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
2826 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
2827 (_bfd_mips_elf_relocate_section): Likewise.
2828 (_bfd_mips_elf_finish_dynamic_symbol, mips_finish_exec_plt): Likewise.
2829 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
2830 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
2831 * ieee.c (ieee_slurp_external_symbols): Likewise.
2832 * ihex.c (ihex_write_object_content): Likewise.
2833 * mach-o.c (bfd_mach_o_build_exec_seg_command): Likewise.
2834 * merge.c (_bfd_merged_section_offset): Likewise.
2835 * mmo.c (mmo_write_loc_chunk): Likewise.
2836 (mmo_write_object_contents): Likewise.
2837 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Likewise.
2838 * stabs.c (_bfd_link_section_stabs): Likewise.
2839 * xcofflink.c (xcoff_link_add_symbols, xcoff_find_tc0): Likewise.
2841 2017-07-11 Alan Modra <amodra@gmail.com>
2843 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo.
2845 2017-07-11 Alan Modra <amodra@gmail.com>
2847 * elf32-ppc.c (ppc_elf_relocate_section): Emit "unexpected
2848 instruction" error using _bfd_error_handler, not einfo.
2850 2017-07-10 Nick Clifton <nickc@redhat.com>
2852 * coffcode.h (coff_slurp_symbol_table): Do not include an entry
2853 for C_AIX_WEAKEXT if it has the same value as C_WEAKEXT.
2855 2017-07-07 John Baldwin <jhb@FreeBSD.org>
2857 * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PTLWPINFO.
2859 2017-07-07 Alan Modra <amodra@gmail.com>
2861 * coffcode.h (coff_slurp_symbol_table): Handle C_AIX_WEAKEXT.
2863 2017-07-07 Alan Modra <amodra@gmail.com>
2865 * bfd.c (_doprnt): Replace "L" with "ll" when printing bfd_vma
2866 as long long. Move code replacing "ll" with "I64", and simplify.
2868 2017-07-06 H.J. Lu <hongjiu.lu@intel.com>
2870 * bfd.c (_doprnt): Convert 'L' to 'l' when setting wide_width
2873 2017-07-05 H.J. Lu <hongjiu.lu@intel.com>
2875 * dwarf2.c (line_info_add_include_dir_stub): Replace time with
2877 (line_info_add_file_name): Likewise.
2878 (decode_line_info): Likewise.
2880 2017-07-04 Tristan Gingold <gingold@adacore.com>
2882 * version.m4: Bump version to 2.29.51
2883 * configure: Regenerate.
2885 2017-07-04 Jiong Wang <jiong.wang@arm.com>
2887 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Remove the
2888 sanity check at the head of this function.
2890 2017-07-04 Jan Kratochvil <jan.kratochvil@redhat.com>
2892 * dwarf2.c (struct dwarf2_debug): Add fields dwarf_line_str_buffer and
2893 dwarf_line_str_size.
2894 (struct attr_abbrev): Add field implicit_const.
2895 (dwarf_debug_sections): Add .debug_line_str.
2896 (enum dwarf_debug_section_enum): Add debug_line_str and debug_max.
2897 (dwarf_debug_section_assert): Add static assertion.
2898 (read_indirect_line_string): New.
2899 (read_abbrevs): Support DW_FORM_implicit_const.
2900 (is_str_attr): Support DW_FORM_line_strp.
2901 (read_attribute_value): Support DW_FORM_line_strp and
2902 DW_FORM_implicit_const.
2903 (read_attribute): Support DW_FORM_implicit_const.
2904 (line_info_add_include_dir, line_info_add_include_dir_stub):
2905 (line_info_add_file_name, read_formatted_entries): New.
2906 (decode_line_info, parse_comp_unit): Support DWARF 5.
2907 (_bfd_dwarf2_cleanup_debug_info): Free dwarf_line_str_buffer.
2909 2017-07-03 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
2911 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove the
2912 abort statement that was put for symbols that are not dynamic.
2914 2017-07-03 Tristan Gingold <gingold@adacore.com>
2916 * po/bfd.pot: Regenerate
2918 2017-07-03 Alan Modra <amodra@gmail.com>
2920 * bfd.c (_doprnt): Rewrite "ll" and "L" modifiers to "I64" for
2921 __MSVCRT__. Support "L" modifier for bfd_vma. Formatting.
2922 * elf.c (setup_group): Use "Lx" to print sh_size.
2923 (_bfd_elf_setup_sections): Remove unnecessary cast and print
2924 unknown section type in hex.
2925 (copy_special_section_fields): Style fix.
2926 (bfd_section_from_shdr): Correct format for sh_link. Use a
2927 common error message for all the variants of unrecognized
2929 (assign_file_positions_for_load_sections): Use "Lx" for lma
2930 adjust error message.
2931 (assign_file_positions_for_non_load_sections): Formatting.
2932 (rewrite_elf_program_header): Formatting. Use "Lx" for
2933 bfd_vma values in error messages.
2934 * elfcode.h (elf_slurp_reloc_table_from_section): Cast
2935 ELF_R_SYM value to type expected by format.
2936 * elflink.c (elf_link_read_relocs_from_section): Use "Lx"
2938 (elf_link_add_object_symbols): Use "Lu" for symbol sizes.
2939 (elf_link_input_bfd): Use "Lx" for r_info.
2940 (bfd_elf_gc_record_vtinherit): Use "Lx" for offset.
2942 2017-07-03 Alan Modra <amodra@gmail.com>
2944 * bfd.c (bfd_scan_vma): Don't use long long unless HAVE_LONG_LONG.
2945 * coff-rs6000.c (FMT20): Handle hosts with 64-bit long and
2946 Microsoft C library variant of long long format specifier.
2947 (PRINT20): Cast value to bfd_uint64_t not long long.
2948 * coffcode.h (coff_print_aux): Use BFD_VMA_FMT.
2949 * coff-x86_64.c (coff_amd64_reloc): Use bfd_uint64_t rather than
2950 long long. Don't cast to bfd_vma.
2951 * elf32-score.c (score3_bfd_getl48): Likewise.
2952 * vms-alpha.c (_bfd_vms_slurp_eisd): Likewise.
2954 2017-07-03 Alan Modra <amodra@gmail.com>
2956 * elf.c (_bfd_elf_print_private_bfd_data): Use BFD_VMA_FMT to
2958 (bfd_elf_print_symbol): Don't cast symbol->flags.
2959 (_bfd_elf_symbol_from_bfd_symbol): Likewise.
2960 * elf32-ppc.c (ppc_elf_begin_write_processing): Correct
2961 _bfd_error_handler argument order.
2962 (ppc_elf_merge_private_bfd_data): Don't cast flags.
2964 2017-07-03 Alan Modra <amodra@gmail.com>
2966 * configure.ac: Invoke AC_CHECK_TYPES for long long. Invoke
2967 AC_TYPE_LONG_DOUBLE.
2968 * configure: Regenerate.
2969 * config.in: Regenerate.
2971 2017-06-29 Andrew Waterman <andrew@sifive.com>
2973 * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Fix TLS copy
2976 2017-06-29 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
2978 * elfxx-sparc.c (allocate_dynrelocs): Don't make a symbol dynamic
2979 unless it is undefined weak.
2980 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Set the flag
2981 relative_reloc to direct non-dynamic symbols to R_SPARC_RELATIVE
2983 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): If symbol
2984 is not dynamic in PIC, abort.
2986 2017-06-29 Jiong Wang <jiong.wang@arm.com>
2989 * elfnn-aarch64.c (elfNN_aarch64_allocate_dynrelocs): Only make
2990 undefined weak symbols into dynamic.
2991 (elfNN_aarch64_final_link_relocate): Generate runtime RELATIVE
2992 relocation for non-dynamic symbols.
2993 (elfNN_aarch64_finish_dynamic_symbol): Add sanity check.
2995 2017-06-29 Jiong Wang <jiong.wang@arm.com>
2997 * elfnn-aarch64.c (aarch64_relocation_aginst_gp_p): New function.
2998 (elfNN_aarch64_final_link_relocate): Delete duplicated code for
2999 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15, BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
3000 BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
3001 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Optimize the
3004 2017-06-29 Andreas Arnez <arnez@linux.vnet.ibm.com>
3006 * elf-bfd.h (elfcore_write_s390_gs_cb): Add prototype.
3007 (elfcore_write_s390_gs_bc): Likewise.
3008 * elf.c (elfcore_grok_s390_gs_cb): New function.
3009 (elfcore_grok_s390_gs_bc): New function.
3010 (elfcore_grok_note): Call them.
3011 (elfcore_write_s390_gs_cb): New function.
3012 (elfcore_write_s390_gs_bc): New function.
3013 (elfcore_write_register_note): Call them.
3015 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
3017 * libbfd.c (_bfd_generic_get_section_contents): Don't call
3018 bfd_get_file_size. Check archive element size.
3019 (_bfd_generic_get_section_contents_in_window): Likewise.
3021 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
3023 * bfd-in2.h: Regenerated.
3024 * bfdio.c (bfd_get_size): Change return type to ufile_ptr.
3025 (bfd_get_file_size): Likewise.
3027 2017-06-28 Maciej W. Rozycki <macro@imgtec.com>
3028 Matthew Fortune <matthew.fortune@imgtec.com>
3030 * archures.c (bfd_mach_mips_interaptiv_mr2): New macro.
3031 * cpu-mips.c (I_interaptiv_mr2): New enum value.
3032 (arch_info_struct): Add "mips:interaptiv-mr2" entry.
3033 * elfxx-mips.c (_bfd_elf_mips_mach) <E_MIPS_MACH_IAMR2>: New
3035 (mips_set_isa_flags) <bfd_mach_mips_interaptiv_mr2>: Likewise.
3036 (bfd_mips_isa_ext) <bfd_mach_mips_interaptiv_mr2>: Likewise.
3037 (print_mips_isa_ext) <AFL_EXT_INTERAPTIV_MR2>: Likewise.
3038 (mips_mach_extensions): Add `bfd_mach_mipsisa32r3' and
3039 `bfd_mach_mips_interaptiv_mr2' entries.
3040 * bfd-in2.h: Regenerate.
3042 2017-06-27 Nick Clifton <nickc@redhat.com>
3044 * tekhex.c (pass_over): Revert accidental conversion of a local
3045 array to a static array.
3047 2017-06-27 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
3050 * elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Adjust
3051 reloc addend if necessary. Adjust diff only if
3052 shrinked_insn_address < end_address.
3054 2017-06-27 Alan Modra <amodra@gmail.com>
3057 * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
3058 (_bfd_generic_get_section_contents_in_window): Likewise.
3060 2017-06-26 Kuan-Lin Chen <rufus@andestech.com>
3062 * elfnn-riscv.c (perform_relocation): Support the new
3063 R_RISCV_32_PCREL relocation.
3064 (riscv_elf_relocate_section): Likewise.
3065 * elfxx-riscv.c (howto_table): Likewise.
3066 (riscv_reloc_map): Likewise.
3067 * bfd-in2.h (BFD_RELOC_RISCV_32_PCREL): New relocation.
3068 * libbfd.h: Regenerate.
3070 2017-06-27 Alan Modra <amodra@gmail.com>
3073 * libbfd.c (_bfd_generic_get_section_contents): Delete abort.
3074 Use unsigned file pointer type, and remove cast.
3075 * libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise.
3076 Add "count", not "sz".
3078 2017-06-26 Pedro Alves <palves@redhat.com>
3081 * libbfd.c (_bfd_generic_get_section_contents): Add "count", not
3084 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
3087 * libbfd.c (_bfd_generic_get_section_contents_in_window): Add
3090 2017-06-26 Maciej W. Rozycki <macro@imgtec.com>
3092 * cpu-mips.c (arch_info_struct): Mark the 4010 32-bit.
3093 * elfxx-mips.c (mips_set_isa_flags) <bfd_mach_mips4010>: Set
3094 E_MIPS_ARCH_2 rather than E_MIPS_ARCH_3 in `e_flags'.
3095 (mips_mach_extensions): Mark `bfd_mach_mips4010' as extending
3096 `bfd_mach_mips6000' rather than `bfd_mach_mips4000'.
3098 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
3101 * compress.c (bfd_get_full_section_contents): Don't check the
3103 * libbfd.c (_bfd_generic_get_section_contents): Check for and
3104 reject a section whose size + offset is greater than the size
3106 (_bfd_generic_get_section_contents_in_window): Likewise.
3108 2017-06-26 Nick Clifton <nickc@redhat.com>
3111 * tekhex.c (getvalue): Check for the source pointer exceeding the
3112 end pointer before the first byte is read.
3114 2017-06-26 Nick Clifton <nickc@redhat.com>
3117 * opncls.c (get_build_id): Check that the section is big enough
3118 to contain the whole note.
3119 * compress.c (bfd_get_full_section_contents): Check for and reject
3120 a section whose size is greater than the size of the entire file.
3121 * elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not
3122 contain a notes section.
3124 2017-06-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
3126 * elf64-s390.c (elf_s390_additional_program_headers): Add NULL
3128 (elf_s390_modify_segment_map): Likewise.
3129 (bfd_elf_s390_set_options): Lisewise.
3131 2017-06-26 Alan Modra <amodra@gmail.com>
3133 * elflink.c (_bfd_elf_link_create_dynstrtab): Don't make dynobj
3135 (_bfd_elf_size_group_sections): Skip --just-syms bfds.
3136 (bfd_elf_size_dynamic_sections): Ignore .note.GNU-stack and
3137 .preinit_array on --just-syms bfds.
3138 (_bfd_elf_gc_mark_extra_sections): Skip --just-syms bfds.
3139 (elf_gc_sweep, bfd_elf_parse_eh_frame_entries): Likewise.
3140 (bfd_elf_gc_sections, bfd_elf_discard_info): Likewise.
3142 2017-06-25 Sergei Trofimovich <slyfox@gentoo.org>
3144 * elf.c (find_link): Bounds check "hint".
3146 2017-06-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
3148 * elf32-arm.c (using_thumb_only): Update list of architectures in
3149 BFD_ASSERT for which the logic is valid.
3150 (using_thumb2_bl): Likewise.
3151 (using_thumb2): Likewise and return true for ARMv8-R.
3152 (arch_has_arm_nop): Likewise.
3153 (tag_cpu_arch_combine): New v8r table for ARMv8-R Tag_CPU_arch
3154 merging logic. Update commentis for value 15 of v8m_baseline,
3155 v8m_mainline and v4t_plus_v6_m arrays. Use v8r array to decide
3156 merging of value 15 of Tag_CPU_arch.
3158 2017-06-23 Jiong Wang <jiong.wang@arm.com>
3160 * reloc.c (BFD_RELOC_AARCH64_ADR_GOTPAGE): Rename to
3161 BFD_RELOC_AARCH64_ADR_GOT_PAGE
3162 * bfd-in2.h: Regenerate.
3164 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
3166 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Move
3167 the error_alignment label forward. Properly align program
3168 property note section.
3170 2017-06-22 Eric Christopher <echristo@gmail.com>
3172 * elf32-arm.c (elf32_arm_final_link_relocate): Use labs rather than
3173 abs to fix a truncation warning.
3175 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
3177 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Resolve
3178 local undefined weak symbol to 0.
3179 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Likewise.
3181 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
3183 * elf32-i386.c (elf_i386_merge_gnu_properties): If info->shstk
3184 is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
3185 (elf_i386_link_setup_gnu_properties): If info->shstk is set,
3186 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
3187 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): If
3188 info->shstk is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
3189 (elf_x86_64_link_setup_gnu_properties): If info->shstk is set,
3190 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
3192 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
3194 * elf32-i386.c (elf_i386_lazy_ibt_plt0_entry): New.
3195 (elf_i386_lazy_ibt_plt_entry): Likewise.
3196 (elf_i386_pic_lazy_ibt_plt0_entry): Likewise.
3197 (elf_i386_non_lazy_ibt_plt_entry): Likewise.
3198 (elf_i386_pic_non_lazy_ibt_plt_entry): Likewise.
3199 (elf_i386_eh_frame_lazy_ibt_plt): Likewise.
3200 (elf_i386_lazy_plt_layout): Likewise.
3201 (elf_i386_non_lazy_plt_layout): Likewise.
3202 (elf_i386_link_hash_entry): Add plt_second.
3203 (elf_i386_link_hash_table): Add plt_second and
3204 plt_second_eh_frame.
3205 (elf_i386_allocate_dynrelocs): Use the second PLT if needed.
3206 (elf_i386_size_dynamic_sections): Use .plt.got unwind info for
3207 the second PLT. Check the second PLT.
3208 (elf_i386_relocate_section): Use the second PLT to resolve
3209 PLT reference if needed.
3210 (elf_i386_finish_dynamic_symbol): Fill and use the second PLT if
3212 (elf_i386_finish_dynamic_sections): Set sh_entsize on the
3213 second PLT. Generate unwind info for the second PLT.
3214 (elf_i386_plt_type): Add plt_second.
3215 (elf_i386_get_synthetic_symtab): Support the second PLT.
3216 (elf_i386_parse_gnu_properties): Support
3217 GNU_PROPERTY_X86_FEATURE_1_AND.
3218 (elf_i386_merge_gnu_properties): Support
3219 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
3220 on GNU_PROPERTY_X86_FEATURE_1_IBT
3221 (elf_i386_link_setup_gnu_properties): If info->ibt is set,
3222 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
3223 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
3224 is set on all relocatable inputs.
3225 * elf64-x86-64.c (elf_x86_64_lazy_ibt_plt_entry): New.
3226 (elf_x32_lazy_ibt_plt_entry): Likewise.
3227 (elf_x86_64_non_lazy_ibt_plt_entry): Likewise.
3228 (elf_x32_non_lazy_ibt_plt_entry): Likewise.
3229 (elf_x86_64_eh_frame_lazy_ibt_plt): Likewise.
3230 (elf_x32_eh_frame_lazy_ibt_plt): Likewise.
3231 (elf_x86_64_lazy_ibt_plt): Likewise.
3232 (elf_x32_lazy_ibt_plt): Likewise.
3233 (elf_x86_64_non_lazy_ibt_plt): Likewise.
3234 (elf_x32_non_lazy_ibt_plt): Likewise.
3235 (elf_x86_64_get_synthetic_symtab): Support the second PLT.
3236 (elf_x86_64_parse_gnu_properties): Support
3237 GNU_PROPERTY_X86_FEATURE_1_AND.
3238 (elf_x86_64_merge_gnu_properties): Support
3239 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
3240 on GNU_PROPERTY_X86_FEATURE_1_IBT
3241 (elf_x86_64_link_setup_gnu_properties): If info->ibt is set,
3242 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
3243 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
3244 is set on all relocatable inputs.
3246 2017-06-22 Nick Clifton <nickc@redhat.com>
3249 * som.c (setup_sections): NUL terminate the space_strings buffer.
3250 Check that the space.name field does not index beyond the end of
3251 the space_strings buffer.
3253 2017-06-21 Nick Clifton <nickc@redhat.com>
3256 * coff-sh.c (sh_reloc): Check for an out of range reloc.
3258 2017-06-21 Nick Clifton <nickc@redhat.com>
3261 * vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as
3262 type of the size parameter.
3263 (_bfd_vms_save_counted_string): Add second parameter - the maximum
3264 length of the counted string.
3265 * vms.h (_bfd_vms_save_sized_string): Update prototype.
3266 (_bfd_vms_save_counted_string): Likewise.
3267 * vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to
3268 _bfd_vms_save_counted_string.
3269 (_bfd_vms_slurp_ehdr): Likewise.
3270 (_bfd_vms_slurp_egsd): Likewise.
3271 (Parse_module): Likewise.
3273 2017-06-21 Alan Modra <amodra@gmail.com>
3275 * elf64-ppc.c (ppc64_elf_size_stubs): Test for localentry:0 plt
3276 calls before tocsave calls.
3277 (ppc64_elf_relocate_section): Allow localentry:0 plt calls without
3280 2017-06-21 Nick Clifton <nickc@redhat.com>
3283 * reloc.c (bfd_generic_get_relocated_section_contents): Fail if
3284 bfd_get_full_section_contents returns no contents.
3286 2017-06-21 Nick Clifton <nickc@redhat.com>
3289 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized
3292 2017-06-21 Nick Clifton <nickc@redhat.com>
3295 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section
3297 (image_set_ptr): Likewise.
3298 (alpha_vms_fix_sec_rel): Likewise.
3299 (alpha_vms_slurp_relocs): Likewise.
3301 2017-06-21 Nick Clifton <nickc@redhat.com>
3304 * ieee.c (ieee_slurp_sections): Check for a NULL return from
3306 (ieee_archive_p): Likewise.
3307 (ieee_object_p): Likewise.
3309 2017-06-21 Nick Clifton <nickc@redhat.com>
3312 * elf.c (setup_group): Zero the group section pointer list after
3313 allocation so that loops can be caught. Check for NULL pointers
3314 when processing a group list.
3316 2017-06-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
3318 * elf-s390.h: New file.
3319 * elf64-s390.c (struct elf_s390_link_hash_table): Add params
3321 (elf_s390_additional_program_headers): New function.
3322 (elf_s390_modify_segment_map): New function.
3323 (bfd_elf_s390_set_options): New function.
3324 (elf_backend_additional_program_headers)
3325 (elf_backend_modify_segment_map): Add macro definitions.
3327 2017-06-19 H.J. Lu <hongjiu.lu@intel.com>
3330 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
3331 the DYNAMIC bit instead of bfd_count_sections.
3333 2017-06-19 Nick Clifton <nickc@redhat.com>
3336 * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record
3338 (evax_bfd_print_eeom): Likewise.
3339 (evax_bfd_print_egsd): Check for an overlarge record length.
3340 (evax_bfd_print_etir): Likewise.
3342 2017-06-19 Nick Clifton <nickc@redhat.com>
3345 * libieee.h (struct common_header_type): Add end_p field.
3346 * ieee.c (this_byte_and_next): Do not advance input_p beyond
3348 (read_id): Check for a length that exceeds the remaining bytes in
3350 (ieee_seek): Initialise end_p.
3351 (ieee_archive_p): Likewise.
3352 (ieee_object_p): Likewise.
3354 2017-06-19 Nick Clifton <nickc@redhat.com>
3357 * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset
3358 before reading the EIHS structure entries.
3360 2017-06-19 Nick Clifton <nickc@redhat.com>
3363 * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for
3364 gsd_size. Check that there are enough bytes remaining to read the
3365 type and size of the next egsd. Check that the size of the egsd
3366 does not exceed the size of the record.
3368 2017-06-19 Alan Modra <amodra@gmail.com>
3370 * config.bfd: Correct targ_underscore for cris.
3372 2017-06-18 Alan Modra <amodra@gmail.com>
3374 * config.bfd: Correct targ_underscore for epiphany, ip2k,
3375 m32c, mn10200, pru, rl78, rx, crisv32 and v850.
3377 2017-06-16 Nick Clifton <nickc@redhat.com>
3379 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
3380 bucketlist is empty because there are no symbols to add to the
3383 2017-06-16 Alan Modra <amodra@gmail.com>
3389 * targets.c (struct bfd_target): Add _bfd_define_start_stop.
3390 (BFD_JUMP_TABLE_LINK): Likewise.
3391 * elf-bfd.h (bfd_elf_define_start_stop): Declare.
3392 * elflink.c (_bfd_elf_gc_mark_rsec): Update comment.
3393 (bfd_elf_define_start_stop): New function.
3394 * linker.c (bfd_generic_define_start_stop): New function.
3395 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init
3397 * aout-adobe.c (aout_32_bfd_define_start_stop): Define.
3398 * aout-target.h (MY_bfd_define_start_stop): Define.
3399 * aout-tic30.c (MY_bfd_define_start_stop): Define.
3400 * binary.c (binary_bfd_define_start_stop): Define.
3401 * bout.c (b_out_bfd_define_start_stop): Define.
3402 * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define.
3403 * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define.
3404 * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define.
3405 * coffcode.h (coff_bfd_define_start_stop): Define.
3406 * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define.
3407 * i386msdos.c (msdos_bfd_define_start_stop): Define.
3408 * i386os9k.c (os9k_bfd_define_start_stop): Define.
3409 * ieee.c (ieee_bfd_define_start_stop): Define.
3410 * ihex.c (ihex_bfd_define_start_stop): Define.
3411 * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define.
3412 * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define.
3413 * mmo.c (mmo_bfd_define_start_stop): Define.
3414 * nlm-target.h (nlm_bfd_define_start_stop): Define.
3415 * oasys.c (oasys_bfd_define_start_stop): Define.
3416 * pef.c (bfd_pef_bfd_define_start_stop): Define.
3417 * plugin.c (bfd_plugin_bfd_define_start_stop): Define.
3418 * ppcboot.c (ppcboot_bfd_define_start_stop): Define.
3419 * som.c (som_bfd_define_start_stop): Define.
3420 * srec.c (srec_bfd_define_start_stop): Define.
3421 * tekhex.c (tekhex_bfd_define_start_stop): Define.
3422 * versados.c (versados_bfd_define_start_stop): Define.
3423 * vms-alpha.c (vms_bfd_define_start_stop): Define.
3424 (alpha_vms_bfd_define_start_stop): Define.
3425 * xsym.c (bfd_sym_bfd_define_start_stop): Define.
3426 * bfd-in2.h: Regenerate.
3427 * libbfd.h: Regenerate.
3429 2017-06-16 Jiong Wang <jiong.wang@arm.com>
3431 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
3432 SYMBOL_REFERENCES_LOCAL.
3434 2017-06-15 Jiong Wang <jiong.wang@arm.com>
3437 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
3438 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
3439 runtime for if there needs copy relocation elimination.
3440 (need_copy_relocation_p): New function. Return true for symbol with
3441 pc-relative references and if it's against read-only sections.
3442 (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
3443 (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
3444 that are related with accessing external objects.
3445 (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change
3446 in elfNN_aarch64_check_relocs.
3448 2017-06-15 Nick Clifton <nickc@redhat.com>
3451 * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
3454 (ieee_archive_p): Likewise.
3456 2017-06-15 Nick Clifton <nickc@redhat.com>
3459 * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
3461 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
3463 * elf32-xtensa.c (elf_xtensa_be_plt_entry,
3464 elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays,
3465 keep both windowed and call0 ABI PLT definitions.
3466 (elf_xtensa_create_plt_entry): Use selected ABI to choose upper
3467 elf_xtensa_*_plt_entry endex.
3468 (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size.
3470 2017-06-14 Nick Clifton <nickc@redhat.com>
3473 * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
3476 2017-06-14 Nick Clifton <nickc@redhat.com>
3479 * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
3480 maximum value for the ascic pointer. Check that name processing
3481 does not read beyond this value.
3482 (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
3485 2017-06-14 Nick Clifton <nickc@redhat.com>
3488 * versados.c (versados_mkobject): Zero the allocated tdata structure.
3489 (process_otr): Check for an invalid offset in the otr structure.
3491 2017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
3493 * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
3495 2017-06-13 H.J. Lu <hongjiu.lu@intel.com>
3501 * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
3502 vtable field to a union.
3503 (_bfd_elf_is_start_stop): Removed.
3504 * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
3505 __start_SECNAME and __stop_SECNAME symbols.
3506 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
3507 * elflink.c (_bfd_elf_is_start_stop): Removed.
3508 (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
3509 _bfd_elf_is_start_stop.
3510 (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
3511 __stop_SECNAME symbols. Updated.
3512 (elf_gc_smash_unused_vtentry_relocs): Likewise.
3513 (bfd_elf_gc_record_vtinherit): Likewise.
3514 (bfd_elf_gc_record_vtentry): Likewise.
3516 2017-06-13 Nick Clifton <nickc@redhat.com>
3519 * elflink.c (elf_link_adjust_relocs): Generate an error when
3520 encountering a reloc against a symbol removed by garbage
3523 2017-06-12 H.J. Lu <hongjiu.lu@intel.com>
3525 * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
3526 to merge_gnu_properties.
3527 * elf-properties.c (elf_merge_gnu_properties): Add struct
3528 bfd_link_info * and pass it to merge_gnu_properties.
3529 (elf_merge_gnu_property_list): Add struct bfd_link_info *
3530 and pass it to elf_merge_gnu_properties.
3531 (_bfd_elf_link_setup_gnu_properties): Pass info to
3532 elf_merge_gnu_property_list.
3533 * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
3535 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
3537 2017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
3540 * binary.c (binary_set_section_contents): Scale lma by octets
3541 per byte to set filepos.
3543 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3545 * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
3548 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3550 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
3553 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3555 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
3556 patched section contents for TLS IE reloc.
3557 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
3559 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3561 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
3562 RELOC_FOR_GLOBAL_SYMBOL macro.
3564 2018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3566 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
3569 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3571 * config/tc-arc.c (md_undefined_symbol): Changed.
3572 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
3574 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3576 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
3579 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3581 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
3582 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
3584 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3586 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
3589 2017-06-08 Richard Earnshaw <rearnsha@arm.com>
3591 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
3592 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
3593 is non-zero. Add clarifying comments.
3595 2017-06-08 H.J. Lu <hongjiu.lu@intel.com>
3597 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
3598 name. Use local IFUNC symbol name string to report unsupported
3599 non-PIC call to IFUNC function.
3600 (elf_i386_relocate_section): Dump local IFUNC name with minfo
3601 when generating R_386_IRELATIVE relocation.
3602 (elf_i386_finish_dynamic_symbol): Likewise.
3603 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
3605 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
3606 when generating R_X86_64_IRELATIVE relocation.
3607 (elf_x86_64_finish_dynamic_symbol): Likewise.
3609 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
3611 * elf.c (setup_group): Make sure BFD sections are created for all
3612 group sections in the input file when processing SHF_GROUP
3614 (bfd_section_from_shdr): Avoid duplicating logic already
3615 implemented in `setup_group'.
3617 2017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
3620 * peXXigen.c (pe_print_idata): Use the address of the first thunk
3621 if the hint address is zero.
3623 2017-06-06 James Clarke <jrtc27@jrtc27.com>
3626 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
3627 ELF_COMMON_DEF_P for common symbols.
3629 2017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
3631 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
3632 SEC_GROUP sections as SEC_EXCLUDE.
3633 (bfd_elf_set_group_contents): Replace use of abort with an assert.
3634 (assign_section_numbers): Use resolve_section_groups flag instead
3635 of relocatable link type.
3636 (_bfd_elf_init_private_section_data): Use resolve_section_groups
3637 flag instead of checking the final_link flag for part of the
3638 checks in here. Fix white space as a result.
3639 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
3640 instead of relocatable link type.
3641 (bfd_elf_final_link): Likewise.
3643 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
3645 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
3647 * elf32-score.c (score_elf_final_link_relocate): Likewise.
3648 (s3_bfd_score_elf_check_relocs): Likewise.
3649 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
3650 (score_elf_final_link_relocate): Likewise.
3651 (s7_bfd_score_elf_check_relocs): Likewise.
3653 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
3655 * elflink.c (init_reloc_cookie_rels): Remove unused variable
3658 2017-06-06 Maciej W. Rozycki <macro@imgtec.com>
3660 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
3661 from `reloc_count' rather than decrementing it.
3662 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
3663 `reloc_count' by `int_rels_per_ext_rel'.
3664 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
3665 `reloc_count' by `int_rels_per_ext_rel' for last relocation
3666 entry determination.
3667 (s3_bfd_score_elf_check_relocs): Likewise.
3668 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
3669 (s7_bfd_score_elf_relocate_section): Likewise.
3670 (s7_bfd_score_elf_check_relocs): Likewise.
3671 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
3672 prototype and function.
3673 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
3674 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
3675 triple rather than once the sum of REL and RELA relocation entry
3677 (bfd_elf64_get_reloc_upper_bound): Remove macro.
3678 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
3679 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
3680 storage allocation size determination.
3681 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
3682 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
3683 by `int_rels_per_ext_rel' for last relocation entry
3685 (bfd_elf_final_link): Do not multiply `reloc_count' by
3686 `int_rels_per_ext_rel' for internal relocation storage
3687 allocation size determination.
3688 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
3689 `int_rels_per_ext_rel' for last relocation entry determination.
3690 (elf_gc_smash_unused_vtentry_relocs): Likewise.
3691 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
3692 (_bfd_mips_elf_relocate_section): Likewise.
3694 2017-06-05 Alan Modra <amodra@gmail.com>
3697 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
3699 2017-06-01 John Baldwin <jhb@FreeBSD.org>
3701 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
3702 determine structure sizes.
3703 (elfcore_grok_freebsd_prstatus): Likewise.
3705 2017-06-01 Alan Modra <amodra@gmail.com>
3707 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
3708 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
3710 (is_elfv2_localentry0): New function.
3711 (ppc64_elf_tls_setup): Default params->plt_localentry0.
3712 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
3713 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
3714 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
3715 optimized localentry:0 stubs.
3716 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
3717 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
3719 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
3721 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
3723 2017-05-30 Casey Smith <clegg89@gmail.com>
3726 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
3727 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
3729 2017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
3731 * cpu-arc.c (arc_compatible): New function.
3733 2017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
3735 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
3737 2017-05-30 H.J. Lu <hongjiu.lu@intel.com>
3740 * bfdio.c (bfd_get_file_size): New function.
3741 * bfd-in2.h: Regenerated.
3743 2017-05-23 Dilian Palauzov <git-dpa@aegee.org>
3745 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
3748 2017-05-22 H.J. Lu <hongjiu.lu@intel.com>
3750 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
3751 dynobj instead of htab->elf.dynobj.
3753 2017-05-19 Maciej W. Rozycki <macro@imgtec.com>
3755 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
3757 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
3758 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
3759 actual number of internal relocations retrieved. Adjust
3760 function description.
3761 (bfd_elf64_canonicalize_reloc): Remove macro.
3762 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
3764 2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
3766 * archures.c (bfd_mach_sparc_v9m8): Define.
3767 (bfd_mach_sparc_v8plusm8): Likewise.
3768 (bfd_mach_sparc_v9_p): Adjust to M8.
3769 (bfd_mach_sparc_64bit_p): Likewise.
3770 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
3771 bfd_mach_sparc_v8plusm8.
3772 * bfd-in2.h: Regenerated.
3773 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
3775 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
3776 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
3777 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
3779 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
3780 bfd_mach_sparc_v8plusm8.
3782 2017-05-19 Alan Modra <amodra@gmail.com>
3784 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
3785 debug and special sections when no non-note alloc sections in an
3788 2017-05-18 Alan Modra <amodra@gmail.com>
3790 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
3791 * elf-m10300.c: Likewise.
3793 * elf32-arc.c: Likewise.
3794 * elf32-bfin.c: Likewise.
3795 * elf32-m68k.c: Likewise.
3796 * elf32-nds32.c: Likewise.
3797 * elf32-tilepro.c: Likewise.
3798 * elflink.c: Likewise.
3799 * elfnn-aarch64.c: Likewise.
3800 * elfnn-riscv.c: Likewise.
3801 * elfxx-tilegx.c: Likewise.
3802 * mach-o.c: Likewise.
3803 * peXXigen.c: Likewise.
3804 * vms-alpha.c: Likewise.
3805 * vms-lib.c: Likewise.
3807 2017-05-17 H.J. Lu <hongjiu.lu@intel.com>
3810 * elflink.c (elf_gc_mark_debug_section): New function.
3811 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
3812 referenced by kept debug sections.
3814 2017-05-16 Alan Modra <amodra@gmail.com>
3816 * elf-m10300.c: Rename occurrences of non_ir_ref.
3817 * elf32-arm.c: Likewise.
3818 * elf32-bfin.c: Likewise.
3819 * elf32-cr16.c: Likewise.
3820 * elf32-cris.c: Likewise.
3821 * elf32-d10v.c: Likewise.
3822 * elf32-dlx.c: Likewise.
3823 * elf32-fr30.c: Likewise.
3824 * elf32-frv.c: Likewise.
3825 * elf32-hppa.c: Likewise.
3826 * elf32-i370.c: Likewise.
3827 * elf32-i386.c: Likewise.
3828 * elf32-iq2000.c: Likewise.
3829 * elf32-lm32.c: Likewise.
3830 * elf32-m32c.c: Likewise.
3831 * elf32-m32r.c: Likewise.
3832 * elf32-m68hc1x.c: Likewise.
3833 * elf32-m68k.c: Likewise.
3834 * elf32-mcore.c: Likewise.
3835 * elf32-metag.c: Likewise.
3836 * elf32-microblaze.c: Likewise.
3837 * elf32-moxie.c: Likewise.
3838 * elf32-msp430.c: Likewise.
3839 * elf32-mt.c: Likewise.
3840 * elf32-nios2.c: Likewise.
3841 * elf32-or1k.c: Likewise.
3842 * elf32-ppc.c: Likewise.
3843 * elf32-rl78.c: Likewise.
3844 * elf32-s390.c: Likewise.
3845 * elf32-score.c: Likewise.
3846 * elf32-score7.c: Likewise.
3847 * elf32-sh.c: Likewise.
3848 * elf32-tic6x.c: Likewise.
3849 * elf32-tilepro.c: Likewise.
3850 * elf32-v850.c: Likewise.
3851 * elf32-vax.c: Likewise.
3852 * elf32-xstormy16.c: Likewise.
3853 * elf32-xtensa.c: Likewise.
3854 * elf64-alpha.c: Likewise.
3855 * elf64-hppa.c: Likewise.
3856 * elf64-ia64-vms.c: Likewise.
3857 * elf64-mmix.c: Likewise.
3858 * elf64-ppc.c: Likewise.
3859 * elf64-s390.c: Likewise.
3860 * elf64-sh64.c: Likewise.
3861 * elf64-x86-64.c: Likewise.
3862 * elflink.c: Likewise.
3863 * elfnn-aarch64.c: Likewise.
3864 * elfnn-ia64.c: Likewise.
3865 * elfnn-riscv.c: Likewise.
3866 * elfxx-mips.c: Likewise.
3867 * elfxx-sparc.c: Likewise.
3868 * elfxx-tilegx.c: Likewise.
3869 * linker.c: Likewise.
3871 2017-05-16 Alan Modra <amodra@gmail.com>
3873 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
3874 * elflink.c (elf_link_add_object_symbols): Update to use
3876 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
3878 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
3880 2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
3882 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
3884 2017-05-12 H.J. Lu <hongjiu.lu@intel.com>
3886 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
3887 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
3889 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3891 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
3893 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
3895 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
3896 to plt_second/plt_second_eh_frame.
3897 (elf_x86_64_link_hash_newfunc): Updated.
3898 (elf_x86_64_allocate_dynrelocs): Likewise.
3899 (elf_x86_64_size_dynamic_sections): Likewise.
3900 (elf_x86_64_relocate_section): Likewise.
3901 (elf_x86_64_finish_dynamic_symbol): Likewise.
3902 (elf_x86_64_finish_dynamic_sections): Likewise.
3903 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
3904 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
3906 (elf_backend_setup_gnu_properties): Updated. Create the
3907 .plt.sec section instead of the .plt.sec section.
3909 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
3911 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
3912 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
3913 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
3915 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
3917 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
3918 (bfd_elf64_set_reloc): Define.
3919 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
3921 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
3923 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
3924 (struct bfd_target): New field _bfd_set_reloc.
3925 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
3926 * reloc.c (_bfd_generic_set_reloc): New function.
3927 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
3928 * nlm-target.h (nlm_set_reloc): Likewise.
3929 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
3930 * aout-tic30.c (MY_set_reloc): Likewise.
3931 * aout-target.h (MY_set_reloc): Likewise.
3932 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
3933 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
3934 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
3935 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
3936 * aout-adobe.c (aout_32_set_reloc): Likewise.
3937 * bout.c (b_out_set_reloc): Likewise.
3938 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
3939 * i386os9k.c (aout_32_set_reloc): Likewise.
3940 * ieee.c (ieee_set_reloc): Likewise.
3941 * oasys.c (oasys_set_reloc): Likewise.
3942 * som.c (som_set_reloc): Likewise.
3943 * versados.c (versados_set_reloc): Likewise.
3944 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
3945 _bfd_generic_set_reloc.
3946 (rs6000_xcoff64_aix_vec): LIkewise.
3947 * libbfd.c (_bfd_norelocs_set_reloc): New function.
3948 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
3949 * i386msdos.c (msdos_set_reloc): Define to
3950 _bfd_norelocs_set_reloc.
3951 * elfcode.h (elf_set_reloc): Define.
3952 * bfd-in2.h: Regenerated.
3954 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
3957 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
3958 for IFUNC function address.
3960 2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
3962 * elf32-arc.c (FEATURE_LIST_NAME): Define.
3963 (CONFLICT_LIST): Likewise.
3964 (opcode/arc-attrs.h): Include.
3965 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
3966 (arc_extract_features): New file.
3967 (arc_stralloc): Likewise.
3968 (arc_elf_merge_attributes): Likewise.
3969 (arc_elf_merge_private_bfd_data): Use object attributes.
3970 (bfd_arc_get_mach_from_attributes): New function.
3971 (arc_elf_object_p): Use object attributes.
3972 (arc_elf_final_write_processing): Likewise.
3973 (elf32_arc_obj_attrs_arg_type): New function.
3974 (elf32_arc_obj_attrs_handle_unknown): Likewise.
3975 (elf32_arc_section_from_shdr): Likewise.
3976 (elf_backend_obj_attrs_vendor): Define.
3977 (elf_backend_obj_attrs_section): Likewise.
3978 (elf_backend_obj_attrs_arg_type): Likewise.
3979 (elf_backend_obj_attrs_section_type): Likewise.
3980 (elf_backend_obj_attrs_handle_unknown): Likewise.
3981 (elf_backend_section_from_shdr): Likewise.
3983 2017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
3986 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
3987 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
3988 and the destination is a Thumb symbol.
3990 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
3992 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
3993 initializer to silence GCC 4.2.
3994 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
3996 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
3998 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
3999 (LAZY_PLT_ENTRY_SIZE): This.
4000 (NON_LAZY_PLT_ENTRY_SIZE): New.
4001 (elf_x86_64_plt0_entry): Renamed to ...
4002 (elf_x86_64_lazy_plt0_entry): This.
4003 (elf_x86_64_plt_entry): Renamed to ...
4004 (elf_x86_64_lazy_plt_entry): This.
4005 (elf_x86_64_bnd_plt0_entry): Renamed to ...
4006 (elf_x86_64_lazy_bnd_plt0_entry): This.
4007 (elf_x86_64_legacy_plt_entry): Removed.
4008 (elf_x86_64_bnd_plt_entry): Renamed to ...
4009 (elf_x86_64_lazy_bnd_plt_entry): This.
4010 (elf_x86_64_legacy_plt2_entry): Renamed to ...
4011 (elf_x86_64_non_lazy_plt_entry): This.
4012 (elf_x86_64_bnd_plt2_entry): Renamed to ...
4013 (elf_x86_64_non_lazy_bnd_plt_entry): This.
4014 (elf_x86_64_eh_frame_plt): Renamed to ...
4015 (elf_x86_64_eh_frame_lazy_plt): This.
4016 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
4017 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
4018 (elf_x86_64_eh_frame_plt_got): Renamed to ...
4019 (elf_x86_64_eh_frame_non_lazy_plt): This.
4020 (elf_x86_64_lazy_plt_layout): New.
4021 (elf_x86_64_non_lazy_plt_layout): Likewise.
4022 (elf_x86_64_plt_layout): Likewise.
4023 (elf_x86_64_backend_data): Remove PLT layout information. Add
4024 os for target system.
4025 (GET_PLT_ENTRY_SIZE): Removed.
4026 (elf_x86_64_lazy_plt): New.
4027 (elf_x86_64_non_lazy_plt): Likewise.
4028 (elf_x86_64_lazy_bnd_plt): Likewise.
4029 (elf_x86_64_non_lazy_bnd_plt): Likewise.
4030 (elf_x86-64_arch_bed): Updated.
4031 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
4032 (elf_x86_64_create_dynamic_sections): Removed.
4033 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
4034 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
4035 (elf_x86-64_adjust_dynamic_symbol): Updated.
4036 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
4037 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
4038 size for PLT0 if there is no PLT0. Get plt_entry_size from
4039 non_lazy_plt for non-lazy PLT entries.
4040 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
4041 from non_lazy_plt for non-lazy PLT entries.
4042 (elf_x86-64_relocate_section): Updated. Properly get PLT index
4043 if there is no PLT0.
4044 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
4045 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
4046 entries with non-lazy PLT layout. Don't fill the second and third
4047 slots in the PLT entry if there is no PLT0.
4048 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
4049 if there is no PLT0. Set sh_entsize on the .plt.got section.
4050 (compare_relocs): New.
4051 (elf_x86_64_plt_type): Likewise.
4052 (elf_x86_64_plt): Likewise.
4053 (elf_x86_64_nacl_plt): New. Forward declaration.
4054 (elf_x86_64_get_plt_sym_val): Removed.
4055 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
4056 against all dynamic relocations.
4057 (elf_x86_64_link_setup_gnu_properties): New function.
4058 (elf_backend_create_dynamic_sections): Updated.
4059 (elf_backend_setup_gnu_properties): New.
4060 (elf_x86_64_nacl_plt): New.
4061 (elf_x86_64_nacl_arch_bed): Updated.
4063 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
4065 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
4066 (LAZY_PLT_ENTRY_SIZE): This.
4067 (NON_LAZY_PLT_ENTRY_SIZE): New.
4068 (elf_i386_plt0_entry): Renamed to ...
4069 (elf_i386_lazy_plt0_entry): This.
4070 (elf_i386_plt_entry): Renamed to ...
4071 (elf_i386_lazy_plt_entry): This.
4072 (elf_i386_pic_plt0_entry): Renamed to ...
4073 (elf_i386_pic_lazy_plt0_entry): This.
4074 (elf_i386_pic_plt_entry): Renamed to ...
4075 (elf_i386_pic_lazy_plt_entry): This.
4076 (elf_i386_got_plt_entry): Renamed to ...
4077 (elf_i386_non_lazy_plt_entry): This.
4078 (elf_i386_pic_got_plt_entry): Renamed to ...
4079 (elf_i386_pic_non_lazy_plt_entry): This.
4080 (elf_i386_eh_frame_plt): Renamed to ...
4081 (elf_i386_eh_frame_lazy_plt): This.
4082 (elf_i386_eh_frame_plt_got): Renamed to ...
4083 (elf_i386_eh_frame_non_lazy_plt): This.
4084 (elf_i386_plt_layout): Renamed to ...
4085 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
4086 eh_frame_plt_got_size.
4087 (elf_i386_non_lazy_plt_layout): New.
4088 (elf_i386_plt_layout): Likewise.
4089 (elf_i386_non_lazy_plt): Likewise.
4090 (GET_PLT_ENTRY_SIZE): Removed.
4091 (elf_i386_plt): Renamed to ...
4092 (elf_i386_lazy_plt): This.
4093 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
4094 (elf_i386_arch_bed): Updated.
4095 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
4096 (elf_i386_create_dynamic_sections): Removed.
4097 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
4098 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
4099 (elf_i386_adjust_dynamic_symbol): Updated.
4100 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
4101 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
4102 size for PLT0 if there is no PLT0.
4103 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
4104 output section is discarded only if GOT isn't empty.
4105 (elf_i386_relocate_section): Updated. Properly get PLT index
4106 if there is no PLT0.
4107 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
4108 second and third slots in the PLT entry if there is no PLT0.
4109 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
4110 if there is no PLT0. Set sh_entsize on the .plt.got section.
4111 (elf_i386_nacl_plt): Forward declaration.
4112 (elf_i386_get_plt_sym_val): Removed.
4113 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
4114 against all dynamic relocations.
4115 (elf_i386_link_setup_gnu_properties): New function.
4116 (elf_backend_create_dynamic_sections): Updated.
4117 (elf_backend_setup_gnu_properties): New.
4118 (elf_i386_nacl_plt): Updated.
4119 (elf_i386_nacl_arch_bed): Likewise.
4120 (elf_i386_vxworks_arch_bed): Likewise.
4122 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
4124 * elflink.c (elf_output_implib): Remove executable flag from import
4126 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
4127 library is a relocatable object file.
4129 2017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
4132 * elf32-avr.c (avr_should_move_sym): New function.
4133 (avr_should_reduce_sym_size): Likewise.
4134 (avr_should_increase_sym_size): Likewise.
4135 (elf32_avr_relax_delete_bytes): Adjust symbol values
4136 and sizes by calling new functions.
4138 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
4140 * config.bfd (riscv32-*): Enable rv64.
4142 2017-05-02 Alan Modra <amodra@gmail.com>
4145 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
4146 rather than h->root.type == bfd_link_hash_new.
4147 (bfd_elf_record_link_assignment): Similarly, call
4148 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
4150 2017-04-29 Alan Modra <amodra@gmail.com>
4153 * reloc.c (reloc_offset_in_range): New function.
4154 (bfd_perform_relocation, bfd_install_relocation): Use it.
4155 (_bfd_final_link_relocate): Likewise.
4157 2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
4159 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
4160 before using .plt.got.
4161 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
4163 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
4165 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
4166 instead of "+=" to update 0.
4168 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
4170 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
4171 .plt.got section here.
4172 (elf_i386_check_relocs): Don't create the .plt.got section.
4173 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
4174 the .plt.got and .plt.bnd sections here.
4175 (elf_x86_64_check_relocs): Don't create the .plt.got nor
4178 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
4180 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
4182 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
4183 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
4184 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
4185 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
4188 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
4190 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
4192 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
4193 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
4194 the first relocatable ELF input with GNU properties.
4196 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
4198 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
4199 VxWorks for non-PIC.
4201 2017-04-27 Alan Modra <amodra@gmail.com>
4203 * elf-bfd.h (struct elf_backend_data): Make asection param of
4204 elf_backend_eh_frame_address_size const.
4205 (_bfd_elf_eh_frame_address_size): Likewise.
4206 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
4207 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
4208 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
4209 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
4210 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
4211 (next_cie_fde_offset): Constify params.
4212 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
4214 2017-04-27 Alan Modra <amodra@gmail.com>
4216 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
4217 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
4218 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
4220 (offset_adjust): New function.
4221 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
4222 (adjust_eh_frame_local_symbols): Likewise.
4223 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
4224 after changing anything. Return true if anything changed.
4225 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
4226 _bfd_elf_adjust_eh_frame_global_symbol for globals.
4228 2017-04-27 Alan Modra <amodra@gmail.com>
4230 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
4233 2017-04-27 Alan Modra <amodra@gmail.com>
4235 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
4236 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
4237 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
4238 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
4239 for undef and undefweak dyn_relocs.
4240 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
4241 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
4242 (allocate_got, allocate_dynrelocs): Likewise.
4243 (ppc64_elf_relocate_section): Likewise.
4245 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
4247 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
4248 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
4249 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
4250 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
4252 2017-04-26 Nick Clifton <nickc@redhat.com>
4255 * reloc.c (bfd_perform_relocation): Check for a negative address
4258 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
4261 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
4263 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
4264 (elf_backend_always_renumber_dynsyms): Define.
4265 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
4266 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
4267 * elflink.c (bfd_elf_size_dynamic_sections): Also call
4268 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
4270 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
4272 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
4274 * elflink.c (bfd_elf_size_dynamic_sections): Only call
4275 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
4276 sections have been created.
4278 2017-04-26 Nick Clifton <nickc@redhat.com>
4281 * compress.c (bfd_init_section_compress_status): Check the return
4282 value from bfd_malloc.
4284 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
4286 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
4287 no_finish_dynamic_symbol.
4288 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
4290 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
4291 weak symbol, don't make it dynamic.
4292 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
4293 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
4294 relocation for GOT reference.
4295 (elf_x86_64_finish_dynamic_symbol): Abort if
4296 no_finish_dynamic_symbol isn't 0.
4298 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
4301 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
4302 undefined weak symbol, don't make it dynamic.
4303 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
4304 set no_finish_dynamic_symbol and generate R_386_RELATIVE
4305 relocation for R_386_GOT32.
4307 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
4310 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
4312 2017-04-23 Alan Modra <amodra@gmail.com>
4315 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
4316 * elf.c (lcomm_sym): New.
4317 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
4318 * bfd-in2.h: Regenerate.
4320 2017-04-23 Alan Modra <amodra@gmail.com>
4323 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
4324 parameters and comment.
4325 (_bfd_elf_get_reloc_section): Delete.
4326 (_bfd_elf_plt_get_reloc_section): Declare.
4327 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
4328 New functions. Don't blindly skip over assumed .rel/.rela prefix.
4330 (_bfd_elf_get_reloc_section): ..here. Delete.
4331 (assign_section_numbers): Call elf_get_reloc_section.
4332 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
4333 * elfxx-target.h (elf_backend_get_reloc_section): Update.
4335 2017-04-23 Alan Modra <amodra@gmail.com>
4338 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
4341 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
4344 * elf32-i386.c (elf_i386_link_hash_entry): Add
4345 no_finish_dynamic_symbol.
4346 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
4347 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
4348 symbol, don't make it dynamic in PIE.
4349 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
4350 set no_finish_dynamic_symbol and generate R_386_RELATIVE
4351 relocation for R_386_GOT32
4352 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
4355 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
4359 * elflink.c (elf_link_add_object_symbols): Require
4360 --no-dynamic-linker with -E/--dynamic-list when creating
4363 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
4365 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
4368 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
4370 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
4371 dynamic symbol sorting.
4373 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
4376 * elflink.c (elf_link_add_object_symbols): Preserve
4377 dynamic_ref_after_ir_def when restoring the symbol table for
4378 unneeded dynamic object.
4380 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
4383 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
4384 on on undefined IFUNC symbol in the second PLT.
4386 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
4388 * peXXigen.c (pe_print_reloc): Correct chunk_end.
4390 2017-04-19 Alan Modra <amodra@gmail.com>
4392 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
4393 or make dynamic for info->dynamic_undefined_weak 0 and 1.
4394 * elf32-ppc.c:Formatting.
4395 (ensure_undefweak_dynamic): Don't make dynamic when
4396 info->dynamic_undefined_weak is zero.
4397 (allocate_dynrelocs): Discard undefweak dyn_relocs for
4398 info->dynamic_undefined_weak. Discard undef dyn_relocs when
4399 not default visibility. Discard undef and undefweak
4401 (ppc_elf_relocate_section): Adjust to suit.
4402 * elf64-ppc.c: Formatting.
4403 (ensure_undefweak_dynamic): Don't make dynamic when
4404 info->dynamic_undefined_weak is zero.
4405 (allocate_dynrelocs): Discard undefweak dyn_relocs for
4406 info->dynamic_undefined_weak. Discard them earlier.
4408 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
4411 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
4412 before generating the version definition section.
4414 2017-04-17 Alan Modra <amodra@gmail.com>
4416 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
4417 state when a regular object file defines a symbol with
4418 incompatible type to that defined by an earlier shared lib.
4420 2017-04-13 Alan Modra <amodra@gmail.com>
4422 * coffcode.h: Wrap some overly long _bfd_error_handler args.
4424 * elf32-arm.c: Likewise.
4425 * elf32-i386.c: Likewise.
4426 * elf32-mep.c: Likewise.
4427 * elf64-ia64-vms.c: Likewise.
4428 * elf64-x86-64.c: Likewise.
4429 * elflink.c: Likewise.
4430 * elfnn-ia64.c: Likewise.
4431 * elfxx-mips.c: Likewise.
4433 2017-04-13 Alan Modra <amodra@gmail.com>
4435 * aoutx.h: Use %B and %A in error messages throughout file.
4436 * aout-cris.c: Likewise.
4437 * archive.c: Likewise.
4438 * binary.c: Likewise.
4439 * coff-rs6000.c: Likewise.
4440 * coff-tic4x.c: Likewise.
4441 * coffcode.h: Likewise.
4442 * coffgen.c: Likewise.
4443 * cofflink.c: Likewise.
4444 * coffswap.h: Likewise.
4445 * cpu-arm.c: Likewise.
4446 * elf-eh-frame.c: Likewise.
4447 * elf-m10300.c: Likewise.
4449 * elf32-arc.c: Likewise.
4450 * elf32-arm.c: Likewise.
4451 * elf32-bfin.c: Likewise.
4452 * elf32-frv.c: Likewise.
4453 * elf32-iq2000.c: Likewise.
4454 * elf32-m32c.c: Likewise.
4455 * elf32-microblaze.c: Likewise.
4456 * elf32-nds32.c: Likewise.
4457 * elf32-rl78.c: Likewise.
4458 * elf32-rx.c: Likewise.
4459 * elf32-score.c: Likewise.
4460 * elf32-score7.c: Likewise.
4461 * elf32-sh64.c: Likewise.
4462 * elf32-v850.c: Likewise.
4463 * elf32-vax.c: Likewise.
4464 * elf32-visium.c: Likewise.
4465 * elf64-ia64-vms.c: Likewise.
4466 * elf64-mmix.c: Likewise.
4467 * elf64-sh64.c: Likewise.
4468 * elfcode.h: Likewise.
4469 * elfnn-aarch64.c: Likewise.
4470 * elfnn-ia64.c: Likewise.
4471 * elfxx-mips.c: Likewise.
4472 * hpux-core.c: Likewise.
4475 * linker.c: Likewise.
4476 * merge.c: Likewise.
4478 * oasys.c: Likewise.
4479 * pdp11.c: Likewise.
4480 * peXXigen.c: Likewise.
4481 * rs6000-core.c: Likewise.
4482 * vms-alpha.c: Likewise.
4483 * xcofflink.c: Likewise.
4485 2017-04-13 Alan Modra <amodra@gmail.com>
4487 * bfd.c (PRINT_TYPE): Define.
4488 (_doprnt): New function.
4489 (error_handler_internal): Use _doprnt.
4490 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
4491 calls in their natural order, throughout file.
4492 * coff-mcore.c: Likewise.
4493 * coff-ppc.c: Likewise.
4494 * coff-tic80.c: Likewise.
4495 * cofflink.c: Likewise.
4496 * elf-s390-common.c: Likewise.
4498 * elf32-arm.c: Likewise.
4499 * elf32-i386.c: Likewise.
4500 * elf32-m32r.c: Likewise.
4501 * elf32-msp430.c: Likewise.
4502 * elf32-spu.c: Likewise.
4503 * elf64-ia64-vms.c: Likewise.
4504 * elf64-sparc.c: Likewise.
4505 * elf64-x86-64.c: Likewise.
4506 * elflink.c: Likewise.
4507 * elfnn-aarch64.c: Likewise.
4508 * elfnn-ia64.c: Likewise.
4509 * elfxx-mips.c: Likewise.
4511 2017-04-13 Alan Modra <amodra@gmail.com>
4513 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
4514 branch veneers" error. Fix double space and format message.
4515 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
4516 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
4518 2017-04-13 Alan Modra <amodra@gmail.com>
4520 * bfd-in2.h: Regenerate.
4522 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
4524 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
4525 extra `\n' in warning/error messages.
4526 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
4527 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
4529 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
4531 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
4532 processor-specific properties with generic ELF target vector.
4534 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
4536 * elf32-sparc.c (elf_backend_fixup_symbol): New.
4537 * elf64-sparc.c (elf_backend_fixup_symbol): New.
4538 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
4539 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
4541 (link_hash_newfunc): Initialize has_got_reloc and
4543 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
4545 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
4547 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
4549 (_bfd_sparc_elf_fixup_symbol): New function.
4550 (allocate_dynrelocs): Don't allocate space for dynamic
4551 relocations and discard relocations against resolved undefined
4552 weak symbols in executable. Don't make resolved undefined weak
4553 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
4554 relocation against undefined weak symbols in PIE.
4555 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
4556 relocations against resolved undefined weak symbols in PIE
4557 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
4558 without ynamic PLT/GOT relocations for resolved undefined weak
4560 Don't generate dynamic relocation against resolved undefined
4561 weak symbol in executable.
4562 (pie_finish_undefweak_symbol): New function.
4563 (_bfd_sparc_elf_finish_dynamic_sections): Call
4564 pie_finish_undefweak_symbol on all symbols in PIE.
4565 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
4566 (_bfd_sparc_elf_fixup_symbol): New function.
4568 2017-04-10 Nick Clifton <nickc@redhat.com>
4570 * config.bfd: Remove ns32k from obsolete list.
4572 2017-04-10 Alan Modra <amodra@gmail.com>
4575 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
4576 (special_sections_i): Likewise for .init_array.
4577 (special_sections_p): Likewise for .preinit_array.
4579 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
4583 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
4584 ELF_COMMON_DEF_P for common symbols.
4585 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
4586 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
4587 * elflink.c (_bfd_elf_merge_symbol): Revert commits
4588 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
4589 07492f668d2173da7a2bda3707ff0985e0f460b6.
4591 2017-04-07 Pedro Alves <palves@redhat.com>
4593 * opncls.c (bfd_get_debug_link_info): Rename to...
4594 (bfd_get_debug_link_info_1): ... this. Change type of second
4595 parameter to void pointer. Adjust.
4596 (bfd_get_debug_link_info): Reimplement on top of
4597 bfd_get_debug_link_info_1.
4598 (separate_debug_file_exists, separate_alt_debug_file_exists):
4599 Change type of second parameter to void pointer. Adjust.
4600 (get_func_type, check_func_type): Change type of second parameter
4602 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
4603 the callback functions instead of passing the address of a local.
4604 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
4605 find_separate_debug_file.
4606 (get_alt_debug_link_info_shim): Change type of second parameter to
4607 void pointer. Adjust.
4608 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
4609 find_separate_debug_file.
4610 (get_build_id_name, bfd_boolean check_build_id_file): Change type
4611 of second parameter to void pointer. Adjust.
4612 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
4613 pointer local to find_separate_debug_file.
4615 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
4617 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
4618 external symbols with a definition.
4619 (_bfd_coff_gc_mark_extra_sections): Fix typo.
4621 2017-04-07 Alan Modra <amodra@gmail.com>
4623 * po/SRC-POTFILES.in: Regenerate.
4625 2017-04-05 Alan Modra <amodra@gmail.com>
4627 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
4630 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
4632 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
4633 numbers for DataDirectory entry indicies passed to
4636 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
4638 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
4639 each GNU_MBIND section and align GNU_MBIND section to page size.
4640 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
4641 segment for each GNU_MBIND section.
4642 (_bfd_elf_init_private_section_data): Copy sh_info from input
4643 for GNU_MBIND section.
4645 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
4647 * elfnn-riscv.c (GP_NAME): Delete.
4648 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
4649 (_bfd_riscv_relax_lui): Likewise.
4651 2017-04-04 Nick Clifton <nickc@redhat.com>
4654 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
4656 (bfd_elf_final_link): Only initialize the extended symbol index
4657 section if there are extended symbol tables to list.
4659 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
4661 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
4662 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
4663 * configure.ac (elf): Add elf-properties.lo.
4664 * Makefile.in: Regenerated.
4665 * configure: Likewise.
4666 * elf-bfd.h (elf_property_kind): New.
4667 (elf_property): Likewise.
4668 (elf_property_list): Likewise.
4669 (elf_properties): Likewise.
4670 (_bfd_elf_parse_gnu_properties): Likewise.
4671 (_bfd_elf_get_property): Likewise.
4672 (_bfd_elf_link_setup_gnu_properties): Likewise.
4673 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
4674 and setup_gnu_properties.
4675 (elf_obj_tdata): Add properties.
4676 * elf-properties.c: New file.
4677 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
4678 (elf_i386_merge_gnu_properties): Likewise.
4679 (elf_backend_parse_gnu_properties): Likewise.
4680 (elf_backend_merge_gnu_properties): Likewise.
4681 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
4682 (elf_x86_64_merge_gnu_properties): Likewise.
4683 (elf_backend_parse_gnu_properties): Likewise.
4684 (elf_backend_merge_gnu_properties): Likewise.
4685 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
4686 (elf_backend_parse_gnu_properties): Likewise.
4687 (elf_backend_setup_gnu_properties): Likewise.
4688 (elfNN_bed): Add elf_backend_parse_gnu_properties,
4689 elf_backend_merge_gnu_properties and
4690 elf_backend_setup_gnu_properties.
4692 2017-03-30 Pip Cet <pipcet@gmail.com>
4694 * elf32-wasm32.c: Add relocation code, two relocs.
4695 * reloc.c: Add wasm32 relocations.
4696 * libbfd.h: Regenerate.
4697 * bfd-in2.h: Regenerate.
4698 * bfd/po/bfd.pot: Regenerate.
4700 2017-03-29 Nick Clifton <nickc@redhat.com>
4703 * coff-bfd.h (struct coff_section_data): Add new fields:
4704 saved_bias and bias.
4705 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
4706 computed for PE binaries.
4707 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
4710 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
4713 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
4714 to handle a local symbol with a hash-symbol-entry; without PLT.
4715 Add BFD_ASSERT for an incidental case with GOT entry present.
4716 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
4717 isn't forced-or-set local.
4719 2017-03-27 Pip Cet <pipcet@gmail.com>
4721 * wasm-module.c: New file to support WebAssembly modules.
4722 * wasm-module.h: New file to support WebAssembly modules.
4723 * doc/webassembly.texi: Start documenting wasm-module.c.
4724 * config.bfd: Add wasm_vec.
4725 * targets.c: Likewise.
4726 * configure.ac: Likewise.
4727 * Makefile.am: Add entries for wasm-module.c.
4728 * Makefile.in: Regenerate.
4729 * configure: Regenerate.
4730 * po/SRC-POTFILES.in: Regenerate.
4732 2017-03-27 Pip Cet <pipcet@gmail.com>
4734 * cpu-wasm32.c: New file to support wasm32 architecture.
4735 * elf32-wasm32.c: New file to support wasm32 architecture.
4736 * Makefile.am: Add wasm32 architecture.
4737 * archures.c: Likewise.
4738 * config.bfd: Likewise.
4739 * configure.ac: Likewise.
4740 * targets.c: Likewise.
4741 * Makefile.in: Regenerate.
4742 * bfd-in2.h: Regenerate.
4743 * configure: Regenerate.
4744 * po/SRC-POTFILES.in: Regenerate.
4746 2017-03-20 Alan Modra <amodra@gmail.com>
4749 * elf64-ppc.c (compare_symbols): Stabilize sort.
4751 2017-03-18 Alan Modra <amodra@gmail.com>
4753 * elf64-ppc.c (struct ppc_link_hash_table): Add
4754 local_ifunc_resolver and maybe_local_ifunc_resolver.
4755 (ppc_build_one_stub): Set flags on emitting dynamic
4756 relocation to ifunc.
4757 (ppc64_elf_relocate_section): Likewise.
4758 (ppc64_elf_finish_dynamic_symbol): Likewise.
4759 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
4760 local dynamic relocs to ifuncs.
4761 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
4762 local_ifunc_resolver and maybe_local_ifunc_resolver.
4763 (ppc_elf_relocate_section): Set flag on emitting dynamic
4764 relocation to ifuncs.
4765 (ppc_elf_finish_dynamic_symbol): Likewise.
4766 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
4767 dynamic relocs to ifuncs.
4769 2017-03-13 Nick Clifton <nickc@redhat.com>
4772 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
4773 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
4774 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
4775 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
4776 * bfd-in2.h: Regenerate.
4777 * libbfd.h: Regenerate.
4778 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
4780 (IS_AARCH64_TLSDESC_RELOC): Likewise.
4781 (elfNN_aarch64_howto_table): Likewise.
4782 (aarch64_tls_transition_without_check): Likewise.
4783 (aarch64_reloc_got_type): Likewise.
4784 (elfNN_aarch64_final_link_relocate): Likewise.
4785 (elfNN_aarch64_tls_relax): Likewise.
4786 (elfNN_aarch64_relocate_section): Likewise.
4787 (elfNN_aarch64_gc_sweep_hook): Likewise.
4788 (elfNN_aarch64_check_relocs): Likewise.
4789 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
4790 (_bfd_aarch64_elf_resolve_relocation): Likewise.
4792 2017-03-11 Alan Modra <amodra@gmail.com>
4794 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
4795 parameter is in fact used. Whitespace fixes.
4796 * elf64-ppc.c: Likewise.
4798 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
4800 * rs6000-core.c (CORE_NEW): Simplify macro when
4801 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
4803 2017-03-07 Alan Modra <amodra@gmail.com>
4807 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
4810 2017-03-05 Alan Modra <amodra@gmail.com>
4812 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
4813 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
4814 (next_cie_fde_offset): New function.
4815 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
4816 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
4817 four bytes. Align CIEs to four or eight bytes depending on
4818 per_encoding_aligned8. Align FDEs according to their encoding.
4819 Pad last FDE to output section alignment.
4820 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
4822 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
4823 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
4824 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
4826 2017-03-02 Martin Bickel <binutils@ineranves.de>
4829 * elf.c (rewrite_elf_program_header): Do not issue a warning for
4830 empty segments which have a zero filesz, but a non-zero memsz.
4832 2017-03-02 Alan Modra <amodra@gmail.com>
4834 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
4836 2017-02-28 Alan Modra <amodra@gmail.com>
4838 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
4839 (ppc64_elf_relocate_section): Likewise.
4841 2017-02-28 Alan Modra <amodra@gmail.com>
4844 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
4845 rather than elf32_nios2_hash_table or elf_hash_table.
4846 (create_got_section): Likewise.
4847 (nios2_elf32_finish_dynamic_symbol): Likewise.
4848 (nios2_elf32_adjust_dynamic_symbol): Likewise.
4849 (nios2_elf32_size_dynamic_sections): Likewise.
4850 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
4851 vars. Use htab equivalents directly instead. Don't create
4852 all dynamic sections on needing just the GOT. Use a goto
4853 rather than a fall-through with reloc test. Ensure
4854 htab->dynobj is set when making dynamic sreloc section.
4855 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
4856 equivalent directly instead. Don't segfault on looking for
4857 .dynamic when dynamic sections have not been created. Don't
4858 segfault on .got.plt being discarded.
4859 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
4860 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
4861 fixme and another not so relevant comment.
4862 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
4863 already set, set hash table dynobj on creating .sbss.
4865 2017-02-28 Alan Modra <amodra@gmail.com>
4867 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
4868 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
4869 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
4870 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
4871 (ppc64_elf_relocate_section): Likewise.
4872 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
4873 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
4874 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
4875 * libbfd.h: Regenerate.
4876 * bfd-in2.h: Regenerate.
4878 2017-02-28 Alan Modra <amodra@gmail.com>
4880 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
4881 dynamic .data.rel.ro read-only.
4882 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
4883 rather than section flags when deciding where copy reloc goes.
4884 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
4885 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
4886 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
4887 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
4888 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
4889 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
4890 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
4891 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
4892 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
4893 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
4894 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
4895 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
4896 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
4897 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
4898 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
4899 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
4900 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
4901 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
4902 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
4904 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
4906 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
4907 `jalr $0, $25' instruction encoding.
4909 2017-02-27 Nick Clifton <nickc@redhat.com>
4912 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
4913 generating a seg-fault when encountering a symbol that has been
4914 deleted by garbage collection.
4916 2017-02-25 Alan Modra <amodra@gmail.com>
4918 * elf32-arc.c (struct dynamic_sections): Delete.
4919 (enum dyn_section_types): Delete.
4920 (dyn_section_names): Delete.
4921 (arc_create_dynamic_sections): Delete.
4922 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
4923 segfault on discarded .rela.plt section.
4924 (elf_arc_size_dynamic_sections): Formatting. Don't call
4925 arc_create_dynamic_sections. Don't allocate memory for sections
4926 handled by the generic linker. Correct code finding relocs in
4927 read-only sections. Set SEC_EXCLUDE on zero size .got,
4928 .got.plt, and .dynbss sections. Do set .interp for pies.
4930 2017-02-24 Andrew Waterman <andrew@sifive.com>
4932 * elfnn-riscv.c (GP_NAME): New macro.
4933 (riscv_global_pointer_value): Use it.
4934 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
4935 output section, consider only that section's alignment.
4937 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
4939 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
4940 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
4941 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
4942 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
4944 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
4946 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
4947 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
4950 2017-02-23 Alan Modra <amodra@gmail.com>
4953 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
4955 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
4956 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
4959 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
4962 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
4963 processing ahead of the call to `elf_gc_sweep_symbol'.
4965 2017-02-22 Nick Clifton <nickc@redhat.com>
4968 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
4969 created section 4-byte alignment.
4971 2017-02-22 Alan Modra <amodra@gmail.com>
4973 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
4974 on .got or .plt output section being discarded by script.
4975 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
4978 2017-02-21 Alan Modra <amodra@gmail.com>
4980 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
4981 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
4983 2017-02-20 Alan Modra <amodra@gmail.com>
4986 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
4987 if DT_RELSZ/DT_RELASZ is zero.
4989 2017-02-17 Nick Clifton <nickc@redhat.com>
4991 * compress.c (bfd_get_full_section_contents): Remember to reduce
4992 compressed size by the sizeof the compression header when
4993 decompressing the contents.
4995 2017-02-17 Pedro Alves <palves@redhat.com>
4997 * srec.c (Chunk): Rename to ...
4998 (_bfd_srec_len): ... this.
4999 (S3Forced): Rename to ...
5000 (_bfd_srec_forceS3): ... this.
5001 * objcopy.c: Adjust all references.
5003 2017-02-17 Pedro Alves <palves@redhat.com>
5005 * archive.c (bsd_write_armap): Rename to ...
5006 (_bfd_bsd_write_armap): ... this.
5007 (coff_write_armap): Rename to ...
5008 (_bfd_coff_write_armap): ... this.
5009 * libbfd-in.h (bsd_write_armap): Rename to ...
5010 (_bfd_bsd_write_armap): ... this.
5011 (coff_write_armap): Rename to ...
5012 (_bfd_coff_write_armap): ... this.
5013 * aout-target.h, aout-tic30.c: Adjust all users.
5014 * libbfd.h: Regenerate.
5016 2017-02-17 Pedro Alves <palves@redhat.com>
5018 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
5019 (warn_deprecated): Rename to ...
5020 (_bfd_warn_deprecated): ... this.
5021 * libbfd.c (warn_deprecated): Rename to ...
5022 (_bfd_warn_deprecated): ... this.
5023 * bfd-in2.h: Regenerate.
5025 2017-02-17 Pedro Alves <palves@redhat.com>
5027 * bfdio.c (real_ftell): Rename to ...
5028 (_bfd_real_ftell): ... this.
5029 (real_fseek): Rename to ...
5030 (_bfd_real_fseek): ... this.
5031 (real_fopen): Rename to ...
5032 (_bfd_real_fopen): ... this.
5033 * libbfd-in.h (real_ftell): Rename to ...
5034 (_bfd_real_ftell): ... this.
5035 (real_fseek): Rename to ...
5036 (_bfd_real_fseek): ... this.
5037 (real_fopen): Rename to ...
5038 (_bfd_real_fopen): ... this.
5039 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
5040 * libbfd.h: Regenerate.
5042 2017-02-17 Pedro Alves <palves@redhat.com>
5044 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
5045 * libbfd.c (read_unsigned_leb128): Rename to ...
5046 (_bfd_read_unsigned_leb128): ... this.
5047 (read_signed_leb128): Rename to ...
5048 (_bfd_read_signed_leb128): ... this.
5049 (safe_read_leb128): Rename to ...
5050 (_bfd_safe_read_leb128): ... this.
5051 * libbfd-in.h (read_unsigned_leb128): Rename to ...
5052 (_bfd_read_unsigned_leb128): ... this.
5053 (read_signed_leb128): Rename to ...
5054 (_bfd_read_signed_leb128): ... this.
5055 (safe_read_leb128): Rename to ...
5056 (_bfd_safe_read_leb128): ... this.
5057 * libbfd.h: Renegerate.
5059 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
5061 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
5062 before trying to fine matching file and line information.
5064 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
5066 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
5067 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
5068 not match current bfd, then reload debug information. Record bfd
5069 we're loading debug info for in the stash. If we have debug
5070 informatin in the cache then perform section placement before
5073 2017-02-16 Alan Modra <amodra@gmail.com>
5076 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
5077 * elfxx-target.h (elf_backend_no_page_alias): Define.
5078 (elfNN_bed): Init new field.
5079 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
5080 ensure PT_LOAD segment starts on a new page.
5081 * elf32-hppa.c (elf_backend_no_page_alias): Define.
5083 2017-02-16 Alan Modra <amodra@gmail.com>
5086 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
5089 2017-02-16 Jiong Wang <jiong.wang@arm.com>
5091 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
5092 * bfd-in2.h: Regenerated.
5094 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
5097 * elf32-i386.c (elf_i386_relocate_section): Allow
5098 "lea foo@GOT, %reg" in PIC.
5100 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
5103 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
5104 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
5105 error against local IFUNC symbol without a base register for
5108 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
5110 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
5111 `%P: %H:' with `info->callbacks->einfo'.
5112 (ppc_elf_relocate_section): Likewise.
5113 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
5114 (ppc64_elf_edit_toc): Likewise.
5115 (ppc64_elf_relocate_section): Likewise.
5117 2017-02-14 Alan Modra <amodra@gmail.com>
5119 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
5120 --gc-keep-exported, and test versioned field of sym rather than
5121 looking for @ in name.
5123 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
5125 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
5128 2017-02-13 Nick Clifton <nickc@redhat.com>
5131 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
5134 2017-02-07 Andrew Waterman <andrew@sifive.com>
5136 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
5137 entry size if PLT header is written.
5139 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
5141 Fix sparc64 dynamic relocation processing to use the dynamic
5143 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
5144 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
5147 2017-02-03 Nick Clifton <nickc@redhat.com>
5150 * coffcode.h (coff_write_object_contents): Enlarge size of
5151 s_name_buf in order to avoid compile time warning about possible
5153 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
5154 32-bits of insn value before printing into buffer.
5156 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
5158 * elfxx-mips.c (mips_elf_hash_sort_data): Add
5159 `max_local_dynindx'.
5160 (mips_elf_sort_hash_table): Handle it.
5161 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
5162 symbols bump up `max_local_dynindx' rather than
5163 `max_non_got_dynindx'.
5165 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
5167 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
5168 `min_got_dynindx', `max_unref_got_dynindx' and
5169 `max_non_got_dynindx' members to the `bfd_size_type' data type.
5170 (mips_elf_sort_hash_table): Adjust accordingly.
5172 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
5174 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
5175 to access the hash table.
5177 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
5179 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
5180 non-NULL `htab' to the beginning.
5182 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
5184 * elflink.c (elf_gc_sweep): Wrap overlong line.
5186 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
5188 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
5189 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
5190 * elfxx-mips.c (mips_elf_link_hash_table): Add
5191 `ignore_branch_isa' member.
5192 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
5193 in branch relocation calculation as an error if
5194 `ignore_branch_isa' has been set.
5195 (_bfd_mips_elf_insn32): Rename to...
5196 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
5197 parameter to `insn32' and add an `ignore_branch_isa' parameter.
5198 Handle the new parameter.
5200 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
5202 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
5203 local variable dynobj.
5206 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
5207 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
5208 executable from read-only sections into sdynrelro.
5209 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
5210 dynamic relocs in sdynrelro.
5211 (elf_backend_want_dynrelro): Define.
5213 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
5215 * config.bfd (*-*-rtemsaout*): Mark as removed.
5217 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
5219 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
5220 (arm-*-rtems*): Move to (arm*-*-eabi*).
5221 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
5222 (m68-*-rtems*): Move to (m68*-*-elf*).
5224 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
5226 * config.bfd (*-*-rtemscoff*): Mark as removed.
5228 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
5231 * elflink.c (bfd_elf_record_link_assignment): Revert last
5232 change and don't ever clear `forced_local'. Set `mark'
5234 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
5236 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
5237 (bfd_elf_size_dynamic_sections): ... here.
5238 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
5239 and set `mark' instead in `__tls_get_addr_opt' processing.
5240 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
5242 2017-01-24 Alan Modra <amodra@gmail.com>
5244 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
5245 where dynamic relocs are preferable. Allow ifunc too.
5246 (ensure_undefweak_dynamic): New function.
5247 (allocate_dynrelocs): Use it here. Move plt handling last and
5248 don't make symbols dynamic, simplifying loop. Only make undef
5249 weak symbols with GOT entries dynamic. Correct condition
5250 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
5251 comments. Remove goto.
5252 (ppc_elf_relocate_section): Correct test for using dynamic
5253 symbol on GOT relocs. Rearrange test for emitting GOT relocs
5254 to suit. Set up explicit tls_index entries and implicit GOT
5255 tls_index entries resolvable at link time for
5256 __tls_get_addr_opt. Simplify test to clear mem for prelink.
5257 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
5258 (ensure_undefweak_dynamic): New function.
5259 (allocate_dynrelocs): Use it here. Only make undef weak symbols
5260 with GOT entries dynamic. Remove unnecessary test of
5261 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
5262 (ppc64_elf_relocate_section): Correct test for using dynamic
5263 symbol on GOT relocs. Rearrange test for emitting GOT relocs
5264 to suit. Set up explicit tls_index entries and implicit GOT
5265 tls_index entries resolvable at link time for __tls_get_addr_opt.
5266 Simplify expression to clear mem for prelink.
5268 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
5270 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
5272 2017-01-20 Jiong Wang <jiong.wang@arm.com>
5274 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
5275 (elf_backend_hash_symbol): Define.
5277 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
5280 * elflink.c (bfd_elf_record_link_assignment): Clear any
5281 `forced_local' marking for DSO symbols that are not being
5284 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
5286 * elfnn-riscv.c (riscv_elf_object_p): New function.
5288 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
5291 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
5293 (elf_x86_64_check_relocs): Create .eh_frame section for the
5295 (elf_x86_64_size_dynamic_sections): Allocate and initialize
5296 .eh_frame section for the .plt.bnd section.
5297 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
5298 for the .plt.bnd section.
5300 2017-01-12 Nick Clifton <nickc@redhat.com>
5303 * opncls.c (find_separate_debug_file): Add include_dirs
5304 parameter. Only include the directory part of the bfd's filename
5305 in search paths if include_dirs is true. Add a couple of extra
5306 locations for looking for debug files.
5307 ( bfd_follow_gnu_debuglink): Update invocation of
5308 find_separate_debug_file.
5309 (bfd_follow_gnu_debugaltlink): Likewise.
5310 (get_build_id): New function: Finds the build-id of the given bfd.
5311 (get_build_id_name): New function: Computes the name of the
5312 separate debug info file for a bfd, based upon its build-id.
5313 (check_build_id_file): New function: Checks to see if a separate
5314 debug info file exists at the given location, and that its
5315 build-id matches that of the original bfd.
5316 (bfd_follow_build_id_debuglink): New function: Finds a separate
5317 debug info file for a given bfd by using the build-id method.
5318 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
5319 method of locating a separate debug info file before using the
5321 * bfd-in2.h: Regenerate.
5323 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
5326 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
5327 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
5328 elf_x86_64_eh_frame_plt_got.
5329 (elf_x86_64_size_dynamic_sections): Get unwind info from
5330 elf_x86_64_bnd_arch_bed for the BND PLT.
5332 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
5334 * config.bfd: Add entries for i686-redox and x86_64-redox.
5336 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
5338 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
5340 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
5341 .eh_frame section to 4 bytes for x32.
5342 (elf_x86_64_check_relocs): Likewise.
5344 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
5347 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
5348 (PLT_GOT_FDE_LENGTH): Likewise.
5349 (elf_i386_plt_layout): Add eh_frame_plt_got and
5350 eh_frame_plt_got_size.
5351 (elf_i386_plt): Updated.
5352 (elf_i386_link_hash_table): Add plt_got_eh_frame.
5353 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
5354 (elf_i386_size_dynamic_sections): Allocate and initialize
5355 .eh_frame section for .plt.got.
5356 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
5358 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
5359 eh_frame_plt_got_size.
5360 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
5361 (PLT_GOT_FDE_LENGTH): Likewise.
5362 (elf_x86_64_backend_data): Add eh_frame_plt_got and
5363 eh_frame_plt_got_size.
5364 (elf_x86_64_arch_bed): Updated.
5365 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
5366 eh_frame_plt_got_size.
5367 (elf_x86_64_nacl_arch_bed): Likewise.
5368 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
5369 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
5370 (elf_x86_64_size_dynamic_sections): Allocate and initialize
5371 .eh_frame section for .plt.got.
5372 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
5375 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
5377 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
5378 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
5380 2017-01-09 Nick Clifton <nickc@redhat.com>
5382 * dwarf2.c (lookup_address_in_function_table): Return early if
5383 there are no functions in the given comp unit, or if the high
5384 address of the last function in the comp unit is less than the
5387 2017-01-09 Nick Clifton <nickc@redhat.com>
5390 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
5391 message if there are too many symbols to load.
5393 2017-01-04 James Clarke <jrtc27@jrtc27.com>
5395 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
5396 if relocs are cached.
5398 2017-01-03 Rich Felker <bugdal@aerifal.cx>
5401 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
5402 for R_MICROBLAZE_GOTOFF_64.
5404 2017-01-03 Nick Clifton <nickc@redhat.com>
5406 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
5407 warning about using a possibly uninitialised variable.
5409 2017-01-02 Alan Modra <amodra@gmail.com>
5411 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
5412 (allocate_plt_static, allocate_dynrelocs): Use it.
5414 2017-01-02 Alan Modra <amodra@gmail.com>
5416 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
5417 .PARISC.unwind section.
5419 2017-01-02 Alan Modra <amodra@gmail.com>
5422 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
5423 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
5424 indirect to GOT pointer relative code edit.
5426 2017-01-02 Alan Modra <amodra@gmail.com>
5428 Update year range in copyright notice of all files.
5430 For older changes see ChangeLog-2016
5432 Copyright (C) 2017 Free Software Foundation, Inc.
5434 Copying and distribution of this file, with or without modification,
5435 are permitted in any medium without royalty provided the copyright
5436 notice and this notice are preserved.
5442 version-control: never