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