1 2017-11-29 Nick Clifton <nickc@redhat.com>
4 * coffcode.h (coff_slurp_reloc_table): Check for a NULL symbol
5 pointer when processing relocs.
7 2017-11-29 Stefan Stroe <stroestefan@gmail.com>
9 * po/Make-in (datadir): Define as @datadir@.
10 (localedir): Define as @localedir@.
11 (gnulocaledir, gettextsrcdir): Use @datarootdir@.
13 2017-11-28 Nick Clifton <nickc@redhat.com>
16 * coffgen.c (_bfd_coff_read_string_table): Check for an excessive
17 size of the external string table.
19 2017-11-28 Nick Clifton <nickc@redhat.com>
22 * reloc.c (reloc_offset_in_range): Rename to
23 bfd_reloc_offset_in_range and export.
24 (bfd_perform_relocation): Rename function invocation.
25 (bfd_install_relocation): Likewise.
26 (bfd_final_link_relocate): Likewise.
27 * bfd-in2.h: Regenerate.
28 * coff-arm.c (coff_arm_reloc): Use bfd_reloc_offset_in_range.
29 * coff-i386.c (coff_i386_reloc): Likewise.
30 * coff-i860.c (coff_i860_reloc): Likewise.
31 * coff-m68k.c (mk68kcoff_common_addend_special_fn): Likewise.
32 * coff-m88k.c (m88k_special_reloc): Likewise.
33 * coff-mips.c (mips_reflo_reloc): Likewise.
34 * coff-x86_64.c (coff_amd64_reloc): Likewise.
36 2017-11-28 H.J. Lu <hongjiu.lu@intel.com>
38 * elf-m10300.c (mn10300_elf_check_relocs): Don't set
40 * elf32-arm.c (elf32_arm_check_relocs): Likewise.
41 * elf32-bfin.c (bfin_check_relocs): Likewise.
42 * elf32-cr16.c (cr16_elf_check_relocs): Likewise.
43 * elf32-cris.c (cris_elf_check_relocs): Likewise.
44 * elf32-d10v.c (elf32_d10v_check_relocs): Likewise.
45 * elf32-dlx.c (elf32_dlx_check_relocs): Likewise.
46 * elf32-fr30.c (fr30_elf_check_relocs): Likewise.
47 * elf32-frv.c (elf32_frv_check_relocs): Likewise.
48 * elf32-hppa.c (elf32_hppa_check_relocs): Likewise.
49 * elf32-i370.c (i370_elf_check_relocs): Likewise.
50 * elf32-i386.c (elf_i386_check_relocs): Likewise.
51 * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
52 * elf32-lm32.c (lm32_elf_check_relocs): Likewise.
53 * elf32-m32c.c (m32c_elf_check_relocs): Likewise.
54 * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
55 * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
56 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
57 * elf32-mcore.c (mcore_elf_check_relocs): Likewise.
58 * elf32-metag.c (elf_metag_check_relocs): Likewise.
59 * elf32-microblaze.c (microblaze_elf_check_relocs): Likewise.
60 * elf32-moxie.c (moxie_elf_check_relocs): Likewise.
61 * elf32-msp430.c (elf32_msp430_check_relocs): Likewise.
62 * elf32-mt.c (mt_elf_check_relocs): Likewise.
63 * elf32-nios2.c (nios2_elf32_check_relocs): Likewise.
64 * elf32-or1k.c (or1k_elf_check_relocs): Likewise.
65 * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
66 * elf32-rl78.c (rl78_elf_check_relocs): Likewise.
67 * elf32-s390.c (elf_s390_check_relocs): Likewise.
68 * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
69 * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
70 * elf32-sh.c (sh_elf_check_relocs): Likewise.
71 * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
72 * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
73 * elf32-v850.c (v850_elf_check_relocs): Likewise.
74 * elf32-vax.c (elf_vax_check_relocs): Likewise.
75 * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
76 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
77 * elf64-aarch64.c (elf64_aarch64_check_relocs): Likewise.
78 * elf64-alpha.c (elf64_alpha_check_relocs): Likewise.
79 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
80 * elf64-ia64-vms.c (elf64_ia64_check_relocs): Likewise.
81 * elf64-mmix.c (mmix_elf_check_relocs): Likewise.
82 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
83 * elf64-s390.c (elf_s390_check_relocs): Likewise.
84 * elf64-sh64.c (sh_elf64_check_relocs): Likewise.
85 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
86 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
87 * elfnn-ia64.c (elfNN_ia64_check_relocs): Likewise.
88 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
89 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
90 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
91 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
93 2017-11-28 Alan Modra <amodra@gmail.com>
96 * elflink.c (_bfd_elf_merge_symbol): Allow weak symbols to override
97 early passes over linker script symbols.
98 * linker.c (_bfd_generic_link_add_one_symbol): Allow symbols to
99 override early passes over linker script symbols. Clear ldscript_def
100 on symbol definitions.
102 2017-11-28 Alan Modra <amodra@gmail.com>
104 * elf64-mmix.c (bfd_elf64_bfd_copy_link_hash_symbol_type): Define.
106 2017-11-28 H.J. Lu <hongjiu.lu@intel.com>
109 * elflink.c (_bfd_elf_merge_symbol): Also skip definition from
111 (elf_link_add_object_symbols): If linker plugin is enabled, set
112 non_ir_ref_regular on symbols referenced in regular objects so
113 that linker plugin will get the correct symbol resolution.
115 2017-11-27 Szabolcs Nagy <szabolcs.nagy@arm.com>
118 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Use
119 bfd_link_executable instead of bfd_link_pic for TLS.
120 (elfNN_aarch64_allocate_dynrelocs): Likewise.
121 (aarch64_can_relax_tls): Likewise.
123 2017-11-27 Szabolcs Nagy <szabolcs.nagy@arm.com>
126 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Use
127 UNDEFWEAK_NO_DYNAMIC_RELOC to avoid dynamic GOT relocs.
128 (elfNN_aarch64_allocate_dynrelocs): Likewise.
130 2017-11-24 H.J. Lu <hongjiu.lu@intel.com>
133 * elf.c (elf_read_notes): Add an argument for note aligment.
134 (elf_parse_notes): Likewise.
135 (_bfd_elf_make_section_from_shdr): Pass section aligment to
137 (bfd_section_from_phdr): Pass segment aligment to elf_read_notes.
138 (elf_parse_notes): Add an argument for note aligment. Use
139 ELF_NOTE_DESC_OFFSET to get the offset of the note descriptor.
140 Use ELF_NOTE_NEXT_OFFSET to get the offset of the next note
142 (elf_read_notes): Add an argument for note aligment and pass it
145 2017-11-23 Alan Modra <amodra@gmail.com>
147 * elf32-hppa.c (pc_dynrelocs): Define.
148 (elf32_hppa_copy_indirect_symbol): Don't copy dyn_relocs to weakdefs.
149 (alias_readonly_dynrelocs): New function.
150 (elf32_hppa_adjust_dynamic_symbol): Don't clear non_got_ref to
151 indicate dyn_relocs should be discarded, discard them here.
152 Use alias_readonly_dynrelocs.
153 (allocate_dynrelocs): Don't test or clear non_got_ref.
154 (elf32_hppa_relocate_section): Simplify test for dynamic relocs.
155 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Don't copy dyn_relocs
157 (alias_readonly_dynrelocs, pc_dynrelocs): New functions.
158 (ppc_elf_adjust_dynamic_symbol): Don't clear non_got_ref to
159 indicate dyn_relocs should be discarded, discard them here.
160 Use alias_readonly_dynrelocs.
161 (allocate_dynrelocs): Don't test or clear non_got_ref.
162 (ppc_elf_relocate_section): Simplify test for dynamic relocs.
164 2017-11-23 Alan Modra <amodra@gmail.com>
166 * elf64-ppc.c (struct ppc_link_hash_entry): Delete weakref field.
167 (ppc64_elf_copy_indirect_symbol): Don't set weakref.
168 (alias_readonly_dynrelocs): Use u.alias rather than weakref.
169 (ppc64_elf_adjust_dynamic_symbol): Don't use
170 alias_readonly_dynrelocs for function symbols.
172 2017-11-23 Alan Modra <amodra@gmail.com>
174 * elf-bfd.h (struct elf_link_hash_entry): Add is_weakalias.
175 Rename u.weakdef to u.alias and update comment.
176 (weakdef): New static inline function.
177 * elflink.c (bfd_elf_record_link_assignment) Test is_weakalias
178 rather than u.weakdef != NULL, and use weakdef function.
179 (_bfd_elf_adjust_dynamic_symbol): Likewise.
180 (_bfd_elf_fix_symbol_flags): Likewise. Clear is_weakalias on
181 all aliases if def has been overridden in a regular object, not
183 (elf_link_add_object_symbols): Delete new_weakdef flag. Test
184 is_weakalias and use weakdef. Set is_weakalias and circular
185 u.alias. Update comments.
186 (_bfd_elf_gc_mark_rsec): Test is_weakalias rather than
187 u.weakdef != NULL and use weakdef function.
188 * elf-m10300.c (_bfd_mn10300_elf_adjust_dynamic_symbol): Test
189 is_weakalias rather than u.weakdef != NULL and use weakdef
190 function. Assert that def is strong defined.
191 * elf32-arc.c (elf_arc_adjust_dynamic_symbol): Likewise.
192 * elf32-arm.c (elf32_arm_adjust_dynamic_symbol): Likewise.
193 * elf32-bfin.c (elf32_bfinfdpic_adjust_dynamic_symbol): Likewise.
194 (bfin_adjust_dynamic_symbol): Likewise.
195 * elf32-cr16.c (_bfd_cr16_elf_adjust_dynamic_symbol): Likewise.
196 * elf32-cris.c (elf_cris_adjust_dynamic_symbol): Likewise.
197 * elf32-frv.c (elf32_frvfdpic_adjust_dynamic_symbol): Likewise.
198 * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Likewise.
199 * elf32-i370.c (i370_elf_adjust_dynamic_symbol): Likewise.
200 * elf32-lm32.c (lm32_elf_adjust_dynamic_symbol): Likewise.
201 * elf32-m32r.c (m32r_elf_adjust_dynamic_symbol): Likewise.
202 * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Likewise.
203 * elf32-metag.c (elf_metag_adjust_dynamic_symbol): Likewise.
204 * elf32-microblaze.c (microblaze_elf_adjust_dynamic_symbol): Likewise.
205 * elf32-nds32.c (nds32_elf_adjust_dynamic_symbol): Likewise.
206 * elf32-nios2.c (nios2_elf32_adjust_dynamic_symbol): Likewise.
207 * elf32-or1k.c (or1k_elf_adjust_dynamic_symbol): Likewise.
208 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Likewise.
209 * elf32-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
210 * elf32-score.c (s3_bfd_score_elf_adjust_dynamic_symbol): Likewise.
211 * elf32-score7.c (s7_bfd_score_elf_adjust_dynamic_symbol): Likewise.
212 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): Likewise.
213 * elf32-tic6x.c (elf32_tic6x_adjust_dynamic_symbol): Likewise.
214 * elf32-tilepro.c (tilepro_elf_gc_mark_hook): Likewise.
215 (tilepro_elf_adjust_dynamic_symbol): Likewise.
216 * elf32-vax.c (elf_vax_adjust_dynamic_symbol): Likewise.
217 * elf32-xtensa.c (elf_xtensa_adjust_dynamic_symbol): Likewise.
218 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Likewise.
219 * elf64-hppa.c (elf64_hppa_adjust_dynamic_symbol): Likewise.
220 * elf64-ia64-vms.c (elf64_ia64_adjust_dynamic_symbol): Likewise.
221 * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
222 (ppc64_elf_adjust_dynamic_symbol): Likewise.
223 * elf64-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
224 * elf64-sh64.c (sh64_elf64_adjust_dynamic_symbol): Likewise.
225 * elfnn-aarch64.c (elfNN_aarch64_adjust_dynamic_symbol): Likewise.
226 * elfnn-ia64.c (elfNN_ia64_adjust_dynamic_symbol): Likewise.
227 * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Likewise.
228 * elfxx-mips.c (_bfd_mips_elf_adjust_dynamic_symbol): Likewise.
229 * elfxx-sparc.c (_bfd_sparc_elf_gc_mark_hook): Likewise.
230 (_bfd_sparc_elf_adjust_dynamic_symbol): Likewise.
231 * elfxx-tilegx.c (tilegx_elf_gc_mark_hook): Likewise.
232 (tilegx_elf_adjust_dynamic_symbol): Likewise.
233 * elfxx-x86.c (_bfd_x86_elf_adjust_dynamic_symbol): Likewise.
235 2017-11-21 Alan Modra <amodra@gmail.com>
237 * elf-bfd.h (elf_symbol_from): Check for NULL symbol bfd.
238 * elfcode.h (elf_slurp_reloc_table_from_section): Add FIXME comment.
240 2017-11-20 Nick Clifton <nickc@redhat.com>
243 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Skip
244 objects without a GNU_PROPERTY note section when looking for a bfd
245 onto which notes can be accumulated.
247 2017-11-20 Alan Modra <amodra@gmail.com>
251 * elf.c (_bfd_elf_init_reloc_shdr): Delete "sec_hdr" parameter
252 and leave rel_hdr->sh_flags zero. Update calls.
253 (bfd_elf_set_group_contents): Check input rel/rela SHF_GROUP
254 flag when !gas before adding rel/rela section to group. Set
255 output rel/rela SHF_GROUP flags.
257 2017-11-18 Jim Wilson <jimw@sifive.com>
259 * elfnn-riscv.c (_bfd_riscv_relax_align): Add space between alignment
260 and to in error message.
262 2017-11-17 H.J. Lu <hongjiu.lu@intel.com>
264 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Pass
265 "%F%P:", instead of "%F:", to linker callback in case of error.
267 2017-11-16 Nick Clifton <nickc@redhat.com>
270 * elf.c (elfcore_grok_netbsd_procinfo): Check that the note is big enough.
271 (elfcore_grok_openbsd_procinfo): Likewise.
272 (elfcore_grok_nto_status): Likewise.
274 2017-11-16 Nick Clifton <nickc@redhat.com>
276 * merge.c (sec_merge_emit): Always create padding buffer. Add
277 asserts to make sure that the buffer is long enough.
279 2017-11-15 Alan Modra <amodra@gmail.com>
281 * bfd.c (union _bfd_doprnt_args): Add "Bad".
282 (_bfd_doprnt): Handle more flags.
283 (_bfd_doprnt_scan): Likewise. Tidy setting of args array.
284 (error_handler_internal): Init args type to Bad.
286 2017-11-14 Alan Modra <amodra@gmail.com>
289 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Warn on discarding
290 non-empty dynamic section.
291 (ppc_build_one_stub): Take elf_gp from output bfd, not output
293 (ppc_size_one_stub, ppc64_elf_next_toc_section): Likewise.
295 2017-11-14 Alan Modra <amodra@gmail.com>
297 * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for user
300 2017-11-13 Jan Beulich <jbeulich@suse.com>
302 * coff-tic80.c (COFF_ENCODE_ALIGNMENT, COFF_DECODE_ALIGNMENT):
304 * coffcode.h (coff_set_alignment_hook): Drop tic80 special case.
305 (coff_write_object_contents): Likewise. Issue diagnostic for too
308 2017-11-12 H.J. Lu <hongjiu.lu@intel.com>
311 * elf.c (_bfd_elf_map_sections_to_segments): Remove PF_X from
314 2017-11-12 Alan Modra <amodra@gmail.com>
316 * elflink.c (elf_link_add_object_symbols): Ignore anything but
317 defined and defweak symbols when setting up weakdefs.
319 2017-11-12 Alan Modra <amodra@gmail.com>
321 * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Set non_got_ref
322 to keep dyn_relocs, clear to discard. Comment.
323 (allocate_dynrelocs): Always clear non_got_ref when clearing
324 dyn_relocs in non-pic case. Invert non_got_ref test. Also test
325 dynamic_adjusted and ELF_COMMON_DEF_P. Move code deleting
326 dyn_relocs on undefined syms to handle for non-pic too.
327 (elf32_hppa_relocate_section): Simplify test for non-pic dyn relocs.
328 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Set non_got_ref
329 to keep dyn_relocs, clear to discard. Comment.
330 (allocate_dynrelocs): Always clear non_got_ref when clearing
331 dyn_relocs in non-pic case. Invert non_got_ref test. Also test
332 dynamic_adjusted and ELF_COMMON_DEF_P. Move code deleting
333 dyn_relocs on undefined syms to handle for non-pic too.
334 (ppc_elf_relocate_section): Simplify test for non-pic dyn relocs.
335 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Discard
336 dyn_relocs here. Don't bother setting non_got_ref. Comment.
337 (allocate_dynrelocs): Delete special handling of non-pic ELFv2
338 ifuncs. Move code deleting dyn_relocs on undefined symbols to
339 handle for non-pic too. Don't test non_got_ref. Do test
340 dynamic_adjusted and ELF_COMMON_DEF_P.
342 2017-11-08 Djordje Todorovic <djordje.todorovic@rt-rk.com>
344 * elf32-mips.c (elf32_mips_grok_psinfo): Extract core->pid.
345 * elf64-mips.c (elf64_mips_grok_psinfo): Likewise.
346 * elfn32-mips.c (elf32_mips_grok_psinfo): Likewise.
348 2017-11-08 Djordje Todorovic <djordje.todorovic@rt-rk.com>
350 * elf32-mips.c (elf32_mips_write_core_note): New function.
351 (elf_backend_write_core_note): New macro.
352 * elf64-mips.c (elf64_mips_write_core_note): New function.
353 (elf_backend_write_core_note): New macro.
354 * elfn32-mips.c (elf32_mips_write_core_note): New function.
355 (elf_backend_write_core_note): New macro.
357 2017-11-07 Alan Modra <amodra@gmail.com>
359 * elf64-ppc.c (ppc64_elf_build_stubs): Correct pluralization in
362 2017-11-07 Alan Modra <amodra@gmail.com>
364 * sysdep.h: Formatting, comment fixes.
365 (gettext, ngettext): Redefine when ENABLE_NLS.
366 (ngettext, dngettext, dcngettext): Define when !ENABLE_NLS.
367 (_): Define using gettext.
368 (textdomain, bindtextdomain): Use safer "do nothing".
369 * hosts/alphavms.h (textdomain, bindtextdomain): Likewise.
370 (ngettext, dngettext, dcngettext): Define when !ENABLE_NLS.
372 2017-11-05 Alan Modra <amodra@gmail.com>
375 * bfd.c (_bfd_doprnt_scan): Check args index before storing, not
378 2017-11-05 Alan Modra <amodra@gmail.com>
381 * bfd.c (union _bfd_doprnt_args): New.
382 (PRINT_TYPE): Add FIELD arg. Take value from args.
383 (_bfd_doprnt): Replace ap parameter with args. Adjust all
384 PRINT_TYPE invocations and reading of format args to suit.
385 Move "%%" handling out of switch handling args. Support
386 positional parameters.
387 (_bfd_doprnt_scan): New function.
388 (error_handler_internal): Call _bfd_doprnt_scan and read args.
390 2017-11-04 Alan Modra <amodra@gmail.com>
392 * elf32-ppc.c (got_entries_needed, got_relocs_needed): New functions.
393 (allocate_dynrelocs, ppc_elf_size_dynamic_sections): Use them here.
394 (ppc_elf_relocate_section): Don't output a dynamic relocation
395 for IE GOT entries in an executable.
396 * elf64-ppc.c (allocate_got): Trim unnecessary TPREL relocs.
397 (ppc64_elf_size_dynamic_sections): Likewise.
398 (ppc64_elf_relocate_section): Likewise.
400 2017-11-04 Alan Modra <amodra@gmail.com>
402 * elf32-ppc.c (readonly_dynrelocs): Delete info param. Update all
403 callers. Don't bother with SEC_ALLOC test. Return section pointer.
405 (maybe_set_textrel): ..here.
406 * elf64-ppc.c (readonly_dynrelocs): Return section pointer.
407 (maybe_set_textrel): Call minfo to print textrel warning to map file.
409 2017-11-04 Alan Modra <amodra@gmail.com>
411 * elf32-hppa.c (enum _tls_type): Move.
412 (struct elf32_hppa_link_hash_entry): Make tls_type a bitfield.
413 (elf32_hppa_check_relocs): Set DF_STATIC_TLS only for shared libraries.
414 Tidy tls_type handling. Set symbol tls_type for GOT_TLS_LDM too.
415 (got_entries_needed, got_relocs_needed): New functions.
416 (allocate_dynrelocs): Use them.
417 (elf32_hppa_size_dynamic_sections): Likewise.
418 (elf32_hppa_relocate_section): Delete bogus FIXME. Formatting.
419 Correct code emitting relocs on GD/IE got entries. Report an
420 error when a symbol has both normal and TLS GOT relocs.
422 2017-11-04 Alan Modra <amodra@gmail.com>
425 * elf32-hppa.c (elf32_hppa_check_relocs): Don't create dyn_relocs
426 for plabels when non-pic.
427 (maybe_set_textrel): New function.
428 (readonly_dynrelocs): Move and rewrite.
429 (elf32_hppa_adjust_dynamic_symbol): Use it. Don't create copy
430 relocs when def_regular or -z nocopyreloc. Handle non_got_ref
431 for functions. Expand non_got_ref comments.
432 (elf32_hppa_size_dynamic_sections): Use maybe_set_textrel.
434 2017-11-03 H.J. Lu <hongjiu.lu@intel.com>
436 * elf32-i386.c (elf_i386_check_relocs): Set plt.refcount to 1.
437 Don't use func_pointer_refcount. Don't set plt.refcount nor
438 non_got_ref for function pointer reference.
439 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
440 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Don't use
441 func_pointer_refcount.
442 (_bfd_x86_elf_copy_indirect_symbol): Don't copy
443 func_pointer_refcount.
444 (_bfd_x86_elf_hide_symbol): Don't use func_pointer_refcount.
445 * elfxx-x86.h (GENERATE_DYNAMIC_RELOCATION_P): Likewise.
446 (elf_x86_link_hash_entry): Remove func_pointer_refcount.
448 2017-11-03 Mingi Cho <mgcho.minic@gmail.com>
449 Nick Clifton <nickc@redhat.com>
452 * coffgen.c (_bfd_coff_get_external_symbols): Check for an
453 overlarge raw syment count.
454 (coff_get_normalized_symtab): Likewise.
456 2017-11-01 James Bowman <james.bowman@ftdichip.com>
458 * archures.c: Add bfd_mach_ft32b.
459 * cpu-ft32.c: Add arch_info_struct.
460 * elf32-ft32.c: Add R_FT32_RELAX, SC0, SC1,
462 (ft32_elf_relocate_section): Add clauses for R_FT32_SC0, SC1,
464 (ft32_reloc_shortable, elf32_ft32_is_diff_reloc)
465 (elf32_ft32_adjust_diff_reloc_value)
466 (elf32_ft32_adjust_reloc_if_spans_insn)
467 (elf32_ft32_relax_delete_bytes, elf32_ft32_relax_is_branch_target)
468 (ft32_elf_relax_section): New function.
469 * reloc.c: Add BFD_RELOC_FT32_RELAX, SC0, SC1, DIFF32.
470 * bfd-in2.h: Regenerate.
471 * libbfd.h: Regenerate.
473 2017-11-01 Nick Clifton <nickc@redhat.com>
476 * coffcode.h (coff_slurp_line_table): Check for an excessively
477 large line number count.
479 2017-11-01 Nick Clifton <nickc@redhat.com>
482 * peicode.h (pe_bfd_read_buildid): Revise check for invalid size
483 and offset in light of further possible bogus values.
485 2017-11-01 Alan Modra <amodra@gmail.com>
488 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't create a plt
489 entry when just a dynamic reloc can serve. Ensure no dynamic
490 relocations when UNDEFWEAK_NO_DYNAMIC_RELOC by setting non_got_ref.
491 Expand and move the non_got_ref comment.
492 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
494 2017-11-01 Nick Clifton <nickc@redhat.com>
497 * coffgen.c (_bfd_coff_free_symbols): Fail if called on a non-COFF
499 * cofflink.c (coff_link_check_archive_element): Skip non-COFF
500 members of an archive.
502 2017-10-31 Nick Clifton <nickc@redhat.com>
505 * peicode.h (pe_bfd_read_buildid): Check for invalid size and data
508 2017-10-30 Alan Modra <amodra@gmail.com>
510 * elf32-frv.c (ELF_TARGET_ID): Don't define for generic
513 * elflink.c (elf_gc_sweep): Test elf_object_id in addition to
515 (bfd_elf_gc_sections): Likewise.
517 2017-10-30 Alan Modra <amodra@gmail.com>
520 * elf32-hppa.c (elf32_hppa_check_relocs): Move SEC_ALLOC test to
521 ensure non_got_ref is not set due to debug references.
522 (elf32_hppa_adjust_dynamic_symbol): Tidy plabel handling. Use
523 SYMBOL_CALLS_LOCAL and UNDEFWEAK_NO_DYNAMIC_RELOC when determining
524 need for a plt entry.
525 (allocate_dynrelocs): Similarly for got entries. Tidy code discarding
526 dynamic relocs when pic. Remove bogus code attempting to handle
528 (elf32_hppa_relocate_section): Similarly. Delete resolved_to_zero
530 (elf32_hppa_finish_dynamic_symbol): Use UNDEFWEAK_NO_DYNAMIC_RELOC
531 and SYMBOL_REFERENCES_LOCAL in GOT handling.
533 2017-10-28 Alan Modra <amodra@gmail.com>
536 * elflink.c (_bfd_elf_merge_symbol): Remove relocs_compatible check.
537 * elf32-hppa.c (elf_backend_relocs_compatible): Define.
538 * elf32-ppc.c (elf_backend_relocs_compatible): Define.
539 * elf64-ppc.c (elf_backend_relocs_compatible): Define.
541 2017-10-25 Alan Modra <amodra@gmail.com>
543 * archive.c (_bfd_compute_and_write_armap): Match "__gnu_lto_slim"
544 optionally prefixed with "_".
545 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
547 2017-10-24 Andrew Waterman <andrew@sifive.com>
549 * elfnn-riscv.c (_bfd_riscv_relax_lui): Don't relax to c.lui
552 2017-10-24 Renlin Li <renlin.li@arm.com>
555 * elflink.c (_bfd_elf_merge_symbol): Handle multiple definition case.
557 2017-10-23 Nick Clifton <nickc@redhat.com>
560 * elflink.c (elf_link_output_extsym): Keep global undefined
561 symbols if they have been marked as needed.
563 2017-10-23 Maciej W. Rozycki <macro@imgtec.com>
565 * elfn32-mips.c (mips_elf_n32_mkobject): New prototype and
567 (bfd_elf32_mkobject): Use `mips_elf_n32_mkobject' rather than
568 `_bfd_mips_elf_mkobject'.
570 2017-10-22 Hans-Peter Nilsson <hp@axis.com>
573 * config.bfd (cris-*-* | crisv32-*-*): Require a 64-bit BFD.
575 2017-10-19 Palmer Dabbelt <palmer@dabbelt.com>
577 * elfnn-riscv.c (riscv_pcgp_hi_reloc): New structure.
578 (riscv_pcgp_lo_reloc): Likewise.
579 (riscv_pcgp_relocs): Likewise.
580 (riscv_init_pcgp_relocs): New function.
581 (riscv_free_pcgp_relocs): Likewise.
582 (riscv_record_pcgp_hi_reloc): Likewise.
583 (riscv_record_pcgp_lo_reloc): Likewise.
584 (riscv_delete_pcgp_hi_reloc): Likewise.
585 (riscv_use_pcgp_hi_reloc): Likewise.
586 (riscv_record_pcgp_lo_reloc): Likewise.
587 (riscv_find_pcgp_lo_reloc): Likewise.
588 (riscv_delete_pcgp_lo_reloc): Likewise.
589 (_bfd_riscv_relax_pc): Likewise.
590 (_bfd_riscv_relax_section): Handle R_RISCV_PCREL_* relocations
591 via the new functions above.
593 2017-10-19 Palmer Dabbelt <palmer@dabbelt.com>
595 * elfnn-riscv.c (R_RISCV_DELETE): New define.
596 (_bfd_riscv_relax_delete): New function.
597 (perform_relocation): Handle R_RISCV_DELETE.
598 (_bfd_riscv_relax_section): Likewise.
600 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
603 * elfxx-tilegx.c (tilegx_elf_tls_transition): Replace
604 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
605 bfd_link_executable for TLS check.
606 (tilegx_elf_check_relocs): Likewise.
607 (allocate_dynrelocs): Likewise.
608 (tilegx_elf_relocate_section): Likewise.
610 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
613 * elf32-tilepro.c (tilepro_elf_tls_transition): Replace
614 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
615 bfd_link_executable for TLS check.
616 (tilepro_elf_check_relocs): Likewise.
617 (allocate_dynrelocs): Likewise.
618 (tilepro_elf_relocate_section): Likewise.
620 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
623 * elfxx-sparc.c (sparc_elf_tls_transition): Replace
624 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
625 bfd_link_executable for TLS check.
626 (_bfd_sparc_elf_check_relocs): Likewise.
627 (allocate_dynrelocs): Likewise.
628 (_bfd_sparc_elf_relocate_section): Likewise.
630 2017-10-18 H.J. Lu <hongjiu.lu@intel.com>
632 * elf32-tilepro.c (tilepro_elf_gc_mark_hook): Call
633 _bfd_generic_link_add_one_symbol to mark __tls_get_addr.
634 * elfxx-tilegx.c (tilegx_elf_gc_mark_hook): Likewise.
636 2017-10-17 H.J. Lu <hongjiu.lu@intel.com>
638 * elf32-microblaze.c (microblaze_elf_check_relocs): Check for
639 indirect and warning symbols.
641 2017-10-17 Alan Modra <amodra@gmail.com>
644 * elf-properties.c (_bfd_elf_parse_gnu_properties): Compare datasz
645 against size left rather than comparing pointers. Reorganise loop.
647 2017-10-17 Alan Modra <amodra@gmail.com>
650 * aoutx.h (aout_get_external_symbols): Handle stringsize of zero,
651 and error for any other size that doesn't cover the header word.
653 2017-10-16 H.J. Lu <hongjiu.lu@intel.com>
655 * elf-bfd.h (elf_backend_data): Remove gc_sweep_hook.
656 * elf32-arm.c (elf32_arm_gc_sweep_hook): Removed.
657 (elf_backend_gc_sweep_hook): Likewise.
658 * elf32-bfin.c (bfin_gc_sweep_hook): Likewise.
659 (bfinfdpic_gc_sweep_hook): Likewise.
660 (elf_backend_gc_sweep_hook): Likewise.
661 * elf32-cr16.c (elf32_cr16_gc_sweep_hook): Likewise.
662 (elf_backend_gc_sweep_hook): Likewise.
663 * elf32-cris.c (cris_elf_gc_sweep_hook): Likewise.
664 (elf_backend_gc_sweep_hook): Likewise.
665 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Likewise.
666 (elf_backend_gc_sweep_hook): Likewise.
667 * elf32-lm32.c (lm32_elf_gc_sweep_hook): Likewise.
668 (elf_backend_gc_sweep_hook): Likewise.
669 * elf32-m32r.c (m32r_elf_gc_sweep_hook): Likewise.
670 (elf_backend_gc_sweep_hook): Likewise.
671 * elf32-m68k.c (elf_m68k_got_entry): Remove elf_m68k_gc_sweep_hook
673 (elf_m68k_remove_got_entry_type): Removed.
674 (elf_m68k_find_got_entry_ptr): Likewise.
675 (elf_m68k_remove_got_entry): Likewise.
676 (elf_m68k_gc_sweep_hook): Likewise.
677 (elf_backend_gc_sweep_hook): Likewise.
678 * elf32-mcore.c (mcore_elf_gc_sweep_hook): Likewise.
679 (elf_backend_gc_sweep_hook): Likewise.
680 * elf32-metag.c (elf_metag_gc_sweep_hook): Likewise.
681 (elf_backend_gc_sweep_hook): Likewise.
682 * elf32-microblaze.c (elf_backend_gc_sweep_hook): Likewise.
683 (elf_backend_gc_sweep_hook): Likewise.
684 * elf32-mips.c (elf_backend_gc_sweep_hook): Likewise.
685 (elf_backend_gc_sweep_hook): Likewise.
686 * elf32-nds32.c (nds32_elf_gc_sweep_hook): Likewise.
687 (elf_backend_gc_sweep_hook): Likewise.
688 * elf32-nios2.c (nios2_elf32_gc_sweep_hook): Likewise.
689 (elf_backend_gc_sweep_hook): Likewise.
690 * elf32-or1k.c (or1k_elf_gc_sweep_hook): Likewise.
691 (elf_backend_gc_sweep_hook): Likewise.
692 * elf32-ppc.c (ppc_elf_gc_sweep_hook): Likewise.
693 (elf_backend_gc_sweep_hook): Likewise.
694 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
695 (elf_backend_gc_sweep_hook): Likewise.
696 * elf32-sparc.c (elf_backend_gc_sweep_hook): Likewise.
697 * elf32-tic6x.c (elf32_tic6x_gc_sweep_hook): Likewise.
698 (elf_backend_gc_sweep_hook): Likewise.
699 * elf32-tilegx.c (elf_backend_gc_sweep_hook): Likewise.
700 * elf32-tilepro.c (tilepro_elf_gc_sweep_hook): Likewise.
701 (elf_backend_gc_sweep_hook): Likewise.
702 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
703 (elf_backend_gc_sweep_hook): Likewise.
704 * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Likewise.
705 (elf_backend_gc_sweep_hook): Likewise.
706 * elf64-alpha.c (elf64_alpha_gc_sweep_hook): Likewise.
707 (elf_backend_gc_sweep_hook): Likewise.
708 * elf64-mips.c (elf_backend_gc_sweep_hook): Likewise.
709 * elf64-mmix.c (mmix_elf_gc_sweep_hook): Likewise.
710 (elf_backend_gc_sweep_hook): Likewise.
711 * elf64-ppc.c (elf_backend_gc_sweep_hook): Likewise.
712 (ppc64_elf_gc_sweep_hook): Likewise.
713 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
714 (elf_backend_gc_sweep_hook): Likewise.
715 * elf64-sparc.c (elf_backend_gc_sweep_hook): Likewise.
716 * elf64-tilegx.c (elf_backend_gc_sweep_hook): Likewise.
717 * elflink.c (elf_link_add_object_symbols): Don't call
718 _bfd_elf_link_check_relocs here.
719 (gc_sweep_hook_fn): Removed.
720 (elf_gc_sweep): Remove gc_sweep_hook.
721 * elfnn-aarch64.c (elfNN_aarch64_gc_sweep_hook): Removed.
722 (elf_backend_gc_sweep_hook): Likewise.
723 * elfnn-riscv.c (riscv_elf_gc_sweep_hook): Likewise.
724 (elf_backend_gc_sweep_hook): Likewise.
725 * elfxx-mips.c (_bfd_mips_elf_gc_sweep_hook): Likewise.
726 * elfxx-mips.h (_bfd_mips_elf_gc_sweep_hook): Likewise.
727 (elf_backend_gc_sweep_hook): Likewise.
728 * elfxx-sparc.c (_bfd_sparc_elf_gc_sweep_hook): Likewise.
729 * elfxx-sparc.h (_bfd_sparc_elf_gc_sweep_hook): Likewise.
730 * elfxx-target.h (elf_backend_gc_sweep_hook): Likewise.
731 (elfNN_bed): Remove elf_backend_gc_sweep_hook.
732 * elfxx-tilegx.c (tilegx_elf_gc_sweep_hook): Removed.
733 * elfxx-tilegx.h (tilegx_elf_gc_sweep_hook): Likewise.
735 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
737 * elf32-i386.c (elf_i386_backend_data): Removed.
738 (get_elf_i386_backend_data): Likewise.
739 (elf_i386_arch_bed): Replace elf_i386_backend_data with
740 elf_x86_backend_data.
741 (elf_i386_get_synthetic_symtab): Likewise.
742 (elf_i386_nacl_arch_bed): Likewise.
743 (elf_i386_vxworks_arch_bed): Likewise.
744 (elf_i386_relocate_section): Check target_os instead of
746 (elf_i386_finish_dynamic_symbol): Likewise.
747 (elf_i386_finish_dynamic_sections): Use htab->plt0_pad_byte.
748 Check target_os instead of is_vxworks.
749 (elf_i386_link_setup_gnu_properties): Remove normal_target and
750 is_vxworks. Initialize plt0_pad_byte.
751 * elf64-x86-64.c (elf_x86_64_backend_data); Removed.
752 (get_elf_x86_64_arch_data): Likewise.
753 (get_elf_x86_64_backend_data): Likewise.
754 (elf_x86_64_arch_bed): Replace elf_x86_64_backend_data with
755 elf_x86_backend_data.
756 (elf_x86_64_get_synthetic_symtab): Likewise.
757 (elf_x86_64_nacl_arch_bed): Likewise.
758 (elf_x86_64_link_setup_gnu_properties): Remove is_vxworks and
759 normal_target. Initialize plt0_pad_byte.
760 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Check target_os
761 instead of is_vxworks.
762 (_bfd_x86_elf_size_dynamic_sections): Likewise.
763 (_bfd_x86_elf_finish_dynamic_sections): Likewise.
764 (_bfd_x86_elf_adjust_dynamic_symbol): Likewise.
765 (_bfd_x86_elf_link_hash_table_create): Initialize target_os.
766 (_bfd_x86_elf_link_setup_gnu_properties): Remove is_vxworks.
767 Update normal_target. Set up plt0_pad_byte. Check target_os
768 instead of is_vxworks.
769 * elfxx-x86.h (elf_x86_target_os): New.
770 (elf_x86_backend_data): Likewise.
771 (get_elf_x86_backend_data): Likewise.
772 (elf_x86_link_hash_table): Remove is_vxworks. Add plt0_pad_byte
774 (elf_x86_init_table): Remove normal_target and is_vxworks. Add
777 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
779 * elf32-i386.c (elf_i386_finish_dynamic_sections): Call
780 _bfd_x86_elf_finish_dynamic_sections.
781 * elf64-x86-64.c (elf_x86_64_finish_dynamic_sections): Likewise.
782 * elfxx-x86.c (_bfd_x86_elf_finish_dynamic_sections): New
784 * elfxx-x86.h (_bfd_x86_elf_finish_dynamic_sections): New
787 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
790 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
791 hide symbol which was forced to be dynamic.
793 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
796 * elf32-cris.c (cris_elf_relocate_section): Don't generate
797 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
798 (cris_elf_check_relocs): Don't allocate dynamic relocation
799 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
801 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
804 * elf32-sh.c (allocate_dynrelocs): Discard dynamic relocations
805 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
806 (sh_elf_relocate_section): Don't generate dynamic relocation if
807 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
809 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
812 * elf32-s390.c (allocate_dynrelocs): Discard dynamic
813 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
814 (elf_s390_relocate_section): Don't generate dynamic relocation
815 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
816 * elf64-s390.c (allocate_dynrelocs): Discard dynamic
817 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
818 (elf_s390_relocate_section): Don't generate dynamic relocation
819 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
821 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
824 * elf32-nios2.c (nios2_elf32_relocate_section): Don't generate
825 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
826 (allocate_dynrelocs): Discard dynamic relocations if
827 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
829 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
832 * elf32-microblaze.c (microblaze_elf_relocate_section): Don't
833 generate dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is
835 (allocate_dynrelocs): Discard dynamic relocations if
836 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
838 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
841 * elf32-m68k.c (elf_m68k_check_relocs): Don't allocate dynamic
842 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
843 (elf_m68k_adjust_dynamic_symbol): Don't make symbol dynamic if
844 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
845 (elf_m68k_relocate_section): Don't generate dynamic relocation
846 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
848 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
851 * elf32-hppa.c (ensure_undef_dynamic): Don't make undefined
852 symbol dynamic if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
853 (allocate_dynrelocs): Discard dynamic relocations if
854 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
855 (elf32_hppa_relocate_section): Don't generate dynamic
856 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
858 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
861 * elfnn-ia64.c (elfNN_ia64_check_relocs): Don't allocate
862 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
863 (allocate_fptr): Don't allocate function pointer if
864 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
865 (allocate_dynrel_entries): Don't allocate dynamic relocation
866 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
867 (set_got_entry): Don't set GOT entry if
868 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
869 (set_pltoff_entry): Don't set PLTOFF entry if
870 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
871 (elfNN_ia64_relocate_section): Don't install dynamic relocation
872 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
874 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
877 * elfxx-mips.c (mips_elf_calculate_relocation): Don't generate
878 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
879 (allocate_dynrelocs): Don't allocate dynamic relocations if
880 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
882 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
885 * elf32-arm.c (elf32_arm_final_link_relocate): Don't generate
886 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
887 (allocate_dynrelocs_for_symbol): Discard dynamic relocations
888 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
890 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
893 * elf32-tilepro.c (allocate_dynrelocs): Discard dynamic
894 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
895 (tilepro_elf_relocate_section): Don't generate dynamic
896 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
897 * elfxx-tilegx.c (allocate_dynrelocs): Discard dynamic
898 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
899 (tilegx_elf_relocate_section): Don't generate dynamic
900 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
902 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
905 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Don't
906 generate dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is
908 (elfNN_aarch64_allocate_dynrelocs): Discard dynamic relocations
909 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
911 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
913 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Moved to ...
914 * elf-bfd.h (UNDEFWEAK_NO_DYNAMIC_RELOC): Here.
915 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Removed.
917 2017-10-12 James Bowman <james.bowman@ftdichip.com>
919 * bfd-in2.h: Regenerate.
920 * libbfd.h: Regenerate.
921 * elf32-ft32.c: Add HOWTO R_FT32_15.
922 * reloc.c: Add BFD_RELOC_FT32_15.
924 2017-10-12 Nick Clifton <nickc@redhat.com>
926 * reloc.c (enum bfd_reloc_status): Start values at 2.
927 * bfd-in2.h: Regenerate.
928 * elfnn-aarch64.c (aarch64_relocate): Invert sense of function, so
929 that a TRUE return indicates success. Compare the result of
930 calling _bfd_aarch64_elf_put_addend against bfd_reloc_ok.
931 (build_one_stub): Change sense of tests against aarch64_relocate
933 (elfNN_aarch64_tls_relax): Return bfd_reloc_notsupported, rather
934 than FALSE, when an error is detected.
935 (elfNN_aarch64_final_link_relocate): Likewise.
937 2017-10-12 H.J. Lu <hongjiu.lu@intel.com>
939 * elf32-i386.c (elf_backend_hide_symbol): New.
940 * elf64-x86-64.c (elf_backend_hide_symbol): Likewise.
941 * elfxx-x86.c (_bfd_x86_elf_hide_symbol): Likewise.
942 * elfxx-x86.h (_bfd_x86_elf_hide_symbol): Likewise.
944 2017-10-12 Alan Modra <amodra@gmail.com>
946 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Call
947 elf_backend_hide_symbol, not _bfd_elf_link_hash_hide_symbol.
948 (bfd_elf_define_start_stop): Likewise.
950 2017-10-12 Alan Modra <amodra@gmail.com>
952 * elf32-nds32.c (nds32_elf_size_dynamic_sections): Set .interp
953 when executable rather than non-PIC.
954 * elf32-score.c (s3_bfd_score_elf_size_dynamic_sections): Likewise.
955 * elf32-score7.c (s7_bfd_score_elf_size_dynamic_sections): Likewise.
957 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
959 * elf-bfd.h (elf_backend_data): Add `linux_prpsinfo64_ugid16'
961 * elf-linux-core.h (elf_external_linux_prpsinfo64): Rename to...
962 (elf_external_linux_prpsinfo64_ugid32): ... this.
963 (swap_linux_prpsinfo32_out): Rename to...
964 (swap_linux_prpsinfo32_ugid32_out): ... this.
965 (elf_external_linux_prpsinfo64_ugid16): New structure.
966 (swap_linux_prpsinfo64_ugid16_out): New function.
967 * elfxx-target.h [!elf_backend_linux_prpsinfo64_ugid16]
968 (elf_backend_linux_prpsinfo64_ugid16): Define.
969 (elfNN_bed): Initialize `linux_prpsinfo64_ugid16' member.
970 * elf.c (elfcore_write_linux_prpsinfo64): Handle both variants
971 of the 64-bit Linux core PRPSINFO note.
972 * elf64-sh64.c (elf_backend_linux_prpsinfo64_ugid16): Define.
974 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
976 * elf-bfd.h (elf_backend_data): Add `linux_prpsinfo32_ugid16'
978 (elfcore_write_ppc_linux_prpsinfo32): Remove prototype.
979 * elf32-ppc.c (elfcore_write_ppc_linux_prpsinfo32): Remove.
980 (elf_external_ppc_linux_prpsinfo32)
981 (swap_ppc_linux_prpsinfo32_out): Move to...
982 * elf-linux-core.h (elf_external_linux_prpsinfo32_ugid32)
983 (swap_linux_prpsinfo32_ugid32_out): ... these.
984 (elf_external_linux_prpsinfo32): Rename to...
985 (elf_external_linux_prpsinfo32_ugid16): ... this.
986 (swap_linux_prpsinfo32_out): Rename to...
987 (swap_linux_prpsinfo32_ugid16_out): ... this.
988 * elfxx-target.h [!elf_backend_linux_prpsinfo32_ugid16]
989 (elf_backend_linux_prpsinfo32_ugid16): Define.
990 (elfNN_bed): Initialize `linux_prpsinfo32_ugid16' member.
991 * elf.c (elfcore_write_linux_prpsinfo32): Handle both variants
992 of the 32-bit Linux core PRPSINFO note.
993 * elf32-am33lin.c (elf_backend_linux_prpsinfo32_ugid16): Define.
994 * elf32-arm.c (elf_backend_linux_prpsinfo32_ugid16): Define.
995 * elf32-cris.c (elf_backend_linux_prpsinfo32_ugid16): Define.
996 * elf32-frv.c (elf_backend_linux_prpsinfo32_ugid16): Define.
997 * elf32-i386.c (elf_backend_linux_prpsinfo32_ugid16): Define.
998 * elf32-m32r.c (elf_backend_linux_prpsinfo32_ugid16): Define.
999 * elf32-m68k.c (elf_backend_linux_prpsinfo32_ugid16): Define.
1000 * elf32-s390.c (elf_backend_linux_prpsinfo32_ugid16): Define.
1001 * elf32-sh.c (elf_backend_linux_prpsinfo32_ugid16): Define.
1002 * elf32-sparc.c (elf_backend_linux_prpsinfo32_ugid16): Define.
1004 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
1006 * elf-linux-core.h (elf_external_linux_prpsinfo64): Move the
1007 `gap' member ahead of `pr_flag'.
1009 2017-10-11 Pedro Alves <palves@redhat.com>
1011 * bfd.c (_doprnt): Rename to ...
1012 (_bfd_doprnt): ... this.
1013 (error_handler_internal): Adjust.
1015 2017-10-10 H.J. Lu <hongjiu.lu@intel.com>
1017 * elf32-i386.c (elf_i386_check_relocs): Set GOT refcount to 1
1018 instead of incrementing it.
1019 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1021 2017-10-10 Renlin Li <renlin.li@arm.com>
1024 * elf32-arm.c (allocate_dynrelocs_for_symbol): Only make undefined weak
1025 symbols into dynamic.
1027 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
1030 * elfnn-riscv.c (riscv_elf_link_hash_table): Add max_alignment.
1031 (riscv_elf_link_hash_table_create): Initialize max_alignment to
1033 (_bfd_riscv_relax_section): Cache the max alignment of output
1034 sections if possible.
1036 2017-10-10 Alan Modra <amodra@gmail.com>
1038 * elf64-ppc.c (ppc64_elf_before_check_relocs): Set sec_type for
1039 .opd whenever .opd is present and non-zero size. Move code
1040 setting abiversion to/from output file earlier. Only set
1041 u.opd.func_sec when --gc-sections. Read relocs and set up
1042 u.opd.func_sec values here..
1043 (ppc64_elf_check_relocs): ..rather than here. Simplify opd
1045 (ppc64_elf_edit_opd): Don't set sec_type for .opd here.
1047 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
1049 * elf-m10300.c (mn10300_elf_check_relocs): Don't free cached
1052 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
1054 * elf32-bfin.c (bfin_size_dynamic_sections): Don't create the
1055 .interp section with "ld --no-dynamic-linker".
1057 2017-10-09 Alan Modra <amodra@gmail.com>
1060 * dwarf2.c (_bfd_dwarf2_cleanup_debug_info): Free
1061 funcinfo_hash_table and varinfo_hash_table.
1063 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
1065 * elf32-sh.c (readonly_dynrelocs): Dump dynamic relocation
1066 in read-only section with minfo.
1067 (sh_elf_size_dynamic_sections): Likewise.
1069 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
1071 * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Remove
1074 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
1076 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_sections): Set
1077 this_hdr.sh_entsize only if section size > 0.
1079 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
1081 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Reformat.
1083 2017-10-07 H.J. Lu <hongjiu.lu@intel.com>
1085 * elfxx-sparc.c (readonly_dynrelocs): Dump dynamic relocation
1086 in read-only section with minfo.
1087 (_bfd_sparc_elf_size_dynamic_sections): Likewise.
1089 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1091 * elfxx-x86.h (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Update
1094 2017-10-06 John Baldwin <jhb@FreeBSD.org>
1096 * elf-bfd.h (struct elf_backend_data): Add
1097 `elf_backend_grok_freebsd_prstatus'.
1098 * elf.c (elfcore_grok_freebsd_note): Call
1099 `elf_backend_grok_freebsd_prstatus' to handle NT_PRSTATUS if
1101 * elfn32-mips.c (elf_n32_mips_grok_freebsd_prstatus): New
1103 (elf_backend_grok_freebsd_prstatus): Define.
1104 * elfxx-target.h (elf_backend_grok_freebsd_prstatus): Define.
1105 (elfNN_bed): Initialize `elf_backend_grok_freebsd_prstatus'.
1107 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1109 * elf32-i386.c (elf_i386_check_relocs): Replace has_got_reloc
1110 and has_non_got_reloc with zero_undefweak.
1111 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1112 * elfxx-x86.c (_bfd_x86_elf_link_hash_newfunc): Initialize
1113 zero_undefweak to 1.
1114 (_bfd_x86_elf_copy_indirect_symbol): Replace has_got_reloc and
1115 has_non_got_reloc with zero_undefweak.
1116 * elfxx-x86.h (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace
1117 has_got_reloc and has_non_got_reloc with zero_undefweak.
1118 (elf_x86_link_hash_entry): Likewise.
1120 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1122 * elfxx-x86.h (COPY_INPUT_RELOC_P): Add "do/while(0);".
1123 (VERIFY_COPY_RELOC): Likewise.
1125 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1127 * elfxx-x86.h (VERIFY_COPY_RELOC): New.
1128 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Use it.
1129 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
1131 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1133 * elfxx-x86.h (VERIFY_PLT_ENTRY): New.
1134 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Use it.
1135 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
1137 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1139 * elfxx-x86.h (COPY_INPUT_RELOC_P): New.
1140 * elf32-i386.c (elf_i386_relocate_section): Use it.
1141 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1143 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1145 * elf32-i386.c (X86_SIZE_TYPE_P): New.
1146 (elf_i386_relocate_section): Use GENERATE_DYNAMIC_RELOCATION_P.
1147 * elf64-x86-64.c (X86_SIZE_TYPE_P): New.
1148 (elf_x86_64_relocate_section): Use GENERATE_DYNAMIC_RELOCATION_P.
1149 * elfxx-x86.h (GENERATE_DYNAMIC_RELOCATION_P): New.
1151 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1153 * elfxx-x86.h (POINTER_LOCAL_IFUNC_P): New.
1154 (PLT_LOCAL_IFUNC_P): Likewise.
1155 * elf32-i386.c (elf_i386_relocate_section): Use them.
1156 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1158 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1160 * elfxx-x86.h (GENERATE_RELATIVE_RELOC_P): New.
1161 * elf32-i386.c (elf_i386_relocate_section): Use it.
1162 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1164 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1166 * elfxx-x86.h (RESOLVED_LOCALLY_P): New.
1167 * elf32-i386.c (elf_i386_relocate_section): Use it.
1168 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1170 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1172 * elf32-i386.c (X86_PCREL_TYPE_P): New.
1173 (elf_i386_check_relocs): Use NEED_DYNAMIC_RELOCATION_P.
1174 * elf64-x86-64.c (IS_X86_64_PCREL_TYPE): Renamed to ...
1175 (X86_PCREL_TYPE_P): This.
1176 (elf_x86_64_check_relocs): Use NEED_DYNAMIC_RELOCATION_P.
1177 Replace IS_X86_64_PCREL_TYPE with X86_PCREL_TYPE_P.
1178 (elf_x86_64_relocate_section): Replace IS_X86_64_PCREL_TYPE with
1180 * elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): New.
1182 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1184 * elfxx-x86.h (TLS_TRANSITION_IE_TO_LE_P): New.
1185 * elf32-i386.c (elf_i386_tls_transition): Use it.
1186 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
1188 2017-10-05 H.J. Lu <hongjiu.lu@intel.com>
1190 * elf32-ppc.c (readonly_dynrelocs): Add a link_info argument.
1191 Dump dynamic relocation in read-only section with minfo if
1193 (ppc_elf_adjust_dynamic_symbol): Pass NULL to readonly_dynrelocs.
1194 (maybe_set_textrel): Likewise.
1195 (ppc_elf_size_dynamic_sections): Dump dynamic relocation in
1196 read-only section with minfo.
1198 2017-10-05 John Baldwin <jhb@FreeBSD.org>
1200 * elf.c (elfcore_grok_freebsd_note): Handle NT_ARM_VFP.
1202 2017-10-05 H.J. Lu <hongjiu.lu@intel.com>
1204 * elf32-tilepro.c (readonly_dynrelocs): Dump dynamic relocation
1205 in read-only section with minfo.
1206 (tilepro_elf_size_dynamic_sections): Likewise.
1207 * elfxx-tilegx.c (readonly_dynrelocs): Likewise.
1208 (tilegx_elf_size_dynamic_sections): Likewise.
1210 2017-10-05 Pedro Alves <palves@redhat.com>
1213 * bfd.c (bfd_set_error): Revert 2017-10-04 change. Remove
1214 ellipsis parameter. Split out bfd_error_on_input code to..
1215 (bfd_set_input_error): .. New function.
1216 * archive.c (_bfd_write_archive_contents): Use bfd_set_input_error.
1217 * vms-lib.c (_bfd_vms_lib_write_archive_contents): Likewise.
1218 * bfd-in2.h: Regenerate.
1220 2017-10-05 Alan Modra <amodra@gmail.com>
1222 * elflink.c (elf_link_input_bfd): Correct ctor/dtor in init_array/
1223 fini_array error value.
1225 2017-10-05 Alan Modra <amodra@gmail.com>
1228 * elf.c (_bfd_elf_setup_sections): Don't trim reloc sections from
1230 (_bfd_elf_init_reloc_shdr): Pass sec_hdr, use it to copy SHF_GROUP
1232 (elf_fake_sections): Adjust calls. Exit immediately on failure.
1233 (bfd_elf_set_group_contents): Add associated reloc section indices
1236 2017-10-04 Alan Modra <amodra@gmail.com>
1238 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't sort or
1239 classify symbols for ELFv2.
1241 2017-10-04 Pavel I. Kryukov <kryukov@frtk.ru>
1244 * bfd.c (bfd_set_error): Avoid UB on passing arg to va_start that
1245 undergoes default promotion.
1246 * bfd-in2.h: Regenerate.
1248 2017-10-02 Alan Modra <amodra@gmail.com>
1250 * elf32-ppc.c (ppc_elf_relocate_section): Fix comment typo.
1251 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1253 2017-10-01 Alan Modra <amodra@gmail.com>
1256 * dwarf2.c (new_line_sorts_after): Remove end_sequence comparison.
1257 (add_line_info): Always put end_sequence last.
1259 2017-10-01 Alan Modra <amodra@gmail.com>
1262 * dwarf2.c (read_section): Allocate buffer with extra byte for
1263 bfd_simple_get_relocated_section_contents rather than copying
1266 2017-09-29 Alan Modra <amodra@gmail.com>
1268 * merge.c (merge_strings): Return FALSE on malloc failure.
1269 (_bfd_merge_sections): Return failures from record_section and
1272 2017-09-28 Alan Modra <amodra@gmail.com>
1275 * elflink.c (_bfd_elf_merge_symbol): Set non_ir_ref_dynamic in
1276 a case where plugin_notice isn't called.
1278 2017-09-27 Kuan-Lin Chen <kuanlinchentw@gmail.com>
1280 * elf32-nds32.c (nds32_elf_relax_section): Fix a tautological
1283 2017-09-26 H.J. Lu <hongjiu.lu@intel.com>
1286 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't pass
1287 output_bfd to info->callbacks->minfo.
1289 2017-09-26 Nick Clifton <nickc@redhat.com>
1292 * elf64-x86-64.c (elf_x86_64_info_to_howto): Do not trigger an
1293 assertion failure if elf_x86_64_rtype_to_howto has already issued
1296 2017-09-26 Alan Modra <amodra@gmail.com>
1299 * dwarf2.c (read_formatted_entries): Use read_attribute_value to
1302 2017-09-26 Nick Clifton <nickc@redhat.com>
1305 * dwarf2.c (read_formatted_entries): Fail early if we know that
1306 the loop parsing data entries will overflow the end of the
1309 2017-09-26 Alan Modra <amodra@gmail.com>
1312 * dwarf2.c (struct comp_unit): Delete sec_info_ptr field.
1313 (find_abstract_instance_name): Calculate DW_FORM_ref_addr relative
1314 to stash->info_ptr_memory, and check die_ref is within that memory.
1315 Set info_ptr_end correctly when another CU is refd. Check die_ref
1316 for DW_FORM_ref4 etc. is within CU.
1318 2017-09-26 Alan Modra <amodra@gmail.com>
1321 * dwarf2.c (concat_filename): Return "<unknown>" on NULL filename.
1322 (read_formatted_entries): Init "fe".
1323 (decode_line_info <DW_LNE_define_file>): Use line_info_add_file_name.
1325 2017-09-26 Alan Modra <amodra@gmail.com>
1328 * dwarf2.c (decode_line_info): Ensure line_ptr stays within
1329 bounds in inner loop.
1331 2017-09-25 Alan Modra <amodra@gmail.com>
1334 * dwarf1.c (parse_die): Sanity check pointer against section limit
1335 before dereferencing.
1336 (parse_line_table): Likewise.
1338 2017-09-25 Alan Modra <amodra@gmail.com>
1341 * dwarf2.c (scan_unit_for_symbols): Ignore DW_AT_name unless it
1343 (parse_comp_unit): Likewise.
1345 2017-09-25 Alan Modra <amodra@gmail.com>
1348 * dwarf2.c (read_formatted_entries): Error on format_count zero.
1350 2017-09-24 Alan Modra <amodra@gmail.com>
1353 * opncls.c (bfd_get_debug_link_info_1): Properly check that crc is
1354 within section bounds.
1356 2017-09-24 Alan Modra <amodra@gmail.com>
1359 * dwarf2.c (decode_line_info): Properly free line sequences on error.
1361 2017-09-24 Alan Modra <amodra@gmail.com>
1364 * dwarf2.c (find_abstract_instance_name): Add orig_info_ptr and
1365 pname param. Return status. Make name const. Don't abort,
1366 return an error. Formatting. Exit if current info_ptr matches
1367 orig_info_ptr. Update callers.
1368 (scan_unit_for_symbols): Start at nesting_level of zero. Make
1369 nested_funcs an array of structs for extensibility. Formatting.
1371 2017-09-24 Alan Modra <amodra@gmail.com>
1374 * dwarf2.c (decode_line_info): Fail on lh.line_range of zero
1375 rather than dividing by zero.
1377 2017-09-24 Alan Modra <amodra@gmail.com>
1380 * dwarf2.c (decode_line_info): Correct .debug_line unit_length check.
1382 2017-09-24 Alan Modra <amodra@gmail.com>
1385 * dwarf2.c (scan_unit_for_symbols): Check u.blk->data is non-NULL.
1387 2017-09-24 Alan Modra <amodra@gmail.com>
1390 * elf.c (_bfd_elf_slurp_version_tables): Test sh_info on
1391 SHT_GNU_verneed section for sanity. Don't zalloc memory for
1394 2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
1397 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Guard against
1400 2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
1403 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Also return
1404 -1 if bfd_canonicalize_dynamic_reloc returns 0.
1406 2017-09-22 Pedro Alves <palves@redhat.com>
1407 Alan Modra <amodra@gmail.com>
1409 * version.h: Add comment.
1411 2017-09-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1413 * elf.c (elfcore_grok_note): For the cases NT_S390_GS_CB and
1414 NT_S390_GS_BC, correct the previously swapped invocations of
1415 elfcore_grok_s390_gs_bc and elfcore_grok_s390_gs_cb.
1417 2017-09-19 Alan Modra <amodra@gmail.com>
1420 * elf64-ppc.c (ppc64_elf_build_stubs): Don't check glink_eh_frame
1423 2017-09-19 Alan Modra <amodra@gmail.com>
1426 * elflink.c (bfd_elf_size_dynamic_sections): Garbage collect
1427 symbols before calculating verrefs. Don't renumber dynsyms
1428 after gc. Exclude .gnu.version when zero or one dynsym.
1429 Localize some vars and reindent.
1431 2017-09-18 H.J. Lu <hongjiu.lu@intel.com>
1434 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Check error
1435 return from bfd_canonicalize_dynamic_reloc.
1437 2017-09-15 Alan Modra <amodra@gmail.com>
1440 * archive.c (bfd_ar_hdr_from_filesystem): Detect when status.st_size
1441 overflows bfd_size_type.
1443 2017-09-14 H.J. Lu <hongjiu.lu@intel.com>
1446 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument
1447 to indicate if conversion is performed.
1448 (elf_i386_check_relocs): Cache section contents and relocations
1449 if conversion is performed.
1450 * elf64-x86-64.c (elf_x86_64_check_relocs): Cache section
1451 contents and relocations if conversion is performed.
1453 2017-09-14 Nick Clifton <nickc@redhat.com>
1456 * peXXigen.c (pe_print_idata): Extend check for HintName vector
1459 2017-09-13 H.J. Lu <hongjiu.lu@intel.com>
1461 * elfxx-x86.h: Fix a typo in comments.
1463 2017-09-09 Kamil Rytarowski <n54@gmx.com>
1465 * elf32-nds32.c: Rename __BIT() to N32_BIT().
1467 2017-09-09 Alan Modra <amodra@gmail.com>
1469 * elf64-ppp.c (plt_stub_pad): Handle positive and negative
1472 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
1474 * elf32-i386.c (elf_i386_relocate_section): Update usage of
1475 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
1476 (elf_i386_finish_dynamic_symbol): Likewise.
1477 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1478 (elf_x86_64_finish_dynamic_symbol): Likewise.
1479 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Likewise.
1480 (_bfd_x86_elf_fixup_symbol): Likewise.
1482 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
1484 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
1485 check has_non_got_reloc.
1487 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
1490 * elf32-i386.c (elf_i386_convert_load_reloc): Check linker_def.
1491 Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
1492 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Check
1493 linker_def. Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
1494 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Set local_ref
1495 and linker_def on __ehdr_start if it is referenced and not
1497 (_bfd_x86_elf_link_symbol_references_local): Also set local_ref
1498 and return TRUE when building executable, if a symbol has
1499 non-GOT/non-PLT relocations in text section or there is no
1501 * elfxx-x86.h (elf_x86_link_hash_entry): Add linker_def.
1503 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
1505 * elfxx-x86.h: Update comments.
1507 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
1509 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Replace
1510 elf_x86_plt_layout_table with elf_x86_init_table.
1511 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
1513 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties):
1515 * elfxx-x86.h (elf_x86_plt_layout_table): Renamed to ...
1516 (elf_x86_init_table): This.
1517 (_bfd_x86_elf_link_setup_gnu_properties): Replace
1518 elf_x86_plt_layout_table with elf_x86_init_table.
1520 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
1522 * configure.ac (bfd_backends): Don't add elf64-x86-64.lo nor
1523 elf64.lo together with elfxx-x86.lo for 64-bit BFD.
1524 * configure: Regenerated.
1525 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set r_info
1526 and r_sym fields of plt_layout.
1527 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
1529 * elfxx-x86.c (elf_x86_64_is_reloc_section): Remove BFD64 check.
1530 (_bfd_x86_elf_link_hash_table_create): Likewise. Don't set
1531 r_info nor r_sym fields.
1532 (_bfd_x86_elf_link_setup_gnu_properties): Set r_info and r_sym
1534 * elfxx-x86.h (elf_x86_plt_layout_table): Add r_info and r_sym.
1536 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
1538 * (_bfd_riscv_relax_align): Call bfd_set_error and
1539 print an error message when unable to relax a .align directive.
1541 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
1543 * elfnn-riscv.c (riscv_zero_pcrel_hi_reloc): New function.
1544 (riscv_record_pcrel_hi_reloc): Add absolute argument.
1545 (riscv_elf_relocate_section): Call riscv_zero_pcrel_hi_reloc for
1546 R_RISCV_PCREL_HI20 relocs, and pass the result to
1547 riscv_record_pcrel_hi_reloc.
1549 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
1551 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument,
1552 r_type_p. Remove the converted argument. Replace
1553 SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P. Return
1554 the new relocation type via r_type_p.
1555 (elf_i386_relocate_section): Likewise.
1556 (elf_i386_finish_dynamic_symbol): Likewise.
1557 (need_convert_load): Removed.
1558 (check_relocs_failed): Updated.
1559 (elf_i386_check_relocs): Call elf_i386_convert_load_reloc,
1560 instead of setting need_convert_load.
1561 (_bfd_i386_elf_convert_load): Removed.
1562 * elf64-x86-64.c (need_convert_load): Removed.
1563 (check_relocs_failed): Updated.
1564 (elf_x86_64_convert_load_reloc): Add an argument, r_type_p.
1565 Replace SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P.
1566 Return the new relocation type via r_type_p.
1567 (elf_x86_64_check_relocs): Call elf_x86_64_convert_load_reloc,
1568 instead of setting need_convert_load.
1569 (elf_x86_64_check_relocs): Don't check PIC if relocation has
1571 (_bfd_x86_64_elf_convert_load): Removed.
1572 (elf_x86_64_relocate_section): Replace SYMBOL_REFERENCES_LOCAL
1573 with SYMBOL_REFERENCES_LOCAL_P.
1574 (elf_x86_64_finish_dynamic_symbol): Likewise.
1575 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Don't
1577 (_bfd_x86_elf_size_dynamic_sections): Don't call convert_load.
1578 (_bfd_x86_elf_link_symbol_references_local): New function.
1579 * elfxx-x86.h (SYMBOL_REFERENCES_LOCAL_P): New.
1580 (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace elf.forced_local with
1581 SYMBOL_REFERENCES_LOCAL_P.
1582 (elf_x86_link_hash_entry): Add local_ref.
1583 (elf_x86_link_hash_table): Remove convert_load.
1584 (_bfd_i386_elf_convert_load): Removed.
1585 (_bfd_x86_64_elf_convert_load): Likewise.
1586 (_bfd_x86_elf_link_symbol_references_local): New.
1588 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
1590 * elf64-x86-64.c (R_X86_64_converted_reloc_bit): New.
1591 (elf_x86_64_info_to_howto): Get the real relocation type by
1592 masking out R_X86_64_converted_reloc_bit.
1593 (elf_x86_64_check_tls_transition): Get the real relocation type
1594 by masking out R_X86_64_converted_reloc_bit.
1595 (elf_x86_64_convert_load_reloc): Set R_X86_64_converted_reloc_bit
1596 instead of setting converted_reloc.
1597 (elf_x86_64_relocate_section): Check R_X86_64_converted_reloc_bit
1598 instead of converted_reloc. Get the real relocation type by
1599 masking out R_X86_64_converted_reloc_bit.
1600 (elf_x86_64_link_setup_gnu_properties): Verify that the value of
1601 R_X86_64_converted_reloc_bit is valid.
1602 * elfxx-x86.h (converted_reloc): Removed.
1604 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
1606 * elf32-i386.c (elf_i386_relocate_section): Don't change r_type
1607 when calling elf_i386_tls_transition. Don't use ELF32_R_TYPE
1608 to get the relocation type again.
1609 * elf64-x86-64.c (elf_x86_64_relocate_section): Don't change
1610 r_type when calling elf_x86_64_tls_transition. Don't use
1611 ELF32_R_TYPE to get the relocation type again.
1613 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
1615 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Properly set
1618 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
1620 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Remove the sec
1621 argument. Don't check relocation overflow. Avoid relocation
1622 overflow if --no-relax is used. Set converted_reloc on symbol
1623 if a GOTPCREL relocation is converted.
1624 (elf_x86_64_relocate_section): Issue a fatal error and suggest
1625 --no-relax if GOTPCREL relocation conversion leads to relocation
1627 * elfxx-x86.h (elf_x86_link_hash_entry): Add converted_reloc.
1629 2017-09-05 Alexander Fedotov <alexander.fedotov@nxp.com>
1630 Edmar Wienskoski <edmar.wienskoski@nxp.com
1632 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_VLE_ADDR20.
1633 (ppc_elf_check_relocs): Handle it.
1634 (ppc_elf_vle_split20): New function.
1635 (ppc_elf_relocate_section): Handle R_PPC_VLE_ADDR20.
1637 2017-09-03 H.J. Lu <hongjiu.lu@intel.com>
1640 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Set tlsdesc_plt
1641 for x86-64 if GOT_TLS_GDESC_P is true.
1643 2017-09-03 Alan Modra <amodra@gmail.com>
1646 * elfxx-x86.h (elf_x86_hash_table): Check is_elf_hash_table first.
1648 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1650 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1651 tls_get_addr for x86-64 in one place.
1653 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1655 * configure.ac (bfd_backends): Add elf64-x86-64.lo together
1656 with elfxx-x86.lo for 64-bit BFD.
1657 * configure: Regenerated.
1659 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1661 * elf32-i386.c (elf_i386_convert_load): Renamed to ...
1662 (_bfd_i386_elf_convert_load): This. Remove static.
1663 (elf_i386_size_dynamic_sections): Removed.
1664 (elf_backend_size_dynamic_sections): Likewise.
1665 * elf64-x86-64.c (elf_x86_64_convert_load): Renamed to ...
1666 (_bfd_x86_64_elf_convert_load): This. Remove static.
1667 (elf_x86_64_size_dynamic_sections): Removed.
1668 (elf_backend_size_dynamic_sections): Likewise.
1669 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): Renamed to ...
1670 (elf_x86_allocate_dynrelocs): This. Make it static.
1671 (_bfd_x86_elf_allocate_local_dynrelocs): Renamed to ...
1672 (elf_x86_allocate_local_dynreloc): This. Make it static.
1673 (elf_i386_is_reloc_section): New function.
1674 (elf_x86_64_is_reloc_section): Likewise.
1675 (_bfd_x86_elf_link_hash_table_create): Initialize convert_load,
1676 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
1677 Rearrange got_entry_size initialization.
1678 (_bfd_x86_elf_size_dynamic_sections): New function.
1679 * elfxx-x86.h (elf_x86_link_hash_table): Add convert_load,
1680 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
1681 (_bfd_i386_elf_convert_load): New.
1682 (_bfd_x86_64_elf_convert_load): Likewise.
1683 (_bfd_x86_elf_size_dynamic_sections): Likewise.
1684 (elf_backend_size_dynamic_sections): Likewise.
1685 (_bfd_x86_elf_allocate_dynrelocs): Removed.
1686 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
1688 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1690 * elfxx-x86.h (elf_x86_link_hash_table): Rearrange fields and
1693 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1695 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
1696 sgotplt_jump_table_size with elf_x86_compute_jump_table_size.
1698 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1700 * elf32-i386.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
1701 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Moved to ...
1702 * elfxx-x86.h (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
1703 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Here.
1704 * elf64-x86-64.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
1705 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Removed.
1707 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1709 * elf32-i386.c (elf_i386_allocate_dynrelocs): Removed.
1710 (elf_i386_allocate_local_dynrelocs): Likewise.
1711 (elf_i386_size_dynamic_sections): Replace
1712 elf_i386_allocate_dynrelocs/elf_i386_allocate_local_dynrelocs
1713 with _bfd_x86_elf_allocate_dynrelocs and
1714 _bfd_x86_elf_allocate_local_dynrelocs.
1715 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Removed.
1716 (elf_x86_64_allocate_local_dynrelocs): Likewise.
1717 (elf_x86_64_size_dynamic_sections): Replace
1718 elf_x86_64_allocate_dynrelocs/elf_x86_64_allocate_local_dynrelocs
1719 with _bfd_x86_elf_allocate_dynrelocs and
1720 _bfd_x86_elf_allocate_local_dynrelocs.
1721 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): New function.
1722 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
1723 * elfxx-x86.h (_bfd_x86_elf_allocate_dynrelocs): New prototype.
1724 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
1726 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1728 * elf32-i386.c (is_i386_elf): Removed.
1729 (elf_i386_check_relocs): Replace is_i386_elf with is_x86_elf.
1730 (elf_i386_size_dynamic_sections): Likewise.
1731 (elf_i386_relocate_section): Likewise.
1732 * elf64-x86-64.c (is_x86_64_elf): Removed.
1733 (elf_x86_64_check_relocs): Replace is_x86_64_elf with
1735 (elf_x86_64_size_dynamic_sections): Likewise.
1736 (elf_x86_64_relocate_section): Likewise.
1737 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1739 * elfxx-x86.h (elf_x86_link_hash_table): Add target_id.
1742 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1744 * elf32-i386.c (elf_i386_compute_jump_table_size): Removed.
1745 (elf_i386_allocate_dynrelocs): Replace
1746 elf_i386_compute_jump_table_size with
1747 elf_x86_compute_jump_table_size.
1748 (elf_i386_size_dynamic_sections): Likewise.
1749 * elf64-x86-64.c (elf_x86_64_compute_jump_table_size): Removed.
1750 (elf_x86_64_allocate_dynrelocs): Replace
1751 elf_x86_64_compute_jump_table_size with
1752 elf_x86_compute_jump_table_size.
1753 (elf_x86_64_size_dynamic_sections): Likewise.
1754 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1756 * elfxx-x86.h (elf_x86_link_hash_table): Add got_entry_size.
1757 (elf_x86_compute_jump_table_size): New.
1759 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1761 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1763 (_bfd_x86_elf_adjust_dynamic_symbol): Use sizeof_reloc.
1764 * elfxx-x86.h (elf_x86_link_hash_table): Add sizeof_reloc.
1766 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1768 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check VxWorks
1769 with htab->is_vxworks.
1770 (elf_i386_size_dynamic_sections): Likewise.
1771 (elf_i386_relocate_section): Likewise.
1772 (elf_i386_finish_dynamic_symbol): Likewise.
1773 (elf_i386_finish_dynamic_sections): Likewise.
1775 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1777 * elf32-i386.c (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
1778 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
1779 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Moved to ...
1780 * elfxx-x86.h (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
1781 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
1782 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Here.
1783 * elf64-x86-64.c (GOT_TLS_IE, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
1784 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Removed.
1786 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1789 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Check
1790 ELF_COMMON_DEF_P for common symbols.
1792 2017-09-02 Alan Modra <amodra@gmail.com>
1794 * elf-eh-frame.c (offset_adjust): Avoid false positive gcc warning.
1795 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Likewise.
1796 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
1798 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1800 * elf32-i386.c (elf_i386_gc_mark_hook): Removed.
1801 (elf_backend_gc_mark_hook): Likewise.
1802 * elf64-x86-64.c (elf_x86_64_gc_mark_hook): Likewise.
1803 (elf_backend_gc_mark_hook): Likewise.
1804 * elfxx-x86.c (_bfd_x86_elf_gc_mark_hook): New function.
1805 * elfxx-x86.h (_bfd_x86_elf_gc_mark_hook): New.
1806 (elf_backend_gc_mark_hook): Likewise.
1808 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1810 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Removed.
1811 (elf_backend_adjust_dynamic_symbol): Likewise.
1812 * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.
1813 (elf_backend_adjust_dynamic_symbol): Likewise.
1814 * elfxx-x86.c (_bfd_x86_elf_adjust_dynamic_symbol): New function.
1815 (_bfd_x86_elf_link_setup_gnu_properties): Copy is_vxworks.
1816 * elfxx-x86.h (elf_x86_link_hash_table): Add is_vxworks.
1817 (_bfd_x86_elf_adjust_dynamic_symbol): New.
1818 (elf_backend_adjust_dynamic_symbol): Likewise.
1820 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1822 * elfxx-x86.h (elf_x86_plt_layout_table): Fix a typo in
1825 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1827 * elf32-i386.c (elf_i386_mkobject): Removed.
1828 (bfd_elf32_mkobject): Likewise.
1829 * elf64-x86-64.c (elf_x86_64_mkobject): Likewise.
1830 (bfd_elf64_mkobject): Likewise.
1831 (bfd_elf32_mkobject): Likewise.
1832 * elfxx-x86.c (_bfd_x86_elf_mkobject): New function.
1833 * elfxx-x86.h (_bfd_x86_elf_mkobject): New.
1834 (bfd_elf64_mkobject): Likewise.
1835 (bfd_elf32_mkobject): Likewise.
1837 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1839 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Updated.
1840 Call _bfd_x86_elf_link_setup_gnu_properties.
1841 * elf64-x86-64.c (elf_x86_lazy_plt_layout): Initialize
1842 pic_plt0_entry and pic_plt_entry fields with the non-PIC PLT
1844 (elf_x86_64_non_lazy_plt): Likewise.
1845 (elf_x86_64_lazy_bnd_plt): Likewise.
1846 (elf_x86_64_non_lazy_bnd_plt): Likewise.
1847 (elf_x86_64_lazy_ibt_plt): Likewise.
1848 (elf_x32_lazy_ibt_plt): Likewise.
1849 (elf_x86_64_non_lazy_ibt_plt): Likewise.
1850 (elf_x32_non_lazy_ibt_plt): Likewise.
1851 (elf_x86_64_nacl_plt): Likewise.
1852 (elf_x86_64_link_setup_gnu_properties): Updated. Call
1853 _bfd_x86_elf_link_setup_gnu_properties.
1854 * elfxx-x86.c: Include elf-vxworks.h".
1855 (_bfd_x86_elf_link_setup_gnu_properties): New function.
1856 * elfxx-x86.h (elf_x86_lazy_plt_layout): Remove "for i386 only"
1857 comments for pic_plt0_entry and pic_plt_entry.
1858 (elf_x86_non_lazy_plt_layout): Likewise.
1859 (elf_x86_plt_layout_table): New.
1860 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
1862 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1865 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Create
1866 .eh_frame section for the second PLT.
1867 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Correct
1868 alignment of .eh_frame section for the second PLT.
1870 2017-09-01 Nick Clifton <nickc@redhat.com>
1873 * dwarf2.c (decode_line_info): Fix test for an overlong line info
1876 2017-09-01 Nick Clifton <nickc@redhat.com>
1879 * elf-attrs.c (_bfd_elf_parse_attributes): Ensure that the
1880 attribute buffer is NUL terminated.
1882 2017-08-31 Nick Clifton <nickc@redhat.com>
1885 * dwarf2.c (read_section): If necessary add a terminating NUL byte
1886 to dwarf string sections.
1888 2017-08-31 Alan Modra <amodra@gmail.com>
1890 * po/SRC-POTFILES.in: Regenerate.
1892 2017-08-31 Alan Modra <amodra@gmail.com>
1894 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Don't exit early
1895 for a section containing just a terminator. Allow multiple
1896 terminators at end of section.
1897 * elflink.c (bfd_elf_discard_info): Iterate over .eh_frame
1898 sections when not adding alignment. Assert on terminator in
1901 2017-08-31 Alan Modra <amodra@gmail.com>
1905 * elflink.c (bfd_elf_discard_info): Don't pad embedded zero
1908 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1910 * configure.ac (bfd_backends): Add elf64.lo together with
1911 elfxx-x86.lo for 64-bit BFD.
1912 * configure: Regenerated.
1914 2017-08-31 James Bowman <james.bowman@ftdichip.com>
1916 * elf32-ft32.c (ft32_elf_howto_table): Use complain_overflow_dont
1919 2017-08-31 Alan Modra <amodra@gmail.com>
1922 * opncls.c (bfd_close_all_done): Don't call bfd_cache_close
1923 before _close_and_cleanup. Call iovec->bclose after.
1924 (bfd_close): Remove code common to, and call, bfd_close_all_done.
1926 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1928 * elf32-i386.c (elf_i386_plt_type): Removed.
1929 (elf_i386_plt): Likewise.
1930 (elf_i386_get_synthetic_symtab): Updated. Call
1931 _bfd_x86_elf_get_synthetic_symtab.
1932 * elf64-x86-64.c (elf_x86_64_plt_type): Removed.
1933 (elf_x86_64_plt): Likewise.
1934 (elf_x86_64_get_synthetic_symtab): Updated. Call
1935 _bfd_x86_elf_get_synthetic_symtab.
1936 * elfxx-x86.c (elf_i386_get_plt_got_vma): New function.
1937 (elf_x86_64_get_plt_got_vma): Likewise.
1938 (elf_i386_valid_plt_reloc_p): Likewise.
1939 (elf_x86_64_valid_plt_reloc_p): Likewise.
1940 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
1941 * elfxx-x86.h (elf_x86_plt_type): New.
1942 (elf_x86_plt): Likewise.
1943 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
1945 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1947 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Check
1948 target_id instead of elf_machine_code.
1950 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1952 * elf32-i386.c (ELF_DYNAMIC_INTERPRETER): Removed.
1953 (elf_i386_lazy_plt_layout): Likewise.
1954 (elf_i386_non_lazy_plt_layout): Likewise.
1955 (elf_i386_plt_layout): Likewise.
1956 (elf_i386_link_hash_table): Likewise.
1957 (elf_i386_next_tls_desc_index): Likewise.
1958 (elf_i386_srelplt2): Likewise.
1959 (elf_i386_plt): Likewise.
1960 (elf_i386_lazy_plt): Likewise.
1961 (elf_i386_non_lazy_plt): Likewise.
1962 (elf_i386_link_hash_table_create): Likewise.
1963 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1964 (elf_i386_lazy_plt): Updated.
1965 (elf_i386_non_lazy_plt): Likewise.
1966 (elf_i386_lazy_ibt_plt): Likewise.
1967 (elf_i386_non_lazy_ibt_plt): Likewise.
1968 (elf_i386_allocate_dynrelocs): Likewise.
1969 (elf_i386_size_dynamic_sections): Likewise.
1970 (elf_i386_relocate_section): Likewise.
1971 (elf_i386_finish_dynamic_symbol): Likewise.
1972 (elf_i386_finish_dynamic_sections): Likewise.
1973 (elf_i386_get_synthetic_symtab): Likewise.
1974 (elf_i386_link_setup_gnu_properties): Likewise.
1975 (elf_i386_nacl_plt): Likewise.
1976 * elf64-x86-64.c (ABI_64_P): Removed.
1977 (ELF64_DYNAMIC_INTERPRETER): Likewise.
1978 (ELF32_DYNAMIC_INTERPRETER): Likewise.
1979 (elf_x86_64_lazy_plt_layout): Likewise.
1980 (elf_x86_64_non_lazy_plt_layout): Likewise.
1981 (elf_x86_64_plt_layout): Likewise.
1982 (elf_x86_64_link_hash_table): Likewise.
1983 (elf_x86_64_plt): Likewise.
1984 (elf_x86_64_lazy_plt): Likewise.
1985 (elf_x86_64_non_lazy_plt): Likewise.
1986 (elf_x86_64_link_hash_table_create): Likewise.
1987 (bfd_elf64_bfd_link_hash_table_create): Likewise.
1988 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1989 (elf_x86_64_lazy_plt): Updated.
1990 (elf_x86_64_non_lazy_plt): Likewise.
1991 (elf_x86_64_lazy_bnd_plt): Likewise.
1992 (elf_x86_64_non_lazy_bnd_plt): Likewise.
1993 (elf_x86_64_lazy_ibt_plt): Likewise.
1994 (elf_x32_lazy_ibt_plt): Likewise.
1995 (elf_x86_64_non_lazy_ibt_plt): Likewise.
1996 (elf_x32_non_lazy_ibt_plt): Likewise.
1997 (elf_x86_64_allocate_dynrelocs): Likewise.
1998 (elf_x86_64_size_dynamic_sections): Likewise.
1999 (elf_x86_64_relocate_section): Likewise.
2000 (elf_x86_64_finish_dynamic_symbol): Likewise.
2001 (elf_x86_64_finish_dynamic_sections): Likewise.
2002 (elf_x86_64_get_synthetic_symtab): Likewise.
2003 (elf_x86_64_link_setup_gnu_properties): Likewise.
2004 (elf_x86_64_nacl_plt): Likewise.
2005 * elfxx-x86.c: Include "objalloc.h", "elf/i386.h" and
2007 (ELF32_DYNAMIC_INTERPRETER): New.
2008 (ELF64_DYNAMIC_INTERPRETER): Likewise.
2009 (ELFX32_DYNAMIC_INTERPRETER): Likewise.
2010 (_bfd_x86_elf_link_hash_table_create): Likewise.
2011 (_bfd_x86_elf_link_hash_table_free): Renamed to ...
2012 (elf_x86_link_hash_table_free): This. Make it static.
2013 * elfxx-x86.h: Don't include "objalloc.h".
2015 (elf_x86_lazy_plt_layout): Likewise.
2016 (elf_x86_non_lazy_plt_layout): Likewise.
2017 (elf_x86_plt_layout): Likewise.
2018 (_bfd_x86_elf_link_hash_table_create): Likewise.
2019 (bfd_elf64_bfd_link_hash_table_create): Likewise.
2020 (bfd_elf32_bfd_link_hash_table_create): Likewise.
2021 (elf_x86_link_hash_table): Add plt, lazy_plt, non_lazy_plt,
2022 srelplt2 and next_tls_desc_index.
2023 (_bfd_x86_elf_link_hash_table_free): Removed.
2025 2017-08-30 Maciej W. Rozycki <macro@imgtec.com>
2027 * elfxx-mips.c (mips_elf_perform_relocation): Correct microMIPS
2028 branch offset interpretation.
2030 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
2033 * opncls.c (bfd_close_all_done): Call _close_and_cleanup.
2035 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
2037 * elf64-x86-64.c (elf_x86_64_next_tls_desc_index): Removed.
2038 (elf_x86_64_srelplt2): Likewise.
2040 2017-08-30 Alan Modra <amodra@gmail.com>
2042 * elf64-ppc.c (struct ppc_link_hash_table): Add do_tls_opt.
2043 (ppc64_elf_tls_optimize): Set it.
2044 (ppc64_elf_relocate_section): Nop addis on TPREL16_HA, and convert
2045 insn on TPREL16_LO and TPREL16_LO_DS relocs to use r13 when
2046 addis would add zero.
2047 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add do_tls_opt.
2048 (ppc_elf_tls_optimize): Set it.
2049 (ppc_elf_relocate_section): Nop addis on TPREL16_HA, and convert
2050 insn on TPREL16_LO relocs to use r2 when addis would add zero.
2052 2017-08-30 Alan Modra <amodra@gmail.com>
2054 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing
2055 __tls_get_addr call sequences to LE, don't move the addi down
2056 to the nop. Replace the bl with addi and leave the nop alone.
2058 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
2060 * elf32-i386.c (elf_i386_pie_finish_undefweak_symbol):
2062 * elf64-x86-64.c (elf_x86_64_finish_local_dynamic_symbol):
2064 (elf_x86_64_pie_finish_undefweak_symbol): Likewise.
2066 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
2068 * Makefile.am (BFD32_BACKENDS): Add elfxx-x86.lo.
2069 (BFD64_BACKENDS): Likewise.
2070 (BFD32_BACKENDS_CFILES): Add elfxx-x86.c.
2071 (BFD64_BACKENDS_CFILES): Likewise.
2072 * Makefile.in: Regenerated.
2073 * configure.ac (bfd_backends): Add elfxx-x86.lo together with
2074 elf32-i386.lo and elf64-x86-64.lo.
2075 * configure: Regenerated.
2076 * elf32-i386.c: Include "elfxx-x86.h" instead of "sysdep.h",
2077 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
2078 "objalloc.h" and "hashtab.h".
2079 (ELIMINATE_COPY_RELOCS): Removed.
2080 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
2081 (SYMBOL_NO_COPYRELOC): Likewise.
2082 (elf_i386_link_hash_entry): Likewise.
2083 (GOT_UNKNOWN): Likewise.
2084 (GOT_NORMAL): Likewise.
2085 (GOT_TLS_GD): Likewise.
2086 (elf_i386_hash_entry): Likewise.
2087 (elf_i386_obj_tdata): Likewise.
2088 (elf_i386_tdata): Likewise.
2089 (elf_i386_local_got_tls_type): Likewise.
2090 (elf_i386_local_tlsdesc_gotent): Likewise.
2091 (elf_i386_hash_table): Likewise.
2092 (elf_i386_link_hash_newfunc): Likewise.
2093 (elf_i386_local_htab_hash): Likewise.
2094 (elf_i386_local_htab_eq): Likewise.
2095 (elf_i386_get_local_sym_hash): Likewise.
2096 (elf_i386_link_hash_table_free): Likewise.
2097 (elf_i386_copy_indirect_symbol): Likewise.
2098 (elf_i386_fixup_symbol): Likewise.
2099 (elf_i386_readonly_dynrelocs): Likewise.
2100 (elf_i386_always_size_sections): Likewise.
2101 (elf_i386_set_tls_module_base): Likewise.
2102 (elf_i386_dtpoff_base): Likewise.
2103 (compare_relocs): Likewise.
2104 (elf_i386_hash_symbol): Likewise.
2105 (elf_i386_parse_gnu_properties): Likewise.
2106 (elf_i386_merge_gnu_properties): Likewise.
2107 (elf_i386_link_check_relocs): Likewise.
2108 (elf_i386_merge_symbol_attribute): Likewise.
2109 (bfd_elf32_bfd_link_check_relocs): Likewise.
2110 (elf_backend_copy_indirect_symbol): Likewise.
2111 (elf_backend_always_size_sections): Likewise.
2112 (elf_backend_omit_section_dynsym): Likewise.
2113 (elf_backend_hash_symbol): Likewise.
2114 (elf_backend_fixup_symbol): Likewise.
2115 (elf_backend_parse_gnu_properties): Likewise.
2116 (elf_backend_merge_gnu_properties): Likewise.
2117 (elf_backend_merge_symbol_attribute): Likewise.
2118 (elf_i386_mkobject): Updated.
2119 (elf_i386_link_hash_table_create): Likewise.
2120 (elf_i386_check_tls_transition): Likewise.
2121 (elf_i386_tls_transition): Likewise.
2122 (elf_i386_convert_load_reloc): Likewise.
2123 (elf_i386_check_relocs): Likewise.
2124 (elf_i386_adjust_dynamic_symbol): Likewise.
2125 (elf_i386_allocate_dynrelocs): Likewise.
2126 (elf_i386_convert_load): Likewise.
2127 (elf_i386_size_dynamic_sections): Likewise.
2128 (elf_i386_relocate_section): Likewise.
2129 (elf_i386_finish_dynamic_symbol ): Likewise.
2130 (elf_i386_finish_dynamic_sections): Likewise.
2131 (elf_i386_output_arch_local_syms): Likewise.
2132 (elf_i386_get_synthetic_symtab): Likewise.
2133 (elf_i386_link_setup_gnu_properties): Likewise.
2134 (elf_i386_link_hash_table): Use elf_x86_link_hash_table, instead
2135 of elf_link_hash_table, as base.
2136 (elf_i386_next_tls_desc_index): New.
2137 (elf_i386_srelplt2): Likewise.
2138 (elf_i386_plt): Likewise.
2139 (elf_i386_lazy_plt): Likewise.
2140 (elf_i386_non_lazy_plt): Likewise.
2141 * elf32-x86-64.c: Include "elfxx-x86.h" instead of "sysdep.h",
2142 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
2143 "objalloc.h" and "hashtab.h".
2144 (ELIMINATE_COPY_RELOCS): Removed.
2145 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
2146 (SYMBOL_NO_COPYRELOC): Likewise.
2147 (elf_x86_64_link_hash_entry): Likewise.
2148 (GOT_UNKNOWN): Likewise.
2149 (GOT_NORMAL): Likewise.
2150 (GOT_TLS_GD): Likewise.
2151 (elf_x86_64_hash_entry): Likewise.
2152 (elf_x86_64_obj_tdata): Likewise.
2153 (elf_x86_64_tdata): Likewise.
2154 (elf_x86_64_local_got_tls_type): Likewise.
2155 (elf_x86_64_local_tlsdesc_gotent): Likewise.
2156 (elf_x86_64_hash_table): Likewise.
2157 (elf_x86_64_link_hash_newfunc): Likewise.
2158 (elf_x86_64_local_htab_hash): Likewise.
2159 (elf_x86_64_local_htab_eq): Likewise.
2160 (elf_x86_64_get_local_sym_hash): Likewise.
2161 (elf_x86_64_link_hash_table_free): Likewise.
2162 (elf_x86_64_copy_indirect_symbol): Likewise.
2163 (elf_x86_64_fixup_symbol): Likewise.
2164 (elf_x86_64_readonly_dynrelocs): Likewise.
2165 (elf_x86_64_always_size_sections): Likewise.
2166 (elf_x86_64_set_tls_module_base): Likewise.
2167 (elf_x86_64_dtpoff_base): Likewise.
2168 (compare_relocs): Likewise.
2169 (elf_x86_64_merge_symbol_attribute): Likewise.
2170 (elf_x86_64_hash_symbol): Likewise.
2171 (elf_x86_64_parse_gnu_properties): Likewise.
2172 (elf_x86_64_merge_gnu_properties): Likewise.
2173 (elf_x86_64_link_check_relocs): Likewise.
2174 (elf_backend_copy_indirect_symbol): Likewise.
2175 (elf_backend_always_size_sections): Likewise.
2176 (bfd_elf64_bfd_link_check_relocs): Likewise.
2177 (elf_backend_merge_symbol_attribute): Likewise.
2178 (elf_backend_hash_symbol): Likewise.
2179 (elf_backend_omit_section_dynsym): Likewise.
2180 (elf_backend_fixup_symbol): Likewise.
2181 (elf_backend_parse_gnu_properties): Likewise.
2182 (elf_backend_merge_gnu_properties): Likewise.
2183 (bfd_elf32_bfd_link_check_relocs): Likewise.
2184 (elf_x86_64_mkobject): Updated.
2185 (elf_x86_64_link_hash_table_create): Likewise.
2186 (elf_x86_64_check_tls_transition): Likewise.
2187 (elf_x86_64_tls_transition): Likewise.
2188 (elf_x86_64_convert_load_reloc): Likewise.
2189 (elf_x86_64_check_relocs): Likewise.
2190 (elf_x86_64_adjust_dynamic_symbol): Likewise.
2191 (elf_x86_64_allocate_dynrelocs): Likewise.
2192 (elf_x86_64_convert_load): Likewise.
2193 (elf_x86_64_size_dynamic_sections): Likewise.
2194 (elf_x86_64_relocate_section): Likewise.
2195 (elf_x86_64_finish_dynamic_symbol ): Likewise.
2196 (elf_x86_64_finish_dynamic_sections): Likewise.
2197 (elf_x86_64_output_arch_local_syms): Likewise.
2198 (elf_x86_64_get_synthetic_symtab): Likewise.
2199 (elf_x86_64_link_setup_gnu_properties): Likewise.
2200 (elf_x86_64_link_hash_table): Use elf_x86_link_hash_table,
2201 instead of elf_link_hash_table, as base.
2202 (elf_x86_64_next_tls_desc_index): New.
2203 (elf_x86_64_srelplt2): Likewise.
2204 (elf_x86_64_plt): Likewise.
2205 (elf_x86_64_lazy_plt): Likewise.
2206 (elf_x86_64_non_lazy_plt): Likewise.
2207 * elfxx-x86.c: New file.
2208 * elfxx-x86.h: Likewise.
2210 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
2212 * elf32-i386.c (elf_i386_get_synthetic_symtab): Simplify bad
2214 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
2216 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
2218 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check valid PLT
2219 sections before checking dynamic relocations and free invalid
2220 PLT section contents.
2221 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
2223 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
2225 * elf-bfd.h (_bfd_elf_ifunc_get_synthetic_symtab): Removed.
2226 * elf-ifunc.c (_bfd_elf_ifunc_get_synthetic_symtab): Likewise.
2228 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
2231 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check for valid
2233 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
2235 2017-08-27 H.J. Lu <hongjiu.lu@intel.com>
2237 * elf32-i386.c (elf_i386_link_hash_newfunc): Initialize
2239 * elf64-x86-64.c (elf_x86_64_link_hash_newfunc): Likewise.
2241 2017-08-26 H.J. Lu <hongjiu.lu@intel.com>
2244 * elf-bfd.h (elf_obj_tdata): Use ENUM_BITFIELD on object_id,
2245 dyn_lib_class and has_gnu_symbols. Change bad_symtab to bitfield.
2246 Add a has_no_copy_on_protected bitfield.
2247 (elf_has_no_copy_on_protected): New.
2248 * elf-properties.c (_bfd_elf_parse_gnu_properties): Set
2249 elf_has_no_copy_on_protected for GNU_PROPERTY_NO_COPY_ON_PROTECTED.
2250 (elf_merge_gnu_property_list): Likewise.
2251 (_bfd_elf_link_setup_gnu_properties): Set extern_protected_data
2252 to FALSE for elf_has_no_copy_on_protected.
2253 * elf32-i386.c (SYMBOL_NO_COPYRELOC): New.
2254 (elf_i386_link_hash_entry): Add def_protected.
2255 (elf_i386_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
2256 when checking info->nocopyreloc.
2257 (elf_i386_link_setup_gnu_properties): Don't set
2258 extern_protected_data here.
2259 (elf_i386_merge_symbol_attribute): New function.
2260 (elf_backend_merge_symbol_attribute): New.
2261 * elf64-x86-64.c (SYMBOL_NO_COPYRELOC): New.
2262 (elf_x86_64_link_hash_entry): Add def_protected.
2263 (elf_x86_64_need_pic): Report protected symbol for def_protected.
2264 (elf_x86_64_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
2265 when checking info->nocopyreloc.
2266 (elf_x86_64_relocate_section): Also check for R_X86_64_PC32
2267 relocation run-time overflow and unresolvable R_X86_64_32S
2268 relocation against protected data symbol defined in shared object
2269 with GNU_PROPERTY_NO_COPY_ON_PROTECTED.
2270 (elf_x86_64_link_setup_gnu_properties): Don't set
2271 extern_protected_data here.
2272 (elf_x86_64_merge_symbol_attribute): New function.
2273 (elf_backend_merge_symbol_attribute): New.
2275 2017-08-26 Alan Modra <amodra@gmail.com>
2277 * elf32-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
2278 (ppc_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
2279 (ppc_elf_relocate_section): Comment fix.
2280 * elf64-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
2281 (ppc64_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
2282 Support dynamic relocs for TPREL16 when non-pic too.
2283 (dec_dynrel_count): Adjust TPREL16 handling as per check_relocs.
2284 (ppc64_elf_relocate_section): Support dynamic relocs for TPREL16
2287 2017-08-25 H.J. Lu <hongjiu.lu@intel.com>
2289 * elf32-i386.c (elf_i386_link_hash_entry): Remove redundant
2290 "symbol" in comments.
2291 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Likewise.
2293 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
2296 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for
2297 R_X86_64_PC32 relocation run-time overflow and unresolvable
2298 R_X86_64_32S relocation with -z nocopyreloc.
2300 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
2302 * elf32-i386.c (elf_i386_check_relocs): Revert the last change.
2303 Undefined symbols may not have a type.
2304 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
2306 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
2308 * elf64-x86-64.c (elf_x86_64_need_pic): Add an argument for
2309 bfd_link_info. Report shared, PIE or PDE object based on
2311 (elf_x86_64_check_relocs): Update elf_x86_64_need_pic call.
2312 (elf_x86_64_relocate_section): Likewise.
2314 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
2316 * elf32-i386.c (elf_i386_check_relocs): Increment PLT count only
2317 for function symbols.
2318 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
2320 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
2322 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set
2323 extern_protected_data to FALSE if GNU_PROPERTY_NO_COPY_ON_PROTECTED
2324 is set on any input relocatable file.
2325 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
2327 2017-08-23 Alan Modra <amodra@gmail.com>
2330 * elf64-ppc.c (ensure_undef_dynamic): Rename from
2331 ensure_undefweak_dynamic. Handle undefined too.
2332 * elf32-ppc.c (ensure_undef_dynamic): Likewise.
2333 * elf32-hppa.c (ensure_undef_dynamic): Likewise.
2334 (allocate_dynrelocs): Discard undefined non-default visibility
2335 relocs first. Make undefined syms dynamic. Tidy goto.
2337 2017-08-21 Alan Modra <amodra@gmail.com>
2338 H.J. Lu <hongjiu.lu@intel.com>
2341 * elf-bfd.h (SYMBOLIC_BIND): Return TRUE for __start/__stop symbols.
2342 * elflink.c (bfd_elf_define_start_stop): Rewrite.
2344 2017-08-21 Hans-Peter Nilsson <hp@bitrange.com>
2347 * elf64-mmix.c (mmix_elf_relax_section): Correct handling of
2348 undefined weak symbols.
2350 2017-08-18 Nick Clifton <nickc@redhat.com>
2353 * tekhex.c (getsym): Fix check for source pointer walking off the
2354 end of the input buffer.
2356 2017-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
2359 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Skip IFUNC
2360 relocations in debug sections, change abort to _bfd_error_handler.
2362 2017-08-14 Nick Clifton <nickc@redhat.com>
2365 * elf.c (setup_group): Check for an empty or very small group
2367 * po/bfd.pot: Regenerate.
2369 2017-08-14 Alan Modra <amodra@gmail.com>
2372 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't add
2373 alignment padding here.
2374 * elflink.c (bfd_elf_discard_info): Add .eh_frame padding here
2375 in a reverse pass over sections.
2377 2017-08-11 H.J. Lu <hongjiu.lu@intel.com>
2380 * elf32-i386.c (elf_i386_get_synthetic_symtab): Allocate space
2381 for @plt suffixes first.
2382 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
2384 2017-08-08 Nick Clifton <nickc@redhat.com>
2387 * elf-attrs.c (_bfd_elf_parse_attributes): Complain about very
2388 small section lengths.
2389 * elf.c (_bfd_elf_setup_sections): Skip empty entries in the group
2391 (elfcore_grok_freebsd_prstatus): Add checks to make sure that
2392 there is enough data present in the note.
2394 2017-08-08 Alan Modra <amodra@gmail.com>
2397 * elf32-microblaze.c (microblaze_elf_check_relocs): Don't bump
2398 got.refcount for GOTOFF relocs, just create .got section.
2400 2017-08-07 H.J. Lu <hongjiu.lu@intel.com>
2402 * elflink.c (elf_link_add_object_symbols): Move common symbol
2403 check after bed->common_definition.
2405 2017-08-07 Alan Modra <amodra@gmail.com>
2408 * elflink.c (bfd_elf_final_link): Don't segfault when sections
2409 needed to define various dynamic tags have been discarded.
2411 2017-08-07 Nick Clifton <nickc@redhat.com>
2414 * elf32-i386.c (elf_i386_link_setup_gnu_properties): If the dynobj
2415 has not been set then use the bfd returned by
2416 _bfd_elf_link_setup_gnu_properties. If that is null then search
2417 through all the input bfds selecting the first normal, ELF format
2419 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
2421 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
2423 * elf32-i386.c (elf_i386_link_hash_entry): Change tls_get_addr
2425 (elf_i386_link_hash_newfunc): Initialize tls_get_addr to 0.
2426 (elf_i386_check_tls_transition): Check tls_get_addr directly.
2427 (elf_i386_convert_load_reloc): Update tls_get_addr check.
2428 (elf_i386_link_check_relocs): New function.
2429 (bfd_elf32_bfd_link_check_relocs): New.
2430 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Change tls_get_addr
2432 (elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 0.
2433 (elf_x86_64_check_tls_transition): Check tls_get_addr directly.
2434 (elf_x86_64_convert_load_reloc): Update tls_get_addr check.
2435 (elf_x86_64_link_check_relocs): New function.
2436 (bfd_elf64_bfd_link_check_relocs): New.
2437 (bfd_elf32_bfd_link_check_relocs): Likewise.
2439 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
2442 * elflink.c (elf_link_add_object_symbols): Treat common symbol
2443 as undefined for --no-define-common.
2445 2017-08-05 Alan Modra <amodra@gmail.com>
2447 * elf32-hppa.c (elf32_hppa_set_gp): Don't require an
2448 hppa_link_hash_table.
2450 2017-08-02 Max Filippov <jcmvbkbc@gmail.com>
2452 * xtensa-isa.c (xtensa_isa_init): Don't update lookup table
2453 entries for sysregs with negative indices.
2455 2017-08-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2457 * elf32-s390.c (elf_s390_finish_dynamic_sections): Skip if it
2458 isn't the S/390 specific elf data.
2459 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
2461 2017-07-31 Kuan-Lin Chen <rufus@andestech.com>
2463 * elfxx-riscv.c (riscv_elf_add_sub_reloc): New function.
2464 * (howto_table) [R_RISCV_ADD8]: Use riscv_elf_add_sub_reloc.
2465 [R_RISCV_ADD16]: Likewise.
2466 [R_RISCV_ADD32]: Likewise.
2467 [R_RISCV_ADD64]: Likewise.
2468 [R_RISCV_SUB6]: Likewise.
2469 [R_RISCV_SUB8]: Likewise.
2470 [R_RISCV_SUB16]: Likewise.
2471 [R_RISCV_SUB32]: Likewise.
2472 [R_RISCV_SUB64]: Likewise.
2474 2017-07-31 Alan Modra <amodra@gmail.com>
2476 * elf64-ppc.c (ppc64_elf_tls_setup): Warn on --plt-localentry
2477 without ld.so checks.
2479 2017-07-29 Alan Modra <amodra@gmail.com>
2482 * elf64-ppc.c (struct ppc_link_hash_entry): Add non_zero_localentry.
2483 (ppc64_elf_merge_symbol): Set non_zero_localentry.
2484 (is_elfv2_localentry0): Test non_zero_localentry.
2485 (ppc64_elf_tls_setup): Default to --no-plt-localentry.
2487 2017-07-28 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2489 * elf32-s390.c (elf_s390_finish_dynamic_sections): Add NULL
2490 pointer check for htab->elf.irelplt.
2491 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
2493 2017-07-27 Nick Clifton <nickc@redhat.com>
2496 * mach-o.c (bfd_mach_o_read_symtab_strtab): Fail if the symtab
2498 * nlmcode.h (nlm_swap_auxiliary_headers_in): Replace assertion
2500 * section.c (bfd_make_section_with_flags): Fail if the name or bfd
2502 * vms-alpha.c (bfd_make_section_with_flags): Correct computation
2504 (evax_bfd_print_emh): Check for invalid string lengths.
2506 2017-07-25 Nick Clifton <nickc@redhat.com>
2508 * po/fr.po: Updated French translation.
2510 2017-07-25 Benjamin Green <bengreen5mx@gmail.com>
2513 * elf32-msp430.c (msp430_elf_relax_section): Allow conversion of
2514 16-bit absolute branches into 10-bit pc-relative branches on the
2515 MSP430 as well as the MSP430X.
2517 2017-07-25 Alan Modra <amodra@gmail.com>
2519 * elf64-ppc.c (struct map_stub): Add tls_get_addr_opt_bctrl.
2520 (stub_eh_frame_size): New function.
2521 (ppc_size_one_stub): Set group tls_get_addr_opt_bctrl.
2522 (group_sections): Init group tls_get_addr_opt_bctrl.
2523 (ppc64_elf_size_stubs): Update sizing and initialization of
2524 .eh_frame. Iteration over stubs via group list.
2525 (ppc64_elf_build_stubs): Iterate over stubs via group list.
2526 (ppc64_elf_finish_dynamic_sections): Update finalization of
2529 2017-07-24 Nick Clifton <nickc@redhat.com>
2532 * mach-o.c (bfd_mach_o_canonicalize_relocs): Pass the base address
2533 of the relocs to the canonicalize_one_reloc routine.
2534 * mach-o.h (struct bfd_mach_o_backend_data): Update the prototype
2535 for the _bfd_mach_o_canonicalize_one_reloc field.
2536 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add
2537 res_base parameter. Use to check for corrupt pair relocs.
2538 * mach-o-aarch64.c (bfd_mach_o_arm64_canonicalize_one_reloc):
2540 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc):
2542 * mach-o-x86-64.c (bfd_mach_o_x86_64_canonicalize_one_reloc):
2545 * vms-alpha.c (_bfd_vms_slurp_eihd): Make sure that there is
2546 enough data in the record before attempting to parse it.
2547 (_bfd_vms_slurp_eeom): Likewise.
2549 (_bfd_vms_slurp_egsd): Check for an invalid section index.
2550 (image_set_ptr): Likewise.
2551 (alpha_vms_slurp_relocs): Likewise.
2553 (alpha_vms_object_p): Check for a truncated record.
2555 2017-07-24 Nick Clifton <nickc@redhat.com>
2558 * reloc.c (_bfd_unrecognized_reloc): New function. Reports
2559 an unrecognized reloc and sets the bfd_error value.
2560 * libbfd.h: Regenerate.
2561 * elf32-arm.c (elf32_arm_final_link_relocate): Use the new
2563 * elf32-i386.c (elf_i386_relocate_section): Likewise.
2564 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
2565 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
2566 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.
2567 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
2569 2017-07-23 Alan Modra <amodra@gmail.com>
2571 * elf64-ppc.c (ppc64_elf_size_stubs): Correct advance to
2574 2017-07-19 Szabolcs Nagy <szabolcs.nagy@arm.com>
2577 * elfnn-aarch64.c (elfNN_aarch64_reloc_type_class): Return
2578 reloc_class_ifunc for ifunc symbols.
2580 2017-07-19 Nick Clifton <nickc@redhat.com>
2583 * archive.c (bfd_generic_archive_p): If the bfd does not have the
2584 correct magic bytes at the start, set the error to wrong format
2585 and clear the format selector before returning NULL.
2587 2017-07-19 Nick Clifton <nickc@redhat.com>
2590 * coff-rs6000.c (_bfd_strntol): New function.
2591 (_bfd_strntoll): New function.
2592 (GET_VALUE_IN_FIELD): New macro.
2593 (EQ_VALUE_IN_FIELD): new macro.
2594 (_bfd_xcoff_slurp_armap): Use new macros.
2595 (_bfd_xcoff_archive_p): Likewise.
2596 (_bfd_xcoff_read_ar_hdr): Likewise.
2597 (_bfd_xcoff_openr_next_archived_file): Likewise.
2598 (_bfd_xcoff_stat_arch_elt): Likewise.
2599 * coff64-rs6000.c (_bfd_strntol): New function.
2600 (_bfd_strntoll): New function.
2601 (GET_VALUE_IN_FIELD): New macro.
2602 (xcoff64_slurp_armap): Use new macros.
2604 2017-07-19 Claudiu Zissulescu <claziss@synopsys.com>
2605 John Eric Martin <John.Martin@emmicro-us.com>
2607 * bfd-in2.h: Regenerate.
2608 * libbfd.h: Regenerate.
2609 * elf32-arc.c (JLI): Define.
2610 * reloc.c: Add JLI relocations.
2612 2017-07-18 Nick Clifton <nickc@redhat.com>
2615 * coff-sh.c: Fix spelling typos.
2616 * compress.c: Likewise.
2617 * cpu-pdp11.c: Likewise.
2618 * ecofflink.c: Likewise.
2619 * elf-m10300.c: Likewise.
2621 * elf32-arm.c: Likewise.
2622 * elf32-m68k.c: Likewise.
2623 * elf32-nds32.c: Likewise.
2624 * elf32-ppc.c: Likewise.
2625 * elf32-sh.c: Likewise.
2626 * elf32-v850.c: Likewise.
2627 * elf64-ppc.c: Likewise.
2628 * elf64-x86-64.c: Likewise.
2629 * elflink.c: Likewise.
2630 * elfnn-aarch64.c: Likewise.
2631 * elfxx-mips.c: Likewise.
2633 * sunos.c: Likewise.
2634 * vms-alpha.c: Likewise.
2635 * xcofflink.c: Likewise.
2637 2017-07-18 Nick Clifton <nickc@redhat.com>
2640 * coffcode.h (handle_COMDAT): Replace abort with an error message
2643 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
2646 * elf64-x86-64.c (elf_x86_64_relocate_section): Limit PIC check
2649 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
2651 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
2653 2017-07-16 Alan Modra <amodra@gmail.com>
2655 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimize
2656 __tls_index GOT entries when using __tls_get_addr_opt stub.
2657 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2659 2017-07-12 Alan Modra <amodra@gmail.com>
2661 * po/es.po: Update from translationproject.org/latest/bfd/.
2662 * po/fi.po: Likewise.
2663 * po/fr.po: Likewise.
2664 * po/id.po: Likewise.
2665 * po/ja.po: Likewise.
2666 * po/ro.po: Likewise.
2667 * po/ru.po: Likewise.
2668 * po/sr.po: Likewise.
2669 * po/sv.po: Likewise.
2670 * po/tr.po: Likewise.
2671 * po/uk.po: Likewise.
2672 * po/vi.po: Likewise.
2673 * po/zh_CN.po: Likewise.
2674 * po/hr.po: New file from translationproject.org.
2675 * configure.ac (ALL_LINGUAS): Add hr. Sort.
2676 * configure: Regenerate.
2678 2017-07-12 Nick Clifton <nickc@redhat.com>
2680 Fix compile time warnings using gcc 7.1.1.
2681 * elf32-xtensa.c (elf_xtensa_get_plt_section): Increase length of
2683 (elf_xtensa_get_gotplt_section): Increase length of got_name
2685 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add a
2686 default return of FALSE.
2687 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc): Add a
2688 default return of FALSE.
2690 2017-07-12 Alan Modra <amodra@gmail.com>
2692 * binary.c (binary_set_section_contents): Don't print filepos in
2694 (coff_write_object_contents): Cast size_t for error message.
2695 (coff_slurp_line_table): Don't use bfd_vma symndx.
2696 (coff_slurp_reloc_table): Remove unneeded cast.
2697 * dwarf2.c (read_section): Cast bfd_int64_t to long long for
2699 (find_abstract_instance_name): Likewise.
2700 * elf32-arm.c (arm_type_of_stub): Correct error arg order.
2701 (bfd_elf32_arm_stm32l4xx_erratum_scan): Don't cast error arg.
2702 (elf32_arm_check_relocs): Make r_symndx an int.
2703 * elf32-cris.c (cris_elf_check_relocs): Delete extraneous %s in
2705 * elf32-metag.c (elf_metag_relocate_section): Delete extra error
2707 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Rewrite bogus
2709 * elf32-i386.c (elf_i386_check_relocs): Make r_symndx an int.
2710 * elf32-s390.c (elf_s390_check_relocs): Likewise.
2711 * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
2712 * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
2713 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
2714 * elf64-s390.c (elf_s390_check_relocs): Likewise.
2715 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
2716 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
2717 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
2718 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
2719 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
2720 * elf64-mmix.c (_bfd_mmix_after_linker_allocation): Cast size_t args
2721 and use %lu for error message.
2722 * elflink.c (elf_link_adjust_relocs): Delete extra error message arg.
2723 * mmo.c (mmo_scan): Make stab_loc a file_ptr. Cast expression for
2726 * elf32-arm.c (elf32_arm_tls_relax): Correct format string and args
2728 (elf32_arm_final_link_relocate): Likewise.
2729 * coff-arm.c (bfd_arm_process_before_allocation): Likewise.
2730 * coffcode.h (styp_to_sec_flags): Likewise.
2731 * cofflink.c (_bfd_coff_write_global_sym): Likewise.
2732 * ecoff.c (_bfd_ecoff_slurp_symbol_table): Likewise.
2733 * elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise.
2734 * elf32-bfin.c (bfinfdpic_check_relocs): Likewise.
2735 (elf32_bfin_merge_private_bfd_data): Likewise.
2736 * elf32-cris.c (cris_elf_relocate_section): Likewise.
2737 * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
2738 * elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise.
2739 (i370_elf_relocate_section): Likewise.
2740 * elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise.
2741 * elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise.
2742 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
2743 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
2744 * elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise.
2745 * elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise.
2746 * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
2747 * elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise.
2748 (_bfd_mips_elf_merge_private_bfd_data): Likewise.
2749 * ieee.c (ieee_write_id, read_id): Likewise.
2750 * mach-o.c (bfd_mach_o_write_contents): Likewise.
2751 (bfd_mach_o_layout_commands, bfd_mach_o_read_section_32): Likewise.
2752 (bfd_mach_o_read_section_64, bfd_mach_o_read_symtab_symbol): Likewise.
2753 (bfd_mach_o_read_command, bfd_mach_o_header_p): Likewise.
2754 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Likewise.
2755 * stabs.c (_bfd_link_section_stabs): Likewise.
2757 * coff-arm.c (coff_arm_relocate_section): Use L modifier in error
2759 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
2760 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
2761 * coff-rs6000.c (xcoff_reloc_type_toc): Likewise.
2762 * coff-sh.c (sh_relax_section): Likewise.
2763 (sh_relax_delete_bytes, sh_swap_insns): Likewise.
2764 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
2765 * coffcode.h (coff_slurp_reloc_table): Likewise.
2766 * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
2767 (_bfd_coff_read_string_table): Likewise.
2768 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
2769 * compress.c (bfd_get_full_section_contents): Likewise.
2770 * dwarf2.c (read_formatted_entries, decode_line_info): Likewise.
2771 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
2772 * elf.c (bfd_elf_string_from_elf_section): Likewise.
2773 * elf32-arc.c (arc_special_overflow_checks): Likewise.
2774 * elf32-arm.c (elf32_arm_tls_relax): Likewise.
2775 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Likewise.
2776 (elf32_arm_write_section): Likewise.
2777 * elf32-bfin.c (bfin_relocate_section): Likewise.
2778 (bfinfdpic_relocate_section): Likewise.
2779 * elf32-hppa.c (hppa_build_one_stub): Likewise.
2780 (final_link_relocate, elf32_hppa_relocate_section): Likewise.
2781 * elf32-i386.c (elf_i386_tls_transition): Likewise.
2782 (elf_i386_relocate_section): Likewise.
2783 * elf32-ip2k.c (ip2k_final_link_relocate): Likewise.
2784 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
2785 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
2786 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
2787 * elf32-metag.c (elf_metag_relocate_section): Likewise.
2788 * elf32-nds32.c (unrecognized_reloc_msg): Likewise.
2789 (nds32_elf_relax_longcall1, nds32_elf_relax_longcall2): Likewise.
2790 (nds32_elf_relax_longcall3, nds32_elf_relax_longjump1): Likewise.
2791 (nds32_elf_relax_longjump2, nds32_elf_relax_longjump3): Likewise.
2792 (nds32_elf_relax_longcall4, nds32_elf_relax_longcall5): Likewise.
2793 (nds32_elf_relax_longcall6, nds32_elf_relax_longjump4): Likewise.
2794 (nds32_elf_relax_longjump5, nds32_elf_relax_longjump6): Likewise.
2795 (nds32_elf_relax_longjump7, nds32_elf_relax_loadstore): Likewise.
2796 (nds32_elf_relax_ptr, nds32_elf_ex9_build_hash_table): Likewise.
2797 * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
2798 * elf32-rx.c (UNSAFE_FOR_PID): Likewise.
2799 * elf32-s390.c (invalid_tls_insn, elf_s390_relocate_section): Likewise.
2800 * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
2801 * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
2802 * elf32-sh.c (sh_elf_relax_section): Likewise.
2803 (sh_elf_relax_delete_bytes, sh_elf_swap_insns): Likewise.
2804 (sh_elf_relocate_section): Likewise.
2805 * elf32-sh64.c (shmedia_prepare_reloc): Likewise.
2806 * elf32-spu.c (spu_elf_relocate_section): Likewise.
2807 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
2808 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
2809 * elf32-v850.c (v850_elf_relax_section): Likewise.
2810 * elf32-vax.c (elf_vax_check_relocs): Likewise.
2811 (elf_vax_relocate_section): Likewise.
2812 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
2813 (extend_ebb_bounds_forward, extend_ebb_bounds_backward): Likewise.
2814 (compute_text_actions, compute_ebb_proposed_actions): Likewise.
2815 (do_fix_for_relocatable_link): Likewise.
2816 * elf64-alpha.c (elf64_alpha_relax_got_load): Likewise.
2817 (elf64_alpha_relax_with_lituse): Likewise.
2818 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Likewise.
2819 (elf_hppa_final_link_relocate): Likewise.
2820 * elf64-ia64-vms.c (elf64_ia64_relax_section): Likewise.
2821 (elf64_ia64_choose_gp, elf64_ia64_relocate_section): Likewise.
2822 (elf64_vms_link_add_object_symbols): Likewise.
2823 * elf64-mmix.c (mmix_elf_perform_relocation): Likewise.
2824 (mmix_final_link_relocate): Likewise.
2825 * elf64-s390.c (invalid_tls_insn): Likewise.
2826 (elf_s390_relocate_section): Likewise.
2827 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
2828 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
2829 (elf_x86_64_relocate_section): Likewise.
2830 * elfcode.h (elf_slurp_symbol_table): Likewise.
2831 * elfcore.h (elf_core_file_p): Likewise.
2832 * elflink.c (elf_link_read_relocs_from_section): Likewise.
2833 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
2834 (elfNN_aarch64_relocate_section): Likewise.
2835 * elfnn-ia64.c (elfNN_ia64_relax_section): Likewise.
2836 (elfNN_ia64_choose_gp, elfNN_ia64_relocate_section): Likewise.
2837 * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
2838 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
2839 (_bfd_mips_elf_relocate_section): Likewise.
2840 (_bfd_mips_elf_finish_dynamic_symbol, mips_finish_exec_plt): Likewise.
2841 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
2842 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
2843 * ieee.c (ieee_slurp_external_symbols): Likewise.
2844 * ihex.c (ihex_write_object_content): Likewise.
2845 * mach-o.c (bfd_mach_o_build_exec_seg_command): Likewise.
2846 * merge.c (_bfd_merged_section_offset): Likewise.
2847 * mmo.c (mmo_write_loc_chunk): Likewise.
2848 (mmo_write_object_contents): Likewise.
2849 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Likewise.
2850 * stabs.c (_bfd_link_section_stabs): Likewise.
2851 * xcofflink.c (xcoff_link_add_symbols, xcoff_find_tc0): Likewise.
2853 2017-07-11 Alan Modra <amodra@gmail.com>
2855 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo.
2857 2017-07-11 Alan Modra <amodra@gmail.com>
2859 * elf32-ppc.c (ppc_elf_relocate_section): Emit "unexpected
2860 instruction" error using _bfd_error_handler, not einfo.
2862 2017-07-10 Nick Clifton <nickc@redhat.com>
2864 * coffcode.h (coff_slurp_symbol_table): Do not include an entry
2865 for C_AIX_WEAKEXT if it has the same value as C_WEAKEXT.
2867 2017-07-07 John Baldwin <jhb@FreeBSD.org>
2869 * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PTLWPINFO.
2871 2017-07-07 Alan Modra <amodra@gmail.com>
2873 * coffcode.h (coff_slurp_symbol_table): Handle C_AIX_WEAKEXT.
2875 2017-07-07 Alan Modra <amodra@gmail.com>
2877 * bfd.c (_doprnt): Replace "L" with "ll" when printing bfd_vma
2878 as long long. Move code replacing "ll" with "I64", and simplify.
2880 2017-07-06 H.J. Lu <hongjiu.lu@intel.com>
2882 * bfd.c (_doprnt): Convert 'L' to 'l' when setting wide_width
2885 2017-07-05 H.J. Lu <hongjiu.lu@intel.com>
2887 * dwarf2.c (line_info_add_include_dir_stub): Replace time with
2889 (line_info_add_file_name): Likewise.
2890 (decode_line_info): Likewise.
2892 2017-07-04 Tristan Gingold <gingold@adacore.com>
2894 * version.m4: Bump version to 2.29.51
2895 * configure: Regenerate.
2897 2017-07-04 Jiong Wang <jiong.wang@arm.com>
2899 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Remove the
2900 sanity check at the head of this function.
2902 2017-07-04 Jan Kratochvil <jan.kratochvil@redhat.com>
2904 * dwarf2.c (struct dwarf2_debug): Add fields dwarf_line_str_buffer and
2905 dwarf_line_str_size.
2906 (struct attr_abbrev): Add field implicit_const.
2907 (dwarf_debug_sections): Add .debug_line_str.
2908 (enum dwarf_debug_section_enum): Add debug_line_str and debug_max.
2909 (dwarf_debug_section_assert): Add static assertion.
2910 (read_indirect_line_string): New.
2911 (read_abbrevs): Support DW_FORM_implicit_const.
2912 (is_str_attr): Support DW_FORM_line_strp.
2913 (read_attribute_value): Support DW_FORM_line_strp and
2914 DW_FORM_implicit_const.
2915 (read_attribute): Support DW_FORM_implicit_const.
2916 (line_info_add_include_dir, line_info_add_include_dir_stub):
2917 (line_info_add_file_name, read_formatted_entries): New.
2918 (decode_line_info, parse_comp_unit): Support DWARF 5.
2919 (_bfd_dwarf2_cleanup_debug_info): Free dwarf_line_str_buffer.
2921 2017-07-03 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
2923 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove the
2924 abort statement that was put for symbols that are not dynamic.
2926 2017-07-03 Tristan Gingold <gingold@adacore.com>
2928 * po/bfd.pot: Regenerate
2930 2017-07-03 Alan Modra <amodra@gmail.com>
2932 * bfd.c (_doprnt): Rewrite "ll" and "L" modifiers to "I64" for
2933 __MSVCRT__. Support "L" modifier for bfd_vma. Formatting.
2934 * elf.c (setup_group): Use "Lx" to print sh_size.
2935 (_bfd_elf_setup_sections): Remove unnecessary cast and print
2936 unknown section type in hex.
2937 (copy_special_section_fields): Style fix.
2938 (bfd_section_from_shdr): Correct format for sh_link. Use a
2939 common error message for all the variants of unrecognized
2941 (assign_file_positions_for_load_sections): Use "Lx" for lma
2942 adjust error message.
2943 (assign_file_positions_for_non_load_sections): Formatting.
2944 (rewrite_elf_program_header): Formatting. Use "Lx" for
2945 bfd_vma values in error messages.
2946 * elfcode.h (elf_slurp_reloc_table_from_section): Cast
2947 ELF_R_SYM value to type expected by format.
2948 * elflink.c (elf_link_read_relocs_from_section): Use "Lx"
2950 (elf_link_add_object_symbols): Use "Lu" for symbol sizes.
2951 (elf_link_input_bfd): Use "Lx" for r_info.
2952 (bfd_elf_gc_record_vtinherit): Use "Lx" for offset.
2954 2017-07-03 Alan Modra <amodra@gmail.com>
2956 * bfd.c (bfd_scan_vma): Don't use long long unless HAVE_LONG_LONG.
2957 * coff-rs6000.c (FMT20): Handle hosts with 64-bit long and
2958 Microsoft C library variant of long long format specifier.
2959 (PRINT20): Cast value to bfd_uint64_t not long long.
2960 * coffcode.h (coff_print_aux): Use BFD_VMA_FMT.
2961 * coff-x86_64.c (coff_amd64_reloc): Use bfd_uint64_t rather than
2962 long long. Don't cast to bfd_vma.
2963 * elf32-score.c (score3_bfd_getl48): Likewise.
2964 * vms-alpha.c (_bfd_vms_slurp_eisd): Likewise.
2966 2017-07-03 Alan Modra <amodra@gmail.com>
2968 * elf.c (_bfd_elf_print_private_bfd_data): Use BFD_VMA_FMT to
2970 (bfd_elf_print_symbol): Don't cast symbol->flags.
2971 (_bfd_elf_symbol_from_bfd_symbol): Likewise.
2972 * elf32-ppc.c (ppc_elf_begin_write_processing): Correct
2973 _bfd_error_handler argument order.
2974 (ppc_elf_merge_private_bfd_data): Don't cast flags.
2976 2017-07-03 Alan Modra <amodra@gmail.com>
2978 * configure.ac: Invoke AC_CHECK_TYPES for long long. Invoke
2979 AC_TYPE_LONG_DOUBLE.
2980 * configure: Regenerate.
2981 * config.in: Regenerate.
2983 2017-06-29 Andrew Waterman <andrew@sifive.com>
2985 * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Fix TLS copy
2988 2017-06-29 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
2990 * elfxx-sparc.c (allocate_dynrelocs): Don't make a symbol dynamic
2991 unless it is undefined weak.
2992 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Set the flag
2993 relative_reloc to direct non-dynamic symbols to R_SPARC_RELATIVE
2995 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): If symbol
2996 is not dynamic in PIC, abort.
2998 2017-06-29 Jiong Wang <jiong.wang@arm.com>
3001 * elfnn-aarch64.c (elfNN_aarch64_allocate_dynrelocs): Only make
3002 undefined weak symbols into dynamic.
3003 (elfNN_aarch64_final_link_relocate): Generate runtime RELATIVE
3004 relocation for non-dynamic symbols.
3005 (elfNN_aarch64_finish_dynamic_symbol): Add sanity check.
3007 2017-06-29 Jiong Wang <jiong.wang@arm.com>
3009 * elfnn-aarch64.c (aarch64_relocation_aginst_gp_p): New function.
3010 (elfNN_aarch64_final_link_relocate): Delete duplicated code for
3011 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15, BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
3012 BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
3013 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Optimize the
3016 2017-06-29 Andreas Arnez <arnez@linux.vnet.ibm.com>
3018 * elf-bfd.h (elfcore_write_s390_gs_cb): Add prototype.
3019 (elfcore_write_s390_gs_bc): Likewise.
3020 * elf.c (elfcore_grok_s390_gs_cb): New function.
3021 (elfcore_grok_s390_gs_bc): New function.
3022 (elfcore_grok_note): Call them.
3023 (elfcore_write_s390_gs_cb): New function.
3024 (elfcore_write_s390_gs_bc): New function.
3025 (elfcore_write_register_note): Call them.
3027 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
3029 * libbfd.c (_bfd_generic_get_section_contents): Don't call
3030 bfd_get_file_size. Check archive element size.
3031 (_bfd_generic_get_section_contents_in_window): Likewise.
3033 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
3035 * bfd-in2.h: Regenerated.
3036 * bfdio.c (bfd_get_size): Change return type to ufile_ptr.
3037 (bfd_get_file_size): Likewise.
3039 2017-06-28 Maciej W. Rozycki <macro@imgtec.com>
3040 Matthew Fortune <matthew.fortune@imgtec.com>
3042 * archures.c (bfd_mach_mips_interaptiv_mr2): New macro.
3043 * cpu-mips.c (I_interaptiv_mr2): New enum value.
3044 (arch_info_struct): Add "mips:interaptiv-mr2" entry.
3045 * elfxx-mips.c (_bfd_elf_mips_mach) <E_MIPS_MACH_IAMR2>: New
3047 (mips_set_isa_flags) <bfd_mach_mips_interaptiv_mr2>: Likewise.
3048 (bfd_mips_isa_ext) <bfd_mach_mips_interaptiv_mr2>: Likewise.
3049 (print_mips_isa_ext) <AFL_EXT_INTERAPTIV_MR2>: Likewise.
3050 (mips_mach_extensions): Add `bfd_mach_mipsisa32r3' and
3051 `bfd_mach_mips_interaptiv_mr2' entries.
3052 * bfd-in2.h: Regenerate.
3054 2017-06-27 Nick Clifton <nickc@redhat.com>
3056 * tekhex.c (pass_over): Revert accidental conversion of a local
3057 array to a static array.
3059 2017-06-27 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
3062 * elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Adjust
3063 reloc addend if necessary. Adjust diff only if
3064 shrinked_insn_address < end_address.
3066 2017-06-27 Alan Modra <amodra@gmail.com>
3069 * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
3070 (_bfd_generic_get_section_contents_in_window): Likewise.
3072 2017-06-26 Kuan-Lin Chen <rufus@andestech.com>
3074 * elfnn-riscv.c (perform_relocation): Support the new
3075 R_RISCV_32_PCREL relocation.
3076 (riscv_elf_relocate_section): Likewise.
3077 * elfxx-riscv.c (howto_table): Likewise.
3078 (riscv_reloc_map): Likewise.
3079 * bfd-in2.h (BFD_RELOC_RISCV_32_PCREL): New relocation.
3080 * libbfd.h: Regenerate.
3082 2017-06-27 Alan Modra <amodra@gmail.com>
3085 * libbfd.c (_bfd_generic_get_section_contents): Delete abort.
3086 Use unsigned file pointer type, and remove cast.
3087 * libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise.
3088 Add "count", not "sz".
3090 2017-06-26 Pedro Alves <palves@redhat.com>
3093 * libbfd.c (_bfd_generic_get_section_contents): Add "count", not
3096 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
3099 * libbfd.c (_bfd_generic_get_section_contents_in_window): Add
3102 2017-06-26 Maciej W. Rozycki <macro@imgtec.com>
3104 * cpu-mips.c (arch_info_struct): Mark the 4010 32-bit.
3105 * elfxx-mips.c (mips_set_isa_flags) <bfd_mach_mips4010>: Set
3106 E_MIPS_ARCH_2 rather than E_MIPS_ARCH_3 in `e_flags'.
3107 (mips_mach_extensions): Mark `bfd_mach_mips4010' as extending
3108 `bfd_mach_mips6000' rather than `bfd_mach_mips4000'.
3110 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
3113 * compress.c (bfd_get_full_section_contents): Don't check the
3115 * libbfd.c (_bfd_generic_get_section_contents): Check for and
3116 reject a section whose size + offset is greater than the size
3118 (_bfd_generic_get_section_contents_in_window): Likewise.
3120 2017-06-26 Nick Clifton <nickc@redhat.com>
3123 * tekhex.c (getvalue): Check for the source pointer exceeding the
3124 end pointer before the first byte is read.
3126 2017-06-26 Nick Clifton <nickc@redhat.com>
3129 * opncls.c (get_build_id): Check that the section is big enough
3130 to contain the whole note.
3131 * compress.c (bfd_get_full_section_contents): Check for and reject
3132 a section whose size is greater than the size of the entire file.
3133 * elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not
3134 contain a notes section.
3136 2017-06-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
3138 * elf64-s390.c (elf_s390_additional_program_headers): Add NULL
3140 (elf_s390_modify_segment_map): Likewise.
3141 (bfd_elf_s390_set_options): Lisewise.
3143 2017-06-26 Alan Modra <amodra@gmail.com>
3145 * elflink.c (_bfd_elf_link_create_dynstrtab): Don't make dynobj
3147 (_bfd_elf_size_group_sections): Skip --just-syms bfds.
3148 (bfd_elf_size_dynamic_sections): Ignore .note.GNU-stack and
3149 .preinit_array on --just-syms bfds.
3150 (_bfd_elf_gc_mark_extra_sections): Skip --just-syms bfds.
3151 (elf_gc_sweep, bfd_elf_parse_eh_frame_entries): Likewise.
3152 (bfd_elf_gc_sections, bfd_elf_discard_info): Likewise.
3154 2017-06-25 Sergei Trofimovich <slyfox@gentoo.org>
3156 * elf.c (find_link): Bounds check "hint".
3158 2017-06-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
3160 * elf32-arm.c (using_thumb_only): Update list of architectures in
3161 BFD_ASSERT for which the logic is valid.
3162 (using_thumb2_bl): Likewise.
3163 (using_thumb2): Likewise and return true for ARMv8-R.
3164 (arch_has_arm_nop): Likewise.
3165 (tag_cpu_arch_combine): New v8r table for ARMv8-R Tag_CPU_arch
3166 merging logic. Update commentis for value 15 of v8m_baseline,
3167 v8m_mainline and v4t_plus_v6_m arrays. Use v8r array to decide
3168 merging of value 15 of Tag_CPU_arch.
3170 2017-06-23 Jiong Wang <jiong.wang@arm.com>
3172 * reloc.c (BFD_RELOC_AARCH64_ADR_GOTPAGE): Rename to
3173 BFD_RELOC_AARCH64_ADR_GOT_PAGE
3174 * bfd-in2.h: Regenerate.
3176 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
3178 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Move
3179 the error_alignment label forward. Properly align program
3180 property note section.
3182 2017-06-22 Eric Christopher <echristo@gmail.com>
3184 * elf32-arm.c (elf32_arm_final_link_relocate): Use labs rather than
3185 abs to fix a truncation warning.
3187 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
3189 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Resolve
3190 local undefined weak symbol to 0.
3191 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Likewise.
3193 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
3195 * elf32-i386.c (elf_i386_merge_gnu_properties): If info->shstk
3196 is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
3197 (elf_i386_link_setup_gnu_properties): If info->shstk is set,
3198 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
3199 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): If
3200 info->shstk is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
3201 (elf_x86_64_link_setup_gnu_properties): If info->shstk is set,
3202 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
3204 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
3206 * elf32-i386.c (elf_i386_lazy_ibt_plt0_entry): New.
3207 (elf_i386_lazy_ibt_plt_entry): Likewise.
3208 (elf_i386_pic_lazy_ibt_plt0_entry): Likewise.
3209 (elf_i386_non_lazy_ibt_plt_entry): Likewise.
3210 (elf_i386_pic_non_lazy_ibt_plt_entry): Likewise.
3211 (elf_i386_eh_frame_lazy_ibt_plt): Likewise.
3212 (elf_i386_lazy_plt_layout): Likewise.
3213 (elf_i386_non_lazy_plt_layout): Likewise.
3214 (elf_i386_link_hash_entry): Add plt_second.
3215 (elf_i386_link_hash_table): Add plt_second and
3216 plt_second_eh_frame.
3217 (elf_i386_allocate_dynrelocs): Use the second PLT if needed.
3218 (elf_i386_size_dynamic_sections): Use .plt.got unwind info for
3219 the second PLT. Check the second PLT.
3220 (elf_i386_relocate_section): Use the second PLT to resolve
3221 PLT reference if needed.
3222 (elf_i386_finish_dynamic_symbol): Fill and use the second PLT if
3224 (elf_i386_finish_dynamic_sections): Set sh_entsize on the
3225 second PLT. Generate unwind info for the second PLT.
3226 (elf_i386_plt_type): Add plt_second.
3227 (elf_i386_get_synthetic_symtab): Support the second PLT.
3228 (elf_i386_parse_gnu_properties): Support
3229 GNU_PROPERTY_X86_FEATURE_1_AND.
3230 (elf_i386_merge_gnu_properties): Support
3231 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
3232 on GNU_PROPERTY_X86_FEATURE_1_IBT
3233 (elf_i386_link_setup_gnu_properties): If info->ibt is set,
3234 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
3235 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
3236 is set on all relocatable inputs.
3237 * elf64-x86-64.c (elf_x86_64_lazy_ibt_plt_entry): New.
3238 (elf_x32_lazy_ibt_plt_entry): Likewise.
3239 (elf_x86_64_non_lazy_ibt_plt_entry): Likewise.
3240 (elf_x32_non_lazy_ibt_plt_entry): Likewise.
3241 (elf_x86_64_eh_frame_lazy_ibt_plt): Likewise.
3242 (elf_x32_eh_frame_lazy_ibt_plt): Likewise.
3243 (elf_x86_64_lazy_ibt_plt): Likewise.
3244 (elf_x32_lazy_ibt_plt): Likewise.
3245 (elf_x86_64_non_lazy_ibt_plt): Likewise.
3246 (elf_x32_non_lazy_ibt_plt): Likewise.
3247 (elf_x86_64_get_synthetic_symtab): Support the second PLT.
3248 (elf_x86_64_parse_gnu_properties): Support
3249 GNU_PROPERTY_X86_FEATURE_1_AND.
3250 (elf_x86_64_merge_gnu_properties): Support
3251 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
3252 on GNU_PROPERTY_X86_FEATURE_1_IBT
3253 (elf_x86_64_link_setup_gnu_properties): If info->ibt is set,
3254 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
3255 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
3256 is set on all relocatable inputs.
3258 2017-06-22 Nick Clifton <nickc@redhat.com>
3261 * som.c (setup_sections): NUL terminate the space_strings buffer.
3262 Check that the space.name field does not index beyond the end of
3263 the space_strings buffer.
3265 2017-06-21 Nick Clifton <nickc@redhat.com>
3268 * coff-sh.c (sh_reloc): Check for an out of range reloc.
3270 2017-06-21 Nick Clifton <nickc@redhat.com>
3273 * vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as
3274 type of the size parameter.
3275 (_bfd_vms_save_counted_string): Add second parameter - the maximum
3276 length of the counted string.
3277 * vms.h (_bfd_vms_save_sized_string): Update prototype.
3278 (_bfd_vms_save_counted_string): Likewise.
3279 * vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to
3280 _bfd_vms_save_counted_string.
3281 (_bfd_vms_slurp_ehdr): Likewise.
3282 (_bfd_vms_slurp_egsd): Likewise.
3283 (Parse_module): Likewise.
3285 2017-06-21 Alan Modra <amodra@gmail.com>
3287 * elf64-ppc.c (ppc64_elf_size_stubs): Test for localentry:0 plt
3288 calls before tocsave calls.
3289 (ppc64_elf_relocate_section): Allow localentry:0 plt calls without
3292 2017-06-21 Nick Clifton <nickc@redhat.com>
3295 * reloc.c (bfd_generic_get_relocated_section_contents): Fail if
3296 bfd_get_full_section_contents returns no contents.
3298 2017-06-21 Nick Clifton <nickc@redhat.com>
3301 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized
3304 2017-06-21 Nick Clifton <nickc@redhat.com>
3307 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section
3309 (image_set_ptr): Likewise.
3310 (alpha_vms_fix_sec_rel): Likewise.
3311 (alpha_vms_slurp_relocs): Likewise.
3313 2017-06-21 Nick Clifton <nickc@redhat.com>
3316 * ieee.c (ieee_slurp_sections): Check for a NULL return from
3318 (ieee_archive_p): Likewise.
3319 (ieee_object_p): Likewise.
3321 2017-06-21 Nick Clifton <nickc@redhat.com>
3324 * elf.c (setup_group): Zero the group section pointer list after
3325 allocation so that loops can be caught. Check for NULL pointers
3326 when processing a group list.
3328 2017-06-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
3330 * elf-s390.h: New file.
3331 * elf64-s390.c (struct elf_s390_link_hash_table): Add params
3333 (elf_s390_additional_program_headers): New function.
3334 (elf_s390_modify_segment_map): New function.
3335 (bfd_elf_s390_set_options): New function.
3336 (elf_backend_additional_program_headers)
3337 (elf_backend_modify_segment_map): Add macro definitions.
3339 2017-06-19 H.J. Lu <hongjiu.lu@intel.com>
3342 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
3343 the DYNAMIC bit instead of bfd_count_sections.
3345 2017-06-19 Nick Clifton <nickc@redhat.com>
3348 * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record
3350 (evax_bfd_print_eeom): Likewise.
3351 (evax_bfd_print_egsd): Check for an overlarge record length.
3352 (evax_bfd_print_etir): Likewise.
3354 2017-06-19 Nick Clifton <nickc@redhat.com>
3357 * libieee.h (struct common_header_type): Add end_p field.
3358 * ieee.c (this_byte_and_next): Do not advance input_p beyond
3360 (read_id): Check for a length that exceeds the remaining bytes in
3362 (ieee_seek): Initialise end_p.
3363 (ieee_archive_p): Likewise.
3364 (ieee_object_p): Likewise.
3366 2017-06-19 Nick Clifton <nickc@redhat.com>
3369 * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset
3370 before reading the EIHS structure entries.
3372 2017-06-19 Nick Clifton <nickc@redhat.com>
3375 * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for
3376 gsd_size. Check that there are enough bytes remaining to read the
3377 type and size of the next egsd. Check that the size of the egsd
3378 does not exceed the size of the record.
3380 2017-06-19 Alan Modra <amodra@gmail.com>
3382 * config.bfd: Correct targ_underscore for cris.
3384 2017-06-18 Alan Modra <amodra@gmail.com>
3386 * config.bfd: Correct targ_underscore for epiphany, ip2k,
3387 m32c, mn10200, pru, rl78, rx, crisv32 and v850.
3389 2017-06-16 Nick Clifton <nickc@redhat.com>
3391 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
3392 bucketlist is empty because there are no symbols to add to the
3395 2017-06-16 Alan Modra <amodra@gmail.com>
3401 * targets.c (struct bfd_target): Add _bfd_define_start_stop.
3402 (BFD_JUMP_TABLE_LINK): Likewise.
3403 * elf-bfd.h (bfd_elf_define_start_stop): Declare.
3404 * elflink.c (_bfd_elf_gc_mark_rsec): Update comment.
3405 (bfd_elf_define_start_stop): New function.
3406 * linker.c (bfd_generic_define_start_stop): New function.
3407 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init
3409 * aout-adobe.c (aout_32_bfd_define_start_stop): Define.
3410 * aout-target.h (MY_bfd_define_start_stop): Define.
3411 * aout-tic30.c (MY_bfd_define_start_stop): Define.
3412 * binary.c (binary_bfd_define_start_stop): Define.
3413 * bout.c (b_out_bfd_define_start_stop): Define.
3414 * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define.
3415 * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define.
3416 * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define.
3417 * coffcode.h (coff_bfd_define_start_stop): Define.
3418 * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define.
3419 * i386msdos.c (msdos_bfd_define_start_stop): Define.
3420 * i386os9k.c (os9k_bfd_define_start_stop): Define.
3421 * ieee.c (ieee_bfd_define_start_stop): Define.
3422 * ihex.c (ihex_bfd_define_start_stop): Define.
3423 * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define.
3424 * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define.
3425 * mmo.c (mmo_bfd_define_start_stop): Define.
3426 * nlm-target.h (nlm_bfd_define_start_stop): Define.
3427 * oasys.c (oasys_bfd_define_start_stop): Define.
3428 * pef.c (bfd_pef_bfd_define_start_stop): Define.
3429 * plugin.c (bfd_plugin_bfd_define_start_stop): Define.
3430 * ppcboot.c (ppcboot_bfd_define_start_stop): Define.
3431 * som.c (som_bfd_define_start_stop): Define.
3432 * srec.c (srec_bfd_define_start_stop): Define.
3433 * tekhex.c (tekhex_bfd_define_start_stop): Define.
3434 * versados.c (versados_bfd_define_start_stop): Define.
3435 * vms-alpha.c (vms_bfd_define_start_stop): Define.
3436 (alpha_vms_bfd_define_start_stop): Define.
3437 * xsym.c (bfd_sym_bfd_define_start_stop): Define.
3438 * bfd-in2.h: Regenerate.
3439 * libbfd.h: Regenerate.
3441 2017-06-16 Jiong Wang <jiong.wang@arm.com>
3443 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
3444 SYMBOL_REFERENCES_LOCAL.
3446 2017-06-15 Jiong Wang <jiong.wang@arm.com>
3449 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
3450 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
3451 runtime for if there needs copy relocation elimination.
3452 (need_copy_relocation_p): New function. Return true for symbol with
3453 pc-relative references and if it's against read-only sections.
3454 (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
3455 (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
3456 that are related with accessing external objects.
3457 (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change
3458 in elfNN_aarch64_check_relocs.
3460 2017-06-15 Nick Clifton <nickc@redhat.com>
3463 * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
3466 (ieee_archive_p): Likewise.
3468 2017-06-15 Nick Clifton <nickc@redhat.com>
3471 * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
3473 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
3475 * elf32-xtensa.c (elf_xtensa_be_plt_entry,
3476 elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays,
3477 keep both windowed and call0 ABI PLT definitions.
3478 (elf_xtensa_create_plt_entry): Use selected ABI to choose upper
3479 elf_xtensa_*_plt_entry endex.
3480 (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size.
3482 2017-06-14 Nick Clifton <nickc@redhat.com>
3485 * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
3488 2017-06-14 Nick Clifton <nickc@redhat.com>
3491 * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
3492 maximum value for the ascic pointer. Check that name processing
3493 does not read beyond this value.
3494 (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
3497 2017-06-14 Nick Clifton <nickc@redhat.com>
3500 * versados.c (versados_mkobject): Zero the allocated tdata structure.
3501 (process_otr): Check for an invalid offset in the otr structure.
3503 2017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
3505 * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
3507 2017-06-13 H.J. Lu <hongjiu.lu@intel.com>
3513 * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
3514 vtable field to a union.
3515 (_bfd_elf_is_start_stop): Removed.
3516 * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
3517 __start_SECNAME and __stop_SECNAME symbols.
3518 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
3519 * elflink.c (_bfd_elf_is_start_stop): Removed.
3520 (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
3521 _bfd_elf_is_start_stop.
3522 (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
3523 __stop_SECNAME symbols. Updated.
3524 (elf_gc_smash_unused_vtentry_relocs): Likewise.
3525 (bfd_elf_gc_record_vtinherit): Likewise.
3526 (bfd_elf_gc_record_vtentry): Likewise.
3528 2017-06-13 Nick Clifton <nickc@redhat.com>
3531 * elflink.c (elf_link_adjust_relocs): Generate an error when
3532 encountering a reloc against a symbol removed by garbage
3535 2017-06-12 H.J. Lu <hongjiu.lu@intel.com>
3537 * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
3538 to merge_gnu_properties.
3539 * elf-properties.c (elf_merge_gnu_properties): Add struct
3540 bfd_link_info * and pass it to merge_gnu_properties.
3541 (elf_merge_gnu_property_list): Add struct bfd_link_info *
3542 and pass it to elf_merge_gnu_properties.
3543 (_bfd_elf_link_setup_gnu_properties): Pass info to
3544 elf_merge_gnu_property_list.
3545 * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
3547 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
3549 2017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
3552 * binary.c (binary_set_section_contents): Scale lma by octets
3553 per byte to set filepos.
3555 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3557 * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
3560 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3562 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
3565 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3567 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
3568 patched section contents for TLS IE reloc.
3569 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
3571 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3573 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
3574 RELOC_FOR_GLOBAL_SYMBOL macro.
3576 2018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3578 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
3581 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3583 * config/tc-arc.c (md_undefined_symbol): Changed.
3584 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
3586 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3588 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
3591 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3593 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
3594 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
3596 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3598 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
3601 2017-06-08 Richard Earnshaw <rearnsha@arm.com>
3603 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
3604 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
3605 is non-zero. Add clarifying comments.
3607 2017-06-08 H.J. Lu <hongjiu.lu@intel.com>
3609 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
3610 name. Use local IFUNC symbol name string to report unsupported
3611 non-PIC call to IFUNC function.
3612 (elf_i386_relocate_section): Dump local IFUNC name with minfo
3613 when generating R_386_IRELATIVE relocation.
3614 (elf_i386_finish_dynamic_symbol): Likewise.
3615 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
3617 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
3618 when generating R_X86_64_IRELATIVE relocation.
3619 (elf_x86_64_finish_dynamic_symbol): Likewise.
3621 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
3623 * elf.c (setup_group): Make sure BFD sections are created for all
3624 group sections in the input file when processing SHF_GROUP
3626 (bfd_section_from_shdr): Avoid duplicating logic already
3627 implemented in `setup_group'.
3629 2017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
3632 * peXXigen.c (pe_print_idata): Use the address of the first thunk
3633 if the hint address is zero.
3635 2017-06-06 James Clarke <jrtc27@jrtc27.com>
3638 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
3639 ELF_COMMON_DEF_P for common symbols.
3641 2017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
3643 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
3644 SEC_GROUP sections as SEC_EXCLUDE.
3645 (bfd_elf_set_group_contents): Replace use of abort with an assert.
3646 (assign_section_numbers): Use resolve_section_groups flag instead
3647 of relocatable link type.
3648 (_bfd_elf_init_private_section_data): Use resolve_section_groups
3649 flag instead of checking the final_link flag for part of the
3650 checks in here. Fix white space as a result.
3651 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
3652 instead of relocatable link type.
3653 (bfd_elf_final_link): Likewise.
3655 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
3657 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
3659 * elf32-score.c (score_elf_final_link_relocate): Likewise.
3660 (s3_bfd_score_elf_check_relocs): Likewise.
3661 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
3662 (score_elf_final_link_relocate): Likewise.
3663 (s7_bfd_score_elf_check_relocs): Likewise.
3665 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
3667 * elflink.c (init_reloc_cookie_rels): Remove unused variable
3670 2017-06-06 Maciej W. Rozycki <macro@imgtec.com>
3672 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
3673 from `reloc_count' rather than decrementing it.
3674 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
3675 `reloc_count' by `int_rels_per_ext_rel'.
3676 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
3677 `reloc_count' by `int_rels_per_ext_rel' for last relocation
3678 entry determination.
3679 (s3_bfd_score_elf_check_relocs): Likewise.
3680 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
3681 (s7_bfd_score_elf_relocate_section): Likewise.
3682 (s7_bfd_score_elf_check_relocs): Likewise.
3683 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
3684 prototype and function.
3685 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
3686 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
3687 triple rather than once the sum of REL and RELA relocation entry
3689 (bfd_elf64_get_reloc_upper_bound): Remove macro.
3690 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
3691 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
3692 storage allocation size determination.
3693 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
3694 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
3695 by `int_rels_per_ext_rel' for last relocation entry
3697 (bfd_elf_final_link): Do not multiply `reloc_count' by
3698 `int_rels_per_ext_rel' for internal relocation storage
3699 allocation size determination.
3700 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
3701 `int_rels_per_ext_rel' for last relocation entry determination.
3702 (elf_gc_smash_unused_vtentry_relocs): Likewise.
3703 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
3704 (_bfd_mips_elf_relocate_section): Likewise.
3706 2017-06-05 Alan Modra <amodra@gmail.com>
3709 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
3711 2017-06-01 John Baldwin <jhb@FreeBSD.org>
3713 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
3714 determine structure sizes.
3715 (elfcore_grok_freebsd_prstatus): Likewise.
3717 2017-06-01 Alan Modra <amodra@gmail.com>
3719 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
3720 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
3722 (is_elfv2_localentry0): New function.
3723 (ppc64_elf_tls_setup): Default params->plt_localentry0.
3724 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
3725 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
3726 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
3727 optimized localentry:0 stubs.
3728 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
3729 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
3731 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
3733 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
3735 2017-05-30 Casey Smith <clegg89@gmail.com>
3738 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
3739 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
3741 2017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
3743 * cpu-arc.c (arc_compatible): New function.
3745 2017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
3747 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
3749 2017-05-30 H.J. Lu <hongjiu.lu@intel.com>
3752 * bfdio.c (bfd_get_file_size): New function.
3753 * bfd-in2.h: Regenerated.
3755 2017-05-23 Dilian Palauzov <git-dpa@aegee.org>
3757 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
3760 2017-05-22 H.J. Lu <hongjiu.lu@intel.com>
3762 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
3763 dynobj instead of htab->elf.dynobj.
3765 2017-05-19 Maciej W. Rozycki <macro@imgtec.com>
3767 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
3769 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
3770 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
3771 actual number of internal relocations retrieved. Adjust
3772 function description.
3773 (bfd_elf64_canonicalize_reloc): Remove macro.
3774 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
3776 2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
3778 * archures.c (bfd_mach_sparc_v9m8): Define.
3779 (bfd_mach_sparc_v8plusm8): Likewise.
3780 (bfd_mach_sparc_v9_p): Adjust to M8.
3781 (bfd_mach_sparc_64bit_p): Likewise.
3782 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
3783 bfd_mach_sparc_v8plusm8.
3784 * bfd-in2.h: Regenerated.
3785 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
3787 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
3788 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
3789 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
3791 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
3792 bfd_mach_sparc_v8plusm8.
3794 2017-05-19 Alan Modra <amodra@gmail.com>
3796 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
3797 debug and special sections when no non-note alloc sections in an
3800 2017-05-18 Alan Modra <amodra@gmail.com>
3802 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
3803 * elf-m10300.c: Likewise.
3805 * elf32-arc.c: Likewise.
3806 * elf32-bfin.c: Likewise.
3807 * elf32-m68k.c: Likewise.
3808 * elf32-nds32.c: Likewise.
3809 * elf32-tilepro.c: Likewise.
3810 * elflink.c: Likewise.
3811 * elfnn-aarch64.c: Likewise.
3812 * elfnn-riscv.c: Likewise.
3813 * elfxx-tilegx.c: Likewise.
3814 * mach-o.c: Likewise.
3815 * peXXigen.c: Likewise.
3816 * vms-alpha.c: Likewise.
3817 * vms-lib.c: Likewise.
3819 2017-05-17 H.J. Lu <hongjiu.lu@intel.com>
3822 * elflink.c (elf_gc_mark_debug_section): New function.
3823 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
3824 referenced by kept debug sections.
3826 2017-05-16 Alan Modra <amodra@gmail.com>
3828 * elf-m10300.c: Rename occurrences of non_ir_ref.
3829 * elf32-arm.c: Likewise.
3830 * elf32-bfin.c: Likewise.
3831 * elf32-cr16.c: Likewise.
3832 * elf32-cris.c: Likewise.
3833 * elf32-d10v.c: Likewise.
3834 * elf32-dlx.c: Likewise.
3835 * elf32-fr30.c: Likewise.
3836 * elf32-frv.c: Likewise.
3837 * elf32-hppa.c: Likewise.
3838 * elf32-i370.c: Likewise.
3839 * elf32-i386.c: Likewise.
3840 * elf32-iq2000.c: Likewise.
3841 * elf32-lm32.c: Likewise.
3842 * elf32-m32c.c: Likewise.
3843 * elf32-m32r.c: Likewise.
3844 * elf32-m68hc1x.c: Likewise.
3845 * elf32-m68k.c: Likewise.
3846 * elf32-mcore.c: Likewise.
3847 * elf32-metag.c: Likewise.
3848 * elf32-microblaze.c: Likewise.
3849 * elf32-moxie.c: Likewise.
3850 * elf32-msp430.c: Likewise.
3851 * elf32-mt.c: Likewise.
3852 * elf32-nios2.c: Likewise.
3853 * elf32-or1k.c: Likewise.
3854 * elf32-ppc.c: Likewise.
3855 * elf32-rl78.c: Likewise.
3856 * elf32-s390.c: Likewise.
3857 * elf32-score.c: Likewise.
3858 * elf32-score7.c: Likewise.
3859 * elf32-sh.c: Likewise.
3860 * elf32-tic6x.c: Likewise.
3861 * elf32-tilepro.c: Likewise.
3862 * elf32-v850.c: Likewise.
3863 * elf32-vax.c: Likewise.
3864 * elf32-xstormy16.c: Likewise.
3865 * elf32-xtensa.c: Likewise.
3866 * elf64-alpha.c: Likewise.
3867 * elf64-hppa.c: Likewise.
3868 * elf64-ia64-vms.c: Likewise.
3869 * elf64-mmix.c: Likewise.
3870 * elf64-ppc.c: Likewise.
3871 * elf64-s390.c: Likewise.
3872 * elf64-sh64.c: Likewise.
3873 * elf64-x86-64.c: Likewise.
3874 * elflink.c: Likewise.
3875 * elfnn-aarch64.c: Likewise.
3876 * elfnn-ia64.c: Likewise.
3877 * elfnn-riscv.c: Likewise.
3878 * elfxx-mips.c: Likewise.
3879 * elfxx-sparc.c: Likewise.
3880 * elfxx-tilegx.c: Likewise.
3881 * linker.c: Likewise.
3883 2017-05-16 Alan Modra <amodra@gmail.com>
3885 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
3886 * elflink.c (elf_link_add_object_symbols): Update to use
3888 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
3890 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
3892 2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
3894 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
3896 2017-05-12 H.J. Lu <hongjiu.lu@intel.com>
3898 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
3899 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
3901 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3903 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
3905 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
3907 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
3908 to plt_second/plt_second_eh_frame.
3909 (elf_x86_64_link_hash_newfunc): Updated.
3910 (elf_x86_64_allocate_dynrelocs): Likewise.
3911 (elf_x86_64_size_dynamic_sections): Likewise.
3912 (elf_x86_64_relocate_section): Likewise.
3913 (elf_x86_64_finish_dynamic_symbol): Likewise.
3914 (elf_x86_64_finish_dynamic_sections): Likewise.
3915 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
3916 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
3918 (elf_backend_setup_gnu_properties): Updated. Create the
3919 .plt.sec section instead of the .plt.sec section.
3921 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
3923 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
3924 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
3925 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
3927 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
3929 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
3930 (bfd_elf64_set_reloc): Define.
3931 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
3933 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
3935 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
3936 (struct bfd_target): New field _bfd_set_reloc.
3937 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
3938 * reloc.c (_bfd_generic_set_reloc): New function.
3939 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
3940 * nlm-target.h (nlm_set_reloc): Likewise.
3941 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
3942 * aout-tic30.c (MY_set_reloc): Likewise.
3943 * aout-target.h (MY_set_reloc): Likewise.
3944 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
3945 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
3946 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
3947 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
3948 * aout-adobe.c (aout_32_set_reloc): Likewise.
3949 * bout.c (b_out_set_reloc): Likewise.
3950 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
3951 * i386os9k.c (aout_32_set_reloc): Likewise.
3952 * ieee.c (ieee_set_reloc): Likewise.
3953 * oasys.c (oasys_set_reloc): Likewise.
3954 * som.c (som_set_reloc): Likewise.
3955 * versados.c (versados_set_reloc): Likewise.
3956 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
3957 _bfd_generic_set_reloc.
3958 (rs6000_xcoff64_aix_vec): LIkewise.
3959 * libbfd.c (_bfd_norelocs_set_reloc): New function.
3960 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
3961 * i386msdos.c (msdos_set_reloc): Define to
3962 _bfd_norelocs_set_reloc.
3963 * elfcode.h (elf_set_reloc): Define.
3964 * bfd-in2.h: Regenerated.
3966 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
3969 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
3970 for IFUNC function address.
3972 2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
3974 * elf32-arc.c (FEATURE_LIST_NAME): Define.
3975 (CONFLICT_LIST): Likewise.
3976 (opcode/arc-attrs.h): Include.
3977 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
3978 (arc_extract_features): New file.
3979 (arc_stralloc): Likewise.
3980 (arc_elf_merge_attributes): Likewise.
3981 (arc_elf_merge_private_bfd_data): Use object attributes.
3982 (bfd_arc_get_mach_from_attributes): New function.
3983 (arc_elf_object_p): Use object attributes.
3984 (arc_elf_final_write_processing): Likewise.
3985 (elf32_arc_obj_attrs_arg_type): New function.
3986 (elf32_arc_obj_attrs_handle_unknown): Likewise.
3987 (elf32_arc_section_from_shdr): Likewise.
3988 (elf_backend_obj_attrs_vendor): Define.
3989 (elf_backend_obj_attrs_section): Likewise.
3990 (elf_backend_obj_attrs_arg_type): Likewise.
3991 (elf_backend_obj_attrs_section_type): Likewise.
3992 (elf_backend_obj_attrs_handle_unknown): Likewise.
3993 (elf_backend_section_from_shdr): Likewise.
3995 2017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
3998 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
3999 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
4000 and the destination is a Thumb symbol.
4002 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
4004 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
4005 initializer to silence GCC 4.2.
4006 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
4008 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
4010 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
4011 (LAZY_PLT_ENTRY_SIZE): This.
4012 (NON_LAZY_PLT_ENTRY_SIZE): New.
4013 (elf_x86_64_plt0_entry): Renamed to ...
4014 (elf_x86_64_lazy_plt0_entry): This.
4015 (elf_x86_64_plt_entry): Renamed to ...
4016 (elf_x86_64_lazy_plt_entry): This.
4017 (elf_x86_64_bnd_plt0_entry): Renamed to ...
4018 (elf_x86_64_lazy_bnd_plt0_entry): This.
4019 (elf_x86_64_legacy_plt_entry): Removed.
4020 (elf_x86_64_bnd_plt_entry): Renamed to ...
4021 (elf_x86_64_lazy_bnd_plt_entry): This.
4022 (elf_x86_64_legacy_plt2_entry): Renamed to ...
4023 (elf_x86_64_non_lazy_plt_entry): This.
4024 (elf_x86_64_bnd_plt2_entry): Renamed to ...
4025 (elf_x86_64_non_lazy_bnd_plt_entry): This.
4026 (elf_x86_64_eh_frame_plt): Renamed to ...
4027 (elf_x86_64_eh_frame_lazy_plt): This.
4028 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
4029 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
4030 (elf_x86_64_eh_frame_plt_got): Renamed to ...
4031 (elf_x86_64_eh_frame_non_lazy_plt): This.
4032 (elf_x86_64_lazy_plt_layout): New.
4033 (elf_x86_64_non_lazy_plt_layout): Likewise.
4034 (elf_x86_64_plt_layout): Likewise.
4035 (elf_x86_64_backend_data): Remove PLT layout information. Add
4036 os for target system.
4037 (GET_PLT_ENTRY_SIZE): Removed.
4038 (elf_x86_64_lazy_plt): New.
4039 (elf_x86_64_non_lazy_plt): Likewise.
4040 (elf_x86_64_lazy_bnd_plt): Likewise.
4041 (elf_x86_64_non_lazy_bnd_plt): Likewise.
4042 (elf_x86-64_arch_bed): Updated.
4043 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
4044 (elf_x86_64_create_dynamic_sections): Removed.
4045 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
4046 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
4047 (elf_x86-64_adjust_dynamic_symbol): Updated.
4048 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
4049 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
4050 size for PLT0 if there is no PLT0. Get plt_entry_size from
4051 non_lazy_plt for non-lazy PLT entries.
4052 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
4053 from non_lazy_plt for non-lazy PLT entries.
4054 (elf_x86-64_relocate_section): Updated. Properly get PLT index
4055 if there is no PLT0.
4056 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
4057 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
4058 entries with non-lazy PLT layout. Don't fill the second and third
4059 slots in the PLT entry if there is no PLT0.
4060 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
4061 if there is no PLT0. Set sh_entsize on the .plt.got section.
4062 (compare_relocs): New.
4063 (elf_x86_64_plt_type): Likewise.
4064 (elf_x86_64_plt): Likewise.
4065 (elf_x86_64_nacl_plt): New. Forward declaration.
4066 (elf_x86_64_get_plt_sym_val): Removed.
4067 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
4068 against all dynamic relocations.
4069 (elf_x86_64_link_setup_gnu_properties): New function.
4070 (elf_backend_create_dynamic_sections): Updated.
4071 (elf_backend_setup_gnu_properties): New.
4072 (elf_x86_64_nacl_plt): New.
4073 (elf_x86_64_nacl_arch_bed): Updated.
4075 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
4077 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
4078 (LAZY_PLT_ENTRY_SIZE): This.
4079 (NON_LAZY_PLT_ENTRY_SIZE): New.
4080 (elf_i386_plt0_entry): Renamed to ...
4081 (elf_i386_lazy_plt0_entry): This.
4082 (elf_i386_plt_entry): Renamed to ...
4083 (elf_i386_lazy_plt_entry): This.
4084 (elf_i386_pic_plt0_entry): Renamed to ...
4085 (elf_i386_pic_lazy_plt0_entry): This.
4086 (elf_i386_pic_plt_entry): Renamed to ...
4087 (elf_i386_pic_lazy_plt_entry): This.
4088 (elf_i386_got_plt_entry): Renamed to ...
4089 (elf_i386_non_lazy_plt_entry): This.
4090 (elf_i386_pic_got_plt_entry): Renamed to ...
4091 (elf_i386_pic_non_lazy_plt_entry): This.
4092 (elf_i386_eh_frame_plt): Renamed to ...
4093 (elf_i386_eh_frame_lazy_plt): This.
4094 (elf_i386_eh_frame_plt_got): Renamed to ...
4095 (elf_i386_eh_frame_non_lazy_plt): This.
4096 (elf_i386_plt_layout): Renamed to ...
4097 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
4098 eh_frame_plt_got_size.
4099 (elf_i386_non_lazy_plt_layout): New.
4100 (elf_i386_plt_layout): Likewise.
4101 (elf_i386_non_lazy_plt): Likewise.
4102 (GET_PLT_ENTRY_SIZE): Removed.
4103 (elf_i386_plt): Renamed to ...
4104 (elf_i386_lazy_plt): This.
4105 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
4106 (elf_i386_arch_bed): Updated.
4107 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
4108 (elf_i386_create_dynamic_sections): Removed.
4109 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
4110 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
4111 (elf_i386_adjust_dynamic_symbol): Updated.
4112 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
4113 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
4114 size for PLT0 if there is no PLT0.
4115 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
4116 output section is discarded only if GOT isn't empty.
4117 (elf_i386_relocate_section): Updated. Properly get PLT index
4118 if there is no PLT0.
4119 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
4120 second and third slots in the PLT entry if there is no PLT0.
4121 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
4122 if there is no PLT0. Set sh_entsize on the .plt.got section.
4123 (elf_i386_nacl_plt): Forward declaration.
4124 (elf_i386_get_plt_sym_val): Removed.
4125 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
4126 against all dynamic relocations.
4127 (elf_i386_link_setup_gnu_properties): New function.
4128 (elf_backend_create_dynamic_sections): Updated.
4129 (elf_backend_setup_gnu_properties): New.
4130 (elf_i386_nacl_plt): Updated.
4131 (elf_i386_nacl_arch_bed): Likewise.
4132 (elf_i386_vxworks_arch_bed): Likewise.
4134 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
4136 * elflink.c (elf_output_implib): Remove executable flag from import
4138 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
4139 library is a relocatable object file.
4141 2017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
4144 * elf32-avr.c (avr_should_move_sym): New function.
4145 (avr_should_reduce_sym_size): Likewise.
4146 (avr_should_increase_sym_size): Likewise.
4147 (elf32_avr_relax_delete_bytes): Adjust symbol values
4148 and sizes by calling new functions.
4150 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
4152 * config.bfd (riscv32-*): Enable rv64.
4154 2017-05-02 Alan Modra <amodra@gmail.com>
4157 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
4158 rather than h->root.type == bfd_link_hash_new.
4159 (bfd_elf_record_link_assignment): Similarly, call
4160 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
4162 2017-04-29 Alan Modra <amodra@gmail.com>
4165 * reloc.c (reloc_offset_in_range): New function.
4166 (bfd_perform_relocation, bfd_install_relocation): Use it.
4167 (_bfd_final_link_relocate): Likewise.
4169 2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
4171 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
4172 before using .plt.got.
4173 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
4175 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
4177 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
4178 instead of "+=" to update 0.
4180 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
4182 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
4183 .plt.got section here.
4184 (elf_i386_check_relocs): Don't create the .plt.got section.
4185 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
4186 the .plt.got and .plt.bnd sections here.
4187 (elf_x86_64_check_relocs): Don't create the .plt.got nor
4190 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
4192 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
4194 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
4195 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
4196 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
4197 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
4200 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
4202 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
4204 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
4205 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
4206 the first relocatable ELF input with GNU properties.
4208 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
4210 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
4211 VxWorks for non-PIC.
4213 2017-04-27 Alan Modra <amodra@gmail.com>
4215 * elf-bfd.h (struct elf_backend_data): Make asection param of
4216 elf_backend_eh_frame_address_size const.
4217 (_bfd_elf_eh_frame_address_size): Likewise.
4218 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
4219 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
4220 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
4221 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
4222 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
4223 (next_cie_fde_offset): Constify params.
4224 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
4226 2017-04-27 Alan Modra <amodra@gmail.com>
4228 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
4229 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
4230 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
4232 (offset_adjust): New function.
4233 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
4234 (adjust_eh_frame_local_symbols): Likewise.
4235 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
4236 after changing anything. Return true if anything changed.
4237 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
4238 _bfd_elf_adjust_eh_frame_global_symbol for globals.
4240 2017-04-27 Alan Modra <amodra@gmail.com>
4242 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
4245 2017-04-27 Alan Modra <amodra@gmail.com>
4247 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
4248 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
4249 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
4250 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
4251 for undef and undefweak dyn_relocs.
4252 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
4253 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
4254 (allocate_got, allocate_dynrelocs): Likewise.
4255 (ppc64_elf_relocate_section): Likewise.
4257 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
4259 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
4260 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
4261 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
4262 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
4264 2017-04-26 Nick Clifton <nickc@redhat.com>
4267 * reloc.c (bfd_perform_relocation): Check for a negative address
4270 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
4273 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
4275 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
4276 (elf_backend_always_renumber_dynsyms): Define.
4277 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
4278 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
4279 * elflink.c (bfd_elf_size_dynamic_sections): Also call
4280 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
4282 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
4284 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
4286 * elflink.c (bfd_elf_size_dynamic_sections): Only call
4287 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
4288 sections have been created.
4290 2017-04-26 Nick Clifton <nickc@redhat.com>
4293 * compress.c (bfd_init_section_compress_status): Check the return
4294 value from bfd_malloc.
4296 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
4298 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
4299 no_finish_dynamic_symbol.
4300 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
4302 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
4303 weak symbol, don't make it dynamic.
4304 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
4305 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
4306 relocation for GOT reference.
4307 (elf_x86_64_finish_dynamic_symbol): Abort if
4308 no_finish_dynamic_symbol isn't 0.
4310 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
4313 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
4314 undefined weak symbol, don't make it dynamic.
4315 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
4316 set no_finish_dynamic_symbol and generate R_386_RELATIVE
4317 relocation for R_386_GOT32.
4319 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
4322 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
4324 2017-04-23 Alan Modra <amodra@gmail.com>
4327 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
4328 * elf.c (lcomm_sym): New.
4329 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
4330 * bfd-in2.h: Regenerate.
4332 2017-04-23 Alan Modra <amodra@gmail.com>
4335 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
4336 parameters and comment.
4337 (_bfd_elf_get_reloc_section): Delete.
4338 (_bfd_elf_plt_get_reloc_section): Declare.
4339 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
4340 New functions. Don't blindly skip over assumed .rel/.rela prefix.
4342 (_bfd_elf_get_reloc_section): ..here. Delete.
4343 (assign_section_numbers): Call elf_get_reloc_section.
4344 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
4345 * elfxx-target.h (elf_backend_get_reloc_section): Update.
4347 2017-04-23 Alan Modra <amodra@gmail.com>
4350 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
4353 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
4356 * elf32-i386.c (elf_i386_link_hash_entry): Add
4357 no_finish_dynamic_symbol.
4358 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
4359 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
4360 symbol, don't make it dynamic in PIE.
4361 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
4362 set no_finish_dynamic_symbol and generate R_386_RELATIVE
4363 relocation for R_386_GOT32
4364 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
4367 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
4371 * elflink.c (elf_link_add_object_symbols): Require
4372 --no-dynamic-linker with -E/--dynamic-list when creating
4375 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
4377 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
4380 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
4382 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
4383 dynamic symbol sorting.
4385 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
4388 * elflink.c (elf_link_add_object_symbols): Preserve
4389 dynamic_ref_after_ir_def when restoring the symbol table for
4390 unneeded dynamic object.
4392 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
4395 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
4396 on on undefined IFUNC symbol in the second PLT.
4398 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
4400 * peXXigen.c (pe_print_reloc): Correct chunk_end.
4402 2017-04-19 Alan Modra <amodra@gmail.com>
4404 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
4405 or make dynamic for info->dynamic_undefined_weak 0 and 1.
4406 * elf32-ppc.c:Formatting.
4407 (ensure_undefweak_dynamic): Don't make dynamic when
4408 info->dynamic_undefined_weak is zero.
4409 (allocate_dynrelocs): Discard undefweak dyn_relocs for
4410 info->dynamic_undefined_weak. Discard undef dyn_relocs when
4411 not default visibility. Discard undef and undefweak
4413 (ppc_elf_relocate_section): Adjust to suit.
4414 * elf64-ppc.c: Formatting.
4415 (ensure_undefweak_dynamic): Don't make dynamic when
4416 info->dynamic_undefined_weak is zero.
4417 (allocate_dynrelocs): Discard undefweak dyn_relocs for
4418 info->dynamic_undefined_weak. Discard them earlier.
4420 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
4423 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
4424 before generating the version definition section.
4426 2017-04-17 Alan Modra <amodra@gmail.com>
4428 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
4429 state when a regular object file defines a symbol with
4430 incompatible type to that defined by an earlier shared lib.
4432 2017-04-13 Alan Modra <amodra@gmail.com>
4434 * coffcode.h: Wrap some overly long _bfd_error_handler args.
4436 * elf32-arm.c: Likewise.
4437 * elf32-i386.c: Likewise.
4438 * elf32-mep.c: Likewise.
4439 * elf64-ia64-vms.c: Likewise.
4440 * elf64-x86-64.c: Likewise.
4441 * elflink.c: Likewise.
4442 * elfnn-ia64.c: Likewise.
4443 * elfxx-mips.c: Likewise.
4445 2017-04-13 Alan Modra <amodra@gmail.com>
4447 * aoutx.h: Use %B and %A in error messages throughout file.
4448 * aout-cris.c: Likewise.
4449 * archive.c: Likewise.
4450 * binary.c: Likewise.
4451 * coff-rs6000.c: Likewise.
4452 * coff-tic4x.c: Likewise.
4453 * coffcode.h: Likewise.
4454 * coffgen.c: Likewise.
4455 * cofflink.c: Likewise.
4456 * coffswap.h: Likewise.
4457 * cpu-arm.c: Likewise.
4458 * elf-eh-frame.c: Likewise.
4459 * elf-m10300.c: Likewise.
4461 * elf32-arc.c: Likewise.
4462 * elf32-arm.c: Likewise.
4463 * elf32-bfin.c: Likewise.
4464 * elf32-frv.c: Likewise.
4465 * elf32-iq2000.c: Likewise.
4466 * elf32-m32c.c: Likewise.
4467 * elf32-microblaze.c: Likewise.
4468 * elf32-nds32.c: Likewise.
4469 * elf32-rl78.c: Likewise.
4470 * elf32-rx.c: Likewise.
4471 * elf32-score.c: Likewise.
4472 * elf32-score7.c: Likewise.
4473 * elf32-sh64.c: Likewise.
4474 * elf32-v850.c: Likewise.
4475 * elf32-vax.c: Likewise.
4476 * elf32-visium.c: Likewise.
4477 * elf64-ia64-vms.c: Likewise.
4478 * elf64-mmix.c: Likewise.
4479 * elf64-sh64.c: Likewise.
4480 * elfcode.h: Likewise.
4481 * elfnn-aarch64.c: Likewise.
4482 * elfnn-ia64.c: Likewise.
4483 * elfxx-mips.c: Likewise.
4484 * hpux-core.c: Likewise.
4487 * linker.c: Likewise.
4488 * merge.c: Likewise.
4490 * oasys.c: Likewise.
4491 * pdp11.c: Likewise.
4492 * peXXigen.c: Likewise.
4493 * rs6000-core.c: Likewise.
4494 * vms-alpha.c: Likewise.
4495 * xcofflink.c: Likewise.
4497 2017-04-13 Alan Modra <amodra@gmail.com>
4499 * bfd.c (PRINT_TYPE): Define.
4500 (_doprnt): New function.
4501 (error_handler_internal): Use _doprnt.
4502 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
4503 calls in their natural order, throughout file.
4504 * coff-mcore.c: Likewise.
4505 * coff-ppc.c: Likewise.
4506 * coff-tic80.c: Likewise.
4507 * cofflink.c: Likewise.
4508 * elf-s390-common.c: Likewise.
4510 * elf32-arm.c: Likewise.
4511 * elf32-i386.c: Likewise.
4512 * elf32-m32r.c: Likewise.
4513 * elf32-msp430.c: Likewise.
4514 * elf32-spu.c: Likewise.
4515 * elf64-ia64-vms.c: Likewise.
4516 * elf64-sparc.c: Likewise.
4517 * elf64-x86-64.c: Likewise.
4518 * elflink.c: Likewise.
4519 * elfnn-aarch64.c: Likewise.
4520 * elfnn-ia64.c: Likewise.
4521 * elfxx-mips.c: Likewise.
4523 2017-04-13 Alan Modra <amodra@gmail.com>
4525 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
4526 branch veneers" error. Fix double space and format message.
4527 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
4528 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
4530 2017-04-13 Alan Modra <amodra@gmail.com>
4532 * bfd-in2.h: Regenerate.
4534 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
4536 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
4537 extra `\n' in warning/error messages.
4538 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
4539 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
4541 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
4543 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
4544 processor-specific properties with generic ELF target vector.
4546 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
4548 * elf32-sparc.c (elf_backend_fixup_symbol): New.
4549 * elf64-sparc.c (elf_backend_fixup_symbol): New.
4550 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
4551 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
4553 (link_hash_newfunc): Initialize has_got_reloc and
4555 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
4557 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
4559 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
4561 (_bfd_sparc_elf_fixup_symbol): New function.
4562 (allocate_dynrelocs): Don't allocate space for dynamic
4563 relocations and discard relocations against resolved undefined
4564 weak symbols in executable. Don't make resolved undefined weak
4565 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
4566 relocation against undefined weak symbols in PIE.
4567 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
4568 relocations against resolved undefined weak symbols in PIE
4569 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
4570 without ynamic PLT/GOT relocations for resolved undefined weak
4572 Don't generate dynamic relocation against resolved undefined
4573 weak symbol in executable.
4574 (pie_finish_undefweak_symbol): New function.
4575 (_bfd_sparc_elf_finish_dynamic_sections): Call
4576 pie_finish_undefweak_symbol on all symbols in PIE.
4577 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
4578 (_bfd_sparc_elf_fixup_symbol): New function.
4580 2017-04-10 Nick Clifton <nickc@redhat.com>
4582 * config.bfd: Remove ns32k from obsolete list.
4584 2017-04-10 Alan Modra <amodra@gmail.com>
4587 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
4588 (special_sections_i): Likewise for .init_array.
4589 (special_sections_p): Likewise for .preinit_array.
4591 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
4595 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
4596 ELF_COMMON_DEF_P for common symbols.
4597 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
4598 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
4599 * elflink.c (_bfd_elf_merge_symbol): Revert commits
4600 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
4601 07492f668d2173da7a2bda3707ff0985e0f460b6.
4603 2017-04-07 Pedro Alves <palves@redhat.com>
4605 * opncls.c (bfd_get_debug_link_info): Rename to...
4606 (bfd_get_debug_link_info_1): ... this. Change type of second
4607 parameter to void pointer. Adjust.
4608 (bfd_get_debug_link_info): Reimplement on top of
4609 bfd_get_debug_link_info_1.
4610 (separate_debug_file_exists, separate_alt_debug_file_exists):
4611 Change type of second parameter to void pointer. Adjust.
4612 (get_func_type, check_func_type): Change type of second parameter
4614 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
4615 the callback functions instead of passing the address of a local.
4616 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
4617 find_separate_debug_file.
4618 (get_alt_debug_link_info_shim): Change type of second parameter to
4619 void pointer. Adjust.
4620 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
4621 find_separate_debug_file.
4622 (get_build_id_name, bfd_boolean check_build_id_file): Change type
4623 of second parameter to void pointer. Adjust.
4624 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
4625 pointer local to find_separate_debug_file.
4627 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
4629 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
4630 external symbols with a definition.
4631 (_bfd_coff_gc_mark_extra_sections): Fix typo.
4633 2017-04-07 Alan Modra <amodra@gmail.com>
4635 * po/SRC-POTFILES.in: Regenerate.
4637 2017-04-05 Alan Modra <amodra@gmail.com>
4639 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
4642 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
4644 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
4645 numbers for DataDirectory entry indicies passed to
4648 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
4650 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
4651 each GNU_MBIND section and align GNU_MBIND section to page size.
4652 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
4653 segment for each GNU_MBIND section.
4654 (_bfd_elf_init_private_section_data): Copy sh_info from input
4655 for GNU_MBIND section.
4657 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
4659 * elfnn-riscv.c (GP_NAME): Delete.
4660 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
4661 (_bfd_riscv_relax_lui): Likewise.
4663 2017-04-04 Nick Clifton <nickc@redhat.com>
4666 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
4668 (bfd_elf_final_link): Only initialize the extended symbol index
4669 section if there are extended symbol tables to list.
4671 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
4673 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
4674 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
4675 * configure.ac (elf): Add elf-properties.lo.
4676 * Makefile.in: Regenerated.
4677 * configure: Likewise.
4678 * elf-bfd.h (elf_property_kind): New.
4679 (elf_property): Likewise.
4680 (elf_property_list): Likewise.
4681 (elf_properties): Likewise.
4682 (_bfd_elf_parse_gnu_properties): Likewise.
4683 (_bfd_elf_get_property): Likewise.
4684 (_bfd_elf_link_setup_gnu_properties): Likewise.
4685 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
4686 and setup_gnu_properties.
4687 (elf_obj_tdata): Add properties.
4688 * elf-properties.c: New file.
4689 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
4690 (elf_i386_merge_gnu_properties): Likewise.
4691 (elf_backend_parse_gnu_properties): Likewise.
4692 (elf_backend_merge_gnu_properties): Likewise.
4693 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
4694 (elf_x86_64_merge_gnu_properties): Likewise.
4695 (elf_backend_parse_gnu_properties): Likewise.
4696 (elf_backend_merge_gnu_properties): Likewise.
4697 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
4698 (elf_backend_parse_gnu_properties): Likewise.
4699 (elf_backend_setup_gnu_properties): Likewise.
4700 (elfNN_bed): Add elf_backend_parse_gnu_properties,
4701 elf_backend_merge_gnu_properties and
4702 elf_backend_setup_gnu_properties.
4704 2017-03-30 Pip Cet <pipcet@gmail.com>
4706 * elf32-wasm32.c: Add relocation code, two relocs.
4707 * reloc.c: Add wasm32 relocations.
4708 * libbfd.h: Regenerate.
4709 * bfd-in2.h: Regenerate.
4710 * bfd/po/bfd.pot: Regenerate.
4712 2017-03-29 Nick Clifton <nickc@redhat.com>
4715 * coff-bfd.h (struct coff_section_data): Add new fields:
4716 saved_bias and bias.
4717 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
4718 computed for PE binaries.
4719 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
4722 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
4725 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
4726 to handle a local symbol with a hash-symbol-entry; without PLT.
4727 Add BFD_ASSERT for an incidental case with GOT entry present.
4728 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
4729 isn't forced-or-set local.
4731 2017-03-27 Pip Cet <pipcet@gmail.com>
4733 * wasm-module.c: New file to support WebAssembly modules.
4734 * wasm-module.h: New file to support WebAssembly modules.
4735 * doc/webassembly.texi: Start documenting wasm-module.c.
4736 * config.bfd: Add wasm_vec.
4737 * targets.c: Likewise.
4738 * configure.ac: Likewise.
4739 * Makefile.am: Add entries for wasm-module.c.
4740 * Makefile.in: Regenerate.
4741 * configure: Regenerate.
4742 * po/SRC-POTFILES.in: Regenerate.
4744 2017-03-27 Pip Cet <pipcet@gmail.com>
4746 * cpu-wasm32.c: New file to support wasm32 architecture.
4747 * elf32-wasm32.c: New file to support wasm32 architecture.
4748 * Makefile.am: Add wasm32 architecture.
4749 * archures.c: Likewise.
4750 * config.bfd: Likewise.
4751 * configure.ac: Likewise.
4752 * targets.c: Likewise.
4753 * Makefile.in: Regenerate.
4754 * bfd-in2.h: Regenerate.
4755 * configure: Regenerate.
4756 * po/SRC-POTFILES.in: Regenerate.
4758 2017-03-20 Alan Modra <amodra@gmail.com>
4761 * elf64-ppc.c (compare_symbols): Stabilize sort.
4763 2017-03-18 Alan Modra <amodra@gmail.com>
4765 * elf64-ppc.c (struct ppc_link_hash_table): Add
4766 local_ifunc_resolver and maybe_local_ifunc_resolver.
4767 (ppc_build_one_stub): Set flags on emitting dynamic
4768 relocation to ifunc.
4769 (ppc64_elf_relocate_section): Likewise.
4770 (ppc64_elf_finish_dynamic_symbol): Likewise.
4771 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
4772 local dynamic relocs to ifuncs.
4773 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
4774 local_ifunc_resolver and maybe_local_ifunc_resolver.
4775 (ppc_elf_relocate_section): Set flag on emitting dynamic
4776 relocation to ifuncs.
4777 (ppc_elf_finish_dynamic_symbol): Likewise.
4778 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
4779 dynamic relocs to ifuncs.
4781 2017-03-13 Nick Clifton <nickc@redhat.com>
4784 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
4785 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
4786 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
4787 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
4788 * bfd-in2.h: Regenerate.
4789 * libbfd.h: Regenerate.
4790 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
4792 (IS_AARCH64_TLSDESC_RELOC): Likewise.
4793 (elfNN_aarch64_howto_table): Likewise.
4794 (aarch64_tls_transition_without_check): Likewise.
4795 (aarch64_reloc_got_type): Likewise.
4796 (elfNN_aarch64_final_link_relocate): Likewise.
4797 (elfNN_aarch64_tls_relax): Likewise.
4798 (elfNN_aarch64_relocate_section): Likewise.
4799 (elfNN_aarch64_gc_sweep_hook): Likewise.
4800 (elfNN_aarch64_check_relocs): Likewise.
4801 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
4802 (_bfd_aarch64_elf_resolve_relocation): Likewise.
4804 2017-03-11 Alan Modra <amodra@gmail.com>
4806 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
4807 parameter is in fact used. Whitespace fixes.
4808 * elf64-ppc.c: Likewise.
4810 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
4812 * rs6000-core.c (CORE_NEW): Simplify macro when
4813 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
4815 2017-03-07 Alan Modra <amodra@gmail.com>
4819 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
4822 2017-03-05 Alan Modra <amodra@gmail.com>
4824 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
4825 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
4826 (next_cie_fde_offset): New function.
4827 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
4828 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
4829 four bytes. Align CIEs to four or eight bytes depending on
4830 per_encoding_aligned8. Align FDEs according to their encoding.
4831 Pad last FDE to output section alignment.
4832 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
4834 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
4835 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
4836 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
4838 2017-03-02 Martin Bickel <binutils@ineranves.de>
4841 * elf.c (rewrite_elf_program_header): Do not issue a warning for
4842 empty segments which have a zero filesz, but a non-zero memsz.
4844 2017-03-02 Alan Modra <amodra@gmail.com>
4846 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
4848 2017-02-28 Alan Modra <amodra@gmail.com>
4850 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
4851 (ppc64_elf_relocate_section): Likewise.
4853 2017-02-28 Alan Modra <amodra@gmail.com>
4856 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
4857 rather than elf32_nios2_hash_table or elf_hash_table.
4858 (create_got_section): Likewise.
4859 (nios2_elf32_finish_dynamic_symbol): Likewise.
4860 (nios2_elf32_adjust_dynamic_symbol): Likewise.
4861 (nios2_elf32_size_dynamic_sections): Likewise.
4862 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
4863 vars. Use htab equivalents directly instead. Don't create
4864 all dynamic sections on needing just the GOT. Use a goto
4865 rather than a fall-through with reloc test. Ensure
4866 htab->dynobj is set when making dynamic sreloc section.
4867 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
4868 equivalent directly instead. Don't segfault on looking for
4869 .dynamic when dynamic sections have not been created. Don't
4870 segfault on .got.plt being discarded.
4871 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
4872 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
4873 fixme and another not so relevant comment.
4874 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
4875 already set, set hash table dynobj on creating .sbss.
4877 2017-02-28 Alan Modra <amodra@gmail.com>
4879 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
4880 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
4881 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
4882 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
4883 (ppc64_elf_relocate_section): Likewise.
4884 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
4885 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
4886 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
4887 * libbfd.h: Regenerate.
4888 * bfd-in2.h: Regenerate.
4890 2017-02-28 Alan Modra <amodra@gmail.com>
4892 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
4893 dynamic .data.rel.ro read-only.
4894 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
4895 rather than section flags when deciding where copy reloc goes.
4896 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
4897 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
4898 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
4899 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
4900 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
4901 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
4902 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
4903 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
4904 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
4905 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
4906 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
4907 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
4908 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
4909 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
4910 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
4911 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
4912 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
4913 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
4914 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
4916 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
4918 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
4919 `jalr $0, $25' instruction encoding.
4921 2017-02-27 Nick Clifton <nickc@redhat.com>
4924 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
4925 generating a seg-fault when encountering a symbol that has been
4926 deleted by garbage collection.
4928 2017-02-25 Alan Modra <amodra@gmail.com>
4930 * elf32-arc.c (struct dynamic_sections): Delete.
4931 (enum dyn_section_types): Delete.
4932 (dyn_section_names): Delete.
4933 (arc_create_dynamic_sections): Delete.
4934 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
4935 segfault on discarded .rela.plt section.
4936 (elf_arc_size_dynamic_sections): Formatting. Don't call
4937 arc_create_dynamic_sections. Don't allocate memory for sections
4938 handled by the generic linker. Correct code finding relocs in
4939 read-only sections. Set SEC_EXCLUDE on zero size .got,
4940 .got.plt, and .dynbss sections. Do set .interp for pies.
4942 2017-02-24 Andrew Waterman <andrew@sifive.com>
4944 * elfnn-riscv.c (GP_NAME): New macro.
4945 (riscv_global_pointer_value): Use it.
4946 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
4947 output section, consider only that section's alignment.
4949 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
4951 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
4952 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
4953 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
4954 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
4956 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
4958 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
4959 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
4962 2017-02-23 Alan Modra <amodra@gmail.com>
4965 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
4967 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
4968 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
4971 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
4974 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
4975 processing ahead of the call to `elf_gc_sweep_symbol'.
4977 2017-02-22 Nick Clifton <nickc@redhat.com>
4980 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
4981 created section 4-byte alignment.
4983 2017-02-22 Alan Modra <amodra@gmail.com>
4985 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
4986 on .got or .plt output section being discarded by script.
4987 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
4990 2017-02-21 Alan Modra <amodra@gmail.com>
4992 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
4993 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
4995 2017-02-20 Alan Modra <amodra@gmail.com>
4998 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
4999 if DT_RELSZ/DT_RELASZ is zero.
5001 2017-02-17 Nick Clifton <nickc@redhat.com>
5003 * compress.c (bfd_get_full_section_contents): Remember to reduce
5004 compressed size by the sizeof the compression header when
5005 decompressing the contents.
5007 2017-02-17 Pedro Alves <palves@redhat.com>
5009 * srec.c (Chunk): Rename to ...
5010 (_bfd_srec_len): ... this.
5011 (S3Forced): Rename to ...
5012 (_bfd_srec_forceS3): ... this.
5013 * objcopy.c: Adjust all references.
5015 2017-02-17 Pedro Alves <palves@redhat.com>
5017 * archive.c (bsd_write_armap): Rename to ...
5018 (_bfd_bsd_write_armap): ... this.
5019 (coff_write_armap): Rename to ...
5020 (_bfd_coff_write_armap): ... this.
5021 * libbfd-in.h (bsd_write_armap): Rename to ...
5022 (_bfd_bsd_write_armap): ... this.
5023 (coff_write_armap): Rename to ...
5024 (_bfd_coff_write_armap): ... this.
5025 * aout-target.h, aout-tic30.c: Adjust all users.
5026 * libbfd.h: Regenerate.
5028 2017-02-17 Pedro Alves <palves@redhat.com>
5030 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
5031 (warn_deprecated): Rename to ...
5032 (_bfd_warn_deprecated): ... this.
5033 * libbfd.c (warn_deprecated): Rename to ...
5034 (_bfd_warn_deprecated): ... this.
5035 * bfd-in2.h: Regenerate.
5037 2017-02-17 Pedro Alves <palves@redhat.com>
5039 * bfdio.c (real_ftell): Rename to ...
5040 (_bfd_real_ftell): ... this.
5041 (real_fseek): Rename to ...
5042 (_bfd_real_fseek): ... this.
5043 (real_fopen): Rename to ...
5044 (_bfd_real_fopen): ... this.
5045 * libbfd-in.h (real_ftell): Rename to ...
5046 (_bfd_real_ftell): ... this.
5047 (real_fseek): Rename to ...
5048 (_bfd_real_fseek): ... this.
5049 (real_fopen): Rename to ...
5050 (_bfd_real_fopen): ... this.
5051 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
5052 * libbfd.h: Regenerate.
5054 2017-02-17 Pedro Alves <palves@redhat.com>
5056 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
5057 * libbfd.c (read_unsigned_leb128): Rename to ...
5058 (_bfd_read_unsigned_leb128): ... this.
5059 (read_signed_leb128): Rename to ...
5060 (_bfd_read_signed_leb128): ... this.
5061 (safe_read_leb128): Rename to ...
5062 (_bfd_safe_read_leb128): ... this.
5063 * libbfd-in.h (read_unsigned_leb128): Rename to ...
5064 (_bfd_read_unsigned_leb128): ... this.
5065 (read_signed_leb128): Rename to ...
5066 (_bfd_read_signed_leb128): ... this.
5067 (safe_read_leb128): Rename to ...
5068 (_bfd_safe_read_leb128): ... this.
5069 * libbfd.h: Renegerate.
5071 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
5073 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
5074 before trying to fine matching file and line information.
5076 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
5078 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
5079 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
5080 not match current bfd, then reload debug information. Record bfd
5081 we're loading debug info for in the stash. If we have debug
5082 informatin in the cache then perform section placement before
5085 2017-02-16 Alan Modra <amodra@gmail.com>
5088 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
5089 * elfxx-target.h (elf_backend_no_page_alias): Define.
5090 (elfNN_bed): Init new field.
5091 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
5092 ensure PT_LOAD segment starts on a new page.
5093 * elf32-hppa.c (elf_backend_no_page_alias): Define.
5095 2017-02-16 Alan Modra <amodra@gmail.com>
5098 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
5101 2017-02-16 Jiong Wang <jiong.wang@arm.com>
5103 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
5104 * bfd-in2.h: Regenerated.
5106 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
5109 * elf32-i386.c (elf_i386_relocate_section): Allow
5110 "lea foo@GOT, %reg" in PIC.
5112 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
5115 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
5116 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
5117 error against local IFUNC symbol without a base register for
5120 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
5122 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
5123 `%P: %H:' with `info->callbacks->einfo'.
5124 (ppc_elf_relocate_section): Likewise.
5125 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
5126 (ppc64_elf_edit_toc): Likewise.
5127 (ppc64_elf_relocate_section): Likewise.
5129 2017-02-14 Alan Modra <amodra@gmail.com>
5131 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
5132 --gc-keep-exported, and test versioned field of sym rather than
5133 looking for @ in name.
5135 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
5137 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
5140 2017-02-13 Nick Clifton <nickc@redhat.com>
5143 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
5146 2017-02-07 Andrew Waterman <andrew@sifive.com>
5148 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
5149 entry size if PLT header is written.
5151 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
5153 Fix sparc64 dynamic relocation processing to use the dynamic
5155 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
5156 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
5159 2017-02-03 Nick Clifton <nickc@redhat.com>
5162 * coffcode.h (coff_write_object_contents): Enlarge size of
5163 s_name_buf in order to avoid compile time warning about possible
5165 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
5166 32-bits of insn value before printing into buffer.
5168 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
5170 * elfxx-mips.c (mips_elf_hash_sort_data): Add
5171 `max_local_dynindx'.
5172 (mips_elf_sort_hash_table): Handle it.
5173 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
5174 symbols bump up `max_local_dynindx' rather than
5175 `max_non_got_dynindx'.
5177 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
5179 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
5180 `min_got_dynindx', `max_unref_got_dynindx' and
5181 `max_non_got_dynindx' members to the `bfd_size_type' data type.
5182 (mips_elf_sort_hash_table): Adjust accordingly.
5184 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
5186 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
5187 to access the hash table.
5189 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
5191 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
5192 non-NULL `htab' to the beginning.
5194 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
5196 * elflink.c (elf_gc_sweep): Wrap overlong line.
5198 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
5200 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
5201 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
5202 * elfxx-mips.c (mips_elf_link_hash_table): Add
5203 `ignore_branch_isa' member.
5204 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
5205 in branch relocation calculation as an error if
5206 `ignore_branch_isa' has been set.
5207 (_bfd_mips_elf_insn32): Rename to...
5208 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
5209 parameter to `insn32' and add an `ignore_branch_isa' parameter.
5210 Handle the new parameter.
5212 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
5214 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
5215 local variable dynobj.
5218 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
5219 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
5220 executable from read-only sections into sdynrelro.
5221 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
5222 dynamic relocs in sdynrelro.
5223 (elf_backend_want_dynrelro): Define.
5225 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
5227 * config.bfd (*-*-rtemsaout*): Mark as removed.
5229 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
5231 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
5232 (arm-*-rtems*): Move to (arm*-*-eabi*).
5233 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
5234 (m68-*-rtems*): Move to (m68*-*-elf*).
5236 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
5238 * config.bfd (*-*-rtemscoff*): Mark as removed.
5240 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
5243 * elflink.c (bfd_elf_record_link_assignment): Revert last
5244 change and don't ever clear `forced_local'. Set `mark'
5246 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
5248 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
5249 (bfd_elf_size_dynamic_sections): ... here.
5250 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
5251 and set `mark' instead in `__tls_get_addr_opt' processing.
5252 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
5254 2017-01-24 Alan Modra <amodra@gmail.com>
5256 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
5257 where dynamic relocs are preferable. Allow ifunc too.
5258 (ensure_undefweak_dynamic): New function.
5259 (allocate_dynrelocs): Use it here. Move plt handling last and
5260 don't make symbols dynamic, simplifying loop. Only make undef
5261 weak symbols with GOT entries dynamic. Correct condition
5262 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
5263 comments. Remove goto.
5264 (ppc_elf_relocate_section): Correct test for using dynamic
5265 symbol on GOT relocs. Rearrange test for emitting GOT relocs
5266 to suit. Set up explicit tls_index entries and implicit GOT
5267 tls_index entries resolvable at link time for
5268 __tls_get_addr_opt. Simplify test to clear mem for prelink.
5269 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
5270 (ensure_undefweak_dynamic): New function.
5271 (allocate_dynrelocs): Use it here. Only make undef weak symbols
5272 with GOT entries dynamic. Remove unnecessary test of
5273 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
5274 (ppc64_elf_relocate_section): Correct test for using dynamic
5275 symbol on GOT relocs. Rearrange test for emitting GOT relocs
5276 to suit. Set up explicit tls_index entries and implicit GOT
5277 tls_index entries resolvable at link time for __tls_get_addr_opt.
5278 Simplify expression to clear mem for prelink.
5280 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
5282 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
5284 2017-01-20 Jiong Wang <jiong.wang@arm.com>
5286 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
5287 (elf_backend_hash_symbol): Define.
5289 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
5292 * elflink.c (bfd_elf_record_link_assignment): Clear any
5293 `forced_local' marking for DSO symbols that are not being
5296 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
5298 * elfnn-riscv.c (riscv_elf_object_p): New function.
5300 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
5303 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
5305 (elf_x86_64_check_relocs): Create .eh_frame section for the
5307 (elf_x86_64_size_dynamic_sections): Allocate and initialize
5308 .eh_frame section for the .plt.bnd section.
5309 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
5310 for the .plt.bnd section.
5312 2017-01-12 Nick Clifton <nickc@redhat.com>
5315 * opncls.c (find_separate_debug_file): Add include_dirs
5316 parameter. Only include the directory part of the bfd's filename
5317 in search paths if include_dirs is true. Add a couple of extra
5318 locations for looking for debug files.
5319 ( bfd_follow_gnu_debuglink): Update invocation of
5320 find_separate_debug_file.
5321 (bfd_follow_gnu_debugaltlink): Likewise.
5322 (get_build_id): New function: Finds the build-id of the given bfd.
5323 (get_build_id_name): New function: Computes the name of the
5324 separate debug info file for a bfd, based upon its build-id.
5325 (check_build_id_file): New function: Checks to see if a separate
5326 debug info file exists at the given location, and that its
5327 build-id matches that of the original bfd.
5328 (bfd_follow_build_id_debuglink): New function: Finds a separate
5329 debug info file for a given bfd by using the build-id method.
5330 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
5331 method of locating a separate debug info file before using the
5333 * bfd-in2.h: Regenerate.
5335 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
5338 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
5339 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
5340 elf_x86_64_eh_frame_plt_got.
5341 (elf_x86_64_size_dynamic_sections): Get unwind info from
5342 elf_x86_64_bnd_arch_bed for the BND PLT.
5344 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
5346 * config.bfd: Add entries for i686-redox and x86_64-redox.
5348 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
5350 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
5352 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
5353 .eh_frame section to 4 bytes for x32.
5354 (elf_x86_64_check_relocs): Likewise.
5356 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
5359 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
5360 (PLT_GOT_FDE_LENGTH): Likewise.
5361 (elf_i386_plt_layout): Add eh_frame_plt_got and
5362 eh_frame_plt_got_size.
5363 (elf_i386_plt): Updated.
5364 (elf_i386_link_hash_table): Add plt_got_eh_frame.
5365 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
5366 (elf_i386_size_dynamic_sections): Allocate and initialize
5367 .eh_frame section for .plt.got.
5368 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
5370 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
5371 eh_frame_plt_got_size.
5372 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
5373 (PLT_GOT_FDE_LENGTH): Likewise.
5374 (elf_x86_64_backend_data): Add eh_frame_plt_got and
5375 eh_frame_plt_got_size.
5376 (elf_x86_64_arch_bed): Updated.
5377 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
5378 eh_frame_plt_got_size.
5379 (elf_x86_64_nacl_arch_bed): Likewise.
5380 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
5381 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
5382 (elf_x86_64_size_dynamic_sections): Allocate and initialize
5383 .eh_frame section for .plt.got.
5384 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
5387 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
5389 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
5390 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
5392 2017-01-09 Nick Clifton <nickc@redhat.com>
5394 * dwarf2.c (lookup_address_in_function_table): Return early if
5395 there are no functions in the given comp unit, or if the high
5396 address of the last function in the comp unit is less than the
5399 2017-01-09 Nick Clifton <nickc@redhat.com>
5402 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
5403 message if there are too many symbols to load.
5405 2017-01-04 James Clarke <jrtc27@jrtc27.com>
5407 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
5408 if relocs are cached.
5410 2017-01-03 Rich Felker <bugdal@aerifal.cx>
5413 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
5414 for R_MICROBLAZE_GOTOFF_64.
5416 2017-01-03 Nick Clifton <nickc@redhat.com>
5418 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
5419 warning about using a possibly uninitialised variable.
5421 2017-01-02 Alan Modra <amodra@gmail.com>
5423 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
5424 (allocate_plt_static, allocate_dynrelocs): Use it.
5426 2017-01-02 Alan Modra <amodra@gmail.com>
5428 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
5429 .PARISC.unwind section.
5431 2017-01-02 Alan Modra <amodra@gmail.com>
5434 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
5435 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
5436 indirect to GOT pointer relative code edit.
5438 2017-01-02 Alan Modra <amodra@gmail.com>
5440 Update year range in copyright notice of all files.
5442 For older changes see ChangeLog-2016
5444 Copyright (C) 2017 Free Software Foundation, Inc.
5446 Copying and distribution of this file, with or without modification,
5447 are permitted in any medium without royalty provided the copyright
5448 notice and this notice are preserved.
5454 version-control: never