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