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