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