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