1 2018-02-19 Alan Modra <amodra@gmail.com>
3 * elf-attrs.c (_bfd_elf_parse_attributes): Correct _bfd_error_handler
5 * elfxx-mips.c (_bfd_mips_elf_final_link): Likewise.
6 * elfnn-riscv.c (_bfd_riscv_relax_align): Likewise.
7 (_bfd_riscv_relax_pc): Likewise and fix typos.
8 * libbfd-in.h (_bfd_error_handler): Add attribute printf.
9 * libbfd.h: Regenerate.
11 2018-02-19 Alan Modra <amodra@gmail.com>
13 * dwarf2.c (read_section): Don't use 'll' format modifier.
14 (find_abstract_instance): Likewise.
15 * elfcore.h (elf_core_file_p): Likewise.
17 2018-02-19 Alan Modra <amodra@gmail.com>
19 * bfd-in.h: Include inttypes.h or if not available define
20 PRId64, PRIu64 and PRIx64.
21 * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Remove support for L
22 modifier to print bfd_vma.
23 * coff-arm.c, * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c,
24 * coff-sh.c, * coff-tic80.c, * coffcode.h, * coffgen.c, * cofflink.c,
25 * compress.c, * dwarf2.c, * elf-m10300.c, * elf.c, * elf32-arc.c,
26 * elf32-arm.c, * elf32-bfin.c, * elf32-cris.c, * elf32-hppa.c,
27 * elf32-i386.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32r.c,
28 * elf32-m68k.c, * elf32-metag.c, * elf32-nds32.c, * elf32-nios2.c,
29 * elf32-ppc.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c,
30 * elf32-score7.c, * elf32-sh.c, * elf32-sh64.c, * elf32-spu.c,
31 * elf32-tic6x.c, * elf32-tilepro.c, * elf32-v850.c, * elf32-vax.c,
32 * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c,
33 * elf64-mmix.c, * elf64-s390.c, * elf64-sh64.c, * elf64-x86-64.c,
34 * elfcode.h, * elfcore.h, * elflink.c, * elfnn-aarch64.c,
35 * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-mips.c, * elfxx-sparc.c,
36 * elfxx-tilegx.c, * ieee.c, * ihex.c, * mach-o.c, * merge.c, * mmo.c,
37 * peXXigen.c, * xcofflink.c: Replace use of Lx modifier with PRIx64,
38 and cast input to uint64_t, and similarly for Ld and Lu.
39 * bfd-in2.h: Regenerate.
41 2018-02-19 Alan Modra <amodra@gmail.com>
43 * elf32-arm.c, * elf32-hppa.c, * elf32-lm32.c, * elf32-m32r.c,
44 * elf32-metag.c, * elf32-nds32.c, * elf32-or1k.c, * elf32-ppc.c,
45 * elf32-s390.c, * elf32-sh.c, * elf32-tic6x.c, * elf32-tilepro.c,
46 * elf64-ppc.c, * elf64-s390.c, * elflink.c, * elfnn-aarch64.c,
47 * elfnn-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c,
48 * reloc.c: Replace use of %R and %T in format strings passed to
49 einfo and friends by %pR and %pT.
51 2018-02-19 Alan Modra <amodra@gmail.com>
53 * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Handle %pA and %pB in place
55 * aout-adobe.c: Update all messages using %A and %B.
56 * aout-cris.c: Likewise.
58 * archive.c: Likewise.
61 * coff-alpha.c: Likewise.
62 * coff-arm.c: Likewise.
63 * coff-i860.c: Likewise.
64 * coff-mcore.c: Likewise.
65 * coff-ppc.c: Likewise.
66 * coff-rs6000.c: Likewise.
67 * coff-sh.c: Likewise.
68 * coff-tic4x.c: Likewise.
69 * coff-tic54x.c: Likewise.
70 * coff-tic80.c: Likewise.
71 * coff64-rs6000.c: Likewise.
72 * coffcode.h: Likewise.
73 * coffgen.c: Likewise.
74 * cofflink.c: Likewise.
75 * coffswap.h: Likewise.
76 * compress.c: Likewise.
77 * cpu-arm.c: Likewise.
79 * elf-attrs.c: Likewise.
80 * elf-eh-frame.c: Likewise.
81 * elf-ifunc.c: Likewise.
82 * elf-m10300.c: Likewise.
83 * elf-properties.c: Likewise.
84 * elf-s390-common.c: Likewise.
86 * elf32-arc.c: Likewise.
87 * elf32-arm.c: Likewise.
88 * elf32-avr.c: Likewise.
89 * elf32-bfin.c: Likewise.
90 * elf32-cr16.c: Likewise.
91 * elf32-cr16c.c: Likewise.
92 * elf32-cris.c: Likewise.
93 * elf32-crx.c: Likewise.
94 * elf32-d10v.c: Likewise.
95 * elf32-d30v.c: Likewise.
96 * elf32-epiphany.c: Likewise.
97 * elf32-fr30.c: Likewise.
98 * elf32-frv.c: Likewise.
99 * elf32-gen.c: Likewise.
100 * elf32-hppa.c: Likewise.
101 * elf32-i370.c: Likewise.
102 * elf32-i386.c: Likewise.
103 * elf32-i960.c: Likewise.
104 * elf32-ip2k.c: Likewise.
105 * elf32-iq2000.c: Likewise.
106 * elf32-lm32.c: Likewise.
107 * elf32-m32c.c: Likewise.
108 * elf32-m32r.c: Likewise.
109 * elf32-m68hc11.c: Likewise.
110 * elf32-m68hc12.c: Likewise.
111 * elf32-m68hc1x.c: Likewise.
112 * elf32-m68k.c: Likewise.
113 * elf32-mcore.c: Likewise.
114 * elf32-mep.c: Likewise.
115 * elf32-metag.c: Likewise.
116 * elf32-microblaze.c: Likewise.
117 * elf32-moxie.c: Likewise.
118 * elf32-msp430.c: Likewise.
119 * elf32-mt.c: Likewise.
120 * elf32-nds32.c: Likewise.
121 * elf32-nios2.c: Likewise.
122 * elf32-or1k.c: Likewise.
123 * elf32-pj.c: Likewise.
124 * elf32-ppc.c: Likewise.
125 * elf32-rl78.c: Likewise.
126 * elf32-rx.c: Likewise.
127 * elf32-s390.c: Likewise.
128 * elf32-score.c: Likewise.
129 * elf32-score7.c: Likewise.
130 * elf32-sh-symbian.c: Likewise.
131 * elf32-sh.c: Likewise.
132 * elf32-sh64.c: Likewise.
133 * elf32-sparc.c: Likewise.
134 * elf32-spu.c: Likewise.
135 * elf32-tic6x.c: Likewise.
136 * elf32-tilepro.c: Likewise.
137 * elf32-v850.c: Likewise.
138 * elf32-vax.c: Likewise.
139 * elf32-visium.c: Likewise.
140 * elf32-wasm32.c: Likewise.
141 * elf32-xgate.c: Likewise.
142 * elf32-xtensa.c: Likewise.
143 * elf64-alpha.c: Likewise.
144 * elf64-gen.c: Likewise.
145 * elf64-hppa.c: Likewise.
146 * elf64-ia64-vms.c: Likewise.
147 * elf64-mmix.c: Likewise.
148 * elf64-ppc.c: Likewise.
149 * elf64-s390.c: Likewise.
150 * elf64-sh64.c: Likewise.
151 * elf64-sparc.c: Likewise.
152 * elf64-x86-64.c: Likewise.
153 * elfcode.h: Likewise.
154 * elfcore.h: Likewise.
155 * elflink.c: Likewise.
156 * elfnn-aarch64.c: Likewise.
157 * elfnn-ia64.c: Likewise.
158 * elfnn-riscv.c: Likewise.
159 * elfxx-mips.c: Likewise.
160 * elfxx-sparc.c: Likewise.
161 * elfxx-tilegx.c: Likewise.
162 * elfxx-x86.c: Likewise.
163 * hpux-core.c: Likewise.
166 * libbfd.c: Likewise.
167 * linker.c: Likewise.
168 * mach-o.c: Likewise.
173 * pe-mips.c: Likewise.
174 * peXXigen.c: Likewise.
175 * peicode.h: Likewise.
177 * rs6000-core.c: Likewise.
180 * vms-alpha.c: Likewise.
181 * xcofflink.c: Likewise.
183 2018-02-19 Alan Modra <amodra@gmail.com>
186 * elf.c (IS_TBSS): Define.
187 (_bfd_elf_map_sections_to_segments): Use IS_TBSS.
188 (assign_file_positions_for_non_load_sections): Revert last change.
189 Properly calculate load segment limits to compare against relro limits.
191 2018-02-17 Alan Modra <amodra@gmail.com>
194 * elf.c (assign_file_positions_for_non_load_sections): Ignore
195 degenerate zero size PT_LOAD segments when finding one overlapping
196 the PT_GNU_RELRO segment.
198 2018-02-16 Alan Modra <amodra@gmail.com>
200 * libbfd.c (_bfd_bool_bfd_false_error): Rename from bfd_false.
201 (_bfd_bool_bfd_true): Rename from bfd_true.
202 (_bfd_ptr_bfd_null_error): Rename from bfd_nullvoidptr.
203 (_bfd_int_bfd_0): Rename from bfd_0.
204 (_bfd_uint_bfd_0): Rename from bfd_0u.
205 (_bfd_long_bfd_0): Rename from bfd_0l.
206 (_bfd_long_bfd_n1_error): Rename from _bfd_n1.
207 (_bfd_void_bfd): Rename from bfd_void.
208 (_bfd_bool_bfd_false, _bfd_bool_bfd_asymbol_false),
209 (_bfd_bool_bfd_link_false_error),
210 (_bfd_bool_bfd_link_true, _bfd_bool_bfd_bfd_true),
211 (_bfd_bool_bfd_uint_true, _bfd_bool_bfd_ptr_true),
212 (_bfd_bool_bfd_asection_bfd_asection_true),
213 (_bfd_bool_bfd_asymbol_bfd_asymbol_true),
214 (_bfd_void_bfd_link, _bfd_void_bfd_asection): New functions.
215 * archive.c (_bfd_noarchive_get_elt_at_index),
216 (_bfd_noarchive_openr_next_archived_file),
217 (_bfd_noarchive_construct_extended_name_table),
218 (_bfd_noarchive_write_ar_hdr, _bfd_noarchive_truncate_arname),
219 (_bfd_noarchive_write_armap): New functions.
220 * archures.c (_bfd_nowrite_set_arch_mach): New function.
221 * coff-alpha.c (alpha_ecoff_swap_coff_aux_in),
222 (alpha_ecoff_swap_coff_sym_in, alpha_ecoff_swap_coff_lineno_in),
223 (alpha_ecoff_swap_coff_aux_out, alpha_ecoff_swap_coff_sym_out),
224 (alpha_ecoff_swap_coff_lineno_out),
225 (alpha_ecoff_swap_coff_reloc_out): New functions.
226 * coff-mips.c (mips_ecoff_swap_coff_aux_in),
227 (mips_ecoff_swap_coff_sym_in, mips_ecoff_swap_coff_lineno_in),
228 (mips_ecoff_swap_coff_aux_out, mips_ecoff_swap_coff_sym_out),
229 (mips_ecoff_swap_coff_lineno_out),
230 (mips_ecoff_swap_coff_reloc_out): New functions.
231 * coffcode.h (coff_set_alignment_hook): Replace define with
233 (symname_in_debug_hook): Likewise.
234 * ecoff.c (_bfd_ecoff_set_alignment_hook): New function.
235 * elfxx-target.h (elf_backend_allow_non_load_phdr): Default to 0.
236 * elf.c (assign_file_positions_except_relocs): Test
237 elf_backend_allow_non_load_phdr for NULL.
238 * elflink.c (_bfd_elf_omit_section_dynsym_default): Rename from
239 _bfd_elf_link_omit_section_dynsym. Update uses.
240 (_bfd_elf_omit_section_dynsym_all): New function.
241 * elf-bfd.h (_bfd_elf_link_omit_section_dynsym): Delete.
242 (_bfd_elf_omit_section_dynsym_default): Declare.
243 (_bfd_elf_omit_section_dynsym_all): Declare.
244 * linker.c (_bfd_nolink_sizeof_headers, _bfd_nolink_bfd_relax_section),
245 (_bfd_nolink_bfd_get_relocated_section_contents),
246 (_bfd_nolink_bfd_lookup_section_flags),
247 (_bfd_nolink_bfd_is_group_section, _bfd_nolink_bfd_discard_group),
248 (_bfd_nolink_bfd_link_hash_table_create),
249 (_bfd_nolink_bfd_link_just_syms),
250 (_bfd_nolink_bfd_copy_link_hash_symbol_type),
251 (_bfd_nolink_bfd_link_split_section),
252 (_bfd_nolink_section_already_linked),
253 (_bfd_nolink_bfd_define_common_symbol),
254 (_bfd_nolink_bfd_define_start_stop): New functions.
255 * reloc.c (_bfd_norelocs_bfd_reloc_type_lookup),
256 (_bfd_norelocs_bfd_reloc_name_lookup),
257 (_bfd_nodynamic_canonicalize_dynamic_reloc): New functions.
258 * section.c (_bfd_nowrite_set_section_contents): New function.
259 * syms.c (_bfd_nosymbols_canonicalize_symtab),
260 (_bfd_nosymbols_print_symbol, _bfd_nosymbols_get_symbol_info),
261 (_bfd_nosymbols_get_symbol_version_string),
262 (_bfd_nosymbols_bfd_is_local_label_name),
263 (_bfd_nosymbols_get_lineno, _bfd_nosymbols_find_nearest_line),
264 (_bfd_nosymbols_find_line, _bfd_nosymbols_find_inliner_info),
265 (_bfd_nosymbols_bfd_make_debug_symbol),
266 ( _bfd_nosymbols_read_minisymbols),
267 ( _bfd_nosymbols_minisymbol_to_symbol),
268 (_bfd_nodynamic_get_synthetic_symtab): New functions.
269 * libbfd-in.h: Declare new functions. Update existing defines,
271 * aix386-core.c: Update to use new hooks. Formatting.
272 * aout-adobe.c: Likewise.
273 * aout-arm.c: Likewise.
274 * aout-target.h: Likewise.
275 * aout-tic30.c: Likewise.
276 * aoutf1.h: Likewise.
277 * binary.c: Likewise.
279 * cisco-core.c: Likewise.
280 * coff-alpha.c: Likewise.
281 * coff-i386.c: Likewise.
282 * coff-i860.c: Likewise.
283 * coff-i960.c: Likewise.
284 * coff-ia64.c: Likewise.
285 * coff-mips.c: Likewise.
286 * coff-ppc.c: Likewise.
287 * coff-rs6000.c: Likewise.
288 * coff-sh.c: Likewise.
289 * coff-tic30.c: Likewise.
290 * coff-tic54x.c: Likewise.
291 * coff-x86_64.c: Likewise.
292 * coff64-rs6000.c: Likewise.
293 * coffcode.h: Likewise.
294 * elf-m10300.c: Likewise.
295 * elf32-cr16.c: Likewise.
296 * elf32-lm32.c: Likewise.
297 * elf32-m32r.c: Likewise.
298 * elf32-metag.c: Likewise.
299 * elf32-score.c: Likewise.
300 * elf32-score7.c: Likewise.
301 * elf32-tilepro.c: Likewise.
302 * elf32-xstormy16.c: Likewise.
303 * elf32-xtensa.c: Likewise.
304 * elf64-alpha.c: Likewise.
305 * elf64-hppa.c: Likewise.
306 * elf64-ia64-vms.c: Likewise.
307 * elf64-mmix.c: Likewise.
308 * elf64-sh64.c: Likewise.
309 * elfnn-ia64.c: Likewise.
310 * elfxx-sparc.c: Likewise.
311 * elfxx-target.h: Likewise.
312 * elfxx-tilegx.c: Likewise.
313 * elfxx-x86.h: Likewise.
314 * hp300hpux.c: Likewise.
315 * hppabsd-core.c: Likewise.
316 * hpux-core.c: Likewise.
317 * i386msdos.c: Likewise.
318 * i386os9k.c: Likewise.
321 * irix-core.c: Likewise.
322 * libaout.h: Likewise.
323 * libecoff.h: Likewise.
324 * mach-o-target.c: Likewise.
325 * mach-o.c: Likewise.
326 * mipsbsd.c: Likewise.
328 * netbsd-core.c: Likewise.
329 * nlm-target.h: Likewise.
331 * osf-core.c: Likewise.
333 * pe-mips.c: Likewise.
334 * pe-x86_64.c: Likewise.
336 * plugin.c: Likewise.
337 * ppcboot.c: Likewise.
338 * ptrace-core.c: Likewise.
339 * sco5-core.c: Likewise.
341 * sparclynx.c: Likewise.
343 * tekhex.c: Likewise.
344 * trad-core.c: Likewise.
345 * verilog.c: Likewise.
346 * versados.c: Likewise.
347 * vms-alpha.c: Likewise.
348 * vms-lib.c: Likewise.
349 * wasm-module.c: Likewise.
351 * libbfd.h: Regenerate.
353 2018-02-15 Jim Wilson <jimw@sifive.com>
355 * elfnn-riscv.c (_bfd_riscv_relax_section): Ifdef out check to ignore
356 symbols whose section address is zero.
358 * elfnn-riscv.c (riscv_elf_relocate_section): Use bfd_reloc_dangerous
359 when pcrel_lo reloc has an addend. Use reloc_dangerous callback for
360 bfd_reloc_dangerous. Use einfo instead of warning callback for errors.
361 Add %X%P to error messages.
363 2018-02-15 Eric Botcazou <ebotcazou@adacore.com>
366 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
367 Pass FALSE instead of TRUE as 'create' argument to bfd_link_hash_lookup
368 and assert that the result of the call is not NULL.
370 2018-02-14 Nick Clifton <nickc@redhat.com>
373 Revert previous delta. Add extra casts to avoid compile time
375 * libbfd-in.h (_bfd_generic_bfd_copy_private_bfd_data): Add extra
376 cast to avoid warning from gcc v8 compiler.
377 (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
378 (_bfd_generic_bfd_set_private_flags): Likewise.
379 (_bfd_generic_bfd_copy_private_section_data): Likewise.
380 (_bfd_generic_bfd_copy_private_symbol_data): Likewise.
381 (_bfd_generic_bfd_copy_private_header_data): Likewise.
382 (_bfd_generic_bfd_print_private_bfd_data): Likewise.
383 (_bfd_noarchive_construct_extended_name_table): Likewise.
384 (_bfd_noarchive_truncate_arname): Likewise.
385 (_bfd_noarchive_write_ar_hdr): Likewise.
386 (_bfd_noarchive_get_elt_at_index): Likewise.
387 (_bfd_nosymbols_canonicalize_symtab): Likewise.
388 (_bfd_nosymbols_print_symbol): Likewise.
389 (_bfd_nosymbols_get_symbol_info): Likewise.
390 (_bfd_nosymbols_get_symbol_version_string): Likewise.
391 (_bfd_nosymbols_bfd_is_local_label_name): Likewise.
392 (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise.
393 (_bfd_nosymbols_get_lineno): Likewise.
394 (_bfd_nosymbols_find_nearest_line): Likewise.
395 (_bfd_nosymbols_find_line): Likewise.
396 (_bfd_nosymbols_find_inliner_info): Likewise.
397 (_bfd_nosymbols_bfd_make_debug_symbol): Likewise.
398 (_bfd_nosymbols_read_minisymbols): Likewise.
399 (_bfd_nosymbols_minisymbol_to_symbol): Likewise.
400 (_bfd_norelocs_bfd_reloc_type_lookup): Likewise.
401 (_bfd_norelocs_bfd_reloc_name_lookup): Likewise.
402 (_bfd_nowrite_set_arch_mach): Likewise.
403 (_bfd_nowrite_set_section_contents): Likewise.
404 (_bfd_nolink_sizeof_headers): Likewise.
405 (_bfd_nolink_bfd_get_relocated_section_contents): Likewise.
406 (_bfd_nolink_bfd_relax_section): Likewise.
407 (_bfd_nolink_bfd_gc_sections): Likewise.
408 (_bfd_nolink_bfd_lookup_section_flags): Likewise.
409 (_bfd_nolink_bfd_merge_sections): Likewise.
410 (_bfd_nolink_bfd_is_group_section): Likewise.
411 (_bfd_nolink_bfd_discard_group): Likewise.
412 (_bfd_nolink_bfd_link_hash_table_create): Likewise.
413 (_bfd_nolink_bfd_link_add_symbols): Likewise.
414 (_bfd_nolink_bfd_link_just_syms): Likewise.
415 (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise.
416 (_bfd_nolink_bfd_final_link): Likewise.
417 (_bfd_nolink_bfd_link_split_section): Likewise.
418 (_bfd_nolink_section_already_linked): Likewise.
419 (_bfd_nolink_bfd_define_common_symbol): Likewise.
420 (_bfd_nolink_bfd_define_start_stop): Likewise.
421 (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise.
422 (_bfd_nodynamic_get_synthetic_symtab): Likewise.
423 (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise.
424 (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise.
425 * libbfd.c (bfd_false_any): Delete.
426 (bfd_true_any, bfd_nullvoidptr_any, bfd_0_any): Delete.
427 (bfd_0u_any, bfd_0l_any, _bfd_n1_any, bfd_void_any): Delete.
428 * libbfd.h (extern): Regenerate
429 * aout-target.h (MY_bfd_is_target_special_symbol): Add extra
430 cast to avoid warning from gcc v8 compiler.
431 * aout-tic30.c (tic30_aout_set_arch_mach): Likewise.
432 * binary.c (binary_get_symbol_info): Likewise.
433 * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
434 * coff-mips.c (mips_ecoff_backend_data): Likewise.
435 * coffcode.h (coff_set_alignment_hook): Likewise.
436 (symname_in_debug_hook): Likewise.
437 (bfd_coff_backend_data bigobj_swap_table): Likewise.
438 * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise.
439 * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise.
440 * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise.
441 * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise.
442 * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise.
443 * elf32-score.c (elf_backend_omit_section_dynsym): Likewise.
444 * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise.
445 * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise.
446 * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise.
447 * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise.
448 * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise.
449 * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise.
450 * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise.
451 * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise.
452 * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise.
453 * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise.
454 (bfd_elfNN_bfd_make_debug_symbol): Likewise.
455 (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
456 (bfd_elfNN_bfd_set_private_flags): Likewise.
457 (bfd_elfNN_bfd_is_target_special_symbol): Likewise.
458 (elf_backend_init_index_section): Likewise.
459 (elf_backend_allow_non_load_phdr): Likewise.
460 * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise.
461 * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise.
462 * ieee.c (ieee_construct_extended_name_table): Likewise.
463 (ieee_write_armap): Likewise.
464 (ieee_write_ar_hdr): Likewise.
465 (ieee_bfd_is_target_special_symbol): Likewise.
466 * ihex.c (ihex_canonicalize_symtab): Likewise.
467 (ihex_bfd_is_target_special_symbol): Likewise.
468 * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise.
469 * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise.
470 (_bfd_ecoff_set_alignment_hook): Likewise.
471 * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise.
472 * mmo.c (mmo_bfd_is_target_special_symbol): Likewise.
473 * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise.
474 * oasys.c (oasys_construct_extended_name_table): Likewise.
475 (oasys_write_armap): Likewise.
476 (oasys_write_ar_hdr): Likewise.
477 (oasys_bfd_is_target_special_symbol): Likewise.
478 * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise.
479 * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise.
480 * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise.
481 * som.c (som_bfd_is_target_special_symbol): Likewise.
482 * srec.c (srec_bfd_is_target_special_symbol): Likewise.
483 * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise.
484 * verilog.c (verilog_bfd_is_target_special_symbol): Likewise.
485 * versados.c (versados_bfd_is_target_special_symbol): Likewise.
486 (versados_bfd_reloc_name_lookup): Likewise.
487 * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise.
488 (vms_bfd_define_start_stop): Likewise.
489 (alpha_vms_bfd_is_target_special_symbol): Likewise.
490 * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise.
491 * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise.
493 2018-02-14 H.J. Lu <hongjiu.lu@intel.com>
496 * elf32-i386.c (elf_i386_check_relocs): Pass FALSE for non
497 PC-relative PLT to NEED_DYNAMIC_RELOCATION_P.
498 * elf64-x86-64.c (elf_x86_64_check_relocs): Create PLT for
499 R_X86_64_PC32 reloc against dynamic function in data section.
500 Pass TRUE for PC-relative PLT to NEED_DYNAMIC_RELOCATION_P.
501 (elf_x86_64_relocate_section): Use PLT for R_X86_64_PC32 reloc
502 against dynamic function in data section.
503 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Use PLT in PIE as
504 function address only if pcrel_plt is true.
505 (_bfd_x86_elf_link_hash_table_create): Set pcrel_plt.
506 * elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): Add PCREL_PLT for
507 PC-relative PLT. If PLT is PC-relative, don't generate dynamic
508 PC-relative relocation against a function definition in data
509 secton in PIE. Remove the obsolete comments.
510 (elf_x86_link_hash_table): Add pcrel_plt.
512 2018-02-13 H.J. Lu <hongjiu.lu@intel.com>
514 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Check bfd_link_dll,
515 instead of bfd_link_pic, for building shared library.
517 2018-02-13 H.J. Lu <hongjiu.lu@intel.com>
520 * elf64-x86-64.c (is_32bit_relative_branch): Removed.
521 (elf_x86_64_relocate_section): Check PIC relocations in PIE.
522 Remove is_32bit_relative_branch usage. Disallow PC32 reloc
523 against protected function in shared object.
525 2018-02-13 Sergei Trofimovich <slyfox@inbox.ru>
528 * po/ru.po: Fix typo in Russian translation.
530 2018-02-13 Maciej W. Rozycki <macro@mips.com>
532 * wasm-module.c (wasm_scan_name_function_section): Rename
533 `index' local variable to `idx'.
535 2018-02-13 Nick Clifton <nickc@redhat.com>
538 Fix compile time warnings generated by gcc version 8.
539 * libbfd-in.h: Remove extraneous text from prototypes.
540 Add prototypes for bfd_false_any, bfd_true_any,
541 bfd_nullvoidptr_any, bfd_0_any, bfd_0u_any, bfd_0l_any,
542 bfd_n1_any, bfd_void_any.
543 (_bfd_generic_bfd_copy_private_bfd_data): Use vararg based dummy
545 (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
546 (_bfd_generic_bfd_set_private_flags): Likewise.
547 (_bfd_generic_bfd_copy_private_section_data): Likewise.
548 (_bfd_generic_bfd_copy_private_symbol_data): Likewise.
549 (_bfd_generic_bfd_copy_private_header_data): Likewise.
550 (_bfd_generic_bfd_print_private_bfd_data): Likewise.
551 (_bfd_noarchive_construct_extended_name_table): Likewise.
552 (_bfd_noarchive_truncate_arname): Likewise.
553 (_bfd_noarchive_write_ar_hdr): Likewise.
554 (_bfd_noarchive_get_elt_at_index): Likewise.
555 (_bfd_nosymbols_canonicalize_symtab): Likewise.
556 (_bfd_nosymbols_print_symbol): Likewise.
557 (_bfd_nosymbols_get_symbol_info): Likewise.
558 (_bfd_nosymbols_get_symbol_version_string): Likewise.
559 (_bfd_nosymbols_bfd_is_local_label_name): Likewise.
560 (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise.
561 (_bfd_nosymbols_get_lineno): Likewise.
562 (_bfd_nosymbols_find_nearest_line): Likewise.
563 (_bfd_nosymbols_find_line): Likewise.
564 (_bfd_nosymbols_find_inliner_info): Likewise.
565 (_bfd_nosymbols_bfd_make_debug_symbol): Likewise.
566 (_bfd_nosymbols_read_minisymbols): Likewise.
567 (_bfd_nosymbols_minisymbol_to_symbol): Likewise.
568 (_bfd_norelocs_bfd_reloc_type_lookup): Likewise.
569 (_bfd_norelocs_bfd_reloc_name_lookup): Likewise.
570 (_bfd_nowrite_set_arch_mach): Likewise.
571 (_bfd_nowrite_set_section_contents): Likewise.
572 (_bfd_nolink_sizeof_headers): Likewise.
573 (_bfd_nolink_bfd_get_relocated_section_contents): Likewise.
574 (_bfd_nolink_bfd_relax_section): Likewise.
575 (_bfd_nolink_bfd_gc_sections): Likewise.
576 (_bfd_nolink_bfd_lookup_section_flags): Likewise.
577 (_bfd_nolink_bfd_merge_sections): Likewise.
578 (_bfd_nolink_bfd_is_group_section): Likewise.
579 (_bfd_nolink_bfd_discard_group): Likewise.
580 (_bfd_nolink_bfd_link_hash_table_create): Likewise.
581 (_bfd_nolink_bfd_link_add_symbols): Likewise.
582 (_bfd_nolink_bfd_link_just_syms): Likewise.
583 (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise.
584 (_bfd_nolink_bfd_final_link): Likewise.
585 (_bfd_nolink_bfd_link_split_section): Likewise.
586 (_bfd_nolink_section_already_linked): Likewise.
587 (_bfd_nolink_bfd_define_common_symbol): Likewise.
588 (_bfd_nolink_bfd_define_start_stop): Likewise.
589 (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise.
590 (_bfd_nodynamic_get_synthetic_symtab): Likewise.
591 (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise.
592 (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise.
593 * libbfd.c (bfd_false_any): New function. Like bfd_false but
594 accepts one or more arguments.
595 (bfd_true_any): Likewise.
596 (bfd_nullvoidptr_any): Likewise.
597 (bfd_0_any): Likewise.
598 (bfd_0u_any): Likewise.
599 (bfd_0l_any): Likewise.
600 (_bfd_n1_any): Likewise.
601 (bfd_void_any): Likewise.
602 * libbfd.h (extern): Regenerate
603 * aout-target.h (MY_bfd_is_target_special_symbol): Use vararg
604 based dummy function.
605 * aout-tic30.c (tic30_aout_set_arch_mach): Likewise.
606 * binary.c (binary_get_symbol_info): Likewise.
607 * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
608 * coff-mips.c (mips_ecoff_backend_data): Likewise.
609 * coffcode.h (coff_set_alignment_hook): Likewise.
610 (symname_in_debug_hook): Likewise.
611 (bfd_coff_backend_data bigobj_swap_table): Likewise.
612 * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise.
613 * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise.
614 * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise.
615 * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise.
616 * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise.
617 * elf32-score.c (elf_backend_omit_section_dynsym): Likewise.
618 * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise.
619 * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise.
620 * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise.
621 * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise.
622 * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise.
623 * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise.
624 * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise.
625 * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise.
626 * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise.
627 * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise.
628 (bfd_elfNN_bfd_make_debug_symbol): Likewise.
629 (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
630 (bfd_elfNN_bfd_set_private_flags): Likewise.
631 (bfd_elfNN_bfd_is_target_special_symbol): Likewise.
632 (elf_backend_init_index_section): Likewise.
633 (elf_backend_allow_non_load_phdr): Likewise.
634 * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise.
635 * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise.
636 * ieee.c (ieee_construct_extended_name_table): Likewise.
637 (ieee_write_armap): Likewise.
638 (ieee_write_ar_hdr): Likewise.
639 (ieee_bfd_is_target_special_symbol): Likewise.
640 * ihex.c (ihex_canonicalize_symtab): Likewise.
641 (ihex_bfd_is_target_special_symbol): Likewise.
642 * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise.
643 * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise.
644 (_bfd_ecoff_set_alignment_hook): Likewise.
645 * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise.
646 * mmo.c (mmo_bfd_is_target_special_symbol): Likewise.
647 * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise.
648 * oasys.c (oasys_construct_extended_name_table): Likewise.
649 (oasys_write_armap): Likewise.
650 (oasys_write_ar_hdr): Likewise.
651 (oasys_bfd_is_target_special_symbol): Likewise.
652 * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise.
653 * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise.
654 * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise.
655 * som.c (som_bfd_is_target_special_symbol): Likewise.
656 * srec.c (srec_bfd_is_target_special_symbol): Likewise.
657 * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise.
658 * verilog.c (verilog_bfd_is_target_special_symbol): Likewise.
659 * versados.c (versados_bfd_is_target_special_symbol): Likewise.
660 (versados_bfd_reloc_name_lookup): Likewise.
661 * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise.
662 (vms_bfd_define_start_stop): Likewise.
663 (alpha_vms_bfd_is_target_special_symbol): Likewise.
664 * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise.
665 * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise.
666 * elf32-arc.c (get_replace_function): Assign replacement function
668 * elf32-i370.c (i370_noop): Update prototype.
670 2018-02-13 Alan Modra <amodra@gmail.com>
673 * elf.c (_bfd_elf_fixup_group_sections): Account for removed
674 relocation sections. If size reduces to just the flag word,
675 remove that too and mark with SEC_EXCLUDE.
676 * elflink.c (bfd_elf_final_link): Strip empty group sections.
678 2018-02-13 Alan Modra <amodra@gmail.com>
681 * elf.c (assign_file_positions_for_non_load_sections): Rewrite
684 2018-02-12 Zebediah Figura <z.figura12@gmail.com>
686 * i386msdos.c (msdos_mkobject); New function.
687 (msdos_object_p): New function.
688 (i386_msdos_vec): Use msdos_object_p as the check_format
690 * peicode.h: Rename external_PEI_DOS_hdr, DOSMAGIC, and
691 NT_SIGNATURE to external_DOS_hdr, IMAGE_DOS_SIGNATURE, and
693 * peXXigen.c: Likewise.
694 * coff-ia64.c: Likewise.
696 2018-02-12 Nick Clifton <nickc@redhat.com>
698 * elf32-nds32.c (nds32_elf_relax_longjump3): Remove redundant
700 * elf32-arc.c (elf_arc_relocate_section): Likewise.
702 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
704 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Reorder conditions.
705 (sparc_elf_append_rela): Assert that there is enough room in section.
706 (_bfd_sparc_elf_copy_indirect_symbol): Fix formatting.
707 (_bfd_sparc_elf_adjust_dynamic_symbol): Minor tweak.
708 (allocate_dynrelocs): Remove outdated comments and reorder conditions.
709 For a symbol subject to a GOT relocation, reserve a slot in the
710 relocation section if the symbol isn't dynamic and we are in PIC mode.
711 (_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: If relocation
712 is relaxed and a slot was reserved, generate a R_SPARC_NONE relocation.
713 <R_SPARC_GOTDATA_OP_HIX22>: Adjust comments.
714 <R_SPARC_PC10>: Reorder conditions. Remove always-false assertion.
715 (_bfd_sparc_elf_finish_dynamic_symbol): Rename local_undefweak into
716 resolved_to_zero. Do not generate a dynamic GOT relocation for an
717 undefined weak symbol with non-default visibility. Remove superfluous
718 'else' and fix formatting.
720 2018-02-09 H.J. Lu <hongjiu.lu@intel.com>
722 * elf32-i386.c (elf_i386_get_synthetic_symtab): Also handle
724 (i386_elf32_sol2_vec): Don't declare.
725 (elf_i386_link_setup_gnu_properties): Also handle is_solaris.
726 Don't set need_global_offset_table.
727 (elf_i386_solaris_arch_bed): New.
728 (elf_backend_arch_data): Set to elf_i386_solaris_arch_bed for
730 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Check
731 target_os != is_nacl instead of target_os == is_normal.
732 (x86_64_elf64_sol2_vec): Don't declare.
733 (elf_x86_64_link_setup_gnu_properties): Check target_os !=
734 is_nacl instead of target_os == is_normal. Don't set
735 need_global_offset_table.
736 (elf_x86_64_solaris_arch_bed): New.
737 (elf_backend_arch_data): Set to elf_x86_64_solaris_arch_bed for
739 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep
740 _GLOBAL_OFFSET_TABLE_ for Solaris.
741 (_bfd_x86_elf_link_setup_gnu_properties): Don't copy
742 need_global_offset_table.
743 * elfxx-x86.h (elf_x86_target_os): Add is_solaris.
744 (elf_x86_link_hash_table): Remove need_global_offset_table.
745 (elf_x86_init_table): Likewise.
747 2018-02-08 H.J. Lu <hongjiu.lu@intel.com>
749 * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
751 (i386_elf32_sol2_vec): Declared.
752 (elf_i386_link_setup_gnu_properties): Set
753 need_global_offset_table with info->output_bfd->xvec.
754 * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
756 (x86_64_elf64_sol2_vec): Declared.
757 (elf_x86_64_link_setup_gnu_properties): Set
758 need_global_offset_table with info->output_bfd->xvec.
760 2018-02-08 H.J. Lu <hongjiu.lu@intel.com>
762 * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
764 (elf_i386_link_setup_gnu_properties): Set need_global_offset_table
766 * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
768 (elf_x86_64_link_setup_gnu_properties): Set
769 need_global_offset_table for Solaris.
770 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep the
771 unused _GLOBAL_OFFSET_TABLE_ for Solaris.
772 (_bfd_x86_elf_link_setup_gnu_properties): Copy
773 need_global_offset_table.
774 * elfxx-x86.h (elf_x86_link_hash_table): Add
775 need_global_offset_table.
776 (elf_x86_init_table): Likewise.
778 2018-02-08 Jim Wilson <jimw@sifive.com>
780 * elfnn-riscv.c (riscv_elf_relocate_section): Add comment for previous
783 2018-02-08 Nick Clifton <nickc@redhat.com>
786 * elf.c (elf_parse_notes): Reject notes with excessuively large
789 2018-02-07 Alan Modra <amodra@gmail.com>
791 Revert 2018-01-17 Alan Modra <amodra@gmail.com>
792 * elf32-ppc.c: Remove speculation barrier support.
793 * elf32-ppc.h: Likewise.
794 * elf64-ppc.c: Likewise.
795 * elf64-ppc.h: Likewise.
797 2018-02-06 Jim Wilson <jimw@sifive.com>
799 * elfnn-riscv.c (riscv_elf_relocate_section): Return TRUE if used
800 callback to report an error.
802 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
805 * elfxx-sparc.c (sparc_elf_tls_transition): Turn call to bfd_link_pic
806 into call to !bfd_link_executable and tidy up.
807 (_bfd_sparc_elf_check_relocs): Fix formatting and tidy up.
808 <R_SPARC_TLS_LE_HIX22>: Turn call to bfd_link_pic into call to
809 !bfd_link_executable.
810 <R_SPARC_TLS_IE_HI22>: Likewise.
811 <GOT relocations>: Remove useless code, tidy and merge related blocks.
812 <R_SPARC_TLS_GD_CALL>: Turn call to bfd_link_pic into call to
813 !bfd_link_executable.
814 <R_SPARC_WPLT30>: Tidy up.
815 (_bfd_sparc_elf_gc_mark_hook): Turn call to bfd_link_pic into call to
816 !bfd_link_executable.
817 (allocate_dynrelocs): Likewise.
818 (_bfd_sparc_elf_relocate_section): Fix formatting and tidy up.
819 <R_SPARC_TLS_GD_HI22>: Merge into...
820 <R_SPARC_TLS_GD_LO10>: ...this. Adjust 4th argument in call to
821 sparc_elf_tls_transition and remove redundant code.
822 <R_SPARC_TLS_LDM_HI22>: Turn call to bfd_link_pic into call to
823 !bfd_link_executable.
824 <R_SPARC_TLS_LDO_HIX22>: Likewise.
825 <R_SPARC_TLS_LE_HIX22>: Likewise. Tidy up.
826 <R_SPARC_TLS_LDM_CALL>: Likewise.
827 <R_SPARC_TLS_GD_CALL>: Likewise. Tidy up.
828 <R_SPARC_TLS_GD_ADD>: Likewise.
829 <R_SPARC_TLS_LDM_ADD>: Likewise.
830 <R_SPARC_TLS_LDO_ADD>: Likewise.
831 <R_SPARC_TLS_IE_LD>: Likewise.
833 2018-02-06 Miloš Stojanović <milos.stojanovic@rt-rk.com>
836 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): If the dwarf
837 functions failed to find the function name, try the generic elf
838 find function instead.
840 2018-02-06 Sergio Durigan Junior <sergiodj@redhat.com>
842 * coff-rs6000.c (xcoff_write_archive_contents_old): Use
843 'memcpy' instead of 'strncpy' when writing the magic number.
845 2018-02-06 Nick Clifton <nickc@redhat.com>
848 * opncls.c (bfd_get_debug_link_info_1): Check the size of the
849 section before attempting to read it in.
850 (bfd_get_alt_debug_link_info): Likewise.
852 2018-02-06 Paul Carroll <pcarroll@codesourcery.com>
854 * bfd/dwarf2.c (find_abstract_name): Modified to return file and
855 line information in addition to name, if they can be found.
857 2018-02-05 Renlin Li <renlin.li@arm.com>
860 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Relax the
861 R_AARCH64_ABS32 and R_AARCH64_ABS16 for absolute symbol. Apply the
862 check for writeable section as well.
864 2018-02-05 H.J. Lu <hongjiu.lu@intel.com>
867 * elf32-i386.c (elf_i386_check_relocs): Set got_referenced if
868 _GLOBAL_OFFSET_TABLE_ is referenced or GOT is needed to resolve
869 undefined weak symbol to 0.
870 * elf64-x86-64.c (elf_x86_64_check_relocs): Set got_referenced
871 if _GLOBAL_OFFSET_TABLE_ is referenced.
872 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Check
873 got_referenced instead of ref_regular_nonweak. Remove the
874 unused _GLOBAL_OFFSET_TABLE_ from symbol table.
875 * elfxx-x86.h (elf_x86_link_hash_table): Add got_referenced.
877 2018-02-05 Maciej W. Rozycki <macro@mips.com>
879 * elfnn-riscv.c (_bfd_riscv_relax_pc): Use `memset' to
880 initialize `hi_reloc'.
882 2018-02-05 Maciej W. Rozycki <macro@mips.com>
884 * elfxx-mips.c (_bfd_mips_elf_section_processing): For
885 SHT_MIPS_REGINFO sections don't assert the correct size and
886 report an error instead.
888 2018-02-05 Maciej W. Rozycki <macro@mips.com>
890 * elf.c (_bfd_elf_write_object_contents): Propagate a failure
891 status from `->elf_backend_section_processing'.
893 2018-02-02 Jim Wilson <jimw@sifive.com>
896 * elfnn-riscv.c (riscv_relax_delete_bytes): New parameter link_info.
897 If link_info->wrap_hash, check for a duplicate symbol and ignore.
898 (_bfd_riscv_relax_call, bfd_riscv_relax_lui, _bfd_riscv_relax_tls_le):
899 Pass new argument to riscv_relax_delete_bytes.
900 (_bfd_riscv_relax_align, _bfd_riscv_relax_delete): Likewise. Remove
901 ATTRIBUTE_UNUSED from link_info parameter.
903 2018-02-02 Alan Modra <amodra@gmail.com>
905 * elf64-ppc.c (ppc64_elf_relocate_section): Don't relocate nops
906 emitted for toc sequence optimization. Set and use "howto" later.
908 2018-02-01 Simon Marchi <simon.marchi@ericsson.com>
910 * elf64-ppc.c (ppc64_elf_archive_symbol_lookup): Avoid pointer
911 arithmetic on NULL pointer.
912 * elflink.c (_bfd_elf_archive_symbol_lookup,
913 elf_link_add_archive_symbols): Likewise.
915 2018-01-31 Michael Matz <matz@suse.de>
917 * elflink.c (bfd_elf_define_start_stop): Fix check of
920 2018-01-31 H.J. Lu <hongjiu.lu@intel.com>
923 * elflink.c (bfd_elf_define_start_stop): Check if __start and
924 __stop symbols are referenced by shared objects.
926 2018-01-30 Alan Modra <amodra@gmail.com>
929 * elf.c (_bfd_elf_map_sections_to_segments): Don't start a new
930 segment when demand paged with lma on the same page. Test this
931 before load/non-load, executable/non-executable,
932 writable/non-writable tests and simplify. Delete bogus relro
933 condition in writable/non-writable test. Delete outdated
936 2018-01-30 Alan Modra <amodra@gmail.com>
938 * elflink.c (bfd_elf_define_start_stop): Make __start and __stop
941 2018-01-29 Alan Modra <amodra@gmail.com>
944 * coffgen.c (coff_pointerize_aux): Ensure auxent tagndx is in
945 range before converting to a symbol table pointer.
947 2018-01-27 Nick Clifton <nickc@redhat.com>
949 * po/ru.po: Updated Russian translation.
951 2018-01-26 Alan Modra <amodra@gmail.com>
953 * elflink.c (bfd_elf_define_start_stop): Override symbols when
954 they are defined dynamically.
956 2018-01-26 Alan Modra <amodra@gmail.com>
958 * elf64-ppc.c (ppc64_elf_size_stubs): Iterate sizing when
959 .branch_lt changes size.
961 2018-01-25 Alan Modra <amodra@gmail.com>
964 * elfcode.h (elf_object_p): Avoid integer overflow.
966 2018-01-25 Eric Botcazou <ebotcazou@adacore.com>
969 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
970 Do a mere lookup of the __tls_get_addr symbol instead of adding it.
973 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
976 * elfxx-sparc.c (sparc_elf_tls_transition): Replace
977 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
978 bfd_link_executable for TLS check.
979 (_bfd_sparc_elf_check_relocs): Likewise.
980 (allocate_dynrelocs): Likewise.
981 (_bfd_sparc_elf_relocate_section): Likewise.
983 2018-01-24 Renlin Li <renlin.li@arm.com>
985 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Add support for
986 BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
987 BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
988 BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
989 BFD_RELOC_AARCH64_MOVW_PREL_G3.
990 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
991 (_bfd_aarch64_elf_resolve_relocation): Likewise.
993 2018-01-24 Renlin Li <renlin.li@arm.com>
995 * reloc.c: Add BFD_RELOC_AARCH64_MOVW_PREL_G0,
996 BFD_RELOC_AARCH64_MOVW_PREL_G0_NC, BFD_RELOC_AARCH64_MOVW_PREL_G1,
997 BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, BFD_RELOC_AARCH64_MOVW_PREL_G2,
998 BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, BFD_RELOC_AARCH64_MOVW_PREL_G3.
999 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add entries for
1000 BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
1001 BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
1002 BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
1003 BFD_RELOC_AARCH64_MOVW_PREL_G3.
1004 * bfd-in2.h: Regenerate.
1005 * libbfd.h: Regenerate.
1007 2018-01-23 Maciej W. Rozycki <macro@mips.com>
1009 * elfxx-mips.c (_bfd_mips_elf_final_link): Update a stale
1010 `mips_elf32_section_processing' comment reference.
1012 2018-01-20 H.J. Lu <hongjiu.lu@intel.com>
1015 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Check the
1016 versioned __tls_get_addr symbol.
1018 2018-01-19 Nick Clifton <nickc@redhat.com>
1020 * po/fr.po: Updated French translation.
1022 2018-01-18 Alan Modra <amodra@gmail.com>
1024 * elf32-ppc.c (ppc_elf_create_glink): Correct alignment of .glink.
1025 * elf64-ppc.c (ppc64_elf_size_stubs): Handle negative plt_stub_align.
1026 (ppc64_elf_build_stubs): Likewise.
1028 2018-01-17 Nick Clifton <nickc@redhat.com>
1030 * po/ru.po: Updated Russian translation.
1031 * po/uk/po: Updated Ukranian translation.
1033 2018-01-17 Alan Modra <amodra@gmail.com>
1035 * elf64-ppc.c (ppc64_elf_build_stubs): Silence gcc warning.
1037 2018-01-17 Alan Modra <amodra@gmail.com>
1039 * elf32-ppc.c (GLINK_ENTRY_SIZE): Handle speculation barrier.
1040 (CRSETEQ, BEQCTRM): Define.
1041 (is_nonpic_glink_stub): Don't check bctr.
1042 (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
1043 (ppc_elf_relax_section): Size speculation barrier.
1044 (output_bctr): New function.
1045 (write_glink_stub): Use output_bctr.
1046 (ppc_elf_relocate_section): Use output_bctr for long branch stub.
1047 (ppc_elf_finish_dynamic_symbol): Likewise.
1048 (ppc_elf_finish_dynamic_sections): Use output_bctr.
1049 * elf32-ppc.h (struct ppc_elf_params): Add speculate_indirect_jumps.
1050 * elf64-ppc.c (CRSETEQ, BEQCTRM, BEQCTRLM): Define.
1051 (GLINK_PLTRESOLVE_SIZE): Size speculation barrier.
1052 (size_global_entry_stubs): Handle speculation barrier sizing.
1053 (plt_stub_size): Likewise.
1054 (output_bctr): New function.
1055 (build_plt_stub, build_tls_get_addr_stub): Output speculation
1057 (ppc_build_one_stub): Likewise for ppc_stub_plt_branch.
1058 (ppc_size_one_stub): Size speculation barrier in ppc_stub_plt_branch.
1059 (build_global_entry_stubs): Output speculation barrier.
1060 (ppc64_elf_build_stubs): Likewise in __glink_PLTresolve stub.
1061 * elf64-ppc.h (struct ppc64_elf_params): Add speculate_indirect_jumps.
1063 2018-01-17 Alan Modra <amodra@gmail.com>
1065 * elf32-ppc.c (GLINK_ENTRY_SIZE): Add parameters, handle
1066 __tls_get_addr_opt, and alignment sizing.
1067 (TLS_GET_ADDR_GLINK_SIZE): Delete.
1068 (is_nonpic_glink_stub): Don't use GLINK_ENTRY_SIZE.
1069 (ppc_elf_get_synthetic_symtab): Recognize stubs spaced at 4, 6,
1071 (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
1072 (allocate_dynrelocs): Use new GLINK_ENTRY_SIZE.
1073 (ppc_elf_size_dynamic_sections): Likewise. Size branch table
1075 (write_glink_stub): Handle __tls_get_addr_opt stub.
1076 Pad out to size given by GLINK_ENTRY_SIZE.
1077 (ppc_elf_relocate_section): Adjust write_glink_stub call.
1078 (ppc_elf_finish_dynamic_symbol): Likewise.
1079 (ppc_elf_finish_dynamic_sections): Write PLTresolve without using
1080 insn array since so many need rewriting.
1081 * elf32-ppc.h (struct ppc_elf_params): Add plt_stub_align.
1082 * elf64-ppc.c (GLINK_PLTRESOLVE_SIZE): Rename from
1083 GLINK_CALL_STUB_SIZE. Add htab param and evaluate to size without
1084 nops. Adjust all uses.
1085 (ppc64_elf_get_synthetic_symtab): Don't use GLINK_CALL_STUB_SIZE
1086 in glink_vma calculation.
1087 (struct ppc_link_hash_table): Add global_entry section pointer.
1088 (create_linkage_sections): Create separate section for global
1090 (PPC_LO, PPC_HI, PPC_HA): Move earlier.
1091 (size_global_entry_stubs): Handle sizing for aligned stubs.
1092 (ppc64_elf_size_dynamic_sections): Handle global_entry alloc,
1093 and don't stash end of glink branch table in rawsize.
1094 (ppc_build_one_stub): Rewrite stub size calculations.
1095 (build_global_entry_stubs): Use new section.
1096 (ppc64_elf_build_stubs): Don't pad __glink_PLTresolve with nops.
1097 Build lazy link stubs out to end of section. Build global entry
1098 stubs in new section.
1100 2018-01-15 Nick Clifton <nickc@redhat.com>
1102 * po/uk.po: Updated Ukranian translation.
1104 2018-01-13 Nick Clifton <nickc@redhat.com>
1106 * po/bfd.pot: Regenerated.
1108 2018-01-13 Nick Clifton <nickc@redhat.com>
1110 * version.m4: Bump version to 2.30.51
1111 * configure: Regenerate.
1113 2018-01-13 Nick Clifton <nickc@redhat.com>
1115 2.30 branch created.
1117 2018-01-12 Jens Widell <jl@opera.com>
1119 * elf.c (setup_group): Optimize search for group by remembering
1120 last found group and restarting search at that index.
1121 * elf-bfd.h (struct elf_obj_tdata): Add group_search_offset field.
1123 2018-01-12 Gunther Nikl <gnikl@users.sourceforge.net>
1125 * aoutx.h (aout_link_check_ar_symbols): Remove default and handle
1126 bfd_link_common_skip_none in switch.
1128 2018-01-12 Alan Modra <amodra@gmail.com>
1131 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Ignore dynamic
1132 references on forced local symbols.
1134 2018-01-12 Vlad Ivanov <vlad@ivanov.email>
1136 * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
1137 .reginfo section has wrong size.
1139 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
1142 * elf.c (_bfd_elf_map_sections_to_segments): When generating
1143 separate code and read-only data LOAD segments, create a new
1144 LOAD segment if the previous section contains text and the
1145 current section doesn't or vice versa. Don't put a writable
1146 section in a read-only segment if there is a RELRO segment.
1148 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
1151 * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Ignore dynamic
1152 references on forced local symbols.
1154 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
1157 * elflink.c (bfd_elf_gc_sections): Keep all PREINIT_ARRAY,
1158 INIT_ARRAY as well as FINI_ARRAY sections for ld -r --gc-section.
1160 2017-09-27 Kuan-Lin Chen <kuanlinchentw@gmail.com>
1163 * elf32-nds32.c (nds32_elf_relax_loadstore): Fix a typographical error.
1165 2018-01-03 John Baldwin <jhb@FreeBSD.org>
1167 * elf.c (elfcore_grok_freebsd_note): Handle
1168 NT_FREEBSD_PROCSTAT_PROC, NT_FREEBSD_PROCSTAT_FILES, and
1169 NT_FREEBSD_PROCSTAT_VMMAP.
1171 2018-01-03 Alan Modra <amodra@gmail.com>
1173 Update year range in copyright notice of all files.
1175 For older changes see ChangeLog-2017
1177 Copyright (C) 2018 Free Software Foundation, Inc.
1179 Copying and distribution of this file, with or without modification,
1180 are permitted in any medium without royalty provided the copyright
1181 notice and this notice are preserved.
1187 version-control: never