1 2017-11-29 Stefan Stroe <stroestefan@gmail.com>
3 * po/Make-in (datadir): Define as @datadir@.
4 (localedir): Define as @localedir@.
5 (gnulocaledir, gettextsrcdir): Use @datarootdir@.
7 2017-11-28 Nick Clifton <nickc@redhat.com>
10 * coffgen.c (_bfd_coff_read_string_table): Check for an excessive
11 size of the external string table.
13 2017-11-28 Nick Clifton <nickc@redhat.com>
16 * reloc.c (reloc_offset_in_range): Rename to
17 bfd_reloc_offset_in_range and export.
18 (bfd_perform_relocation): Rename function invocation.
19 (bfd_install_relocation): Likewise.
20 (bfd_final_link_relocate): Likewise.
21 * bfd-in2.h: Regenerate.
22 * coff-arm.c (coff_arm_reloc): Use bfd_reloc_offset_in_range.
23 * coff-i386.c (coff_i386_reloc): Likewise.
24 * coff-i860.c (coff_i860_reloc): Likewise.
25 * coff-m68k.c (mk68kcoff_common_addend_special_fn): Likewise.
26 * coff-m88k.c (m88k_special_reloc): Likewise.
27 * coff-mips.c (mips_reflo_reloc): Likewise.
28 * coff-x86_64.c (coff_amd64_reloc): Likewise.
30 2017-11-28 H.J. Lu <hongjiu.lu@intel.com>
32 * elf-m10300.c (mn10300_elf_check_relocs): Don't set
34 * elf32-arm.c (elf32_arm_check_relocs): Likewise.
35 * elf32-bfin.c (bfin_check_relocs): Likewise.
36 * elf32-cr16.c (cr16_elf_check_relocs): Likewise.
37 * elf32-cris.c (cris_elf_check_relocs): Likewise.
38 * elf32-d10v.c (elf32_d10v_check_relocs): Likewise.
39 * elf32-dlx.c (elf32_dlx_check_relocs): Likewise.
40 * elf32-fr30.c (fr30_elf_check_relocs): Likewise.
41 * elf32-frv.c (elf32_frv_check_relocs): Likewise.
42 * elf32-hppa.c (elf32_hppa_check_relocs): Likewise.
43 * elf32-i370.c (i370_elf_check_relocs): Likewise.
44 * elf32-i386.c (elf_i386_check_relocs): Likewise.
45 * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
46 * elf32-lm32.c (lm32_elf_check_relocs): Likewise.
47 * elf32-m32c.c (m32c_elf_check_relocs): Likewise.
48 * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
49 * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
50 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
51 * elf32-mcore.c (mcore_elf_check_relocs): Likewise.
52 * elf32-metag.c (elf_metag_check_relocs): Likewise.
53 * elf32-microblaze.c (microblaze_elf_check_relocs): Likewise.
54 * elf32-moxie.c (moxie_elf_check_relocs): Likewise.
55 * elf32-msp430.c (elf32_msp430_check_relocs): Likewise.
56 * elf32-mt.c (mt_elf_check_relocs): Likewise.
57 * elf32-nios2.c (nios2_elf32_check_relocs): Likewise.
58 * elf32-or1k.c (or1k_elf_check_relocs): Likewise.
59 * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
60 * elf32-rl78.c (rl78_elf_check_relocs): Likewise.
61 * elf32-s390.c (elf_s390_check_relocs): Likewise.
62 * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
63 * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
64 * elf32-sh.c (sh_elf_check_relocs): Likewise.
65 * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
66 * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
67 * elf32-v850.c (v850_elf_check_relocs): Likewise.
68 * elf32-vax.c (elf_vax_check_relocs): Likewise.
69 * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
70 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
71 * elf64-aarch64.c (elf64_aarch64_check_relocs): Likewise.
72 * elf64-alpha.c (elf64_alpha_check_relocs): Likewise.
73 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
74 * elf64-ia64-vms.c (elf64_ia64_check_relocs): Likewise.
75 * elf64-mmix.c (mmix_elf_check_relocs): Likewise.
76 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
77 * elf64-s390.c (elf_s390_check_relocs): Likewise.
78 * elf64-sh64.c (sh_elf64_check_relocs): Likewise.
79 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
80 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
81 * elfnn-ia64.c (elfNN_ia64_check_relocs): Likewise.
82 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
83 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
84 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
85 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
87 2017-11-28 Alan Modra <amodra@gmail.com>
90 * elflink.c (_bfd_elf_merge_symbol): Allow weak symbols to override
91 early passes over linker script symbols.
92 * linker.c (_bfd_generic_link_add_one_symbol): Allow symbols to
93 override early passes over linker script symbols. Clear ldscript_def
94 on symbol definitions.
96 2017-11-28 Alan Modra <amodra@gmail.com>
98 * elf64-mmix.c (bfd_elf64_bfd_copy_link_hash_symbol_type): Define.
100 2017-11-28 H.J. Lu <hongjiu.lu@intel.com>
103 * elflink.c (_bfd_elf_merge_symbol): Also skip definition from
105 (elf_link_add_object_symbols): If linker plugin is enabled, set
106 non_ir_ref_regular on symbols referenced in regular objects so
107 that linker plugin will get the correct symbol resolution.
109 2017-11-27 Szabolcs Nagy <szabolcs.nagy@arm.com>
112 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Use
113 bfd_link_executable instead of bfd_link_pic for TLS.
114 (elfNN_aarch64_allocate_dynrelocs): Likewise.
115 (aarch64_can_relax_tls): Likewise.
117 2017-11-27 Szabolcs Nagy <szabolcs.nagy@arm.com>
120 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Use
121 UNDEFWEAK_NO_DYNAMIC_RELOC to avoid dynamic GOT relocs.
122 (elfNN_aarch64_allocate_dynrelocs): Likewise.
124 2017-11-24 H.J. Lu <hongjiu.lu@intel.com>
127 * elf.c (elf_read_notes): Add an argument for note aligment.
128 (elf_parse_notes): Likewise.
129 (_bfd_elf_make_section_from_shdr): Pass section aligment to
131 (bfd_section_from_phdr): Pass segment aligment to elf_read_notes.
132 (elf_parse_notes): Add an argument for note aligment. Use
133 ELF_NOTE_DESC_OFFSET to get the offset of the note descriptor.
134 Use ELF_NOTE_NEXT_OFFSET to get the offset of the next note
136 (elf_read_notes): Add an argument for note aligment and pass it
139 2017-11-23 Alan Modra <amodra@gmail.com>
141 * elf32-hppa.c (pc_dynrelocs): Define.
142 (elf32_hppa_copy_indirect_symbol): Don't copy dyn_relocs to weakdefs.
143 (alias_readonly_dynrelocs): New function.
144 (elf32_hppa_adjust_dynamic_symbol): Don't clear non_got_ref to
145 indicate dyn_relocs should be discarded, discard them here.
146 Use alias_readonly_dynrelocs.
147 (allocate_dynrelocs): Don't test or clear non_got_ref.
148 (elf32_hppa_relocate_section): Simplify test for dynamic relocs.
149 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Don't copy dyn_relocs
151 (alias_readonly_dynrelocs, pc_dynrelocs): New functions.
152 (ppc_elf_adjust_dynamic_symbol): Don't clear non_got_ref to
153 indicate dyn_relocs should be discarded, discard them here.
154 Use alias_readonly_dynrelocs.
155 (allocate_dynrelocs): Don't test or clear non_got_ref.
156 (ppc_elf_relocate_section): Simplify test for dynamic relocs.
158 2017-11-23 Alan Modra <amodra@gmail.com>
160 * elf64-ppc.c (struct ppc_link_hash_entry): Delete weakref field.
161 (ppc64_elf_copy_indirect_symbol): Don't set weakref.
162 (alias_readonly_dynrelocs): Use u.alias rather than weakref.
163 (ppc64_elf_adjust_dynamic_symbol): Don't use
164 alias_readonly_dynrelocs for function symbols.
166 2017-11-23 Alan Modra <amodra@gmail.com>
168 * elf-bfd.h (struct elf_link_hash_entry): Add is_weakalias.
169 Rename u.weakdef to u.alias and update comment.
170 (weakdef): New static inline function.
171 * elflink.c (bfd_elf_record_link_assignment) Test is_weakalias
172 rather than u.weakdef != NULL, and use weakdef function.
173 (_bfd_elf_adjust_dynamic_symbol): Likewise.
174 (_bfd_elf_fix_symbol_flags): Likewise. Clear is_weakalias on
175 all aliases if def has been overridden in a regular object, not
177 (elf_link_add_object_symbols): Delete new_weakdef flag. Test
178 is_weakalias and use weakdef. Set is_weakalias and circular
179 u.alias. Update comments.
180 (_bfd_elf_gc_mark_rsec): Test is_weakalias rather than
181 u.weakdef != NULL and use weakdef function.
182 * elf-m10300.c (_bfd_mn10300_elf_adjust_dynamic_symbol): Test
183 is_weakalias rather than u.weakdef != NULL and use weakdef
184 function. Assert that def is strong defined.
185 * elf32-arc.c (elf_arc_adjust_dynamic_symbol): Likewise.
186 * elf32-arm.c (elf32_arm_adjust_dynamic_symbol): Likewise.
187 * elf32-bfin.c (elf32_bfinfdpic_adjust_dynamic_symbol): Likewise.
188 (bfin_adjust_dynamic_symbol): Likewise.
189 * elf32-cr16.c (_bfd_cr16_elf_adjust_dynamic_symbol): Likewise.
190 * elf32-cris.c (elf_cris_adjust_dynamic_symbol): Likewise.
191 * elf32-frv.c (elf32_frvfdpic_adjust_dynamic_symbol): Likewise.
192 * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Likewise.
193 * elf32-i370.c (i370_elf_adjust_dynamic_symbol): Likewise.
194 * elf32-lm32.c (lm32_elf_adjust_dynamic_symbol): Likewise.
195 * elf32-m32r.c (m32r_elf_adjust_dynamic_symbol): Likewise.
196 * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Likewise.
197 * elf32-metag.c (elf_metag_adjust_dynamic_symbol): Likewise.
198 * elf32-microblaze.c (microblaze_elf_adjust_dynamic_symbol): Likewise.
199 * elf32-nds32.c (nds32_elf_adjust_dynamic_symbol): Likewise.
200 * elf32-nios2.c (nios2_elf32_adjust_dynamic_symbol): Likewise.
201 * elf32-or1k.c (or1k_elf_adjust_dynamic_symbol): Likewise.
202 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Likewise.
203 * elf32-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
204 * elf32-score.c (s3_bfd_score_elf_adjust_dynamic_symbol): Likewise.
205 * elf32-score7.c (s7_bfd_score_elf_adjust_dynamic_symbol): Likewise.
206 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): Likewise.
207 * elf32-tic6x.c (elf32_tic6x_adjust_dynamic_symbol): Likewise.
208 * elf32-tilepro.c (tilepro_elf_gc_mark_hook): Likewise.
209 (tilepro_elf_adjust_dynamic_symbol): Likewise.
210 * elf32-vax.c (elf_vax_adjust_dynamic_symbol): Likewise.
211 * elf32-xtensa.c (elf_xtensa_adjust_dynamic_symbol): Likewise.
212 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Likewise.
213 * elf64-hppa.c (elf64_hppa_adjust_dynamic_symbol): Likewise.
214 * elf64-ia64-vms.c (elf64_ia64_adjust_dynamic_symbol): Likewise.
215 * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
216 (ppc64_elf_adjust_dynamic_symbol): Likewise.
217 * elf64-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
218 * elf64-sh64.c (sh64_elf64_adjust_dynamic_symbol): Likewise.
219 * elfnn-aarch64.c (elfNN_aarch64_adjust_dynamic_symbol): Likewise.
220 * elfnn-ia64.c (elfNN_ia64_adjust_dynamic_symbol): Likewise.
221 * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Likewise.
222 * elfxx-mips.c (_bfd_mips_elf_adjust_dynamic_symbol): Likewise.
223 * elfxx-sparc.c (_bfd_sparc_elf_gc_mark_hook): Likewise.
224 (_bfd_sparc_elf_adjust_dynamic_symbol): Likewise.
225 * elfxx-tilegx.c (tilegx_elf_gc_mark_hook): Likewise.
226 (tilegx_elf_adjust_dynamic_symbol): Likewise.
227 * elfxx-x86.c (_bfd_x86_elf_adjust_dynamic_symbol): Likewise.
229 2017-11-21 Alan Modra <amodra@gmail.com>
231 * elf-bfd.h (elf_symbol_from): Check for NULL symbol bfd.
232 * elfcode.h (elf_slurp_reloc_table_from_section): Add FIXME comment.
234 2017-11-20 Nick Clifton <nickc@redhat.com>
237 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Skip
238 objects without a GNU_PROPERTY note section when looking for a bfd
239 onto which notes can be accumulated.
241 2017-11-20 Alan Modra <amodra@gmail.com>
245 * elf.c (_bfd_elf_init_reloc_shdr): Delete "sec_hdr" parameter
246 and leave rel_hdr->sh_flags zero. Update calls.
247 (bfd_elf_set_group_contents): Check input rel/rela SHF_GROUP
248 flag when !gas before adding rel/rela section to group. Set
249 output rel/rela SHF_GROUP flags.
251 2017-11-18 Jim Wilson <jimw@sifive.com>
253 * elfnn-riscv.c (_bfd_riscv_relax_align): Add space between alignment
254 and to in error message.
256 2017-11-17 H.J. Lu <hongjiu.lu@intel.com>
258 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Pass
259 "%F%P:", instead of "%F:", to linker callback in case of error.
261 2017-11-16 Nick Clifton <nickc@redhat.com>
264 * elf.c (elfcore_grok_netbsd_procinfo): Check that the note is big enough.
265 (elfcore_grok_openbsd_procinfo): Likewise.
266 (elfcore_grok_nto_status): Likewise.
268 2017-11-16 Nick Clifton <nickc@redhat.com>
270 * merge.c (sec_merge_emit): Always create padding buffer. Add
271 asserts to make sure that the buffer is long enough.
273 2017-11-15 Alan Modra <amodra@gmail.com>
275 * bfd.c (union _bfd_doprnt_args): Add "Bad".
276 (_bfd_doprnt): Handle more flags.
277 (_bfd_doprnt_scan): Likewise. Tidy setting of args array.
278 (error_handler_internal): Init args type to Bad.
280 2017-11-14 Alan Modra <amodra@gmail.com>
283 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Warn on discarding
284 non-empty dynamic section.
285 (ppc_build_one_stub): Take elf_gp from output bfd, not output
287 (ppc_size_one_stub, ppc64_elf_next_toc_section): Likewise.
289 2017-11-14 Alan Modra <amodra@gmail.com>
291 * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for user
294 2017-11-13 Jan Beulich <jbeulich@suse.com>
296 * coff-tic80.c (COFF_ENCODE_ALIGNMENT, COFF_DECODE_ALIGNMENT):
298 * coffcode.h (coff_set_alignment_hook): Drop tic80 special case.
299 (coff_write_object_contents): Likewise. Issue diagnostic for too
302 2017-11-12 H.J. Lu <hongjiu.lu@intel.com>
305 * elf.c (_bfd_elf_map_sections_to_segments): Remove PF_X from
308 2017-11-12 Alan Modra <amodra@gmail.com>
310 * elflink.c (elf_link_add_object_symbols): Ignore anything but
311 defined and defweak symbols when setting up weakdefs.
313 2017-11-12 Alan Modra <amodra@gmail.com>
315 * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Set non_got_ref
316 to keep dyn_relocs, clear to discard. Comment.
317 (allocate_dynrelocs): Always clear non_got_ref when clearing
318 dyn_relocs in non-pic case. Invert non_got_ref test. Also test
319 dynamic_adjusted and ELF_COMMON_DEF_P. Move code deleting
320 dyn_relocs on undefined syms to handle for non-pic too.
321 (elf32_hppa_relocate_section): Simplify test for non-pic dyn relocs.
322 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Set non_got_ref
323 to keep dyn_relocs, clear to discard. Comment.
324 (allocate_dynrelocs): Always clear non_got_ref when clearing
325 dyn_relocs in non-pic case. Invert non_got_ref test. Also test
326 dynamic_adjusted and ELF_COMMON_DEF_P. Move code deleting
327 dyn_relocs on undefined syms to handle for non-pic too.
328 (ppc_elf_relocate_section): Simplify test for non-pic dyn relocs.
329 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Discard
330 dyn_relocs here. Don't bother setting non_got_ref. Comment.
331 (allocate_dynrelocs): Delete special handling of non-pic ELFv2
332 ifuncs. Move code deleting dyn_relocs on undefined symbols to
333 handle for non-pic too. Don't test non_got_ref. Do test
334 dynamic_adjusted and ELF_COMMON_DEF_P.
336 2017-11-08 Djordje Todorovic <djordje.todorovic@rt-rk.com>
338 * elf32-mips.c (elf32_mips_grok_psinfo): Extract core->pid.
339 * elf64-mips.c (elf64_mips_grok_psinfo): Likewise.
340 * elfn32-mips.c (elf32_mips_grok_psinfo): Likewise.
342 2017-11-08 Djordje Todorovic <djordje.todorovic@rt-rk.com>
344 * elf32-mips.c (elf32_mips_write_core_note): New function.
345 (elf_backend_write_core_note): New macro.
346 * elf64-mips.c (elf64_mips_write_core_note): New function.
347 (elf_backend_write_core_note): New macro.
348 * elfn32-mips.c (elf32_mips_write_core_note): New function.
349 (elf_backend_write_core_note): New macro.
351 2017-11-07 Alan Modra <amodra@gmail.com>
353 * elf64-ppc.c (ppc64_elf_build_stubs): Correct pluralization in
356 2017-11-07 Alan Modra <amodra@gmail.com>
358 * sysdep.h: Formatting, comment fixes.
359 (gettext, ngettext): Redefine when ENABLE_NLS.
360 (ngettext, dngettext, dcngettext): Define when !ENABLE_NLS.
361 (_): Define using gettext.
362 (textdomain, bindtextdomain): Use safer "do nothing".
363 * hosts/alphavms.h (textdomain, bindtextdomain): Likewise.
364 (ngettext, dngettext, dcngettext): Define when !ENABLE_NLS.
366 2017-11-05 Alan Modra <amodra@gmail.com>
369 * bfd.c (_bfd_doprnt_scan): Check args index before storing, not
372 2017-11-05 Alan Modra <amodra@gmail.com>
375 * bfd.c (union _bfd_doprnt_args): New.
376 (PRINT_TYPE): Add FIELD arg. Take value from args.
377 (_bfd_doprnt): Replace ap parameter with args. Adjust all
378 PRINT_TYPE invocations and reading of format args to suit.
379 Move "%%" handling out of switch handling args. Support
380 positional parameters.
381 (_bfd_doprnt_scan): New function.
382 (error_handler_internal): Call _bfd_doprnt_scan and read args.
384 2017-11-04 Alan Modra <amodra@gmail.com>
386 * elf32-ppc.c (got_entries_needed, got_relocs_needed): New functions.
387 (allocate_dynrelocs, ppc_elf_size_dynamic_sections): Use them here.
388 (ppc_elf_relocate_section): Don't output a dynamic relocation
389 for IE GOT entries in an executable.
390 * elf64-ppc.c (allocate_got): Trim unnecessary TPREL relocs.
391 (ppc64_elf_size_dynamic_sections): Likewise.
392 (ppc64_elf_relocate_section): Likewise.
394 2017-11-04 Alan Modra <amodra@gmail.com>
396 * elf32-ppc.c (readonly_dynrelocs): Delete info param. Update all
397 callers. Don't bother with SEC_ALLOC test. Return section pointer.
399 (maybe_set_textrel): ..here.
400 * elf64-ppc.c (readonly_dynrelocs): Return section pointer.
401 (maybe_set_textrel): Call minfo to print textrel warning to map file.
403 2017-11-04 Alan Modra <amodra@gmail.com>
405 * elf32-hppa.c (enum _tls_type): Move.
406 (struct elf32_hppa_link_hash_entry): Make tls_type a bitfield.
407 (elf32_hppa_check_relocs): Set DF_STATIC_TLS only for shared libraries.
408 Tidy tls_type handling. Set symbol tls_type for GOT_TLS_LDM too.
409 (got_entries_needed, got_relocs_needed): New functions.
410 (allocate_dynrelocs): Use them.
411 (elf32_hppa_size_dynamic_sections): Likewise.
412 (elf32_hppa_relocate_section): Delete bogus FIXME. Formatting.
413 Correct code emitting relocs on GD/IE got entries. Report an
414 error when a symbol has both normal and TLS GOT relocs.
416 2017-11-04 Alan Modra <amodra@gmail.com>
419 * elf32-hppa.c (elf32_hppa_check_relocs): Don't create dyn_relocs
420 for plabels when non-pic.
421 (maybe_set_textrel): New function.
422 (readonly_dynrelocs): Move and rewrite.
423 (elf32_hppa_adjust_dynamic_symbol): Use it. Don't create copy
424 relocs when def_regular or -z nocopyreloc. Handle non_got_ref
425 for functions. Expand non_got_ref comments.
426 (elf32_hppa_size_dynamic_sections): Use maybe_set_textrel.
428 2017-11-03 H.J. Lu <hongjiu.lu@intel.com>
430 * elf32-i386.c (elf_i386_check_relocs): Set plt.refcount to 1.
431 Don't use func_pointer_refcount. Don't set plt.refcount nor
432 non_got_ref for function pointer reference.
433 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
434 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Don't use
435 func_pointer_refcount.
436 (_bfd_x86_elf_copy_indirect_symbol): Don't copy
437 func_pointer_refcount.
438 (_bfd_x86_elf_hide_symbol): Don't use func_pointer_refcount.
439 * elfxx-x86.h (GENERATE_DYNAMIC_RELOCATION_P): Likewise.
440 (elf_x86_link_hash_entry): Remove func_pointer_refcount.
442 2017-11-03 Mingi Cho <mgcho.minic@gmail.com>
443 Nick Clifton <nickc@redhat.com>
446 * coffgen.c (_bfd_coff_get_external_symbols): Check for an
447 overlarge raw syment count.
448 (coff_get_normalized_symtab): Likewise.
450 2017-11-01 James Bowman <james.bowman@ftdichip.com>
452 * archures.c: Add bfd_mach_ft32b.
453 * cpu-ft32.c: Add arch_info_struct.
454 * elf32-ft32.c: Add R_FT32_RELAX, SC0, SC1,
456 (ft32_elf_relocate_section): Add clauses for R_FT32_SC0, SC1,
458 (ft32_reloc_shortable, elf32_ft32_is_diff_reloc)
459 (elf32_ft32_adjust_diff_reloc_value)
460 (elf32_ft32_adjust_reloc_if_spans_insn)
461 (elf32_ft32_relax_delete_bytes, elf32_ft32_relax_is_branch_target)
462 (ft32_elf_relax_section): New function.
463 * reloc.c: Add BFD_RELOC_FT32_RELAX, SC0, SC1, DIFF32.
464 * bfd-in2.h: Regenerate.
465 * libbfd.h: Regenerate.
467 2017-11-01 Nick Clifton <nickc@redhat.com>
470 * coffcode.h (coff_slurp_line_table): Check for an excessively
471 large line number count.
473 2017-11-01 Nick Clifton <nickc@redhat.com>
476 * peicode.h (pe_bfd_read_buildid): Revise check for invalid size
477 and offset in light of further possible bogus values.
479 2017-11-01 Alan Modra <amodra@gmail.com>
482 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't create a plt
483 entry when just a dynamic reloc can serve. Ensure no dynamic
484 relocations when UNDEFWEAK_NO_DYNAMIC_RELOC by setting non_got_ref.
485 Expand and move the non_got_ref comment.
486 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
488 2017-11-01 Nick Clifton <nickc@redhat.com>
491 * coffgen.c (_bfd_coff_free_symbols): Fail if called on a non-COFF
493 * cofflink.c (coff_link_check_archive_element): Skip non-COFF
494 members of an archive.
496 2017-10-31 Nick Clifton <nickc@redhat.com>
499 * peicode.h (pe_bfd_read_buildid): Check for invalid size and data
502 2017-10-30 Alan Modra <amodra@gmail.com>
504 * elf32-frv.c (ELF_TARGET_ID): Don't define for generic
507 * elflink.c (elf_gc_sweep): Test elf_object_id in addition to
509 (bfd_elf_gc_sections): Likewise.
511 2017-10-30 Alan Modra <amodra@gmail.com>
514 * elf32-hppa.c (elf32_hppa_check_relocs): Move SEC_ALLOC test to
515 ensure non_got_ref is not set due to debug references.
516 (elf32_hppa_adjust_dynamic_symbol): Tidy plabel handling. Use
517 SYMBOL_CALLS_LOCAL and UNDEFWEAK_NO_DYNAMIC_RELOC when determining
518 need for a plt entry.
519 (allocate_dynrelocs): Similarly for got entries. Tidy code discarding
520 dynamic relocs when pic. Remove bogus code attempting to handle
522 (elf32_hppa_relocate_section): Similarly. Delete resolved_to_zero
524 (elf32_hppa_finish_dynamic_symbol): Use UNDEFWEAK_NO_DYNAMIC_RELOC
525 and SYMBOL_REFERENCES_LOCAL in GOT handling.
527 2017-10-28 Alan Modra <amodra@gmail.com>
530 * elflink.c (_bfd_elf_merge_symbol): Remove relocs_compatible check.
531 * elf32-hppa.c (elf_backend_relocs_compatible): Define.
532 * elf32-ppc.c (elf_backend_relocs_compatible): Define.
533 * elf64-ppc.c (elf_backend_relocs_compatible): Define.
535 2017-10-25 Alan Modra <amodra@gmail.com>
537 * archive.c (_bfd_compute_and_write_armap): Match "__gnu_lto_slim"
538 optionally prefixed with "_".
539 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
541 2017-10-24 Andrew Waterman <andrew@sifive.com>
543 * elfnn-riscv.c (_bfd_riscv_relax_lui): Don't relax to c.lui
546 2017-10-24 Renlin Li <renlin.li@arm.com>
549 * elflink.c (_bfd_elf_merge_symbol): Handle multiple definition case.
551 2017-10-23 Nick Clifton <nickc@redhat.com>
554 * elflink.c (elf_link_output_extsym): Keep global undefined
555 symbols if they have been marked as needed.
557 2017-10-23 Maciej W. Rozycki <macro@imgtec.com>
559 * elfn32-mips.c (mips_elf_n32_mkobject): New prototype and
561 (bfd_elf32_mkobject): Use `mips_elf_n32_mkobject' rather than
562 `_bfd_mips_elf_mkobject'.
564 2017-10-22 Hans-Peter Nilsson <hp@axis.com>
567 * config.bfd (cris-*-* | crisv32-*-*): Require a 64-bit BFD.
569 2017-10-19 Palmer Dabbelt <palmer@dabbelt.com>
571 * elfnn-riscv.c (riscv_pcgp_hi_reloc): New structure.
572 (riscv_pcgp_lo_reloc): Likewise.
573 (riscv_pcgp_relocs): Likewise.
574 (riscv_init_pcgp_relocs): New function.
575 (riscv_free_pcgp_relocs): Likewise.
576 (riscv_record_pcgp_hi_reloc): Likewise.
577 (riscv_record_pcgp_lo_reloc): Likewise.
578 (riscv_delete_pcgp_hi_reloc): Likewise.
579 (riscv_use_pcgp_hi_reloc): Likewise.
580 (riscv_record_pcgp_lo_reloc): Likewise.
581 (riscv_find_pcgp_lo_reloc): Likewise.
582 (riscv_delete_pcgp_lo_reloc): Likewise.
583 (_bfd_riscv_relax_pc): Likewise.
584 (_bfd_riscv_relax_section): Handle R_RISCV_PCREL_* relocations
585 via the new functions above.
587 2017-10-19 Palmer Dabbelt <palmer@dabbelt.com>
589 * elfnn-riscv.c (R_RISCV_DELETE): New define.
590 (_bfd_riscv_relax_delete): New function.
591 (perform_relocation): Handle R_RISCV_DELETE.
592 (_bfd_riscv_relax_section): Likewise.
594 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
597 * elfxx-tilegx.c (tilegx_elf_tls_transition): Replace
598 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
599 bfd_link_executable for TLS check.
600 (tilegx_elf_check_relocs): Likewise.
601 (allocate_dynrelocs): Likewise.
602 (tilegx_elf_relocate_section): Likewise.
604 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
607 * elf32-tilepro.c (tilepro_elf_tls_transition): Replace
608 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
609 bfd_link_executable for TLS check.
610 (tilepro_elf_check_relocs): Likewise.
611 (allocate_dynrelocs): Likewise.
612 (tilepro_elf_relocate_section): Likewise.
614 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
617 * elfxx-sparc.c (sparc_elf_tls_transition): Replace
618 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
619 bfd_link_executable for TLS check.
620 (_bfd_sparc_elf_check_relocs): Likewise.
621 (allocate_dynrelocs): Likewise.
622 (_bfd_sparc_elf_relocate_section): Likewise.
624 2017-10-18 H.J. Lu <hongjiu.lu@intel.com>
626 * elf32-tilepro.c (tilepro_elf_gc_mark_hook): Call
627 _bfd_generic_link_add_one_symbol to mark __tls_get_addr.
628 * elfxx-tilegx.c (tilegx_elf_gc_mark_hook): Likewise.
630 2017-10-17 H.J. Lu <hongjiu.lu@intel.com>
632 * elf32-microblaze.c (microblaze_elf_check_relocs): Check for
633 indirect and warning symbols.
635 2017-10-17 Alan Modra <amodra@gmail.com>
638 * elf-properties.c (_bfd_elf_parse_gnu_properties): Compare datasz
639 against size left rather than comparing pointers. Reorganise loop.
641 2017-10-17 Alan Modra <amodra@gmail.com>
644 * aoutx.h (aout_get_external_symbols): Handle stringsize of zero,
645 and error for any other size that doesn't cover the header word.
647 2017-10-16 H.J. Lu <hongjiu.lu@intel.com>
649 * elf-bfd.h (elf_backend_data): Remove gc_sweep_hook.
650 * elf32-arm.c (elf32_arm_gc_sweep_hook): Removed.
651 (elf_backend_gc_sweep_hook): Likewise.
652 * elf32-bfin.c (bfin_gc_sweep_hook): Likewise.
653 (bfinfdpic_gc_sweep_hook): Likewise.
654 (elf_backend_gc_sweep_hook): Likewise.
655 * elf32-cr16.c (elf32_cr16_gc_sweep_hook): Likewise.
656 (elf_backend_gc_sweep_hook): Likewise.
657 * elf32-cris.c (cris_elf_gc_sweep_hook): Likewise.
658 (elf_backend_gc_sweep_hook): Likewise.
659 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Likewise.
660 (elf_backend_gc_sweep_hook): Likewise.
661 * elf32-lm32.c (lm32_elf_gc_sweep_hook): Likewise.
662 (elf_backend_gc_sweep_hook): Likewise.
663 * elf32-m32r.c (m32r_elf_gc_sweep_hook): Likewise.
664 (elf_backend_gc_sweep_hook): Likewise.
665 * elf32-m68k.c (elf_m68k_got_entry): Remove elf_m68k_gc_sweep_hook
667 (elf_m68k_remove_got_entry_type): Removed.
668 (elf_m68k_find_got_entry_ptr): Likewise.
669 (elf_m68k_remove_got_entry): Likewise.
670 (elf_m68k_gc_sweep_hook): Likewise.
671 (elf_backend_gc_sweep_hook): Likewise.
672 * elf32-mcore.c (mcore_elf_gc_sweep_hook): Likewise.
673 (elf_backend_gc_sweep_hook): Likewise.
674 * elf32-metag.c (elf_metag_gc_sweep_hook): Likewise.
675 (elf_backend_gc_sweep_hook): Likewise.
676 * elf32-microblaze.c (elf_backend_gc_sweep_hook): Likewise.
677 (elf_backend_gc_sweep_hook): Likewise.
678 * elf32-mips.c (elf_backend_gc_sweep_hook): Likewise.
679 (elf_backend_gc_sweep_hook): Likewise.
680 * elf32-nds32.c (nds32_elf_gc_sweep_hook): Likewise.
681 (elf_backend_gc_sweep_hook): Likewise.
682 * elf32-nios2.c (nios2_elf32_gc_sweep_hook): Likewise.
683 (elf_backend_gc_sweep_hook): Likewise.
684 * elf32-or1k.c (or1k_elf_gc_sweep_hook): Likewise.
685 (elf_backend_gc_sweep_hook): Likewise.
686 * elf32-ppc.c (ppc_elf_gc_sweep_hook): Likewise.
687 (elf_backend_gc_sweep_hook): Likewise.
688 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
689 (elf_backend_gc_sweep_hook): Likewise.
690 * elf32-sparc.c (elf_backend_gc_sweep_hook): Likewise.
691 * elf32-tic6x.c (elf32_tic6x_gc_sweep_hook): Likewise.
692 (elf_backend_gc_sweep_hook): Likewise.
693 * elf32-tilegx.c (elf_backend_gc_sweep_hook): Likewise.
694 * elf32-tilepro.c (tilepro_elf_gc_sweep_hook): Likewise.
695 (elf_backend_gc_sweep_hook): Likewise.
696 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
697 (elf_backend_gc_sweep_hook): Likewise.
698 * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Likewise.
699 (elf_backend_gc_sweep_hook): Likewise.
700 * elf64-alpha.c (elf64_alpha_gc_sweep_hook): Likewise.
701 (elf_backend_gc_sweep_hook): Likewise.
702 * elf64-mips.c (elf_backend_gc_sweep_hook): Likewise.
703 * elf64-mmix.c (mmix_elf_gc_sweep_hook): Likewise.
704 (elf_backend_gc_sweep_hook): Likewise.
705 * elf64-ppc.c (elf_backend_gc_sweep_hook): Likewise.
706 (ppc64_elf_gc_sweep_hook): Likewise.
707 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
708 (elf_backend_gc_sweep_hook): Likewise.
709 * elf64-sparc.c (elf_backend_gc_sweep_hook): Likewise.
710 * elf64-tilegx.c (elf_backend_gc_sweep_hook): Likewise.
711 * elflink.c (elf_link_add_object_symbols): Don't call
712 _bfd_elf_link_check_relocs here.
713 (gc_sweep_hook_fn): Removed.
714 (elf_gc_sweep): Remove gc_sweep_hook.
715 * elfnn-aarch64.c (elfNN_aarch64_gc_sweep_hook): Removed.
716 (elf_backend_gc_sweep_hook): Likewise.
717 * elfnn-riscv.c (riscv_elf_gc_sweep_hook): Likewise.
718 (elf_backend_gc_sweep_hook): Likewise.
719 * elfxx-mips.c (_bfd_mips_elf_gc_sweep_hook): Likewise.
720 * elfxx-mips.h (_bfd_mips_elf_gc_sweep_hook): Likewise.
721 (elf_backend_gc_sweep_hook): Likewise.
722 * elfxx-sparc.c (_bfd_sparc_elf_gc_sweep_hook): Likewise.
723 * elfxx-sparc.h (_bfd_sparc_elf_gc_sweep_hook): Likewise.
724 * elfxx-target.h (elf_backend_gc_sweep_hook): Likewise.
725 (elfNN_bed): Remove elf_backend_gc_sweep_hook.
726 * elfxx-tilegx.c (tilegx_elf_gc_sweep_hook): Removed.
727 * elfxx-tilegx.h (tilegx_elf_gc_sweep_hook): Likewise.
729 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
731 * elf32-i386.c (elf_i386_backend_data): Removed.
732 (get_elf_i386_backend_data): Likewise.
733 (elf_i386_arch_bed): Replace elf_i386_backend_data with
734 elf_x86_backend_data.
735 (elf_i386_get_synthetic_symtab): Likewise.
736 (elf_i386_nacl_arch_bed): Likewise.
737 (elf_i386_vxworks_arch_bed): Likewise.
738 (elf_i386_relocate_section): Check target_os instead of
740 (elf_i386_finish_dynamic_symbol): Likewise.
741 (elf_i386_finish_dynamic_sections): Use htab->plt0_pad_byte.
742 Check target_os instead of is_vxworks.
743 (elf_i386_link_setup_gnu_properties): Remove normal_target and
744 is_vxworks. Initialize plt0_pad_byte.
745 * elf64-x86-64.c (elf_x86_64_backend_data); Removed.
746 (get_elf_x86_64_arch_data): Likewise.
747 (get_elf_x86_64_backend_data): Likewise.
748 (elf_x86_64_arch_bed): Replace elf_x86_64_backend_data with
749 elf_x86_backend_data.
750 (elf_x86_64_get_synthetic_symtab): Likewise.
751 (elf_x86_64_nacl_arch_bed): Likewise.
752 (elf_x86_64_link_setup_gnu_properties): Remove is_vxworks and
753 normal_target. Initialize plt0_pad_byte.
754 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Check target_os
755 instead of is_vxworks.
756 (_bfd_x86_elf_size_dynamic_sections): Likewise.
757 (_bfd_x86_elf_finish_dynamic_sections): Likewise.
758 (_bfd_x86_elf_adjust_dynamic_symbol): Likewise.
759 (_bfd_x86_elf_link_hash_table_create): Initialize target_os.
760 (_bfd_x86_elf_link_setup_gnu_properties): Remove is_vxworks.
761 Update normal_target. Set up plt0_pad_byte. Check target_os
762 instead of is_vxworks.
763 * elfxx-x86.h (elf_x86_target_os): New.
764 (elf_x86_backend_data): Likewise.
765 (get_elf_x86_backend_data): Likewise.
766 (elf_x86_link_hash_table): Remove is_vxworks. Add plt0_pad_byte
768 (elf_x86_init_table): Remove normal_target and is_vxworks. Add
771 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
773 * elf32-i386.c (elf_i386_finish_dynamic_sections): Call
774 _bfd_x86_elf_finish_dynamic_sections.
775 * elf64-x86-64.c (elf_x86_64_finish_dynamic_sections): Likewise.
776 * elfxx-x86.c (_bfd_x86_elf_finish_dynamic_sections): New
778 * elfxx-x86.h (_bfd_x86_elf_finish_dynamic_sections): New
781 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
784 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
785 hide symbol which was forced to be dynamic.
787 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
790 * elf32-cris.c (cris_elf_relocate_section): Don't generate
791 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
792 (cris_elf_check_relocs): Don't allocate dynamic relocation
793 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
795 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
798 * elf32-sh.c (allocate_dynrelocs): Discard dynamic relocations
799 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
800 (sh_elf_relocate_section): Don't generate dynamic relocation if
801 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
803 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
806 * elf32-s390.c (allocate_dynrelocs): Discard dynamic
807 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
808 (elf_s390_relocate_section): Don't generate dynamic relocation
809 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
810 * elf64-s390.c (allocate_dynrelocs): Discard dynamic
811 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
812 (elf_s390_relocate_section): Don't generate dynamic relocation
813 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
815 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
818 * elf32-nios2.c (nios2_elf32_relocate_section): Don't generate
819 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
820 (allocate_dynrelocs): Discard dynamic relocations if
821 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
823 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
826 * elf32-microblaze.c (microblaze_elf_relocate_section): Don't
827 generate dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is
829 (allocate_dynrelocs): Discard dynamic relocations if
830 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
832 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
835 * elf32-m68k.c (elf_m68k_check_relocs): Don't allocate dynamic
836 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
837 (elf_m68k_adjust_dynamic_symbol): Don't make symbol dynamic if
838 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
839 (elf_m68k_relocate_section): Don't generate dynamic relocation
840 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
842 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
845 * elf32-hppa.c (ensure_undef_dynamic): Don't make undefined
846 symbol dynamic if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
847 (allocate_dynrelocs): Discard dynamic relocations if
848 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
849 (elf32_hppa_relocate_section): Don't generate dynamic
850 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
852 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
855 * elfnn-ia64.c (elfNN_ia64_check_relocs): Don't allocate
856 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
857 (allocate_fptr): Don't allocate function pointer if
858 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
859 (allocate_dynrel_entries): Don't allocate dynamic relocation
860 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
861 (set_got_entry): Don't set GOT entry if
862 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
863 (set_pltoff_entry): Don't set PLTOFF entry if
864 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
865 (elfNN_ia64_relocate_section): Don't install dynamic relocation
866 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
868 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
871 * elfxx-mips.c (mips_elf_calculate_relocation): Don't generate
872 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
873 (allocate_dynrelocs): Don't allocate dynamic relocations if
874 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
876 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
879 * elf32-arm.c (elf32_arm_final_link_relocate): Don't generate
880 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
881 (allocate_dynrelocs_for_symbol): Discard dynamic relocations
882 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
884 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
887 * elf32-tilepro.c (allocate_dynrelocs): Discard dynamic
888 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
889 (tilepro_elf_relocate_section): Don't generate dynamic
890 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
891 * elfxx-tilegx.c (allocate_dynrelocs): Discard dynamic
892 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
893 (tilegx_elf_relocate_section): Don't generate dynamic
894 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
896 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
899 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Don't
900 generate dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is
902 (elfNN_aarch64_allocate_dynrelocs): Discard dynamic relocations
903 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
905 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
907 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Moved to ...
908 * elf-bfd.h (UNDEFWEAK_NO_DYNAMIC_RELOC): Here.
909 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Removed.
911 2017-10-12 James Bowman <james.bowman@ftdichip.com>
913 * bfd-in2.h: Regenerate.
914 * libbfd.h: Regenerate.
915 * elf32-ft32.c: Add HOWTO R_FT32_15.
916 * reloc.c: Add BFD_RELOC_FT32_15.
918 2017-10-12 Nick Clifton <nickc@redhat.com>
920 * reloc.c (enum bfd_reloc_status): Start values at 2.
921 * bfd-in2.h: Regenerate.
922 * elfnn-aarch64.c (aarch64_relocate): Invert sense of function, so
923 that a TRUE return indicates success. Compare the result of
924 calling _bfd_aarch64_elf_put_addend against bfd_reloc_ok.
925 (build_one_stub): Change sense of tests against aarch64_relocate
927 (elfNN_aarch64_tls_relax): Return bfd_reloc_notsupported, rather
928 than FALSE, when an error is detected.
929 (elfNN_aarch64_final_link_relocate): Likewise.
931 2017-10-12 H.J. Lu <hongjiu.lu@intel.com>
933 * elf32-i386.c (elf_backend_hide_symbol): New.
934 * elf64-x86-64.c (elf_backend_hide_symbol): Likewise.
935 * elfxx-x86.c (_bfd_x86_elf_hide_symbol): Likewise.
936 * elfxx-x86.h (_bfd_x86_elf_hide_symbol): Likewise.
938 2017-10-12 Alan Modra <amodra@gmail.com>
940 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Call
941 elf_backend_hide_symbol, not _bfd_elf_link_hash_hide_symbol.
942 (bfd_elf_define_start_stop): Likewise.
944 2017-10-12 Alan Modra <amodra@gmail.com>
946 * elf32-nds32.c (nds32_elf_size_dynamic_sections): Set .interp
947 when executable rather than non-PIC.
948 * elf32-score.c (s3_bfd_score_elf_size_dynamic_sections): Likewise.
949 * elf32-score7.c (s7_bfd_score_elf_size_dynamic_sections): Likewise.
951 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
953 * elf-bfd.h (elf_backend_data): Add `linux_prpsinfo64_ugid16'
955 * elf-linux-core.h (elf_external_linux_prpsinfo64): Rename to...
956 (elf_external_linux_prpsinfo64_ugid32): ... this.
957 (swap_linux_prpsinfo32_out): Rename to...
958 (swap_linux_prpsinfo32_ugid32_out): ... this.
959 (elf_external_linux_prpsinfo64_ugid16): New structure.
960 (swap_linux_prpsinfo64_ugid16_out): New function.
961 * elfxx-target.h [!elf_backend_linux_prpsinfo64_ugid16]
962 (elf_backend_linux_prpsinfo64_ugid16): Define.
963 (elfNN_bed): Initialize `linux_prpsinfo64_ugid16' member.
964 * elf.c (elfcore_write_linux_prpsinfo64): Handle both variants
965 of the 64-bit Linux core PRPSINFO note.
966 * elf64-sh64.c (elf_backend_linux_prpsinfo64_ugid16): Define.
968 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
970 * elf-bfd.h (elf_backend_data): Add `linux_prpsinfo32_ugid16'
972 (elfcore_write_ppc_linux_prpsinfo32): Remove prototype.
973 * elf32-ppc.c (elfcore_write_ppc_linux_prpsinfo32): Remove.
974 (elf_external_ppc_linux_prpsinfo32)
975 (swap_ppc_linux_prpsinfo32_out): Move to...
976 * elf-linux-core.h (elf_external_linux_prpsinfo32_ugid32)
977 (swap_linux_prpsinfo32_ugid32_out): ... these.
978 (elf_external_linux_prpsinfo32): Rename to...
979 (elf_external_linux_prpsinfo32_ugid16): ... this.
980 (swap_linux_prpsinfo32_out): Rename to...
981 (swap_linux_prpsinfo32_ugid16_out): ... this.
982 * elfxx-target.h [!elf_backend_linux_prpsinfo32_ugid16]
983 (elf_backend_linux_prpsinfo32_ugid16): Define.
984 (elfNN_bed): Initialize `linux_prpsinfo32_ugid16' member.
985 * elf.c (elfcore_write_linux_prpsinfo32): Handle both variants
986 of the 32-bit Linux core PRPSINFO note.
987 * elf32-am33lin.c (elf_backend_linux_prpsinfo32_ugid16): Define.
988 * elf32-arm.c (elf_backend_linux_prpsinfo32_ugid16): Define.
989 * elf32-cris.c (elf_backend_linux_prpsinfo32_ugid16): Define.
990 * elf32-frv.c (elf_backend_linux_prpsinfo32_ugid16): Define.
991 * elf32-i386.c (elf_backend_linux_prpsinfo32_ugid16): Define.
992 * elf32-m32r.c (elf_backend_linux_prpsinfo32_ugid16): Define.
993 * elf32-m68k.c (elf_backend_linux_prpsinfo32_ugid16): Define.
994 * elf32-s390.c (elf_backend_linux_prpsinfo32_ugid16): Define.
995 * elf32-sh.c (elf_backend_linux_prpsinfo32_ugid16): Define.
996 * elf32-sparc.c (elf_backend_linux_prpsinfo32_ugid16): Define.
998 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
1000 * elf-linux-core.h (elf_external_linux_prpsinfo64): Move the
1001 `gap' member ahead of `pr_flag'.
1003 2017-10-11 Pedro Alves <palves@redhat.com>
1005 * bfd.c (_doprnt): Rename to ...
1006 (_bfd_doprnt): ... this.
1007 (error_handler_internal): Adjust.
1009 2017-10-10 H.J. Lu <hongjiu.lu@intel.com>
1011 * elf32-i386.c (elf_i386_check_relocs): Set GOT refcount to 1
1012 instead of incrementing it.
1013 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1015 2017-10-10 Renlin Li <renlin.li@arm.com>
1018 * elf32-arm.c (allocate_dynrelocs_for_symbol): Only make undefined weak
1019 symbols into dynamic.
1021 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
1024 * elfnn-riscv.c (riscv_elf_link_hash_table): Add max_alignment.
1025 (riscv_elf_link_hash_table_create): Initialize max_alignment to
1027 (_bfd_riscv_relax_section): Cache the max alignment of output
1028 sections if possible.
1030 2017-10-10 Alan Modra <amodra@gmail.com>
1032 * elf64-ppc.c (ppc64_elf_before_check_relocs): Set sec_type for
1033 .opd whenever .opd is present and non-zero size. Move code
1034 setting abiversion to/from output file earlier. Only set
1035 u.opd.func_sec when --gc-sections. Read relocs and set up
1036 u.opd.func_sec values here..
1037 (ppc64_elf_check_relocs): ..rather than here. Simplify opd
1039 (ppc64_elf_edit_opd): Don't set sec_type for .opd here.
1041 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
1043 * elf-m10300.c (mn10300_elf_check_relocs): Don't free cached
1046 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
1048 * elf32-bfin.c (bfin_size_dynamic_sections): Don't create the
1049 .interp section with "ld --no-dynamic-linker".
1051 2017-10-09 Alan Modra <amodra@gmail.com>
1054 * dwarf2.c (_bfd_dwarf2_cleanup_debug_info): Free
1055 funcinfo_hash_table and varinfo_hash_table.
1057 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
1059 * elf32-sh.c (readonly_dynrelocs): Dump dynamic relocation
1060 in read-only section with minfo.
1061 (sh_elf_size_dynamic_sections): Likewise.
1063 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
1065 * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Remove
1068 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
1070 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_sections): Set
1071 this_hdr.sh_entsize only if section size > 0.
1073 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
1075 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Reformat.
1077 2017-10-07 H.J. Lu <hongjiu.lu@intel.com>
1079 * elfxx-sparc.c (readonly_dynrelocs): Dump dynamic relocation
1080 in read-only section with minfo.
1081 (_bfd_sparc_elf_size_dynamic_sections): Likewise.
1083 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1085 * elfxx-x86.h (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Update
1088 2017-10-06 John Baldwin <jhb@FreeBSD.org>
1090 * elf-bfd.h (struct elf_backend_data): Add
1091 `elf_backend_grok_freebsd_prstatus'.
1092 * elf.c (elfcore_grok_freebsd_note): Call
1093 `elf_backend_grok_freebsd_prstatus' to handle NT_PRSTATUS if
1095 * elfn32-mips.c (elf_n32_mips_grok_freebsd_prstatus): New
1097 (elf_backend_grok_freebsd_prstatus): Define.
1098 * elfxx-target.h (elf_backend_grok_freebsd_prstatus): Define.
1099 (elfNN_bed): Initialize `elf_backend_grok_freebsd_prstatus'.
1101 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1103 * elf32-i386.c (elf_i386_check_relocs): Replace has_got_reloc
1104 and has_non_got_reloc with zero_undefweak.
1105 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1106 * elfxx-x86.c (_bfd_x86_elf_link_hash_newfunc): Initialize
1107 zero_undefweak to 1.
1108 (_bfd_x86_elf_copy_indirect_symbol): Replace has_got_reloc and
1109 has_non_got_reloc with zero_undefweak.
1110 * elfxx-x86.h (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace
1111 has_got_reloc and has_non_got_reloc with zero_undefweak.
1112 (elf_x86_link_hash_entry): Likewise.
1114 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1116 * elfxx-x86.h (COPY_INPUT_RELOC_P): Add "do/while(0);".
1117 (VERIFY_COPY_RELOC): Likewise.
1119 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1121 * elfxx-x86.h (VERIFY_COPY_RELOC): New.
1122 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Use it.
1123 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
1125 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1127 * elfxx-x86.h (VERIFY_PLT_ENTRY): 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 (COPY_INPUT_RELOC_P): New.
1134 * elf32-i386.c (elf_i386_relocate_section): Use it.
1135 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1137 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1139 * elf32-i386.c (X86_SIZE_TYPE_P): New.
1140 (elf_i386_relocate_section): Use GENERATE_DYNAMIC_RELOCATION_P.
1141 * elf64-x86-64.c (X86_SIZE_TYPE_P): New.
1142 (elf_x86_64_relocate_section): Use GENERATE_DYNAMIC_RELOCATION_P.
1143 * elfxx-x86.h (GENERATE_DYNAMIC_RELOCATION_P): New.
1145 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1147 * elfxx-x86.h (POINTER_LOCAL_IFUNC_P): New.
1148 (PLT_LOCAL_IFUNC_P): Likewise.
1149 * elf32-i386.c (elf_i386_relocate_section): Use them.
1150 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1152 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1154 * elfxx-x86.h (GENERATE_RELATIVE_RELOC_P): New.
1155 * elf32-i386.c (elf_i386_relocate_section): Use it.
1156 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1158 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1160 * elfxx-x86.h (RESOLVED_LOCALLY_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 * elf32-i386.c (X86_PCREL_TYPE_P): New.
1167 (elf_i386_check_relocs): Use NEED_DYNAMIC_RELOCATION_P.
1168 * elf64-x86-64.c (IS_X86_64_PCREL_TYPE): Renamed to ...
1169 (X86_PCREL_TYPE_P): This.
1170 (elf_x86_64_check_relocs): Use NEED_DYNAMIC_RELOCATION_P.
1171 Replace IS_X86_64_PCREL_TYPE with X86_PCREL_TYPE_P.
1172 (elf_x86_64_relocate_section): Replace IS_X86_64_PCREL_TYPE with
1174 * elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): New.
1176 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1178 * elfxx-x86.h (TLS_TRANSITION_IE_TO_LE_P): New.
1179 * elf32-i386.c (elf_i386_tls_transition): Use it.
1180 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
1182 2017-10-05 H.J. Lu <hongjiu.lu@intel.com>
1184 * elf32-ppc.c (readonly_dynrelocs): Add a link_info argument.
1185 Dump dynamic relocation in read-only section with minfo if
1187 (ppc_elf_adjust_dynamic_symbol): Pass NULL to readonly_dynrelocs.
1188 (maybe_set_textrel): Likewise.
1189 (ppc_elf_size_dynamic_sections): Dump dynamic relocation in
1190 read-only section with minfo.
1192 2017-10-05 John Baldwin <jhb@FreeBSD.org>
1194 * elf.c (elfcore_grok_freebsd_note): Handle NT_ARM_VFP.
1196 2017-10-05 H.J. Lu <hongjiu.lu@intel.com>
1198 * elf32-tilepro.c (readonly_dynrelocs): Dump dynamic relocation
1199 in read-only section with minfo.
1200 (tilepro_elf_size_dynamic_sections): Likewise.
1201 * elfxx-tilegx.c (readonly_dynrelocs): Likewise.
1202 (tilegx_elf_size_dynamic_sections): Likewise.
1204 2017-10-05 Pedro Alves <palves@redhat.com>
1207 * bfd.c (bfd_set_error): Revert 2017-10-04 change. Remove
1208 ellipsis parameter. Split out bfd_error_on_input code to..
1209 (bfd_set_input_error): .. New function.
1210 * archive.c (_bfd_write_archive_contents): Use bfd_set_input_error.
1211 * vms-lib.c (_bfd_vms_lib_write_archive_contents): Likewise.
1212 * bfd-in2.h: Regenerate.
1214 2017-10-05 Alan Modra <amodra@gmail.com>
1216 * elflink.c (elf_link_input_bfd): Correct ctor/dtor in init_array/
1217 fini_array error value.
1219 2017-10-05 Alan Modra <amodra@gmail.com>
1222 * elf.c (_bfd_elf_setup_sections): Don't trim reloc sections from
1224 (_bfd_elf_init_reloc_shdr): Pass sec_hdr, use it to copy SHF_GROUP
1226 (elf_fake_sections): Adjust calls. Exit immediately on failure.
1227 (bfd_elf_set_group_contents): Add associated reloc section indices
1230 2017-10-04 Alan Modra <amodra@gmail.com>
1232 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't sort or
1233 classify symbols for ELFv2.
1235 2017-10-04 Pavel I. Kryukov <kryukov@frtk.ru>
1238 * bfd.c (bfd_set_error): Avoid UB on passing arg to va_start that
1239 undergoes default promotion.
1240 * bfd-in2.h: Regenerate.
1242 2017-10-02 Alan Modra <amodra@gmail.com>
1244 * elf32-ppc.c (ppc_elf_relocate_section): Fix comment typo.
1245 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1247 2017-10-01 Alan Modra <amodra@gmail.com>
1250 * dwarf2.c (new_line_sorts_after): Remove end_sequence comparison.
1251 (add_line_info): Always put end_sequence last.
1253 2017-10-01 Alan Modra <amodra@gmail.com>
1256 * dwarf2.c (read_section): Allocate buffer with extra byte for
1257 bfd_simple_get_relocated_section_contents rather than copying
1260 2017-09-29 Alan Modra <amodra@gmail.com>
1262 * merge.c (merge_strings): Return FALSE on malloc failure.
1263 (_bfd_merge_sections): Return failures from record_section and
1266 2017-09-28 Alan Modra <amodra@gmail.com>
1269 * elflink.c (_bfd_elf_merge_symbol): Set non_ir_ref_dynamic in
1270 a case where plugin_notice isn't called.
1272 2017-09-27 Kuan-Lin Chen <kuanlinchentw@gmail.com>
1274 * elf32-nds32.c (nds32_elf_relax_section): Fix a tautological
1277 2017-09-26 H.J. Lu <hongjiu.lu@intel.com>
1280 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't pass
1281 output_bfd to info->callbacks->minfo.
1283 2017-09-26 Nick Clifton <nickc@redhat.com>
1286 * elf64-x86-64.c (elf_x86_64_info_to_howto): Do not trigger an
1287 assertion failure if elf_x86_64_rtype_to_howto has already issued
1290 2017-09-26 Alan Modra <amodra@gmail.com>
1293 * dwarf2.c (read_formatted_entries): Use read_attribute_value to
1296 2017-09-26 Nick Clifton <nickc@redhat.com>
1299 * dwarf2.c (read_formatted_entries): Fail early if we know that
1300 the loop parsing data entries will overflow the end of the
1303 2017-09-26 Alan Modra <amodra@gmail.com>
1306 * dwarf2.c (struct comp_unit): Delete sec_info_ptr field.
1307 (find_abstract_instance_name): Calculate DW_FORM_ref_addr relative
1308 to stash->info_ptr_memory, and check die_ref is within that memory.
1309 Set info_ptr_end correctly when another CU is refd. Check die_ref
1310 for DW_FORM_ref4 etc. is within CU.
1312 2017-09-26 Alan Modra <amodra@gmail.com>
1315 * dwarf2.c (concat_filename): Return "<unknown>" on NULL filename.
1316 (read_formatted_entries): Init "fe".
1317 (decode_line_info <DW_LNE_define_file>): Use line_info_add_file_name.
1319 2017-09-26 Alan Modra <amodra@gmail.com>
1322 * dwarf2.c (decode_line_info): Ensure line_ptr stays within
1323 bounds in inner loop.
1325 2017-09-25 Alan Modra <amodra@gmail.com>
1328 * dwarf1.c (parse_die): Sanity check pointer against section limit
1329 before dereferencing.
1330 (parse_line_table): Likewise.
1332 2017-09-25 Alan Modra <amodra@gmail.com>
1335 * dwarf2.c (scan_unit_for_symbols): Ignore DW_AT_name unless it
1337 (parse_comp_unit): Likewise.
1339 2017-09-25 Alan Modra <amodra@gmail.com>
1342 * dwarf2.c (read_formatted_entries): Error on format_count zero.
1344 2017-09-24 Alan Modra <amodra@gmail.com>
1347 * opncls.c (bfd_get_debug_link_info_1): Properly check that crc is
1348 within section bounds.
1350 2017-09-24 Alan Modra <amodra@gmail.com>
1353 * dwarf2.c (decode_line_info): Properly free line sequences on error.
1355 2017-09-24 Alan Modra <amodra@gmail.com>
1358 * dwarf2.c (find_abstract_instance_name): Add orig_info_ptr and
1359 pname param. Return status. Make name const. Don't abort,
1360 return an error. Formatting. Exit if current info_ptr matches
1361 orig_info_ptr. Update callers.
1362 (scan_unit_for_symbols): Start at nesting_level of zero. Make
1363 nested_funcs an array of structs for extensibility. Formatting.
1365 2017-09-24 Alan Modra <amodra@gmail.com>
1368 * dwarf2.c (decode_line_info): Fail on lh.line_range of zero
1369 rather than dividing by zero.
1371 2017-09-24 Alan Modra <amodra@gmail.com>
1374 * dwarf2.c (decode_line_info): Correct .debug_line unit_length check.
1376 2017-09-24 Alan Modra <amodra@gmail.com>
1379 * dwarf2.c (scan_unit_for_symbols): Check u.blk->data is non-NULL.
1381 2017-09-24 Alan Modra <amodra@gmail.com>
1384 * elf.c (_bfd_elf_slurp_version_tables): Test sh_info on
1385 SHT_GNU_verneed section for sanity. Don't zalloc memory for
1388 2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
1391 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Guard against
1394 2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
1397 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Also return
1398 -1 if bfd_canonicalize_dynamic_reloc returns 0.
1400 2017-09-22 Pedro Alves <palves@redhat.com>
1401 Alan Modra <amodra@gmail.com>
1403 * version.h: Add comment.
1405 2017-09-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1407 * elf.c (elfcore_grok_note): For the cases NT_S390_GS_CB and
1408 NT_S390_GS_BC, correct the previously swapped invocations of
1409 elfcore_grok_s390_gs_bc and elfcore_grok_s390_gs_cb.
1411 2017-09-19 Alan Modra <amodra@gmail.com>
1414 * elf64-ppc.c (ppc64_elf_build_stubs): Don't check glink_eh_frame
1417 2017-09-19 Alan Modra <amodra@gmail.com>
1420 * elflink.c (bfd_elf_size_dynamic_sections): Garbage collect
1421 symbols before calculating verrefs. Don't renumber dynsyms
1422 after gc. Exclude .gnu.version when zero or one dynsym.
1423 Localize some vars and reindent.
1425 2017-09-18 H.J. Lu <hongjiu.lu@intel.com>
1428 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Check error
1429 return from bfd_canonicalize_dynamic_reloc.
1431 2017-09-15 Alan Modra <amodra@gmail.com>
1434 * archive.c (bfd_ar_hdr_from_filesystem): Detect when status.st_size
1435 overflows bfd_size_type.
1437 2017-09-14 H.J. Lu <hongjiu.lu@intel.com>
1440 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument
1441 to indicate if conversion is performed.
1442 (elf_i386_check_relocs): Cache section contents and relocations
1443 if conversion is performed.
1444 * elf64-x86-64.c (elf_x86_64_check_relocs): Cache section
1445 contents and relocations if conversion is performed.
1447 2017-09-14 Nick Clifton <nickc@redhat.com>
1450 * peXXigen.c (pe_print_idata): Extend check for HintName vector
1453 2017-09-13 H.J. Lu <hongjiu.lu@intel.com>
1455 * elfxx-x86.h: Fix a typo in comments.
1457 2017-09-09 Kamil Rytarowski <n54@gmx.com>
1459 * elf32-nds32.c: Rename __BIT() to N32_BIT().
1461 2017-09-09 Alan Modra <amodra@gmail.com>
1463 * elf64-ppp.c (plt_stub_pad): Handle positive and negative
1466 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
1468 * elf32-i386.c (elf_i386_relocate_section): Update usage of
1469 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
1470 (elf_i386_finish_dynamic_symbol): Likewise.
1471 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1472 (elf_x86_64_finish_dynamic_symbol): Likewise.
1473 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Likewise.
1474 (_bfd_x86_elf_fixup_symbol): Likewise.
1476 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
1478 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
1479 check has_non_got_reloc.
1481 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
1484 * elf32-i386.c (elf_i386_convert_load_reloc): Check linker_def.
1485 Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
1486 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Check
1487 linker_def. Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
1488 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Set local_ref
1489 and linker_def on __ehdr_start if it is referenced and not
1491 (_bfd_x86_elf_link_symbol_references_local): Also set local_ref
1492 and return TRUE when building executable, if a symbol has
1493 non-GOT/non-PLT relocations in text section or there is no
1495 * elfxx-x86.h (elf_x86_link_hash_entry): Add linker_def.
1497 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
1499 * elfxx-x86.h: Update comments.
1501 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
1503 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Replace
1504 elf_x86_plt_layout_table with elf_x86_init_table.
1505 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
1507 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties):
1509 * elfxx-x86.h (elf_x86_plt_layout_table): Renamed to ...
1510 (elf_x86_init_table): This.
1511 (_bfd_x86_elf_link_setup_gnu_properties): Replace
1512 elf_x86_plt_layout_table with elf_x86_init_table.
1514 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
1516 * configure.ac (bfd_backends): Don't add elf64-x86-64.lo nor
1517 elf64.lo together with elfxx-x86.lo for 64-bit BFD.
1518 * configure: Regenerated.
1519 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set r_info
1520 and r_sym fields of plt_layout.
1521 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
1523 * elfxx-x86.c (elf_x86_64_is_reloc_section): Remove BFD64 check.
1524 (_bfd_x86_elf_link_hash_table_create): Likewise. Don't set
1525 r_info nor r_sym fields.
1526 (_bfd_x86_elf_link_setup_gnu_properties): Set r_info and r_sym
1528 * elfxx-x86.h (elf_x86_plt_layout_table): Add r_info and r_sym.
1530 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
1532 * (_bfd_riscv_relax_align): Call bfd_set_error and
1533 print an error message when unable to relax a .align directive.
1535 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
1537 * elfnn-riscv.c (riscv_zero_pcrel_hi_reloc): New function.
1538 (riscv_record_pcrel_hi_reloc): Add absolute argument.
1539 (riscv_elf_relocate_section): Call riscv_zero_pcrel_hi_reloc for
1540 R_RISCV_PCREL_HI20 relocs, and pass the result to
1541 riscv_record_pcrel_hi_reloc.
1543 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
1545 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument,
1546 r_type_p. Remove the converted argument. Replace
1547 SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P. Return
1548 the new relocation type via r_type_p.
1549 (elf_i386_relocate_section): Likewise.
1550 (elf_i386_finish_dynamic_symbol): Likewise.
1551 (need_convert_load): Removed.
1552 (check_relocs_failed): Updated.
1553 (elf_i386_check_relocs): Call elf_i386_convert_load_reloc,
1554 instead of setting need_convert_load.
1555 (_bfd_i386_elf_convert_load): Removed.
1556 * elf64-x86-64.c (need_convert_load): Removed.
1557 (check_relocs_failed): Updated.
1558 (elf_x86_64_convert_load_reloc): Add an argument, r_type_p.
1559 Replace SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P.
1560 Return the new relocation type via r_type_p.
1561 (elf_x86_64_check_relocs): Call elf_x86_64_convert_load_reloc,
1562 instead of setting need_convert_load.
1563 (elf_x86_64_check_relocs): Don't check PIC if relocation has
1565 (_bfd_x86_64_elf_convert_load): Removed.
1566 (elf_x86_64_relocate_section): Replace SYMBOL_REFERENCES_LOCAL
1567 with SYMBOL_REFERENCES_LOCAL_P.
1568 (elf_x86_64_finish_dynamic_symbol): Likewise.
1569 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Don't
1571 (_bfd_x86_elf_size_dynamic_sections): Don't call convert_load.
1572 (_bfd_x86_elf_link_symbol_references_local): New function.
1573 * elfxx-x86.h (SYMBOL_REFERENCES_LOCAL_P): New.
1574 (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace elf.forced_local with
1575 SYMBOL_REFERENCES_LOCAL_P.
1576 (elf_x86_link_hash_entry): Add local_ref.
1577 (elf_x86_link_hash_table): Remove convert_load.
1578 (_bfd_i386_elf_convert_load): Removed.
1579 (_bfd_x86_64_elf_convert_load): Likewise.
1580 (_bfd_x86_elf_link_symbol_references_local): New.
1582 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
1584 * elf64-x86-64.c (R_X86_64_converted_reloc_bit): New.
1585 (elf_x86_64_info_to_howto): Get the real relocation type by
1586 masking out R_X86_64_converted_reloc_bit.
1587 (elf_x86_64_check_tls_transition): Get the real relocation type
1588 by masking out R_X86_64_converted_reloc_bit.
1589 (elf_x86_64_convert_load_reloc): Set R_X86_64_converted_reloc_bit
1590 instead of setting converted_reloc.
1591 (elf_x86_64_relocate_section): Check R_X86_64_converted_reloc_bit
1592 instead of converted_reloc. Get the real relocation type by
1593 masking out R_X86_64_converted_reloc_bit.
1594 (elf_x86_64_link_setup_gnu_properties): Verify that the value of
1595 R_X86_64_converted_reloc_bit is valid.
1596 * elfxx-x86.h (converted_reloc): Removed.
1598 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
1600 * elf32-i386.c (elf_i386_relocate_section): Don't change r_type
1601 when calling elf_i386_tls_transition. Don't use ELF32_R_TYPE
1602 to get the relocation type again.
1603 * elf64-x86-64.c (elf_x86_64_relocate_section): Don't change
1604 r_type when calling elf_x86_64_tls_transition. Don't use
1605 ELF32_R_TYPE to get the relocation type again.
1607 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
1609 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Properly set
1612 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
1614 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Remove the sec
1615 argument. Don't check relocation overflow. Avoid relocation
1616 overflow if --no-relax is used. Set converted_reloc on symbol
1617 if a GOTPCREL relocation is converted.
1618 (elf_x86_64_relocate_section): Issue a fatal error and suggest
1619 --no-relax if GOTPCREL relocation conversion leads to relocation
1621 * elfxx-x86.h (elf_x86_link_hash_entry): Add converted_reloc.
1623 2017-09-05 Alexander Fedotov <alexander.fedotov@nxp.com>
1624 Edmar Wienskoski <edmar.wienskoski@nxp.com
1626 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_VLE_ADDR20.
1627 (ppc_elf_check_relocs): Handle it.
1628 (ppc_elf_vle_split20): New function.
1629 (ppc_elf_relocate_section): Handle R_PPC_VLE_ADDR20.
1631 2017-09-03 H.J. Lu <hongjiu.lu@intel.com>
1634 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Set tlsdesc_plt
1635 for x86-64 if GOT_TLS_GDESC_P is true.
1637 2017-09-03 Alan Modra <amodra@gmail.com>
1640 * elfxx-x86.h (elf_x86_hash_table): Check is_elf_hash_table first.
1642 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1644 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1645 tls_get_addr for x86-64 in one place.
1647 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1649 * configure.ac (bfd_backends): Add elf64-x86-64.lo together
1650 with elfxx-x86.lo for 64-bit BFD.
1651 * configure: Regenerated.
1653 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1655 * elf32-i386.c (elf_i386_convert_load): Renamed to ...
1656 (_bfd_i386_elf_convert_load): This. Remove static.
1657 (elf_i386_size_dynamic_sections): Removed.
1658 (elf_backend_size_dynamic_sections): Likewise.
1659 * elf64-x86-64.c (elf_x86_64_convert_load): Renamed to ...
1660 (_bfd_x86_64_elf_convert_load): This. Remove static.
1661 (elf_x86_64_size_dynamic_sections): Removed.
1662 (elf_backend_size_dynamic_sections): Likewise.
1663 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): Renamed to ...
1664 (elf_x86_allocate_dynrelocs): This. Make it static.
1665 (_bfd_x86_elf_allocate_local_dynrelocs): Renamed to ...
1666 (elf_x86_allocate_local_dynreloc): This. Make it static.
1667 (elf_i386_is_reloc_section): New function.
1668 (elf_x86_64_is_reloc_section): Likewise.
1669 (_bfd_x86_elf_link_hash_table_create): Initialize convert_load,
1670 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
1671 Rearrange got_entry_size initialization.
1672 (_bfd_x86_elf_size_dynamic_sections): New function.
1673 * elfxx-x86.h (elf_x86_link_hash_table): Add convert_load,
1674 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
1675 (_bfd_i386_elf_convert_load): New.
1676 (_bfd_x86_64_elf_convert_load): Likewise.
1677 (_bfd_x86_elf_size_dynamic_sections): Likewise.
1678 (elf_backend_size_dynamic_sections): Likewise.
1679 (_bfd_x86_elf_allocate_dynrelocs): Removed.
1680 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
1682 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1684 * elfxx-x86.h (elf_x86_link_hash_table): Rearrange fields and
1687 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1689 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
1690 sgotplt_jump_table_size with elf_x86_compute_jump_table_size.
1692 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1694 * elf32-i386.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
1695 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Moved to ...
1696 * elfxx-x86.h (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
1697 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Here.
1698 * elf64-x86-64.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
1699 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Removed.
1701 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1703 * elf32-i386.c (elf_i386_allocate_dynrelocs): Removed.
1704 (elf_i386_allocate_local_dynrelocs): Likewise.
1705 (elf_i386_size_dynamic_sections): Replace
1706 elf_i386_allocate_dynrelocs/elf_i386_allocate_local_dynrelocs
1707 with _bfd_x86_elf_allocate_dynrelocs and
1708 _bfd_x86_elf_allocate_local_dynrelocs.
1709 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Removed.
1710 (elf_x86_64_allocate_local_dynrelocs): Likewise.
1711 (elf_x86_64_size_dynamic_sections): Replace
1712 elf_x86_64_allocate_dynrelocs/elf_x86_64_allocate_local_dynrelocs
1713 with _bfd_x86_elf_allocate_dynrelocs and
1714 _bfd_x86_elf_allocate_local_dynrelocs.
1715 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): New function.
1716 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
1717 * elfxx-x86.h (_bfd_x86_elf_allocate_dynrelocs): New prototype.
1718 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
1720 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1722 * elf32-i386.c (is_i386_elf): Removed.
1723 (elf_i386_check_relocs): Replace is_i386_elf with is_x86_elf.
1724 (elf_i386_size_dynamic_sections): Likewise.
1725 (elf_i386_relocate_section): Likewise.
1726 * elf64-x86-64.c (is_x86_64_elf): Removed.
1727 (elf_x86_64_check_relocs): Replace is_x86_64_elf with
1729 (elf_x86_64_size_dynamic_sections): Likewise.
1730 (elf_x86_64_relocate_section): Likewise.
1731 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1733 * elfxx-x86.h (elf_x86_link_hash_table): Add target_id.
1736 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1738 * elf32-i386.c (elf_i386_compute_jump_table_size): Removed.
1739 (elf_i386_allocate_dynrelocs): Replace
1740 elf_i386_compute_jump_table_size with
1741 elf_x86_compute_jump_table_size.
1742 (elf_i386_size_dynamic_sections): Likewise.
1743 * elf64-x86-64.c (elf_x86_64_compute_jump_table_size): Removed.
1744 (elf_x86_64_allocate_dynrelocs): Replace
1745 elf_x86_64_compute_jump_table_size with
1746 elf_x86_compute_jump_table_size.
1747 (elf_x86_64_size_dynamic_sections): Likewise.
1748 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1750 * elfxx-x86.h (elf_x86_link_hash_table): Add got_entry_size.
1751 (elf_x86_compute_jump_table_size): New.
1753 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1755 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1757 (_bfd_x86_elf_adjust_dynamic_symbol): Use sizeof_reloc.
1758 * elfxx-x86.h (elf_x86_link_hash_table): Add sizeof_reloc.
1760 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1762 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check VxWorks
1763 with htab->is_vxworks.
1764 (elf_i386_size_dynamic_sections): Likewise.
1765 (elf_i386_relocate_section): Likewise.
1766 (elf_i386_finish_dynamic_symbol): Likewise.
1767 (elf_i386_finish_dynamic_sections): Likewise.
1769 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1771 * elf32-i386.c (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
1772 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
1773 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Moved to ...
1774 * elfxx-x86.h (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
1775 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
1776 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Here.
1777 * elf64-x86-64.c (GOT_TLS_IE, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
1778 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Removed.
1780 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1783 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Check
1784 ELF_COMMON_DEF_P for common symbols.
1786 2017-09-02 Alan Modra <amodra@gmail.com>
1788 * elf-eh-frame.c (offset_adjust): Avoid false positive gcc warning.
1789 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Likewise.
1790 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
1792 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1794 * elf32-i386.c (elf_i386_gc_mark_hook): Removed.
1795 (elf_backend_gc_mark_hook): Likewise.
1796 * elf64-x86-64.c (elf_x86_64_gc_mark_hook): Likewise.
1797 (elf_backend_gc_mark_hook): Likewise.
1798 * elfxx-x86.c (_bfd_x86_elf_gc_mark_hook): New function.
1799 * elfxx-x86.h (_bfd_x86_elf_gc_mark_hook): New.
1800 (elf_backend_gc_mark_hook): Likewise.
1802 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1804 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Removed.
1805 (elf_backend_adjust_dynamic_symbol): Likewise.
1806 * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.
1807 (elf_backend_adjust_dynamic_symbol): Likewise.
1808 * elfxx-x86.c (_bfd_x86_elf_adjust_dynamic_symbol): New function.
1809 (_bfd_x86_elf_link_setup_gnu_properties): Copy is_vxworks.
1810 * elfxx-x86.h (elf_x86_link_hash_table): Add is_vxworks.
1811 (_bfd_x86_elf_adjust_dynamic_symbol): New.
1812 (elf_backend_adjust_dynamic_symbol): Likewise.
1814 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1816 * elfxx-x86.h (elf_x86_plt_layout_table): Fix a typo in
1819 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1821 * elf32-i386.c (elf_i386_mkobject): Removed.
1822 (bfd_elf32_mkobject): Likewise.
1823 * elf64-x86-64.c (elf_x86_64_mkobject): Likewise.
1824 (bfd_elf64_mkobject): Likewise.
1825 (bfd_elf32_mkobject): Likewise.
1826 * elfxx-x86.c (_bfd_x86_elf_mkobject): New function.
1827 * elfxx-x86.h (_bfd_x86_elf_mkobject): New.
1828 (bfd_elf64_mkobject): Likewise.
1829 (bfd_elf32_mkobject): Likewise.
1831 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1833 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Updated.
1834 Call _bfd_x86_elf_link_setup_gnu_properties.
1835 * elf64-x86-64.c (elf_x86_lazy_plt_layout): Initialize
1836 pic_plt0_entry and pic_plt_entry fields with the non-PIC PLT
1838 (elf_x86_64_non_lazy_plt): Likewise.
1839 (elf_x86_64_lazy_bnd_plt): Likewise.
1840 (elf_x86_64_non_lazy_bnd_plt): Likewise.
1841 (elf_x86_64_lazy_ibt_plt): Likewise.
1842 (elf_x32_lazy_ibt_plt): Likewise.
1843 (elf_x86_64_non_lazy_ibt_plt): Likewise.
1844 (elf_x32_non_lazy_ibt_plt): Likewise.
1845 (elf_x86_64_nacl_plt): Likewise.
1846 (elf_x86_64_link_setup_gnu_properties): Updated. Call
1847 _bfd_x86_elf_link_setup_gnu_properties.
1848 * elfxx-x86.c: Include elf-vxworks.h".
1849 (_bfd_x86_elf_link_setup_gnu_properties): New function.
1850 * elfxx-x86.h (elf_x86_lazy_plt_layout): Remove "for i386 only"
1851 comments for pic_plt0_entry and pic_plt_entry.
1852 (elf_x86_non_lazy_plt_layout): Likewise.
1853 (elf_x86_plt_layout_table): New.
1854 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
1856 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1859 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Create
1860 .eh_frame section for the second PLT.
1861 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Correct
1862 alignment of .eh_frame section for the second PLT.
1864 2017-09-01 Nick Clifton <nickc@redhat.com>
1867 * dwarf2.c (decode_line_info): Fix test for an overlong line info
1870 2017-09-01 Nick Clifton <nickc@redhat.com>
1873 * elf-attrs.c (_bfd_elf_parse_attributes): Ensure that the
1874 attribute buffer is NUL terminated.
1876 2017-08-31 Nick Clifton <nickc@redhat.com>
1879 * dwarf2.c (read_section): If necessary add a terminating NUL byte
1880 to dwarf string sections.
1882 2017-08-31 Alan Modra <amodra@gmail.com>
1884 * po/SRC-POTFILES.in: Regenerate.
1886 2017-08-31 Alan Modra <amodra@gmail.com>
1888 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Don't exit early
1889 for a section containing just a terminator. Allow multiple
1890 terminators at end of section.
1891 * elflink.c (bfd_elf_discard_info): Iterate over .eh_frame
1892 sections when not adding alignment. Assert on terminator in
1895 2017-08-31 Alan Modra <amodra@gmail.com>
1899 * elflink.c (bfd_elf_discard_info): Don't pad embedded zero
1902 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1904 * configure.ac (bfd_backends): Add elf64.lo together with
1905 elfxx-x86.lo for 64-bit BFD.
1906 * configure: Regenerated.
1908 2017-08-31 James Bowman <james.bowman@ftdichip.com>
1910 * elf32-ft32.c (ft32_elf_howto_table): Use complain_overflow_dont
1913 2017-08-31 Alan Modra <amodra@gmail.com>
1916 * opncls.c (bfd_close_all_done): Don't call bfd_cache_close
1917 before _close_and_cleanup. Call iovec->bclose after.
1918 (bfd_close): Remove code common to, and call, bfd_close_all_done.
1920 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1922 * elf32-i386.c (elf_i386_plt_type): Removed.
1923 (elf_i386_plt): Likewise.
1924 (elf_i386_get_synthetic_symtab): Updated. Call
1925 _bfd_x86_elf_get_synthetic_symtab.
1926 * elf64-x86-64.c (elf_x86_64_plt_type): Removed.
1927 (elf_x86_64_plt): Likewise.
1928 (elf_x86_64_get_synthetic_symtab): Updated. Call
1929 _bfd_x86_elf_get_synthetic_symtab.
1930 * elfxx-x86.c (elf_i386_get_plt_got_vma): New function.
1931 (elf_x86_64_get_plt_got_vma): Likewise.
1932 (elf_i386_valid_plt_reloc_p): Likewise.
1933 (elf_x86_64_valid_plt_reloc_p): Likewise.
1934 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
1935 * elfxx-x86.h (elf_x86_plt_type): New.
1936 (elf_x86_plt): Likewise.
1937 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
1939 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1941 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Check
1942 target_id instead of elf_machine_code.
1944 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1946 * elf32-i386.c (ELF_DYNAMIC_INTERPRETER): Removed.
1947 (elf_i386_lazy_plt_layout): Likewise.
1948 (elf_i386_non_lazy_plt_layout): Likewise.
1949 (elf_i386_plt_layout): Likewise.
1950 (elf_i386_link_hash_table): Likewise.
1951 (elf_i386_next_tls_desc_index): Likewise.
1952 (elf_i386_srelplt2): Likewise.
1953 (elf_i386_plt): Likewise.
1954 (elf_i386_lazy_plt): Likewise.
1955 (elf_i386_non_lazy_plt): Likewise.
1956 (elf_i386_link_hash_table_create): Likewise.
1957 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1958 (elf_i386_lazy_plt): Updated.
1959 (elf_i386_non_lazy_plt): Likewise.
1960 (elf_i386_lazy_ibt_plt): Likewise.
1961 (elf_i386_non_lazy_ibt_plt): Likewise.
1962 (elf_i386_allocate_dynrelocs): Likewise.
1963 (elf_i386_size_dynamic_sections): Likewise.
1964 (elf_i386_relocate_section): Likewise.
1965 (elf_i386_finish_dynamic_symbol): Likewise.
1966 (elf_i386_finish_dynamic_sections): Likewise.
1967 (elf_i386_get_synthetic_symtab): Likewise.
1968 (elf_i386_link_setup_gnu_properties): Likewise.
1969 (elf_i386_nacl_plt): Likewise.
1970 * elf64-x86-64.c (ABI_64_P): Removed.
1971 (ELF64_DYNAMIC_INTERPRETER): Likewise.
1972 (ELF32_DYNAMIC_INTERPRETER): Likewise.
1973 (elf_x86_64_lazy_plt_layout): Likewise.
1974 (elf_x86_64_non_lazy_plt_layout): Likewise.
1975 (elf_x86_64_plt_layout): Likewise.
1976 (elf_x86_64_link_hash_table): Likewise.
1977 (elf_x86_64_plt): Likewise.
1978 (elf_x86_64_lazy_plt): Likewise.
1979 (elf_x86_64_non_lazy_plt): Likewise.
1980 (elf_x86_64_link_hash_table_create): Likewise.
1981 (bfd_elf64_bfd_link_hash_table_create): Likewise.
1982 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1983 (elf_x86_64_lazy_plt): Updated.
1984 (elf_x86_64_non_lazy_plt): Likewise.
1985 (elf_x86_64_lazy_bnd_plt): Likewise.
1986 (elf_x86_64_non_lazy_bnd_plt): Likewise.
1987 (elf_x86_64_lazy_ibt_plt): Likewise.
1988 (elf_x32_lazy_ibt_plt): Likewise.
1989 (elf_x86_64_non_lazy_ibt_plt): Likewise.
1990 (elf_x32_non_lazy_ibt_plt): Likewise.
1991 (elf_x86_64_allocate_dynrelocs): Likewise.
1992 (elf_x86_64_size_dynamic_sections): Likewise.
1993 (elf_x86_64_relocate_section): Likewise.
1994 (elf_x86_64_finish_dynamic_symbol): Likewise.
1995 (elf_x86_64_finish_dynamic_sections): Likewise.
1996 (elf_x86_64_get_synthetic_symtab): Likewise.
1997 (elf_x86_64_link_setup_gnu_properties): Likewise.
1998 (elf_x86_64_nacl_plt): Likewise.
1999 * elfxx-x86.c: Include "objalloc.h", "elf/i386.h" and
2001 (ELF32_DYNAMIC_INTERPRETER): New.
2002 (ELF64_DYNAMIC_INTERPRETER): Likewise.
2003 (ELFX32_DYNAMIC_INTERPRETER): Likewise.
2004 (_bfd_x86_elf_link_hash_table_create): Likewise.
2005 (_bfd_x86_elf_link_hash_table_free): Renamed to ...
2006 (elf_x86_link_hash_table_free): This. Make it static.
2007 * elfxx-x86.h: Don't include "objalloc.h".
2009 (elf_x86_lazy_plt_layout): Likewise.
2010 (elf_x86_non_lazy_plt_layout): Likewise.
2011 (elf_x86_plt_layout): Likewise.
2012 (_bfd_x86_elf_link_hash_table_create): Likewise.
2013 (bfd_elf64_bfd_link_hash_table_create): Likewise.
2014 (bfd_elf32_bfd_link_hash_table_create): Likewise.
2015 (elf_x86_link_hash_table): Add plt, lazy_plt, non_lazy_plt,
2016 srelplt2 and next_tls_desc_index.
2017 (_bfd_x86_elf_link_hash_table_free): Removed.
2019 2017-08-30 Maciej W. Rozycki <macro@imgtec.com>
2021 * elfxx-mips.c (mips_elf_perform_relocation): Correct microMIPS
2022 branch offset interpretation.
2024 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
2027 * opncls.c (bfd_close_all_done): Call _close_and_cleanup.
2029 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
2031 * elf64-x86-64.c (elf_x86_64_next_tls_desc_index): Removed.
2032 (elf_x86_64_srelplt2): Likewise.
2034 2017-08-30 Alan Modra <amodra@gmail.com>
2036 * elf64-ppc.c (struct ppc_link_hash_table): Add do_tls_opt.
2037 (ppc64_elf_tls_optimize): Set it.
2038 (ppc64_elf_relocate_section): Nop addis on TPREL16_HA, and convert
2039 insn on TPREL16_LO and TPREL16_LO_DS relocs to use r13 when
2040 addis would add zero.
2041 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add do_tls_opt.
2042 (ppc_elf_tls_optimize): Set it.
2043 (ppc_elf_relocate_section): Nop addis on TPREL16_HA, and convert
2044 insn on TPREL16_LO relocs to use r2 when addis would add zero.
2046 2017-08-30 Alan Modra <amodra@gmail.com>
2048 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing
2049 __tls_get_addr call sequences to LE, don't move the addi down
2050 to the nop. Replace the bl with addi and leave the nop alone.
2052 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
2054 * elf32-i386.c (elf_i386_pie_finish_undefweak_symbol):
2056 * elf64-x86-64.c (elf_x86_64_finish_local_dynamic_symbol):
2058 (elf_x86_64_pie_finish_undefweak_symbol): Likewise.
2060 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
2062 * Makefile.am (BFD32_BACKENDS): Add elfxx-x86.lo.
2063 (BFD64_BACKENDS): Likewise.
2064 (BFD32_BACKENDS_CFILES): Add elfxx-x86.c.
2065 (BFD64_BACKENDS_CFILES): Likewise.
2066 * Makefile.in: Regenerated.
2067 * configure.ac (bfd_backends): Add elfxx-x86.lo together with
2068 elf32-i386.lo and elf64-x86-64.lo.
2069 * configure: Regenerated.
2070 * elf32-i386.c: Include "elfxx-x86.h" instead of "sysdep.h",
2071 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
2072 "objalloc.h" and "hashtab.h".
2073 (ELIMINATE_COPY_RELOCS): Removed.
2074 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
2075 (SYMBOL_NO_COPYRELOC): Likewise.
2076 (elf_i386_link_hash_entry): Likewise.
2077 (GOT_UNKNOWN): Likewise.
2078 (GOT_NORMAL): Likewise.
2079 (GOT_TLS_GD): Likewise.
2080 (elf_i386_hash_entry): Likewise.
2081 (elf_i386_obj_tdata): Likewise.
2082 (elf_i386_tdata): Likewise.
2083 (elf_i386_local_got_tls_type): Likewise.
2084 (elf_i386_local_tlsdesc_gotent): Likewise.
2085 (elf_i386_hash_table): Likewise.
2086 (elf_i386_link_hash_newfunc): Likewise.
2087 (elf_i386_local_htab_hash): Likewise.
2088 (elf_i386_local_htab_eq): Likewise.
2089 (elf_i386_get_local_sym_hash): Likewise.
2090 (elf_i386_link_hash_table_free): Likewise.
2091 (elf_i386_copy_indirect_symbol): Likewise.
2092 (elf_i386_fixup_symbol): Likewise.
2093 (elf_i386_readonly_dynrelocs): Likewise.
2094 (elf_i386_always_size_sections): Likewise.
2095 (elf_i386_set_tls_module_base): Likewise.
2096 (elf_i386_dtpoff_base): Likewise.
2097 (compare_relocs): Likewise.
2098 (elf_i386_hash_symbol): Likewise.
2099 (elf_i386_parse_gnu_properties): Likewise.
2100 (elf_i386_merge_gnu_properties): Likewise.
2101 (elf_i386_link_check_relocs): Likewise.
2102 (elf_i386_merge_symbol_attribute): Likewise.
2103 (bfd_elf32_bfd_link_check_relocs): Likewise.
2104 (elf_backend_copy_indirect_symbol): Likewise.
2105 (elf_backend_always_size_sections): Likewise.
2106 (elf_backend_omit_section_dynsym): Likewise.
2107 (elf_backend_hash_symbol): Likewise.
2108 (elf_backend_fixup_symbol): Likewise.
2109 (elf_backend_parse_gnu_properties): Likewise.
2110 (elf_backend_merge_gnu_properties): Likewise.
2111 (elf_backend_merge_symbol_attribute): Likewise.
2112 (elf_i386_mkobject): Updated.
2113 (elf_i386_link_hash_table_create): Likewise.
2114 (elf_i386_check_tls_transition): Likewise.
2115 (elf_i386_tls_transition): Likewise.
2116 (elf_i386_convert_load_reloc): Likewise.
2117 (elf_i386_check_relocs): Likewise.
2118 (elf_i386_adjust_dynamic_symbol): Likewise.
2119 (elf_i386_allocate_dynrelocs): Likewise.
2120 (elf_i386_convert_load): Likewise.
2121 (elf_i386_size_dynamic_sections): Likewise.
2122 (elf_i386_relocate_section): Likewise.
2123 (elf_i386_finish_dynamic_symbol ): Likewise.
2124 (elf_i386_finish_dynamic_sections): Likewise.
2125 (elf_i386_output_arch_local_syms): Likewise.
2126 (elf_i386_get_synthetic_symtab): Likewise.
2127 (elf_i386_link_setup_gnu_properties): Likewise.
2128 (elf_i386_link_hash_table): Use elf_x86_link_hash_table, instead
2129 of elf_link_hash_table, as base.
2130 (elf_i386_next_tls_desc_index): New.
2131 (elf_i386_srelplt2): Likewise.
2132 (elf_i386_plt): Likewise.
2133 (elf_i386_lazy_plt): Likewise.
2134 (elf_i386_non_lazy_plt): Likewise.
2135 * elf32-x86-64.c: Include "elfxx-x86.h" instead of "sysdep.h",
2136 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
2137 "objalloc.h" and "hashtab.h".
2138 (ELIMINATE_COPY_RELOCS): Removed.
2139 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
2140 (SYMBOL_NO_COPYRELOC): Likewise.
2141 (elf_x86_64_link_hash_entry): Likewise.
2142 (GOT_UNKNOWN): Likewise.
2143 (GOT_NORMAL): Likewise.
2144 (GOT_TLS_GD): Likewise.
2145 (elf_x86_64_hash_entry): Likewise.
2146 (elf_x86_64_obj_tdata): Likewise.
2147 (elf_x86_64_tdata): Likewise.
2148 (elf_x86_64_local_got_tls_type): Likewise.
2149 (elf_x86_64_local_tlsdesc_gotent): Likewise.
2150 (elf_x86_64_hash_table): Likewise.
2151 (elf_x86_64_link_hash_newfunc): Likewise.
2152 (elf_x86_64_local_htab_hash): Likewise.
2153 (elf_x86_64_local_htab_eq): Likewise.
2154 (elf_x86_64_get_local_sym_hash): Likewise.
2155 (elf_x86_64_link_hash_table_free): Likewise.
2156 (elf_x86_64_copy_indirect_symbol): Likewise.
2157 (elf_x86_64_fixup_symbol): Likewise.
2158 (elf_x86_64_readonly_dynrelocs): Likewise.
2159 (elf_x86_64_always_size_sections): Likewise.
2160 (elf_x86_64_set_tls_module_base): Likewise.
2161 (elf_x86_64_dtpoff_base): Likewise.
2162 (compare_relocs): Likewise.
2163 (elf_x86_64_merge_symbol_attribute): Likewise.
2164 (elf_x86_64_hash_symbol): Likewise.
2165 (elf_x86_64_parse_gnu_properties): Likewise.
2166 (elf_x86_64_merge_gnu_properties): Likewise.
2167 (elf_x86_64_link_check_relocs): Likewise.
2168 (elf_backend_copy_indirect_symbol): Likewise.
2169 (elf_backend_always_size_sections): Likewise.
2170 (bfd_elf64_bfd_link_check_relocs): Likewise.
2171 (elf_backend_merge_symbol_attribute): Likewise.
2172 (elf_backend_hash_symbol): Likewise.
2173 (elf_backend_omit_section_dynsym): Likewise.
2174 (elf_backend_fixup_symbol): Likewise.
2175 (elf_backend_parse_gnu_properties): Likewise.
2176 (elf_backend_merge_gnu_properties): Likewise.
2177 (bfd_elf32_bfd_link_check_relocs): Likewise.
2178 (elf_x86_64_mkobject): Updated.
2179 (elf_x86_64_link_hash_table_create): Likewise.
2180 (elf_x86_64_check_tls_transition): Likewise.
2181 (elf_x86_64_tls_transition): Likewise.
2182 (elf_x86_64_convert_load_reloc): Likewise.
2183 (elf_x86_64_check_relocs): Likewise.
2184 (elf_x86_64_adjust_dynamic_symbol): Likewise.
2185 (elf_x86_64_allocate_dynrelocs): Likewise.
2186 (elf_x86_64_convert_load): Likewise.
2187 (elf_x86_64_size_dynamic_sections): Likewise.
2188 (elf_x86_64_relocate_section): Likewise.
2189 (elf_x86_64_finish_dynamic_symbol ): Likewise.
2190 (elf_x86_64_finish_dynamic_sections): Likewise.
2191 (elf_x86_64_output_arch_local_syms): Likewise.
2192 (elf_x86_64_get_synthetic_symtab): Likewise.
2193 (elf_x86_64_link_setup_gnu_properties): Likewise.
2194 (elf_x86_64_link_hash_table): Use elf_x86_link_hash_table,
2195 instead of elf_link_hash_table, as base.
2196 (elf_x86_64_next_tls_desc_index): New.
2197 (elf_x86_64_srelplt2): Likewise.
2198 (elf_x86_64_plt): Likewise.
2199 (elf_x86_64_lazy_plt): Likewise.
2200 (elf_x86_64_non_lazy_plt): Likewise.
2201 * elfxx-x86.c: New file.
2202 * elfxx-x86.h: Likewise.
2204 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
2206 * elf32-i386.c (elf_i386_get_synthetic_symtab): Simplify bad
2208 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
2210 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
2212 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check valid PLT
2213 sections before checking dynamic relocations and free invalid
2214 PLT section contents.
2215 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
2217 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
2219 * elf-bfd.h (_bfd_elf_ifunc_get_synthetic_symtab): Removed.
2220 * elf-ifunc.c (_bfd_elf_ifunc_get_synthetic_symtab): Likewise.
2222 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
2225 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check for valid
2227 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
2229 2017-08-27 H.J. Lu <hongjiu.lu@intel.com>
2231 * elf32-i386.c (elf_i386_link_hash_newfunc): Initialize
2233 * elf64-x86-64.c (elf_x86_64_link_hash_newfunc): Likewise.
2235 2017-08-26 H.J. Lu <hongjiu.lu@intel.com>
2238 * elf-bfd.h (elf_obj_tdata): Use ENUM_BITFIELD on object_id,
2239 dyn_lib_class and has_gnu_symbols. Change bad_symtab to bitfield.
2240 Add a has_no_copy_on_protected bitfield.
2241 (elf_has_no_copy_on_protected): New.
2242 * elf-properties.c (_bfd_elf_parse_gnu_properties): Set
2243 elf_has_no_copy_on_protected for GNU_PROPERTY_NO_COPY_ON_PROTECTED.
2244 (elf_merge_gnu_property_list): Likewise.
2245 (_bfd_elf_link_setup_gnu_properties): Set extern_protected_data
2246 to FALSE for elf_has_no_copy_on_protected.
2247 * elf32-i386.c (SYMBOL_NO_COPYRELOC): New.
2248 (elf_i386_link_hash_entry): Add def_protected.
2249 (elf_i386_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
2250 when checking info->nocopyreloc.
2251 (elf_i386_link_setup_gnu_properties): Don't set
2252 extern_protected_data here.
2253 (elf_i386_merge_symbol_attribute): New function.
2254 (elf_backend_merge_symbol_attribute): New.
2255 * elf64-x86-64.c (SYMBOL_NO_COPYRELOC): New.
2256 (elf_x86_64_link_hash_entry): Add def_protected.
2257 (elf_x86_64_need_pic): Report protected symbol for def_protected.
2258 (elf_x86_64_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
2259 when checking info->nocopyreloc.
2260 (elf_x86_64_relocate_section): Also check for R_X86_64_PC32
2261 relocation run-time overflow and unresolvable R_X86_64_32S
2262 relocation against protected data symbol defined in shared object
2263 with GNU_PROPERTY_NO_COPY_ON_PROTECTED.
2264 (elf_x86_64_link_setup_gnu_properties): Don't set
2265 extern_protected_data here.
2266 (elf_x86_64_merge_symbol_attribute): New function.
2267 (elf_backend_merge_symbol_attribute): New.
2269 2017-08-26 Alan Modra <amodra@gmail.com>
2271 * elf32-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
2272 (ppc_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
2273 (ppc_elf_relocate_section): Comment fix.
2274 * elf64-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
2275 (ppc64_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
2276 Support dynamic relocs for TPREL16 when non-pic too.
2277 (dec_dynrel_count): Adjust TPREL16 handling as per check_relocs.
2278 (ppc64_elf_relocate_section): Support dynamic relocs for TPREL16
2281 2017-08-25 H.J. Lu <hongjiu.lu@intel.com>
2283 * elf32-i386.c (elf_i386_link_hash_entry): Remove redundant
2284 "symbol" in comments.
2285 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Likewise.
2287 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
2290 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for
2291 R_X86_64_PC32 relocation run-time overflow and unresolvable
2292 R_X86_64_32S relocation with -z nocopyreloc.
2294 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
2296 * elf32-i386.c (elf_i386_check_relocs): Revert the last change.
2297 Undefined symbols may not have a type.
2298 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
2300 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
2302 * elf64-x86-64.c (elf_x86_64_need_pic): Add an argument for
2303 bfd_link_info. Report shared, PIE or PDE object based on
2305 (elf_x86_64_check_relocs): Update elf_x86_64_need_pic call.
2306 (elf_x86_64_relocate_section): Likewise.
2308 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
2310 * elf32-i386.c (elf_i386_check_relocs): Increment PLT count only
2311 for function symbols.
2312 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
2314 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
2316 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set
2317 extern_protected_data to FALSE if GNU_PROPERTY_NO_COPY_ON_PROTECTED
2318 is set on any input relocatable file.
2319 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
2321 2017-08-23 Alan Modra <amodra@gmail.com>
2324 * elf64-ppc.c (ensure_undef_dynamic): Rename from
2325 ensure_undefweak_dynamic. Handle undefined too.
2326 * elf32-ppc.c (ensure_undef_dynamic): Likewise.
2327 * elf32-hppa.c (ensure_undef_dynamic): Likewise.
2328 (allocate_dynrelocs): Discard undefined non-default visibility
2329 relocs first. Make undefined syms dynamic. Tidy goto.
2331 2017-08-21 Alan Modra <amodra@gmail.com>
2332 H.J. Lu <hongjiu.lu@intel.com>
2335 * elf-bfd.h (SYMBOLIC_BIND): Return TRUE for __start/__stop symbols.
2336 * elflink.c (bfd_elf_define_start_stop): Rewrite.
2338 2017-08-21 Hans-Peter Nilsson <hp@bitrange.com>
2341 * elf64-mmix.c (mmix_elf_relax_section): Correct handling of
2342 undefined weak symbols.
2344 2017-08-18 Nick Clifton <nickc@redhat.com>
2347 * tekhex.c (getsym): Fix check for source pointer walking off the
2348 end of the input buffer.
2350 2017-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
2353 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Skip IFUNC
2354 relocations in debug sections, change abort to _bfd_error_handler.
2356 2017-08-14 Nick Clifton <nickc@redhat.com>
2359 * elf.c (setup_group): Check for an empty or very small group
2361 * po/bfd.pot: Regenerate.
2363 2017-08-14 Alan Modra <amodra@gmail.com>
2366 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't add
2367 alignment padding here.
2368 * elflink.c (bfd_elf_discard_info): Add .eh_frame padding here
2369 in a reverse pass over sections.
2371 2017-08-11 H.J. Lu <hongjiu.lu@intel.com>
2374 * elf32-i386.c (elf_i386_get_synthetic_symtab): Allocate space
2375 for @plt suffixes first.
2376 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
2378 2017-08-08 Nick Clifton <nickc@redhat.com>
2381 * elf-attrs.c (_bfd_elf_parse_attributes): Complain about very
2382 small section lengths.
2383 * elf.c (_bfd_elf_setup_sections): Skip empty entries in the group
2385 (elfcore_grok_freebsd_prstatus): Add checks to make sure that
2386 there is enough data present in the note.
2388 2017-08-08 Alan Modra <amodra@gmail.com>
2391 * elf32-microblaze.c (microblaze_elf_check_relocs): Don't bump
2392 got.refcount for GOTOFF relocs, just create .got section.
2394 2017-08-07 H.J. Lu <hongjiu.lu@intel.com>
2396 * elflink.c (elf_link_add_object_symbols): Move common symbol
2397 check after bed->common_definition.
2399 2017-08-07 Alan Modra <amodra@gmail.com>
2402 * elflink.c (bfd_elf_final_link): Don't segfault when sections
2403 needed to define various dynamic tags have been discarded.
2405 2017-08-07 Nick Clifton <nickc@redhat.com>
2408 * elf32-i386.c (elf_i386_link_setup_gnu_properties): If the dynobj
2409 has not been set then use the bfd returned by
2410 _bfd_elf_link_setup_gnu_properties. If that is null then search
2411 through all the input bfds selecting the first normal, ELF format
2413 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
2415 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
2417 * elf32-i386.c (elf_i386_link_hash_entry): Change tls_get_addr
2419 (elf_i386_link_hash_newfunc): Initialize tls_get_addr to 0.
2420 (elf_i386_check_tls_transition): Check tls_get_addr directly.
2421 (elf_i386_convert_load_reloc): Update tls_get_addr check.
2422 (elf_i386_link_check_relocs): New function.
2423 (bfd_elf32_bfd_link_check_relocs): New.
2424 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Change tls_get_addr
2426 (elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 0.
2427 (elf_x86_64_check_tls_transition): Check tls_get_addr directly.
2428 (elf_x86_64_convert_load_reloc): Update tls_get_addr check.
2429 (elf_x86_64_link_check_relocs): New function.
2430 (bfd_elf64_bfd_link_check_relocs): New.
2431 (bfd_elf32_bfd_link_check_relocs): Likewise.
2433 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
2436 * elflink.c (elf_link_add_object_symbols): Treat common symbol
2437 as undefined for --no-define-common.
2439 2017-08-05 Alan Modra <amodra@gmail.com>
2441 * elf32-hppa.c (elf32_hppa_set_gp): Don't require an
2442 hppa_link_hash_table.
2444 2017-08-02 Max Filippov <jcmvbkbc@gmail.com>
2446 * xtensa-isa.c (xtensa_isa_init): Don't update lookup table
2447 entries for sysregs with negative indices.
2449 2017-08-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2451 * elf32-s390.c (elf_s390_finish_dynamic_sections): Skip if it
2452 isn't the S/390 specific elf data.
2453 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
2455 2017-07-31 Kuan-Lin Chen <rufus@andestech.com>
2457 * elfxx-riscv.c (riscv_elf_add_sub_reloc): New function.
2458 * (howto_table) [R_RISCV_ADD8]: Use riscv_elf_add_sub_reloc.
2459 [R_RISCV_ADD16]: Likewise.
2460 [R_RISCV_ADD32]: Likewise.
2461 [R_RISCV_ADD64]: Likewise.
2462 [R_RISCV_SUB6]: Likewise.
2463 [R_RISCV_SUB8]: Likewise.
2464 [R_RISCV_SUB16]: Likewise.
2465 [R_RISCV_SUB32]: Likewise.
2466 [R_RISCV_SUB64]: Likewise.
2468 2017-07-31 Alan Modra <amodra@gmail.com>
2470 * elf64-ppc.c (ppc64_elf_tls_setup): Warn on --plt-localentry
2471 without ld.so checks.
2473 2017-07-29 Alan Modra <amodra@gmail.com>
2476 * elf64-ppc.c (struct ppc_link_hash_entry): Add non_zero_localentry.
2477 (ppc64_elf_merge_symbol): Set non_zero_localentry.
2478 (is_elfv2_localentry0): Test non_zero_localentry.
2479 (ppc64_elf_tls_setup): Default to --no-plt-localentry.
2481 2017-07-28 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2483 * elf32-s390.c (elf_s390_finish_dynamic_sections): Add NULL
2484 pointer check for htab->elf.irelplt.
2485 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
2487 2017-07-27 Nick Clifton <nickc@redhat.com>
2490 * mach-o.c (bfd_mach_o_read_symtab_strtab): Fail if the symtab
2492 * nlmcode.h (nlm_swap_auxiliary_headers_in): Replace assertion
2494 * section.c (bfd_make_section_with_flags): Fail if the name or bfd
2496 * vms-alpha.c (bfd_make_section_with_flags): Correct computation
2498 (evax_bfd_print_emh): Check for invalid string lengths.
2500 2017-07-25 Nick Clifton <nickc@redhat.com>
2502 * po/fr.po: Updated French translation.
2504 2017-07-25 Benjamin Green <bengreen5mx@gmail.com>
2507 * elf32-msp430.c (msp430_elf_relax_section): Allow conversion of
2508 16-bit absolute branches into 10-bit pc-relative branches on the
2509 MSP430 as well as the MSP430X.
2511 2017-07-25 Alan Modra <amodra@gmail.com>
2513 * elf64-ppc.c (struct map_stub): Add tls_get_addr_opt_bctrl.
2514 (stub_eh_frame_size): New function.
2515 (ppc_size_one_stub): Set group tls_get_addr_opt_bctrl.
2516 (group_sections): Init group tls_get_addr_opt_bctrl.
2517 (ppc64_elf_size_stubs): Update sizing and initialization of
2518 .eh_frame. Iteration over stubs via group list.
2519 (ppc64_elf_build_stubs): Iterate over stubs via group list.
2520 (ppc64_elf_finish_dynamic_sections): Update finalization of
2523 2017-07-24 Nick Clifton <nickc@redhat.com>
2526 * mach-o.c (bfd_mach_o_canonicalize_relocs): Pass the base address
2527 of the relocs to the canonicalize_one_reloc routine.
2528 * mach-o.h (struct bfd_mach_o_backend_data): Update the prototype
2529 for the _bfd_mach_o_canonicalize_one_reloc field.
2530 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add
2531 res_base parameter. Use to check for corrupt pair relocs.
2532 * mach-o-aarch64.c (bfd_mach_o_arm64_canonicalize_one_reloc):
2534 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc):
2536 * mach-o-x86-64.c (bfd_mach_o_x86_64_canonicalize_one_reloc):
2539 * vms-alpha.c (_bfd_vms_slurp_eihd): Make sure that there is
2540 enough data in the record before attempting to parse it.
2541 (_bfd_vms_slurp_eeom): Likewise.
2543 (_bfd_vms_slurp_egsd): Check for an invalid section index.
2544 (image_set_ptr): Likewise.
2545 (alpha_vms_slurp_relocs): Likewise.
2547 (alpha_vms_object_p): Check for a truncated record.
2549 2017-07-24 Nick Clifton <nickc@redhat.com>
2552 * reloc.c (_bfd_unrecognized_reloc): New function. Reports
2553 an unrecognized reloc and sets the bfd_error value.
2554 * libbfd.h: Regenerate.
2555 * elf32-arm.c (elf32_arm_final_link_relocate): Use the new
2557 * elf32-i386.c (elf_i386_relocate_section): Likewise.
2558 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
2559 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
2560 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.
2561 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
2563 2017-07-23 Alan Modra <amodra@gmail.com>
2565 * elf64-ppc.c (ppc64_elf_size_stubs): Correct advance to
2568 2017-07-19 Szabolcs Nagy <szabolcs.nagy@arm.com>
2571 * elfnn-aarch64.c (elfNN_aarch64_reloc_type_class): Return
2572 reloc_class_ifunc for ifunc symbols.
2574 2017-07-19 Nick Clifton <nickc@redhat.com>
2577 * archive.c (bfd_generic_archive_p): If the bfd does not have the
2578 correct magic bytes at the start, set the error to wrong format
2579 and clear the format selector before returning NULL.
2581 2017-07-19 Nick Clifton <nickc@redhat.com>
2584 * coff-rs6000.c (_bfd_strntol): New function.
2585 (_bfd_strntoll): New function.
2586 (GET_VALUE_IN_FIELD): New macro.
2587 (EQ_VALUE_IN_FIELD): new macro.
2588 (_bfd_xcoff_slurp_armap): Use new macros.
2589 (_bfd_xcoff_archive_p): Likewise.
2590 (_bfd_xcoff_read_ar_hdr): Likewise.
2591 (_bfd_xcoff_openr_next_archived_file): Likewise.
2592 (_bfd_xcoff_stat_arch_elt): Likewise.
2593 * coff64-rs6000.c (_bfd_strntol): New function.
2594 (_bfd_strntoll): New function.
2595 (GET_VALUE_IN_FIELD): New macro.
2596 (xcoff64_slurp_armap): Use new macros.
2598 2017-07-19 Claudiu Zissulescu <claziss@synopsys.com>
2599 John Eric Martin <John.Martin@emmicro-us.com>
2601 * bfd-in2.h: Regenerate.
2602 * libbfd.h: Regenerate.
2603 * elf32-arc.c (JLI): Define.
2604 * reloc.c: Add JLI relocations.
2606 2017-07-18 Nick Clifton <nickc@redhat.com>
2609 * coff-sh.c: Fix spelling typos.
2610 * compress.c: Likewise.
2611 * cpu-pdp11.c: Likewise.
2612 * ecofflink.c: Likewise.
2613 * elf-m10300.c: Likewise.
2615 * elf32-arm.c: Likewise.
2616 * elf32-m68k.c: Likewise.
2617 * elf32-nds32.c: Likewise.
2618 * elf32-ppc.c: Likewise.
2619 * elf32-sh.c: Likewise.
2620 * elf32-v850.c: Likewise.
2621 * elf64-ppc.c: Likewise.
2622 * elf64-x86-64.c: Likewise.
2623 * elflink.c: Likewise.
2624 * elfnn-aarch64.c: Likewise.
2625 * elfxx-mips.c: Likewise.
2627 * sunos.c: Likewise.
2628 * vms-alpha.c: Likewise.
2629 * xcofflink.c: Likewise.
2631 2017-07-18 Nick Clifton <nickc@redhat.com>
2634 * coffcode.h (handle_COMDAT): Replace abort with an error message
2637 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
2640 * elf64-x86-64.c (elf_x86_64_relocate_section): Limit PIC check
2643 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
2645 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
2647 2017-07-16 Alan Modra <amodra@gmail.com>
2649 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimize
2650 __tls_index GOT entries when using __tls_get_addr_opt stub.
2651 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2653 2017-07-12 Alan Modra <amodra@gmail.com>
2655 * po/es.po: Update from translationproject.org/latest/bfd/.
2656 * po/fi.po: Likewise.
2657 * po/fr.po: Likewise.
2658 * po/id.po: Likewise.
2659 * po/ja.po: Likewise.
2660 * po/ro.po: Likewise.
2661 * po/ru.po: Likewise.
2662 * po/sr.po: Likewise.
2663 * po/sv.po: Likewise.
2664 * po/tr.po: Likewise.
2665 * po/uk.po: Likewise.
2666 * po/vi.po: Likewise.
2667 * po/zh_CN.po: Likewise.
2668 * po/hr.po: New file from translationproject.org.
2669 * configure.ac (ALL_LINGUAS): Add hr. Sort.
2670 * configure: Regenerate.
2672 2017-07-12 Nick Clifton <nickc@redhat.com>
2674 Fix compile time warnings using gcc 7.1.1.
2675 * elf32-xtensa.c (elf_xtensa_get_plt_section): Increase length of
2677 (elf_xtensa_get_gotplt_section): Increase length of got_name
2679 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add a
2680 default return of FALSE.
2681 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc): Add a
2682 default return of FALSE.
2684 2017-07-12 Alan Modra <amodra@gmail.com>
2686 * binary.c (binary_set_section_contents): Don't print filepos in
2688 (coff_write_object_contents): Cast size_t for error message.
2689 (coff_slurp_line_table): Don't use bfd_vma symndx.
2690 (coff_slurp_reloc_table): Remove unneeded cast.
2691 * dwarf2.c (read_section): Cast bfd_int64_t to long long for
2693 (find_abstract_instance_name): Likewise.
2694 * elf32-arm.c (arm_type_of_stub): Correct error arg order.
2695 (bfd_elf32_arm_stm32l4xx_erratum_scan): Don't cast error arg.
2696 (elf32_arm_check_relocs): Make r_symndx an int.
2697 * elf32-cris.c (cris_elf_check_relocs): Delete extraneous %s in
2699 * elf32-metag.c (elf_metag_relocate_section): Delete extra error
2701 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Rewrite bogus
2703 * elf32-i386.c (elf_i386_check_relocs): Make r_symndx an int.
2704 * elf32-s390.c (elf_s390_check_relocs): Likewise.
2705 * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
2706 * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
2707 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
2708 * elf64-s390.c (elf_s390_check_relocs): Likewise.
2709 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
2710 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
2711 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
2712 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
2713 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
2714 * elf64-mmix.c (_bfd_mmix_after_linker_allocation): Cast size_t args
2715 and use %lu for error message.
2716 * elflink.c (elf_link_adjust_relocs): Delete extra error message arg.
2717 * mmo.c (mmo_scan): Make stab_loc a file_ptr. Cast expression for
2720 * elf32-arm.c (elf32_arm_tls_relax): Correct format string and args
2722 (elf32_arm_final_link_relocate): Likewise.
2723 * coff-arm.c (bfd_arm_process_before_allocation): Likewise.
2724 * coffcode.h (styp_to_sec_flags): Likewise.
2725 * cofflink.c (_bfd_coff_write_global_sym): Likewise.
2726 * ecoff.c (_bfd_ecoff_slurp_symbol_table): Likewise.
2727 * elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise.
2728 * elf32-bfin.c (bfinfdpic_check_relocs): Likewise.
2729 (elf32_bfin_merge_private_bfd_data): Likewise.
2730 * elf32-cris.c (cris_elf_relocate_section): Likewise.
2731 * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
2732 * elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise.
2733 (i370_elf_relocate_section): Likewise.
2734 * elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise.
2735 * elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise.
2736 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
2737 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
2738 * elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise.
2739 * elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise.
2740 * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
2741 * elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise.
2742 (_bfd_mips_elf_merge_private_bfd_data): Likewise.
2743 * ieee.c (ieee_write_id, read_id): Likewise.
2744 * mach-o.c (bfd_mach_o_write_contents): Likewise.
2745 (bfd_mach_o_layout_commands, bfd_mach_o_read_section_32): Likewise.
2746 (bfd_mach_o_read_section_64, bfd_mach_o_read_symtab_symbol): Likewise.
2747 (bfd_mach_o_read_command, bfd_mach_o_header_p): Likewise.
2748 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Likewise.
2749 * stabs.c (_bfd_link_section_stabs): Likewise.
2751 * coff-arm.c (coff_arm_relocate_section): Use L modifier in error
2753 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
2754 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
2755 * coff-rs6000.c (xcoff_reloc_type_toc): Likewise.
2756 * coff-sh.c (sh_relax_section): Likewise.
2757 (sh_relax_delete_bytes, sh_swap_insns): Likewise.
2758 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
2759 * coffcode.h (coff_slurp_reloc_table): Likewise.
2760 * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
2761 (_bfd_coff_read_string_table): Likewise.
2762 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
2763 * compress.c (bfd_get_full_section_contents): Likewise.
2764 * dwarf2.c (read_formatted_entries, decode_line_info): Likewise.
2765 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
2766 * elf.c (bfd_elf_string_from_elf_section): Likewise.
2767 * elf32-arc.c (arc_special_overflow_checks): Likewise.
2768 * elf32-arm.c (elf32_arm_tls_relax): Likewise.
2769 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Likewise.
2770 (elf32_arm_write_section): Likewise.
2771 * elf32-bfin.c (bfin_relocate_section): Likewise.
2772 (bfinfdpic_relocate_section): Likewise.
2773 * elf32-hppa.c (hppa_build_one_stub): Likewise.
2774 (final_link_relocate, elf32_hppa_relocate_section): Likewise.
2775 * elf32-i386.c (elf_i386_tls_transition): Likewise.
2776 (elf_i386_relocate_section): Likewise.
2777 * elf32-ip2k.c (ip2k_final_link_relocate): Likewise.
2778 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
2779 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
2780 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
2781 * elf32-metag.c (elf_metag_relocate_section): Likewise.
2782 * elf32-nds32.c (unrecognized_reloc_msg): Likewise.
2783 (nds32_elf_relax_longcall1, nds32_elf_relax_longcall2): Likewise.
2784 (nds32_elf_relax_longcall3, nds32_elf_relax_longjump1): Likewise.
2785 (nds32_elf_relax_longjump2, nds32_elf_relax_longjump3): Likewise.
2786 (nds32_elf_relax_longcall4, nds32_elf_relax_longcall5): Likewise.
2787 (nds32_elf_relax_longcall6, nds32_elf_relax_longjump4): Likewise.
2788 (nds32_elf_relax_longjump5, nds32_elf_relax_longjump6): Likewise.
2789 (nds32_elf_relax_longjump7, nds32_elf_relax_loadstore): Likewise.
2790 (nds32_elf_relax_ptr, nds32_elf_ex9_build_hash_table): Likewise.
2791 * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
2792 * elf32-rx.c (UNSAFE_FOR_PID): Likewise.
2793 * elf32-s390.c (invalid_tls_insn, elf_s390_relocate_section): Likewise.
2794 * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
2795 * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
2796 * elf32-sh.c (sh_elf_relax_section): Likewise.
2797 (sh_elf_relax_delete_bytes, sh_elf_swap_insns): Likewise.
2798 (sh_elf_relocate_section): Likewise.
2799 * elf32-sh64.c (shmedia_prepare_reloc): Likewise.
2800 * elf32-spu.c (spu_elf_relocate_section): Likewise.
2801 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
2802 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
2803 * elf32-v850.c (v850_elf_relax_section): Likewise.
2804 * elf32-vax.c (elf_vax_check_relocs): Likewise.
2805 (elf_vax_relocate_section): Likewise.
2806 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
2807 (extend_ebb_bounds_forward, extend_ebb_bounds_backward): Likewise.
2808 (compute_text_actions, compute_ebb_proposed_actions): Likewise.
2809 (do_fix_for_relocatable_link): Likewise.
2810 * elf64-alpha.c (elf64_alpha_relax_got_load): Likewise.
2811 (elf64_alpha_relax_with_lituse): Likewise.
2812 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Likewise.
2813 (elf_hppa_final_link_relocate): Likewise.
2814 * elf64-ia64-vms.c (elf64_ia64_relax_section): Likewise.
2815 (elf64_ia64_choose_gp, elf64_ia64_relocate_section): Likewise.
2816 (elf64_vms_link_add_object_symbols): Likewise.
2817 * elf64-mmix.c (mmix_elf_perform_relocation): Likewise.
2818 (mmix_final_link_relocate): Likewise.
2819 * elf64-s390.c (invalid_tls_insn): Likewise.
2820 (elf_s390_relocate_section): Likewise.
2821 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
2822 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
2823 (elf_x86_64_relocate_section): Likewise.
2824 * elfcode.h (elf_slurp_symbol_table): Likewise.
2825 * elfcore.h (elf_core_file_p): Likewise.
2826 * elflink.c (elf_link_read_relocs_from_section): Likewise.
2827 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
2828 (elfNN_aarch64_relocate_section): Likewise.
2829 * elfnn-ia64.c (elfNN_ia64_relax_section): Likewise.
2830 (elfNN_ia64_choose_gp, elfNN_ia64_relocate_section): Likewise.
2831 * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
2832 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
2833 (_bfd_mips_elf_relocate_section): Likewise.
2834 (_bfd_mips_elf_finish_dynamic_symbol, mips_finish_exec_plt): Likewise.
2835 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
2836 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
2837 * ieee.c (ieee_slurp_external_symbols): Likewise.
2838 * ihex.c (ihex_write_object_content): Likewise.
2839 * mach-o.c (bfd_mach_o_build_exec_seg_command): Likewise.
2840 * merge.c (_bfd_merged_section_offset): Likewise.
2841 * mmo.c (mmo_write_loc_chunk): Likewise.
2842 (mmo_write_object_contents): Likewise.
2843 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Likewise.
2844 * stabs.c (_bfd_link_section_stabs): Likewise.
2845 * xcofflink.c (xcoff_link_add_symbols, xcoff_find_tc0): Likewise.
2847 2017-07-11 Alan Modra <amodra@gmail.com>
2849 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo.
2851 2017-07-11 Alan Modra <amodra@gmail.com>
2853 * elf32-ppc.c (ppc_elf_relocate_section): Emit "unexpected
2854 instruction" error using _bfd_error_handler, not einfo.
2856 2017-07-10 Nick Clifton <nickc@redhat.com>
2858 * coffcode.h (coff_slurp_symbol_table): Do not include an entry
2859 for C_AIX_WEAKEXT if it has the same value as C_WEAKEXT.
2861 2017-07-07 John Baldwin <jhb@FreeBSD.org>
2863 * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PTLWPINFO.
2865 2017-07-07 Alan Modra <amodra@gmail.com>
2867 * coffcode.h (coff_slurp_symbol_table): Handle C_AIX_WEAKEXT.
2869 2017-07-07 Alan Modra <amodra@gmail.com>
2871 * bfd.c (_doprnt): Replace "L" with "ll" when printing bfd_vma
2872 as long long. Move code replacing "ll" with "I64", and simplify.
2874 2017-07-06 H.J. Lu <hongjiu.lu@intel.com>
2876 * bfd.c (_doprnt): Convert 'L' to 'l' when setting wide_width
2879 2017-07-05 H.J. Lu <hongjiu.lu@intel.com>
2881 * dwarf2.c (line_info_add_include_dir_stub): Replace time with
2883 (line_info_add_file_name): Likewise.
2884 (decode_line_info): Likewise.
2886 2017-07-04 Tristan Gingold <gingold@adacore.com>
2888 * version.m4: Bump version to 2.29.51
2889 * configure: Regenerate.
2891 2017-07-04 Jiong Wang <jiong.wang@arm.com>
2893 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Remove the
2894 sanity check at the head of this function.
2896 2017-07-04 Jan Kratochvil <jan.kratochvil@redhat.com>
2898 * dwarf2.c (struct dwarf2_debug): Add fields dwarf_line_str_buffer and
2899 dwarf_line_str_size.
2900 (struct attr_abbrev): Add field implicit_const.
2901 (dwarf_debug_sections): Add .debug_line_str.
2902 (enum dwarf_debug_section_enum): Add debug_line_str and debug_max.
2903 (dwarf_debug_section_assert): Add static assertion.
2904 (read_indirect_line_string): New.
2905 (read_abbrevs): Support DW_FORM_implicit_const.
2906 (is_str_attr): Support DW_FORM_line_strp.
2907 (read_attribute_value): Support DW_FORM_line_strp and
2908 DW_FORM_implicit_const.
2909 (read_attribute): Support DW_FORM_implicit_const.
2910 (line_info_add_include_dir, line_info_add_include_dir_stub):
2911 (line_info_add_file_name, read_formatted_entries): New.
2912 (decode_line_info, parse_comp_unit): Support DWARF 5.
2913 (_bfd_dwarf2_cleanup_debug_info): Free dwarf_line_str_buffer.
2915 2017-07-03 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
2917 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove the
2918 abort statement that was put for symbols that are not dynamic.
2920 2017-07-03 Tristan Gingold <gingold@adacore.com>
2922 * po/bfd.pot: Regenerate
2924 2017-07-03 Alan Modra <amodra@gmail.com>
2926 * bfd.c (_doprnt): Rewrite "ll" and "L" modifiers to "I64" for
2927 __MSVCRT__. Support "L" modifier for bfd_vma. Formatting.
2928 * elf.c (setup_group): Use "Lx" to print sh_size.
2929 (_bfd_elf_setup_sections): Remove unnecessary cast and print
2930 unknown section type in hex.
2931 (copy_special_section_fields): Style fix.
2932 (bfd_section_from_shdr): Correct format for sh_link. Use a
2933 common error message for all the variants of unrecognized
2935 (assign_file_positions_for_load_sections): Use "Lx" for lma
2936 adjust error message.
2937 (assign_file_positions_for_non_load_sections): Formatting.
2938 (rewrite_elf_program_header): Formatting. Use "Lx" for
2939 bfd_vma values in error messages.
2940 * elfcode.h (elf_slurp_reloc_table_from_section): Cast
2941 ELF_R_SYM value to type expected by format.
2942 * elflink.c (elf_link_read_relocs_from_section): Use "Lx"
2944 (elf_link_add_object_symbols): Use "Lu" for symbol sizes.
2945 (elf_link_input_bfd): Use "Lx" for r_info.
2946 (bfd_elf_gc_record_vtinherit): Use "Lx" for offset.
2948 2017-07-03 Alan Modra <amodra@gmail.com>
2950 * bfd.c (bfd_scan_vma): Don't use long long unless HAVE_LONG_LONG.
2951 * coff-rs6000.c (FMT20): Handle hosts with 64-bit long and
2952 Microsoft C library variant of long long format specifier.
2953 (PRINT20): Cast value to bfd_uint64_t not long long.
2954 * coffcode.h (coff_print_aux): Use BFD_VMA_FMT.
2955 * coff-x86_64.c (coff_amd64_reloc): Use bfd_uint64_t rather than
2956 long long. Don't cast to bfd_vma.
2957 * elf32-score.c (score3_bfd_getl48): Likewise.
2958 * vms-alpha.c (_bfd_vms_slurp_eisd): Likewise.
2960 2017-07-03 Alan Modra <amodra@gmail.com>
2962 * elf.c (_bfd_elf_print_private_bfd_data): Use BFD_VMA_FMT to
2964 (bfd_elf_print_symbol): Don't cast symbol->flags.
2965 (_bfd_elf_symbol_from_bfd_symbol): Likewise.
2966 * elf32-ppc.c (ppc_elf_begin_write_processing): Correct
2967 _bfd_error_handler argument order.
2968 (ppc_elf_merge_private_bfd_data): Don't cast flags.
2970 2017-07-03 Alan Modra <amodra@gmail.com>
2972 * configure.ac: Invoke AC_CHECK_TYPES for long long. Invoke
2973 AC_TYPE_LONG_DOUBLE.
2974 * configure: Regenerate.
2975 * config.in: Regenerate.
2977 2017-06-29 Andrew Waterman <andrew@sifive.com>
2979 * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Fix TLS copy
2982 2017-06-29 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
2984 * elfxx-sparc.c (allocate_dynrelocs): Don't make a symbol dynamic
2985 unless it is undefined weak.
2986 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Set the flag
2987 relative_reloc to direct non-dynamic symbols to R_SPARC_RELATIVE
2989 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): If symbol
2990 is not dynamic in PIC, abort.
2992 2017-06-29 Jiong Wang <jiong.wang@arm.com>
2995 * elfnn-aarch64.c (elfNN_aarch64_allocate_dynrelocs): Only make
2996 undefined weak symbols into dynamic.
2997 (elfNN_aarch64_final_link_relocate): Generate runtime RELATIVE
2998 relocation for non-dynamic symbols.
2999 (elfNN_aarch64_finish_dynamic_symbol): Add sanity check.
3001 2017-06-29 Jiong Wang <jiong.wang@arm.com>
3003 * elfnn-aarch64.c (aarch64_relocation_aginst_gp_p): New function.
3004 (elfNN_aarch64_final_link_relocate): Delete duplicated code for
3005 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15, BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
3006 BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
3007 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Optimize the
3010 2017-06-29 Andreas Arnez <arnez@linux.vnet.ibm.com>
3012 * elf-bfd.h (elfcore_write_s390_gs_cb): Add prototype.
3013 (elfcore_write_s390_gs_bc): Likewise.
3014 * elf.c (elfcore_grok_s390_gs_cb): New function.
3015 (elfcore_grok_s390_gs_bc): New function.
3016 (elfcore_grok_note): Call them.
3017 (elfcore_write_s390_gs_cb): New function.
3018 (elfcore_write_s390_gs_bc): New function.
3019 (elfcore_write_register_note): Call them.
3021 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
3023 * libbfd.c (_bfd_generic_get_section_contents): Don't call
3024 bfd_get_file_size. Check archive element size.
3025 (_bfd_generic_get_section_contents_in_window): Likewise.
3027 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
3029 * bfd-in2.h: Regenerated.
3030 * bfdio.c (bfd_get_size): Change return type to ufile_ptr.
3031 (bfd_get_file_size): Likewise.
3033 2017-06-28 Maciej W. Rozycki <macro@imgtec.com>
3034 Matthew Fortune <matthew.fortune@imgtec.com>
3036 * archures.c (bfd_mach_mips_interaptiv_mr2): New macro.
3037 * cpu-mips.c (I_interaptiv_mr2): New enum value.
3038 (arch_info_struct): Add "mips:interaptiv-mr2" entry.
3039 * elfxx-mips.c (_bfd_elf_mips_mach) <E_MIPS_MACH_IAMR2>: New
3041 (mips_set_isa_flags) <bfd_mach_mips_interaptiv_mr2>: Likewise.
3042 (bfd_mips_isa_ext) <bfd_mach_mips_interaptiv_mr2>: Likewise.
3043 (print_mips_isa_ext) <AFL_EXT_INTERAPTIV_MR2>: Likewise.
3044 (mips_mach_extensions): Add `bfd_mach_mipsisa32r3' and
3045 `bfd_mach_mips_interaptiv_mr2' entries.
3046 * bfd-in2.h: Regenerate.
3048 2017-06-27 Nick Clifton <nickc@redhat.com>
3050 * tekhex.c (pass_over): Revert accidental conversion of a local
3051 array to a static array.
3053 2017-06-27 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
3056 * elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Adjust
3057 reloc addend if necessary. Adjust diff only if
3058 shrinked_insn_address < end_address.
3060 2017-06-27 Alan Modra <amodra@gmail.com>
3063 * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
3064 (_bfd_generic_get_section_contents_in_window): Likewise.
3066 2017-06-26 Kuan-Lin Chen <rufus@andestech.com>
3068 * elfnn-riscv.c (perform_relocation): Support the new
3069 R_RISCV_32_PCREL relocation.
3070 (riscv_elf_relocate_section): Likewise.
3071 * elfxx-riscv.c (howto_table): Likewise.
3072 (riscv_reloc_map): Likewise.
3073 * bfd-in2.h (BFD_RELOC_RISCV_32_PCREL): New relocation.
3074 * libbfd.h: Regenerate.
3076 2017-06-27 Alan Modra <amodra@gmail.com>
3079 * libbfd.c (_bfd_generic_get_section_contents): Delete abort.
3080 Use unsigned file pointer type, and remove cast.
3081 * libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise.
3082 Add "count", not "sz".
3084 2017-06-26 Pedro Alves <palves@redhat.com>
3087 * libbfd.c (_bfd_generic_get_section_contents): Add "count", not
3090 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
3093 * libbfd.c (_bfd_generic_get_section_contents_in_window): Add
3096 2017-06-26 Maciej W. Rozycki <macro@imgtec.com>
3098 * cpu-mips.c (arch_info_struct): Mark the 4010 32-bit.
3099 * elfxx-mips.c (mips_set_isa_flags) <bfd_mach_mips4010>: Set
3100 E_MIPS_ARCH_2 rather than E_MIPS_ARCH_3 in `e_flags'.
3101 (mips_mach_extensions): Mark `bfd_mach_mips4010' as extending
3102 `bfd_mach_mips6000' rather than `bfd_mach_mips4000'.
3104 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
3107 * compress.c (bfd_get_full_section_contents): Don't check the
3109 * libbfd.c (_bfd_generic_get_section_contents): Check for and
3110 reject a section whose size + offset is greater than the size
3112 (_bfd_generic_get_section_contents_in_window): Likewise.
3114 2017-06-26 Nick Clifton <nickc@redhat.com>
3117 * tekhex.c (getvalue): Check for the source pointer exceeding the
3118 end pointer before the first byte is read.
3120 2017-06-26 Nick Clifton <nickc@redhat.com>
3123 * opncls.c (get_build_id): Check that the section is big enough
3124 to contain the whole note.
3125 * compress.c (bfd_get_full_section_contents): Check for and reject
3126 a section whose size is greater than the size of the entire file.
3127 * elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not
3128 contain a notes section.
3130 2017-06-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
3132 * elf64-s390.c (elf_s390_additional_program_headers): Add NULL
3134 (elf_s390_modify_segment_map): Likewise.
3135 (bfd_elf_s390_set_options): Lisewise.
3137 2017-06-26 Alan Modra <amodra@gmail.com>
3139 * elflink.c (_bfd_elf_link_create_dynstrtab): Don't make dynobj
3141 (_bfd_elf_size_group_sections): Skip --just-syms bfds.
3142 (bfd_elf_size_dynamic_sections): Ignore .note.GNU-stack and
3143 .preinit_array on --just-syms bfds.
3144 (_bfd_elf_gc_mark_extra_sections): Skip --just-syms bfds.
3145 (elf_gc_sweep, bfd_elf_parse_eh_frame_entries): Likewise.
3146 (bfd_elf_gc_sections, bfd_elf_discard_info): Likewise.
3148 2017-06-25 Sergei Trofimovich <slyfox@gentoo.org>
3150 * elf.c (find_link): Bounds check "hint".
3152 2017-06-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
3154 * elf32-arm.c (using_thumb_only): Update list of architectures in
3155 BFD_ASSERT for which the logic is valid.
3156 (using_thumb2_bl): Likewise.
3157 (using_thumb2): Likewise and return true for ARMv8-R.
3158 (arch_has_arm_nop): Likewise.
3159 (tag_cpu_arch_combine): New v8r table for ARMv8-R Tag_CPU_arch
3160 merging logic. Update commentis for value 15 of v8m_baseline,
3161 v8m_mainline and v4t_plus_v6_m arrays. Use v8r array to decide
3162 merging of value 15 of Tag_CPU_arch.
3164 2017-06-23 Jiong Wang <jiong.wang@arm.com>
3166 * reloc.c (BFD_RELOC_AARCH64_ADR_GOTPAGE): Rename to
3167 BFD_RELOC_AARCH64_ADR_GOT_PAGE
3168 * bfd-in2.h: Regenerate.
3170 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
3172 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Move
3173 the error_alignment label forward. Properly align program
3174 property note section.
3176 2017-06-22 Eric Christopher <echristo@gmail.com>
3178 * elf32-arm.c (elf32_arm_final_link_relocate): Use labs rather than
3179 abs to fix a truncation warning.
3181 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
3183 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Resolve
3184 local undefined weak symbol to 0.
3185 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Likewise.
3187 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
3189 * elf32-i386.c (elf_i386_merge_gnu_properties): If info->shstk
3190 is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
3191 (elf_i386_link_setup_gnu_properties): If info->shstk is set,
3192 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
3193 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): If
3194 info->shstk is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
3195 (elf_x86_64_link_setup_gnu_properties): If info->shstk is set,
3196 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
3198 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
3200 * elf32-i386.c (elf_i386_lazy_ibt_plt0_entry): New.
3201 (elf_i386_lazy_ibt_plt_entry): Likewise.
3202 (elf_i386_pic_lazy_ibt_plt0_entry): Likewise.
3203 (elf_i386_non_lazy_ibt_plt_entry): Likewise.
3204 (elf_i386_pic_non_lazy_ibt_plt_entry): Likewise.
3205 (elf_i386_eh_frame_lazy_ibt_plt): Likewise.
3206 (elf_i386_lazy_plt_layout): Likewise.
3207 (elf_i386_non_lazy_plt_layout): Likewise.
3208 (elf_i386_link_hash_entry): Add plt_second.
3209 (elf_i386_link_hash_table): Add plt_second and
3210 plt_second_eh_frame.
3211 (elf_i386_allocate_dynrelocs): Use the second PLT if needed.
3212 (elf_i386_size_dynamic_sections): Use .plt.got unwind info for
3213 the second PLT. Check the second PLT.
3214 (elf_i386_relocate_section): Use the second PLT to resolve
3215 PLT reference if needed.
3216 (elf_i386_finish_dynamic_symbol): Fill and use the second PLT if
3218 (elf_i386_finish_dynamic_sections): Set sh_entsize on the
3219 second PLT. Generate unwind info for the second PLT.
3220 (elf_i386_plt_type): Add plt_second.
3221 (elf_i386_get_synthetic_symtab): Support the second PLT.
3222 (elf_i386_parse_gnu_properties): Support
3223 GNU_PROPERTY_X86_FEATURE_1_AND.
3224 (elf_i386_merge_gnu_properties): Support
3225 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
3226 on GNU_PROPERTY_X86_FEATURE_1_IBT
3227 (elf_i386_link_setup_gnu_properties): If info->ibt is set,
3228 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
3229 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
3230 is set on all relocatable inputs.
3231 * elf64-x86-64.c (elf_x86_64_lazy_ibt_plt_entry): New.
3232 (elf_x32_lazy_ibt_plt_entry): Likewise.
3233 (elf_x86_64_non_lazy_ibt_plt_entry): Likewise.
3234 (elf_x32_non_lazy_ibt_plt_entry): Likewise.
3235 (elf_x86_64_eh_frame_lazy_ibt_plt): Likewise.
3236 (elf_x32_eh_frame_lazy_ibt_plt): Likewise.
3237 (elf_x86_64_lazy_ibt_plt): Likewise.
3238 (elf_x32_lazy_ibt_plt): Likewise.
3239 (elf_x86_64_non_lazy_ibt_plt): Likewise.
3240 (elf_x32_non_lazy_ibt_plt): Likewise.
3241 (elf_x86_64_get_synthetic_symtab): Support the second PLT.
3242 (elf_x86_64_parse_gnu_properties): Support
3243 GNU_PROPERTY_X86_FEATURE_1_AND.
3244 (elf_x86_64_merge_gnu_properties): Support
3245 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
3246 on GNU_PROPERTY_X86_FEATURE_1_IBT
3247 (elf_x86_64_link_setup_gnu_properties): If info->ibt is set,
3248 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
3249 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
3250 is set on all relocatable inputs.
3252 2017-06-22 Nick Clifton <nickc@redhat.com>
3255 * som.c (setup_sections): NUL terminate the space_strings buffer.
3256 Check that the space.name field does not index beyond the end of
3257 the space_strings buffer.
3259 2017-06-21 Nick Clifton <nickc@redhat.com>
3262 * coff-sh.c (sh_reloc): Check for an out of range reloc.
3264 2017-06-21 Nick Clifton <nickc@redhat.com>
3267 * vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as
3268 type of the size parameter.
3269 (_bfd_vms_save_counted_string): Add second parameter - the maximum
3270 length of the counted string.
3271 * vms.h (_bfd_vms_save_sized_string): Update prototype.
3272 (_bfd_vms_save_counted_string): Likewise.
3273 * vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to
3274 _bfd_vms_save_counted_string.
3275 (_bfd_vms_slurp_ehdr): Likewise.
3276 (_bfd_vms_slurp_egsd): Likewise.
3277 (Parse_module): Likewise.
3279 2017-06-21 Alan Modra <amodra@gmail.com>
3281 * elf64-ppc.c (ppc64_elf_size_stubs): Test for localentry:0 plt
3282 calls before tocsave calls.
3283 (ppc64_elf_relocate_section): Allow localentry:0 plt calls without
3286 2017-06-21 Nick Clifton <nickc@redhat.com>
3289 * reloc.c (bfd_generic_get_relocated_section_contents): Fail if
3290 bfd_get_full_section_contents returns no contents.
3292 2017-06-21 Nick Clifton <nickc@redhat.com>
3295 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized
3298 2017-06-21 Nick Clifton <nickc@redhat.com>
3301 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section
3303 (image_set_ptr): Likewise.
3304 (alpha_vms_fix_sec_rel): Likewise.
3305 (alpha_vms_slurp_relocs): Likewise.
3307 2017-06-21 Nick Clifton <nickc@redhat.com>
3310 * ieee.c (ieee_slurp_sections): Check for a NULL return from
3312 (ieee_archive_p): Likewise.
3313 (ieee_object_p): Likewise.
3315 2017-06-21 Nick Clifton <nickc@redhat.com>
3318 * elf.c (setup_group): Zero the group section pointer list after
3319 allocation so that loops can be caught. Check for NULL pointers
3320 when processing a group list.
3322 2017-06-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
3324 * elf-s390.h: New file.
3325 * elf64-s390.c (struct elf_s390_link_hash_table): Add params
3327 (elf_s390_additional_program_headers): New function.
3328 (elf_s390_modify_segment_map): New function.
3329 (bfd_elf_s390_set_options): New function.
3330 (elf_backend_additional_program_headers)
3331 (elf_backend_modify_segment_map): Add macro definitions.
3333 2017-06-19 H.J. Lu <hongjiu.lu@intel.com>
3336 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
3337 the DYNAMIC bit instead of bfd_count_sections.
3339 2017-06-19 Nick Clifton <nickc@redhat.com>
3342 * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record
3344 (evax_bfd_print_eeom): Likewise.
3345 (evax_bfd_print_egsd): Check for an overlarge record length.
3346 (evax_bfd_print_etir): Likewise.
3348 2017-06-19 Nick Clifton <nickc@redhat.com>
3351 * libieee.h (struct common_header_type): Add end_p field.
3352 * ieee.c (this_byte_and_next): Do not advance input_p beyond
3354 (read_id): Check for a length that exceeds the remaining bytes in
3356 (ieee_seek): Initialise end_p.
3357 (ieee_archive_p): Likewise.
3358 (ieee_object_p): Likewise.
3360 2017-06-19 Nick Clifton <nickc@redhat.com>
3363 * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset
3364 before reading the EIHS structure entries.
3366 2017-06-19 Nick Clifton <nickc@redhat.com>
3369 * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for
3370 gsd_size. Check that there are enough bytes remaining to read the
3371 type and size of the next egsd. Check that the size of the egsd
3372 does not exceed the size of the record.
3374 2017-06-19 Alan Modra <amodra@gmail.com>
3376 * config.bfd: Correct targ_underscore for cris.
3378 2017-06-18 Alan Modra <amodra@gmail.com>
3380 * config.bfd: Correct targ_underscore for epiphany, ip2k,
3381 m32c, mn10200, pru, rl78, rx, crisv32 and v850.
3383 2017-06-16 Nick Clifton <nickc@redhat.com>
3385 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
3386 bucketlist is empty because there are no symbols to add to the
3389 2017-06-16 Alan Modra <amodra@gmail.com>
3395 * targets.c (struct bfd_target): Add _bfd_define_start_stop.
3396 (BFD_JUMP_TABLE_LINK): Likewise.
3397 * elf-bfd.h (bfd_elf_define_start_stop): Declare.
3398 * elflink.c (_bfd_elf_gc_mark_rsec): Update comment.
3399 (bfd_elf_define_start_stop): New function.
3400 * linker.c (bfd_generic_define_start_stop): New function.
3401 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init
3403 * aout-adobe.c (aout_32_bfd_define_start_stop): Define.
3404 * aout-target.h (MY_bfd_define_start_stop): Define.
3405 * aout-tic30.c (MY_bfd_define_start_stop): Define.
3406 * binary.c (binary_bfd_define_start_stop): Define.
3407 * bout.c (b_out_bfd_define_start_stop): Define.
3408 * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define.
3409 * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define.
3410 * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define.
3411 * coffcode.h (coff_bfd_define_start_stop): Define.
3412 * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define.
3413 * i386msdos.c (msdos_bfd_define_start_stop): Define.
3414 * i386os9k.c (os9k_bfd_define_start_stop): Define.
3415 * ieee.c (ieee_bfd_define_start_stop): Define.
3416 * ihex.c (ihex_bfd_define_start_stop): Define.
3417 * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define.
3418 * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define.
3419 * mmo.c (mmo_bfd_define_start_stop): Define.
3420 * nlm-target.h (nlm_bfd_define_start_stop): Define.
3421 * oasys.c (oasys_bfd_define_start_stop): Define.
3422 * pef.c (bfd_pef_bfd_define_start_stop): Define.
3423 * plugin.c (bfd_plugin_bfd_define_start_stop): Define.
3424 * ppcboot.c (ppcboot_bfd_define_start_stop): Define.
3425 * som.c (som_bfd_define_start_stop): Define.
3426 * srec.c (srec_bfd_define_start_stop): Define.
3427 * tekhex.c (tekhex_bfd_define_start_stop): Define.
3428 * versados.c (versados_bfd_define_start_stop): Define.
3429 * vms-alpha.c (vms_bfd_define_start_stop): Define.
3430 (alpha_vms_bfd_define_start_stop): Define.
3431 * xsym.c (bfd_sym_bfd_define_start_stop): Define.
3432 * bfd-in2.h: Regenerate.
3433 * libbfd.h: Regenerate.
3435 2017-06-16 Jiong Wang <jiong.wang@arm.com>
3437 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
3438 SYMBOL_REFERENCES_LOCAL.
3440 2017-06-15 Jiong Wang <jiong.wang@arm.com>
3443 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
3444 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
3445 runtime for if there needs copy relocation elimination.
3446 (need_copy_relocation_p): New function. Return true for symbol with
3447 pc-relative references and if it's against read-only sections.
3448 (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
3449 (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
3450 that are related with accessing external objects.
3451 (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change
3452 in elfNN_aarch64_check_relocs.
3454 2017-06-15 Nick Clifton <nickc@redhat.com>
3457 * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
3460 (ieee_archive_p): Likewise.
3462 2017-06-15 Nick Clifton <nickc@redhat.com>
3465 * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
3467 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
3469 * elf32-xtensa.c (elf_xtensa_be_plt_entry,
3470 elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays,
3471 keep both windowed and call0 ABI PLT definitions.
3472 (elf_xtensa_create_plt_entry): Use selected ABI to choose upper
3473 elf_xtensa_*_plt_entry endex.
3474 (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size.
3476 2017-06-14 Nick Clifton <nickc@redhat.com>
3479 * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
3482 2017-06-14 Nick Clifton <nickc@redhat.com>
3485 * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
3486 maximum value for the ascic pointer. Check that name processing
3487 does not read beyond this value.
3488 (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
3491 2017-06-14 Nick Clifton <nickc@redhat.com>
3494 * versados.c (versados_mkobject): Zero the allocated tdata structure.
3495 (process_otr): Check for an invalid offset in the otr structure.
3497 2017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
3499 * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
3501 2017-06-13 H.J. Lu <hongjiu.lu@intel.com>
3507 * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
3508 vtable field to a union.
3509 (_bfd_elf_is_start_stop): Removed.
3510 * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
3511 __start_SECNAME and __stop_SECNAME symbols.
3512 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
3513 * elflink.c (_bfd_elf_is_start_stop): Removed.
3514 (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
3515 _bfd_elf_is_start_stop.
3516 (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
3517 __stop_SECNAME symbols. Updated.
3518 (elf_gc_smash_unused_vtentry_relocs): Likewise.
3519 (bfd_elf_gc_record_vtinherit): Likewise.
3520 (bfd_elf_gc_record_vtentry): Likewise.
3522 2017-06-13 Nick Clifton <nickc@redhat.com>
3525 * elflink.c (elf_link_adjust_relocs): Generate an error when
3526 encountering a reloc against a symbol removed by garbage
3529 2017-06-12 H.J. Lu <hongjiu.lu@intel.com>
3531 * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
3532 to merge_gnu_properties.
3533 * elf-properties.c (elf_merge_gnu_properties): Add struct
3534 bfd_link_info * and pass it to merge_gnu_properties.
3535 (elf_merge_gnu_property_list): Add struct bfd_link_info *
3536 and pass it to elf_merge_gnu_properties.
3537 (_bfd_elf_link_setup_gnu_properties): Pass info to
3538 elf_merge_gnu_property_list.
3539 * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
3541 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
3543 2017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
3546 * binary.c (binary_set_section_contents): Scale lma by octets
3547 per byte to set filepos.
3549 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3551 * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
3554 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3556 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
3559 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3561 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
3562 patched section contents for TLS IE reloc.
3563 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
3565 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3567 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
3568 RELOC_FOR_GLOBAL_SYMBOL macro.
3570 2018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3572 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
3575 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3577 * config/tc-arc.c (md_undefined_symbol): Changed.
3578 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
3580 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3582 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
3585 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3587 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
3588 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
3590 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3592 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
3595 2017-06-08 Richard Earnshaw <rearnsha@arm.com>
3597 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
3598 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
3599 is non-zero. Add clarifying comments.
3601 2017-06-08 H.J. Lu <hongjiu.lu@intel.com>
3603 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
3604 name. Use local IFUNC symbol name string to report unsupported
3605 non-PIC call to IFUNC function.
3606 (elf_i386_relocate_section): Dump local IFUNC name with minfo
3607 when generating R_386_IRELATIVE relocation.
3608 (elf_i386_finish_dynamic_symbol): Likewise.
3609 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
3611 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
3612 when generating R_X86_64_IRELATIVE relocation.
3613 (elf_x86_64_finish_dynamic_symbol): Likewise.
3615 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
3617 * elf.c (setup_group): Make sure BFD sections are created for all
3618 group sections in the input file when processing SHF_GROUP
3620 (bfd_section_from_shdr): Avoid duplicating logic already
3621 implemented in `setup_group'.
3623 2017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
3626 * peXXigen.c (pe_print_idata): Use the address of the first thunk
3627 if the hint address is zero.
3629 2017-06-06 James Clarke <jrtc27@jrtc27.com>
3632 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
3633 ELF_COMMON_DEF_P for common symbols.
3635 2017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
3637 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
3638 SEC_GROUP sections as SEC_EXCLUDE.
3639 (bfd_elf_set_group_contents): Replace use of abort with an assert.
3640 (assign_section_numbers): Use resolve_section_groups flag instead
3641 of relocatable link type.
3642 (_bfd_elf_init_private_section_data): Use resolve_section_groups
3643 flag instead of checking the final_link flag for part of the
3644 checks in here. Fix white space as a result.
3645 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
3646 instead of relocatable link type.
3647 (bfd_elf_final_link): Likewise.
3649 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
3651 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
3653 * elf32-score.c (score_elf_final_link_relocate): Likewise.
3654 (s3_bfd_score_elf_check_relocs): Likewise.
3655 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
3656 (score_elf_final_link_relocate): Likewise.
3657 (s7_bfd_score_elf_check_relocs): Likewise.
3659 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
3661 * elflink.c (init_reloc_cookie_rels): Remove unused variable
3664 2017-06-06 Maciej W. Rozycki <macro@imgtec.com>
3666 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
3667 from `reloc_count' rather than decrementing it.
3668 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
3669 `reloc_count' by `int_rels_per_ext_rel'.
3670 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
3671 `reloc_count' by `int_rels_per_ext_rel' for last relocation
3672 entry determination.
3673 (s3_bfd_score_elf_check_relocs): Likewise.
3674 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
3675 (s7_bfd_score_elf_relocate_section): Likewise.
3676 (s7_bfd_score_elf_check_relocs): Likewise.
3677 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
3678 prototype and function.
3679 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
3680 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
3681 triple rather than once the sum of REL and RELA relocation entry
3683 (bfd_elf64_get_reloc_upper_bound): Remove macro.
3684 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
3685 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
3686 storage allocation size determination.
3687 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
3688 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
3689 by `int_rels_per_ext_rel' for last relocation entry
3691 (bfd_elf_final_link): Do not multiply `reloc_count' by
3692 `int_rels_per_ext_rel' for internal relocation storage
3693 allocation size determination.
3694 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
3695 `int_rels_per_ext_rel' for last relocation entry determination.
3696 (elf_gc_smash_unused_vtentry_relocs): Likewise.
3697 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
3698 (_bfd_mips_elf_relocate_section): Likewise.
3700 2017-06-05 Alan Modra <amodra@gmail.com>
3703 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
3705 2017-06-01 John Baldwin <jhb@FreeBSD.org>
3707 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
3708 determine structure sizes.
3709 (elfcore_grok_freebsd_prstatus): Likewise.
3711 2017-06-01 Alan Modra <amodra@gmail.com>
3713 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
3714 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
3716 (is_elfv2_localentry0): New function.
3717 (ppc64_elf_tls_setup): Default params->plt_localentry0.
3718 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
3719 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
3720 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
3721 optimized localentry:0 stubs.
3722 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
3723 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
3725 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
3727 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
3729 2017-05-30 Casey Smith <clegg89@gmail.com>
3732 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
3733 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
3735 2017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
3737 * cpu-arc.c (arc_compatible): New function.
3739 2017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
3741 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
3743 2017-05-30 H.J. Lu <hongjiu.lu@intel.com>
3746 * bfdio.c (bfd_get_file_size): New function.
3747 * bfd-in2.h: Regenerated.
3749 2017-05-23 Dilian Palauzov <git-dpa@aegee.org>
3751 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
3754 2017-05-22 H.J. Lu <hongjiu.lu@intel.com>
3756 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
3757 dynobj instead of htab->elf.dynobj.
3759 2017-05-19 Maciej W. Rozycki <macro@imgtec.com>
3761 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
3763 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
3764 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
3765 actual number of internal relocations retrieved. Adjust
3766 function description.
3767 (bfd_elf64_canonicalize_reloc): Remove macro.
3768 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
3770 2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
3772 * archures.c (bfd_mach_sparc_v9m8): Define.
3773 (bfd_mach_sparc_v8plusm8): Likewise.
3774 (bfd_mach_sparc_v9_p): Adjust to M8.
3775 (bfd_mach_sparc_64bit_p): Likewise.
3776 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
3777 bfd_mach_sparc_v8plusm8.
3778 * bfd-in2.h: Regenerated.
3779 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
3781 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
3782 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
3783 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
3785 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
3786 bfd_mach_sparc_v8plusm8.
3788 2017-05-19 Alan Modra <amodra@gmail.com>
3790 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
3791 debug and special sections when no non-note alloc sections in an
3794 2017-05-18 Alan Modra <amodra@gmail.com>
3796 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
3797 * elf-m10300.c: Likewise.
3799 * elf32-arc.c: Likewise.
3800 * elf32-bfin.c: Likewise.
3801 * elf32-m68k.c: Likewise.
3802 * elf32-nds32.c: Likewise.
3803 * elf32-tilepro.c: Likewise.
3804 * elflink.c: Likewise.
3805 * elfnn-aarch64.c: Likewise.
3806 * elfnn-riscv.c: Likewise.
3807 * elfxx-tilegx.c: Likewise.
3808 * mach-o.c: Likewise.
3809 * peXXigen.c: Likewise.
3810 * vms-alpha.c: Likewise.
3811 * vms-lib.c: Likewise.
3813 2017-05-17 H.J. Lu <hongjiu.lu@intel.com>
3816 * elflink.c (elf_gc_mark_debug_section): New function.
3817 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
3818 referenced by kept debug sections.
3820 2017-05-16 Alan Modra <amodra@gmail.com>
3822 * elf-m10300.c: Rename occurrences of non_ir_ref.
3823 * elf32-arm.c: Likewise.
3824 * elf32-bfin.c: Likewise.
3825 * elf32-cr16.c: Likewise.
3826 * elf32-cris.c: Likewise.
3827 * elf32-d10v.c: Likewise.
3828 * elf32-dlx.c: Likewise.
3829 * elf32-fr30.c: Likewise.
3830 * elf32-frv.c: Likewise.
3831 * elf32-hppa.c: Likewise.
3832 * elf32-i370.c: Likewise.
3833 * elf32-i386.c: Likewise.
3834 * elf32-iq2000.c: Likewise.
3835 * elf32-lm32.c: Likewise.
3836 * elf32-m32c.c: Likewise.
3837 * elf32-m32r.c: Likewise.
3838 * elf32-m68hc1x.c: Likewise.
3839 * elf32-m68k.c: Likewise.
3840 * elf32-mcore.c: Likewise.
3841 * elf32-metag.c: Likewise.
3842 * elf32-microblaze.c: Likewise.
3843 * elf32-moxie.c: Likewise.
3844 * elf32-msp430.c: Likewise.
3845 * elf32-mt.c: Likewise.
3846 * elf32-nios2.c: Likewise.
3847 * elf32-or1k.c: Likewise.
3848 * elf32-ppc.c: Likewise.
3849 * elf32-rl78.c: Likewise.
3850 * elf32-s390.c: Likewise.
3851 * elf32-score.c: Likewise.
3852 * elf32-score7.c: Likewise.
3853 * elf32-sh.c: Likewise.
3854 * elf32-tic6x.c: Likewise.
3855 * elf32-tilepro.c: Likewise.
3856 * elf32-v850.c: Likewise.
3857 * elf32-vax.c: Likewise.
3858 * elf32-xstormy16.c: Likewise.
3859 * elf32-xtensa.c: Likewise.
3860 * elf64-alpha.c: Likewise.
3861 * elf64-hppa.c: Likewise.
3862 * elf64-ia64-vms.c: Likewise.
3863 * elf64-mmix.c: Likewise.
3864 * elf64-ppc.c: Likewise.
3865 * elf64-s390.c: Likewise.
3866 * elf64-sh64.c: Likewise.
3867 * elf64-x86-64.c: Likewise.
3868 * elflink.c: Likewise.
3869 * elfnn-aarch64.c: Likewise.
3870 * elfnn-ia64.c: Likewise.
3871 * elfnn-riscv.c: Likewise.
3872 * elfxx-mips.c: Likewise.
3873 * elfxx-sparc.c: Likewise.
3874 * elfxx-tilegx.c: Likewise.
3875 * linker.c: Likewise.
3877 2017-05-16 Alan Modra <amodra@gmail.com>
3879 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
3880 * elflink.c (elf_link_add_object_symbols): Update to use
3882 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
3884 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
3886 2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
3888 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
3890 2017-05-12 H.J. Lu <hongjiu.lu@intel.com>
3892 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
3893 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
3895 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3897 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
3899 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
3901 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
3902 to plt_second/plt_second_eh_frame.
3903 (elf_x86_64_link_hash_newfunc): Updated.
3904 (elf_x86_64_allocate_dynrelocs): Likewise.
3905 (elf_x86_64_size_dynamic_sections): Likewise.
3906 (elf_x86_64_relocate_section): Likewise.
3907 (elf_x86_64_finish_dynamic_symbol): Likewise.
3908 (elf_x86_64_finish_dynamic_sections): Likewise.
3909 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
3910 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
3912 (elf_backend_setup_gnu_properties): Updated. Create the
3913 .plt.sec section instead of the .plt.sec section.
3915 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
3917 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
3918 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
3919 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
3921 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
3923 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
3924 (bfd_elf64_set_reloc): Define.
3925 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
3927 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
3929 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
3930 (struct bfd_target): New field _bfd_set_reloc.
3931 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
3932 * reloc.c (_bfd_generic_set_reloc): New function.
3933 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
3934 * nlm-target.h (nlm_set_reloc): Likewise.
3935 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
3936 * aout-tic30.c (MY_set_reloc): Likewise.
3937 * aout-target.h (MY_set_reloc): Likewise.
3938 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
3939 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
3940 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
3941 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
3942 * aout-adobe.c (aout_32_set_reloc): Likewise.
3943 * bout.c (b_out_set_reloc): Likewise.
3944 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
3945 * i386os9k.c (aout_32_set_reloc): Likewise.
3946 * ieee.c (ieee_set_reloc): Likewise.
3947 * oasys.c (oasys_set_reloc): Likewise.
3948 * som.c (som_set_reloc): Likewise.
3949 * versados.c (versados_set_reloc): Likewise.
3950 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
3951 _bfd_generic_set_reloc.
3952 (rs6000_xcoff64_aix_vec): LIkewise.
3953 * libbfd.c (_bfd_norelocs_set_reloc): New function.
3954 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
3955 * i386msdos.c (msdos_set_reloc): Define to
3956 _bfd_norelocs_set_reloc.
3957 * elfcode.h (elf_set_reloc): Define.
3958 * bfd-in2.h: Regenerated.
3960 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
3963 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
3964 for IFUNC function address.
3966 2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
3968 * elf32-arc.c (FEATURE_LIST_NAME): Define.
3969 (CONFLICT_LIST): Likewise.
3970 (opcode/arc-attrs.h): Include.
3971 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
3972 (arc_extract_features): New file.
3973 (arc_stralloc): Likewise.
3974 (arc_elf_merge_attributes): Likewise.
3975 (arc_elf_merge_private_bfd_data): Use object attributes.
3976 (bfd_arc_get_mach_from_attributes): New function.
3977 (arc_elf_object_p): Use object attributes.
3978 (arc_elf_final_write_processing): Likewise.
3979 (elf32_arc_obj_attrs_arg_type): New function.
3980 (elf32_arc_obj_attrs_handle_unknown): Likewise.
3981 (elf32_arc_section_from_shdr): Likewise.
3982 (elf_backend_obj_attrs_vendor): Define.
3983 (elf_backend_obj_attrs_section): Likewise.
3984 (elf_backend_obj_attrs_arg_type): Likewise.
3985 (elf_backend_obj_attrs_section_type): Likewise.
3986 (elf_backend_obj_attrs_handle_unknown): Likewise.
3987 (elf_backend_section_from_shdr): Likewise.
3989 2017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
3992 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
3993 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
3994 and the destination is a Thumb symbol.
3996 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
3998 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
3999 initializer to silence GCC 4.2.
4000 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
4002 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
4004 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
4005 (LAZY_PLT_ENTRY_SIZE): This.
4006 (NON_LAZY_PLT_ENTRY_SIZE): New.
4007 (elf_x86_64_plt0_entry): Renamed to ...
4008 (elf_x86_64_lazy_plt0_entry): This.
4009 (elf_x86_64_plt_entry): Renamed to ...
4010 (elf_x86_64_lazy_plt_entry): This.
4011 (elf_x86_64_bnd_plt0_entry): Renamed to ...
4012 (elf_x86_64_lazy_bnd_plt0_entry): This.
4013 (elf_x86_64_legacy_plt_entry): Removed.
4014 (elf_x86_64_bnd_plt_entry): Renamed to ...
4015 (elf_x86_64_lazy_bnd_plt_entry): This.
4016 (elf_x86_64_legacy_plt2_entry): Renamed to ...
4017 (elf_x86_64_non_lazy_plt_entry): This.
4018 (elf_x86_64_bnd_plt2_entry): Renamed to ...
4019 (elf_x86_64_non_lazy_bnd_plt_entry): This.
4020 (elf_x86_64_eh_frame_plt): Renamed to ...
4021 (elf_x86_64_eh_frame_lazy_plt): This.
4022 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
4023 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
4024 (elf_x86_64_eh_frame_plt_got): Renamed to ...
4025 (elf_x86_64_eh_frame_non_lazy_plt): This.
4026 (elf_x86_64_lazy_plt_layout): New.
4027 (elf_x86_64_non_lazy_plt_layout): Likewise.
4028 (elf_x86_64_plt_layout): Likewise.
4029 (elf_x86_64_backend_data): Remove PLT layout information. Add
4030 os for target system.
4031 (GET_PLT_ENTRY_SIZE): Removed.
4032 (elf_x86_64_lazy_plt): New.
4033 (elf_x86_64_non_lazy_plt): Likewise.
4034 (elf_x86_64_lazy_bnd_plt): Likewise.
4035 (elf_x86_64_non_lazy_bnd_plt): Likewise.
4036 (elf_x86-64_arch_bed): Updated.
4037 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
4038 (elf_x86_64_create_dynamic_sections): Removed.
4039 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
4040 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
4041 (elf_x86-64_adjust_dynamic_symbol): Updated.
4042 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
4043 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
4044 size for PLT0 if there is no PLT0. Get plt_entry_size from
4045 non_lazy_plt for non-lazy PLT entries.
4046 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
4047 from non_lazy_plt for non-lazy PLT entries.
4048 (elf_x86-64_relocate_section): Updated. Properly get PLT index
4049 if there is no PLT0.
4050 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
4051 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
4052 entries with non-lazy PLT layout. Don't fill the second and third
4053 slots in the PLT entry if there is no PLT0.
4054 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
4055 if there is no PLT0. Set sh_entsize on the .plt.got section.
4056 (compare_relocs): New.
4057 (elf_x86_64_plt_type): Likewise.
4058 (elf_x86_64_plt): Likewise.
4059 (elf_x86_64_nacl_plt): New. Forward declaration.
4060 (elf_x86_64_get_plt_sym_val): Removed.
4061 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
4062 against all dynamic relocations.
4063 (elf_x86_64_link_setup_gnu_properties): New function.
4064 (elf_backend_create_dynamic_sections): Updated.
4065 (elf_backend_setup_gnu_properties): New.
4066 (elf_x86_64_nacl_plt): New.
4067 (elf_x86_64_nacl_arch_bed): Updated.
4069 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
4071 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
4072 (LAZY_PLT_ENTRY_SIZE): This.
4073 (NON_LAZY_PLT_ENTRY_SIZE): New.
4074 (elf_i386_plt0_entry): Renamed to ...
4075 (elf_i386_lazy_plt0_entry): This.
4076 (elf_i386_plt_entry): Renamed to ...
4077 (elf_i386_lazy_plt_entry): This.
4078 (elf_i386_pic_plt0_entry): Renamed to ...
4079 (elf_i386_pic_lazy_plt0_entry): This.
4080 (elf_i386_pic_plt_entry): Renamed to ...
4081 (elf_i386_pic_lazy_plt_entry): This.
4082 (elf_i386_got_plt_entry): Renamed to ...
4083 (elf_i386_non_lazy_plt_entry): This.
4084 (elf_i386_pic_got_plt_entry): Renamed to ...
4085 (elf_i386_pic_non_lazy_plt_entry): This.
4086 (elf_i386_eh_frame_plt): Renamed to ...
4087 (elf_i386_eh_frame_lazy_plt): This.
4088 (elf_i386_eh_frame_plt_got): Renamed to ...
4089 (elf_i386_eh_frame_non_lazy_plt): This.
4090 (elf_i386_plt_layout): Renamed to ...
4091 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
4092 eh_frame_plt_got_size.
4093 (elf_i386_non_lazy_plt_layout): New.
4094 (elf_i386_plt_layout): Likewise.
4095 (elf_i386_non_lazy_plt): Likewise.
4096 (GET_PLT_ENTRY_SIZE): Removed.
4097 (elf_i386_plt): Renamed to ...
4098 (elf_i386_lazy_plt): This.
4099 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
4100 (elf_i386_arch_bed): Updated.
4101 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
4102 (elf_i386_create_dynamic_sections): Removed.
4103 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
4104 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
4105 (elf_i386_adjust_dynamic_symbol): Updated.
4106 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
4107 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
4108 size for PLT0 if there is no PLT0.
4109 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
4110 output section is discarded only if GOT isn't empty.
4111 (elf_i386_relocate_section): Updated. Properly get PLT index
4112 if there is no PLT0.
4113 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
4114 second and third slots in the PLT entry if there is no PLT0.
4115 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
4116 if there is no PLT0. Set sh_entsize on the .plt.got section.
4117 (elf_i386_nacl_plt): Forward declaration.
4118 (elf_i386_get_plt_sym_val): Removed.
4119 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
4120 against all dynamic relocations.
4121 (elf_i386_link_setup_gnu_properties): New function.
4122 (elf_backend_create_dynamic_sections): Updated.
4123 (elf_backend_setup_gnu_properties): New.
4124 (elf_i386_nacl_plt): Updated.
4125 (elf_i386_nacl_arch_bed): Likewise.
4126 (elf_i386_vxworks_arch_bed): Likewise.
4128 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
4130 * elflink.c (elf_output_implib): Remove executable flag from import
4132 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
4133 library is a relocatable object file.
4135 2017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
4138 * elf32-avr.c (avr_should_move_sym): New function.
4139 (avr_should_reduce_sym_size): Likewise.
4140 (avr_should_increase_sym_size): Likewise.
4141 (elf32_avr_relax_delete_bytes): Adjust symbol values
4142 and sizes by calling new functions.
4144 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
4146 * config.bfd (riscv32-*): Enable rv64.
4148 2017-05-02 Alan Modra <amodra@gmail.com>
4151 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
4152 rather than h->root.type == bfd_link_hash_new.
4153 (bfd_elf_record_link_assignment): Similarly, call
4154 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
4156 2017-04-29 Alan Modra <amodra@gmail.com>
4159 * reloc.c (reloc_offset_in_range): New function.
4160 (bfd_perform_relocation, bfd_install_relocation): Use it.
4161 (_bfd_final_link_relocate): Likewise.
4163 2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
4165 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
4166 before using .plt.got.
4167 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
4169 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
4171 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
4172 instead of "+=" to update 0.
4174 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
4176 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
4177 .plt.got section here.
4178 (elf_i386_check_relocs): Don't create the .plt.got section.
4179 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
4180 the .plt.got and .plt.bnd sections here.
4181 (elf_x86_64_check_relocs): Don't create the .plt.got nor
4184 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
4186 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
4188 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
4189 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
4190 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
4191 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
4194 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
4196 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
4198 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
4199 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
4200 the first relocatable ELF input with GNU properties.
4202 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
4204 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
4205 VxWorks for non-PIC.
4207 2017-04-27 Alan Modra <amodra@gmail.com>
4209 * elf-bfd.h (struct elf_backend_data): Make asection param of
4210 elf_backend_eh_frame_address_size const.
4211 (_bfd_elf_eh_frame_address_size): Likewise.
4212 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
4213 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
4214 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
4215 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
4216 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
4217 (next_cie_fde_offset): Constify params.
4218 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
4220 2017-04-27 Alan Modra <amodra@gmail.com>
4222 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
4223 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
4224 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
4226 (offset_adjust): New function.
4227 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
4228 (adjust_eh_frame_local_symbols): Likewise.
4229 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
4230 after changing anything. Return true if anything changed.
4231 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
4232 _bfd_elf_adjust_eh_frame_global_symbol for globals.
4234 2017-04-27 Alan Modra <amodra@gmail.com>
4236 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
4239 2017-04-27 Alan Modra <amodra@gmail.com>
4241 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
4242 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
4243 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
4244 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
4245 for undef and undefweak dyn_relocs.
4246 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
4247 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
4248 (allocate_got, allocate_dynrelocs): Likewise.
4249 (ppc64_elf_relocate_section): Likewise.
4251 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
4253 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
4254 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
4255 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
4256 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
4258 2017-04-26 Nick Clifton <nickc@redhat.com>
4261 * reloc.c (bfd_perform_relocation): Check for a negative address
4264 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
4267 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
4269 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
4270 (elf_backend_always_renumber_dynsyms): Define.
4271 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
4272 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
4273 * elflink.c (bfd_elf_size_dynamic_sections): Also call
4274 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
4276 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
4278 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
4280 * elflink.c (bfd_elf_size_dynamic_sections): Only call
4281 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
4282 sections have been created.
4284 2017-04-26 Nick Clifton <nickc@redhat.com>
4287 * compress.c (bfd_init_section_compress_status): Check the return
4288 value from bfd_malloc.
4290 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
4292 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
4293 no_finish_dynamic_symbol.
4294 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
4296 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
4297 weak symbol, don't make it dynamic.
4298 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
4299 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
4300 relocation for GOT reference.
4301 (elf_x86_64_finish_dynamic_symbol): Abort if
4302 no_finish_dynamic_symbol isn't 0.
4304 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
4307 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
4308 undefined weak symbol, don't make it dynamic.
4309 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
4310 set no_finish_dynamic_symbol and generate R_386_RELATIVE
4311 relocation for R_386_GOT32.
4313 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
4316 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
4318 2017-04-23 Alan Modra <amodra@gmail.com>
4321 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
4322 * elf.c (lcomm_sym): New.
4323 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
4324 * bfd-in2.h: Regenerate.
4326 2017-04-23 Alan Modra <amodra@gmail.com>
4329 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
4330 parameters and comment.
4331 (_bfd_elf_get_reloc_section): Delete.
4332 (_bfd_elf_plt_get_reloc_section): Declare.
4333 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
4334 New functions. Don't blindly skip over assumed .rel/.rela prefix.
4336 (_bfd_elf_get_reloc_section): ..here. Delete.
4337 (assign_section_numbers): Call elf_get_reloc_section.
4338 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
4339 * elfxx-target.h (elf_backend_get_reloc_section): Update.
4341 2017-04-23 Alan Modra <amodra@gmail.com>
4344 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
4347 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
4350 * elf32-i386.c (elf_i386_link_hash_entry): Add
4351 no_finish_dynamic_symbol.
4352 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
4353 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
4354 symbol, don't make it dynamic in PIE.
4355 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
4356 set no_finish_dynamic_symbol and generate R_386_RELATIVE
4357 relocation for R_386_GOT32
4358 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
4361 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
4365 * elflink.c (elf_link_add_object_symbols): Require
4366 --no-dynamic-linker with -E/--dynamic-list when creating
4369 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
4371 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
4374 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
4376 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
4377 dynamic symbol sorting.
4379 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
4382 * elflink.c (elf_link_add_object_symbols): Preserve
4383 dynamic_ref_after_ir_def when restoring the symbol table for
4384 unneeded dynamic object.
4386 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
4389 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
4390 on on undefined IFUNC symbol in the second PLT.
4392 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
4394 * peXXigen.c (pe_print_reloc): Correct chunk_end.
4396 2017-04-19 Alan Modra <amodra@gmail.com>
4398 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
4399 or make dynamic for info->dynamic_undefined_weak 0 and 1.
4400 * elf32-ppc.c:Formatting.
4401 (ensure_undefweak_dynamic): Don't make dynamic when
4402 info->dynamic_undefined_weak is zero.
4403 (allocate_dynrelocs): Discard undefweak dyn_relocs for
4404 info->dynamic_undefined_weak. Discard undef dyn_relocs when
4405 not default visibility. Discard undef and undefweak
4407 (ppc_elf_relocate_section): Adjust to suit.
4408 * elf64-ppc.c: Formatting.
4409 (ensure_undefweak_dynamic): Don't make dynamic when
4410 info->dynamic_undefined_weak is zero.
4411 (allocate_dynrelocs): Discard undefweak dyn_relocs for
4412 info->dynamic_undefined_weak. Discard them earlier.
4414 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
4417 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
4418 before generating the version definition section.
4420 2017-04-17 Alan Modra <amodra@gmail.com>
4422 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
4423 state when a regular object file defines a symbol with
4424 incompatible type to that defined by an earlier shared lib.
4426 2017-04-13 Alan Modra <amodra@gmail.com>
4428 * coffcode.h: Wrap some overly long _bfd_error_handler args.
4430 * elf32-arm.c: Likewise.
4431 * elf32-i386.c: Likewise.
4432 * elf32-mep.c: Likewise.
4433 * elf64-ia64-vms.c: Likewise.
4434 * elf64-x86-64.c: Likewise.
4435 * elflink.c: Likewise.
4436 * elfnn-ia64.c: Likewise.
4437 * elfxx-mips.c: Likewise.
4439 2017-04-13 Alan Modra <amodra@gmail.com>
4441 * aoutx.h: Use %B and %A in error messages throughout file.
4442 * aout-cris.c: Likewise.
4443 * archive.c: Likewise.
4444 * binary.c: Likewise.
4445 * coff-rs6000.c: Likewise.
4446 * coff-tic4x.c: Likewise.
4447 * coffcode.h: Likewise.
4448 * coffgen.c: Likewise.
4449 * cofflink.c: Likewise.
4450 * coffswap.h: Likewise.
4451 * cpu-arm.c: Likewise.
4452 * elf-eh-frame.c: Likewise.
4453 * elf-m10300.c: Likewise.
4455 * elf32-arc.c: Likewise.
4456 * elf32-arm.c: Likewise.
4457 * elf32-bfin.c: Likewise.
4458 * elf32-frv.c: Likewise.
4459 * elf32-iq2000.c: Likewise.
4460 * elf32-m32c.c: Likewise.
4461 * elf32-microblaze.c: Likewise.
4462 * elf32-nds32.c: Likewise.
4463 * elf32-rl78.c: Likewise.
4464 * elf32-rx.c: Likewise.
4465 * elf32-score.c: Likewise.
4466 * elf32-score7.c: Likewise.
4467 * elf32-sh64.c: Likewise.
4468 * elf32-v850.c: Likewise.
4469 * elf32-vax.c: Likewise.
4470 * elf32-visium.c: Likewise.
4471 * elf64-ia64-vms.c: Likewise.
4472 * elf64-mmix.c: Likewise.
4473 * elf64-sh64.c: Likewise.
4474 * elfcode.h: Likewise.
4475 * elfnn-aarch64.c: Likewise.
4476 * elfnn-ia64.c: Likewise.
4477 * elfxx-mips.c: Likewise.
4478 * hpux-core.c: Likewise.
4481 * linker.c: Likewise.
4482 * merge.c: Likewise.
4484 * oasys.c: Likewise.
4485 * pdp11.c: Likewise.
4486 * peXXigen.c: Likewise.
4487 * rs6000-core.c: Likewise.
4488 * vms-alpha.c: Likewise.
4489 * xcofflink.c: Likewise.
4491 2017-04-13 Alan Modra <amodra@gmail.com>
4493 * bfd.c (PRINT_TYPE): Define.
4494 (_doprnt): New function.
4495 (error_handler_internal): Use _doprnt.
4496 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
4497 calls in their natural order, throughout file.
4498 * coff-mcore.c: Likewise.
4499 * coff-ppc.c: Likewise.
4500 * coff-tic80.c: Likewise.
4501 * cofflink.c: Likewise.
4502 * elf-s390-common.c: Likewise.
4504 * elf32-arm.c: Likewise.
4505 * elf32-i386.c: Likewise.
4506 * elf32-m32r.c: Likewise.
4507 * elf32-msp430.c: Likewise.
4508 * elf32-spu.c: Likewise.
4509 * elf64-ia64-vms.c: Likewise.
4510 * elf64-sparc.c: Likewise.
4511 * elf64-x86-64.c: Likewise.
4512 * elflink.c: Likewise.
4513 * elfnn-aarch64.c: Likewise.
4514 * elfnn-ia64.c: Likewise.
4515 * elfxx-mips.c: Likewise.
4517 2017-04-13 Alan Modra <amodra@gmail.com>
4519 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
4520 branch veneers" error. Fix double space and format message.
4521 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
4522 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
4524 2017-04-13 Alan Modra <amodra@gmail.com>
4526 * bfd-in2.h: Regenerate.
4528 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
4530 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
4531 extra `\n' in warning/error messages.
4532 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
4533 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
4535 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
4537 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
4538 processor-specific properties with generic ELF target vector.
4540 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
4542 * elf32-sparc.c (elf_backend_fixup_symbol): New.
4543 * elf64-sparc.c (elf_backend_fixup_symbol): New.
4544 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
4545 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
4547 (link_hash_newfunc): Initialize has_got_reloc and
4549 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
4551 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
4553 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
4555 (_bfd_sparc_elf_fixup_symbol): New function.
4556 (allocate_dynrelocs): Don't allocate space for dynamic
4557 relocations and discard relocations against resolved undefined
4558 weak symbols in executable. Don't make resolved undefined weak
4559 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
4560 relocation against undefined weak symbols in PIE.
4561 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
4562 relocations against resolved undefined weak symbols in PIE
4563 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
4564 without ynamic PLT/GOT relocations for resolved undefined weak
4566 Don't generate dynamic relocation against resolved undefined
4567 weak symbol in executable.
4568 (pie_finish_undefweak_symbol): New function.
4569 (_bfd_sparc_elf_finish_dynamic_sections): Call
4570 pie_finish_undefweak_symbol on all symbols in PIE.
4571 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
4572 (_bfd_sparc_elf_fixup_symbol): New function.
4574 2017-04-10 Nick Clifton <nickc@redhat.com>
4576 * config.bfd: Remove ns32k from obsolete list.
4578 2017-04-10 Alan Modra <amodra@gmail.com>
4581 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
4582 (special_sections_i): Likewise for .init_array.
4583 (special_sections_p): Likewise for .preinit_array.
4585 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
4589 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
4590 ELF_COMMON_DEF_P for common symbols.
4591 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
4592 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
4593 * elflink.c (_bfd_elf_merge_symbol): Revert commits
4594 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
4595 07492f668d2173da7a2bda3707ff0985e0f460b6.
4597 2017-04-07 Pedro Alves <palves@redhat.com>
4599 * opncls.c (bfd_get_debug_link_info): Rename to...
4600 (bfd_get_debug_link_info_1): ... this. Change type of second
4601 parameter to void pointer. Adjust.
4602 (bfd_get_debug_link_info): Reimplement on top of
4603 bfd_get_debug_link_info_1.
4604 (separate_debug_file_exists, separate_alt_debug_file_exists):
4605 Change type of second parameter to void pointer. Adjust.
4606 (get_func_type, check_func_type): Change type of second parameter
4608 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
4609 the callback functions instead of passing the address of a local.
4610 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
4611 find_separate_debug_file.
4612 (get_alt_debug_link_info_shim): Change type of second parameter to
4613 void pointer. Adjust.
4614 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
4615 find_separate_debug_file.
4616 (get_build_id_name, bfd_boolean check_build_id_file): Change type
4617 of second parameter to void pointer. Adjust.
4618 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
4619 pointer local to find_separate_debug_file.
4621 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
4623 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
4624 external symbols with a definition.
4625 (_bfd_coff_gc_mark_extra_sections): Fix typo.
4627 2017-04-07 Alan Modra <amodra@gmail.com>
4629 * po/SRC-POTFILES.in: Regenerate.
4631 2017-04-05 Alan Modra <amodra@gmail.com>
4633 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
4636 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
4638 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
4639 numbers for DataDirectory entry indicies passed to
4642 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
4644 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
4645 each GNU_MBIND section and align GNU_MBIND section to page size.
4646 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
4647 segment for each GNU_MBIND section.
4648 (_bfd_elf_init_private_section_data): Copy sh_info from input
4649 for GNU_MBIND section.
4651 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
4653 * elfnn-riscv.c (GP_NAME): Delete.
4654 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
4655 (_bfd_riscv_relax_lui): Likewise.
4657 2017-04-04 Nick Clifton <nickc@redhat.com>
4660 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
4662 (bfd_elf_final_link): Only initialize the extended symbol index
4663 section if there are extended symbol tables to list.
4665 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
4667 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
4668 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
4669 * configure.ac (elf): Add elf-properties.lo.
4670 * Makefile.in: Regenerated.
4671 * configure: Likewise.
4672 * elf-bfd.h (elf_property_kind): New.
4673 (elf_property): Likewise.
4674 (elf_property_list): Likewise.
4675 (elf_properties): Likewise.
4676 (_bfd_elf_parse_gnu_properties): Likewise.
4677 (_bfd_elf_get_property): Likewise.
4678 (_bfd_elf_link_setup_gnu_properties): Likewise.
4679 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
4680 and setup_gnu_properties.
4681 (elf_obj_tdata): Add properties.
4682 * elf-properties.c: New file.
4683 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
4684 (elf_i386_merge_gnu_properties): Likewise.
4685 (elf_backend_parse_gnu_properties): Likewise.
4686 (elf_backend_merge_gnu_properties): Likewise.
4687 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
4688 (elf_x86_64_merge_gnu_properties): Likewise.
4689 (elf_backend_parse_gnu_properties): Likewise.
4690 (elf_backend_merge_gnu_properties): Likewise.
4691 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
4692 (elf_backend_parse_gnu_properties): Likewise.
4693 (elf_backend_setup_gnu_properties): Likewise.
4694 (elfNN_bed): Add elf_backend_parse_gnu_properties,
4695 elf_backend_merge_gnu_properties and
4696 elf_backend_setup_gnu_properties.
4698 2017-03-30 Pip Cet <pipcet@gmail.com>
4700 * elf32-wasm32.c: Add relocation code, two relocs.
4701 * reloc.c: Add wasm32 relocations.
4702 * libbfd.h: Regenerate.
4703 * bfd-in2.h: Regenerate.
4704 * bfd/po/bfd.pot: Regenerate.
4706 2017-03-29 Nick Clifton <nickc@redhat.com>
4709 * coff-bfd.h (struct coff_section_data): Add new fields:
4710 saved_bias and bias.
4711 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
4712 computed for PE binaries.
4713 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
4716 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
4719 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
4720 to handle a local symbol with a hash-symbol-entry; without PLT.
4721 Add BFD_ASSERT for an incidental case with GOT entry present.
4722 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
4723 isn't forced-or-set local.
4725 2017-03-27 Pip Cet <pipcet@gmail.com>
4727 * wasm-module.c: New file to support WebAssembly modules.
4728 * wasm-module.h: New file to support WebAssembly modules.
4729 * doc/webassembly.texi: Start documenting wasm-module.c.
4730 * config.bfd: Add wasm_vec.
4731 * targets.c: Likewise.
4732 * configure.ac: Likewise.
4733 * Makefile.am: Add entries for wasm-module.c.
4734 * Makefile.in: Regenerate.
4735 * configure: Regenerate.
4736 * po/SRC-POTFILES.in: Regenerate.
4738 2017-03-27 Pip Cet <pipcet@gmail.com>
4740 * cpu-wasm32.c: New file to support wasm32 architecture.
4741 * elf32-wasm32.c: New file to support wasm32 architecture.
4742 * Makefile.am: Add wasm32 architecture.
4743 * archures.c: Likewise.
4744 * config.bfd: Likewise.
4745 * configure.ac: Likewise.
4746 * targets.c: Likewise.
4747 * Makefile.in: Regenerate.
4748 * bfd-in2.h: Regenerate.
4749 * configure: Regenerate.
4750 * po/SRC-POTFILES.in: Regenerate.
4752 2017-03-20 Alan Modra <amodra@gmail.com>
4755 * elf64-ppc.c (compare_symbols): Stabilize sort.
4757 2017-03-18 Alan Modra <amodra@gmail.com>
4759 * elf64-ppc.c (struct ppc_link_hash_table): Add
4760 local_ifunc_resolver and maybe_local_ifunc_resolver.
4761 (ppc_build_one_stub): Set flags on emitting dynamic
4762 relocation to ifunc.
4763 (ppc64_elf_relocate_section): Likewise.
4764 (ppc64_elf_finish_dynamic_symbol): Likewise.
4765 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
4766 local dynamic relocs to ifuncs.
4767 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
4768 local_ifunc_resolver and maybe_local_ifunc_resolver.
4769 (ppc_elf_relocate_section): Set flag on emitting dynamic
4770 relocation to ifuncs.
4771 (ppc_elf_finish_dynamic_symbol): Likewise.
4772 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
4773 dynamic relocs to ifuncs.
4775 2017-03-13 Nick Clifton <nickc@redhat.com>
4778 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
4779 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
4780 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
4781 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
4782 * bfd-in2.h: Regenerate.
4783 * libbfd.h: Regenerate.
4784 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
4786 (IS_AARCH64_TLSDESC_RELOC): Likewise.
4787 (elfNN_aarch64_howto_table): Likewise.
4788 (aarch64_tls_transition_without_check): Likewise.
4789 (aarch64_reloc_got_type): Likewise.
4790 (elfNN_aarch64_final_link_relocate): Likewise.
4791 (elfNN_aarch64_tls_relax): Likewise.
4792 (elfNN_aarch64_relocate_section): Likewise.
4793 (elfNN_aarch64_gc_sweep_hook): Likewise.
4794 (elfNN_aarch64_check_relocs): Likewise.
4795 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
4796 (_bfd_aarch64_elf_resolve_relocation): Likewise.
4798 2017-03-11 Alan Modra <amodra@gmail.com>
4800 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
4801 parameter is in fact used. Whitespace fixes.
4802 * elf64-ppc.c: Likewise.
4804 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
4806 * rs6000-core.c (CORE_NEW): Simplify macro when
4807 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
4809 2017-03-07 Alan Modra <amodra@gmail.com>
4813 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
4816 2017-03-05 Alan Modra <amodra@gmail.com>
4818 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
4819 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
4820 (next_cie_fde_offset): New function.
4821 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
4822 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
4823 four bytes. Align CIEs to four or eight bytes depending on
4824 per_encoding_aligned8. Align FDEs according to their encoding.
4825 Pad last FDE to output section alignment.
4826 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
4828 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
4829 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
4830 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
4832 2017-03-02 Martin Bickel <binutils@ineranves.de>
4835 * elf.c (rewrite_elf_program_header): Do not issue a warning for
4836 empty segments which have a zero filesz, but a non-zero memsz.
4838 2017-03-02 Alan Modra <amodra@gmail.com>
4840 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
4842 2017-02-28 Alan Modra <amodra@gmail.com>
4844 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
4845 (ppc64_elf_relocate_section): Likewise.
4847 2017-02-28 Alan Modra <amodra@gmail.com>
4850 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
4851 rather than elf32_nios2_hash_table or elf_hash_table.
4852 (create_got_section): Likewise.
4853 (nios2_elf32_finish_dynamic_symbol): Likewise.
4854 (nios2_elf32_adjust_dynamic_symbol): Likewise.
4855 (nios2_elf32_size_dynamic_sections): Likewise.
4856 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
4857 vars. Use htab equivalents directly instead. Don't create
4858 all dynamic sections on needing just the GOT. Use a goto
4859 rather than a fall-through with reloc test. Ensure
4860 htab->dynobj is set when making dynamic sreloc section.
4861 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
4862 equivalent directly instead. Don't segfault on looking for
4863 .dynamic when dynamic sections have not been created. Don't
4864 segfault on .got.plt being discarded.
4865 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
4866 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
4867 fixme and another not so relevant comment.
4868 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
4869 already set, set hash table dynobj on creating .sbss.
4871 2017-02-28 Alan Modra <amodra@gmail.com>
4873 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
4874 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
4875 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
4876 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
4877 (ppc64_elf_relocate_section): Likewise.
4878 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
4879 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
4880 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
4881 * libbfd.h: Regenerate.
4882 * bfd-in2.h: Regenerate.
4884 2017-02-28 Alan Modra <amodra@gmail.com>
4886 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
4887 dynamic .data.rel.ro read-only.
4888 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
4889 rather than section flags when deciding where copy reloc goes.
4890 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
4891 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
4892 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
4893 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
4894 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
4895 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
4896 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
4897 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
4898 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
4899 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
4900 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
4901 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
4902 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
4903 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
4904 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
4905 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
4906 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
4907 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
4908 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
4910 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
4912 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
4913 `jalr $0, $25' instruction encoding.
4915 2017-02-27 Nick Clifton <nickc@redhat.com>
4918 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
4919 generating a seg-fault when encountering a symbol that has been
4920 deleted by garbage collection.
4922 2017-02-25 Alan Modra <amodra@gmail.com>
4924 * elf32-arc.c (struct dynamic_sections): Delete.
4925 (enum dyn_section_types): Delete.
4926 (dyn_section_names): Delete.
4927 (arc_create_dynamic_sections): Delete.
4928 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
4929 segfault on discarded .rela.plt section.
4930 (elf_arc_size_dynamic_sections): Formatting. Don't call
4931 arc_create_dynamic_sections. Don't allocate memory for sections
4932 handled by the generic linker. Correct code finding relocs in
4933 read-only sections. Set SEC_EXCLUDE on zero size .got,
4934 .got.plt, and .dynbss sections. Do set .interp for pies.
4936 2017-02-24 Andrew Waterman <andrew@sifive.com>
4938 * elfnn-riscv.c (GP_NAME): New macro.
4939 (riscv_global_pointer_value): Use it.
4940 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
4941 output section, consider only that section's alignment.
4943 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
4945 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
4946 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
4947 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
4948 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
4950 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
4952 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
4953 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
4956 2017-02-23 Alan Modra <amodra@gmail.com>
4959 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
4961 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
4962 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
4965 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
4968 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
4969 processing ahead of the call to `elf_gc_sweep_symbol'.
4971 2017-02-22 Nick Clifton <nickc@redhat.com>
4974 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
4975 created section 4-byte alignment.
4977 2017-02-22 Alan Modra <amodra@gmail.com>
4979 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
4980 on .got or .plt output section being discarded by script.
4981 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
4984 2017-02-21 Alan Modra <amodra@gmail.com>
4986 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
4987 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
4989 2017-02-20 Alan Modra <amodra@gmail.com>
4992 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
4993 if DT_RELSZ/DT_RELASZ is zero.
4995 2017-02-17 Nick Clifton <nickc@redhat.com>
4997 * compress.c (bfd_get_full_section_contents): Remember to reduce
4998 compressed size by the sizeof the compression header when
4999 decompressing the contents.
5001 2017-02-17 Pedro Alves <palves@redhat.com>
5003 * srec.c (Chunk): Rename to ...
5004 (_bfd_srec_len): ... this.
5005 (S3Forced): Rename to ...
5006 (_bfd_srec_forceS3): ... this.
5007 * objcopy.c: Adjust all references.
5009 2017-02-17 Pedro Alves <palves@redhat.com>
5011 * archive.c (bsd_write_armap): Rename to ...
5012 (_bfd_bsd_write_armap): ... this.
5013 (coff_write_armap): Rename to ...
5014 (_bfd_coff_write_armap): ... this.
5015 * libbfd-in.h (bsd_write_armap): Rename to ...
5016 (_bfd_bsd_write_armap): ... this.
5017 (coff_write_armap): Rename to ...
5018 (_bfd_coff_write_armap): ... this.
5019 * aout-target.h, aout-tic30.c: Adjust all users.
5020 * libbfd.h: Regenerate.
5022 2017-02-17 Pedro Alves <palves@redhat.com>
5024 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
5025 (warn_deprecated): Rename to ...
5026 (_bfd_warn_deprecated): ... this.
5027 * libbfd.c (warn_deprecated): Rename to ...
5028 (_bfd_warn_deprecated): ... this.
5029 * bfd-in2.h: Regenerate.
5031 2017-02-17 Pedro Alves <palves@redhat.com>
5033 * bfdio.c (real_ftell): Rename to ...
5034 (_bfd_real_ftell): ... this.
5035 (real_fseek): Rename to ...
5036 (_bfd_real_fseek): ... this.
5037 (real_fopen): Rename to ...
5038 (_bfd_real_fopen): ... this.
5039 * libbfd-in.h (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 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
5046 * libbfd.h: Regenerate.
5048 2017-02-17 Pedro Alves <palves@redhat.com>
5050 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
5051 * libbfd.c (read_unsigned_leb128): Rename to ...
5052 (_bfd_read_unsigned_leb128): ... this.
5053 (read_signed_leb128): Rename to ...
5054 (_bfd_read_signed_leb128): ... this.
5055 (safe_read_leb128): Rename to ...
5056 (_bfd_safe_read_leb128): ... this.
5057 * libbfd-in.h (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.h: Renegerate.
5065 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
5067 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
5068 before trying to fine matching file and line information.
5070 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
5072 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
5073 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
5074 not match current bfd, then reload debug information. Record bfd
5075 we're loading debug info for in the stash. If we have debug
5076 informatin in the cache then perform section placement before
5079 2017-02-16 Alan Modra <amodra@gmail.com>
5082 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
5083 * elfxx-target.h (elf_backend_no_page_alias): Define.
5084 (elfNN_bed): Init new field.
5085 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
5086 ensure PT_LOAD segment starts on a new page.
5087 * elf32-hppa.c (elf_backend_no_page_alias): Define.
5089 2017-02-16 Alan Modra <amodra@gmail.com>
5092 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
5095 2017-02-16 Jiong Wang <jiong.wang@arm.com>
5097 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
5098 * bfd-in2.h: Regenerated.
5100 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
5103 * elf32-i386.c (elf_i386_relocate_section): Allow
5104 "lea foo@GOT, %reg" in PIC.
5106 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
5109 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
5110 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
5111 error against local IFUNC symbol without a base register for
5114 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
5116 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
5117 `%P: %H:' with `info->callbacks->einfo'.
5118 (ppc_elf_relocate_section): Likewise.
5119 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
5120 (ppc64_elf_edit_toc): Likewise.
5121 (ppc64_elf_relocate_section): Likewise.
5123 2017-02-14 Alan Modra <amodra@gmail.com>
5125 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
5126 --gc-keep-exported, and test versioned field of sym rather than
5127 looking for @ in name.
5129 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
5131 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
5134 2017-02-13 Nick Clifton <nickc@redhat.com>
5137 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
5140 2017-02-07 Andrew Waterman <andrew@sifive.com>
5142 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
5143 entry size if PLT header is written.
5145 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
5147 Fix sparc64 dynamic relocation processing to use the dynamic
5149 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
5150 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
5153 2017-02-03 Nick Clifton <nickc@redhat.com>
5156 * coffcode.h (coff_write_object_contents): Enlarge size of
5157 s_name_buf in order to avoid compile time warning about possible
5159 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
5160 32-bits of insn value before printing into buffer.
5162 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
5164 * elfxx-mips.c (mips_elf_hash_sort_data): Add
5165 `max_local_dynindx'.
5166 (mips_elf_sort_hash_table): Handle it.
5167 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
5168 symbols bump up `max_local_dynindx' rather than
5169 `max_non_got_dynindx'.
5171 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
5173 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
5174 `min_got_dynindx', `max_unref_got_dynindx' and
5175 `max_non_got_dynindx' members to the `bfd_size_type' data type.
5176 (mips_elf_sort_hash_table): Adjust accordingly.
5178 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
5180 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
5181 to access the hash table.
5183 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
5185 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
5186 non-NULL `htab' to the beginning.
5188 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
5190 * elflink.c (elf_gc_sweep): Wrap overlong line.
5192 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
5194 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
5195 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
5196 * elfxx-mips.c (mips_elf_link_hash_table): Add
5197 `ignore_branch_isa' member.
5198 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
5199 in branch relocation calculation as an error if
5200 `ignore_branch_isa' has been set.
5201 (_bfd_mips_elf_insn32): Rename to...
5202 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
5203 parameter to `insn32' and add an `ignore_branch_isa' parameter.
5204 Handle the new parameter.
5206 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
5208 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
5209 local variable dynobj.
5212 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
5213 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
5214 executable from read-only sections into sdynrelro.
5215 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
5216 dynamic relocs in sdynrelro.
5217 (elf_backend_want_dynrelro): Define.
5219 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
5221 * config.bfd (*-*-rtemsaout*): Mark as removed.
5223 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
5225 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
5226 (arm-*-rtems*): Move to (arm*-*-eabi*).
5227 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
5228 (m68-*-rtems*): Move to (m68*-*-elf*).
5230 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
5232 * config.bfd (*-*-rtemscoff*): Mark as removed.
5234 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
5237 * elflink.c (bfd_elf_record_link_assignment): Revert last
5238 change and don't ever clear `forced_local'. Set `mark'
5240 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
5242 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
5243 (bfd_elf_size_dynamic_sections): ... here.
5244 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
5245 and set `mark' instead in `__tls_get_addr_opt' processing.
5246 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
5248 2017-01-24 Alan Modra <amodra@gmail.com>
5250 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
5251 where dynamic relocs are preferable. Allow ifunc too.
5252 (ensure_undefweak_dynamic): New function.
5253 (allocate_dynrelocs): Use it here. Move plt handling last and
5254 don't make symbols dynamic, simplifying loop. Only make undef
5255 weak symbols with GOT entries dynamic. Correct condition
5256 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
5257 comments. Remove goto.
5258 (ppc_elf_relocate_section): Correct test for using dynamic
5259 symbol on GOT relocs. Rearrange test for emitting GOT relocs
5260 to suit. Set up explicit tls_index entries and implicit GOT
5261 tls_index entries resolvable at link time for
5262 __tls_get_addr_opt. Simplify test to clear mem for prelink.
5263 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
5264 (ensure_undefweak_dynamic): New function.
5265 (allocate_dynrelocs): Use it here. Only make undef weak symbols
5266 with GOT entries dynamic. Remove unnecessary test of
5267 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
5268 (ppc64_elf_relocate_section): Correct test for using dynamic
5269 symbol on GOT relocs. Rearrange test for emitting GOT relocs
5270 to suit. Set up explicit tls_index entries and implicit GOT
5271 tls_index entries resolvable at link time for __tls_get_addr_opt.
5272 Simplify expression to clear mem for prelink.
5274 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
5276 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
5278 2017-01-20 Jiong Wang <jiong.wang@arm.com>
5280 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
5281 (elf_backend_hash_symbol): Define.
5283 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
5286 * elflink.c (bfd_elf_record_link_assignment): Clear any
5287 `forced_local' marking for DSO symbols that are not being
5290 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
5292 * elfnn-riscv.c (riscv_elf_object_p): New function.
5294 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
5297 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
5299 (elf_x86_64_check_relocs): Create .eh_frame section for the
5301 (elf_x86_64_size_dynamic_sections): Allocate and initialize
5302 .eh_frame section for the .plt.bnd section.
5303 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
5304 for the .plt.bnd section.
5306 2017-01-12 Nick Clifton <nickc@redhat.com>
5309 * opncls.c (find_separate_debug_file): Add include_dirs
5310 parameter. Only include the directory part of the bfd's filename
5311 in search paths if include_dirs is true. Add a couple of extra
5312 locations for looking for debug files.
5313 ( bfd_follow_gnu_debuglink): Update invocation of
5314 find_separate_debug_file.
5315 (bfd_follow_gnu_debugaltlink): Likewise.
5316 (get_build_id): New function: Finds the build-id of the given bfd.
5317 (get_build_id_name): New function: Computes the name of the
5318 separate debug info file for a bfd, based upon its build-id.
5319 (check_build_id_file): New function: Checks to see if a separate
5320 debug info file exists at the given location, and that its
5321 build-id matches that of the original bfd.
5322 (bfd_follow_build_id_debuglink): New function: Finds a separate
5323 debug info file for a given bfd by using the build-id method.
5324 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
5325 method of locating a separate debug info file before using the
5327 * bfd-in2.h: Regenerate.
5329 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
5332 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
5333 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
5334 elf_x86_64_eh_frame_plt_got.
5335 (elf_x86_64_size_dynamic_sections): Get unwind info from
5336 elf_x86_64_bnd_arch_bed for the BND PLT.
5338 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
5340 * config.bfd: Add entries for i686-redox and x86_64-redox.
5342 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
5344 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
5346 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
5347 .eh_frame section to 4 bytes for x32.
5348 (elf_x86_64_check_relocs): Likewise.
5350 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
5353 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
5354 (PLT_GOT_FDE_LENGTH): Likewise.
5355 (elf_i386_plt_layout): Add eh_frame_plt_got and
5356 eh_frame_plt_got_size.
5357 (elf_i386_plt): Updated.
5358 (elf_i386_link_hash_table): Add plt_got_eh_frame.
5359 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
5360 (elf_i386_size_dynamic_sections): Allocate and initialize
5361 .eh_frame section for .plt.got.
5362 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
5364 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
5365 eh_frame_plt_got_size.
5366 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
5367 (PLT_GOT_FDE_LENGTH): Likewise.
5368 (elf_x86_64_backend_data): Add eh_frame_plt_got and
5369 eh_frame_plt_got_size.
5370 (elf_x86_64_arch_bed): Updated.
5371 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
5372 eh_frame_plt_got_size.
5373 (elf_x86_64_nacl_arch_bed): Likewise.
5374 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
5375 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
5376 (elf_x86_64_size_dynamic_sections): Allocate and initialize
5377 .eh_frame section for .plt.got.
5378 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
5381 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
5383 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
5384 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
5386 2017-01-09 Nick Clifton <nickc@redhat.com>
5388 * dwarf2.c (lookup_address_in_function_table): Return early if
5389 there are no functions in the given comp unit, or if the high
5390 address of the last function in the comp unit is less than the
5393 2017-01-09 Nick Clifton <nickc@redhat.com>
5396 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
5397 message if there are too many symbols to load.
5399 2017-01-04 James Clarke <jrtc27@jrtc27.com>
5401 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
5402 if relocs are cached.
5404 2017-01-03 Rich Felker <bugdal@aerifal.cx>
5407 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
5408 for R_MICROBLAZE_GOTOFF_64.
5410 2017-01-03 Nick Clifton <nickc@redhat.com>
5412 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
5413 warning about using a possibly uninitialised variable.
5415 2017-01-02 Alan Modra <amodra@gmail.com>
5417 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
5418 (allocate_plt_static, allocate_dynrelocs): Use it.
5420 2017-01-02 Alan Modra <amodra@gmail.com>
5422 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
5423 .PARISC.unwind section.
5425 2017-01-02 Alan Modra <amodra@gmail.com>
5428 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
5429 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
5430 indirect to GOT pointer relative code edit.
5432 2017-01-02 Alan Modra <amodra@gmail.com>
5434 Update year range in copyright notice of all files.
5436 For older changes see ChangeLog-2016
5438 Copyright (C) 2017 Free Software Foundation, Inc.
5440 Copying and distribution of this file, with or without modification,
5441 are permitted in any medium without royalty provided the copyright
5442 notice and this notice are preserved.
5448 version-control: never