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