1 2017-12-01 H.J. Lu <hongjiu.lu@intel.com>
3 * elfxx-x86.c (_bfd_x86_elf_readonly_dynrelocs): Print symbol
6 2017-12-01 Alan Modra <amodra@gmail.com>
8 * elf32-hppa.c (maybe_set_textrel): Print symbol for map file output.
9 * elf32-ppc.c (maybe_set_textrel): Likewise.
10 * elf64-ppc.c (maybe_set_textrel): Likewise.
11 * elf32-arm.c (readonly_dynrelocs): New function.
12 (maybe_set_textrel): New function, replacing..
13 (elf32_arm_readonly_dynrelocs): ..this.
14 * elf32-lm32.c (readonly_dynrelocs): New function.
15 (maybe_set_textrel): New function, replacing old version of..
16 (readonly_dynrelocs): ..this.
17 * elf32-m32r.c (readonly_dynrelocs): New function.
18 (maybe_set_textrel): New function, replacing old version of..
19 (readonly_dynrelocs): ..this.
20 * elf32-metag.c (readonly_dynrelocs): New function.
21 (maybe_set_textrel): New function, replacing old version of..
22 (readonly_dynrelocs): ..this.
23 * elf32-nds32.c: Delete unnecessary forward declarations.
24 (readonly_dynrelocs): New function.
25 (maybe_set_textrel): New function, replacing old version of..
26 (readonly_dynrelocs): ..this.
27 * elf32-or1k.c (readonly_dynrelocs): New function.
28 (maybe_set_textrel): New function, replacing old version of..
29 (readonly_dynrelocs): ..this.
30 * elf32-s390.c (readonly_dynrelocs): New function.
31 (maybe_set_textrel): New function, replacing old version of..
32 (readonly_dynrelocs): ..this.
33 * elf32-sh.c (readonly_dynrelocs): New function.
34 (maybe_set_textrel): New function, replacing old version of..
35 (readonly_dynrelocs): ..this.
36 * elf32-tic6x.c (readonly_dynrelocs): New function.
37 (maybe_set_textrel): New function, replacing..
38 (elf32_tic6x_readonly_dynrelocs): ..this.
39 * elf32-tilepro.c (readonly_dynrelocs): New function.
40 (maybe_set_textrel): New function, replacing old version of..
41 (readonly_dynrelocs): ..this.
42 * elf64-s390.c (readonly_dynrelocs): New function.
43 (maybe_set_textrel): New function, replacing old version of..
44 (readonly_dynrelocs): ..this.
45 * elfnn-aarch64.c (readonly_dynrelocs): New function.
46 (maybe_set_textrel): New function, replacing..
47 (aarch64_readonly_readonly_dynrelocs): ..this.
48 * elfnn-riscv.c (readonly_dynrelocs): New function.
49 (maybe_set_textrel): New function, replacing old version of..
50 (readonly_dynrelocs): ..this.
51 * elfxx-sparc.c (readonly_dynrelocs): New function.
52 (maybe_set_textrel): New function, replacing old version of..
53 (readonly_dynrelocs): ..this.
54 * elfxx-tilegx.c (readonly_dynrelocs): New function.
55 (maybe_set_textrel): New function, replacing old version of..
56 (readonly_dynrelocs): ..this.
58 2017-12-01 Alan Modra <amodra@gmail.com>
61 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Don't do anything
62 special with non_got_ref for weak aliases.
63 (elf32_hppa_check_relocs): Tweak setting of non_got_ref.
64 (elf32_hppa_adjust_dynamic_symbol): When initialising weak aliases,
65 don't uselessly copy non_got_ref. Clear dyn_relocs instead if
66 strong symbol is allocated in dynbss. Tidy comments.
67 (elf32_hppa_relocate_section): Comment fix.
68 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Don't do anything
69 special with non_got_ref for weak aliases.
70 (ppc_elf_adjust_dynamic_symbol): When initialising weak aliases,
71 don't uselessly copy non_got_ref. Clear dyn_relocs instead if
72 strong symbol is allocated in dynbss. Tidy comments.
73 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't do anything
74 special with non_got_ref for weak aliases.
75 (ppc64_elf_adjust_dynamic_symbol): When initialising weak aliases,
76 don't uselessly copy non_got_ref. Clear dyn_relocs instead if
77 strong symbol is allocated in dynbss. Tidy comments.
79 2017-11-29 Nick Clifton <nickc@redhat.com>
82 * coffcode.h (coff_slurp_reloc_table): Check for a NULL symbol
83 pointer when processing relocs.
85 2017-11-29 Stefan Stroe <stroestefan@gmail.com>
87 * po/Make-in (datadir): Define as @datadir@.
88 (localedir): Define as @localedir@.
89 (gnulocaledir, gettextsrcdir): Use @datarootdir@.
91 2017-11-28 Nick Clifton <nickc@redhat.com>
94 * coffgen.c (_bfd_coff_read_string_table): Check for an excessive
95 size of the external string table.
97 2017-11-28 Nick Clifton <nickc@redhat.com>
100 * reloc.c (reloc_offset_in_range): Rename to
101 bfd_reloc_offset_in_range and export.
102 (bfd_perform_relocation): Rename function invocation.
103 (bfd_install_relocation): Likewise.
104 (bfd_final_link_relocate): Likewise.
105 * bfd-in2.h: Regenerate.
106 * coff-arm.c (coff_arm_reloc): Use bfd_reloc_offset_in_range.
107 * coff-i386.c (coff_i386_reloc): Likewise.
108 * coff-i860.c (coff_i860_reloc): Likewise.
109 * coff-m68k.c (mk68kcoff_common_addend_special_fn): Likewise.
110 * coff-m88k.c (m88k_special_reloc): Likewise.
111 * coff-mips.c (mips_reflo_reloc): Likewise.
112 * coff-x86_64.c (coff_amd64_reloc): Likewise.
114 2017-11-28 H.J. Lu <hongjiu.lu@intel.com>
116 * elf-m10300.c (mn10300_elf_check_relocs): Don't set
118 * elf32-arm.c (elf32_arm_check_relocs): Likewise.
119 * elf32-bfin.c (bfin_check_relocs): Likewise.
120 * elf32-cr16.c (cr16_elf_check_relocs): Likewise.
121 * elf32-cris.c (cris_elf_check_relocs): Likewise.
122 * elf32-d10v.c (elf32_d10v_check_relocs): Likewise.
123 * elf32-dlx.c (elf32_dlx_check_relocs): Likewise.
124 * elf32-fr30.c (fr30_elf_check_relocs): Likewise.
125 * elf32-frv.c (elf32_frv_check_relocs): Likewise.
126 * elf32-hppa.c (elf32_hppa_check_relocs): Likewise.
127 * elf32-i370.c (i370_elf_check_relocs): Likewise.
128 * elf32-i386.c (elf_i386_check_relocs): Likewise.
129 * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
130 * elf32-lm32.c (lm32_elf_check_relocs): Likewise.
131 * elf32-m32c.c (m32c_elf_check_relocs): Likewise.
132 * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
133 * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
134 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
135 * elf32-mcore.c (mcore_elf_check_relocs): Likewise.
136 * elf32-metag.c (elf_metag_check_relocs): Likewise.
137 * elf32-microblaze.c (microblaze_elf_check_relocs): Likewise.
138 * elf32-moxie.c (moxie_elf_check_relocs): Likewise.
139 * elf32-msp430.c (elf32_msp430_check_relocs): Likewise.
140 * elf32-mt.c (mt_elf_check_relocs): Likewise.
141 * elf32-nios2.c (nios2_elf32_check_relocs): Likewise.
142 * elf32-or1k.c (or1k_elf_check_relocs): Likewise.
143 * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
144 * elf32-rl78.c (rl78_elf_check_relocs): Likewise.
145 * elf32-s390.c (elf_s390_check_relocs): Likewise.
146 * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
147 * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
148 * elf32-sh.c (sh_elf_check_relocs): Likewise.
149 * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
150 * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
151 * elf32-v850.c (v850_elf_check_relocs): Likewise.
152 * elf32-vax.c (elf_vax_check_relocs): Likewise.
153 * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
154 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
155 * elf64-aarch64.c (elf64_aarch64_check_relocs): Likewise.
156 * elf64-alpha.c (elf64_alpha_check_relocs): Likewise.
157 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
158 * elf64-ia64-vms.c (elf64_ia64_check_relocs): Likewise.
159 * elf64-mmix.c (mmix_elf_check_relocs): Likewise.
160 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
161 * elf64-s390.c (elf_s390_check_relocs): Likewise.
162 * elf64-sh64.c (sh_elf64_check_relocs): Likewise.
163 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
164 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
165 * elfnn-ia64.c (elfNN_ia64_check_relocs): Likewise.
166 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
167 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
168 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
169 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
171 2017-11-28 Alan Modra <amodra@gmail.com>
174 * elflink.c (_bfd_elf_merge_symbol): Allow weak symbols to override
175 early passes over linker script symbols.
176 * linker.c (_bfd_generic_link_add_one_symbol): Allow symbols to
177 override early passes over linker script symbols. Clear ldscript_def
178 on symbol definitions.
180 2017-11-28 Alan Modra <amodra@gmail.com>
182 * elf64-mmix.c (bfd_elf64_bfd_copy_link_hash_symbol_type): Define.
184 2017-11-28 H.J. Lu <hongjiu.lu@intel.com>
187 * elflink.c (_bfd_elf_merge_symbol): Also skip definition from
189 (elf_link_add_object_symbols): If linker plugin is enabled, set
190 non_ir_ref_regular on symbols referenced in regular objects so
191 that linker plugin will get the correct symbol resolution.
193 2017-11-27 Szabolcs Nagy <szabolcs.nagy@arm.com>
196 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Use
197 bfd_link_executable instead of bfd_link_pic for TLS.
198 (elfNN_aarch64_allocate_dynrelocs): Likewise.
199 (aarch64_can_relax_tls): Likewise.
201 2017-11-27 Szabolcs Nagy <szabolcs.nagy@arm.com>
204 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Use
205 UNDEFWEAK_NO_DYNAMIC_RELOC to avoid dynamic GOT relocs.
206 (elfNN_aarch64_allocate_dynrelocs): Likewise.
208 2017-11-24 H.J. Lu <hongjiu.lu@intel.com>
211 * elf.c (elf_read_notes): Add an argument for note aligment.
212 (elf_parse_notes): Likewise.
213 (_bfd_elf_make_section_from_shdr): Pass section aligment to
215 (bfd_section_from_phdr): Pass segment aligment to elf_read_notes.
216 (elf_parse_notes): Add an argument for note aligment. Use
217 ELF_NOTE_DESC_OFFSET to get the offset of the note descriptor.
218 Use ELF_NOTE_NEXT_OFFSET to get the offset of the next note
220 (elf_read_notes): Add an argument for note aligment and pass it
223 2017-11-23 Alan Modra <amodra@gmail.com>
225 * elf32-hppa.c (pc_dynrelocs): Define.
226 (elf32_hppa_copy_indirect_symbol): Don't copy dyn_relocs to weakdefs.
227 (alias_readonly_dynrelocs): New function.
228 (elf32_hppa_adjust_dynamic_symbol): Don't clear non_got_ref to
229 indicate dyn_relocs should be discarded, discard them here.
230 Use alias_readonly_dynrelocs.
231 (allocate_dynrelocs): Don't test or clear non_got_ref.
232 (elf32_hppa_relocate_section): Simplify test for dynamic relocs.
233 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Don't copy dyn_relocs
235 (alias_readonly_dynrelocs, pc_dynrelocs): New functions.
236 (ppc_elf_adjust_dynamic_symbol): Don't clear non_got_ref to
237 indicate dyn_relocs should be discarded, discard them here.
238 Use alias_readonly_dynrelocs.
239 (allocate_dynrelocs): Don't test or clear non_got_ref.
240 (ppc_elf_relocate_section): Simplify test for dynamic relocs.
242 2017-11-23 Alan Modra <amodra@gmail.com>
244 * elf64-ppc.c (struct ppc_link_hash_entry): Delete weakref field.
245 (ppc64_elf_copy_indirect_symbol): Don't set weakref.
246 (alias_readonly_dynrelocs): Use u.alias rather than weakref.
247 (ppc64_elf_adjust_dynamic_symbol): Don't use
248 alias_readonly_dynrelocs for function symbols.
250 2017-11-23 Alan Modra <amodra@gmail.com>
252 * elf-bfd.h (struct elf_link_hash_entry): Add is_weakalias.
253 Rename u.weakdef to u.alias and update comment.
254 (weakdef): New static inline function.
255 * elflink.c (bfd_elf_record_link_assignment) Test is_weakalias
256 rather than u.weakdef != NULL, and use weakdef function.
257 (_bfd_elf_adjust_dynamic_symbol): Likewise.
258 (_bfd_elf_fix_symbol_flags): Likewise. Clear is_weakalias on
259 all aliases if def has been overridden in a regular object, not
261 (elf_link_add_object_symbols): Delete new_weakdef flag. Test
262 is_weakalias and use weakdef. Set is_weakalias and circular
263 u.alias. Update comments.
264 (_bfd_elf_gc_mark_rsec): Test is_weakalias rather than
265 u.weakdef != NULL and use weakdef function.
266 * elf-m10300.c (_bfd_mn10300_elf_adjust_dynamic_symbol): Test
267 is_weakalias rather than u.weakdef != NULL and use weakdef
268 function. Assert that def is strong defined.
269 * elf32-arc.c (elf_arc_adjust_dynamic_symbol): Likewise.
270 * elf32-arm.c (elf32_arm_adjust_dynamic_symbol): Likewise.
271 * elf32-bfin.c (elf32_bfinfdpic_adjust_dynamic_symbol): Likewise.
272 (bfin_adjust_dynamic_symbol): Likewise.
273 * elf32-cr16.c (_bfd_cr16_elf_adjust_dynamic_symbol): Likewise.
274 * elf32-cris.c (elf_cris_adjust_dynamic_symbol): Likewise.
275 * elf32-frv.c (elf32_frvfdpic_adjust_dynamic_symbol): Likewise.
276 * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Likewise.
277 * elf32-i370.c (i370_elf_adjust_dynamic_symbol): Likewise.
278 * elf32-lm32.c (lm32_elf_adjust_dynamic_symbol): Likewise.
279 * elf32-m32r.c (m32r_elf_adjust_dynamic_symbol): Likewise.
280 * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Likewise.
281 * elf32-metag.c (elf_metag_adjust_dynamic_symbol): Likewise.
282 * elf32-microblaze.c (microblaze_elf_adjust_dynamic_symbol): Likewise.
283 * elf32-nds32.c (nds32_elf_adjust_dynamic_symbol): Likewise.
284 * elf32-nios2.c (nios2_elf32_adjust_dynamic_symbol): Likewise.
285 * elf32-or1k.c (or1k_elf_adjust_dynamic_symbol): Likewise.
286 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Likewise.
287 * elf32-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
288 * elf32-score.c (s3_bfd_score_elf_adjust_dynamic_symbol): Likewise.
289 * elf32-score7.c (s7_bfd_score_elf_adjust_dynamic_symbol): Likewise.
290 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): Likewise.
291 * elf32-tic6x.c (elf32_tic6x_adjust_dynamic_symbol): Likewise.
292 * elf32-tilepro.c (tilepro_elf_gc_mark_hook): Likewise.
293 (tilepro_elf_adjust_dynamic_symbol): Likewise.
294 * elf32-vax.c (elf_vax_adjust_dynamic_symbol): Likewise.
295 * elf32-xtensa.c (elf_xtensa_adjust_dynamic_symbol): Likewise.
296 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Likewise.
297 * elf64-hppa.c (elf64_hppa_adjust_dynamic_symbol): Likewise.
298 * elf64-ia64-vms.c (elf64_ia64_adjust_dynamic_symbol): Likewise.
299 * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
300 (ppc64_elf_adjust_dynamic_symbol): Likewise.
301 * elf64-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
302 * elf64-sh64.c (sh64_elf64_adjust_dynamic_symbol): Likewise.
303 * elfnn-aarch64.c (elfNN_aarch64_adjust_dynamic_symbol): Likewise.
304 * elfnn-ia64.c (elfNN_ia64_adjust_dynamic_symbol): Likewise.
305 * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Likewise.
306 * elfxx-mips.c (_bfd_mips_elf_adjust_dynamic_symbol): Likewise.
307 * elfxx-sparc.c (_bfd_sparc_elf_gc_mark_hook): Likewise.
308 (_bfd_sparc_elf_adjust_dynamic_symbol): Likewise.
309 * elfxx-tilegx.c (tilegx_elf_gc_mark_hook): Likewise.
310 (tilegx_elf_adjust_dynamic_symbol): Likewise.
311 * elfxx-x86.c (_bfd_x86_elf_adjust_dynamic_symbol): Likewise.
313 2017-11-21 Alan Modra <amodra@gmail.com>
315 * elf-bfd.h (elf_symbol_from): Check for NULL symbol bfd.
316 * elfcode.h (elf_slurp_reloc_table_from_section): Add FIXME comment.
318 2017-11-20 Nick Clifton <nickc@redhat.com>
321 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Skip
322 objects without a GNU_PROPERTY note section when looking for a bfd
323 onto which notes can be accumulated.
325 2017-11-20 Alan Modra <amodra@gmail.com>
329 * elf.c (_bfd_elf_init_reloc_shdr): Delete "sec_hdr" parameter
330 and leave rel_hdr->sh_flags zero. Update calls.
331 (bfd_elf_set_group_contents): Check input rel/rela SHF_GROUP
332 flag when !gas before adding rel/rela section to group. Set
333 output rel/rela SHF_GROUP flags.
335 2017-11-18 Jim Wilson <jimw@sifive.com>
337 * elfnn-riscv.c (_bfd_riscv_relax_align): Add space between alignment
338 and to in error message.
340 2017-11-17 H.J. Lu <hongjiu.lu@intel.com>
342 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Pass
343 "%F%P:", instead of "%F:", to linker callback in case of error.
345 2017-11-16 Nick Clifton <nickc@redhat.com>
348 * elf.c (elfcore_grok_netbsd_procinfo): Check that the note is big enough.
349 (elfcore_grok_openbsd_procinfo): Likewise.
350 (elfcore_grok_nto_status): Likewise.
352 2017-11-16 Nick Clifton <nickc@redhat.com>
354 * merge.c (sec_merge_emit): Always create padding buffer. Add
355 asserts to make sure that the buffer is long enough.
357 2017-11-15 Alan Modra <amodra@gmail.com>
359 * bfd.c (union _bfd_doprnt_args): Add "Bad".
360 (_bfd_doprnt): Handle more flags.
361 (_bfd_doprnt_scan): Likewise. Tidy setting of args array.
362 (error_handler_internal): Init args type to Bad.
364 2017-11-14 Alan Modra <amodra@gmail.com>
367 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Warn on discarding
368 non-empty dynamic section.
369 (ppc_build_one_stub): Take elf_gp from output bfd, not output
371 (ppc_size_one_stub, ppc64_elf_next_toc_section): Likewise.
373 2017-11-14 Alan Modra <amodra@gmail.com>
375 * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for user
378 2017-11-13 Jan Beulich <jbeulich@suse.com>
380 * coff-tic80.c (COFF_ENCODE_ALIGNMENT, COFF_DECODE_ALIGNMENT):
382 * coffcode.h (coff_set_alignment_hook): Drop tic80 special case.
383 (coff_write_object_contents): Likewise. Issue diagnostic for too
386 2017-11-12 H.J. Lu <hongjiu.lu@intel.com>
389 * elf.c (_bfd_elf_map_sections_to_segments): Remove PF_X from
392 2017-11-12 Alan Modra <amodra@gmail.com>
394 * elflink.c (elf_link_add_object_symbols): Ignore anything but
395 defined and defweak symbols when setting up weakdefs.
397 2017-11-12 Alan Modra <amodra@gmail.com>
399 * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Set non_got_ref
400 to keep dyn_relocs, clear to discard. Comment.
401 (allocate_dynrelocs): Always clear non_got_ref when clearing
402 dyn_relocs in non-pic case. Invert non_got_ref test. Also test
403 dynamic_adjusted and ELF_COMMON_DEF_P. Move code deleting
404 dyn_relocs on undefined syms to handle for non-pic too.
405 (elf32_hppa_relocate_section): Simplify test for non-pic dyn relocs.
406 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Set non_got_ref
407 to keep dyn_relocs, clear to discard. Comment.
408 (allocate_dynrelocs): Always clear non_got_ref when clearing
409 dyn_relocs in non-pic case. Invert non_got_ref test. Also test
410 dynamic_adjusted and ELF_COMMON_DEF_P. Move code deleting
411 dyn_relocs on undefined syms to handle for non-pic too.
412 (ppc_elf_relocate_section): Simplify test for non-pic dyn relocs.
413 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Discard
414 dyn_relocs here. Don't bother setting non_got_ref. Comment.
415 (allocate_dynrelocs): Delete special handling of non-pic ELFv2
416 ifuncs. Move code deleting dyn_relocs on undefined symbols to
417 handle for non-pic too. Don't test non_got_ref. Do test
418 dynamic_adjusted and ELF_COMMON_DEF_P.
420 2017-11-08 Djordje Todorovic <djordje.todorovic@rt-rk.com>
422 * elf32-mips.c (elf32_mips_grok_psinfo): Extract core->pid.
423 * elf64-mips.c (elf64_mips_grok_psinfo): Likewise.
424 * elfn32-mips.c (elf32_mips_grok_psinfo): Likewise.
426 2017-11-08 Djordje Todorovic <djordje.todorovic@rt-rk.com>
428 * elf32-mips.c (elf32_mips_write_core_note): New function.
429 (elf_backend_write_core_note): New macro.
430 * elf64-mips.c (elf64_mips_write_core_note): New function.
431 (elf_backend_write_core_note): New macro.
432 * elfn32-mips.c (elf32_mips_write_core_note): New function.
433 (elf_backend_write_core_note): New macro.
435 2017-11-07 Alan Modra <amodra@gmail.com>
437 * elf64-ppc.c (ppc64_elf_build_stubs): Correct pluralization in
440 2017-11-07 Alan Modra <amodra@gmail.com>
442 * sysdep.h: Formatting, comment fixes.
443 (gettext, ngettext): Redefine when ENABLE_NLS.
444 (ngettext, dngettext, dcngettext): Define when !ENABLE_NLS.
445 (_): Define using gettext.
446 (textdomain, bindtextdomain): Use safer "do nothing".
447 * hosts/alphavms.h (textdomain, bindtextdomain): Likewise.
448 (ngettext, dngettext, dcngettext): Define when !ENABLE_NLS.
450 2017-11-05 Alan Modra <amodra@gmail.com>
453 * bfd.c (_bfd_doprnt_scan): Check args index before storing, not
456 2017-11-05 Alan Modra <amodra@gmail.com>
459 * bfd.c (union _bfd_doprnt_args): New.
460 (PRINT_TYPE): Add FIELD arg. Take value from args.
461 (_bfd_doprnt): Replace ap parameter with args. Adjust all
462 PRINT_TYPE invocations and reading of format args to suit.
463 Move "%%" handling out of switch handling args. Support
464 positional parameters.
465 (_bfd_doprnt_scan): New function.
466 (error_handler_internal): Call _bfd_doprnt_scan and read args.
468 2017-11-04 Alan Modra <amodra@gmail.com>
470 * elf32-ppc.c (got_entries_needed, got_relocs_needed): New functions.
471 (allocate_dynrelocs, ppc_elf_size_dynamic_sections): Use them here.
472 (ppc_elf_relocate_section): Don't output a dynamic relocation
473 for IE GOT entries in an executable.
474 * elf64-ppc.c (allocate_got): Trim unnecessary TPREL relocs.
475 (ppc64_elf_size_dynamic_sections): Likewise.
476 (ppc64_elf_relocate_section): Likewise.
478 2017-11-04 Alan Modra <amodra@gmail.com>
480 * elf32-ppc.c (readonly_dynrelocs): Delete info param. Update all
481 callers. Don't bother with SEC_ALLOC test. Return section pointer.
483 (maybe_set_textrel): ..here.
484 * elf64-ppc.c (readonly_dynrelocs): Return section pointer.
485 (maybe_set_textrel): Call minfo to print textrel warning to map file.
487 2017-11-04 Alan Modra <amodra@gmail.com>
489 * elf32-hppa.c (enum _tls_type): Move.
490 (struct elf32_hppa_link_hash_entry): Make tls_type a bitfield.
491 (elf32_hppa_check_relocs): Set DF_STATIC_TLS only for shared libraries.
492 Tidy tls_type handling. Set symbol tls_type for GOT_TLS_LDM too.
493 (got_entries_needed, got_relocs_needed): New functions.
494 (allocate_dynrelocs): Use them.
495 (elf32_hppa_size_dynamic_sections): Likewise.
496 (elf32_hppa_relocate_section): Delete bogus FIXME. Formatting.
497 Correct code emitting relocs on GD/IE got entries. Report an
498 error when a symbol has both normal and TLS GOT relocs.
500 2017-11-04 Alan Modra <amodra@gmail.com>
503 * elf32-hppa.c (elf32_hppa_check_relocs): Don't create dyn_relocs
504 for plabels when non-pic.
505 (maybe_set_textrel): New function.
506 (readonly_dynrelocs): Move and rewrite.
507 (elf32_hppa_adjust_dynamic_symbol): Use it. Don't create copy
508 relocs when def_regular or -z nocopyreloc. Handle non_got_ref
509 for functions. Expand non_got_ref comments.
510 (elf32_hppa_size_dynamic_sections): Use maybe_set_textrel.
512 2017-11-03 H.J. Lu <hongjiu.lu@intel.com>
514 * elf32-i386.c (elf_i386_check_relocs): Set plt.refcount to 1.
515 Don't use func_pointer_refcount. Don't set plt.refcount nor
516 non_got_ref for function pointer reference.
517 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
518 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Don't use
519 func_pointer_refcount.
520 (_bfd_x86_elf_copy_indirect_symbol): Don't copy
521 func_pointer_refcount.
522 (_bfd_x86_elf_hide_symbol): Don't use func_pointer_refcount.
523 * elfxx-x86.h (GENERATE_DYNAMIC_RELOCATION_P): Likewise.
524 (elf_x86_link_hash_entry): Remove func_pointer_refcount.
526 2017-11-03 Mingi Cho <mgcho.minic@gmail.com>
527 Nick Clifton <nickc@redhat.com>
530 * coffgen.c (_bfd_coff_get_external_symbols): Check for an
531 overlarge raw syment count.
532 (coff_get_normalized_symtab): Likewise.
534 2017-11-01 James Bowman <james.bowman@ftdichip.com>
536 * archures.c: Add bfd_mach_ft32b.
537 * cpu-ft32.c: Add arch_info_struct.
538 * elf32-ft32.c: Add R_FT32_RELAX, SC0, SC1,
540 (ft32_elf_relocate_section): Add clauses for R_FT32_SC0, SC1,
542 (ft32_reloc_shortable, elf32_ft32_is_diff_reloc)
543 (elf32_ft32_adjust_diff_reloc_value)
544 (elf32_ft32_adjust_reloc_if_spans_insn)
545 (elf32_ft32_relax_delete_bytes, elf32_ft32_relax_is_branch_target)
546 (ft32_elf_relax_section): New function.
547 * reloc.c: Add BFD_RELOC_FT32_RELAX, SC0, SC1, DIFF32.
548 * bfd-in2.h: Regenerate.
549 * libbfd.h: Regenerate.
551 2017-11-01 Nick Clifton <nickc@redhat.com>
554 * coffcode.h (coff_slurp_line_table): Check for an excessively
555 large line number count.
557 2017-11-01 Nick Clifton <nickc@redhat.com>
560 * peicode.h (pe_bfd_read_buildid): Revise check for invalid size
561 and offset in light of further possible bogus values.
563 2017-11-01 Alan Modra <amodra@gmail.com>
566 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't create a plt
567 entry when just a dynamic reloc can serve. Ensure no dynamic
568 relocations when UNDEFWEAK_NO_DYNAMIC_RELOC by setting non_got_ref.
569 Expand and move the non_got_ref comment.
570 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
572 2017-11-01 Nick Clifton <nickc@redhat.com>
575 * coffgen.c (_bfd_coff_free_symbols): Fail if called on a non-COFF
577 * cofflink.c (coff_link_check_archive_element): Skip non-COFF
578 members of an archive.
580 2017-10-31 Nick Clifton <nickc@redhat.com>
583 * peicode.h (pe_bfd_read_buildid): Check for invalid size and data
586 2017-10-30 Alan Modra <amodra@gmail.com>
588 * elf32-frv.c (ELF_TARGET_ID): Don't define for generic
591 * elflink.c (elf_gc_sweep): Test elf_object_id in addition to
593 (bfd_elf_gc_sections): Likewise.
595 2017-10-30 Alan Modra <amodra@gmail.com>
598 * elf32-hppa.c (elf32_hppa_check_relocs): Move SEC_ALLOC test to
599 ensure non_got_ref is not set due to debug references.
600 (elf32_hppa_adjust_dynamic_symbol): Tidy plabel handling. Use
601 SYMBOL_CALLS_LOCAL and UNDEFWEAK_NO_DYNAMIC_RELOC when determining
602 need for a plt entry.
603 (allocate_dynrelocs): Similarly for got entries. Tidy code discarding
604 dynamic relocs when pic. Remove bogus code attempting to handle
606 (elf32_hppa_relocate_section): Similarly. Delete resolved_to_zero
608 (elf32_hppa_finish_dynamic_symbol): Use UNDEFWEAK_NO_DYNAMIC_RELOC
609 and SYMBOL_REFERENCES_LOCAL in GOT handling.
611 2017-10-28 Alan Modra <amodra@gmail.com>
614 * elflink.c (_bfd_elf_merge_symbol): Remove relocs_compatible check.
615 * elf32-hppa.c (elf_backend_relocs_compatible): Define.
616 * elf32-ppc.c (elf_backend_relocs_compatible): Define.
617 * elf64-ppc.c (elf_backend_relocs_compatible): Define.
619 2017-10-25 Alan Modra <amodra@gmail.com>
621 * archive.c (_bfd_compute_and_write_armap): Match "__gnu_lto_slim"
622 optionally prefixed with "_".
623 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
625 2017-10-24 Andrew Waterman <andrew@sifive.com>
627 * elfnn-riscv.c (_bfd_riscv_relax_lui): Don't relax to c.lui
630 2017-10-24 Renlin Li <renlin.li@arm.com>
633 * elflink.c (_bfd_elf_merge_symbol): Handle multiple definition case.
635 2017-10-23 Nick Clifton <nickc@redhat.com>
638 * elflink.c (elf_link_output_extsym): Keep global undefined
639 symbols if they have been marked as needed.
641 2017-10-23 Maciej W. Rozycki <macro@imgtec.com>
643 * elfn32-mips.c (mips_elf_n32_mkobject): New prototype and
645 (bfd_elf32_mkobject): Use `mips_elf_n32_mkobject' rather than
646 `_bfd_mips_elf_mkobject'.
648 2017-10-22 Hans-Peter Nilsson <hp@axis.com>
651 * config.bfd (cris-*-* | crisv32-*-*): Require a 64-bit BFD.
653 2017-10-19 Palmer Dabbelt <palmer@dabbelt.com>
655 * elfnn-riscv.c (riscv_pcgp_hi_reloc): New structure.
656 (riscv_pcgp_lo_reloc): Likewise.
657 (riscv_pcgp_relocs): Likewise.
658 (riscv_init_pcgp_relocs): New function.
659 (riscv_free_pcgp_relocs): Likewise.
660 (riscv_record_pcgp_hi_reloc): Likewise.
661 (riscv_record_pcgp_lo_reloc): Likewise.
662 (riscv_delete_pcgp_hi_reloc): Likewise.
663 (riscv_use_pcgp_hi_reloc): Likewise.
664 (riscv_record_pcgp_lo_reloc): Likewise.
665 (riscv_find_pcgp_lo_reloc): Likewise.
666 (riscv_delete_pcgp_lo_reloc): Likewise.
667 (_bfd_riscv_relax_pc): Likewise.
668 (_bfd_riscv_relax_section): Handle R_RISCV_PCREL_* relocations
669 via the new functions above.
671 2017-10-19 Palmer Dabbelt <palmer@dabbelt.com>
673 * elfnn-riscv.c (R_RISCV_DELETE): New define.
674 (_bfd_riscv_relax_delete): New function.
675 (perform_relocation): Handle R_RISCV_DELETE.
676 (_bfd_riscv_relax_section): Likewise.
678 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
681 * elfxx-tilegx.c (tilegx_elf_tls_transition): Replace
682 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
683 bfd_link_executable for TLS check.
684 (tilegx_elf_check_relocs): Likewise.
685 (allocate_dynrelocs): Likewise.
686 (tilegx_elf_relocate_section): Likewise.
688 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
691 * elf32-tilepro.c (tilepro_elf_tls_transition): Replace
692 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
693 bfd_link_executable for TLS check.
694 (tilepro_elf_check_relocs): Likewise.
695 (allocate_dynrelocs): Likewise.
696 (tilepro_elf_relocate_section): Likewise.
698 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
701 * elfxx-sparc.c (sparc_elf_tls_transition): Replace
702 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
703 bfd_link_executable for TLS check.
704 (_bfd_sparc_elf_check_relocs): Likewise.
705 (allocate_dynrelocs): Likewise.
706 (_bfd_sparc_elf_relocate_section): Likewise.
708 2017-10-18 H.J. Lu <hongjiu.lu@intel.com>
710 * elf32-tilepro.c (tilepro_elf_gc_mark_hook): Call
711 _bfd_generic_link_add_one_symbol to mark __tls_get_addr.
712 * elfxx-tilegx.c (tilegx_elf_gc_mark_hook): Likewise.
714 2017-10-17 H.J. Lu <hongjiu.lu@intel.com>
716 * elf32-microblaze.c (microblaze_elf_check_relocs): Check for
717 indirect and warning symbols.
719 2017-10-17 Alan Modra <amodra@gmail.com>
722 * elf-properties.c (_bfd_elf_parse_gnu_properties): Compare datasz
723 against size left rather than comparing pointers. Reorganise loop.
725 2017-10-17 Alan Modra <amodra@gmail.com>
728 * aoutx.h (aout_get_external_symbols): Handle stringsize of zero,
729 and error for any other size that doesn't cover the header word.
731 2017-10-16 H.J. Lu <hongjiu.lu@intel.com>
733 * elf-bfd.h (elf_backend_data): Remove gc_sweep_hook.
734 * elf32-arm.c (elf32_arm_gc_sweep_hook): Removed.
735 (elf_backend_gc_sweep_hook): Likewise.
736 * elf32-bfin.c (bfin_gc_sweep_hook): Likewise.
737 (bfinfdpic_gc_sweep_hook): Likewise.
738 (elf_backend_gc_sweep_hook): Likewise.
739 * elf32-cr16.c (elf32_cr16_gc_sweep_hook): Likewise.
740 (elf_backend_gc_sweep_hook): Likewise.
741 * elf32-cris.c (cris_elf_gc_sweep_hook): Likewise.
742 (elf_backend_gc_sweep_hook): Likewise.
743 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Likewise.
744 (elf_backend_gc_sweep_hook): Likewise.
745 * elf32-lm32.c (lm32_elf_gc_sweep_hook): Likewise.
746 (elf_backend_gc_sweep_hook): Likewise.
747 * elf32-m32r.c (m32r_elf_gc_sweep_hook): Likewise.
748 (elf_backend_gc_sweep_hook): Likewise.
749 * elf32-m68k.c (elf_m68k_got_entry): Remove elf_m68k_gc_sweep_hook
751 (elf_m68k_remove_got_entry_type): Removed.
752 (elf_m68k_find_got_entry_ptr): Likewise.
753 (elf_m68k_remove_got_entry): Likewise.
754 (elf_m68k_gc_sweep_hook): Likewise.
755 (elf_backend_gc_sweep_hook): Likewise.
756 * elf32-mcore.c (mcore_elf_gc_sweep_hook): Likewise.
757 (elf_backend_gc_sweep_hook): Likewise.
758 * elf32-metag.c (elf_metag_gc_sweep_hook): Likewise.
759 (elf_backend_gc_sweep_hook): Likewise.
760 * elf32-microblaze.c (elf_backend_gc_sweep_hook): Likewise.
761 (elf_backend_gc_sweep_hook): Likewise.
762 * elf32-mips.c (elf_backend_gc_sweep_hook): Likewise.
763 (elf_backend_gc_sweep_hook): Likewise.
764 * elf32-nds32.c (nds32_elf_gc_sweep_hook): Likewise.
765 (elf_backend_gc_sweep_hook): Likewise.
766 * elf32-nios2.c (nios2_elf32_gc_sweep_hook): Likewise.
767 (elf_backend_gc_sweep_hook): Likewise.
768 * elf32-or1k.c (or1k_elf_gc_sweep_hook): Likewise.
769 (elf_backend_gc_sweep_hook): Likewise.
770 * elf32-ppc.c (ppc_elf_gc_sweep_hook): Likewise.
771 (elf_backend_gc_sweep_hook): Likewise.
772 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
773 (elf_backend_gc_sweep_hook): Likewise.
774 * elf32-sparc.c (elf_backend_gc_sweep_hook): Likewise.
775 * elf32-tic6x.c (elf32_tic6x_gc_sweep_hook): Likewise.
776 (elf_backend_gc_sweep_hook): Likewise.
777 * elf32-tilegx.c (elf_backend_gc_sweep_hook): Likewise.
778 * elf32-tilepro.c (tilepro_elf_gc_sweep_hook): Likewise.
779 (elf_backend_gc_sweep_hook): Likewise.
780 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
781 (elf_backend_gc_sweep_hook): Likewise.
782 * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Likewise.
783 (elf_backend_gc_sweep_hook): Likewise.
784 * elf64-alpha.c (elf64_alpha_gc_sweep_hook): Likewise.
785 (elf_backend_gc_sweep_hook): Likewise.
786 * elf64-mips.c (elf_backend_gc_sweep_hook): Likewise.
787 * elf64-mmix.c (mmix_elf_gc_sweep_hook): Likewise.
788 (elf_backend_gc_sweep_hook): Likewise.
789 * elf64-ppc.c (elf_backend_gc_sweep_hook): Likewise.
790 (ppc64_elf_gc_sweep_hook): Likewise.
791 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
792 (elf_backend_gc_sweep_hook): Likewise.
793 * elf64-sparc.c (elf_backend_gc_sweep_hook): Likewise.
794 * elf64-tilegx.c (elf_backend_gc_sweep_hook): Likewise.
795 * elflink.c (elf_link_add_object_symbols): Don't call
796 _bfd_elf_link_check_relocs here.
797 (gc_sweep_hook_fn): Removed.
798 (elf_gc_sweep): Remove gc_sweep_hook.
799 * elfnn-aarch64.c (elfNN_aarch64_gc_sweep_hook): Removed.
800 (elf_backend_gc_sweep_hook): Likewise.
801 * elfnn-riscv.c (riscv_elf_gc_sweep_hook): Likewise.
802 (elf_backend_gc_sweep_hook): Likewise.
803 * elfxx-mips.c (_bfd_mips_elf_gc_sweep_hook): Likewise.
804 * elfxx-mips.h (_bfd_mips_elf_gc_sweep_hook): Likewise.
805 (elf_backend_gc_sweep_hook): Likewise.
806 * elfxx-sparc.c (_bfd_sparc_elf_gc_sweep_hook): Likewise.
807 * elfxx-sparc.h (_bfd_sparc_elf_gc_sweep_hook): Likewise.
808 * elfxx-target.h (elf_backend_gc_sweep_hook): Likewise.
809 (elfNN_bed): Remove elf_backend_gc_sweep_hook.
810 * elfxx-tilegx.c (tilegx_elf_gc_sweep_hook): Removed.
811 * elfxx-tilegx.h (tilegx_elf_gc_sweep_hook): Likewise.
813 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
815 * elf32-i386.c (elf_i386_backend_data): Removed.
816 (get_elf_i386_backend_data): Likewise.
817 (elf_i386_arch_bed): Replace elf_i386_backend_data with
818 elf_x86_backend_data.
819 (elf_i386_get_synthetic_symtab): Likewise.
820 (elf_i386_nacl_arch_bed): Likewise.
821 (elf_i386_vxworks_arch_bed): Likewise.
822 (elf_i386_relocate_section): Check target_os instead of
824 (elf_i386_finish_dynamic_symbol): Likewise.
825 (elf_i386_finish_dynamic_sections): Use htab->plt0_pad_byte.
826 Check target_os instead of is_vxworks.
827 (elf_i386_link_setup_gnu_properties): Remove normal_target and
828 is_vxworks. Initialize plt0_pad_byte.
829 * elf64-x86-64.c (elf_x86_64_backend_data); Removed.
830 (get_elf_x86_64_arch_data): Likewise.
831 (get_elf_x86_64_backend_data): Likewise.
832 (elf_x86_64_arch_bed): Replace elf_x86_64_backend_data with
833 elf_x86_backend_data.
834 (elf_x86_64_get_synthetic_symtab): Likewise.
835 (elf_x86_64_nacl_arch_bed): Likewise.
836 (elf_x86_64_link_setup_gnu_properties): Remove is_vxworks and
837 normal_target. Initialize plt0_pad_byte.
838 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Check target_os
839 instead of is_vxworks.
840 (_bfd_x86_elf_size_dynamic_sections): Likewise.
841 (_bfd_x86_elf_finish_dynamic_sections): Likewise.
842 (_bfd_x86_elf_adjust_dynamic_symbol): Likewise.
843 (_bfd_x86_elf_link_hash_table_create): Initialize target_os.
844 (_bfd_x86_elf_link_setup_gnu_properties): Remove is_vxworks.
845 Update normal_target. Set up plt0_pad_byte. Check target_os
846 instead of is_vxworks.
847 * elfxx-x86.h (elf_x86_target_os): New.
848 (elf_x86_backend_data): Likewise.
849 (get_elf_x86_backend_data): Likewise.
850 (elf_x86_link_hash_table): Remove is_vxworks. Add plt0_pad_byte
852 (elf_x86_init_table): Remove normal_target and is_vxworks. Add
855 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
857 * elf32-i386.c (elf_i386_finish_dynamic_sections): Call
858 _bfd_x86_elf_finish_dynamic_sections.
859 * elf64-x86-64.c (elf_x86_64_finish_dynamic_sections): Likewise.
860 * elfxx-x86.c (_bfd_x86_elf_finish_dynamic_sections): New
862 * elfxx-x86.h (_bfd_x86_elf_finish_dynamic_sections): New
865 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
868 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
869 hide symbol which was forced to be dynamic.
871 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
874 * elf32-cris.c (cris_elf_relocate_section): Don't generate
875 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
876 (cris_elf_check_relocs): Don't allocate dynamic relocation
877 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
879 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
882 * elf32-sh.c (allocate_dynrelocs): Discard dynamic relocations
883 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
884 (sh_elf_relocate_section): Don't generate dynamic relocation if
885 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
887 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
890 * elf32-s390.c (allocate_dynrelocs): Discard dynamic
891 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
892 (elf_s390_relocate_section): Don't generate dynamic relocation
893 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
894 * elf64-s390.c (allocate_dynrelocs): Discard dynamic
895 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
896 (elf_s390_relocate_section): Don't generate dynamic relocation
897 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
899 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
902 * elf32-nios2.c (nios2_elf32_relocate_section): Don't generate
903 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
904 (allocate_dynrelocs): Discard dynamic relocations if
905 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
907 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
910 * elf32-microblaze.c (microblaze_elf_relocate_section): Don't
911 generate dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is
913 (allocate_dynrelocs): Discard dynamic relocations if
914 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
916 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
919 * elf32-m68k.c (elf_m68k_check_relocs): Don't allocate dynamic
920 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
921 (elf_m68k_adjust_dynamic_symbol): Don't make symbol dynamic if
922 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
923 (elf_m68k_relocate_section): Don't generate dynamic relocation
924 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
926 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
929 * elf32-hppa.c (ensure_undef_dynamic): Don't make undefined
930 symbol dynamic if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
931 (allocate_dynrelocs): Discard dynamic relocations if
932 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
933 (elf32_hppa_relocate_section): Don't generate dynamic
934 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
936 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
939 * elfnn-ia64.c (elfNN_ia64_check_relocs): Don't allocate
940 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
941 (allocate_fptr): Don't allocate function pointer if
942 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
943 (allocate_dynrel_entries): Don't allocate dynamic relocation
944 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
945 (set_got_entry): Don't set GOT entry if
946 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
947 (set_pltoff_entry): Don't set PLTOFF entry if
948 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
949 (elfNN_ia64_relocate_section): Don't install dynamic relocation
950 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
952 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
955 * elfxx-mips.c (mips_elf_calculate_relocation): Don't generate
956 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
957 (allocate_dynrelocs): Don't allocate dynamic relocations if
958 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
960 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
963 * elf32-arm.c (elf32_arm_final_link_relocate): Don't generate
964 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
965 (allocate_dynrelocs_for_symbol): Discard dynamic relocations
966 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
968 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
971 * elf32-tilepro.c (allocate_dynrelocs): Discard dynamic
972 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
973 (tilepro_elf_relocate_section): Don't generate dynamic
974 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
975 * elfxx-tilegx.c (allocate_dynrelocs): Discard dynamic
976 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
977 (tilegx_elf_relocate_section): Don't generate dynamic
978 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
980 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
983 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Don't
984 generate dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is
986 (elfNN_aarch64_allocate_dynrelocs): Discard dynamic relocations
987 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
989 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
991 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Moved to ...
992 * elf-bfd.h (UNDEFWEAK_NO_DYNAMIC_RELOC): Here.
993 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Removed.
995 2017-10-12 James Bowman <james.bowman@ftdichip.com>
997 * bfd-in2.h: Regenerate.
998 * libbfd.h: Regenerate.
999 * elf32-ft32.c: Add HOWTO R_FT32_15.
1000 * reloc.c: Add BFD_RELOC_FT32_15.
1002 2017-10-12 Nick Clifton <nickc@redhat.com>
1004 * reloc.c (enum bfd_reloc_status): Start values at 2.
1005 * bfd-in2.h: Regenerate.
1006 * elfnn-aarch64.c (aarch64_relocate): Invert sense of function, so
1007 that a TRUE return indicates success. Compare the result of
1008 calling _bfd_aarch64_elf_put_addend against bfd_reloc_ok.
1009 (build_one_stub): Change sense of tests against aarch64_relocate
1011 (elfNN_aarch64_tls_relax): Return bfd_reloc_notsupported, rather
1012 than FALSE, when an error is detected.
1013 (elfNN_aarch64_final_link_relocate): Likewise.
1015 2017-10-12 H.J. Lu <hongjiu.lu@intel.com>
1017 * elf32-i386.c (elf_backend_hide_symbol): New.
1018 * elf64-x86-64.c (elf_backend_hide_symbol): Likewise.
1019 * elfxx-x86.c (_bfd_x86_elf_hide_symbol): Likewise.
1020 * elfxx-x86.h (_bfd_x86_elf_hide_symbol): Likewise.
1022 2017-10-12 Alan Modra <amodra@gmail.com>
1024 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Call
1025 elf_backend_hide_symbol, not _bfd_elf_link_hash_hide_symbol.
1026 (bfd_elf_define_start_stop): Likewise.
1028 2017-10-12 Alan Modra <amodra@gmail.com>
1030 * elf32-nds32.c (nds32_elf_size_dynamic_sections): Set .interp
1031 when executable rather than non-PIC.
1032 * elf32-score.c (s3_bfd_score_elf_size_dynamic_sections): Likewise.
1033 * elf32-score7.c (s7_bfd_score_elf_size_dynamic_sections): Likewise.
1035 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
1037 * elf-bfd.h (elf_backend_data): Add `linux_prpsinfo64_ugid16'
1039 * elf-linux-core.h (elf_external_linux_prpsinfo64): Rename to...
1040 (elf_external_linux_prpsinfo64_ugid32): ... this.
1041 (swap_linux_prpsinfo32_out): Rename to...
1042 (swap_linux_prpsinfo32_ugid32_out): ... this.
1043 (elf_external_linux_prpsinfo64_ugid16): New structure.
1044 (swap_linux_prpsinfo64_ugid16_out): New function.
1045 * elfxx-target.h [!elf_backend_linux_prpsinfo64_ugid16]
1046 (elf_backend_linux_prpsinfo64_ugid16): Define.
1047 (elfNN_bed): Initialize `linux_prpsinfo64_ugid16' member.
1048 * elf.c (elfcore_write_linux_prpsinfo64): Handle both variants
1049 of the 64-bit Linux core PRPSINFO note.
1050 * elf64-sh64.c (elf_backend_linux_prpsinfo64_ugid16): Define.
1052 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
1054 * elf-bfd.h (elf_backend_data): Add `linux_prpsinfo32_ugid16'
1056 (elfcore_write_ppc_linux_prpsinfo32): Remove prototype.
1057 * elf32-ppc.c (elfcore_write_ppc_linux_prpsinfo32): Remove.
1058 (elf_external_ppc_linux_prpsinfo32)
1059 (swap_ppc_linux_prpsinfo32_out): Move to...
1060 * elf-linux-core.h (elf_external_linux_prpsinfo32_ugid32)
1061 (swap_linux_prpsinfo32_ugid32_out): ... these.
1062 (elf_external_linux_prpsinfo32): Rename to...
1063 (elf_external_linux_prpsinfo32_ugid16): ... this.
1064 (swap_linux_prpsinfo32_out): Rename to...
1065 (swap_linux_prpsinfo32_ugid16_out): ... this.
1066 * elfxx-target.h [!elf_backend_linux_prpsinfo32_ugid16]
1067 (elf_backend_linux_prpsinfo32_ugid16): Define.
1068 (elfNN_bed): Initialize `linux_prpsinfo32_ugid16' member.
1069 * elf.c (elfcore_write_linux_prpsinfo32): Handle both variants
1070 of the 32-bit Linux core PRPSINFO note.
1071 * elf32-am33lin.c (elf_backend_linux_prpsinfo32_ugid16): Define.
1072 * elf32-arm.c (elf_backend_linux_prpsinfo32_ugid16): Define.
1073 * elf32-cris.c (elf_backend_linux_prpsinfo32_ugid16): Define.
1074 * elf32-frv.c (elf_backend_linux_prpsinfo32_ugid16): Define.
1075 * elf32-i386.c (elf_backend_linux_prpsinfo32_ugid16): Define.
1076 * elf32-m32r.c (elf_backend_linux_prpsinfo32_ugid16): Define.
1077 * elf32-m68k.c (elf_backend_linux_prpsinfo32_ugid16): Define.
1078 * elf32-s390.c (elf_backend_linux_prpsinfo32_ugid16): Define.
1079 * elf32-sh.c (elf_backend_linux_prpsinfo32_ugid16): Define.
1080 * elf32-sparc.c (elf_backend_linux_prpsinfo32_ugid16): Define.
1082 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
1084 * elf-linux-core.h (elf_external_linux_prpsinfo64): Move the
1085 `gap' member ahead of `pr_flag'.
1087 2017-10-11 Pedro Alves <palves@redhat.com>
1089 * bfd.c (_doprnt): Rename to ...
1090 (_bfd_doprnt): ... this.
1091 (error_handler_internal): Adjust.
1093 2017-10-10 H.J. Lu <hongjiu.lu@intel.com>
1095 * elf32-i386.c (elf_i386_check_relocs): Set GOT refcount to 1
1096 instead of incrementing it.
1097 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1099 2017-10-10 Renlin Li <renlin.li@arm.com>
1102 * elf32-arm.c (allocate_dynrelocs_for_symbol): Only make undefined weak
1103 symbols into dynamic.
1105 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
1108 * elfnn-riscv.c (riscv_elf_link_hash_table): Add max_alignment.
1109 (riscv_elf_link_hash_table_create): Initialize max_alignment to
1111 (_bfd_riscv_relax_section): Cache the max alignment of output
1112 sections if possible.
1114 2017-10-10 Alan Modra <amodra@gmail.com>
1116 * elf64-ppc.c (ppc64_elf_before_check_relocs): Set sec_type for
1117 .opd whenever .opd is present and non-zero size. Move code
1118 setting abiversion to/from output file earlier. Only set
1119 u.opd.func_sec when --gc-sections. Read relocs and set up
1120 u.opd.func_sec values here..
1121 (ppc64_elf_check_relocs): ..rather than here. Simplify opd
1123 (ppc64_elf_edit_opd): Don't set sec_type for .opd here.
1125 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
1127 * elf-m10300.c (mn10300_elf_check_relocs): Don't free cached
1130 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
1132 * elf32-bfin.c (bfin_size_dynamic_sections): Don't create the
1133 .interp section with "ld --no-dynamic-linker".
1135 2017-10-09 Alan Modra <amodra@gmail.com>
1138 * dwarf2.c (_bfd_dwarf2_cleanup_debug_info): Free
1139 funcinfo_hash_table and varinfo_hash_table.
1141 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
1143 * elf32-sh.c (readonly_dynrelocs): Dump dynamic relocation
1144 in read-only section with minfo.
1145 (sh_elf_size_dynamic_sections): Likewise.
1147 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
1149 * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Remove
1152 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
1154 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_sections): Set
1155 this_hdr.sh_entsize only if section size > 0.
1157 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
1159 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Reformat.
1161 2017-10-07 H.J. Lu <hongjiu.lu@intel.com>
1163 * elfxx-sparc.c (readonly_dynrelocs): Dump dynamic relocation
1164 in read-only section with minfo.
1165 (_bfd_sparc_elf_size_dynamic_sections): Likewise.
1167 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1169 * elfxx-x86.h (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Update
1172 2017-10-06 John Baldwin <jhb@FreeBSD.org>
1174 * elf-bfd.h (struct elf_backend_data): Add
1175 `elf_backend_grok_freebsd_prstatus'.
1176 * elf.c (elfcore_grok_freebsd_note): Call
1177 `elf_backend_grok_freebsd_prstatus' to handle NT_PRSTATUS if
1179 * elfn32-mips.c (elf_n32_mips_grok_freebsd_prstatus): New
1181 (elf_backend_grok_freebsd_prstatus): Define.
1182 * elfxx-target.h (elf_backend_grok_freebsd_prstatus): Define.
1183 (elfNN_bed): Initialize `elf_backend_grok_freebsd_prstatus'.
1185 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1187 * elf32-i386.c (elf_i386_check_relocs): Replace has_got_reloc
1188 and has_non_got_reloc with zero_undefweak.
1189 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1190 * elfxx-x86.c (_bfd_x86_elf_link_hash_newfunc): Initialize
1191 zero_undefweak to 1.
1192 (_bfd_x86_elf_copy_indirect_symbol): Replace has_got_reloc and
1193 has_non_got_reloc with zero_undefweak.
1194 * elfxx-x86.h (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace
1195 has_got_reloc and has_non_got_reloc with zero_undefweak.
1196 (elf_x86_link_hash_entry): Likewise.
1198 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1200 * elfxx-x86.h (COPY_INPUT_RELOC_P): Add "do/while(0);".
1201 (VERIFY_COPY_RELOC): Likewise.
1203 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1205 * elfxx-x86.h (VERIFY_COPY_RELOC): New.
1206 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Use it.
1207 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
1209 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1211 * elfxx-x86.h (VERIFY_PLT_ENTRY): New.
1212 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Use it.
1213 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
1215 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1217 * elfxx-x86.h (COPY_INPUT_RELOC_P): New.
1218 * elf32-i386.c (elf_i386_relocate_section): Use it.
1219 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1221 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1223 * elf32-i386.c (X86_SIZE_TYPE_P): New.
1224 (elf_i386_relocate_section): Use GENERATE_DYNAMIC_RELOCATION_P.
1225 * elf64-x86-64.c (X86_SIZE_TYPE_P): New.
1226 (elf_x86_64_relocate_section): Use GENERATE_DYNAMIC_RELOCATION_P.
1227 * elfxx-x86.h (GENERATE_DYNAMIC_RELOCATION_P): New.
1229 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1231 * elfxx-x86.h (POINTER_LOCAL_IFUNC_P): New.
1232 (PLT_LOCAL_IFUNC_P): Likewise.
1233 * elf32-i386.c (elf_i386_relocate_section): Use them.
1234 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1236 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1238 * elfxx-x86.h (GENERATE_RELATIVE_RELOC_P): New.
1239 * elf32-i386.c (elf_i386_relocate_section): Use it.
1240 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1242 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1244 * elfxx-x86.h (RESOLVED_LOCALLY_P): New.
1245 * elf32-i386.c (elf_i386_relocate_section): Use it.
1246 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1248 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1250 * elf32-i386.c (X86_PCREL_TYPE_P): New.
1251 (elf_i386_check_relocs): Use NEED_DYNAMIC_RELOCATION_P.
1252 * elf64-x86-64.c (IS_X86_64_PCREL_TYPE): Renamed to ...
1253 (X86_PCREL_TYPE_P): This.
1254 (elf_x86_64_check_relocs): Use NEED_DYNAMIC_RELOCATION_P.
1255 Replace IS_X86_64_PCREL_TYPE with X86_PCREL_TYPE_P.
1256 (elf_x86_64_relocate_section): Replace IS_X86_64_PCREL_TYPE with
1258 * elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): New.
1260 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1262 * elfxx-x86.h (TLS_TRANSITION_IE_TO_LE_P): New.
1263 * elf32-i386.c (elf_i386_tls_transition): Use it.
1264 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
1266 2017-10-05 H.J. Lu <hongjiu.lu@intel.com>
1268 * elf32-ppc.c (readonly_dynrelocs): Add a link_info argument.
1269 Dump dynamic relocation in read-only section with minfo if
1271 (ppc_elf_adjust_dynamic_symbol): Pass NULL to readonly_dynrelocs.
1272 (maybe_set_textrel): Likewise.
1273 (ppc_elf_size_dynamic_sections): Dump dynamic relocation in
1274 read-only section with minfo.
1276 2017-10-05 John Baldwin <jhb@FreeBSD.org>
1278 * elf.c (elfcore_grok_freebsd_note): Handle NT_ARM_VFP.
1280 2017-10-05 H.J. Lu <hongjiu.lu@intel.com>
1282 * elf32-tilepro.c (readonly_dynrelocs): Dump dynamic relocation
1283 in read-only section with minfo.
1284 (tilepro_elf_size_dynamic_sections): Likewise.
1285 * elfxx-tilegx.c (readonly_dynrelocs): Likewise.
1286 (tilegx_elf_size_dynamic_sections): Likewise.
1288 2017-10-05 Pedro Alves <palves@redhat.com>
1291 * bfd.c (bfd_set_error): Revert 2017-10-04 change. Remove
1292 ellipsis parameter. Split out bfd_error_on_input code to..
1293 (bfd_set_input_error): .. New function.
1294 * archive.c (_bfd_write_archive_contents): Use bfd_set_input_error.
1295 * vms-lib.c (_bfd_vms_lib_write_archive_contents): Likewise.
1296 * bfd-in2.h: Regenerate.
1298 2017-10-05 Alan Modra <amodra@gmail.com>
1300 * elflink.c (elf_link_input_bfd): Correct ctor/dtor in init_array/
1301 fini_array error value.
1303 2017-10-05 Alan Modra <amodra@gmail.com>
1306 * elf.c (_bfd_elf_setup_sections): Don't trim reloc sections from
1308 (_bfd_elf_init_reloc_shdr): Pass sec_hdr, use it to copy SHF_GROUP
1310 (elf_fake_sections): Adjust calls. Exit immediately on failure.
1311 (bfd_elf_set_group_contents): Add associated reloc section indices
1314 2017-10-04 Alan Modra <amodra@gmail.com>
1316 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't sort or
1317 classify symbols for ELFv2.
1319 2017-10-04 Pavel I. Kryukov <kryukov@frtk.ru>
1322 * bfd.c (bfd_set_error): Avoid UB on passing arg to va_start that
1323 undergoes default promotion.
1324 * bfd-in2.h: Regenerate.
1326 2017-10-02 Alan Modra <amodra@gmail.com>
1328 * elf32-ppc.c (ppc_elf_relocate_section): Fix comment typo.
1329 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1331 2017-10-01 Alan Modra <amodra@gmail.com>
1334 * dwarf2.c (new_line_sorts_after): Remove end_sequence comparison.
1335 (add_line_info): Always put end_sequence last.
1337 2017-10-01 Alan Modra <amodra@gmail.com>
1340 * dwarf2.c (read_section): Allocate buffer with extra byte for
1341 bfd_simple_get_relocated_section_contents rather than copying
1344 2017-09-29 Alan Modra <amodra@gmail.com>
1346 * merge.c (merge_strings): Return FALSE on malloc failure.
1347 (_bfd_merge_sections): Return failures from record_section and
1350 2017-09-28 Alan Modra <amodra@gmail.com>
1353 * elflink.c (_bfd_elf_merge_symbol): Set non_ir_ref_dynamic in
1354 a case where plugin_notice isn't called.
1356 2017-09-27 Kuan-Lin Chen <kuanlinchentw@gmail.com>
1358 * elf32-nds32.c (nds32_elf_relax_section): Fix a tautological
1361 2017-09-26 H.J. Lu <hongjiu.lu@intel.com>
1364 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't pass
1365 output_bfd to info->callbacks->minfo.
1367 2017-09-26 Nick Clifton <nickc@redhat.com>
1370 * elf64-x86-64.c (elf_x86_64_info_to_howto): Do not trigger an
1371 assertion failure if elf_x86_64_rtype_to_howto has already issued
1374 2017-09-26 Alan Modra <amodra@gmail.com>
1377 * dwarf2.c (read_formatted_entries): Use read_attribute_value to
1380 2017-09-26 Nick Clifton <nickc@redhat.com>
1383 * dwarf2.c (read_formatted_entries): Fail early if we know that
1384 the loop parsing data entries will overflow the end of the
1387 2017-09-26 Alan Modra <amodra@gmail.com>
1390 * dwarf2.c (struct comp_unit): Delete sec_info_ptr field.
1391 (find_abstract_instance_name): Calculate DW_FORM_ref_addr relative
1392 to stash->info_ptr_memory, and check die_ref is within that memory.
1393 Set info_ptr_end correctly when another CU is refd. Check die_ref
1394 for DW_FORM_ref4 etc. is within CU.
1396 2017-09-26 Alan Modra <amodra@gmail.com>
1399 * dwarf2.c (concat_filename): Return "<unknown>" on NULL filename.
1400 (read_formatted_entries): Init "fe".
1401 (decode_line_info <DW_LNE_define_file>): Use line_info_add_file_name.
1403 2017-09-26 Alan Modra <amodra@gmail.com>
1406 * dwarf2.c (decode_line_info): Ensure line_ptr stays within
1407 bounds in inner loop.
1409 2017-09-25 Alan Modra <amodra@gmail.com>
1412 * dwarf1.c (parse_die): Sanity check pointer against section limit
1413 before dereferencing.
1414 (parse_line_table): Likewise.
1416 2017-09-25 Alan Modra <amodra@gmail.com>
1419 * dwarf2.c (scan_unit_for_symbols): Ignore DW_AT_name unless it
1421 (parse_comp_unit): Likewise.
1423 2017-09-25 Alan Modra <amodra@gmail.com>
1426 * dwarf2.c (read_formatted_entries): Error on format_count zero.
1428 2017-09-24 Alan Modra <amodra@gmail.com>
1431 * opncls.c (bfd_get_debug_link_info_1): Properly check that crc is
1432 within section bounds.
1434 2017-09-24 Alan Modra <amodra@gmail.com>
1437 * dwarf2.c (decode_line_info): Properly free line sequences on error.
1439 2017-09-24 Alan Modra <amodra@gmail.com>
1442 * dwarf2.c (find_abstract_instance_name): Add orig_info_ptr and
1443 pname param. Return status. Make name const. Don't abort,
1444 return an error. Formatting. Exit if current info_ptr matches
1445 orig_info_ptr. Update callers.
1446 (scan_unit_for_symbols): Start at nesting_level of zero. Make
1447 nested_funcs an array of structs for extensibility. Formatting.
1449 2017-09-24 Alan Modra <amodra@gmail.com>
1452 * dwarf2.c (decode_line_info): Fail on lh.line_range of zero
1453 rather than dividing by zero.
1455 2017-09-24 Alan Modra <amodra@gmail.com>
1458 * dwarf2.c (decode_line_info): Correct .debug_line unit_length check.
1460 2017-09-24 Alan Modra <amodra@gmail.com>
1463 * dwarf2.c (scan_unit_for_symbols): Check u.blk->data is non-NULL.
1465 2017-09-24 Alan Modra <amodra@gmail.com>
1468 * elf.c (_bfd_elf_slurp_version_tables): Test sh_info on
1469 SHT_GNU_verneed section for sanity. Don't zalloc memory for
1472 2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
1475 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Guard against
1478 2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
1481 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Also return
1482 -1 if bfd_canonicalize_dynamic_reloc returns 0.
1484 2017-09-22 Pedro Alves <palves@redhat.com>
1485 Alan Modra <amodra@gmail.com>
1487 * version.h: Add comment.
1489 2017-09-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1491 * elf.c (elfcore_grok_note): For the cases NT_S390_GS_CB and
1492 NT_S390_GS_BC, correct the previously swapped invocations of
1493 elfcore_grok_s390_gs_bc and elfcore_grok_s390_gs_cb.
1495 2017-09-19 Alan Modra <amodra@gmail.com>
1498 * elf64-ppc.c (ppc64_elf_build_stubs): Don't check glink_eh_frame
1501 2017-09-19 Alan Modra <amodra@gmail.com>
1504 * elflink.c (bfd_elf_size_dynamic_sections): Garbage collect
1505 symbols before calculating verrefs. Don't renumber dynsyms
1506 after gc. Exclude .gnu.version when zero or one dynsym.
1507 Localize some vars and reindent.
1509 2017-09-18 H.J. Lu <hongjiu.lu@intel.com>
1512 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Check error
1513 return from bfd_canonicalize_dynamic_reloc.
1515 2017-09-15 Alan Modra <amodra@gmail.com>
1518 * archive.c (bfd_ar_hdr_from_filesystem): Detect when status.st_size
1519 overflows bfd_size_type.
1521 2017-09-14 H.J. Lu <hongjiu.lu@intel.com>
1524 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument
1525 to indicate if conversion is performed.
1526 (elf_i386_check_relocs): Cache section contents and relocations
1527 if conversion is performed.
1528 * elf64-x86-64.c (elf_x86_64_check_relocs): Cache section
1529 contents and relocations if conversion is performed.
1531 2017-09-14 Nick Clifton <nickc@redhat.com>
1534 * peXXigen.c (pe_print_idata): Extend check for HintName vector
1537 2017-09-13 H.J. Lu <hongjiu.lu@intel.com>
1539 * elfxx-x86.h: Fix a typo in comments.
1541 2017-09-09 Kamil Rytarowski <n54@gmx.com>
1543 * elf32-nds32.c: Rename __BIT() to N32_BIT().
1545 2017-09-09 Alan Modra <amodra@gmail.com>
1547 * elf64-ppp.c (plt_stub_pad): Handle positive and negative
1550 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
1552 * elf32-i386.c (elf_i386_relocate_section): Update usage of
1553 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
1554 (elf_i386_finish_dynamic_symbol): Likewise.
1555 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1556 (elf_x86_64_finish_dynamic_symbol): Likewise.
1557 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Likewise.
1558 (_bfd_x86_elf_fixup_symbol): Likewise.
1560 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
1562 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
1563 check has_non_got_reloc.
1565 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
1568 * elf32-i386.c (elf_i386_convert_load_reloc): Check linker_def.
1569 Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
1570 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Check
1571 linker_def. Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
1572 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Set local_ref
1573 and linker_def on __ehdr_start if it is referenced and not
1575 (_bfd_x86_elf_link_symbol_references_local): Also set local_ref
1576 and return TRUE when building executable, if a symbol has
1577 non-GOT/non-PLT relocations in text section or there is no
1579 * elfxx-x86.h (elf_x86_link_hash_entry): Add linker_def.
1581 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
1583 * elfxx-x86.h: Update comments.
1585 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
1587 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Replace
1588 elf_x86_plt_layout_table with elf_x86_init_table.
1589 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
1591 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties):
1593 * elfxx-x86.h (elf_x86_plt_layout_table): Renamed to ...
1594 (elf_x86_init_table): This.
1595 (_bfd_x86_elf_link_setup_gnu_properties): Replace
1596 elf_x86_plt_layout_table with elf_x86_init_table.
1598 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
1600 * configure.ac (bfd_backends): Don't add elf64-x86-64.lo nor
1601 elf64.lo together with elfxx-x86.lo for 64-bit BFD.
1602 * configure: Regenerated.
1603 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set r_info
1604 and r_sym fields of plt_layout.
1605 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
1607 * elfxx-x86.c (elf_x86_64_is_reloc_section): Remove BFD64 check.
1608 (_bfd_x86_elf_link_hash_table_create): Likewise. Don't set
1609 r_info nor r_sym fields.
1610 (_bfd_x86_elf_link_setup_gnu_properties): Set r_info and r_sym
1612 * elfxx-x86.h (elf_x86_plt_layout_table): Add r_info and r_sym.
1614 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
1616 * (_bfd_riscv_relax_align): Call bfd_set_error and
1617 print an error message when unable to relax a .align directive.
1619 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
1621 * elfnn-riscv.c (riscv_zero_pcrel_hi_reloc): New function.
1622 (riscv_record_pcrel_hi_reloc): Add absolute argument.
1623 (riscv_elf_relocate_section): Call riscv_zero_pcrel_hi_reloc for
1624 R_RISCV_PCREL_HI20 relocs, and pass the result to
1625 riscv_record_pcrel_hi_reloc.
1627 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
1629 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument,
1630 r_type_p. Remove the converted argument. Replace
1631 SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P. Return
1632 the new relocation type via r_type_p.
1633 (elf_i386_relocate_section): Likewise.
1634 (elf_i386_finish_dynamic_symbol): Likewise.
1635 (need_convert_load): Removed.
1636 (check_relocs_failed): Updated.
1637 (elf_i386_check_relocs): Call elf_i386_convert_load_reloc,
1638 instead of setting need_convert_load.
1639 (_bfd_i386_elf_convert_load): Removed.
1640 * elf64-x86-64.c (need_convert_load): Removed.
1641 (check_relocs_failed): Updated.
1642 (elf_x86_64_convert_load_reloc): Add an argument, r_type_p.
1643 Replace SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P.
1644 Return the new relocation type via r_type_p.
1645 (elf_x86_64_check_relocs): Call elf_x86_64_convert_load_reloc,
1646 instead of setting need_convert_load.
1647 (elf_x86_64_check_relocs): Don't check PIC if relocation has
1649 (_bfd_x86_64_elf_convert_load): Removed.
1650 (elf_x86_64_relocate_section): Replace SYMBOL_REFERENCES_LOCAL
1651 with SYMBOL_REFERENCES_LOCAL_P.
1652 (elf_x86_64_finish_dynamic_symbol): Likewise.
1653 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Don't
1655 (_bfd_x86_elf_size_dynamic_sections): Don't call convert_load.
1656 (_bfd_x86_elf_link_symbol_references_local): New function.
1657 * elfxx-x86.h (SYMBOL_REFERENCES_LOCAL_P): New.
1658 (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace elf.forced_local with
1659 SYMBOL_REFERENCES_LOCAL_P.
1660 (elf_x86_link_hash_entry): Add local_ref.
1661 (elf_x86_link_hash_table): Remove convert_load.
1662 (_bfd_i386_elf_convert_load): Removed.
1663 (_bfd_x86_64_elf_convert_load): Likewise.
1664 (_bfd_x86_elf_link_symbol_references_local): New.
1666 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
1668 * elf64-x86-64.c (R_X86_64_converted_reloc_bit): New.
1669 (elf_x86_64_info_to_howto): Get the real relocation type by
1670 masking out R_X86_64_converted_reloc_bit.
1671 (elf_x86_64_check_tls_transition): Get the real relocation type
1672 by masking out R_X86_64_converted_reloc_bit.
1673 (elf_x86_64_convert_load_reloc): Set R_X86_64_converted_reloc_bit
1674 instead of setting converted_reloc.
1675 (elf_x86_64_relocate_section): Check R_X86_64_converted_reloc_bit
1676 instead of converted_reloc. Get the real relocation type by
1677 masking out R_X86_64_converted_reloc_bit.
1678 (elf_x86_64_link_setup_gnu_properties): Verify that the value of
1679 R_X86_64_converted_reloc_bit is valid.
1680 * elfxx-x86.h (converted_reloc): Removed.
1682 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
1684 * elf32-i386.c (elf_i386_relocate_section): Don't change r_type
1685 when calling elf_i386_tls_transition. Don't use ELF32_R_TYPE
1686 to get the relocation type again.
1687 * elf64-x86-64.c (elf_x86_64_relocate_section): Don't change
1688 r_type when calling elf_x86_64_tls_transition. Don't use
1689 ELF32_R_TYPE to get the relocation type again.
1691 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
1693 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Properly set
1696 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
1698 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Remove the sec
1699 argument. Don't check relocation overflow. Avoid relocation
1700 overflow if --no-relax is used. Set converted_reloc on symbol
1701 if a GOTPCREL relocation is converted.
1702 (elf_x86_64_relocate_section): Issue a fatal error and suggest
1703 --no-relax if GOTPCREL relocation conversion leads to relocation
1705 * elfxx-x86.h (elf_x86_link_hash_entry): Add converted_reloc.
1707 2017-09-05 Alexander Fedotov <alexander.fedotov@nxp.com>
1708 Edmar Wienskoski <edmar.wienskoski@nxp.com
1710 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_VLE_ADDR20.
1711 (ppc_elf_check_relocs): Handle it.
1712 (ppc_elf_vle_split20): New function.
1713 (ppc_elf_relocate_section): Handle R_PPC_VLE_ADDR20.
1715 2017-09-03 H.J. Lu <hongjiu.lu@intel.com>
1718 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Set tlsdesc_plt
1719 for x86-64 if GOT_TLS_GDESC_P is true.
1721 2017-09-03 Alan Modra <amodra@gmail.com>
1724 * elfxx-x86.h (elf_x86_hash_table): Check is_elf_hash_table first.
1726 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1728 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1729 tls_get_addr for x86-64 in one place.
1731 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1733 * configure.ac (bfd_backends): Add elf64-x86-64.lo together
1734 with elfxx-x86.lo for 64-bit BFD.
1735 * configure: Regenerated.
1737 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1739 * elf32-i386.c (elf_i386_convert_load): Renamed to ...
1740 (_bfd_i386_elf_convert_load): This. Remove static.
1741 (elf_i386_size_dynamic_sections): Removed.
1742 (elf_backend_size_dynamic_sections): Likewise.
1743 * elf64-x86-64.c (elf_x86_64_convert_load): Renamed to ...
1744 (_bfd_x86_64_elf_convert_load): This. Remove static.
1745 (elf_x86_64_size_dynamic_sections): Removed.
1746 (elf_backend_size_dynamic_sections): Likewise.
1747 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): Renamed to ...
1748 (elf_x86_allocate_dynrelocs): This. Make it static.
1749 (_bfd_x86_elf_allocate_local_dynrelocs): Renamed to ...
1750 (elf_x86_allocate_local_dynreloc): This. Make it static.
1751 (elf_i386_is_reloc_section): New function.
1752 (elf_x86_64_is_reloc_section): Likewise.
1753 (_bfd_x86_elf_link_hash_table_create): Initialize convert_load,
1754 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
1755 Rearrange got_entry_size initialization.
1756 (_bfd_x86_elf_size_dynamic_sections): New function.
1757 * elfxx-x86.h (elf_x86_link_hash_table): Add convert_load,
1758 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
1759 (_bfd_i386_elf_convert_load): New.
1760 (_bfd_x86_64_elf_convert_load): Likewise.
1761 (_bfd_x86_elf_size_dynamic_sections): Likewise.
1762 (elf_backend_size_dynamic_sections): Likewise.
1763 (_bfd_x86_elf_allocate_dynrelocs): Removed.
1764 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
1766 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1768 * elfxx-x86.h (elf_x86_link_hash_table): Rearrange fields and
1771 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1773 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
1774 sgotplt_jump_table_size with elf_x86_compute_jump_table_size.
1776 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1778 * elf32-i386.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
1779 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Moved to ...
1780 * elfxx-x86.h (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
1781 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Here.
1782 * elf64-x86-64.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
1783 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Removed.
1785 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1787 * elf32-i386.c (elf_i386_allocate_dynrelocs): Removed.
1788 (elf_i386_allocate_local_dynrelocs): Likewise.
1789 (elf_i386_size_dynamic_sections): Replace
1790 elf_i386_allocate_dynrelocs/elf_i386_allocate_local_dynrelocs
1791 with _bfd_x86_elf_allocate_dynrelocs and
1792 _bfd_x86_elf_allocate_local_dynrelocs.
1793 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Removed.
1794 (elf_x86_64_allocate_local_dynrelocs): Likewise.
1795 (elf_x86_64_size_dynamic_sections): Replace
1796 elf_x86_64_allocate_dynrelocs/elf_x86_64_allocate_local_dynrelocs
1797 with _bfd_x86_elf_allocate_dynrelocs and
1798 _bfd_x86_elf_allocate_local_dynrelocs.
1799 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): New function.
1800 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
1801 * elfxx-x86.h (_bfd_x86_elf_allocate_dynrelocs): New prototype.
1802 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
1804 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1806 * elf32-i386.c (is_i386_elf): Removed.
1807 (elf_i386_check_relocs): Replace is_i386_elf with is_x86_elf.
1808 (elf_i386_size_dynamic_sections): Likewise.
1809 (elf_i386_relocate_section): Likewise.
1810 * elf64-x86-64.c (is_x86_64_elf): Removed.
1811 (elf_x86_64_check_relocs): Replace is_x86_64_elf with
1813 (elf_x86_64_size_dynamic_sections): Likewise.
1814 (elf_x86_64_relocate_section): Likewise.
1815 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1817 * elfxx-x86.h (elf_x86_link_hash_table): Add target_id.
1820 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1822 * elf32-i386.c (elf_i386_compute_jump_table_size): Removed.
1823 (elf_i386_allocate_dynrelocs): Replace
1824 elf_i386_compute_jump_table_size with
1825 elf_x86_compute_jump_table_size.
1826 (elf_i386_size_dynamic_sections): Likewise.
1827 * elf64-x86-64.c (elf_x86_64_compute_jump_table_size): Removed.
1828 (elf_x86_64_allocate_dynrelocs): Replace
1829 elf_x86_64_compute_jump_table_size with
1830 elf_x86_compute_jump_table_size.
1831 (elf_x86_64_size_dynamic_sections): Likewise.
1832 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1834 * elfxx-x86.h (elf_x86_link_hash_table): Add got_entry_size.
1835 (elf_x86_compute_jump_table_size): New.
1837 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1839 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1841 (_bfd_x86_elf_adjust_dynamic_symbol): Use sizeof_reloc.
1842 * elfxx-x86.h (elf_x86_link_hash_table): Add sizeof_reloc.
1844 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1846 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check VxWorks
1847 with htab->is_vxworks.
1848 (elf_i386_size_dynamic_sections): Likewise.
1849 (elf_i386_relocate_section): Likewise.
1850 (elf_i386_finish_dynamic_symbol): Likewise.
1851 (elf_i386_finish_dynamic_sections): Likewise.
1853 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1855 * elf32-i386.c (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
1856 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
1857 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Moved to ...
1858 * elfxx-x86.h (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
1859 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
1860 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Here.
1861 * elf64-x86-64.c (GOT_TLS_IE, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
1862 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Removed.
1864 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1867 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Check
1868 ELF_COMMON_DEF_P for common symbols.
1870 2017-09-02 Alan Modra <amodra@gmail.com>
1872 * elf-eh-frame.c (offset_adjust): Avoid false positive gcc warning.
1873 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Likewise.
1874 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
1876 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1878 * elf32-i386.c (elf_i386_gc_mark_hook): Removed.
1879 (elf_backend_gc_mark_hook): Likewise.
1880 * elf64-x86-64.c (elf_x86_64_gc_mark_hook): Likewise.
1881 (elf_backend_gc_mark_hook): Likewise.
1882 * elfxx-x86.c (_bfd_x86_elf_gc_mark_hook): New function.
1883 * elfxx-x86.h (_bfd_x86_elf_gc_mark_hook): New.
1884 (elf_backend_gc_mark_hook): Likewise.
1886 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1888 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Removed.
1889 (elf_backend_adjust_dynamic_symbol): Likewise.
1890 * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.
1891 (elf_backend_adjust_dynamic_symbol): Likewise.
1892 * elfxx-x86.c (_bfd_x86_elf_adjust_dynamic_symbol): New function.
1893 (_bfd_x86_elf_link_setup_gnu_properties): Copy is_vxworks.
1894 * elfxx-x86.h (elf_x86_link_hash_table): Add is_vxworks.
1895 (_bfd_x86_elf_adjust_dynamic_symbol): New.
1896 (elf_backend_adjust_dynamic_symbol): Likewise.
1898 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1900 * elfxx-x86.h (elf_x86_plt_layout_table): Fix a typo in
1903 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1905 * elf32-i386.c (elf_i386_mkobject): Removed.
1906 (bfd_elf32_mkobject): Likewise.
1907 * elf64-x86-64.c (elf_x86_64_mkobject): Likewise.
1908 (bfd_elf64_mkobject): Likewise.
1909 (bfd_elf32_mkobject): Likewise.
1910 * elfxx-x86.c (_bfd_x86_elf_mkobject): New function.
1911 * elfxx-x86.h (_bfd_x86_elf_mkobject): New.
1912 (bfd_elf64_mkobject): Likewise.
1913 (bfd_elf32_mkobject): Likewise.
1915 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1917 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Updated.
1918 Call _bfd_x86_elf_link_setup_gnu_properties.
1919 * elf64-x86-64.c (elf_x86_lazy_plt_layout): Initialize
1920 pic_plt0_entry and pic_plt_entry fields with the non-PIC PLT
1922 (elf_x86_64_non_lazy_plt): Likewise.
1923 (elf_x86_64_lazy_bnd_plt): Likewise.
1924 (elf_x86_64_non_lazy_bnd_plt): Likewise.
1925 (elf_x86_64_lazy_ibt_plt): Likewise.
1926 (elf_x32_lazy_ibt_plt): Likewise.
1927 (elf_x86_64_non_lazy_ibt_plt): Likewise.
1928 (elf_x32_non_lazy_ibt_plt): Likewise.
1929 (elf_x86_64_nacl_plt): Likewise.
1930 (elf_x86_64_link_setup_gnu_properties): Updated. Call
1931 _bfd_x86_elf_link_setup_gnu_properties.
1932 * elfxx-x86.c: Include elf-vxworks.h".
1933 (_bfd_x86_elf_link_setup_gnu_properties): New function.
1934 * elfxx-x86.h (elf_x86_lazy_plt_layout): Remove "for i386 only"
1935 comments for pic_plt0_entry and pic_plt_entry.
1936 (elf_x86_non_lazy_plt_layout): Likewise.
1937 (elf_x86_plt_layout_table): New.
1938 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
1940 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
1943 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Create
1944 .eh_frame section for the second PLT.
1945 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Correct
1946 alignment of .eh_frame section for the second PLT.
1948 2017-09-01 Nick Clifton <nickc@redhat.com>
1951 * dwarf2.c (decode_line_info): Fix test for an overlong line info
1954 2017-09-01 Nick Clifton <nickc@redhat.com>
1957 * elf-attrs.c (_bfd_elf_parse_attributes): Ensure that the
1958 attribute buffer is NUL terminated.
1960 2017-08-31 Nick Clifton <nickc@redhat.com>
1963 * dwarf2.c (read_section): If necessary add a terminating NUL byte
1964 to dwarf string sections.
1966 2017-08-31 Alan Modra <amodra@gmail.com>
1968 * po/SRC-POTFILES.in: Regenerate.
1970 2017-08-31 Alan Modra <amodra@gmail.com>
1972 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Don't exit early
1973 for a section containing just a terminator. Allow multiple
1974 terminators at end of section.
1975 * elflink.c (bfd_elf_discard_info): Iterate over .eh_frame
1976 sections when not adding alignment. Assert on terminator in
1979 2017-08-31 Alan Modra <amodra@gmail.com>
1983 * elflink.c (bfd_elf_discard_info): Don't pad embedded zero
1986 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
1988 * configure.ac (bfd_backends): Add elf64.lo together with
1989 elfxx-x86.lo for 64-bit BFD.
1990 * configure: Regenerated.
1992 2017-08-31 James Bowman <james.bowman@ftdichip.com>
1994 * elf32-ft32.c (ft32_elf_howto_table): Use complain_overflow_dont
1997 2017-08-31 Alan Modra <amodra@gmail.com>
2000 * opncls.c (bfd_close_all_done): Don't call bfd_cache_close
2001 before _close_and_cleanup. Call iovec->bclose after.
2002 (bfd_close): Remove code common to, and call, bfd_close_all_done.
2004 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
2006 * elf32-i386.c (elf_i386_plt_type): Removed.
2007 (elf_i386_plt): Likewise.
2008 (elf_i386_get_synthetic_symtab): Updated. Call
2009 _bfd_x86_elf_get_synthetic_symtab.
2010 * elf64-x86-64.c (elf_x86_64_plt_type): Removed.
2011 (elf_x86_64_plt): Likewise.
2012 (elf_x86_64_get_synthetic_symtab): Updated. Call
2013 _bfd_x86_elf_get_synthetic_symtab.
2014 * elfxx-x86.c (elf_i386_get_plt_got_vma): New function.
2015 (elf_x86_64_get_plt_got_vma): Likewise.
2016 (elf_i386_valid_plt_reloc_p): Likewise.
2017 (elf_x86_64_valid_plt_reloc_p): Likewise.
2018 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
2019 * elfxx-x86.h (elf_x86_plt_type): New.
2020 (elf_x86_plt): Likewise.
2021 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
2023 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
2025 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Check
2026 target_id instead of elf_machine_code.
2028 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
2030 * elf32-i386.c (ELF_DYNAMIC_INTERPRETER): Removed.
2031 (elf_i386_lazy_plt_layout): Likewise.
2032 (elf_i386_non_lazy_plt_layout): Likewise.
2033 (elf_i386_plt_layout): Likewise.
2034 (elf_i386_link_hash_table): Likewise.
2035 (elf_i386_next_tls_desc_index): Likewise.
2036 (elf_i386_srelplt2): Likewise.
2037 (elf_i386_plt): Likewise.
2038 (elf_i386_lazy_plt): Likewise.
2039 (elf_i386_non_lazy_plt): Likewise.
2040 (elf_i386_link_hash_table_create): Likewise.
2041 (bfd_elf32_bfd_link_hash_table_create): Likewise.
2042 (elf_i386_lazy_plt): Updated.
2043 (elf_i386_non_lazy_plt): Likewise.
2044 (elf_i386_lazy_ibt_plt): Likewise.
2045 (elf_i386_non_lazy_ibt_plt): Likewise.
2046 (elf_i386_allocate_dynrelocs): Likewise.
2047 (elf_i386_size_dynamic_sections): Likewise.
2048 (elf_i386_relocate_section): Likewise.
2049 (elf_i386_finish_dynamic_symbol): Likewise.
2050 (elf_i386_finish_dynamic_sections): Likewise.
2051 (elf_i386_get_synthetic_symtab): Likewise.
2052 (elf_i386_link_setup_gnu_properties): Likewise.
2053 (elf_i386_nacl_plt): Likewise.
2054 * elf64-x86-64.c (ABI_64_P): Removed.
2055 (ELF64_DYNAMIC_INTERPRETER): Likewise.
2056 (ELF32_DYNAMIC_INTERPRETER): Likewise.
2057 (elf_x86_64_lazy_plt_layout): Likewise.
2058 (elf_x86_64_non_lazy_plt_layout): Likewise.
2059 (elf_x86_64_plt_layout): Likewise.
2060 (elf_x86_64_link_hash_table): Likewise.
2061 (elf_x86_64_plt): Likewise.
2062 (elf_x86_64_lazy_plt): Likewise.
2063 (elf_x86_64_non_lazy_plt): Likewise.
2064 (elf_x86_64_link_hash_table_create): Likewise.
2065 (bfd_elf64_bfd_link_hash_table_create): Likewise.
2066 (bfd_elf32_bfd_link_hash_table_create): Likewise.
2067 (elf_x86_64_lazy_plt): Updated.
2068 (elf_x86_64_non_lazy_plt): Likewise.
2069 (elf_x86_64_lazy_bnd_plt): Likewise.
2070 (elf_x86_64_non_lazy_bnd_plt): Likewise.
2071 (elf_x86_64_lazy_ibt_plt): Likewise.
2072 (elf_x32_lazy_ibt_plt): Likewise.
2073 (elf_x86_64_non_lazy_ibt_plt): Likewise.
2074 (elf_x32_non_lazy_ibt_plt): Likewise.
2075 (elf_x86_64_allocate_dynrelocs): Likewise.
2076 (elf_x86_64_size_dynamic_sections): Likewise.
2077 (elf_x86_64_relocate_section): Likewise.
2078 (elf_x86_64_finish_dynamic_symbol): Likewise.
2079 (elf_x86_64_finish_dynamic_sections): Likewise.
2080 (elf_x86_64_get_synthetic_symtab): Likewise.
2081 (elf_x86_64_link_setup_gnu_properties): Likewise.
2082 (elf_x86_64_nacl_plt): Likewise.
2083 * elfxx-x86.c: Include "objalloc.h", "elf/i386.h" and
2085 (ELF32_DYNAMIC_INTERPRETER): New.
2086 (ELF64_DYNAMIC_INTERPRETER): Likewise.
2087 (ELFX32_DYNAMIC_INTERPRETER): Likewise.
2088 (_bfd_x86_elf_link_hash_table_create): Likewise.
2089 (_bfd_x86_elf_link_hash_table_free): Renamed to ...
2090 (elf_x86_link_hash_table_free): This. Make it static.
2091 * elfxx-x86.h: Don't include "objalloc.h".
2093 (elf_x86_lazy_plt_layout): Likewise.
2094 (elf_x86_non_lazy_plt_layout): Likewise.
2095 (elf_x86_plt_layout): Likewise.
2096 (_bfd_x86_elf_link_hash_table_create): Likewise.
2097 (bfd_elf64_bfd_link_hash_table_create): Likewise.
2098 (bfd_elf32_bfd_link_hash_table_create): Likewise.
2099 (elf_x86_link_hash_table): Add plt, lazy_plt, non_lazy_plt,
2100 srelplt2 and next_tls_desc_index.
2101 (_bfd_x86_elf_link_hash_table_free): Removed.
2103 2017-08-30 Maciej W. Rozycki <macro@imgtec.com>
2105 * elfxx-mips.c (mips_elf_perform_relocation): Correct microMIPS
2106 branch offset interpretation.
2108 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
2111 * opncls.c (bfd_close_all_done): Call _close_and_cleanup.
2113 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
2115 * elf64-x86-64.c (elf_x86_64_next_tls_desc_index): Removed.
2116 (elf_x86_64_srelplt2): Likewise.
2118 2017-08-30 Alan Modra <amodra@gmail.com>
2120 * elf64-ppc.c (struct ppc_link_hash_table): Add do_tls_opt.
2121 (ppc64_elf_tls_optimize): Set it.
2122 (ppc64_elf_relocate_section): Nop addis on TPREL16_HA, and convert
2123 insn on TPREL16_LO and TPREL16_LO_DS relocs to use r13 when
2124 addis would add zero.
2125 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add do_tls_opt.
2126 (ppc_elf_tls_optimize): Set it.
2127 (ppc_elf_relocate_section): Nop addis on TPREL16_HA, and convert
2128 insn on TPREL16_LO relocs to use r2 when addis would add zero.
2130 2017-08-30 Alan Modra <amodra@gmail.com>
2132 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing
2133 __tls_get_addr call sequences to LE, don't move the addi down
2134 to the nop. Replace the bl with addi and leave the nop alone.
2136 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
2138 * elf32-i386.c (elf_i386_pie_finish_undefweak_symbol):
2140 * elf64-x86-64.c (elf_x86_64_finish_local_dynamic_symbol):
2142 (elf_x86_64_pie_finish_undefweak_symbol): Likewise.
2144 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
2146 * Makefile.am (BFD32_BACKENDS): Add elfxx-x86.lo.
2147 (BFD64_BACKENDS): Likewise.
2148 (BFD32_BACKENDS_CFILES): Add elfxx-x86.c.
2149 (BFD64_BACKENDS_CFILES): Likewise.
2150 * Makefile.in: Regenerated.
2151 * configure.ac (bfd_backends): Add elfxx-x86.lo together with
2152 elf32-i386.lo and elf64-x86-64.lo.
2153 * configure: Regenerated.
2154 * elf32-i386.c: Include "elfxx-x86.h" instead of "sysdep.h",
2155 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
2156 "objalloc.h" and "hashtab.h".
2157 (ELIMINATE_COPY_RELOCS): Removed.
2158 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
2159 (SYMBOL_NO_COPYRELOC): Likewise.
2160 (elf_i386_link_hash_entry): Likewise.
2161 (GOT_UNKNOWN): Likewise.
2162 (GOT_NORMAL): Likewise.
2163 (GOT_TLS_GD): Likewise.
2164 (elf_i386_hash_entry): Likewise.
2165 (elf_i386_obj_tdata): Likewise.
2166 (elf_i386_tdata): Likewise.
2167 (elf_i386_local_got_tls_type): Likewise.
2168 (elf_i386_local_tlsdesc_gotent): Likewise.
2169 (elf_i386_hash_table): Likewise.
2170 (elf_i386_link_hash_newfunc): Likewise.
2171 (elf_i386_local_htab_hash): Likewise.
2172 (elf_i386_local_htab_eq): Likewise.
2173 (elf_i386_get_local_sym_hash): Likewise.
2174 (elf_i386_link_hash_table_free): Likewise.
2175 (elf_i386_copy_indirect_symbol): Likewise.
2176 (elf_i386_fixup_symbol): Likewise.
2177 (elf_i386_readonly_dynrelocs): Likewise.
2178 (elf_i386_always_size_sections): Likewise.
2179 (elf_i386_set_tls_module_base): Likewise.
2180 (elf_i386_dtpoff_base): Likewise.
2181 (compare_relocs): Likewise.
2182 (elf_i386_hash_symbol): Likewise.
2183 (elf_i386_parse_gnu_properties): Likewise.
2184 (elf_i386_merge_gnu_properties): Likewise.
2185 (elf_i386_link_check_relocs): Likewise.
2186 (elf_i386_merge_symbol_attribute): Likewise.
2187 (bfd_elf32_bfd_link_check_relocs): Likewise.
2188 (elf_backend_copy_indirect_symbol): Likewise.
2189 (elf_backend_always_size_sections): Likewise.
2190 (elf_backend_omit_section_dynsym): Likewise.
2191 (elf_backend_hash_symbol): Likewise.
2192 (elf_backend_fixup_symbol): Likewise.
2193 (elf_backend_parse_gnu_properties): Likewise.
2194 (elf_backend_merge_gnu_properties): Likewise.
2195 (elf_backend_merge_symbol_attribute): Likewise.
2196 (elf_i386_mkobject): Updated.
2197 (elf_i386_link_hash_table_create): Likewise.
2198 (elf_i386_check_tls_transition): Likewise.
2199 (elf_i386_tls_transition): Likewise.
2200 (elf_i386_convert_load_reloc): Likewise.
2201 (elf_i386_check_relocs): Likewise.
2202 (elf_i386_adjust_dynamic_symbol): Likewise.
2203 (elf_i386_allocate_dynrelocs): Likewise.
2204 (elf_i386_convert_load): Likewise.
2205 (elf_i386_size_dynamic_sections): Likewise.
2206 (elf_i386_relocate_section): Likewise.
2207 (elf_i386_finish_dynamic_symbol ): Likewise.
2208 (elf_i386_finish_dynamic_sections): Likewise.
2209 (elf_i386_output_arch_local_syms): Likewise.
2210 (elf_i386_get_synthetic_symtab): Likewise.
2211 (elf_i386_link_setup_gnu_properties): Likewise.
2212 (elf_i386_link_hash_table): Use elf_x86_link_hash_table, instead
2213 of elf_link_hash_table, as base.
2214 (elf_i386_next_tls_desc_index): New.
2215 (elf_i386_srelplt2): Likewise.
2216 (elf_i386_plt): Likewise.
2217 (elf_i386_lazy_plt): Likewise.
2218 (elf_i386_non_lazy_plt): Likewise.
2219 * elf32-x86-64.c: Include "elfxx-x86.h" instead of "sysdep.h",
2220 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
2221 "objalloc.h" and "hashtab.h".
2222 (ELIMINATE_COPY_RELOCS): Removed.
2223 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
2224 (SYMBOL_NO_COPYRELOC): Likewise.
2225 (elf_x86_64_link_hash_entry): Likewise.
2226 (GOT_UNKNOWN): Likewise.
2227 (GOT_NORMAL): Likewise.
2228 (GOT_TLS_GD): Likewise.
2229 (elf_x86_64_hash_entry): Likewise.
2230 (elf_x86_64_obj_tdata): Likewise.
2231 (elf_x86_64_tdata): Likewise.
2232 (elf_x86_64_local_got_tls_type): Likewise.
2233 (elf_x86_64_local_tlsdesc_gotent): Likewise.
2234 (elf_x86_64_hash_table): Likewise.
2235 (elf_x86_64_link_hash_newfunc): Likewise.
2236 (elf_x86_64_local_htab_hash): Likewise.
2237 (elf_x86_64_local_htab_eq): Likewise.
2238 (elf_x86_64_get_local_sym_hash): Likewise.
2239 (elf_x86_64_link_hash_table_free): Likewise.
2240 (elf_x86_64_copy_indirect_symbol): Likewise.
2241 (elf_x86_64_fixup_symbol): Likewise.
2242 (elf_x86_64_readonly_dynrelocs): Likewise.
2243 (elf_x86_64_always_size_sections): Likewise.
2244 (elf_x86_64_set_tls_module_base): Likewise.
2245 (elf_x86_64_dtpoff_base): Likewise.
2246 (compare_relocs): Likewise.
2247 (elf_x86_64_merge_symbol_attribute): Likewise.
2248 (elf_x86_64_hash_symbol): Likewise.
2249 (elf_x86_64_parse_gnu_properties): Likewise.
2250 (elf_x86_64_merge_gnu_properties): Likewise.
2251 (elf_x86_64_link_check_relocs): Likewise.
2252 (elf_backend_copy_indirect_symbol): Likewise.
2253 (elf_backend_always_size_sections): Likewise.
2254 (bfd_elf64_bfd_link_check_relocs): Likewise.
2255 (elf_backend_merge_symbol_attribute): Likewise.
2256 (elf_backend_hash_symbol): Likewise.
2257 (elf_backend_omit_section_dynsym): Likewise.
2258 (elf_backend_fixup_symbol): Likewise.
2259 (elf_backend_parse_gnu_properties): Likewise.
2260 (elf_backend_merge_gnu_properties): Likewise.
2261 (bfd_elf32_bfd_link_check_relocs): Likewise.
2262 (elf_x86_64_mkobject): Updated.
2263 (elf_x86_64_link_hash_table_create): Likewise.
2264 (elf_x86_64_check_tls_transition): Likewise.
2265 (elf_x86_64_tls_transition): Likewise.
2266 (elf_x86_64_convert_load_reloc): Likewise.
2267 (elf_x86_64_check_relocs): Likewise.
2268 (elf_x86_64_adjust_dynamic_symbol): Likewise.
2269 (elf_x86_64_allocate_dynrelocs): Likewise.
2270 (elf_x86_64_convert_load): Likewise.
2271 (elf_x86_64_size_dynamic_sections): Likewise.
2272 (elf_x86_64_relocate_section): Likewise.
2273 (elf_x86_64_finish_dynamic_symbol ): Likewise.
2274 (elf_x86_64_finish_dynamic_sections): Likewise.
2275 (elf_x86_64_output_arch_local_syms): Likewise.
2276 (elf_x86_64_get_synthetic_symtab): Likewise.
2277 (elf_x86_64_link_setup_gnu_properties): Likewise.
2278 (elf_x86_64_link_hash_table): Use elf_x86_link_hash_table,
2279 instead of elf_link_hash_table, as base.
2280 (elf_x86_64_next_tls_desc_index): New.
2281 (elf_x86_64_srelplt2): Likewise.
2282 (elf_x86_64_plt): Likewise.
2283 (elf_x86_64_lazy_plt): Likewise.
2284 (elf_x86_64_non_lazy_plt): Likewise.
2285 * elfxx-x86.c: New file.
2286 * elfxx-x86.h: Likewise.
2288 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
2290 * elf32-i386.c (elf_i386_get_synthetic_symtab): Simplify bad
2292 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
2294 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
2296 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check valid PLT
2297 sections before checking dynamic relocations and free invalid
2298 PLT section contents.
2299 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
2301 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
2303 * elf-bfd.h (_bfd_elf_ifunc_get_synthetic_symtab): Removed.
2304 * elf-ifunc.c (_bfd_elf_ifunc_get_synthetic_symtab): Likewise.
2306 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
2309 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check for valid
2311 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
2313 2017-08-27 H.J. Lu <hongjiu.lu@intel.com>
2315 * elf32-i386.c (elf_i386_link_hash_newfunc): Initialize
2317 * elf64-x86-64.c (elf_x86_64_link_hash_newfunc): Likewise.
2319 2017-08-26 H.J. Lu <hongjiu.lu@intel.com>
2322 * elf-bfd.h (elf_obj_tdata): Use ENUM_BITFIELD on object_id,
2323 dyn_lib_class and has_gnu_symbols. Change bad_symtab to bitfield.
2324 Add a has_no_copy_on_protected bitfield.
2325 (elf_has_no_copy_on_protected): New.
2326 * elf-properties.c (_bfd_elf_parse_gnu_properties): Set
2327 elf_has_no_copy_on_protected for GNU_PROPERTY_NO_COPY_ON_PROTECTED.
2328 (elf_merge_gnu_property_list): Likewise.
2329 (_bfd_elf_link_setup_gnu_properties): Set extern_protected_data
2330 to FALSE for elf_has_no_copy_on_protected.
2331 * elf32-i386.c (SYMBOL_NO_COPYRELOC): New.
2332 (elf_i386_link_hash_entry): Add def_protected.
2333 (elf_i386_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
2334 when checking info->nocopyreloc.
2335 (elf_i386_link_setup_gnu_properties): Don't set
2336 extern_protected_data here.
2337 (elf_i386_merge_symbol_attribute): New function.
2338 (elf_backend_merge_symbol_attribute): New.
2339 * elf64-x86-64.c (SYMBOL_NO_COPYRELOC): New.
2340 (elf_x86_64_link_hash_entry): Add def_protected.
2341 (elf_x86_64_need_pic): Report protected symbol for def_protected.
2342 (elf_x86_64_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
2343 when checking info->nocopyreloc.
2344 (elf_x86_64_relocate_section): Also check for R_X86_64_PC32
2345 relocation run-time overflow and unresolvable R_X86_64_32S
2346 relocation against protected data symbol defined in shared object
2347 with GNU_PROPERTY_NO_COPY_ON_PROTECTED.
2348 (elf_x86_64_link_setup_gnu_properties): Don't set
2349 extern_protected_data here.
2350 (elf_x86_64_merge_symbol_attribute): New function.
2351 (elf_backend_merge_symbol_attribute): New.
2353 2017-08-26 Alan Modra <amodra@gmail.com>
2355 * elf32-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
2356 (ppc_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
2357 (ppc_elf_relocate_section): Comment fix.
2358 * elf64-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
2359 (ppc64_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
2360 Support dynamic relocs for TPREL16 when non-pic too.
2361 (dec_dynrel_count): Adjust TPREL16 handling as per check_relocs.
2362 (ppc64_elf_relocate_section): Support dynamic relocs for TPREL16
2365 2017-08-25 H.J. Lu <hongjiu.lu@intel.com>
2367 * elf32-i386.c (elf_i386_link_hash_entry): Remove redundant
2368 "symbol" in comments.
2369 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Likewise.
2371 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
2374 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for
2375 R_X86_64_PC32 relocation run-time overflow and unresolvable
2376 R_X86_64_32S relocation with -z nocopyreloc.
2378 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
2380 * elf32-i386.c (elf_i386_check_relocs): Revert the last change.
2381 Undefined symbols may not have a type.
2382 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
2384 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
2386 * elf64-x86-64.c (elf_x86_64_need_pic): Add an argument for
2387 bfd_link_info. Report shared, PIE or PDE object based on
2389 (elf_x86_64_check_relocs): Update elf_x86_64_need_pic call.
2390 (elf_x86_64_relocate_section): Likewise.
2392 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
2394 * elf32-i386.c (elf_i386_check_relocs): Increment PLT count only
2395 for function symbols.
2396 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
2398 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
2400 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set
2401 extern_protected_data to FALSE if GNU_PROPERTY_NO_COPY_ON_PROTECTED
2402 is set on any input relocatable file.
2403 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
2405 2017-08-23 Alan Modra <amodra@gmail.com>
2408 * elf64-ppc.c (ensure_undef_dynamic): Rename from
2409 ensure_undefweak_dynamic. Handle undefined too.
2410 * elf32-ppc.c (ensure_undef_dynamic): Likewise.
2411 * elf32-hppa.c (ensure_undef_dynamic): Likewise.
2412 (allocate_dynrelocs): Discard undefined non-default visibility
2413 relocs first. Make undefined syms dynamic. Tidy goto.
2415 2017-08-21 Alan Modra <amodra@gmail.com>
2416 H.J. Lu <hongjiu.lu@intel.com>
2419 * elf-bfd.h (SYMBOLIC_BIND): Return TRUE for __start/__stop symbols.
2420 * elflink.c (bfd_elf_define_start_stop): Rewrite.
2422 2017-08-21 Hans-Peter Nilsson <hp@bitrange.com>
2425 * elf64-mmix.c (mmix_elf_relax_section): Correct handling of
2426 undefined weak symbols.
2428 2017-08-18 Nick Clifton <nickc@redhat.com>
2431 * tekhex.c (getsym): Fix check for source pointer walking off the
2432 end of the input buffer.
2434 2017-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
2437 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Skip IFUNC
2438 relocations in debug sections, change abort to _bfd_error_handler.
2440 2017-08-14 Nick Clifton <nickc@redhat.com>
2443 * elf.c (setup_group): Check for an empty or very small group
2445 * po/bfd.pot: Regenerate.
2447 2017-08-14 Alan Modra <amodra@gmail.com>
2450 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't add
2451 alignment padding here.
2452 * elflink.c (bfd_elf_discard_info): Add .eh_frame padding here
2453 in a reverse pass over sections.
2455 2017-08-11 H.J. Lu <hongjiu.lu@intel.com>
2458 * elf32-i386.c (elf_i386_get_synthetic_symtab): Allocate space
2459 for @plt suffixes first.
2460 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
2462 2017-08-08 Nick Clifton <nickc@redhat.com>
2465 * elf-attrs.c (_bfd_elf_parse_attributes): Complain about very
2466 small section lengths.
2467 * elf.c (_bfd_elf_setup_sections): Skip empty entries in the group
2469 (elfcore_grok_freebsd_prstatus): Add checks to make sure that
2470 there is enough data present in the note.
2472 2017-08-08 Alan Modra <amodra@gmail.com>
2475 * elf32-microblaze.c (microblaze_elf_check_relocs): Don't bump
2476 got.refcount for GOTOFF relocs, just create .got section.
2478 2017-08-07 H.J. Lu <hongjiu.lu@intel.com>
2480 * elflink.c (elf_link_add_object_symbols): Move common symbol
2481 check after bed->common_definition.
2483 2017-08-07 Alan Modra <amodra@gmail.com>
2486 * elflink.c (bfd_elf_final_link): Don't segfault when sections
2487 needed to define various dynamic tags have been discarded.
2489 2017-08-07 Nick Clifton <nickc@redhat.com>
2492 * elf32-i386.c (elf_i386_link_setup_gnu_properties): If the dynobj
2493 has not been set then use the bfd returned by
2494 _bfd_elf_link_setup_gnu_properties. If that is null then search
2495 through all the input bfds selecting the first normal, ELF format
2497 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
2499 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
2501 * elf32-i386.c (elf_i386_link_hash_entry): Change tls_get_addr
2503 (elf_i386_link_hash_newfunc): Initialize tls_get_addr to 0.
2504 (elf_i386_check_tls_transition): Check tls_get_addr directly.
2505 (elf_i386_convert_load_reloc): Update tls_get_addr check.
2506 (elf_i386_link_check_relocs): New function.
2507 (bfd_elf32_bfd_link_check_relocs): New.
2508 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Change tls_get_addr
2510 (elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 0.
2511 (elf_x86_64_check_tls_transition): Check tls_get_addr directly.
2512 (elf_x86_64_convert_load_reloc): Update tls_get_addr check.
2513 (elf_x86_64_link_check_relocs): New function.
2514 (bfd_elf64_bfd_link_check_relocs): New.
2515 (bfd_elf32_bfd_link_check_relocs): Likewise.
2517 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
2520 * elflink.c (elf_link_add_object_symbols): Treat common symbol
2521 as undefined for --no-define-common.
2523 2017-08-05 Alan Modra <amodra@gmail.com>
2525 * elf32-hppa.c (elf32_hppa_set_gp): Don't require an
2526 hppa_link_hash_table.
2528 2017-08-02 Max Filippov <jcmvbkbc@gmail.com>
2530 * xtensa-isa.c (xtensa_isa_init): Don't update lookup table
2531 entries for sysregs with negative indices.
2533 2017-08-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2535 * elf32-s390.c (elf_s390_finish_dynamic_sections): Skip if it
2536 isn't the S/390 specific elf data.
2537 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
2539 2017-07-31 Kuan-Lin Chen <rufus@andestech.com>
2541 * elfxx-riscv.c (riscv_elf_add_sub_reloc): New function.
2542 * (howto_table) [R_RISCV_ADD8]: Use riscv_elf_add_sub_reloc.
2543 [R_RISCV_ADD16]: Likewise.
2544 [R_RISCV_ADD32]: Likewise.
2545 [R_RISCV_ADD64]: Likewise.
2546 [R_RISCV_SUB6]: Likewise.
2547 [R_RISCV_SUB8]: Likewise.
2548 [R_RISCV_SUB16]: Likewise.
2549 [R_RISCV_SUB32]: Likewise.
2550 [R_RISCV_SUB64]: Likewise.
2552 2017-07-31 Alan Modra <amodra@gmail.com>
2554 * elf64-ppc.c (ppc64_elf_tls_setup): Warn on --plt-localentry
2555 without ld.so checks.
2557 2017-07-29 Alan Modra <amodra@gmail.com>
2560 * elf64-ppc.c (struct ppc_link_hash_entry): Add non_zero_localentry.
2561 (ppc64_elf_merge_symbol): Set non_zero_localentry.
2562 (is_elfv2_localentry0): Test non_zero_localentry.
2563 (ppc64_elf_tls_setup): Default to --no-plt-localentry.
2565 2017-07-28 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2567 * elf32-s390.c (elf_s390_finish_dynamic_sections): Add NULL
2568 pointer check for htab->elf.irelplt.
2569 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
2571 2017-07-27 Nick Clifton <nickc@redhat.com>
2574 * mach-o.c (bfd_mach_o_read_symtab_strtab): Fail if the symtab
2576 * nlmcode.h (nlm_swap_auxiliary_headers_in): Replace assertion
2578 * section.c (bfd_make_section_with_flags): Fail if the name or bfd
2580 * vms-alpha.c (bfd_make_section_with_flags): Correct computation
2582 (evax_bfd_print_emh): Check for invalid string lengths.
2584 2017-07-25 Nick Clifton <nickc@redhat.com>
2586 * po/fr.po: Updated French translation.
2588 2017-07-25 Benjamin Green <bengreen5mx@gmail.com>
2591 * elf32-msp430.c (msp430_elf_relax_section): Allow conversion of
2592 16-bit absolute branches into 10-bit pc-relative branches on the
2593 MSP430 as well as the MSP430X.
2595 2017-07-25 Alan Modra <amodra@gmail.com>
2597 * elf64-ppc.c (struct map_stub): Add tls_get_addr_opt_bctrl.
2598 (stub_eh_frame_size): New function.
2599 (ppc_size_one_stub): Set group tls_get_addr_opt_bctrl.
2600 (group_sections): Init group tls_get_addr_opt_bctrl.
2601 (ppc64_elf_size_stubs): Update sizing and initialization of
2602 .eh_frame. Iteration over stubs via group list.
2603 (ppc64_elf_build_stubs): Iterate over stubs via group list.
2604 (ppc64_elf_finish_dynamic_sections): Update finalization of
2607 2017-07-24 Nick Clifton <nickc@redhat.com>
2610 * mach-o.c (bfd_mach_o_canonicalize_relocs): Pass the base address
2611 of the relocs to the canonicalize_one_reloc routine.
2612 * mach-o.h (struct bfd_mach_o_backend_data): Update the prototype
2613 for the _bfd_mach_o_canonicalize_one_reloc field.
2614 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add
2615 res_base parameter. Use to check for corrupt pair relocs.
2616 * mach-o-aarch64.c (bfd_mach_o_arm64_canonicalize_one_reloc):
2618 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc):
2620 * mach-o-x86-64.c (bfd_mach_o_x86_64_canonicalize_one_reloc):
2623 * vms-alpha.c (_bfd_vms_slurp_eihd): Make sure that there is
2624 enough data in the record before attempting to parse it.
2625 (_bfd_vms_slurp_eeom): Likewise.
2627 (_bfd_vms_slurp_egsd): Check for an invalid section index.
2628 (image_set_ptr): Likewise.
2629 (alpha_vms_slurp_relocs): Likewise.
2631 (alpha_vms_object_p): Check for a truncated record.
2633 2017-07-24 Nick Clifton <nickc@redhat.com>
2636 * reloc.c (_bfd_unrecognized_reloc): New function. Reports
2637 an unrecognized reloc and sets the bfd_error value.
2638 * libbfd.h: Regenerate.
2639 * elf32-arm.c (elf32_arm_final_link_relocate): Use the new
2641 * elf32-i386.c (elf_i386_relocate_section): Likewise.
2642 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
2643 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
2644 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.
2645 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
2647 2017-07-23 Alan Modra <amodra@gmail.com>
2649 * elf64-ppc.c (ppc64_elf_size_stubs): Correct advance to
2652 2017-07-19 Szabolcs Nagy <szabolcs.nagy@arm.com>
2655 * elfnn-aarch64.c (elfNN_aarch64_reloc_type_class): Return
2656 reloc_class_ifunc for ifunc symbols.
2658 2017-07-19 Nick Clifton <nickc@redhat.com>
2661 * archive.c (bfd_generic_archive_p): If the bfd does not have the
2662 correct magic bytes at the start, set the error to wrong format
2663 and clear the format selector before returning NULL.
2665 2017-07-19 Nick Clifton <nickc@redhat.com>
2668 * coff-rs6000.c (_bfd_strntol): New function.
2669 (_bfd_strntoll): New function.
2670 (GET_VALUE_IN_FIELD): New macro.
2671 (EQ_VALUE_IN_FIELD): new macro.
2672 (_bfd_xcoff_slurp_armap): Use new macros.
2673 (_bfd_xcoff_archive_p): Likewise.
2674 (_bfd_xcoff_read_ar_hdr): Likewise.
2675 (_bfd_xcoff_openr_next_archived_file): Likewise.
2676 (_bfd_xcoff_stat_arch_elt): Likewise.
2677 * coff64-rs6000.c (_bfd_strntol): New function.
2678 (_bfd_strntoll): New function.
2679 (GET_VALUE_IN_FIELD): New macro.
2680 (xcoff64_slurp_armap): Use new macros.
2682 2017-07-19 Claudiu Zissulescu <claziss@synopsys.com>
2683 John Eric Martin <John.Martin@emmicro-us.com>
2685 * bfd-in2.h: Regenerate.
2686 * libbfd.h: Regenerate.
2687 * elf32-arc.c (JLI): Define.
2688 * reloc.c: Add JLI relocations.
2690 2017-07-18 Nick Clifton <nickc@redhat.com>
2693 * coff-sh.c: Fix spelling typos.
2694 * compress.c: Likewise.
2695 * cpu-pdp11.c: Likewise.
2696 * ecofflink.c: Likewise.
2697 * elf-m10300.c: Likewise.
2699 * elf32-arm.c: Likewise.
2700 * elf32-m68k.c: Likewise.
2701 * elf32-nds32.c: Likewise.
2702 * elf32-ppc.c: Likewise.
2703 * elf32-sh.c: Likewise.
2704 * elf32-v850.c: Likewise.
2705 * elf64-ppc.c: Likewise.
2706 * elf64-x86-64.c: Likewise.
2707 * elflink.c: Likewise.
2708 * elfnn-aarch64.c: Likewise.
2709 * elfxx-mips.c: Likewise.
2711 * sunos.c: Likewise.
2712 * vms-alpha.c: Likewise.
2713 * xcofflink.c: Likewise.
2715 2017-07-18 Nick Clifton <nickc@redhat.com>
2718 * coffcode.h (handle_COMDAT): Replace abort with an error message
2721 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
2724 * elf64-x86-64.c (elf_x86_64_relocate_section): Limit PIC check
2727 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
2729 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
2731 2017-07-16 Alan Modra <amodra@gmail.com>
2733 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimize
2734 __tls_index GOT entries when using __tls_get_addr_opt stub.
2735 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2737 2017-07-12 Alan Modra <amodra@gmail.com>
2739 * po/es.po: Update from translationproject.org/latest/bfd/.
2740 * po/fi.po: Likewise.
2741 * po/fr.po: Likewise.
2742 * po/id.po: Likewise.
2743 * po/ja.po: Likewise.
2744 * po/ro.po: Likewise.
2745 * po/ru.po: Likewise.
2746 * po/sr.po: Likewise.
2747 * po/sv.po: Likewise.
2748 * po/tr.po: Likewise.
2749 * po/uk.po: Likewise.
2750 * po/vi.po: Likewise.
2751 * po/zh_CN.po: Likewise.
2752 * po/hr.po: New file from translationproject.org.
2753 * configure.ac (ALL_LINGUAS): Add hr. Sort.
2754 * configure: Regenerate.
2756 2017-07-12 Nick Clifton <nickc@redhat.com>
2758 Fix compile time warnings using gcc 7.1.1.
2759 * elf32-xtensa.c (elf_xtensa_get_plt_section): Increase length of
2761 (elf_xtensa_get_gotplt_section): Increase length of got_name
2763 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add a
2764 default return of FALSE.
2765 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc): Add a
2766 default return of FALSE.
2768 2017-07-12 Alan Modra <amodra@gmail.com>
2770 * binary.c (binary_set_section_contents): Don't print filepos in
2772 (coff_write_object_contents): Cast size_t for error message.
2773 (coff_slurp_line_table): Don't use bfd_vma symndx.
2774 (coff_slurp_reloc_table): Remove unneeded cast.
2775 * dwarf2.c (read_section): Cast bfd_int64_t to long long for
2777 (find_abstract_instance_name): Likewise.
2778 * elf32-arm.c (arm_type_of_stub): Correct error arg order.
2779 (bfd_elf32_arm_stm32l4xx_erratum_scan): Don't cast error arg.
2780 (elf32_arm_check_relocs): Make r_symndx an int.
2781 * elf32-cris.c (cris_elf_check_relocs): Delete extraneous %s in
2783 * elf32-metag.c (elf_metag_relocate_section): Delete extra error
2785 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Rewrite bogus
2787 * elf32-i386.c (elf_i386_check_relocs): Make r_symndx an int.
2788 * elf32-s390.c (elf_s390_check_relocs): Likewise.
2789 * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
2790 * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
2791 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
2792 * elf64-s390.c (elf_s390_check_relocs): Likewise.
2793 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
2794 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
2795 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
2796 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
2797 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
2798 * elf64-mmix.c (_bfd_mmix_after_linker_allocation): Cast size_t args
2799 and use %lu for error message.
2800 * elflink.c (elf_link_adjust_relocs): Delete extra error message arg.
2801 * mmo.c (mmo_scan): Make stab_loc a file_ptr. Cast expression for
2804 * elf32-arm.c (elf32_arm_tls_relax): Correct format string and args
2806 (elf32_arm_final_link_relocate): Likewise.
2807 * coff-arm.c (bfd_arm_process_before_allocation): Likewise.
2808 * coffcode.h (styp_to_sec_flags): Likewise.
2809 * cofflink.c (_bfd_coff_write_global_sym): Likewise.
2810 * ecoff.c (_bfd_ecoff_slurp_symbol_table): Likewise.
2811 * elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise.
2812 * elf32-bfin.c (bfinfdpic_check_relocs): Likewise.
2813 (elf32_bfin_merge_private_bfd_data): Likewise.
2814 * elf32-cris.c (cris_elf_relocate_section): Likewise.
2815 * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
2816 * elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise.
2817 (i370_elf_relocate_section): Likewise.
2818 * elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise.
2819 * elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise.
2820 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
2821 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
2822 * elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise.
2823 * elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise.
2824 * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
2825 * elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise.
2826 (_bfd_mips_elf_merge_private_bfd_data): Likewise.
2827 * ieee.c (ieee_write_id, read_id): Likewise.
2828 * mach-o.c (bfd_mach_o_write_contents): Likewise.
2829 (bfd_mach_o_layout_commands, bfd_mach_o_read_section_32): Likewise.
2830 (bfd_mach_o_read_section_64, bfd_mach_o_read_symtab_symbol): Likewise.
2831 (bfd_mach_o_read_command, bfd_mach_o_header_p): Likewise.
2832 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Likewise.
2833 * stabs.c (_bfd_link_section_stabs): Likewise.
2835 * coff-arm.c (coff_arm_relocate_section): Use L modifier in error
2837 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
2838 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
2839 * coff-rs6000.c (xcoff_reloc_type_toc): Likewise.
2840 * coff-sh.c (sh_relax_section): Likewise.
2841 (sh_relax_delete_bytes, sh_swap_insns): Likewise.
2842 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
2843 * coffcode.h (coff_slurp_reloc_table): Likewise.
2844 * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
2845 (_bfd_coff_read_string_table): Likewise.
2846 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
2847 * compress.c (bfd_get_full_section_contents): Likewise.
2848 * dwarf2.c (read_formatted_entries, decode_line_info): Likewise.
2849 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
2850 * elf.c (bfd_elf_string_from_elf_section): Likewise.
2851 * elf32-arc.c (arc_special_overflow_checks): Likewise.
2852 * elf32-arm.c (elf32_arm_tls_relax): Likewise.
2853 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Likewise.
2854 (elf32_arm_write_section): Likewise.
2855 * elf32-bfin.c (bfin_relocate_section): Likewise.
2856 (bfinfdpic_relocate_section): Likewise.
2857 * elf32-hppa.c (hppa_build_one_stub): Likewise.
2858 (final_link_relocate, elf32_hppa_relocate_section): Likewise.
2859 * elf32-i386.c (elf_i386_tls_transition): Likewise.
2860 (elf_i386_relocate_section): Likewise.
2861 * elf32-ip2k.c (ip2k_final_link_relocate): Likewise.
2862 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
2863 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
2864 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
2865 * elf32-metag.c (elf_metag_relocate_section): Likewise.
2866 * elf32-nds32.c (unrecognized_reloc_msg): Likewise.
2867 (nds32_elf_relax_longcall1, nds32_elf_relax_longcall2): Likewise.
2868 (nds32_elf_relax_longcall3, nds32_elf_relax_longjump1): Likewise.
2869 (nds32_elf_relax_longjump2, nds32_elf_relax_longjump3): Likewise.
2870 (nds32_elf_relax_longcall4, nds32_elf_relax_longcall5): Likewise.
2871 (nds32_elf_relax_longcall6, nds32_elf_relax_longjump4): Likewise.
2872 (nds32_elf_relax_longjump5, nds32_elf_relax_longjump6): Likewise.
2873 (nds32_elf_relax_longjump7, nds32_elf_relax_loadstore): Likewise.
2874 (nds32_elf_relax_ptr, nds32_elf_ex9_build_hash_table): Likewise.
2875 * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
2876 * elf32-rx.c (UNSAFE_FOR_PID): Likewise.
2877 * elf32-s390.c (invalid_tls_insn, elf_s390_relocate_section): Likewise.
2878 * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
2879 * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
2880 * elf32-sh.c (sh_elf_relax_section): Likewise.
2881 (sh_elf_relax_delete_bytes, sh_elf_swap_insns): Likewise.
2882 (sh_elf_relocate_section): Likewise.
2883 * elf32-sh64.c (shmedia_prepare_reloc): Likewise.
2884 * elf32-spu.c (spu_elf_relocate_section): Likewise.
2885 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
2886 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
2887 * elf32-v850.c (v850_elf_relax_section): Likewise.
2888 * elf32-vax.c (elf_vax_check_relocs): Likewise.
2889 (elf_vax_relocate_section): Likewise.
2890 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
2891 (extend_ebb_bounds_forward, extend_ebb_bounds_backward): Likewise.
2892 (compute_text_actions, compute_ebb_proposed_actions): Likewise.
2893 (do_fix_for_relocatable_link): Likewise.
2894 * elf64-alpha.c (elf64_alpha_relax_got_load): Likewise.
2895 (elf64_alpha_relax_with_lituse): Likewise.
2896 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Likewise.
2897 (elf_hppa_final_link_relocate): Likewise.
2898 * elf64-ia64-vms.c (elf64_ia64_relax_section): Likewise.
2899 (elf64_ia64_choose_gp, elf64_ia64_relocate_section): Likewise.
2900 (elf64_vms_link_add_object_symbols): Likewise.
2901 * elf64-mmix.c (mmix_elf_perform_relocation): Likewise.
2902 (mmix_final_link_relocate): Likewise.
2903 * elf64-s390.c (invalid_tls_insn): Likewise.
2904 (elf_s390_relocate_section): Likewise.
2905 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
2906 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
2907 (elf_x86_64_relocate_section): Likewise.
2908 * elfcode.h (elf_slurp_symbol_table): Likewise.
2909 * elfcore.h (elf_core_file_p): Likewise.
2910 * elflink.c (elf_link_read_relocs_from_section): Likewise.
2911 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
2912 (elfNN_aarch64_relocate_section): Likewise.
2913 * elfnn-ia64.c (elfNN_ia64_relax_section): Likewise.
2914 (elfNN_ia64_choose_gp, elfNN_ia64_relocate_section): Likewise.
2915 * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
2916 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
2917 (_bfd_mips_elf_relocate_section): Likewise.
2918 (_bfd_mips_elf_finish_dynamic_symbol, mips_finish_exec_plt): Likewise.
2919 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
2920 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
2921 * ieee.c (ieee_slurp_external_symbols): Likewise.
2922 * ihex.c (ihex_write_object_content): Likewise.
2923 * mach-o.c (bfd_mach_o_build_exec_seg_command): Likewise.
2924 * merge.c (_bfd_merged_section_offset): Likewise.
2925 * mmo.c (mmo_write_loc_chunk): Likewise.
2926 (mmo_write_object_contents): Likewise.
2927 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Likewise.
2928 * stabs.c (_bfd_link_section_stabs): Likewise.
2929 * xcofflink.c (xcoff_link_add_symbols, xcoff_find_tc0): Likewise.
2931 2017-07-11 Alan Modra <amodra@gmail.com>
2933 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo.
2935 2017-07-11 Alan Modra <amodra@gmail.com>
2937 * elf32-ppc.c (ppc_elf_relocate_section): Emit "unexpected
2938 instruction" error using _bfd_error_handler, not einfo.
2940 2017-07-10 Nick Clifton <nickc@redhat.com>
2942 * coffcode.h (coff_slurp_symbol_table): Do not include an entry
2943 for C_AIX_WEAKEXT if it has the same value as C_WEAKEXT.
2945 2017-07-07 John Baldwin <jhb@FreeBSD.org>
2947 * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PTLWPINFO.
2949 2017-07-07 Alan Modra <amodra@gmail.com>
2951 * coffcode.h (coff_slurp_symbol_table): Handle C_AIX_WEAKEXT.
2953 2017-07-07 Alan Modra <amodra@gmail.com>
2955 * bfd.c (_doprnt): Replace "L" with "ll" when printing bfd_vma
2956 as long long. Move code replacing "ll" with "I64", and simplify.
2958 2017-07-06 H.J. Lu <hongjiu.lu@intel.com>
2960 * bfd.c (_doprnt): Convert 'L' to 'l' when setting wide_width
2963 2017-07-05 H.J. Lu <hongjiu.lu@intel.com>
2965 * dwarf2.c (line_info_add_include_dir_stub): Replace time with
2967 (line_info_add_file_name): Likewise.
2968 (decode_line_info): Likewise.
2970 2017-07-04 Tristan Gingold <gingold@adacore.com>
2972 * version.m4: Bump version to 2.29.51
2973 * configure: Regenerate.
2975 2017-07-04 Jiong Wang <jiong.wang@arm.com>
2977 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Remove the
2978 sanity check at the head of this function.
2980 2017-07-04 Jan Kratochvil <jan.kratochvil@redhat.com>
2982 * dwarf2.c (struct dwarf2_debug): Add fields dwarf_line_str_buffer and
2983 dwarf_line_str_size.
2984 (struct attr_abbrev): Add field implicit_const.
2985 (dwarf_debug_sections): Add .debug_line_str.
2986 (enum dwarf_debug_section_enum): Add debug_line_str and debug_max.
2987 (dwarf_debug_section_assert): Add static assertion.
2988 (read_indirect_line_string): New.
2989 (read_abbrevs): Support DW_FORM_implicit_const.
2990 (is_str_attr): Support DW_FORM_line_strp.
2991 (read_attribute_value): Support DW_FORM_line_strp and
2992 DW_FORM_implicit_const.
2993 (read_attribute): Support DW_FORM_implicit_const.
2994 (line_info_add_include_dir, line_info_add_include_dir_stub):
2995 (line_info_add_file_name, read_formatted_entries): New.
2996 (decode_line_info, parse_comp_unit): Support DWARF 5.
2997 (_bfd_dwarf2_cleanup_debug_info): Free dwarf_line_str_buffer.
2999 2017-07-03 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
3001 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove the
3002 abort statement that was put for symbols that are not dynamic.
3004 2017-07-03 Tristan Gingold <gingold@adacore.com>
3006 * po/bfd.pot: Regenerate
3008 2017-07-03 Alan Modra <amodra@gmail.com>
3010 * bfd.c (_doprnt): Rewrite "ll" and "L" modifiers to "I64" for
3011 __MSVCRT__. Support "L" modifier for bfd_vma. Formatting.
3012 * elf.c (setup_group): Use "Lx" to print sh_size.
3013 (_bfd_elf_setup_sections): Remove unnecessary cast and print
3014 unknown section type in hex.
3015 (copy_special_section_fields): Style fix.
3016 (bfd_section_from_shdr): Correct format for sh_link. Use a
3017 common error message for all the variants of unrecognized
3019 (assign_file_positions_for_load_sections): Use "Lx" for lma
3020 adjust error message.
3021 (assign_file_positions_for_non_load_sections): Formatting.
3022 (rewrite_elf_program_header): Formatting. Use "Lx" for
3023 bfd_vma values in error messages.
3024 * elfcode.h (elf_slurp_reloc_table_from_section): Cast
3025 ELF_R_SYM value to type expected by format.
3026 * elflink.c (elf_link_read_relocs_from_section): Use "Lx"
3028 (elf_link_add_object_symbols): Use "Lu" for symbol sizes.
3029 (elf_link_input_bfd): Use "Lx" for r_info.
3030 (bfd_elf_gc_record_vtinherit): Use "Lx" for offset.
3032 2017-07-03 Alan Modra <amodra@gmail.com>
3034 * bfd.c (bfd_scan_vma): Don't use long long unless HAVE_LONG_LONG.
3035 * coff-rs6000.c (FMT20): Handle hosts with 64-bit long and
3036 Microsoft C library variant of long long format specifier.
3037 (PRINT20): Cast value to bfd_uint64_t not long long.
3038 * coffcode.h (coff_print_aux): Use BFD_VMA_FMT.
3039 * coff-x86_64.c (coff_amd64_reloc): Use bfd_uint64_t rather than
3040 long long. Don't cast to bfd_vma.
3041 * elf32-score.c (score3_bfd_getl48): Likewise.
3042 * vms-alpha.c (_bfd_vms_slurp_eisd): Likewise.
3044 2017-07-03 Alan Modra <amodra@gmail.com>
3046 * elf.c (_bfd_elf_print_private_bfd_data): Use BFD_VMA_FMT to
3048 (bfd_elf_print_symbol): Don't cast symbol->flags.
3049 (_bfd_elf_symbol_from_bfd_symbol): Likewise.
3050 * elf32-ppc.c (ppc_elf_begin_write_processing): Correct
3051 _bfd_error_handler argument order.
3052 (ppc_elf_merge_private_bfd_data): Don't cast flags.
3054 2017-07-03 Alan Modra <amodra@gmail.com>
3056 * configure.ac: Invoke AC_CHECK_TYPES for long long. Invoke
3057 AC_TYPE_LONG_DOUBLE.
3058 * configure: Regenerate.
3059 * config.in: Regenerate.
3061 2017-06-29 Andrew Waterman <andrew@sifive.com>
3063 * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Fix TLS copy
3066 2017-06-29 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
3068 * elfxx-sparc.c (allocate_dynrelocs): Don't make a symbol dynamic
3069 unless it is undefined weak.
3070 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Set the flag
3071 relative_reloc to direct non-dynamic symbols to R_SPARC_RELATIVE
3073 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): If symbol
3074 is not dynamic in PIC, abort.
3076 2017-06-29 Jiong Wang <jiong.wang@arm.com>
3079 * elfnn-aarch64.c (elfNN_aarch64_allocate_dynrelocs): Only make
3080 undefined weak symbols into dynamic.
3081 (elfNN_aarch64_final_link_relocate): Generate runtime RELATIVE
3082 relocation for non-dynamic symbols.
3083 (elfNN_aarch64_finish_dynamic_symbol): Add sanity check.
3085 2017-06-29 Jiong Wang <jiong.wang@arm.com>
3087 * elfnn-aarch64.c (aarch64_relocation_aginst_gp_p): New function.
3088 (elfNN_aarch64_final_link_relocate): Delete duplicated code for
3089 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15, BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
3090 BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
3091 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Optimize the
3094 2017-06-29 Andreas Arnez <arnez@linux.vnet.ibm.com>
3096 * elf-bfd.h (elfcore_write_s390_gs_cb): Add prototype.
3097 (elfcore_write_s390_gs_bc): Likewise.
3098 * elf.c (elfcore_grok_s390_gs_cb): New function.
3099 (elfcore_grok_s390_gs_bc): New function.
3100 (elfcore_grok_note): Call them.
3101 (elfcore_write_s390_gs_cb): New function.
3102 (elfcore_write_s390_gs_bc): New function.
3103 (elfcore_write_register_note): Call them.
3105 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
3107 * libbfd.c (_bfd_generic_get_section_contents): Don't call
3108 bfd_get_file_size. Check archive element size.
3109 (_bfd_generic_get_section_contents_in_window): Likewise.
3111 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
3113 * bfd-in2.h: Regenerated.
3114 * bfdio.c (bfd_get_size): Change return type to ufile_ptr.
3115 (bfd_get_file_size): Likewise.
3117 2017-06-28 Maciej W. Rozycki <macro@imgtec.com>
3118 Matthew Fortune <matthew.fortune@imgtec.com>
3120 * archures.c (bfd_mach_mips_interaptiv_mr2): New macro.
3121 * cpu-mips.c (I_interaptiv_mr2): New enum value.
3122 (arch_info_struct): Add "mips:interaptiv-mr2" entry.
3123 * elfxx-mips.c (_bfd_elf_mips_mach) <E_MIPS_MACH_IAMR2>: New
3125 (mips_set_isa_flags) <bfd_mach_mips_interaptiv_mr2>: Likewise.
3126 (bfd_mips_isa_ext) <bfd_mach_mips_interaptiv_mr2>: Likewise.
3127 (print_mips_isa_ext) <AFL_EXT_INTERAPTIV_MR2>: Likewise.
3128 (mips_mach_extensions): Add `bfd_mach_mipsisa32r3' and
3129 `bfd_mach_mips_interaptiv_mr2' entries.
3130 * bfd-in2.h: Regenerate.
3132 2017-06-27 Nick Clifton <nickc@redhat.com>
3134 * tekhex.c (pass_over): Revert accidental conversion of a local
3135 array to a static array.
3137 2017-06-27 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
3140 * elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Adjust
3141 reloc addend if necessary. Adjust diff only if
3142 shrinked_insn_address < end_address.
3144 2017-06-27 Alan Modra <amodra@gmail.com>
3147 * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
3148 (_bfd_generic_get_section_contents_in_window): Likewise.
3150 2017-06-26 Kuan-Lin Chen <rufus@andestech.com>
3152 * elfnn-riscv.c (perform_relocation): Support the new
3153 R_RISCV_32_PCREL relocation.
3154 (riscv_elf_relocate_section): Likewise.
3155 * elfxx-riscv.c (howto_table): Likewise.
3156 (riscv_reloc_map): Likewise.
3157 * bfd-in2.h (BFD_RELOC_RISCV_32_PCREL): New relocation.
3158 * libbfd.h: Regenerate.
3160 2017-06-27 Alan Modra <amodra@gmail.com>
3163 * libbfd.c (_bfd_generic_get_section_contents): Delete abort.
3164 Use unsigned file pointer type, and remove cast.
3165 * libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise.
3166 Add "count", not "sz".
3168 2017-06-26 Pedro Alves <palves@redhat.com>
3171 * libbfd.c (_bfd_generic_get_section_contents): Add "count", not
3174 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
3177 * libbfd.c (_bfd_generic_get_section_contents_in_window): Add
3180 2017-06-26 Maciej W. Rozycki <macro@imgtec.com>
3182 * cpu-mips.c (arch_info_struct): Mark the 4010 32-bit.
3183 * elfxx-mips.c (mips_set_isa_flags) <bfd_mach_mips4010>: Set
3184 E_MIPS_ARCH_2 rather than E_MIPS_ARCH_3 in `e_flags'.
3185 (mips_mach_extensions): Mark `bfd_mach_mips4010' as extending
3186 `bfd_mach_mips6000' rather than `bfd_mach_mips4000'.
3188 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
3191 * compress.c (bfd_get_full_section_contents): Don't check the
3193 * libbfd.c (_bfd_generic_get_section_contents): Check for and
3194 reject a section whose size + offset is greater than the size
3196 (_bfd_generic_get_section_contents_in_window): Likewise.
3198 2017-06-26 Nick Clifton <nickc@redhat.com>
3201 * tekhex.c (getvalue): Check for the source pointer exceeding the
3202 end pointer before the first byte is read.
3204 2017-06-26 Nick Clifton <nickc@redhat.com>
3207 * opncls.c (get_build_id): Check that the section is big enough
3208 to contain the whole note.
3209 * compress.c (bfd_get_full_section_contents): Check for and reject
3210 a section whose size is greater than the size of the entire file.
3211 * elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not
3212 contain a notes section.
3214 2017-06-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
3216 * elf64-s390.c (elf_s390_additional_program_headers): Add NULL
3218 (elf_s390_modify_segment_map): Likewise.
3219 (bfd_elf_s390_set_options): Lisewise.
3221 2017-06-26 Alan Modra <amodra@gmail.com>
3223 * elflink.c (_bfd_elf_link_create_dynstrtab): Don't make dynobj
3225 (_bfd_elf_size_group_sections): Skip --just-syms bfds.
3226 (bfd_elf_size_dynamic_sections): Ignore .note.GNU-stack and
3227 .preinit_array on --just-syms bfds.
3228 (_bfd_elf_gc_mark_extra_sections): Skip --just-syms bfds.
3229 (elf_gc_sweep, bfd_elf_parse_eh_frame_entries): Likewise.
3230 (bfd_elf_gc_sections, bfd_elf_discard_info): Likewise.
3232 2017-06-25 Sergei Trofimovich <slyfox@gentoo.org>
3234 * elf.c (find_link): Bounds check "hint".
3236 2017-06-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
3238 * elf32-arm.c (using_thumb_only): Update list of architectures in
3239 BFD_ASSERT for which the logic is valid.
3240 (using_thumb2_bl): Likewise.
3241 (using_thumb2): Likewise and return true for ARMv8-R.
3242 (arch_has_arm_nop): Likewise.
3243 (tag_cpu_arch_combine): New v8r table for ARMv8-R Tag_CPU_arch
3244 merging logic. Update commentis for value 15 of v8m_baseline,
3245 v8m_mainline and v4t_plus_v6_m arrays. Use v8r array to decide
3246 merging of value 15 of Tag_CPU_arch.
3248 2017-06-23 Jiong Wang <jiong.wang@arm.com>
3250 * reloc.c (BFD_RELOC_AARCH64_ADR_GOTPAGE): Rename to
3251 BFD_RELOC_AARCH64_ADR_GOT_PAGE
3252 * bfd-in2.h: Regenerate.
3254 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
3256 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Move
3257 the error_alignment label forward. Properly align program
3258 property note section.
3260 2017-06-22 Eric Christopher <echristo@gmail.com>
3262 * elf32-arm.c (elf32_arm_final_link_relocate): Use labs rather than
3263 abs to fix a truncation warning.
3265 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
3267 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Resolve
3268 local undefined weak symbol to 0.
3269 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Likewise.
3271 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
3273 * elf32-i386.c (elf_i386_merge_gnu_properties): If info->shstk
3274 is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
3275 (elf_i386_link_setup_gnu_properties): If info->shstk is set,
3276 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
3277 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): If
3278 info->shstk is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
3279 (elf_x86_64_link_setup_gnu_properties): If info->shstk is set,
3280 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
3282 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
3284 * elf32-i386.c (elf_i386_lazy_ibt_plt0_entry): New.
3285 (elf_i386_lazy_ibt_plt_entry): Likewise.
3286 (elf_i386_pic_lazy_ibt_plt0_entry): Likewise.
3287 (elf_i386_non_lazy_ibt_plt_entry): Likewise.
3288 (elf_i386_pic_non_lazy_ibt_plt_entry): Likewise.
3289 (elf_i386_eh_frame_lazy_ibt_plt): Likewise.
3290 (elf_i386_lazy_plt_layout): Likewise.
3291 (elf_i386_non_lazy_plt_layout): Likewise.
3292 (elf_i386_link_hash_entry): Add plt_second.
3293 (elf_i386_link_hash_table): Add plt_second and
3294 plt_second_eh_frame.
3295 (elf_i386_allocate_dynrelocs): Use the second PLT if needed.
3296 (elf_i386_size_dynamic_sections): Use .plt.got unwind info for
3297 the second PLT. Check the second PLT.
3298 (elf_i386_relocate_section): Use the second PLT to resolve
3299 PLT reference if needed.
3300 (elf_i386_finish_dynamic_symbol): Fill and use the second PLT if
3302 (elf_i386_finish_dynamic_sections): Set sh_entsize on the
3303 second PLT. Generate unwind info for the second PLT.
3304 (elf_i386_plt_type): Add plt_second.
3305 (elf_i386_get_synthetic_symtab): Support the second PLT.
3306 (elf_i386_parse_gnu_properties): Support
3307 GNU_PROPERTY_X86_FEATURE_1_AND.
3308 (elf_i386_merge_gnu_properties): Support
3309 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
3310 on GNU_PROPERTY_X86_FEATURE_1_IBT
3311 (elf_i386_link_setup_gnu_properties): If info->ibt is set,
3312 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
3313 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
3314 is set on all relocatable inputs.
3315 * elf64-x86-64.c (elf_x86_64_lazy_ibt_plt_entry): New.
3316 (elf_x32_lazy_ibt_plt_entry): Likewise.
3317 (elf_x86_64_non_lazy_ibt_plt_entry): Likewise.
3318 (elf_x32_non_lazy_ibt_plt_entry): Likewise.
3319 (elf_x86_64_eh_frame_lazy_ibt_plt): Likewise.
3320 (elf_x32_eh_frame_lazy_ibt_plt): Likewise.
3321 (elf_x86_64_lazy_ibt_plt): Likewise.
3322 (elf_x32_lazy_ibt_plt): Likewise.
3323 (elf_x86_64_non_lazy_ibt_plt): Likewise.
3324 (elf_x32_non_lazy_ibt_plt): Likewise.
3325 (elf_x86_64_get_synthetic_symtab): Support the second PLT.
3326 (elf_x86_64_parse_gnu_properties): Support
3327 GNU_PROPERTY_X86_FEATURE_1_AND.
3328 (elf_x86_64_merge_gnu_properties): Support
3329 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
3330 on GNU_PROPERTY_X86_FEATURE_1_IBT
3331 (elf_x86_64_link_setup_gnu_properties): If info->ibt is set,
3332 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
3333 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
3334 is set on all relocatable inputs.
3336 2017-06-22 Nick Clifton <nickc@redhat.com>
3339 * som.c (setup_sections): NUL terminate the space_strings buffer.
3340 Check that the space.name field does not index beyond the end of
3341 the space_strings buffer.
3343 2017-06-21 Nick Clifton <nickc@redhat.com>
3346 * coff-sh.c (sh_reloc): Check for an out of range reloc.
3348 2017-06-21 Nick Clifton <nickc@redhat.com>
3351 * vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as
3352 type of the size parameter.
3353 (_bfd_vms_save_counted_string): Add second parameter - the maximum
3354 length of the counted string.
3355 * vms.h (_bfd_vms_save_sized_string): Update prototype.
3356 (_bfd_vms_save_counted_string): Likewise.
3357 * vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to
3358 _bfd_vms_save_counted_string.
3359 (_bfd_vms_slurp_ehdr): Likewise.
3360 (_bfd_vms_slurp_egsd): Likewise.
3361 (Parse_module): Likewise.
3363 2017-06-21 Alan Modra <amodra@gmail.com>
3365 * elf64-ppc.c (ppc64_elf_size_stubs): Test for localentry:0 plt
3366 calls before tocsave calls.
3367 (ppc64_elf_relocate_section): Allow localentry:0 plt calls without
3370 2017-06-21 Nick Clifton <nickc@redhat.com>
3373 * reloc.c (bfd_generic_get_relocated_section_contents): Fail if
3374 bfd_get_full_section_contents returns no contents.
3376 2017-06-21 Nick Clifton <nickc@redhat.com>
3379 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized
3382 2017-06-21 Nick Clifton <nickc@redhat.com>
3385 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section
3387 (image_set_ptr): Likewise.
3388 (alpha_vms_fix_sec_rel): Likewise.
3389 (alpha_vms_slurp_relocs): Likewise.
3391 2017-06-21 Nick Clifton <nickc@redhat.com>
3394 * ieee.c (ieee_slurp_sections): Check for a NULL return from
3396 (ieee_archive_p): Likewise.
3397 (ieee_object_p): Likewise.
3399 2017-06-21 Nick Clifton <nickc@redhat.com>
3402 * elf.c (setup_group): Zero the group section pointer list after
3403 allocation so that loops can be caught. Check for NULL pointers
3404 when processing a group list.
3406 2017-06-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
3408 * elf-s390.h: New file.
3409 * elf64-s390.c (struct elf_s390_link_hash_table): Add params
3411 (elf_s390_additional_program_headers): New function.
3412 (elf_s390_modify_segment_map): New function.
3413 (bfd_elf_s390_set_options): New function.
3414 (elf_backend_additional_program_headers)
3415 (elf_backend_modify_segment_map): Add macro definitions.
3417 2017-06-19 H.J. Lu <hongjiu.lu@intel.com>
3420 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
3421 the DYNAMIC bit instead of bfd_count_sections.
3423 2017-06-19 Nick Clifton <nickc@redhat.com>
3426 * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record
3428 (evax_bfd_print_eeom): Likewise.
3429 (evax_bfd_print_egsd): Check for an overlarge record length.
3430 (evax_bfd_print_etir): Likewise.
3432 2017-06-19 Nick Clifton <nickc@redhat.com>
3435 * libieee.h (struct common_header_type): Add end_p field.
3436 * ieee.c (this_byte_and_next): Do not advance input_p beyond
3438 (read_id): Check for a length that exceeds the remaining bytes in
3440 (ieee_seek): Initialise end_p.
3441 (ieee_archive_p): Likewise.
3442 (ieee_object_p): Likewise.
3444 2017-06-19 Nick Clifton <nickc@redhat.com>
3447 * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset
3448 before reading the EIHS structure entries.
3450 2017-06-19 Nick Clifton <nickc@redhat.com>
3453 * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for
3454 gsd_size. Check that there are enough bytes remaining to read the
3455 type and size of the next egsd. Check that the size of the egsd
3456 does not exceed the size of the record.
3458 2017-06-19 Alan Modra <amodra@gmail.com>
3460 * config.bfd: Correct targ_underscore for cris.
3462 2017-06-18 Alan Modra <amodra@gmail.com>
3464 * config.bfd: Correct targ_underscore for epiphany, ip2k,
3465 m32c, mn10200, pru, rl78, rx, crisv32 and v850.
3467 2017-06-16 Nick Clifton <nickc@redhat.com>
3469 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
3470 bucketlist is empty because there are no symbols to add to the
3473 2017-06-16 Alan Modra <amodra@gmail.com>
3479 * targets.c (struct bfd_target): Add _bfd_define_start_stop.
3480 (BFD_JUMP_TABLE_LINK): Likewise.
3481 * elf-bfd.h (bfd_elf_define_start_stop): Declare.
3482 * elflink.c (_bfd_elf_gc_mark_rsec): Update comment.
3483 (bfd_elf_define_start_stop): New function.
3484 * linker.c (bfd_generic_define_start_stop): New function.
3485 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init
3487 * aout-adobe.c (aout_32_bfd_define_start_stop): Define.
3488 * aout-target.h (MY_bfd_define_start_stop): Define.
3489 * aout-tic30.c (MY_bfd_define_start_stop): Define.
3490 * binary.c (binary_bfd_define_start_stop): Define.
3491 * bout.c (b_out_bfd_define_start_stop): Define.
3492 * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define.
3493 * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define.
3494 * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define.
3495 * coffcode.h (coff_bfd_define_start_stop): Define.
3496 * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define.
3497 * i386msdos.c (msdos_bfd_define_start_stop): Define.
3498 * i386os9k.c (os9k_bfd_define_start_stop): Define.
3499 * ieee.c (ieee_bfd_define_start_stop): Define.
3500 * ihex.c (ihex_bfd_define_start_stop): Define.
3501 * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define.
3502 * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define.
3503 * mmo.c (mmo_bfd_define_start_stop): Define.
3504 * nlm-target.h (nlm_bfd_define_start_stop): Define.
3505 * oasys.c (oasys_bfd_define_start_stop): Define.
3506 * pef.c (bfd_pef_bfd_define_start_stop): Define.
3507 * plugin.c (bfd_plugin_bfd_define_start_stop): Define.
3508 * ppcboot.c (ppcboot_bfd_define_start_stop): Define.
3509 * som.c (som_bfd_define_start_stop): Define.
3510 * srec.c (srec_bfd_define_start_stop): Define.
3511 * tekhex.c (tekhex_bfd_define_start_stop): Define.
3512 * versados.c (versados_bfd_define_start_stop): Define.
3513 * vms-alpha.c (vms_bfd_define_start_stop): Define.
3514 (alpha_vms_bfd_define_start_stop): Define.
3515 * xsym.c (bfd_sym_bfd_define_start_stop): Define.
3516 * bfd-in2.h: Regenerate.
3517 * libbfd.h: Regenerate.
3519 2017-06-16 Jiong Wang <jiong.wang@arm.com>
3521 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
3522 SYMBOL_REFERENCES_LOCAL.
3524 2017-06-15 Jiong Wang <jiong.wang@arm.com>
3527 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
3528 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
3529 runtime for if there needs copy relocation elimination.
3530 (need_copy_relocation_p): New function. Return true for symbol with
3531 pc-relative references and if it's against read-only sections.
3532 (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
3533 (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
3534 that are related with accessing external objects.
3535 (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change
3536 in elfNN_aarch64_check_relocs.
3538 2017-06-15 Nick Clifton <nickc@redhat.com>
3541 * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
3544 (ieee_archive_p): Likewise.
3546 2017-06-15 Nick Clifton <nickc@redhat.com>
3549 * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
3551 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
3553 * elf32-xtensa.c (elf_xtensa_be_plt_entry,
3554 elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays,
3555 keep both windowed and call0 ABI PLT definitions.
3556 (elf_xtensa_create_plt_entry): Use selected ABI to choose upper
3557 elf_xtensa_*_plt_entry endex.
3558 (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size.
3560 2017-06-14 Nick Clifton <nickc@redhat.com>
3563 * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
3566 2017-06-14 Nick Clifton <nickc@redhat.com>
3569 * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
3570 maximum value for the ascic pointer. Check that name processing
3571 does not read beyond this value.
3572 (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
3575 2017-06-14 Nick Clifton <nickc@redhat.com>
3578 * versados.c (versados_mkobject): Zero the allocated tdata structure.
3579 (process_otr): Check for an invalid offset in the otr structure.
3581 2017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
3583 * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
3585 2017-06-13 H.J. Lu <hongjiu.lu@intel.com>
3591 * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
3592 vtable field to a union.
3593 (_bfd_elf_is_start_stop): Removed.
3594 * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
3595 __start_SECNAME and __stop_SECNAME symbols.
3596 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
3597 * elflink.c (_bfd_elf_is_start_stop): Removed.
3598 (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
3599 _bfd_elf_is_start_stop.
3600 (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
3601 __stop_SECNAME symbols. Updated.
3602 (elf_gc_smash_unused_vtentry_relocs): Likewise.
3603 (bfd_elf_gc_record_vtinherit): Likewise.
3604 (bfd_elf_gc_record_vtentry): Likewise.
3606 2017-06-13 Nick Clifton <nickc@redhat.com>
3609 * elflink.c (elf_link_adjust_relocs): Generate an error when
3610 encountering a reloc against a symbol removed by garbage
3613 2017-06-12 H.J. Lu <hongjiu.lu@intel.com>
3615 * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
3616 to merge_gnu_properties.
3617 * elf-properties.c (elf_merge_gnu_properties): Add struct
3618 bfd_link_info * and pass it to merge_gnu_properties.
3619 (elf_merge_gnu_property_list): Add struct bfd_link_info *
3620 and pass it to elf_merge_gnu_properties.
3621 (_bfd_elf_link_setup_gnu_properties): Pass info to
3622 elf_merge_gnu_property_list.
3623 * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
3625 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
3627 2017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
3630 * binary.c (binary_set_section_contents): Scale lma by octets
3631 per byte to set filepos.
3633 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3635 * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
3638 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3640 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
3643 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3645 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
3646 patched section contents for TLS IE reloc.
3647 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
3649 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3651 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
3652 RELOC_FOR_GLOBAL_SYMBOL macro.
3654 2018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3656 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
3659 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3661 * config/tc-arc.c (md_undefined_symbol): Changed.
3662 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
3664 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3666 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
3669 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3671 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
3672 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
3674 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3676 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
3679 2017-06-08 Richard Earnshaw <rearnsha@arm.com>
3681 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
3682 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
3683 is non-zero. Add clarifying comments.
3685 2017-06-08 H.J. Lu <hongjiu.lu@intel.com>
3687 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
3688 name. Use local IFUNC symbol name string to report unsupported
3689 non-PIC call to IFUNC function.
3690 (elf_i386_relocate_section): Dump local IFUNC name with minfo
3691 when generating R_386_IRELATIVE relocation.
3692 (elf_i386_finish_dynamic_symbol): Likewise.
3693 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
3695 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
3696 when generating R_X86_64_IRELATIVE relocation.
3697 (elf_x86_64_finish_dynamic_symbol): Likewise.
3699 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
3701 * elf.c (setup_group): Make sure BFD sections are created for all
3702 group sections in the input file when processing SHF_GROUP
3704 (bfd_section_from_shdr): Avoid duplicating logic already
3705 implemented in `setup_group'.
3707 2017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
3710 * peXXigen.c (pe_print_idata): Use the address of the first thunk
3711 if the hint address is zero.
3713 2017-06-06 James Clarke <jrtc27@jrtc27.com>
3716 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
3717 ELF_COMMON_DEF_P for common symbols.
3719 2017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
3721 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
3722 SEC_GROUP sections as SEC_EXCLUDE.
3723 (bfd_elf_set_group_contents): Replace use of abort with an assert.
3724 (assign_section_numbers): Use resolve_section_groups flag instead
3725 of relocatable link type.
3726 (_bfd_elf_init_private_section_data): Use resolve_section_groups
3727 flag instead of checking the final_link flag for part of the
3728 checks in here. Fix white space as a result.
3729 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
3730 instead of relocatable link type.
3731 (bfd_elf_final_link): Likewise.
3733 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
3735 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
3737 * elf32-score.c (score_elf_final_link_relocate): Likewise.
3738 (s3_bfd_score_elf_check_relocs): Likewise.
3739 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
3740 (score_elf_final_link_relocate): Likewise.
3741 (s7_bfd_score_elf_check_relocs): Likewise.
3743 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
3745 * elflink.c (init_reloc_cookie_rels): Remove unused variable
3748 2017-06-06 Maciej W. Rozycki <macro@imgtec.com>
3750 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
3751 from `reloc_count' rather than decrementing it.
3752 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
3753 `reloc_count' by `int_rels_per_ext_rel'.
3754 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
3755 `reloc_count' by `int_rels_per_ext_rel' for last relocation
3756 entry determination.
3757 (s3_bfd_score_elf_check_relocs): Likewise.
3758 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
3759 (s7_bfd_score_elf_relocate_section): Likewise.
3760 (s7_bfd_score_elf_check_relocs): Likewise.
3761 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
3762 prototype and function.
3763 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
3764 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
3765 triple rather than once the sum of REL and RELA relocation entry
3767 (bfd_elf64_get_reloc_upper_bound): Remove macro.
3768 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
3769 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
3770 storage allocation size determination.
3771 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
3772 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
3773 by `int_rels_per_ext_rel' for last relocation entry
3775 (bfd_elf_final_link): Do not multiply `reloc_count' by
3776 `int_rels_per_ext_rel' for internal relocation storage
3777 allocation size determination.
3778 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
3779 `int_rels_per_ext_rel' for last relocation entry determination.
3780 (elf_gc_smash_unused_vtentry_relocs): Likewise.
3781 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
3782 (_bfd_mips_elf_relocate_section): Likewise.
3784 2017-06-05 Alan Modra <amodra@gmail.com>
3787 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
3789 2017-06-01 John Baldwin <jhb@FreeBSD.org>
3791 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
3792 determine structure sizes.
3793 (elfcore_grok_freebsd_prstatus): Likewise.
3795 2017-06-01 Alan Modra <amodra@gmail.com>
3797 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
3798 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
3800 (is_elfv2_localentry0): New function.
3801 (ppc64_elf_tls_setup): Default params->plt_localentry0.
3802 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
3803 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
3804 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
3805 optimized localentry:0 stubs.
3806 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
3807 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
3809 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
3811 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
3813 2017-05-30 Casey Smith <clegg89@gmail.com>
3816 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
3817 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
3819 2017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
3821 * cpu-arc.c (arc_compatible): New function.
3823 2017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
3825 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
3827 2017-05-30 H.J. Lu <hongjiu.lu@intel.com>
3830 * bfdio.c (bfd_get_file_size): New function.
3831 * bfd-in2.h: Regenerated.
3833 2017-05-23 Dilian Palauzov <git-dpa@aegee.org>
3835 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
3838 2017-05-22 H.J. Lu <hongjiu.lu@intel.com>
3840 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
3841 dynobj instead of htab->elf.dynobj.
3843 2017-05-19 Maciej W. Rozycki <macro@imgtec.com>
3845 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
3847 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
3848 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
3849 actual number of internal relocations retrieved. Adjust
3850 function description.
3851 (bfd_elf64_canonicalize_reloc): Remove macro.
3852 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
3854 2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
3856 * archures.c (bfd_mach_sparc_v9m8): Define.
3857 (bfd_mach_sparc_v8plusm8): Likewise.
3858 (bfd_mach_sparc_v9_p): Adjust to M8.
3859 (bfd_mach_sparc_64bit_p): Likewise.
3860 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
3861 bfd_mach_sparc_v8plusm8.
3862 * bfd-in2.h: Regenerated.
3863 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
3865 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
3866 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
3867 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
3869 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
3870 bfd_mach_sparc_v8plusm8.
3872 2017-05-19 Alan Modra <amodra@gmail.com>
3874 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
3875 debug and special sections when no non-note alloc sections in an
3878 2017-05-18 Alan Modra <amodra@gmail.com>
3880 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
3881 * elf-m10300.c: Likewise.
3883 * elf32-arc.c: Likewise.
3884 * elf32-bfin.c: Likewise.
3885 * elf32-m68k.c: Likewise.
3886 * elf32-nds32.c: Likewise.
3887 * elf32-tilepro.c: Likewise.
3888 * elflink.c: Likewise.
3889 * elfnn-aarch64.c: Likewise.
3890 * elfnn-riscv.c: Likewise.
3891 * elfxx-tilegx.c: Likewise.
3892 * mach-o.c: Likewise.
3893 * peXXigen.c: Likewise.
3894 * vms-alpha.c: Likewise.
3895 * vms-lib.c: Likewise.
3897 2017-05-17 H.J. Lu <hongjiu.lu@intel.com>
3900 * elflink.c (elf_gc_mark_debug_section): New function.
3901 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
3902 referenced by kept debug sections.
3904 2017-05-16 Alan Modra <amodra@gmail.com>
3906 * elf-m10300.c: Rename occurrences of non_ir_ref.
3907 * elf32-arm.c: Likewise.
3908 * elf32-bfin.c: Likewise.
3909 * elf32-cr16.c: Likewise.
3910 * elf32-cris.c: Likewise.
3911 * elf32-d10v.c: Likewise.
3912 * elf32-dlx.c: Likewise.
3913 * elf32-fr30.c: Likewise.
3914 * elf32-frv.c: Likewise.
3915 * elf32-hppa.c: Likewise.
3916 * elf32-i370.c: Likewise.
3917 * elf32-i386.c: Likewise.
3918 * elf32-iq2000.c: Likewise.
3919 * elf32-lm32.c: Likewise.
3920 * elf32-m32c.c: Likewise.
3921 * elf32-m32r.c: Likewise.
3922 * elf32-m68hc1x.c: Likewise.
3923 * elf32-m68k.c: Likewise.
3924 * elf32-mcore.c: Likewise.
3925 * elf32-metag.c: Likewise.
3926 * elf32-microblaze.c: Likewise.
3927 * elf32-moxie.c: Likewise.
3928 * elf32-msp430.c: Likewise.
3929 * elf32-mt.c: Likewise.
3930 * elf32-nios2.c: Likewise.
3931 * elf32-or1k.c: Likewise.
3932 * elf32-ppc.c: Likewise.
3933 * elf32-rl78.c: Likewise.
3934 * elf32-s390.c: Likewise.
3935 * elf32-score.c: Likewise.
3936 * elf32-score7.c: Likewise.
3937 * elf32-sh.c: Likewise.
3938 * elf32-tic6x.c: Likewise.
3939 * elf32-tilepro.c: Likewise.
3940 * elf32-v850.c: Likewise.
3941 * elf32-vax.c: Likewise.
3942 * elf32-xstormy16.c: Likewise.
3943 * elf32-xtensa.c: Likewise.
3944 * elf64-alpha.c: Likewise.
3945 * elf64-hppa.c: Likewise.
3946 * elf64-ia64-vms.c: Likewise.
3947 * elf64-mmix.c: Likewise.
3948 * elf64-ppc.c: Likewise.
3949 * elf64-s390.c: Likewise.
3950 * elf64-sh64.c: Likewise.
3951 * elf64-x86-64.c: Likewise.
3952 * elflink.c: Likewise.
3953 * elfnn-aarch64.c: Likewise.
3954 * elfnn-ia64.c: Likewise.
3955 * elfnn-riscv.c: Likewise.
3956 * elfxx-mips.c: Likewise.
3957 * elfxx-sparc.c: Likewise.
3958 * elfxx-tilegx.c: Likewise.
3959 * linker.c: Likewise.
3961 2017-05-16 Alan Modra <amodra@gmail.com>
3963 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
3964 * elflink.c (elf_link_add_object_symbols): Update to use
3966 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
3968 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
3970 2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
3972 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
3974 2017-05-12 H.J. Lu <hongjiu.lu@intel.com>
3976 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
3977 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
3979 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3981 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
3983 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
3985 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
3986 to plt_second/plt_second_eh_frame.
3987 (elf_x86_64_link_hash_newfunc): Updated.
3988 (elf_x86_64_allocate_dynrelocs): Likewise.
3989 (elf_x86_64_size_dynamic_sections): Likewise.
3990 (elf_x86_64_relocate_section): Likewise.
3991 (elf_x86_64_finish_dynamic_symbol): Likewise.
3992 (elf_x86_64_finish_dynamic_sections): Likewise.
3993 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
3994 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
3996 (elf_backend_setup_gnu_properties): Updated. Create the
3997 .plt.sec section instead of the .plt.sec section.
3999 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
4001 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
4002 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
4003 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
4005 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
4007 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
4008 (bfd_elf64_set_reloc): Define.
4009 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
4011 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
4013 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
4014 (struct bfd_target): New field _bfd_set_reloc.
4015 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
4016 * reloc.c (_bfd_generic_set_reloc): New function.
4017 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
4018 * nlm-target.h (nlm_set_reloc): Likewise.
4019 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
4020 * aout-tic30.c (MY_set_reloc): Likewise.
4021 * aout-target.h (MY_set_reloc): Likewise.
4022 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
4023 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
4024 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
4025 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
4026 * aout-adobe.c (aout_32_set_reloc): Likewise.
4027 * bout.c (b_out_set_reloc): Likewise.
4028 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
4029 * i386os9k.c (aout_32_set_reloc): Likewise.
4030 * ieee.c (ieee_set_reloc): Likewise.
4031 * oasys.c (oasys_set_reloc): Likewise.
4032 * som.c (som_set_reloc): Likewise.
4033 * versados.c (versados_set_reloc): Likewise.
4034 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
4035 _bfd_generic_set_reloc.
4036 (rs6000_xcoff64_aix_vec): LIkewise.
4037 * libbfd.c (_bfd_norelocs_set_reloc): New function.
4038 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
4039 * i386msdos.c (msdos_set_reloc): Define to
4040 _bfd_norelocs_set_reloc.
4041 * elfcode.h (elf_set_reloc): Define.
4042 * bfd-in2.h: Regenerated.
4044 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
4047 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
4048 for IFUNC function address.
4050 2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
4052 * elf32-arc.c (FEATURE_LIST_NAME): Define.
4053 (CONFLICT_LIST): Likewise.
4054 (opcode/arc-attrs.h): Include.
4055 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
4056 (arc_extract_features): New file.
4057 (arc_stralloc): Likewise.
4058 (arc_elf_merge_attributes): Likewise.
4059 (arc_elf_merge_private_bfd_data): Use object attributes.
4060 (bfd_arc_get_mach_from_attributes): New function.
4061 (arc_elf_object_p): Use object attributes.
4062 (arc_elf_final_write_processing): Likewise.
4063 (elf32_arc_obj_attrs_arg_type): New function.
4064 (elf32_arc_obj_attrs_handle_unknown): Likewise.
4065 (elf32_arc_section_from_shdr): Likewise.
4066 (elf_backend_obj_attrs_vendor): Define.
4067 (elf_backend_obj_attrs_section): Likewise.
4068 (elf_backend_obj_attrs_arg_type): Likewise.
4069 (elf_backend_obj_attrs_section_type): Likewise.
4070 (elf_backend_obj_attrs_handle_unknown): Likewise.
4071 (elf_backend_section_from_shdr): Likewise.
4073 2017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
4076 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
4077 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
4078 and the destination is a Thumb symbol.
4080 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
4082 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
4083 initializer to silence GCC 4.2.
4084 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
4086 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
4088 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
4089 (LAZY_PLT_ENTRY_SIZE): This.
4090 (NON_LAZY_PLT_ENTRY_SIZE): New.
4091 (elf_x86_64_plt0_entry): Renamed to ...
4092 (elf_x86_64_lazy_plt0_entry): This.
4093 (elf_x86_64_plt_entry): Renamed to ...
4094 (elf_x86_64_lazy_plt_entry): This.
4095 (elf_x86_64_bnd_plt0_entry): Renamed to ...
4096 (elf_x86_64_lazy_bnd_plt0_entry): This.
4097 (elf_x86_64_legacy_plt_entry): Removed.
4098 (elf_x86_64_bnd_plt_entry): Renamed to ...
4099 (elf_x86_64_lazy_bnd_plt_entry): This.
4100 (elf_x86_64_legacy_plt2_entry): Renamed to ...
4101 (elf_x86_64_non_lazy_plt_entry): This.
4102 (elf_x86_64_bnd_plt2_entry): Renamed to ...
4103 (elf_x86_64_non_lazy_bnd_plt_entry): This.
4104 (elf_x86_64_eh_frame_plt): Renamed to ...
4105 (elf_x86_64_eh_frame_lazy_plt): This.
4106 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
4107 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
4108 (elf_x86_64_eh_frame_plt_got): Renamed to ...
4109 (elf_x86_64_eh_frame_non_lazy_plt): This.
4110 (elf_x86_64_lazy_plt_layout): New.
4111 (elf_x86_64_non_lazy_plt_layout): Likewise.
4112 (elf_x86_64_plt_layout): Likewise.
4113 (elf_x86_64_backend_data): Remove PLT layout information. Add
4114 os for target system.
4115 (GET_PLT_ENTRY_SIZE): Removed.
4116 (elf_x86_64_lazy_plt): New.
4117 (elf_x86_64_non_lazy_plt): Likewise.
4118 (elf_x86_64_lazy_bnd_plt): Likewise.
4119 (elf_x86_64_non_lazy_bnd_plt): Likewise.
4120 (elf_x86-64_arch_bed): Updated.
4121 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
4122 (elf_x86_64_create_dynamic_sections): Removed.
4123 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
4124 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
4125 (elf_x86-64_adjust_dynamic_symbol): Updated.
4126 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
4127 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
4128 size for PLT0 if there is no PLT0. Get plt_entry_size from
4129 non_lazy_plt for non-lazy PLT entries.
4130 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
4131 from non_lazy_plt for non-lazy PLT entries.
4132 (elf_x86-64_relocate_section): Updated. Properly get PLT index
4133 if there is no PLT0.
4134 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
4135 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
4136 entries with non-lazy PLT layout. Don't fill the second and third
4137 slots in the PLT entry if there is no PLT0.
4138 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
4139 if there is no PLT0. Set sh_entsize on the .plt.got section.
4140 (compare_relocs): New.
4141 (elf_x86_64_plt_type): Likewise.
4142 (elf_x86_64_plt): Likewise.
4143 (elf_x86_64_nacl_plt): New. Forward declaration.
4144 (elf_x86_64_get_plt_sym_val): Removed.
4145 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
4146 against all dynamic relocations.
4147 (elf_x86_64_link_setup_gnu_properties): New function.
4148 (elf_backend_create_dynamic_sections): Updated.
4149 (elf_backend_setup_gnu_properties): New.
4150 (elf_x86_64_nacl_plt): New.
4151 (elf_x86_64_nacl_arch_bed): Updated.
4153 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
4155 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
4156 (LAZY_PLT_ENTRY_SIZE): This.
4157 (NON_LAZY_PLT_ENTRY_SIZE): New.
4158 (elf_i386_plt0_entry): Renamed to ...
4159 (elf_i386_lazy_plt0_entry): This.
4160 (elf_i386_plt_entry): Renamed to ...
4161 (elf_i386_lazy_plt_entry): This.
4162 (elf_i386_pic_plt0_entry): Renamed to ...
4163 (elf_i386_pic_lazy_plt0_entry): This.
4164 (elf_i386_pic_plt_entry): Renamed to ...
4165 (elf_i386_pic_lazy_plt_entry): This.
4166 (elf_i386_got_plt_entry): Renamed to ...
4167 (elf_i386_non_lazy_plt_entry): This.
4168 (elf_i386_pic_got_plt_entry): Renamed to ...
4169 (elf_i386_pic_non_lazy_plt_entry): This.
4170 (elf_i386_eh_frame_plt): Renamed to ...
4171 (elf_i386_eh_frame_lazy_plt): This.
4172 (elf_i386_eh_frame_plt_got): Renamed to ...
4173 (elf_i386_eh_frame_non_lazy_plt): This.
4174 (elf_i386_plt_layout): Renamed to ...
4175 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
4176 eh_frame_plt_got_size.
4177 (elf_i386_non_lazy_plt_layout): New.
4178 (elf_i386_plt_layout): Likewise.
4179 (elf_i386_non_lazy_plt): Likewise.
4180 (GET_PLT_ENTRY_SIZE): Removed.
4181 (elf_i386_plt): Renamed to ...
4182 (elf_i386_lazy_plt): This.
4183 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
4184 (elf_i386_arch_bed): Updated.
4185 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
4186 (elf_i386_create_dynamic_sections): Removed.
4187 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
4188 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
4189 (elf_i386_adjust_dynamic_symbol): Updated.
4190 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
4191 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
4192 size for PLT0 if there is no PLT0.
4193 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
4194 output section is discarded only if GOT isn't empty.
4195 (elf_i386_relocate_section): Updated. Properly get PLT index
4196 if there is no PLT0.
4197 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
4198 second and third slots in the PLT entry if there is no PLT0.
4199 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
4200 if there is no PLT0. Set sh_entsize on the .plt.got section.
4201 (elf_i386_nacl_plt): Forward declaration.
4202 (elf_i386_get_plt_sym_val): Removed.
4203 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
4204 against all dynamic relocations.
4205 (elf_i386_link_setup_gnu_properties): New function.
4206 (elf_backend_create_dynamic_sections): Updated.
4207 (elf_backend_setup_gnu_properties): New.
4208 (elf_i386_nacl_plt): Updated.
4209 (elf_i386_nacl_arch_bed): Likewise.
4210 (elf_i386_vxworks_arch_bed): Likewise.
4212 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
4214 * elflink.c (elf_output_implib): Remove executable flag from import
4216 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
4217 library is a relocatable object file.
4219 2017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
4222 * elf32-avr.c (avr_should_move_sym): New function.
4223 (avr_should_reduce_sym_size): Likewise.
4224 (avr_should_increase_sym_size): Likewise.
4225 (elf32_avr_relax_delete_bytes): Adjust symbol values
4226 and sizes by calling new functions.
4228 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
4230 * config.bfd (riscv32-*): Enable rv64.
4232 2017-05-02 Alan Modra <amodra@gmail.com>
4235 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
4236 rather than h->root.type == bfd_link_hash_new.
4237 (bfd_elf_record_link_assignment): Similarly, call
4238 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
4240 2017-04-29 Alan Modra <amodra@gmail.com>
4243 * reloc.c (reloc_offset_in_range): New function.
4244 (bfd_perform_relocation, bfd_install_relocation): Use it.
4245 (_bfd_final_link_relocate): Likewise.
4247 2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
4249 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
4250 before using .plt.got.
4251 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
4253 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
4255 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
4256 instead of "+=" to update 0.
4258 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
4260 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
4261 .plt.got section here.
4262 (elf_i386_check_relocs): Don't create the .plt.got section.
4263 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
4264 the .plt.got and .plt.bnd sections here.
4265 (elf_x86_64_check_relocs): Don't create the .plt.got nor
4268 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
4270 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
4272 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
4273 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
4274 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
4275 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
4278 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
4280 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
4282 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
4283 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
4284 the first relocatable ELF input with GNU properties.
4286 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
4288 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
4289 VxWorks for non-PIC.
4291 2017-04-27 Alan Modra <amodra@gmail.com>
4293 * elf-bfd.h (struct elf_backend_data): Make asection param of
4294 elf_backend_eh_frame_address_size const.
4295 (_bfd_elf_eh_frame_address_size): Likewise.
4296 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
4297 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
4298 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
4299 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
4300 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
4301 (next_cie_fde_offset): Constify params.
4302 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
4304 2017-04-27 Alan Modra <amodra@gmail.com>
4306 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
4307 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
4308 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
4310 (offset_adjust): New function.
4311 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
4312 (adjust_eh_frame_local_symbols): Likewise.
4313 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
4314 after changing anything. Return true if anything changed.
4315 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
4316 _bfd_elf_adjust_eh_frame_global_symbol for globals.
4318 2017-04-27 Alan Modra <amodra@gmail.com>
4320 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
4323 2017-04-27 Alan Modra <amodra@gmail.com>
4325 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
4326 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
4327 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
4328 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
4329 for undef and undefweak dyn_relocs.
4330 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
4331 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
4332 (allocate_got, allocate_dynrelocs): Likewise.
4333 (ppc64_elf_relocate_section): Likewise.
4335 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
4337 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
4338 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
4339 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
4340 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
4342 2017-04-26 Nick Clifton <nickc@redhat.com>
4345 * reloc.c (bfd_perform_relocation): Check for a negative address
4348 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
4351 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
4353 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
4354 (elf_backend_always_renumber_dynsyms): Define.
4355 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
4356 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
4357 * elflink.c (bfd_elf_size_dynamic_sections): Also call
4358 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
4360 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
4362 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
4364 * elflink.c (bfd_elf_size_dynamic_sections): Only call
4365 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
4366 sections have been created.
4368 2017-04-26 Nick Clifton <nickc@redhat.com>
4371 * compress.c (bfd_init_section_compress_status): Check the return
4372 value from bfd_malloc.
4374 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
4376 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
4377 no_finish_dynamic_symbol.
4378 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
4380 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
4381 weak symbol, don't make it dynamic.
4382 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
4383 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
4384 relocation for GOT reference.
4385 (elf_x86_64_finish_dynamic_symbol): Abort if
4386 no_finish_dynamic_symbol isn't 0.
4388 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
4391 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
4392 undefined weak symbol, don't make it dynamic.
4393 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
4394 set no_finish_dynamic_symbol and generate R_386_RELATIVE
4395 relocation for R_386_GOT32.
4397 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
4400 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
4402 2017-04-23 Alan Modra <amodra@gmail.com>
4405 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
4406 * elf.c (lcomm_sym): New.
4407 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
4408 * bfd-in2.h: Regenerate.
4410 2017-04-23 Alan Modra <amodra@gmail.com>
4413 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
4414 parameters and comment.
4415 (_bfd_elf_get_reloc_section): Delete.
4416 (_bfd_elf_plt_get_reloc_section): Declare.
4417 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
4418 New functions. Don't blindly skip over assumed .rel/.rela prefix.
4420 (_bfd_elf_get_reloc_section): ..here. Delete.
4421 (assign_section_numbers): Call elf_get_reloc_section.
4422 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
4423 * elfxx-target.h (elf_backend_get_reloc_section): Update.
4425 2017-04-23 Alan Modra <amodra@gmail.com>
4428 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
4431 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
4434 * elf32-i386.c (elf_i386_link_hash_entry): Add
4435 no_finish_dynamic_symbol.
4436 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
4437 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
4438 symbol, don't make it dynamic in PIE.
4439 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
4440 set no_finish_dynamic_symbol and generate R_386_RELATIVE
4441 relocation for R_386_GOT32
4442 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
4445 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
4449 * elflink.c (elf_link_add_object_symbols): Require
4450 --no-dynamic-linker with -E/--dynamic-list when creating
4453 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
4455 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
4458 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
4460 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
4461 dynamic symbol sorting.
4463 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
4466 * elflink.c (elf_link_add_object_symbols): Preserve
4467 dynamic_ref_after_ir_def when restoring the symbol table for
4468 unneeded dynamic object.
4470 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
4473 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
4474 on on undefined IFUNC symbol in the second PLT.
4476 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
4478 * peXXigen.c (pe_print_reloc): Correct chunk_end.
4480 2017-04-19 Alan Modra <amodra@gmail.com>
4482 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
4483 or make dynamic for info->dynamic_undefined_weak 0 and 1.
4484 * elf32-ppc.c:Formatting.
4485 (ensure_undefweak_dynamic): Don't make dynamic when
4486 info->dynamic_undefined_weak is zero.
4487 (allocate_dynrelocs): Discard undefweak dyn_relocs for
4488 info->dynamic_undefined_weak. Discard undef dyn_relocs when
4489 not default visibility. Discard undef and undefweak
4491 (ppc_elf_relocate_section): Adjust to suit.
4492 * elf64-ppc.c: Formatting.
4493 (ensure_undefweak_dynamic): Don't make dynamic when
4494 info->dynamic_undefined_weak is zero.
4495 (allocate_dynrelocs): Discard undefweak dyn_relocs for
4496 info->dynamic_undefined_weak. Discard them earlier.
4498 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
4501 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
4502 before generating the version definition section.
4504 2017-04-17 Alan Modra <amodra@gmail.com>
4506 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
4507 state when a regular object file defines a symbol with
4508 incompatible type to that defined by an earlier shared lib.
4510 2017-04-13 Alan Modra <amodra@gmail.com>
4512 * coffcode.h: Wrap some overly long _bfd_error_handler args.
4514 * elf32-arm.c: Likewise.
4515 * elf32-i386.c: Likewise.
4516 * elf32-mep.c: Likewise.
4517 * elf64-ia64-vms.c: Likewise.
4518 * elf64-x86-64.c: Likewise.
4519 * elflink.c: Likewise.
4520 * elfnn-ia64.c: Likewise.
4521 * elfxx-mips.c: Likewise.
4523 2017-04-13 Alan Modra <amodra@gmail.com>
4525 * aoutx.h: Use %B and %A in error messages throughout file.
4526 * aout-cris.c: Likewise.
4527 * archive.c: Likewise.
4528 * binary.c: Likewise.
4529 * coff-rs6000.c: Likewise.
4530 * coff-tic4x.c: Likewise.
4531 * coffcode.h: Likewise.
4532 * coffgen.c: Likewise.
4533 * cofflink.c: Likewise.
4534 * coffswap.h: Likewise.
4535 * cpu-arm.c: Likewise.
4536 * elf-eh-frame.c: Likewise.
4537 * elf-m10300.c: Likewise.
4539 * elf32-arc.c: Likewise.
4540 * elf32-arm.c: Likewise.
4541 * elf32-bfin.c: Likewise.
4542 * elf32-frv.c: Likewise.
4543 * elf32-iq2000.c: Likewise.
4544 * elf32-m32c.c: Likewise.
4545 * elf32-microblaze.c: Likewise.
4546 * elf32-nds32.c: Likewise.
4547 * elf32-rl78.c: Likewise.
4548 * elf32-rx.c: Likewise.
4549 * elf32-score.c: Likewise.
4550 * elf32-score7.c: Likewise.
4551 * elf32-sh64.c: Likewise.
4552 * elf32-v850.c: Likewise.
4553 * elf32-vax.c: Likewise.
4554 * elf32-visium.c: Likewise.
4555 * elf64-ia64-vms.c: Likewise.
4556 * elf64-mmix.c: Likewise.
4557 * elf64-sh64.c: Likewise.
4558 * elfcode.h: Likewise.
4559 * elfnn-aarch64.c: Likewise.
4560 * elfnn-ia64.c: Likewise.
4561 * elfxx-mips.c: Likewise.
4562 * hpux-core.c: Likewise.
4565 * linker.c: Likewise.
4566 * merge.c: Likewise.
4568 * oasys.c: Likewise.
4569 * pdp11.c: Likewise.
4570 * peXXigen.c: Likewise.
4571 * rs6000-core.c: Likewise.
4572 * vms-alpha.c: Likewise.
4573 * xcofflink.c: Likewise.
4575 2017-04-13 Alan Modra <amodra@gmail.com>
4577 * bfd.c (PRINT_TYPE): Define.
4578 (_doprnt): New function.
4579 (error_handler_internal): Use _doprnt.
4580 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
4581 calls in their natural order, throughout file.
4582 * coff-mcore.c: Likewise.
4583 * coff-ppc.c: Likewise.
4584 * coff-tic80.c: Likewise.
4585 * cofflink.c: Likewise.
4586 * elf-s390-common.c: Likewise.
4588 * elf32-arm.c: Likewise.
4589 * elf32-i386.c: Likewise.
4590 * elf32-m32r.c: Likewise.
4591 * elf32-msp430.c: Likewise.
4592 * elf32-spu.c: Likewise.
4593 * elf64-ia64-vms.c: Likewise.
4594 * elf64-sparc.c: Likewise.
4595 * elf64-x86-64.c: Likewise.
4596 * elflink.c: Likewise.
4597 * elfnn-aarch64.c: Likewise.
4598 * elfnn-ia64.c: Likewise.
4599 * elfxx-mips.c: Likewise.
4601 2017-04-13 Alan Modra <amodra@gmail.com>
4603 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
4604 branch veneers" error. Fix double space and format message.
4605 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
4606 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
4608 2017-04-13 Alan Modra <amodra@gmail.com>
4610 * bfd-in2.h: Regenerate.
4612 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
4614 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
4615 extra `\n' in warning/error messages.
4616 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
4617 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
4619 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
4621 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
4622 processor-specific properties with generic ELF target vector.
4624 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
4626 * elf32-sparc.c (elf_backend_fixup_symbol): New.
4627 * elf64-sparc.c (elf_backend_fixup_symbol): New.
4628 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
4629 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
4631 (link_hash_newfunc): Initialize has_got_reloc and
4633 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
4635 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
4637 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
4639 (_bfd_sparc_elf_fixup_symbol): New function.
4640 (allocate_dynrelocs): Don't allocate space for dynamic
4641 relocations and discard relocations against resolved undefined
4642 weak symbols in executable. Don't make resolved undefined weak
4643 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
4644 relocation against undefined weak symbols in PIE.
4645 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
4646 relocations against resolved undefined weak symbols in PIE
4647 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
4648 without ynamic PLT/GOT relocations for resolved undefined weak
4650 Don't generate dynamic relocation against resolved undefined
4651 weak symbol in executable.
4652 (pie_finish_undefweak_symbol): New function.
4653 (_bfd_sparc_elf_finish_dynamic_sections): Call
4654 pie_finish_undefweak_symbol on all symbols in PIE.
4655 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
4656 (_bfd_sparc_elf_fixup_symbol): New function.
4658 2017-04-10 Nick Clifton <nickc@redhat.com>
4660 * config.bfd: Remove ns32k from obsolete list.
4662 2017-04-10 Alan Modra <amodra@gmail.com>
4665 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
4666 (special_sections_i): Likewise for .init_array.
4667 (special_sections_p): Likewise for .preinit_array.
4669 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
4673 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
4674 ELF_COMMON_DEF_P for common symbols.
4675 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
4676 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
4677 * elflink.c (_bfd_elf_merge_symbol): Revert commits
4678 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
4679 07492f668d2173da7a2bda3707ff0985e0f460b6.
4681 2017-04-07 Pedro Alves <palves@redhat.com>
4683 * opncls.c (bfd_get_debug_link_info): Rename to...
4684 (bfd_get_debug_link_info_1): ... this. Change type of second
4685 parameter to void pointer. Adjust.
4686 (bfd_get_debug_link_info): Reimplement on top of
4687 bfd_get_debug_link_info_1.
4688 (separate_debug_file_exists, separate_alt_debug_file_exists):
4689 Change type of second parameter to void pointer. Adjust.
4690 (get_func_type, check_func_type): Change type of second parameter
4692 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
4693 the callback functions instead of passing the address of a local.
4694 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
4695 find_separate_debug_file.
4696 (get_alt_debug_link_info_shim): Change type of second parameter to
4697 void pointer. Adjust.
4698 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
4699 find_separate_debug_file.
4700 (get_build_id_name, bfd_boolean check_build_id_file): Change type
4701 of second parameter to void pointer. Adjust.
4702 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
4703 pointer local to find_separate_debug_file.
4705 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
4707 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
4708 external symbols with a definition.
4709 (_bfd_coff_gc_mark_extra_sections): Fix typo.
4711 2017-04-07 Alan Modra <amodra@gmail.com>
4713 * po/SRC-POTFILES.in: Regenerate.
4715 2017-04-05 Alan Modra <amodra@gmail.com>
4717 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
4720 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
4722 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
4723 numbers for DataDirectory entry indicies passed to
4726 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
4728 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
4729 each GNU_MBIND section and align GNU_MBIND section to page size.
4730 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
4731 segment for each GNU_MBIND section.
4732 (_bfd_elf_init_private_section_data): Copy sh_info from input
4733 for GNU_MBIND section.
4735 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
4737 * elfnn-riscv.c (GP_NAME): Delete.
4738 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
4739 (_bfd_riscv_relax_lui): Likewise.
4741 2017-04-04 Nick Clifton <nickc@redhat.com>
4744 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
4746 (bfd_elf_final_link): Only initialize the extended symbol index
4747 section if there are extended symbol tables to list.
4749 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
4751 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
4752 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
4753 * configure.ac (elf): Add elf-properties.lo.
4754 * Makefile.in: Regenerated.
4755 * configure: Likewise.
4756 * elf-bfd.h (elf_property_kind): New.
4757 (elf_property): Likewise.
4758 (elf_property_list): Likewise.
4759 (elf_properties): Likewise.
4760 (_bfd_elf_parse_gnu_properties): Likewise.
4761 (_bfd_elf_get_property): Likewise.
4762 (_bfd_elf_link_setup_gnu_properties): Likewise.
4763 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
4764 and setup_gnu_properties.
4765 (elf_obj_tdata): Add properties.
4766 * elf-properties.c: New file.
4767 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
4768 (elf_i386_merge_gnu_properties): Likewise.
4769 (elf_backend_parse_gnu_properties): Likewise.
4770 (elf_backend_merge_gnu_properties): Likewise.
4771 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
4772 (elf_x86_64_merge_gnu_properties): Likewise.
4773 (elf_backend_parse_gnu_properties): Likewise.
4774 (elf_backend_merge_gnu_properties): Likewise.
4775 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
4776 (elf_backend_parse_gnu_properties): Likewise.
4777 (elf_backend_setup_gnu_properties): Likewise.
4778 (elfNN_bed): Add elf_backend_parse_gnu_properties,
4779 elf_backend_merge_gnu_properties and
4780 elf_backend_setup_gnu_properties.
4782 2017-03-30 Pip Cet <pipcet@gmail.com>
4784 * elf32-wasm32.c: Add relocation code, two relocs.
4785 * reloc.c: Add wasm32 relocations.
4786 * libbfd.h: Regenerate.
4787 * bfd-in2.h: Regenerate.
4788 * bfd/po/bfd.pot: Regenerate.
4790 2017-03-29 Nick Clifton <nickc@redhat.com>
4793 * coff-bfd.h (struct coff_section_data): Add new fields:
4794 saved_bias and bias.
4795 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
4796 computed for PE binaries.
4797 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
4800 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
4803 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
4804 to handle a local symbol with a hash-symbol-entry; without PLT.
4805 Add BFD_ASSERT for an incidental case with GOT entry present.
4806 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
4807 isn't forced-or-set local.
4809 2017-03-27 Pip Cet <pipcet@gmail.com>
4811 * wasm-module.c: New file to support WebAssembly modules.
4812 * wasm-module.h: New file to support WebAssembly modules.
4813 * doc/webassembly.texi: Start documenting wasm-module.c.
4814 * config.bfd: Add wasm_vec.
4815 * targets.c: Likewise.
4816 * configure.ac: Likewise.
4817 * Makefile.am: Add entries for wasm-module.c.
4818 * Makefile.in: Regenerate.
4819 * configure: Regenerate.
4820 * po/SRC-POTFILES.in: Regenerate.
4822 2017-03-27 Pip Cet <pipcet@gmail.com>
4824 * cpu-wasm32.c: New file to support wasm32 architecture.
4825 * elf32-wasm32.c: New file to support wasm32 architecture.
4826 * Makefile.am: Add wasm32 architecture.
4827 * archures.c: Likewise.
4828 * config.bfd: Likewise.
4829 * configure.ac: Likewise.
4830 * targets.c: Likewise.
4831 * Makefile.in: Regenerate.
4832 * bfd-in2.h: Regenerate.
4833 * configure: Regenerate.
4834 * po/SRC-POTFILES.in: Regenerate.
4836 2017-03-20 Alan Modra <amodra@gmail.com>
4839 * elf64-ppc.c (compare_symbols): Stabilize sort.
4841 2017-03-18 Alan Modra <amodra@gmail.com>
4843 * elf64-ppc.c (struct ppc_link_hash_table): Add
4844 local_ifunc_resolver and maybe_local_ifunc_resolver.
4845 (ppc_build_one_stub): Set flags on emitting dynamic
4846 relocation to ifunc.
4847 (ppc64_elf_relocate_section): Likewise.
4848 (ppc64_elf_finish_dynamic_symbol): Likewise.
4849 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
4850 local dynamic relocs to ifuncs.
4851 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
4852 local_ifunc_resolver and maybe_local_ifunc_resolver.
4853 (ppc_elf_relocate_section): Set flag on emitting dynamic
4854 relocation to ifuncs.
4855 (ppc_elf_finish_dynamic_symbol): Likewise.
4856 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
4857 dynamic relocs to ifuncs.
4859 2017-03-13 Nick Clifton <nickc@redhat.com>
4862 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
4863 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
4864 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
4865 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
4866 * bfd-in2.h: Regenerate.
4867 * libbfd.h: Regenerate.
4868 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
4870 (IS_AARCH64_TLSDESC_RELOC): Likewise.
4871 (elfNN_aarch64_howto_table): Likewise.
4872 (aarch64_tls_transition_without_check): Likewise.
4873 (aarch64_reloc_got_type): Likewise.
4874 (elfNN_aarch64_final_link_relocate): Likewise.
4875 (elfNN_aarch64_tls_relax): Likewise.
4876 (elfNN_aarch64_relocate_section): Likewise.
4877 (elfNN_aarch64_gc_sweep_hook): Likewise.
4878 (elfNN_aarch64_check_relocs): Likewise.
4879 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
4880 (_bfd_aarch64_elf_resolve_relocation): Likewise.
4882 2017-03-11 Alan Modra <amodra@gmail.com>
4884 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
4885 parameter is in fact used. Whitespace fixes.
4886 * elf64-ppc.c: Likewise.
4888 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
4890 * rs6000-core.c (CORE_NEW): Simplify macro when
4891 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
4893 2017-03-07 Alan Modra <amodra@gmail.com>
4897 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
4900 2017-03-05 Alan Modra <amodra@gmail.com>
4902 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
4903 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
4904 (next_cie_fde_offset): New function.
4905 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
4906 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
4907 four bytes. Align CIEs to four or eight bytes depending on
4908 per_encoding_aligned8. Align FDEs according to their encoding.
4909 Pad last FDE to output section alignment.
4910 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
4912 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
4913 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
4914 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
4916 2017-03-02 Martin Bickel <binutils@ineranves.de>
4919 * elf.c (rewrite_elf_program_header): Do not issue a warning for
4920 empty segments which have a zero filesz, but a non-zero memsz.
4922 2017-03-02 Alan Modra <amodra@gmail.com>
4924 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
4926 2017-02-28 Alan Modra <amodra@gmail.com>
4928 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
4929 (ppc64_elf_relocate_section): Likewise.
4931 2017-02-28 Alan Modra <amodra@gmail.com>
4934 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
4935 rather than elf32_nios2_hash_table or elf_hash_table.
4936 (create_got_section): Likewise.
4937 (nios2_elf32_finish_dynamic_symbol): Likewise.
4938 (nios2_elf32_adjust_dynamic_symbol): Likewise.
4939 (nios2_elf32_size_dynamic_sections): Likewise.
4940 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
4941 vars. Use htab equivalents directly instead. Don't create
4942 all dynamic sections on needing just the GOT. Use a goto
4943 rather than a fall-through with reloc test. Ensure
4944 htab->dynobj is set when making dynamic sreloc section.
4945 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
4946 equivalent directly instead. Don't segfault on looking for
4947 .dynamic when dynamic sections have not been created. Don't
4948 segfault on .got.plt being discarded.
4949 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
4950 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
4951 fixme and another not so relevant comment.
4952 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
4953 already set, set hash table dynobj on creating .sbss.
4955 2017-02-28 Alan Modra <amodra@gmail.com>
4957 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
4958 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
4959 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
4960 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
4961 (ppc64_elf_relocate_section): Likewise.
4962 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
4963 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
4964 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
4965 * libbfd.h: Regenerate.
4966 * bfd-in2.h: Regenerate.
4968 2017-02-28 Alan Modra <amodra@gmail.com>
4970 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
4971 dynamic .data.rel.ro read-only.
4972 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
4973 rather than section flags when deciding where copy reloc goes.
4974 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
4975 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
4976 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
4977 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
4978 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
4979 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
4980 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
4981 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
4982 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
4983 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
4984 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
4985 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
4986 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
4987 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
4988 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
4989 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
4990 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
4991 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
4992 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
4994 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
4996 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
4997 `jalr $0, $25' instruction encoding.
4999 2017-02-27 Nick Clifton <nickc@redhat.com>
5002 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
5003 generating a seg-fault when encountering a symbol that has been
5004 deleted by garbage collection.
5006 2017-02-25 Alan Modra <amodra@gmail.com>
5008 * elf32-arc.c (struct dynamic_sections): Delete.
5009 (enum dyn_section_types): Delete.
5010 (dyn_section_names): Delete.
5011 (arc_create_dynamic_sections): Delete.
5012 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
5013 segfault on discarded .rela.plt section.
5014 (elf_arc_size_dynamic_sections): Formatting. Don't call
5015 arc_create_dynamic_sections. Don't allocate memory for sections
5016 handled by the generic linker. Correct code finding relocs in
5017 read-only sections. Set SEC_EXCLUDE on zero size .got,
5018 .got.plt, and .dynbss sections. Do set .interp for pies.
5020 2017-02-24 Andrew Waterman <andrew@sifive.com>
5022 * elfnn-riscv.c (GP_NAME): New macro.
5023 (riscv_global_pointer_value): Use it.
5024 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
5025 output section, consider only that section's alignment.
5027 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
5029 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
5030 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
5031 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
5032 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
5034 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
5036 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
5037 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
5040 2017-02-23 Alan Modra <amodra@gmail.com>
5043 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
5045 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
5046 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
5049 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
5052 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
5053 processing ahead of the call to `elf_gc_sweep_symbol'.
5055 2017-02-22 Nick Clifton <nickc@redhat.com>
5058 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
5059 created section 4-byte alignment.
5061 2017-02-22 Alan Modra <amodra@gmail.com>
5063 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
5064 on .got or .plt output section being discarded by script.
5065 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
5068 2017-02-21 Alan Modra <amodra@gmail.com>
5070 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
5071 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
5073 2017-02-20 Alan Modra <amodra@gmail.com>
5076 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
5077 if DT_RELSZ/DT_RELASZ is zero.
5079 2017-02-17 Nick Clifton <nickc@redhat.com>
5081 * compress.c (bfd_get_full_section_contents): Remember to reduce
5082 compressed size by the sizeof the compression header when
5083 decompressing the contents.
5085 2017-02-17 Pedro Alves <palves@redhat.com>
5087 * srec.c (Chunk): Rename to ...
5088 (_bfd_srec_len): ... this.
5089 (S3Forced): Rename to ...
5090 (_bfd_srec_forceS3): ... this.
5091 * objcopy.c: Adjust all references.
5093 2017-02-17 Pedro Alves <palves@redhat.com>
5095 * archive.c (bsd_write_armap): Rename to ...
5096 (_bfd_bsd_write_armap): ... this.
5097 (coff_write_armap): Rename to ...
5098 (_bfd_coff_write_armap): ... this.
5099 * libbfd-in.h (bsd_write_armap): Rename to ...
5100 (_bfd_bsd_write_armap): ... this.
5101 (coff_write_armap): Rename to ...
5102 (_bfd_coff_write_armap): ... this.
5103 * aout-target.h, aout-tic30.c: Adjust all users.
5104 * libbfd.h: Regenerate.
5106 2017-02-17 Pedro Alves <palves@redhat.com>
5108 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
5109 (warn_deprecated): Rename to ...
5110 (_bfd_warn_deprecated): ... this.
5111 * libbfd.c (warn_deprecated): Rename to ...
5112 (_bfd_warn_deprecated): ... this.
5113 * bfd-in2.h: Regenerate.
5115 2017-02-17 Pedro Alves <palves@redhat.com>
5117 * bfdio.c (real_ftell): Rename to ...
5118 (_bfd_real_ftell): ... this.
5119 (real_fseek): Rename to ...
5120 (_bfd_real_fseek): ... this.
5121 (real_fopen): Rename to ...
5122 (_bfd_real_fopen): ... this.
5123 * libbfd-in.h (real_ftell): Rename to ...
5124 (_bfd_real_ftell): ... this.
5125 (real_fseek): Rename to ...
5126 (_bfd_real_fseek): ... this.
5127 (real_fopen): Rename to ...
5128 (_bfd_real_fopen): ... this.
5129 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
5130 * libbfd.h: Regenerate.
5132 2017-02-17 Pedro Alves <palves@redhat.com>
5134 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
5135 * libbfd.c (read_unsigned_leb128): Rename to ...
5136 (_bfd_read_unsigned_leb128): ... this.
5137 (read_signed_leb128): Rename to ...
5138 (_bfd_read_signed_leb128): ... this.
5139 (safe_read_leb128): Rename to ...
5140 (_bfd_safe_read_leb128): ... this.
5141 * libbfd-in.h (read_unsigned_leb128): Rename to ...
5142 (_bfd_read_unsigned_leb128): ... this.
5143 (read_signed_leb128): Rename to ...
5144 (_bfd_read_signed_leb128): ... this.
5145 (safe_read_leb128): Rename to ...
5146 (_bfd_safe_read_leb128): ... this.
5147 * libbfd.h: Renegerate.
5149 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
5151 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
5152 before trying to fine matching file and line information.
5154 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
5156 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
5157 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
5158 not match current bfd, then reload debug information. Record bfd
5159 we're loading debug info for in the stash. If we have debug
5160 informatin in the cache then perform section placement before
5163 2017-02-16 Alan Modra <amodra@gmail.com>
5166 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
5167 * elfxx-target.h (elf_backend_no_page_alias): Define.
5168 (elfNN_bed): Init new field.
5169 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
5170 ensure PT_LOAD segment starts on a new page.
5171 * elf32-hppa.c (elf_backend_no_page_alias): Define.
5173 2017-02-16 Alan Modra <amodra@gmail.com>
5176 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
5179 2017-02-16 Jiong Wang <jiong.wang@arm.com>
5181 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
5182 * bfd-in2.h: Regenerated.
5184 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
5187 * elf32-i386.c (elf_i386_relocate_section): Allow
5188 "lea foo@GOT, %reg" in PIC.
5190 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
5193 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
5194 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
5195 error against local IFUNC symbol without a base register for
5198 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
5200 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
5201 `%P: %H:' with `info->callbacks->einfo'.
5202 (ppc_elf_relocate_section): Likewise.
5203 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
5204 (ppc64_elf_edit_toc): Likewise.
5205 (ppc64_elf_relocate_section): Likewise.
5207 2017-02-14 Alan Modra <amodra@gmail.com>
5209 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
5210 --gc-keep-exported, and test versioned field of sym rather than
5211 looking for @ in name.
5213 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
5215 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
5218 2017-02-13 Nick Clifton <nickc@redhat.com>
5221 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
5224 2017-02-07 Andrew Waterman <andrew@sifive.com>
5226 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
5227 entry size if PLT header is written.
5229 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
5231 Fix sparc64 dynamic relocation processing to use the dynamic
5233 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
5234 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
5237 2017-02-03 Nick Clifton <nickc@redhat.com>
5240 * coffcode.h (coff_write_object_contents): Enlarge size of
5241 s_name_buf in order to avoid compile time warning about possible
5243 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
5244 32-bits of insn value before printing into buffer.
5246 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
5248 * elfxx-mips.c (mips_elf_hash_sort_data): Add
5249 `max_local_dynindx'.
5250 (mips_elf_sort_hash_table): Handle it.
5251 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
5252 symbols bump up `max_local_dynindx' rather than
5253 `max_non_got_dynindx'.
5255 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
5257 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
5258 `min_got_dynindx', `max_unref_got_dynindx' and
5259 `max_non_got_dynindx' members to the `bfd_size_type' data type.
5260 (mips_elf_sort_hash_table): Adjust accordingly.
5262 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
5264 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
5265 to access the hash table.
5267 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
5269 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
5270 non-NULL `htab' to the beginning.
5272 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
5274 * elflink.c (elf_gc_sweep): Wrap overlong line.
5276 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
5278 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
5279 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
5280 * elfxx-mips.c (mips_elf_link_hash_table): Add
5281 `ignore_branch_isa' member.
5282 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
5283 in branch relocation calculation as an error if
5284 `ignore_branch_isa' has been set.
5285 (_bfd_mips_elf_insn32): Rename to...
5286 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
5287 parameter to `insn32' and add an `ignore_branch_isa' parameter.
5288 Handle the new parameter.
5290 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
5292 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
5293 local variable dynobj.
5296 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
5297 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
5298 executable from read-only sections into sdynrelro.
5299 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
5300 dynamic relocs in sdynrelro.
5301 (elf_backend_want_dynrelro): Define.
5303 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
5305 * config.bfd (*-*-rtemsaout*): Mark as removed.
5307 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
5309 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
5310 (arm-*-rtems*): Move to (arm*-*-eabi*).
5311 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
5312 (m68-*-rtems*): Move to (m68*-*-elf*).
5314 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
5316 * config.bfd (*-*-rtemscoff*): Mark as removed.
5318 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
5321 * elflink.c (bfd_elf_record_link_assignment): Revert last
5322 change and don't ever clear `forced_local'. Set `mark'
5324 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
5326 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
5327 (bfd_elf_size_dynamic_sections): ... here.
5328 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
5329 and set `mark' instead in `__tls_get_addr_opt' processing.
5330 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
5332 2017-01-24 Alan Modra <amodra@gmail.com>
5334 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
5335 where dynamic relocs are preferable. Allow ifunc too.
5336 (ensure_undefweak_dynamic): New function.
5337 (allocate_dynrelocs): Use it here. Move plt handling last and
5338 don't make symbols dynamic, simplifying loop. Only make undef
5339 weak symbols with GOT entries dynamic. Correct condition
5340 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
5341 comments. Remove goto.
5342 (ppc_elf_relocate_section): Correct test for using dynamic
5343 symbol on GOT relocs. Rearrange test for emitting GOT relocs
5344 to suit. Set up explicit tls_index entries and implicit GOT
5345 tls_index entries resolvable at link time for
5346 __tls_get_addr_opt. Simplify test to clear mem for prelink.
5347 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
5348 (ensure_undefweak_dynamic): New function.
5349 (allocate_dynrelocs): Use it here. Only make undef weak symbols
5350 with GOT entries dynamic. Remove unnecessary test of
5351 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
5352 (ppc64_elf_relocate_section): Correct test for using dynamic
5353 symbol on GOT relocs. Rearrange test for emitting GOT relocs
5354 to suit. Set up explicit tls_index entries and implicit GOT
5355 tls_index entries resolvable at link time for __tls_get_addr_opt.
5356 Simplify expression to clear mem for prelink.
5358 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
5360 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
5362 2017-01-20 Jiong Wang <jiong.wang@arm.com>
5364 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
5365 (elf_backend_hash_symbol): Define.
5367 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
5370 * elflink.c (bfd_elf_record_link_assignment): Clear any
5371 `forced_local' marking for DSO symbols that are not being
5374 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
5376 * elfnn-riscv.c (riscv_elf_object_p): New function.
5378 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
5381 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
5383 (elf_x86_64_check_relocs): Create .eh_frame section for the
5385 (elf_x86_64_size_dynamic_sections): Allocate and initialize
5386 .eh_frame section for the .plt.bnd section.
5387 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
5388 for the .plt.bnd section.
5390 2017-01-12 Nick Clifton <nickc@redhat.com>
5393 * opncls.c (find_separate_debug_file): Add include_dirs
5394 parameter. Only include the directory part of the bfd's filename
5395 in search paths if include_dirs is true. Add a couple of extra
5396 locations for looking for debug files.
5397 ( bfd_follow_gnu_debuglink): Update invocation of
5398 find_separate_debug_file.
5399 (bfd_follow_gnu_debugaltlink): Likewise.
5400 (get_build_id): New function: Finds the build-id of the given bfd.
5401 (get_build_id_name): New function: Computes the name of the
5402 separate debug info file for a bfd, based upon its build-id.
5403 (check_build_id_file): New function: Checks to see if a separate
5404 debug info file exists at the given location, and that its
5405 build-id matches that of the original bfd.
5406 (bfd_follow_build_id_debuglink): New function: Finds a separate
5407 debug info file for a given bfd by using the build-id method.
5408 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
5409 method of locating a separate debug info file before using the
5411 * bfd-in2.h: Regenerate.
5413 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
5416 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
5417 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
5418 elf_x86_64_eh_frame_plt_got.
5419 (elf_x86_64_size_dynamic_sections): Get unwind info from
5420 elf_x86_64_bnd_arch_bed for the BND PLT.
5422 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
5424 * config.bfd: Add entries for i686-redox and x86_64-redox.
5426 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
5428 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
5430 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
5431 .eh_frame section to 4 bytes for x32.
5432 (elf_x86_64_check_relocs): Likewise.
5434 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
5437 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
5438 (PLT_GOT_FDE_LENGTH): Likewise.
5439 (elf_i386_plt_layout): Add eh_frame_plt_got and
5440 eh_frame_plt_got_size.
5441 (elf_i386_plt): Updated.
5442 (elf_i386_link_hash_table): Add plt_got_eh_frame.
5443 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
5444 (elf_i386_size_dynamic_sections): Allocate and initialize
5445 .eh_frame section for .plt.got.
5446 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
5448 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
5449 eh_frame_plt_got_size.
5450 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
5451 (PLT_GOT_FDE_LENGTH): Likewise.
5452 (elf_x86_64_backend_data): Add eh_frame_plt_got and
5453 eh_frame_plt_got_size.
5454 (elf_x86_64_arch_bed): Updated.
5455 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
5456 eh_frame_plt_got_size.
5457 (elf_x86_64_nacl_arch_bed): Likewise.
5458 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
5459 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
5460 (elf_x86_64_size_dynamic_sections): Allocate and initialize
5461 .eh_frame section for .plt.got.
5462 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
5465 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
5467 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
5468 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
5470 2017-01-09 Nick Clifton <nickc@redhat.com>
5472 * dwarf2.c (lookup_address_in_function_table): Return early if
5473 there are no functions in the given comp unit, or if the high
5474 address of the last function in the comp unit is less than the
5477 2017-01-09 Nick Clifton <nickc@redhat.com>
5480 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
5481 message if there are too many symbols to load.
5483 2017-01-04 James Clarke <jrtc27@jrtc27.com>
5485 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
5486 if relocs are cached.
5488 2017-01-03 Rich Felker <bugdal@aerifal.cx>
5491 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
5492 for R_MICROBLAZE_GOTOFF_64.
5494 2017-01-03 Nick Clifton <nickc@redhat.com>
5496 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
5497 warning about using a possibly uninitialised variable.
5499 2017-01-02 Alan Modra <amodra@gmail.com>
5501 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
5502 (allocate_plt_static, allocate_dynrelocs): Use it.
5504 2017-01-02 Alan Modra <amodra@gmail.com>
5506 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
5507 .PARISC.unwind section.
5509 2017-01-02 Alan Modra <amodra@gmail.com>
5512 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
5513 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
5514 indirect to GOT pointer relative code edit.
5516 2017-01-02 Alan Modra <amodra@gmail.com>
5518 Update year range in copyright notice of all files.
5520 For older changes see ChangeLog-2016
5522 Copyright (C) 2017 Free Software Foundation, Inc.
5524 Copying and distribution of this file, with or without modification,
5525 are permitted in any medium without royalty provided the copyright
5526 notice and this notice are preserved.
5532 version-control: never