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